bronson has quit [Remote host closed the connection]
chipotle has quit [Quit: cheerio]
Takle has quit [Remote host closed the connection]
fcanela has quit [Client Quit]
antgel has quit [Ping timeout: 276 seconds]
nanoyak has quit [Quit: Computer has gone to sleep.]
niko has joined #ruby
CpuID has quit [Read error: Connection reset by peer]
triple_b has joined #ruby
pengin has quit [Remote host closed the connection]
dfinninger has quit [Remote host closed the connection]
cor has quit [Quit: Page closed]
pengin has joined #ruby
reinaldob has quit [Remote host closed the connection]
mikepack has joined #ruby
nii236|irssi has joined #ruby
<nii236|irssi>
Hey all, can I ask for Ruby support here
<weaksauce>
nii236|irssi yes
nii236|irssi has quit [Client Quit]
reinaldob has joined #ruby
king313 has quit [Quit: .]
nii236|irssi has joined #ruby
<nii236|irssi>
weaksauce: Cool
fgo has joined #ruby
Megtastique has quit []
<nii236|irssi>
I'm running through Ruby Koans at the moment. I've worked with Python before and I want something that is like the interpreter from there. How do I bring it up?
spyderman4g63 has quit [Ping timeout: 276 seconds]
<nii236|irssi>
Just running Ruby brings up a blank line, which might be it
<weaksauce>
irb nii236|irssi
<weaksauce>
interactive ruby is what it stands for
<postmodern>
pipework, haha, i read that
<nii236|irssi>
weaksauce: Sweet! It worked
<weaksauce>
:)
pengin has quit [Ping timeout: 272 seconds]
<postmodern>
pipework, it was annoying since all the good spider/crawler names were already taken, and it was the early 2000s when we thought removing vowels from words was cool :/
Megtastique has joined #ruby
<weaksauce>
nii236|irssi if the koans are too tough or whatever, the ruby section of codeacademy is nice and free.
<nii236|irssi>
weaksauce: Yeah I gave that a go, but I just don't like going through basic types and stuff again
<nii236|irssi>
I like the TDD feeling of koans plus how it runs locally
baweaver has joined #ruby
<weaksauce>
yeah that's fair... I like the koans too.
CpuID has joined #ruby
CpuID has quit [Changing host]
CpuID has joined #ruby
mitchellhenke has quit [Quit: Computer has gone to sleep.]
zwer_c_w is now known as zwer
fgo has quit [Ping timeout: 265 seconds]
n008f4g_ has quit [Ping timeout: 252 seconds]
ghr has joined #ruby
skj3gg has quit [Quit: ZZZzzz…]
jenrzzz has quit [Ping timeout: 276 seconds]
bronson has joined #ruby
skj3gg has joined #ruby
jenrzzz has joined #ruby
DadoCe has quit [Remote host closed the connection]
mrmargolis has joined #ruby
hmsimha has quit [Ping timeout: 252 seconds]
<nii236|irssi>
weaksauce: Sheesh koans is getting hard. Maybe you're right. Rubymonk might be a better path
<weaksauce>
;)
<weaksauce>
what are you on?
ghr has quit [Ping timeout: 244 seconds]
<odigity>
Just went through most of the guides on rubygems.org, but didn't see anything talking about where the DSL comes from (like the gem method used in Gemfiles), or how rubygems automatically gets loaded by ruby without require
<weaksauce>
rubygems is part of ruby now I think
<odigity>
I know it comes with it. I did find this file: /usr/local/lib/site_ruby/1.9.1/rubygems.rb
<odigity>
I guess it's part of the magic of the ruby start-up process that also loads the stdlib.
<weaksauce>
yeah there is a bit of magic
Aova has quit [Read error: Connection reset by peer]
<odigity>
ah. looks like the gem method is straight off Kernel
ARCADIVS has joined #ruby
spyderman4g63 has joined #ruby
roolo has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
<odigity>
must be monkey-patched in by rubygems.rb, because it's not in the docs for the Kernel module
Lexun has quit [Remote host closed the connection]
bronson has quit [Remote host closed the connection]
Lexun has joined #ruby
<weaksauce>
x = Exception.new nii236|irssi
<weaksauce>
x.class
p3ery has joined #ruby
<nii236|irssi>
Thanks guys, that helps alot
<nii236|irssi>
'a lot
checkit has quit [Quit: (null)]
sambao21 has quit [Quit: Computer has gone to sleep.]
<zenspider>
weaksauce: yup. I still use it despite coding in ruby for ~15 years
it0a has quit [Ping timeout: 245 seconds]
wallerdev has joined #ruby
Lexun has quit [Remote host closed the connection]
spyderman4g63 has quit [Ping timeout: 256 seconds]
slyv has joined #ruby
Lexun has joined #ruby
Hijiri has joined #ruby
znst has joined #ruby
<nii236|irssi>
Hey guys I completed a koan test by accident. What does /foo/ do?
<nii236|irssi>
Its like a string but its not
<weaksauce>
zenspider I do something similar with a personal man page. doesn't look as nice though and it's nowhere near as thorough. if you use zsh it's nice to have tab completion on all your little notes.
<sevenseacat>
nii236|irssi: ask jordan, he's the ios expert afaik
fgo has joined #ruby
<weaksauce>
I like ruby and rubymotion seems nice. but will probably end up using swift
jonmorehouse has joined #ruby
<nii236|irssi>
sevenseacat: oki
jonr22 has quit [Ping timeout: 245 seconds]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
it0a has quit [Ping timeout: 246 seconds]
siggy has quit [Quit: siggy]
fgo has quit [Ping timeout: 240 seconds]
sent-hil has quit [Quit: Connection closed for inactivity]
pdoherty has joined #ruby
chrishough has joined #ruby
duncannz has joined #ruby
fgo has joined #ruby
ghr has joined #ruby
razieliyo has quit [Ping timeout: 255 seconds]
claptor has joined #ruby
astrobun_ has joined #ruby
jottr has joined #ruby
<centrx>
Objective-C is very verbose and requires a lot of ceremony
amclain has joined #ruby
deol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mago0 has joined #ruby
ghr has quit [Ping timeout: 256 seconds]
mago0 has quit [Client Quit]
nobitanobi has quit [Remote host closed the connection]
Aova has quit [Read error: Connection reset by peer]
<pipework>
It's not as verbose and ceremonious as Java.
<pipework>
Or writing a rails app, for that matter.
it0a has joined #ruby
n008f4g_ has quit [Ping timeout: 245 seconds]
<sevenseacat>
i'll agree that writing rails apps cab ne ceremonious, but not verbose
<sevenseacat>
*can be
Hijiri has quit [Quit: WeeChat 1.0.1]
keen__________44 has joined #ruby
nicolastarzia has joined #ruby
gccostab_ has quit [Quit: ZZZzzz…]
leonshalimov has joined #ruby
keen__________43 has quit [Ping timeout: 244 seconds]
pdoherty has quit [Remote host closed the connection]
sent1nel has joined #ruby
it0a has quit [Client Quit]
Aova has joined #ruby
ta has joined #ruby
Sirupsen has joined #ruby
albert_ has joined #ruby
nicolastarzia has quit [Ping timeout: 255 seconds]
leonshalimov has quit [Ping timeout: 276 seconds]
Hijiri has joined #ruby
xxneolithicxx has joined #ruby
fgo has quit [Ping timeout: 246 seconds]
swgillespie has joined #ruby
davedev24_ has quit [Ping timeout: 265 seconds]
uptownhr has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
it0a has joined #ruby
codeFiend has quit [Quit: codeFiend]
jottr has quit [Ping timeout: 252 seconds]
ta has quit [Ping timeout: 245 seconds]
jenrzzz has joined #ruby
tmk1108 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pika_pika has quit [Ping timeout: 245 seconds]
pietr0 has quit [Quit: pietr0]
atomical has joined #ruby
bronson has joined #ruby
maximski has quit []
mrmargolis has quit [Remote host closed the connection]
PanzerModern has quit [Remote host closed the connection]
eka has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pika_pika has joined #ruby
uptownhr has quit [Quit: uptownhr]
bham has joined #ruby
metadave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xxneolithicxx has quit [Quit: Leaving.]
<bham>
hi
<bham>
hi all
bronson has quit [Ping timeout: 245 seconds]
freerobby has quit [Quit: Leaving.]
<bham>
is there anyone?
<sevenseacat>
nope.
<bham>
wew
<pipework>
we're all not
<bham>
haha I have a question about ruby
<bham>
can you help me?
<diegoviola>
I thought you might have a question about python
tyfighter has quit [Quit: tyfighter]
uptownhr has joined #ruby
<diegoviola>
just ask...
uptownhr has quit [Client Quit]
<bham>
I want to iterates the array and I want to get the last value
bkulbida has joined #ruby
<bham>
%w[1 2 3 4 5]
<bham>
how to iterates and get the last value?
ltd has quit [Ping timeout: 276 seconds]
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<sevenseacat>
array.last ?
<bham>
nope
maoko has joined #ruby
<bham>
I dont know if it is possible to gets the last or gets the last index
pika_pika has quit [Ping timeout: 245 seconds]
<bham>
just like this array.each { |x| puts x.last} it will not work
<sevenseacat>
well that last element doesnt change as you iterate over it
<sevenseacat>
so, what are you actually trying to do
<bham>
yes
<SHyx0rmZ>
something like array.map.last, I presume
<bham>
but I want to iterate the last object on an array.. I have an array and theres hashes inside of it
jerematic has quit [Remote host closed the connection]
<bham>
i want to get the last object of an array
davedev24_ has joined #ruby
<sevenseacat>
array.last
<bham>
%w[{},{},{},{foo: 'bar'}]
pietr0 has joined #ruby
albert_ has quit [Read error: Connection reset by peer]
<gr33n7007h>
hah
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<epitron>
hmm, i tried to overload "send" and "__send__", so i could log method calls... but it didn't work
<zenspider>
bham: do you have some other language in mind that does what you want?
<epitron>
how comes?
<Nilium>
Did it die with a stack overflow?
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nahtanm has quit [Ping timeout: 246 seconds]
<bham>
hmm I'm just asking if that possible to iterates an array and gets the last value
<zenspider>
bham: iterate the last item of an array sure sounds like: ary.last.each do |x| ... end
<Nilium>
bham: Like, iterate an array and tell which element received is the last?
<bham>
ah oks I will try that one.
tyfighter has joined #ruby
<zenspider>
bham: "I'm just asking"... no, you're not. go look at all the questions you've asked. they're contradictory
<zenspider>
ask ONE clear well defined question
<bham>
oks sorry if sounds contradict.
albert_ has joined #ruby
chu has quit [Quit: leaving]
<bham>
oks I have a new algo for this thanks for this answer ary.last.each do |x| ... end
baweaver has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Leaving...]
wallerdev has quit [Quit: wallerdev]
fgo has joined #ruby
x77686d has quit [Quit: x77686d]
ta has joined #ruby
freerobby has joined #ruby
baweaver has joined #ruby
fandi has joined #ruby
bronson has joined #ruby
ltd has joined #ruby
fandi has quit [Max SendQ exceeded]
fandi has joined #ruby
symbol has joined #ruby
ta has quit [Ping timeout: 276 seconds]
jonmorehouse has quit [Ping timeout: 244 seconds]
ellisTAA has joined #ruby
fandi has quit [Max SendQ exceeded]
fandi has joined #ruby
bham has quit [Quit: Page closed]
zachrab has joined #ruby
ltd has quit [Ping timeout: 246 seconds]
<ellisTAA>
im writing an if else statement. i’m iterating through an array and i want it to do something if the condition is met else do nothing. what should i write in the else section for it to go on and continue the rest of the code?
jonmorehouse has joined #ruby
nateberkopec has joined #ruby
krz has joined #ruby
n008f4g_ has joined #ruby
troubadour has joined #ruby
zachrab has quit [Ping timeout: 272 seconds]
<pontiki>
ellisTAA: the if/else is inside the loop?
<centrx>
What are you really trying to do
<pontiki>
ellisTAA: show us what you have so far, and in comments describe what you'd like to do
<ellisTAA>
i’m actually working on the first program or whtatever u want to call it for myself
<ellisTAA>
i’m trying to check an array for duplicates
<ellisTAA>
ok ill show u holdon
ltd has joined #ruby
fandi has quit [Max SendQ exceeded]
nateberkopec has quit [Client Quit]
bjornar has quit [Ping timeout: 252 seconds]
fandi has joined #ruby
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<epitron>
ellisTAA: do you want to remove all duplicates?
<ellisTAA>
epitron: what dos (&:itself) mean and what do the k,v refer to?
<centrx>
.eunich
<epitron>
youneaq
hamakn has joined #ruby
<gr33n7007h>
ouch!
kenneth has quit [Client Quit]
<epitron>
ellisTAA: array.group_by(&:itself) == array.group_by {|e| e }
fandi has quit [Max SendQ exceeded]
<zenspider>
can someone please answer their original question? it's VERY straightforward
bjornar has joined #ruby
kenneth has joined #ruby
fandi has joined #ruby
<epitron>
._.
<centrx>
that's you epitron
<centrx>
you're on top of it
<epitron>
sorry, i'm done
<centrx>
go epitron !
ghr has joined #ruby
<epitron>
two questions answered
<zenspider>
ellisTAA: remove "else continue". you don't bother having an else if there is no other action
<epitron>
quota reached
<ellisTAA>
zenspider: ty
yfeldblum has quit [Remote host closed the connection]
<zenspider>
if condition then code end
kt2 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<zenspider>
or just code if condition if code is a single expression
<pontiki>
the lack of proper indentation makes it too hard to figure out what is going on in that, ellisTAA
<zenspider>
if there is nothing to do in the positive case, use unless instead of if
<zenspider>
that too... 2 spaces per indent. your text editor should know better than you
<epitron>
that also needs a "compact"
<centrx>
ellisTAA, The keyword to use in Ruby to skip to the next iteration would be 'next' (instead of continue), but in this case not necessary
zachrab has joined #ruby
<ellisTAA>
centrx: ty
<epitron>
and you need to change "include" to "include?"
<ellisTAA>
i have a feeling .include(x) won’t work for me bc itll just look for whether it is included and not continue through the rest of the array
<epitron>
include is how you mixin a module :)
<ellisTAA>
epitron: ty
<epitron>
include? is how you check if something is in the array
coderhs has joined #ruby
<epitron>
also, you need a counter for each element
<epitron>
so that should be a hash of counters
<epitron>
in other words, use "uniq" or "group_by" :)
<zenspider>
centrx: that's also better as an each, instead of a map... you're not returning an array of results, you're just enumerating and calculating
zachrab has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 245 seconds]
<epitron>
group_by ftw
Aova has quit [Read error: Connection reset by peer]
<ellisTAA>
how do i check to see if my code works using terminal?
<epitron>
you can play around in irb (or pry)
<zenspider>
you write tests and run them
<epitron>
or tests, if you really want :)
<ellisTAA>
so i can only see if my method works using a test? if so ill just have to write one
<sevenseacat>
or you can just call the method
<sevenseacat>
if you're just starting out
<zenspider>
writing tests early is a Good Thing. esp as a newb
<ellisTAA>
sevenseacat: how do i call the method form terminal
<ellisTAA>
from*
<sevenseacat>
what is it, ruby -e or something
mloveless has quit []
<sevenseacat>
ruby -e "code to be run"
<epitron>
zenspider: i think ellisTAA needs to know how to tell if his program is working without tests first... that's a pretty basic ruby skill :)
<epitron>
i dunno if he'll be able to get tests going if he has trouble with this
<ellisTAA>
so i’d write ruby -e name_of_method
<sevenseacat>
no
<zenspider>
epitron: no time to learn like the present!
<epitron>
zenspider: don't build on shaky foundations
<gr33n7007h>
ellisTAA, fuck about in irb/pry first
<epitron>
gr33n7007h: +1
timanema has joined #ruby
<gr33n7007h>
baby steps ellisTAA
Aova has joined #ruby
kt2 has joined #ruby
<zenspider>
epitron: testing builds a solid foundation. you're not going to convince me otherwise
<epitron>
zenspider: foundations are relative to what's below them :)
ta has joined #ruby
NanotechSamurai has quit [Remote host closed the connection]
<zenspider>
obviously the `ruby -e` adventures are not going well
<epitron>
concrete is solid.. but you can't build it on a swamp
<epitron>
gotta drain the swamp first
<ellisTAA>
when i make an array: topics = [fart, dog, json] json becomes colored like its a special word, how do i avoid this?
<zenspider>
epitron: we're not building a fucking skyscraper. we're talking about learning skills. quit beating your shitty metaphor to death
tonyhb has joined #ruby
znst has joined #ruby
tier has quit [Remote host closed the connection]
<epitron>
lol
<epitron>
good luck then
<zenspider>
test first worked just fine for rails bridge when I taught it. it'll work fine for someone in here
* epitron
hands ellisTAA over to zenspider
<sevenseacat>
json is a special word
<zenspider>
ellisTAA: um. what are those things in the array?
<ellisTAA>
i’m going to write a test
* sevenseacat
gets popcorn
<centrx>
they're words duh
ltd has quit [Ping timeout: 265 seconds]
<epitron>
sevenseacat: hahaha
<ellisTAA>
haha
<zenspider>
strings? variables?
jottr has joined #ruby
slyv has quit [Remote host closed the connection]
<sevenseacat>
i want to remember this time when i'm watching the world's greatest ruby programmer
baweaver has quit [Remote host closed the connection]
kt2 has quit [Client Quit]
<epitron>
i'm learning a lot about teaching ^_^
pu22l3r_ has joined #ruby
pu22l3r has quit [Ping timeout: 256 seconds]
<zenspider>
because you were doing such a fine job
<sevenseacat>
i'm fine at teaching frameworks, not languages
slyv has joined #ruby
* Nilium
is learning a lot about vim.
<Nilium>
I'm fine with teaching languages to people who don't have prior expectations from other programming languages.
Inv1s1ble has joined #ruby
<zenspider>
Nilium: yeah. it's much worse when they have expectations of how it should work
jerematic has joined #ruby
<zenspider>
my cold fusion students were the worst at that.
kaiza has joined #ruby
<Inv1s1ble>
I have a class called Environment with a bunch of self function so I can call them using Environment::some_function() (like static methods in other languages)
<centrx>
class methods
<sevenseacat>
is why i get frustrated when people try to learn ruby+rails at the same time... im like wat no thats not even close to correct ruby syntax
<Inv1s1ble>
but I can't seem to do that with properties like so: def self.ssh_key_file=(value)
<Inv1s1ble>
yes, class methods :)
ta has quit [Ping timeout: 276 seconds]
<epitron>
sevenseacat: omg, rails is such a brainfuck for a noob
jerematic has quit [Remote host closed the connection]
<centrx>
code!
<Inv1s1ble>
Environment::ssh_key_file = a_string_with_a_path gives me an error
<epitron>
too many syntaxes at once
<sevenseacat>
though i did ruby+rails at the same time so pot, kettle, black, etc.
<Inv1s1ble>
can you have class properties?
znst has quit [Ping timeout: 252 seconds]
troubadour has quit [Quit: troubadour]
<centrx>
Inv1s1ble, Did you define this method self.ssh_key_file=
<zenspider>
Inv1s1ble: sure you can. exactly as you did above
<epitron>
knowing ruby well helps a lot with rails
<nii236|irssi>
sevenseacat: I tried but have since reverted to learning Ruby first then Rails
Xoro has joined #ruby
<sevenseacat>
nii236|irssi: smart move
<ellisTAA>
epitron: i haven’t tried learning rails yet, but why is it a brainfuck for noobs?
Xoro has quit [Max SendQ exceeded]
<zenspider>
argh. need more protein
<epitron>
ellisTAA: well, rails, being a "full stack" framework, requires you to learn a lot of different web components at once
<epitron>
and minilanguages
baweaver has joined #ruby
<Inv1s1ble>
centrx, yep. It looks like "def self.ssh_key_file=(value)"
Nameo0 has quit [Read error: No route to host]
<Nilium>
When I took an intro linguistics course, it became really clear how easy it was for me because I wasn't actually all that familiar with the usual pedantic sort of English grammar learned in schools.
<ellisTAA>
ah i see
wallerdev has joined #ruby
ramfjord has quit [Ping timeout: 245 seconds]
Nameo0_ has joined #ruby
timanema has quit [Ping timeout: 245 seconds]
Xoro has joined #ruby
nobitanobi has joined #ruby
<Inv1s1ble>
centrx, but I get "env.rb:41:in `ssh_key_file=': undefined method `[]=' for nil:NilClass (NoMethodError)"
<epitron>
ellisTAA: it helps a lot if you understand the difference between ruby and rails
<Nilium>
So I had the benefit of having no expectations of what a lot of stuff was.
<Inv1s1ble>
(sorry, should have paste bined)
arup_r has joined #ruby
jottr has quit [Ping timeout: 255 seconds]
<sevenseacat>
'i want to learn rails' ok well now you need to learn ruby, rails, sql, html, css....
<epitron>
i wonder how hard it would be to make a bot that recognizes questions and automatically responds with those 3 things
jonr22 has joined #ruby
<pontiki>
just have it check for a ?
<sevenseacat>
though i try not to spam helpa here
<Rylee>
pontiki: "that's the wrong way to use inject" -- I lol'd
_djbkd has joined #ruby
ninjazach has joined #ruby
ninjazach is now known as Guest6396
<pontiki>
my work here is done
<pontiki>
now it is time for dancing
<zenspider>
and yet, soo true
<sevenseacat>
:dancer:
x77686d has joined #ruby
dc has quit [Remote host closed the connection]
<pontiki>
zenspider: which, the inject comment?
<zenspider>
aye
<zenspider>
and a-d... but mostly e resonates for me
jonr22 has quit [Ping timeout: 245 seconds]
Neomex has quit [Ping timeout: 252 seconds]
<weaksauce>
how do people abuse inject?
<jefus>
that's a "loaded" question.
arup_r has quit [Quit: Leaving.]
<zenspider>
watch the guilty parties run... :P
zachrab has joined #ruby
<weaksauce>
ha
ltd has joined #ruby
<jefus>
sorry, don't know but am curious to the answer :)
<zenspider>
technical answer or basic answer?
<epitron>
inject can be used to do everything! :D
<weaksauce>
either is fine with me
<epitron>
it's the universal enumerator!
<zenspider>
and here I thought each was. :P
* epitron
implements quicksort with inject
* epitron
implements each with inject
<zenspider>
do quicksort... I'd like to see that
<epitron>
:)
<epitron>
it would have to be a recursive inject
krz has quit [Ping timeout: 264 seconds]
<zenspider>
wordy version: they use it for something that is not functionally reductive.
nobitanobi has quit [Remote host closed the connection]
<zenspider>
simple version: they use it when they're too lazy to set a variable above it
oo_ has quit [Remote host closed the connection]
tonyhb has quit [Quit: peace]
dc has joined #ruby
tyfighter has joined #ruby
ltd has quit [Ping timeout: 246 seconds]
karmatr0n has quit []
braincra- has quit [Quit: bye bye]
mary5030 has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
josephndenton has quit [Ping timeout: 252 seconds]
ltd has joined #ruby
kenneth has joined #ruby
nicolastarzia has joined #ruby
Musashi007 has quit [Quit: Musashi007]
jamesaxl has quit [Remote host closed the connection]
hfor has quit [Ping timeout: 250 seconds]
metadave has joined #ruby
ghr has joined #ruby
braincrash has joined #ruby
albert_ has quit [Remote host closed the connection]
hfor has joined #ruby
nicolastarzia has quit [Ping timeout: 276 seconds]
pu22l3r_ has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 240 seconds]
chrishough has joined #ruby
oo_ has joined #ruby
hamakn has quit [Remote host closed the connection]
Aova has quit [Read error: Connection reset by peer]
ghr has quit [Ping timeout: 244 seconds]
<weaksauce>
zenspider I thought the canonical example for inject was something like this: >> (1..10).inject(0) { |x,y| x + y }
n008f4g_ has quit [Ping timeout: 272 seconds]
Sgeo has joined #ruby
michael_mbp has quit [Excess Flood]
<pontiki>
that's functionally reductive
<weaksauce>
> they use it when they're too lazy to set a variable above it
<zenspider>
addition is definitely reductive
<weaksauce>
I am trying to figure out an example for that then
mary5030 has quit [Remote host closed the connection]
<pontiki>
the non-reductive use is when you pass the object back into the loop at the end
<pontiki>
you're building up something instead of reducing it
michael_mbp has joined #ruby
<zenspider>
some bullshit like: strings.inject([]) { |ss, s| ss << s; ss }
astrobun_ has quit [Remote host closed the connection]
<zenspider>
when it should just be a map (or nothing in that stupid case)
<pontiki>
one form i seem to see a *lot* is building a hash
<zenspider>
pretend there was a method call on s
<zenspider>
pontiki: yeah. that to
<zenspider>
too
<zenspider>
fuck
metadave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Aova has joined #ruby
<weaksauce>
yeah I get what you are saying that there is a difference in a functionally reductive and not but I am reading the docs on inject and it doesn't really specify much about that.
nobitanobi has joined #ruby
<weaksauce>
all of the examples are reductive in nature though
<zenspider>
the hash one kills me because you keep explicitly returning the hash and then re-assigning it back to the memo
<zenspider>
weaksauce: because they want you to use it correctly?
<weaksauce>
zenspider sure. what I am saying is that it doesn't tell you anything about best practices at all
<zenspider>
actually that longest example is pretty stupid.
Eiam_ has joined #ruby
<zenspider>
words.max_by(&:size)
Channel6 has joined #ruby
timanema has joined #ruby
jottr has joined #ruby
<pontiki>
what example?
ta has joined #ruby
greenbagels has quit [Quit: Leaving]
<zenspider>
pontiki: ri inject
<pontiki>
oh, in the docs, right
<weaksauce>
the longest word example
<zenspider>
:P
frem has quit [Quit: Connection closed for inactivity]
<zenspider>
it's hot tub night. I'm out
nobitanobi has quit [Remote host closed the connection]
<pontiki>
then there's each_with_object
slyv has quit [Quit: My Computer has gone to sleep. ZZZzzz…]
jottr has quit [Ping timeout: 245 seconds]
maximski has joined #ruby
diegoviola has quit [Quit: WeeChat 1.1]
timanema has quit [Ping timeout: 265 seconds]
ltd has quit [Ping timeout: 265 seconds]
nobitanobi has joined #ruby
ta has quit [Ping timeout: 276 seconds]
ponga has joined #ruby
kyb3r_ has joined #ruby
ltd has joined #ruby
nobitanobi has quit [Remote host closed the connection]
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tyfighter has quit [Quit: tyfighter]
fryguy9 has joined #ruby
Guest17986 has quit [Changing host]
Guest17986 has joined #ruby
Guest17986 is now known as blindsight
bklane has joined #ruby
julian-delphiki has quit [Ping timeout: 276 seconds]
pu22l3r has joined #ruby
Jetchisel has quit [Ping timeout: 246 seconds]
michael_mbp has quit [Excess Flood]
<jhass>
what about %w[a b c d e].inject(a_hash) {|hash, key| hash[key] }
<ellisTAA>
can i put an if else statement in a while statement?
<jhass>
still classifies as reductive?
<jhass>
ellisTAA: sure
<jhass>
in the condition I'd extract it to a method though
jpstokes has quit []
michael_mbp has joined #ruby
<ellisTAA>
what do u mean extract it to a method?
jonmorehouse has quit [Ping timeout: 244 seconds]
<jhass>
def should_loop_run_but_a_better_name?; ...; end; while should_loop_run_but_a_better_name?; ...; end;
<centrx>
fancy word for "take it out of the while loop and put it somewhere else"
Lingo_ has joined #ruby
troubadour has joined #ruby
maximski has quit []
pdoherty has quit [Remote host closed the connection]
<bricker>
giggity
dseitz has joined #ruby
bklane has quit []
klmlfl has quit [Remote host closed the connection]
<ellisTAA>
hey. i wrote some code, but i dont know how to test the method to see if it works. can anyone help me out? i was thinking about writing a test but i’m not quite sure how to do that
<weaksauce>
you don't need tests for now. learn the super basics first
<sevenseacat>
lol at not being complete, it isnt even started
<ellisTAA>
and what do u mean by that
backhoe__ has joined #ruby
<ellisTAA>
cat, it is
psy_ has joined #ruby
<sevenseacat>
thats like saying i started writing a program, and i wrote class HelloWorld; end, can you help me finish it
krz has joined #ruby
<ellisTAA>
there’s one method! not a hundred
Lingo_ has quit [Quit: (null)]
<weaksauce>
ellisTAA have you run check_for_duplicates ever?
<ellisTAA>
no, i dont know how to do that. if its a long process a topic to google would be helpful
<weaksauce>
ellisTAA the questions I asked above are literally the steps to run it
<weaksauce>
you require something, instantiate something, run something
ponga has quit [Remote host closed the connection]
<ellisTAA>
i see
<weaksauce>
can you try to do that?
<weaksauce>
from irb
<ellisTAA>
yeah im doing it now
<ellisTAA>
form irb?
ponga has joined #ruby
Wolland has joined #ruby
<weaksauce>
how are you running your ruby code?
krz has quit [Ping timeout: 245 seconds]
longfeet has quit [Read error: Connection reset by peer]
odigity has quit [Remote host closed the connection]
<weaksauce>
ellisTAA please, go to codeacademy.com and go through the ruby tutorials. even if you think they are too basic for you, they will get harder. you will learn a lot there and it will give you all the hints you need
<weaksauce>
codeacademy is free and pretty well done
ponga has quit [Ping timeout: 255 seconds]
pu22l3r has quit [Read error: No route to host]
<nii236|irssi>
Or koans
<nii236|irssi>
I'm doing the koans and they're great
pu22l3r has joined #ruby
<weaksauce>
nii236|irssi I think ellisTAA is much more suited to a step by step approach like code academy
<weaksauce>
the koans would be a good thing to do afterward
<sevenseacat>
i didnt like the ruby koans
<nii236|irssi>
weaksauce: Under what criteria? Maybe I should be doing codecademy
<nii236|irssi>
but it was so much more boring
<weaksauce>
well koans are good for people that know more and want to know the nuances of the objects in detail
bricker has quit [Ping timeout: 240 seconds]
<weaksauce>
codeacademy provides more of a guided approach with lots of explanations
<nii236|irssi>
Hm ok
<weaksauce>
and hints.
<weaksauce>
nii236|irssi the first few sections on ruby are going to be boring if you know anything about programming already
<nii236|irssi>
All I know is that codecademy was boring as hell, Koans have kept my engaged for much longer
<nii236|irssi>
weaksauce: Yeah exactly
<nii236|irssi>
I'm guessing it gets a lot better later?
<weaksauce>
sure. I did a little bit of the blocks and procs section and it was done well.
<nii236|irssi>
Alright
znst has joined #ruby
<weaksauce>
that's a tricky thing to explain... probably like c is to pointers, ruby is to creating blocks.
<nii236|irssi>
ew pointers
<nii236|irssi>
seg fault traumatic memories
<sevenseacat>
pointers can die in a fire
<sevenseacat>
srsly
<sevenseacat>
pointers and manual memory management
<nii236|irssi>
Eh Rubymonk is prety decent from what I hear
pu22l3r has quit [Remote host closed the connection]
<mozzarella>
trust me bruh
tmk1108 has joined #ruby
hamakn has quit [Ping timeout: 244 seconds]
ta has joined #ruby
workmad3 has joined #ruby
<ellisTAA>
how do i use my check_for_duplicates method on my topics array?
nobitanobi has quit [Remote host closed the connection]
<ellisTAA>
i put the code in irb
<centrx>
ellisTAA, The idea is Inspect has a bunch of utility functions for inspecting?
mary5030 has quit [Ping timeout: 245 seconds]
<centrx>
ellisTAA, You can either pass an array to the method, or you can define the method on Array, or you can define the method on another class that you make topics be instead of Array (that might inherit from Array)
<ellisTAA>
alright ill try passing an array to the method
<ellisTAA>
thanks for that
nobitanobi has joined #ruby
astrobun_ has joined #ruby
<sevenseacat>
i think i can predict the next error
<sevenseacat>
wrong number of arguments, 1 for 0
<ellisTAA>
lol
codeFiend has quit [Quit: codeFiend]
<centrx>
sevenseacat needs its litter box cleaned
<sevenseacat>
ouch
workmad3 has quit [Ping timeout: 246 seconds]
<sevenseacat>
wasnt saying to be a bitch, is just what error ellisTAA will see next
<centrx>
I know, it's a prophecy
drkush has quit [Remote host closed the connection]
<centrx>
Double double toil and trouble
<Nilium>
Not really seeing anything wrong with anything she said.
nobitanobi has quit [Remote host closed the connection]
<centrx>
tough crowd
<ellisTAA>
lol
<Nilium>
I have had like 10 hours of sleep in the last 96 hours
CpuID has quit [Ping timeout: 265 seconds]
<Nilium>
Shit is not only going over my head, it reached escape velocity and I didn't even notice
jonr22 has joined #ruby
<sevenseacat>
lol
mikepack has quit []
ta has quit [Ping timeout: 255 seconds]
nii236|i1ssi has joined #ruby
jonmorehouse has joined #ruby
<weaksauce>
Nilium what stack allocation code?
<ellisTAA>
nope error was undefined local variable or method `topics' for main:Objec
nobitanobi has joined #ruby
<Nilium>
Code to allocate memory on the stack the the scope of a block
<sevenseacat>
aww
* sevenseacat
shakes crystal ball
<Nilium>
*for the scope
<ellisTAA>
nilium: benadryl
fryguy9 has quit [Quit: Leaving.]
mikepack has joined #ruby
<gr33n7007h>
ellisTAA, make topic an instance variable in initialize
<weaksauce>
ah, cool. how was contributing to ruby-core?
<Nilium>
I don't contribute to core.
<Nilium>
It's part of a gem I built to handle describing memory using C struct/union-like behavior and such with correct alignments, and it included the ability to allocate memory on the stack in addition to the heap.
<sevenseacat>
curse you capybara, i cant pass a Capybara::Element to `fill_in`
hamakn has joined #ruby
jonr22 has quit [Ping timeout: 256 seconds]
hamakn has quit [Remote host closed the connection]
<Wolland>
ellisTAA: you should probably add attr_accessor for :duplicates as well
hamakn has joined #ruby
<ellisTAA>
wolland: ty
<Wolland>
np
chrishough has joined #ruby
* sevenseacat
bends capybara to my will
Jetchisel has joined #ruby
ellisTAA has quit [Quit: ellisTAA]
sent1nel has quit [Remote host closed the connection]
<Nilium>
What
<Nilium>
No
<Nilium>
Capys are free creatures
<sevenseacat>
not this one
ramfjord has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby
bronson has quit [Remote host closed the connection]
<arup_r>
Not able to understand how to use universal_newline: option with IO::open.. Doco is telling it supports all String#encoding option.. But how it didn't say there.. https://gist.github.com/anonymous/33d028c108081e9c19f4 Any idea how to do so?
Aova has quit [Read error: Connection reset by peer]
lolmaus has joined #ruby
hamakn_ has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
nobitanobi has quit [Remote host closed the connection]
astrobun_ has quit [Remote host closed the connection]
vozcelik has quit [Read error: Connection reset by peer]
hamakn has quit [Ping timeout: 245 seconds]
scientist1642 has joined #ruby
Aova has joined #ruby
x77686d has quit [Quit: x77686d]
tier has joined #ruby
bluOxigen has joined #ruby
lolmaus has quit [Quit: Konversation terminated!]
nobitanobi has joined #ruby
Codemule42 has joined #ruby
yfeldblum has quit [Ping timeout: 245 seconds]
lolmaus has joined #ruby
yfeldblum has joined #ruby
MrSparkle has quit [Ping timeout: 245 seconds]
tier has quit [Ping timeout: 264 seconds]
bronson has joined #ruby
ptrrr has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
mikepack has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
hirzu has joined #ruby
astrobun_ has joined #ruby
tagrudev has joined #ruby
jonmorehouse has quit [Ping timeout: 276 seconds]
Channel6 has quit [Quit: Leaving]
whatasunnyday has quit [Quit: Leaving]
blueOxigen has joined #ruby
Deele has joined #ruby
hamakn_ has quit [Remote host closed the connection]
thatslifeson has joined #ruby
hamakn has joined #ruby
bluOxigen has quit [Ping timeout: 264 seconds]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hmsimha has joined #ruby
claptor has quit [Ping timeout: 256 seconds]
claptor has joined #ruby
apeiros_ has quit [Read error: Connection reset by peer]
hvxgr has quit [Ping timeout: 252 seconds]
hirzu_ has joined #ruby
apeiros_ has joined #ruby
jaygen_ has quit [Ping timeout: 255 seconds]
MrSparkle has joined #ruby
agrinb_ has quit [Remote host closed the connection]
<jhass>
the later, I'd go for a hash with array values
Wolland has quit []
<splud>
I want to iterate over this, to get the paths (say , to pull repos), while at other times I want to get a specific hash and operate on the path.
<mikecmpbll>
it's definitely not an array.
<mikecmpbll>
lol :)
<avril14th>
splud: what's wrong with drivers.each ?
jonmorehouse has quit [Ping timeout: 272 seconds]
<jhass>
"a specific hash" == "a single key"?
<jhass>
/ "a sinlge value"?
havenwood has quit [Remote host closed the connection]
sent1nel has joined #ruby
<jhass>
but yeah, for the former just .each do |id, (path, repo)|
<splud>
ah, parens for the array contents. That was what I was going to lead up to here.
<splud>
that’s the syntax I was fumbling over.
<jhass>
it's called "array decomposition"
FooMunki has joined #ruby
<splud>
brain decomposition at 02:30, and I’ve been at work outside of a lunch break and a 2 hour supper break since 10:00 yesterday
<mikecmpbll>
it's a nice trick, not essentional though, you can do that stuff in the block.
mikepack has joined #ruby
<splud>
I didn’t want to have to perform a separate iteration., but was not getting what I wanted with drivers.each do | path, repo |
sent1nel has quit [Ping timeout: 245 seconds]
marr has joined #ruby
<mikecmpbll>
you wouldn't have to have a seperate iteration
<mikecmpbll>
drivers.each { |i| id = i[0]; path = i[1][0]; repo = i[1][1] } is the same
posixpascal has quit [Ping timeout: 252 seconds]
Takle has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
mikepack has quit [Ping timeout: 244 seconds]
<splud>
Truth be told, I’m using the hashes to get away from hardcoded index references :)
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
SixiS has joined #ruby
oo_ has quit [Remote host closed the connection]
last_staff has quit [Read error: Connection reset by peer]
znst has joined #ruby
ldnunes has joined #ruby
sandelius has joined #ruby
oo_ has joined #ruby
sprihodko has joined #ruby
posixpascal has joined #ruby
ta_ has joined #ruby
rdark has joined #ruby
znst has quit [Ping timeout: 264 seconds]
withnale_ has joined #ruby
Morkel has quit [Quit: Morkel]
Takle has joined #ruby
arup_r_ has joined #ruby
shime_ has quit [Read error: Connection reset by peer]
shime has joined #ruby
tvw has joined #ruby
arup_r has quit [Ping timeout: 240 seconds]
wpp has quit [Read error: Connection reset by peer]
vikram_ has joined #ruby
backhoe__ has quit [Ping timeout: 245 seconds]
agrinb has joined #ruby
backhoe__ has joined #ruby
troulouliou_dev has joined #ruby
Pharaoh2 has quit [Ping timeout: 265 seconds]
timonv has quit [Ping timeout: 245 seconds]
Pupeno has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 276 seconds]
agrinb has quit [Ping timeout: 245 seconds]
nerium has joined #ruby
plashchynski has joined #ruby
nerium has quit [Client Quit]
scientist1642 has joined #ruby
leafybasil has joined #ruby
wald0 has joined #ruby
jonr22 has joined #ruby
sprihodko has quit [Quit: (null)]
bricker has joined #ruby
shime has quit [Ping timeout: 272 seconds]
timonv has joined #ruby
astrobun_ has quit [Remote host closed the connection]
jonr22 has quit [Ping timeout: 244 seconds]
ta_ has joined #ruby
bricker has quit [Ping timeout: 255 seconds]
<zenspider>
splud: doesn't that just substitute hash keys for array index numbers?
blackmesa has joined #ruby
drawingthesun has joined #ruby
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
Aova has quit [Read error: Connection reset by peer]
ta_ has quit [Ping timeout: 276 seconds]
drawingthesun has quit [Read error: Connection reset by peer]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zachrab has quit [Ping timeout: 265 seconds]
<mwlang>
ak: I’d say the bundle gem was removed recently. “gem install bundle” would be my next step.
<ak>
:)
livathinos has quit [Ping timeout: 276 seconds]
Pupeno_ has quit [Client Quit]
troubadour has quit [Ping timeout: 255 seconds]
Pupeno__ has quit [Ping timeout: 276 seconds]
<ak>
done and still getting similar errors mwlang
<mwlang>
restarted apache?
CustosL1men has quit [Ping timeout: 264 seconds]
<mikecmpbll>
what's the bundle gem? :p
rdark has quit [Ping timeout: 264 seconds]
<ak>
yes restarted apache
patric100e99 has joined #ruby
<workmad3>
ak: hmm... that passenger dump was useful...
<mwlang>
mikecmpbll: meh…I need more coffee.
<mikecmpbll>
:D
arup_r_ has quit []
<workmad3>
ak: your deploy user's gem path isn't in the load path for passenger
chthon has quit [Ping timeout: 265 seconds]
arup_r has joined #ruby
bricker has joined #ruby
jonmorehouse has joined #ruby
genkist_ has joined #ruby
<workmad3>
ak: I suspect that's the source of your problems (as I'm guessing bundler is installed into /home/deploy/.gem/ruby/gems, not /usr/share/httpd/.gem/ruby/gems ;) )
bronson has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
krz has quit [Ping timeout: 245 seconds]
sent1nel has joined #ruby
anarang has quit [Ping timeout: 255 seconds]
nfk has joined #ruby
plashchynski has joined #ruby
<ak>
that would explain a lot :)
bricker has quit [Ping timeout: 252 seconds]
jonmorehouse has quit [Ping timeout: 276 seconds]
patric100e99 has quit [Ping timeout: 256 seconds]
<ak>
so should I be doing things as root? or would that push things to /root/.gem ?
The_Phoenix has quit [Read error: Connection reset by peer]
Aova has quit [Read error: Connection reset by peer]
sent1nel has quit [Ping timeout: 245 seconds]
Klumben has joined #ruby
<mikecmpbll>
ak: what's the "installed at" path for bundler when you type gem list bundler -d ?
claptor has quit [Quit: this channel is bakas]
tokik has joined #ruby
sigurding has joined #ruby
CustosL1men has joined #ruby
tonyhb has joined #ruby
<ak>
mikecmpbll: /home/deploy/.gem/ruby :)
Aova has joined #ruby
chthon has joined #ruby
jimms has joined #ruby
AlexRussia has quit [Ping timeout: 264 seconds]
<mikecmpbll>
ak: and gem paths from `gem environment` ?
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mikecmpbll>
ah, looks like passenger is using a different rubygems version
znst has joined #ruby
<mikecmpbll>
maybe, i dunno..
posixpascal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rebcabin has joined #ruby
postmodern has quit [Quit: Leaving]
Xeago has quit [Remote host closed the connection]
<mikecmpbll>
you probably have a gem binary in /usr/local/sbin, /usr/local/bin, /usr/sbin or /usr/bin
<workmad3>
passenger has picked up GEM_HOME for the httpd user that apache is running as
<workmad3>
hence /usr/share/httpd/.gem/ruby being there
<ak>
yep, /usr/bin/gem
Mia has quit [Read error: Connection reset by peer]
<mikecmpbll>
`/usr/bin/gem environment` ?
<workmad3>
ak: is that the gem you used to install bundler though?
<workmad3>
*gem binary
<mikecmpbll>
that's the only rubygems binary in passengers PATH
jgt3 has quit [Ping timeout: 256 seconds]
<mikecmpbll>
but not the one he's installed bundler on
znst has quit [Ping timeout: 264 seconds]
<workmad3>
mikecmpbll: GEM_HOME and GEM_PATH aren't dependent on the gem binary
<workmad3>
they'll be inferred from the user in a lot of circumstances
<mikecmpbll>
i see
troulouliou_dev has quit [Remote host closed the connection]
<ak>
so this is a result of doing gem install as a user rather than sudo gem install?
<workmad3>
ak: chances are you'd have the issue anyway
jgt3 has joined #ruby
wookiehangover has quit [Ping timeout: 245 seconds]
<workmad3>
ak: passenger normally switches to the 'owner' of the app before starting up ruby though... which should have sorted out the gem paths inference issue
<workmad3>
ak: for some reason, it hasn't...
<workmad3>
ak: or did you change the owner of the app to httpd?
<ak>
I ran cp -rp app /var/www/html and then chown -R apache /var/www/html
MasterPiece has joined #ruby
<workmad3>
ak: ah... so yes
Takle has joined #ruby
<workmad3>
ak: that'll be the source of your issues... passenger thinks that the app is owned by your apache user, so is using the apache home directory as the base for GEM_HOME
<ak>
why didn't I work that out, seems kinda obvious?
<workmad3>
ak: additionally, you don't need (or even particularly want) to copy apps being run by passenger into /var/www...
thiagovsk has joined #ruby
<ak>
even the public folder?
<workmad3>
yup
<ak>
so remove those files and restart apache?
<workmad3>
passenger changes its spawned process to be owned by the owner of the directory
<ak>
that is very useful to know
<workmad3>
and yeah, remove the copy from /var/www/html, change your DocumentRoot to point to /home/deploy/app/public
lukeholder has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<workmad3>
and restart apache... see if that works out
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
wookiehangover has joined #ruby
<ak>
hmmmm apache test page now
<workmad3>
ak: you *may* need to change the public folder with 'chmod -R a+r public'
<workmad3>
ak: where is your DocumentRoot pointing?
The_Phoenix has joined #ruby
<workmad3>
ak: and did you remove the default site from /etc/apache2/sites-enabled ?
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby
Timgauthier has joined #ruby
<ak>
got a virtualhost file so changed that and httpd.conf to /home/deploy/CASinoApp/public
Timgauthier is now known as timgauthier_away
timgauthier_away is now known as Timgauthier
The_Phoenix has quit [Max SendQ exceeded]
<ak>
centos so just /etc/httpd/conf/httpd.conf rather than sites-enabled
<workmad3>
ah, shame
<workmad3>
I have a tendancy to set up sites-enabled no matter what the OS... much easier to script deployments and setup if you just need to drop a file in place rather than figure out the contents on a large file :)
plashchynski has quit [Quit: plashchynski]
<ak>
that's logical :)
agrinb has joined #ruby
<workmad3>
ak: anything in the apache logs indicating a passenger error?
plashchynski has joined #ruby
<ak>
I've set the doc root to /home/deploy/CASinoApp and I got a 403 error when going to http://ip/public
Kn|t3_ has quit [Quit: Kn|t3_]
lukeholder has joined #ruby
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
lukeholder has quit [Max SendQ exceeded]
djbkd has joined #ruby
agrinb has quit [Ping timeout: 245 seconds]
The_Phoenix has joined #ruby
lukeholder has joined #ruby
<workmad3>
ak: ok, so you should be setting the doc root to /home/deploy/CASinoApp/public
The_Phoenix has quit [Max SendQ exceeded]
The_Phoenix has joined #ruby
<workmad3>
ak: and passenger will figure out from there that it's a rack or rails app, configure itself to handle the virtual host and behave properly
The_Phoenix has quit [Max SendQ exceeded]
fgo has joined #ruby
The_Phoenix has joined #ruby
lukeholder has quit [Max SendQ exceeded]
<livcd>
Hello. What is rack-ruby can anyone point me to the right direction ?
workmad3 is now known as wm3|away
<ak>
workmad3 it is, I'm still seeing 403 errors
lukeholder has joined #ruby
troubadour has joined #ruby
Xeago has joined #ruby
<ak>
heading out for 30 mins ish
ak is now known as ak_afk
jonr22 has joined #ruby
djbkd has quit [Ping timeout: 265 seconds]
lukeholder has quit [Max SendQ exceeded]
siso has quit [Quit: siso]
lukeholder has joined #ruby
fgo has quit [Ping timeout: 276 seconds]
Timgauthier has quit [Read error: Connection reset by peer]
DaniG2k has joined #ruby
CustosL1men has quit [Ping timeout: 264 seconds]
fgo has joined #ruby
rdark has quit [Ping timeout: 245 seconds]
lukeholder has quit [Max SendQ exceeded]
Timgauthier has joined #ruby
dangerousdave has joined #ruby
jonr22 has quit [Ping timeout: 265 seconds]
lukeholder has joined #ruby
rdark has joined #ruby
Xeago_ has joined #ruby
hamakn has joined #ruby
rdark has quit [Client Quit]
rdark has joined #ruby
dangerousdave has quit [Client Quit]
n008f4g_ has joined #ruby
lukeholder has quit [Max SendQ exceeded]
ta_ has joined #ruby
thatslifeson has quit [Ping timeout: 264 seconds]
tkuchiki has joined #ruby
Xeago has quit [Ping timeout: 245 seconds]
lukeholder has joined #ruby
dblessing has joined #ruby
Pharaoh2 has joined #ruby
antgel has quit [Ping timeout: 264 seconds]
sandelius has quit [Read error: Connection reset by peer]
lukeholder has quit [Max SendQ exceeded]
aclearman037 has joined #ruby
posixpascal has joined #ruby
lukeholder has joined #ruby
ixti has quit [Quit: WeeChat 1.0.1]
Xeago_ has quit [Remote host closed the connection]
dangerousdave has joined #ruby
jherbst has joined #ruby
ta_ has quit [Ping timeout: 276 seconds]
quazimodo has quit [Ping timeout: 245 seconds]
pika_pika has joined #ruby
lukeholder has quit [Max SendQ exceeded]
jherbst has quit [Read error: Connection reset by peer]
ixti has joined #ruby
lukeholder has joined #ruby
ta_ has joined #ruby
spyderman4g63 has joined #ruby
leonshalimov has joined #ruby
bricker has joined #ruby
bronson has joined #ruby
lukeholder has quit [Max SendQ exceeded]
nicolastarzia has joined #ruby
gfawcettpq has quit [Quit: Leaving.]
sent1nel has joined #ruby
lukeholder has joined #ruby
gfawcettpq1 has joined #ruby
Darryl___ has quit [Quit: Connection closed for inactivity]
lukeholder has quit [Max SendQ exceeded]
anarang has quit [Ping timeout: 255 seconds]
Harlin has quit [Quit: Leaving]
lukeholder has joined #ruby
ta_ has quit [Ping timeout: 246 seconds]
Xeago has joined #ruby
fgo has quit [Ping timeout: 245 seconds]
Aova has quit [Read error: Connection reset by peer]
kp666 has joined #ruby
bronson has quit [Ping timeout: 245 seconds]
bricker has quit [Ping timeout: 264 seconds]
nicolastarzia has quit [Ping timeout: 240 seconds]
sent1nel has quit [Ping timeout: 245 seconds]
lukeholder has quit [Max SendQ exceeded]
chinmay_dd has joined #ruby
atomical has joined #ruby
kl__ has quit [Ping timeout: 246 seconds]
lukeholder has joined #ruby
CustosL1men has joined #ruby
jonr22 has joined #ruby
Xeago_ has joined #ruby
metadave has joined #ruby
Aova has joined #ruby
HelloThere has joined #ruby
<HelloThere>
Hello
<HelloThere>
I keep seeing this code in methods: block.arity < 1 ? something.instance_eval(&block) : block.call(something) if block_given?
lukeholder has quit [Max SendQ exceeded]
<arup_r>
HelloThere: There? ;)
<HelloThere>
Can someone help me understand what it does?
<HelloThere>
arup_r: :)
<arup_r>
How you can think about such funny names... Man! lol
lukeholder has joined #ruby
mostlybadfly has joined #ruby
leonshalimov has quit [Ping timeout: 245 seconds]
Xeago has quit [Ping timeout: 245 seconds]
jonr22 has quit [Ping timeout: 244 seconds]
dimaursu16 has quit [Ping timeout: 265 seconds]
<fcanela>
as far as I know, it checks the block arity to see if it's lesser than one
znst has joined #ruby
<fcanela>
if it's, executes something.instance_eval. if it's not, it checks if a block have been given and if it's the case, does block.call
hamakn has quit [Remote host closed the connection]
Takle has quit [Remote host closed the connection]
genkist- has quit [Remote host closed the connection]
<HelloThere>
fcanela: I gathered that much, I am more curious about the choice between instance_eval and block.call
lukeholder has quit [Max SendQ exceeded]
bal has quit [Ping timeout: 265 seconds]
<fcanela>
oh, sorry, I though the question was more basic
jherbst has joined #ruby
lukeholder has joined #ruby
ta_ has quit [Ping timeout: 276 seconds]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bal has joined #ruby
brb3 has joined #ruby
amystephen has joined #ruby
bal1 has joined #ruby
sagittarian|2 has joined #ruby
HelloThere has quit [Quit: Page closed]
bal has quit [Ping timeout: 245 seconds]
silkfox has joined #ruby
ta_ has joined #ruby
scottyob has quit [Ping timeout: 264 seconds]
silkfox has quit [Client Quit]
dimaursu16 has joined #ruby
Takle has joined #ruby
jerematic has joined #ruby
scottyob has joined #ruby
wjimenez5271 has joined #ruby
fgo has joined #ruby
agrinb has joined #ruby
dangerousdave has joined #ruby
ak_afk is now known as ak
livathin_ has quit [Remote host closed the connection]
nateberkopec has joined #ruby
Jackneill has quit [Ping timeout: 240 seconds]
jokke has quit [Ping timeout: 265 seconds]
jerius has joined #ruby
dangerousdave has quit [Client Quit]
craigp has joined #ruby
paulfm has joined #ruby
agrinb has quit [Ping timeout: 245 seconds]
bal1 has quit [Ping timeout: 245 seconds]
zachrab has joined #ruby
bal has joined #ruby
last_staff has joined #ruby
triple_b has joined #ruby
dangerousdave has joined #ruby
jerius has quit []
AlexRussia has joined #ruby
Sirupsen has joined #ruby
kp666 has quit [Quit: Leaving]
dimaursu16 has quit [Ping timeout: 245 seconds]
bal1 has joined #ruby
danjordan has joined #ruby
Sirupsen has quit [Client Quit]
dangerousdave has quit [Client Quit]
dimaursu16 has joined #ruby
leonshalimov has joined #ruby
thsig has joined #ruby
avril14th has quit [Remote host closed the connection]
bal has quit [Ping timeout: 245 seconds]
zachrab has quit [Ping timeout: 245 seconds]
last_staff has quit [Client Quit]
tier has joined #ruby
jokke has joined #ruby
sevenseacat has joined #ruby
DaniG2k has quit [Ping timeout: 245 seconds]
jimms has quit [Remote host closed the connection]
kamilc__ has quit [Ping timeout: 272 seconds]
scripore has joined #ruby
Dude007 has quit [Read error: Connection reset by peer]
sambao21 has joined #ruby
Dude007 has joined #ruby
Morkel has quit [Quit: Morkel]
quazimodo has joined #ruby
maximski has quit []
tier has quit [Read error: Connection reset by peer]
timanema has joined #ruby
tier has joined #ruby
Xeago_ has quit [Remote host closed the connection]
bal has joined #ruby
bal2 has joined #ruby
tier has quit [Read error: Connection reset by peer]
leonshalimov has quit [Ping timeout: 240 seconds]
tier has joined #ruby
fenak has joined #ruby
dimaursu16 has quit [Ping timeout: 245 seconds]
ebbflowgo has joined #ruby
sankaber has joined #ruby
bal1 has quit [Ping timeout: 245 seconds]
EvanFreeman has joined #ruby
bal has quit [Ping timeout: 244 seconds]
silkfox has joined #ruby
kl has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
gccostabr has quit [Quit: ZZZzzz…]
Guest1719 is now known as marahin
marahin has quit [Changing host]
marahin has joined #ruby
noop has quit [Remote host closed the connection]
tier has quit [Read error: Connection reset by peer]
sambao21 has joined #ruby
JDiPierro has joined #ruby
tier has joined #ruby
leonshalimov has joined #ruby
aclearma_ has joined #ruby
dimaursu16 has joined #ruby
arup_r has quit []
livathinos has joined #ruby
marr has quit [Ping timeout: 264 seconds]
Timgauthier is now known as timgauthier_away
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Xeago has joined #ruby
m8 has joined #ruby
m8 has quit [Changing host]
m8 has joined #ruby
blackoperat has joined #ruby
beef-wellington has joined #ruby
aclearman037 has quit [Ping timeout: 264 seconds]
quimrstorres has quit [Remote host closed the connection]
juanpablo_ has joined #ruby
Jackneill has joined #ruby
leonshalimov has quit [Ping timeout: 256 seconds]
silkfox has quit [Ping timeout: 252 seconds]
longfeet has joined #ruby
bricker has joined #ruby
longfeet has quit [Read error: Connection reset by peer]
CamonZ has joined #ruby
Aova has quit [Read error: Connection reset by peer]
it0a has joined #ruby
ebbflowgo has quit [Quit: Page closed]
leonshalimov has joined #ruby
bricker has quit [Ping timeout: 264 seconds]
Megtastique has joined #ruby
cpt_yossarian has quit [Ping timeout: 252 seconds]
msgodf has quit [Remote host closed the connection]
Aova has joined #ruby
elimS has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
elimS has quit [Client Quit]
beef-wellington has quit [Ping timeout: 245 seconds]
craigp has quit [Remote host closed the connection]
lolmaus has quit [Quit: Konversation terminated!]
wookiehangover has quit [Ping timeout: 245 seconds]
craigp has joined #ruby
ellisTAA has joined #ruby
ponga has quit [Quit: Leaving...]
beef-wellington has joined #ruby
fmcgeough has joined #ruby
dumdedum has quit [Quit: foo]
noop has joined #ruby
fgo has quit [Ping timeout: 245 seconds]
banister has joined #ruby
Takle has quit [Remote host closed the connection]
nobitanobi has joined #ruby
wookiehangover has joined #ruby
Takle has joined #ruby
tagrudev has quit [Remote host closed the connection]
sent1nel has joined #ruby
josephndenton has joined #ruby
jottr has quit [Ping timeout: 256 seconds]
snakebridge has joined #ruby
kamilc__ has joined #ruby
banister has quit [Client Quit]
anarang has joined #ruby
mrmargolis has joined #ruby
zenith_ has joined #ruby
Takle has quit [Ping timeout: 255 seconds]
freerobby has joined #ruby
phoo1234567 has joined #ruby
sent1nel has quit [Ping timeout: 256 seconds]
cpt_yossarian has joined #ruby
_ixti_ has joined #ruby
pdoherty has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
phoo1234567 has quit [Max SendQ exceeded]
hamakn has joined #ruby
phoo1234567 has joined #ruby
ixti has quit [Ping timeout: 272 seconds]
kl has quit [Ping timeout: 264 seconds]
sambao21 has joined #ruby
scientist1642 has left #ruby [#ruby]
JDiPierro has quit [Remote host closed the connection]
kl has joined #ruby
ARCADIVS has quit [Read error: Connection reset by peer]
fryguy9 has joined #ruby
athan has quit [Ping timeout: 264 seconds]
wpp has joined #ruby
hamakn has quit [Ping timeout: 265 seconds]
timonv has quit [Ping timeout: 245 seconds]
hirzu has quit [Ping timeout: 264 seconds]
hs366 has joined #ruby
DaniG2k has joined #ruby
dumdedum has joined #ruby
L8 has joined #ruby
troulouliou_dev has joined #ruby
hiyosi has joined #ruby
roshanavand has quit [Remote host closed the connection]
jmcharnes has joined #ruby
Takle has joined #ruby
gccostabr has joined #ruby
atomical has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
klmlfl has joined #ruby
snakebridge has quit [Quit: ruby]
gccostabr has quit [Ping timeout: 245 seconds]
roshanavand has joined #ruby
nobitanobi has quit [Remote host closed the connection]
avril14th has joined #ruby
whoisjake has joined #ruby
nobitanobi has joined #ruby
blackoperat has quit [Ping timeout: 272 seconds]
rebcabin has quit [Quit: Leaving.]
thatslifeson has joined #ruby
tonyhb has joined #ruby
cpt_yossarian has quit [Ping timeout: 272 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
ursooperduper has joined #ruby
<vikram_>
Hi all, I've been working on a gem to help Ruby beginners drill concepts. Right now, it supports finding values in simple/complex data structures (hashes, arrays and arrays of hashes). I wanted to see if anyone had any feedback on it or wanted to help out: https://github.com/vikram7/rubies
fgo has joined #ruby
noop has quit [Ping timeout: 244 seconds]
<DaniG2k>
vikram_: cool, I'll try it out later :)
quimrstorres has joined #ruby
Ankhers has joined #ruby
timonv has joined #ruby
az7ar_away has quit [Ping timeout: 256 seconds]
OrbitalKitten has joined #ruby
werelivinginthef has joined #ruby
blackmesa has quit [Ping timeout: 255 seconds]
<avril14th>
vikram_: it looks great :)
jottr has joined #ruby
fgo has quit [Ping timeout: 255 seconds]
enebo has joined #ruby
hgl has quit [Ping timeout: 264 seconds]
bronson has joined #ruby
Morkel has joined #ruby
symbol has joined #ruby
JDiPierro has joined #ruby
thsig has quit [Remote host closed the connection]
oo_ has joined #ruby
blackoperat has joined #ruby
bthesorceror has joined #ruby
banister has joined #ruby
sambao21 has joined #ruby
banister has quit [Max SendQ exceeded]
agrinb has joined #ruby
klmlfl has quit [Remote host closed the connection]
mitchellhenke has joined #ruby
iamninja has quit [Quit: ZZZzzz…]
gccostabr has joined #ruby
<wm3|away>
vikram_: nice starting point... it would probably be more interesting and useful if you added in drills for things like 'you have an array in the variable current_users. Write some code that will pull out all users that are over 18. Each user is a hash, and has an :age key'
bthesorceror has quit [Client Quit]
thsig has joined #ruby
Squarepy has joined #ruby
<wm3|away>
vikram_: to get people to start using things like select, find, etc. rather than looking at a printout and hard-coding some keys & indices :)
sevenseacat has quit [Remote host closed the connection]
oo_ has quit [Ping timeout: 245 seconds]
bronson has quit [Ping timeout: 245 seconds]
Redsadic has joined #ruby
jobewan has joined #ruby
<Redsadic>
hi all
sambao21 has quit [Client Quit]
<Redsadic>
as many times, when playing with pack and unpack I feel like a dumb
<Redsadic>
for example
jimms has joined #ruby
<Redsadic>
"4".unpack('C')
<Redsadic>
gives me [52]
jonr22 has joined #ruby
<Redsadic>
that it's the decimal representation of the "4"
<Redsadic>
but if I put "4".unpack('H')
<Redsadic>
it gives me ["3"]
<Redsadic>
that it's only half of the representation of "4" as a hex string
<Redsadic>
to achieve full representation I need to put H2
pdoherty has quit [Remote host closed the connection]
kiddo__ has joined #ruby
<wm3|away>
Redsadic: ideally, you'd do .unpack('H*') I guess
wm3|away is now known as workmad3
livingstn has joined #ruby
ferr has joined #ruby
<Redsadic>
yeah workmad3, this works for most cases I need
<Redsadic>
but I was trying to understand whats happening behind the scene
cajone has quit [Remote host closed the connection]
bronson has joined #ruby
jonr22 has quit [Ping timeout: 265 seconds]
leonshalimov has quit [Ping timeout: 245 seconds]
<workmad3>
Redsadic: the pattern for H points out that it gets the high nibble first... a nibble being 4 bits
<workmad3>
Redsadic: so I'd presume that what's happening is that 'H' is pulling off 4 bits, converting that to a hex string and then, because that's the entire pattern, stopping
<Redsadic>
workmad3: yeah, this makes sense
<Redsadic>
then H is returning nibbles
<workmad3>
Redsadic: whereas C is for an 8bit unsigned character
<workmad3>
well, each hex digit can represent 4 bits
<workmad3>
so each hex digit is a nibble
az7ar_away has joined #ruby
x77686d has joined #ruby
<Redsadic>
workmad3: ooooo, that' it
<Redsadic>
thank you workmad3 :)
<workmad3>
np :)
<Redsadic>
it was getting me mad
nobitanobi has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 244 seconds]
<workmad3>
if it's any help, whenever anyone uses pack or unpack, I need to figure things out from the docs... I find it a bit unintuitive still myself :)
craigp has quit [Remote host closed the connection]
cajone has joined #ruby
Aova has quit [Read error: Connection reset by peer]
max96at|off is now known as max96at
bricker has joined #ruby
Kricir has joined #ruby
sambao21 has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
<Redsadic>
agree
tobago has quit [Remote host closed the connection]
krz has joined #ruby
<Redsadic>
I normally use same operations but when something different is needed
<Redsadic>
I realize that I don't understand well how it's really working
druznek has quit [Quit: Leaving]
bal2 has quit [Quit: bal2]
anarang_ has joined #ruby
livathinos has quit [Remote host closed the connection]
livathinos has joined #ruby
fcanela has quit [Ping timeout: 256 seconds]
bal has joined #ruby
msgodf has joined #ruby
noop has quit [Ping timeout: 245 seconds]
Aova has joined #ruby
anarang has quit [Ping timeout: 245 seconds]
<workmad3>
Redsadic: heh :) I've only just realised that pack and unpack contain base64 encoding... I've always done 'require "base64"; Base64.encode64(str); Base64.decode64(str)'
<Xnfu>
:p
<Redsadic>
workmad3: hahaha, me too!
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Xnfu>
Make us the three stooges then
apeter has joined #ruby
bricker has quit [Ping timeout: 256 seconds]
gheegh has joined #ruby
<apeter>
Hello guys, need some direction with puma on windows ...
<workmad3>
Redsadic: hmm... that said, it seems a bit more awkward using pack and unpack for that
jimms has quit [Remote host closed the connection]
livathin_ has joined #ruby
msgodf has quit [Ping timeout: 264 seconds]
symbol has quit [Quit: WeeChat 1.1]
ta_ has quit [Ping timeout: 276 seconds]
kobain has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
gccostabr has quit [Quit: ZZZzzz…]
kobain has quit [Max SendQ exceeded]
ta_ has joined #ruby
sent1nel has joined #ruby
xcesariox has joined #ruby
livathinos has quit [Ping timeout: 264 seconds]
<ddv>
apeter: don't even bother with Windows
livathin_ has quit [Ping timeout: 256 seconds]
claw_ has joined #ruby
claw has quit [Ping timeout: 252 seconds]
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby
havenwood has joined #ruby
zachrab has joined #ruby
kobain has joined #ruby
kobain has quit [Changing host]
kobain has joined #ruby
sent1nel has quit [Ping timeout: 245 seconds]
kobain has quit [Max SendQ exceeded]
fgo has joined #ruby
n008f4g_ has quit [Ping timeout: 256 seconds]
ta_ has quit [Ping timeout: 245 seconds]
klmlfl has joined #ruby
pdoherty has joined #ruby
kobain has joined #ruby
kobain has quit [Max SendQ exceeded]
mloveless has joined #ruby
pu22l3r has joined #ruby
oleo has joined #ruby
cpt_yossarian has joined #ruby
<apeter>
ddv: i need to run RoR on windows, but i am desperate as everything seems broken somehow, i've asked for a *nix server but Window 2008 is all i've got ....
OrbitalKitten has joined #ruby
<ddv>
apeter: I wouldn't say it's impossible, it's very possible but you are asking for problems in the future
quazimodo has quit [Ping timeout: 244 seconds]
<ddv>
apeter: What errors are you getting?
zachrab has quit [Ping timeout: 256 seconds]
<apeter>
puma worked pretty good, or at least it looked like it worked ... but i don't know how should i setup a service or something more seriour that leaving a console hangin with it
<apeter>
it's actually working ...
hgl has quit [Ping timeout: 246 seconds]
fgo has quit [Ping timeout: 264 seconds]
<apeter>
but i don't know how to setup a decent environment, i can't leave a cmd instance with it ...
hanmac1 has quit [Quit: Leaving.]
<apeter>
btw daemon monde don't work XD
<apeter>
mode
<ddv>
apeter: You ask again for a Linux server
<ddv>
apeter: :-)
cephalostrum has quit [Ping timeout: 245 seconds]
hgl has joined #ruby
aganov has quit [Quit: Leaving]
<apeter>
:) i know, allready did three time :(
<apeter>
well thanks anyway :)
Kn|t3_ has joined #ruby
spider-mario has joined #ruby
rbrs has quit [Remote host closed the connection]
msgodf has joined #ruby
jimms has joined #ruby
pu22l3r has quit [Ping timeout: 246 seconds]
cephalostrum has joined #ruby
patric100e99 has joined #ruby
athan has joined #ruby
hmsimha has joined #ruby
metadave_ has joined #ruby
jerius has joined #ruby
shime has quit [Ping timeout: 264 seconds]
marr has joined #ruby
Channel6 has joined #ruby
sivam has joined #ruby
metadave has quit [Ping timeout: 245 seconds]
patric100e99 has quit [Ping timeout: 264 seconds]
fryguy9 has quit [Quit: Leaving.]
klmlfl has quit [Remote host closed the connection]
DrShoggoth has joined #ruby
quazimodo has joined #ruby
cpt_yossarian has quit [Ping timeout: 276 seconds]
nfk has quit [Quit: yawn]
Parker0 has joined #ruby
asmodlol has joined #ruby
antgel has joined #ruby
kapil__ has quit [Quit: Connection closed for inactivity]
klmlfl has quit [Remote host closed the connection]
<coco___>
this will correctly search to the given offset
CustosL1men has quit [Ping timeout: 246 seconds]
JDiPierr_ has quit [Remote host closed the connection]
VBlizzard has joined #ruby
<coco___>
however it appears seek can only use offsets that are valid long ints but not unsigned long ints
Wolfram74 has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
tonyhb has quit [Quit: peace]
<coco___>
or: IO#seek only works for offsets upto 2**63
axilla_ is now known as axilla
centrx has joined #ruby
blizzy has quit [Disconnected by services]
VBlizzard is now known as blizzy
<avril14th>
coco___: that's really a problem? :)
<coco___>
yes
<coco___>
it is :P
<coco___>
not for most people but for me it is
nicolastarzia has quit [Ping timeout: 244 seconds]
scripore has joined #ruby
<coco___>
I'm building a debugger, and for that I need to dump the memory
Kn|t3_ has joined #ruby
<avril14th>
maybe divide the seek into smaller seeks?
<avril14th>
(hack)
<coco___>
yeah
<coco___>
I couldprobably seek two times
nanoyak has joined #ruby
<avril14th>
how do the guys writing other ruby debugger do?
uptownhr has joined #ruby
<coco___>
not a ruby debugger
JDiPierro has joined #ruby
<coco___>
a binary debugger
<avril14th>
ah
jonr22 has joined #ruby
<avril14th>
right, where was I
<workmad3>
coco___: hmm... in the manpage for 'seek' on OSX, it says that offset can be negative
CamonZ has quit [Remote host closed the connection]
<workmad3>
coco___: so it would make a certain amount of sense for it to be a signed long, not an unsigned long
<coco___>
hmm
patric100e99 has joined #ruby
<coco___>
I guess the ruby implementation should properly handle bignums though
<workmad3>
yeah... but the problem seems to happen when the internals try to cast the bignum into a long for passing to the OS-level seek (going by the error you gave)
<coco___>
linux user here
<coco___>
but yeah
<workmad3>
there's no problem creating a bignum of that size ;)
fantazo has quit [Read error: Connection timed out]
<coco___>
sure
<workmad3>
OS-level... not OSX-level ;)
jimms has quit [Remote host closed the connection]
multi_io_ has joined #ruby
CamonZ has joined #ruby
roshanavand has quit [Remote host closed the connection]
fantazo has joined #ruby
roshanavand has joined #ruby
<coco___>
so the ruby wrapper for the syscall should do something like while(addr> MAX_INT){seek(MAX_INT,:CUR); addr -= MAX_INT } seek(addr; :CUR);
jonr22 has quit [Ping timeout: 252 seconds]
Beoran_ has quit [Remote host closed the connection]
paulfm has quit [Remote host closed the connection]
sent1nel has quit [Remote host closed the connection]
multi_io has quit [Ping timeout: 264 seconds]
happyface has joined #ruby
deol has joined #ruby
<coco___>
I just implemented the while(addr > 2**63-1) ... stuff
codeFiend has joined #ruby
<coco___>
works just fine
Parker0 has quit [Ping timeout: 245 seconds]
wookiehangover has quit [Ping timeout: 245 seconds]
wallerdev has joined #ruby
<avril14th>
:)
weems|mac has joined #ruby
<coco___>
might be worth a bug report though (not sure about that, never submitted a ruby bug report before)
fgo has joined #ruby
banister has joined #ruby
kenneth has joined #ruby
<avril14th>
looks like the right thing to do to me.
defrang has quit [Quit: defrang]
Kn|t3_ has quit [Quit: Kn|t3_]
jottr has joined #ruby
<coco___>
meh
<avril14th>
then you can wait for a BigNum number of seconds for it to get gixed :)
<workmad3>
avril14th: give it a gigasec or 2, eh? :)
<coco___>
:P
m8 has quit [Quit: Sto andando via]
wookiehangover has joined #ruby
<workmad3>
or do you think this is more of a megasec bug?
<avril14th>
...and for all the rest, there's MonkeyPatch (c)
<coco___>
pretty sure that 2**63 seconds is more a gigasec than a megasec bug :P
<coco___>
avril14th: don't even need to monkey patch
MasterPiece has quit [Quit: Leaving]
Nameo0 has joined #ruby
shime has quit [Ping timeout: 264 seconds]
fgo has quit [Ping timeout: 246 seconds]
patric100e99 has quit [Ping timeout: 265 seconds]
<coco___>
guess I'm to lazy to create an acocunt at the bugtracker etc etc
GaryOak_ has joined #ruby
rubytor_ has joined #ruby
rubytor has quit [Read error: Connection reset by peer]
<avril14th>
I wonder what happens when one does (1..2**63).each
* avril14th
looks at eval-in_
Lexun has joined #ruby
<workmad3>
coco___: yeah... 2**63 would be about 9 orders of magnitude bigger than a gigasec :)
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<coco___>
:P
<workmad3>
ok... you're right... closer to 10
Hijiri has quit [Quit: WeeChat 1.0.1]
<workmad3>
avril14th: you'll be waiting a long, long time...
timanema has quit [Ping timeout: 255 seconds]
<avril14th>
if I dup some stuffs in the loop, I'll wait less though :)
rossina has joined #ruby
rossina has left #ruby [#ruby]
<workmad3>
avril14th: well, if you had a machine capable of processing the loop body 1 billion times a second, how long do you reckon you'd wait for that loop to finish? :)
lmickh has quit [Remote host closed the connection]
<avril14th>
with a dup and no garbage collection, about a few minutes
<Wolfram74>
and it looks like insertions have a pretty consistent time cost until the arrays get more than 10k long
<Wolfram74>
at which point they just fucking dive
Squarepy has quit [Quit: Leaving]
<jhass>
Wolfram74: that's just because the allocations are reduced
EvanFreeman has joined #ruby
thumpba has joined #ruby
<jhass>
each time the capacity is reached, twice as much space is allocated
zachrab has quit [Remote host closed the connection]
<Wolfram74>
I concede that you used words, please elaborate
<Wolfram74>
ah
<jhass>
or actually not twice as much, there's a more sophisticated formula
<jhass>
but you get the idea
EvanFreeman has quit [Remote host closed the connection]
<Wolfram74>
so the 100k array has a larger space to look around in, while the 1mil array has substantially more memory to investigate and rearrange than the 10k array
<jhass>
no
<jhass>
array implementations usually allocated a fixed buffer
<jhass>
because allocating on each insert is too much overhead
<jhass>
allocating is about the most expensive operation a CPU can make
<jhass>
so you want to reduce those
athan has quit [Ping timeout: 252 seconds]
dfinninger has quit [Remote host closed the connection]
<jhass>
so you have a capacity
<jhass>
that's bigger than the arrays actual length
jherbst has joined #ruby
<Wolfram74>
so what exactly's happening when I shunt a number into array?
dfinninger has joined #ruby
<jhass>
when the length == capacity, a new, bigger, buffer needs to be allocated
<jhass>
and the heuristic is that a much larger, relative to the current capacity, than the current one is allocated
FooMunki has quit [Quit: FooMunki]
<jhass>
because if you just inserted a ton of stuff, it's likely that you'll continue doing so
<jhass>
so that minimizes allocations
Hobogrammer has quit [Ping timeout: 264 seconds]
<jhass>
which is why it gets faster as the array gets bigger
<jhass>
the capacity increases and fewer reallocations need to be made
<jhass>
does that make any sense?
<Wolfram74>
absolutely none at all, because larger arrays were super fucking slow for insertions
metadave_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zachrab has joined #ruby
davout has joined #ruby
klmlfl has joined #ruby
klmlfl has quit [Remote host closed the connection]
n008f4g_ has joined #ruby
dfinninger has quit [Ping timeout: 245 seconds]
nanoyak has joined #ruby
klmlfl has joined #ruby
jgt3 has quit [Ping timeout: 265 seconds]
<jhass>
oh, right, mmh
defrang has joined #ruby
<jhass>
I guess you managed to hit the capacity borders quite well
<jhass>
when expanding capacity, the old buffer has to be copied into the new one of course
crack has joined #ruby
klmlfl has quit [Remote host closed the connection]
<jhass>
so with increasing size the reallocations itself get slower
nanoyak has quit [Read error: Connection reset by peer]
<workmad3>
jhass: any idea if ruby arrays are guaranteed to be contiguous in memory?
<jhass>
I guess you just managed to hit the capacity in any case
<eam>
are ruby arrays actually arrays?
nanoyak has joined #ruby
<jhass>
workmad3: I don't know, but I'd guess
troubadour has quit [Quit: troubadour]
metadave has joined #ruby
withnale_ has quit [Ping timeout: 256 seconds]
klmlfl has joined #ruby
beef-wellington has joined #ruby
<Wolfram74>
it would be weird that base 10 powers would be right on the borders for the arrays, since I imagine those borders would be related to powers of 2
crocket has left #ruby ["Leaving"]
FooMunki_ has joined #ruby
AlSquire has joined #ruby
ptrrr has joined #ruby
Wolfram74 has quit [Remote host closed the connection]
<dstarh>
A coworker and I were discussing loops and counters today and we thought a while_with_index would be nice to have. this is my naive attempt https://gist.github.com/dstarh/2da1a324dad8149ab201 which isn't working
cazrin has joined #ruby
hamakn has joined #ruby
Kilo`byte has joined #ruby
Snowstormer is now known as cats
merqlove has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
ta_ has quit [Ping timeout: 276 seconds]
Takle has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
ferr has joined #ruby
fryguy9 has quit [Quit: Leaving.]
nanoyak has joined #ruby
<dstarh>
doh, if to unless and it's working
hamakn has quit [Remote host closed the connection]
fcanela has joined #ruby
Megtastique has joined #ruby
ghr has quit [Ping timeout: 255 seconds]
werelivinginthef has quit [Remote host closed the connection]
`ph8 is now known as ph8
ddd has joined #ruby
crazysim has joined #ruby
<apeiros_>
dstarh: why loop do? why not while?
<dstarh>
no specifc reason
djbkd has quit [Remote host closed the connection]
<apeiros_>
also I'd probably yield the index to the condition proc (and call the variable "condition" and not "proc")
tcrypt has joined #ruby
<apeiros_>
name stuff after what it represents, not after its class.
<apeiros_>
you don't have a class Person with the attributes string, string, string and string.
paulfm has quit [Read error: Connection reset by peer]
paulfm has joined #ruby
ramfjord has joined #ruby
borel has quit [Read error: Connection reset by peer]
<atmosx>
hello
bronson has joined #ruby
<apeiros_>
hi atmosx, you youngster ;-p
<splud>
apeiros: You do if you’re Jepetto
<atmosx>
apeiros_: hehehe :-P
<apeiros_>
splud: jepetto?
<atmosx>
apeiros_: I'm think I'm older than you
claymore has joined #ruby
<apeiros_>
atmosx: only physically!!!!!1!111!1!!!!1!
Gonzih has joined #ruby
<splud>
Pinnochhio = Person.new()
<apeiros_>
splud: oh, Gepetto
<splud>
Gestapho, whattever his name was.
<atmosx>
apeiros_: well, agreed :-P
<splud>
You’d think I’d have a better grip on it - my great grandmother was the voice of the Blue Fairy...
<atmosx>
wasn't he swallowed by whale or something?
tier has quit [Read error: Connection reset by peer]
<atmosx>
I never liked Pinocchio as a child. It was too depressing.
<apeiros_>
so we've got a descendant of a fairy in our channel ^^
<atmosx>
splud: I'm on wikipedia
<atmosx>
splud: yes, tell us a story. Better be a good one.
<atmosx>
a fairy tale or something
quimrstorres has joined #ruby
<splud>
Uhm, she taught Latin at UCLA?
jenrzzz has joined #ruby
<atmosx>
She resumed her studies at UCLA and became a faculty member there, teaching ancient Greek and Latin and organizing the production of Greek plays within the Classics department <-- I like her.
Megtastique has quit []
Rollabunna has joined #ruby
<atmosx>
She seems to like my ancestors!
<atmosx>
well both of them
nanoyak_ has joined #ruby
<splud>
anyway, not ruby related, just a seguay from person and strings, and pinnocchio...
nanoyak has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
jaygen has quit [Ping timeout: 244 seconds]
Gonzih has quit [Quit: leaving]
<splud>
But as they say, if the best thing about you is buried in the ground, you’re not much different than a potato.
Megtastique has joined #ruby
fatAiel has joined #ruby
<apeiros_>
I am much different from a potato! I don't produce sugars when frozen :-(
rdark has quit [Quit: leaving]
roshanavand has joined #ruby
jonr22 has quit [Ping timeout: 246 seconds]
<atmosx>
splud: Hm, I've always find fascinating the fact that when I read Platoo or Aristotle or Dostoyevski, I'm basically reading the thoughts of a dead-man. He is dead but it's like if his spirit is discussing with me.
ellisTAA has joined #ruby
<atmosx>
Solanum amylum, Tuberosum!
mkaesz has joined #ruby
<splud>
Aristotles Nichomachean Ethics is a good read.
<splud>
I totally get the “utility friend”.
<atmosx>
splud: haha
wpp has joined #ruby
towski_ has joined #ruby
dfinninger has joined #ruby
hamakn has joined #ruby
<splud>
Got my darned kernel automation build sorted out. Long night of git and ruby…
_honning_ has joined #ruby
wpp has quit [Max SendQ exceeded]
iamninja has joined #ruby
Gonzih has joined #ruby
<atmosx>
splud: you a kernel dev?
fatAiel has left #ruby [#ruby]
<splud>
not kernel.org, but been heads down in the kernel for a bit. Embedded ARM.
hamakn has quit [Remote host closed the connection]
adriancb has joined #ruby
nanoyak_ has quit [Read error: Connection reset by peer]
Takle has quit [Remote host closed the connection]
nanoyak has joined #ruby
Pharaoh2 has quit [Ping timeout: 265 seconds]
<splud>
And while I’m on a public forum, let me say, just for the record, that I absolutely DESPISE the way which Texas Instruments maintains separate kernel, driver, and many tool repos, not getting their crap merged into public repos.
<dstarh>
apeiros_ thats for the suggestions
dfinninger has quit [Ping timeout: 244 seconds]
leonshalimov has quit [Ping timeout: 252 seconds]
dfinning_ has joined #ruby
jaygen_ has quit []
zB0hs has joined #ruby
reset has joined #ruby
EvanFreeman has joined #ruby
wldcordeiro has joined #ruby
Pharaoh2 has joined #ruby
Guest14906 has joined #ruby
ki0 has joined #ruby
Pharaoh2 has quit [Max SendQ exceeded]
Guest14906 has left #ruby [#ruby]
avelldiroll has quit [Quit: WeeChat 0.3.8]
Pharaoh2 has joined #ruby
brian_ has joined #ruby
<brian_>
so have you tried npm?
plashchynski has quit [Quit: plashchynski]
<brian_>
gem (bundler) is much much faster than npm
Pharaoh2 has quit [Max SendQ exceeded]
<shevy>
atmos I don't get to code much at all lately :( in the next 3 days I have a full course from 09:00 to 18:00 each
Pharaoh2 has joined #ruby
B1n4r10 has joined #ruby
timanema has joined #ruby
deric_skibotn has quit [Ping timeout: 255 seconds]
<splud>
Heh, I’ve been at work for 10 hours already today, and it’s only 11 am.
MissionCritical has quit [Ping timeout: 240 seconds]
<splud>
Doesn’t count the 11 hours I was here yesterday.
<centrx>
Living on UTC?
<mwlang>
splud: I guess a server crashed that you had to rescue?
fgo has joined #ruby
<splud>
Living on caffeine
reinaldob has quit []
plashchynski has joined #ruby
fenak has quit [Remote host closed the connection]
avelldiroll has joined #ruby
ramfjord has quit [Ping timeout: 276 seconds]
deric_skibotn has joined #ruby
mferrier has joined #ruby
timanema has quit [Ping timeout: 255 seconds]
Morkel has joined #ruby
tomaw has quit [Quit: Quitting]
Lexun has quit [Remote host closed the connection]
shazaum has joined #ruby
Megtastique has quit []
posixpascal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fgo has quit [Ping timeout: 245 seconds]
Mia has quit [Read error: Connection reset by peer]
JDiPierro has joined #ruby
commmmodo has joined #ruby
Macaveli has joined #ruby
TrOuBLeStArTeR has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
leonshalimov has joined #ruby
athan has joined #ruby
mkaesz has quit [Quit: Leaving...]
cphrmky has joined #ruby
reinaldob has joined #ruby
<ellisTAA>
can someone tell me why i’m getting the error message: class or module required?
<ellisTAA>
can anyone help me out with the tests i’m failing: https://gist.github.com/ellisTAA/0a8c4da823b3851e7685 it looks like @formatted_entry isn’t getting edited by my add method … is that because i didn’t set it?
baweaver has joined #ruby
siso has quit [Client Quit]
Aova has joined #ruby
net_mask has quit [Ping timeout: 276 seconds]
<havenwood>
atmosx: RVM actually supports chruby and several of the competition self-deprecated in favor of chruby. Check it out if you get in the mood for a new switcher.
jottr has joined #ruby
dstarh has quit [Read error: Connection reset by peer]
<havenwood>
You can use it to switch to package manager Rubies or Rubies in arbitrary locations, etc.
Squarepy has joined #ruby
Squarepy has joined #ruby
Squarepy has quit [Changing host]
garethrees has joined #ruby
oleo has quit [Ping timeout: 245 seconds]
pdoherty has quit [Remote host closed the connection]
fandi has quit [Ping timeout: 246 seconds]
ghr has quit [Ping timeout: 244 seconds]
Macaveli has quit [Ping timeout: 252 seconds]
whoisjake has quit []
martin_work has quit [Quit: martin_work]
<splud>
Ruby Q time.
wald0 has quit [Quit: Lost terminal]
blackmesa has quit [Ping timeout: 264 seconds]
jottr has quit [Ping timeout: 255 seconds]
nisstyre has joined #ruby
nisstyre has quit [Changing host]
ta_ has joined #ruby
<atmosx>
havenwood: interesting, I'll check it out
<splud>
Have several versions of the ‘git’ gem installed. Turns out, some older code doesn’t like a change in a newer release of the gem, but I have several versions installed
pdoherty has joined #ruby
TrOuBLeStArTeR has quit [Quit: Going offline, see ya! (www.adiirc.com)]
bakis has quit [Ping timeout: 246 seconds]
oleo has joined #ruby
<splud>
what’s the stock ruby symtax to require ‘x’ or newer, and ‘x; or older
reinaldob has quit [Remote host closed the connection]
fandi has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
oleo has quit [Read error: Connection reset by peer]
<apeiros_>
splud: require does not have a concept of old/new
dspangenberg has joined #ruby
stunder_mcw has joined #ruby
<splud>
I was seeing some ‘gem’ function.
baroquebobcat has joined #ruby
<splud>
googling on that is less than helpful though.
<apeiros_>
yes, with `gem` you can specify a gem version which should be activated on require
<apeiros_>
use ri, or if you want a browser, ruby-doc.org or rdoc.info
chrishou_ has joined #ruby
<havenwood>
splud: Bundler is a very common way to handle gem dependencies: http://bundler.io/
<ellisTAA>
i have an instance variable called @formatted_entry, i want to edit that from inside an instance method using @formatted_entry.merge(default_entry) but when i return @formatted_entry it returns it unedited. any ideas on why? @default_entry = {new_entry => nil}
<ellisTAA>
ignore everything after “?”
<apeiros_>
ellisTAA: merge does not modify the receiver
<apeiros_>
merge! does
<ellisTAA>
oh!!! god thank you!!
ta_ has quit [Ping timeout: 276 seconds]
einarj has joined #ruby
lodgenbd has quit [Quit: Leaving]
djbkd has quit [Remote host closed the connection]
<splud>
must go read someone’s resume…
Macaveli has joined #ruby
codeFiend has joined #ruby
oleo has joined #ruby
agrinb has quit [Read error: Connection reset by peer]
The_Phoenix1 has joined #ruby
kirun has joined #ruby
agrinb has joined #ruby
rbrs has quit [Quit: rbrs]
The_Phoenix has quit [Ping timeout: 264 seconds]
werelivinginthef has joined #ruby
einarj has quit [Ping timeout: 264 seconds]
athan has quit [Ping timeout: 252 seconds]
djbkd has joined #ruby
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dnewkerk has joined #ruby
lolmaus has joined #ruby
Azure has quit [Ping timeout: 252 seconds]
jenrzzz has quit [Ping timeout: 244 seconds]
Lexun has joined #ruby
tomaw has joined #ruby
giuseppesolinas_ has quit [Quit: This computer has gone to sleep]
Macaveli has quit [Ping timeout: 264 seconds]
YamakasY has quit [Excess Flood]
Megtastique has joined #ruby
JDiPierro has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
skj3gg has joined #ruby
deepy has joined #ruby
Azure has joined #ruby
bthesorceror has joined #ruby
YamakasY has joined #ruby
cpt_yossarian has quit [Read error: Connection reset by peer]
tomaw- has joined #ruby
jgt3 has quit [Quit: WeeChat 1.0.1]
thsig has quit [Remote host closed the connection]
dfinning_ has quit [Remote host closed the connection]
Lexun has quit [Remote host closed the connection]
dfinninger has joined #ruby
tomaw has quit [Ping timeout: 619 seconds]
tomaw- is now known as tomaw
nanoyak has quit [Ping timeout: 240 seconds]
kamilc__ has joined #ruby
tris has quit [Quit: Leaving]
Takle has joined #ruby
aclearman037 has joined #ruby
cpt_yossarian has joined #ruby
zwer_h has joined #ruby
kt2 has quit [Ping timeout: 246 seconds]
Megtastique has quit []
rodfersou has quit [Quit: leaving]
zwer has quit [Ping timeout: 250 seconds]
rdark has joined #ruby
kt2 has joined #ruby
tris has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hyperdrive has quit [Changing host]
hyperdrive has joined #ruby
hyperdrive is now known as hdrv
maletor has joined #ruby
codeFiend has quit [Quit: codeFiend]
baweaver has joined #ruby
hamakn has joined #ruby
fgo has joined #ruby
bakis has joined #ruby
Lexun has joined #ruby
jenrzzz has joined #ruby
johnkary has joined #ruby
j416 has quit [Quit: o/]
gr33n7007h has quit [Remote host closed the connection]
kt2 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
postmodern has joined #ruby
hamakn has quit [Ping timeout: 246 seconds]
j416 has joined #ruby
Lexun has quit [Remote host closed the connection]
fgo has quit [Ping timeout: 265 seconds]
wallerdev has quit [Quit: wallerdev]
cpt_yossarian has quit [Read error: Connection reset by peer]
cpt_yossarian has joined #ruby
The_Phoenix1 has quit [Quit: Leaving.]
Megtastique has joined #ruby
giuseppesolinas has joined #ruby
naftilos76 has quit [Remote host closed the connection]
fryguy9 has joined #ruby
jmdade has joined #ruby
mbeasley has quit [Quit: WeeChat 0.4.2]
ldnunes has quit [Quit: Leaving]
gr33n7007h has joined #ruby
defrang has quit [Read error: Connection reset by peer]
Dude007 has quit [Remote host closed the connection]
enebo has quit [Quit: enebo]
defrang has joined #ruby
Aova has quit [Read error: Connection reset by peer]
doritostains has quit [Quit: WeeChat 1.0.1]
Ankhers has quit [Remote host closed the connection]
codeFiend has joined #ruby
antgel has quit [Ping timeout: 272 seconds]
ta_ has joined #ruby
mbeasley has joined #ruby
Ankhers has joined #ruby
Lexun has joined #ruby
Aova has joined #ruby
_whitelogger__ has joined #ruby
ndrst_ has joined #ruby
shelling___ has joined #ruby
nik_-_ has joined #ruby
Heero_ has joined #ruby
pmarreck_ has joined #ruby
artmann_ has joined #ruby
kalleth_ has joined #ruby
ELLIOTTCABLE_ has joined #ruby
testcore has quit [Quit: BitchX: not a flotation device]
jimeh_ has joined #ruby
d10n-work has joined #ruby
ta_ has quit [Ping timeout: 276 seconds]
baweaver has quit [Remote host closed the connection]
greenbagels has joined #ruby
tvw has quit []
borkdude_ has joined #ruby
plashchynski has quit [Quit: plashchynski]
terrellt_ has joined #ruby
comma8|BNC has joined #ruby
denym_G has joined #ruby
etdev_ has joined #ruby
fantazo has quit [Quit: Verlassend]
Seich_ has joined #ruby
none has joined #ruby
timmow has joined #ruby
none is now known as Guest51795
tylersmi- has joined #ruby
trollface has joined #ruby
JBreit has joined #ruby
SegFaultAX_ has joined #ruby
dotix has joined #ruby
dotix has joined #ruby
mferrier has quit [Read error: No route to host]
rockdon_ has joined #ruby
blackjid has joined #ruby
tyfighter has quit [Quit: tyfighter]
reinaldob has joined #ruby
j416 has quit [Ping timeout: 245 seconds]
mjmac_ has joined #ruby
ellisTAA has quit [Quit: ellisTAA]
gr33n7007h has quit [Ping timeout: 265 seconds]
plashchynski has joined #ruby
pengin has joined #ruby
lab has joined #ruby
lab is now known as Sakens
Deele has quit [*.net *.split]
max96at has quit [*.net *.split]
timmow_ has quit [*.net *.split]
tylersmith has quit [*.net *.split]
etdev has quit [*.net *.split]
Shidash has quit [*.net *.split]
mattjbarlow has quit [*.net *.split]
ndrst has quit [*.net *.split]
ELLIOTTCABLE has quit [*.net *.split]
borkdude has quit [*.net *.split]
Heero has quit [*.net *.split]
jimeh has quit [*.net *.split]
mjmac has quit [*.net *.split]
drPoggs has quit [*.net *.split]
_whitelogger_ has quit [*.net *.split]
Seich has quit [*.net *.split]
Hien has quit [*.net *.split]
tobiasvl has quit [*.net *.split]
denym_OFF has quit [*.net *.split]
Su7_ has quit [*.net *.split]
shelling__ has quit [*.net *.split]
SegFaultAX has quit [*.net *.split]
pmarreck has quit [*.net *.split]
Paradox has quit [*.net *.split]
blackjid_ has quit [*.net *.split]
george2 has quit [*.net *.split]
artmann has quit [*.net *.split]
kalleth has quit [*.net *.split]
comma8 has quit [*.net *.split]
terrellt has quit [*.net *.split]
rockdon has quit [*.net *.split]
dr_Poggs is now known as drPoggs
Shidash_ is now known as Shidash
max96at_ is now known as max96at
SegFaultAX_ is now known as SegFaultAX
etdev_ is now known as etdev
Seich_ is now known as Seich
tvl is now known as tobiasvl
rockdon_ is now known as rockdon
george2_ is now known as george2
OrbitalKitten has joined #ruby
drizz has quit [Quit: d]
Heero_ is now known as Heero
paulfm has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
nicolastarzia has joined #ruby
ELLIOTTCABLE_ is now known as ELLIOTTCABLE
shelling___ is now known as shelling__
hello123 has joined #ruby
<Sakens>
Question; I have a hash (a={}) and I want to has arrays as values. I want add elements into arrays... the problem is with first one because the array doesn't still exists.
paulfm has joined #ruby
psy_ has quit [Ping timeout: 272 seconds]
aclearman037 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
reinaldob has quit [Ping timeout: 240 seconds]
plashchynski has quit [Client Quit]
<Sakens>
I'm doing a = (a || []) << element
jonr22 has joined #ruby
<Sakens>
is there any better way to do it?
Deele has joined #ruby
<Sakens>
sorry
j416 has joined #ruby
zachrab has quit [Remote host closed the connection]
<centrx>
Sakens, Set the default value of the hash to be a newly generated array: h = Hash.new { |h,k| h[k] = [] }
djbkd has joined #ruby
<Sakens>
a[key] = (a[key] || []) << element
<Sakens>
i miss the key
<Sakens>
thanks, centrx!
<Sakens>
:)
tyfighter has joined #ruby
hello123 has quit [Client Quit]
fmcgeough has quit [Read error: Connection reset by peer]
nicolastarzia has quit [Remote host closed the connection]
frem has joined #ruby
yfeldblum has quit [Remote host closed the connection]
fmcgeough has joined #ruby
failshell has joined #ruby
<Sakens>
centrx, works! I love ruby :)
tonyhb has joined #ruby
Deele has quit [*.net *.split]
ta_ has joined #ruby
psy_ has joined #ruby
troulouliou_dev has quit [Remote host closed the connection]
skj3gg has quit [Quit: ZZZzzz…]
Azure has quit [Ping timeout: 245 seconds]
athan has joined #ruby
Lexun has quit [Remote host closed the connection]
fmcgeough has quit [Client Quit]
jonr22 has quit [Ping timeout: 272 seconds]
nobitanobi has quit [Remote host closed the connection]
valkyrka has joined #ruby
<centrx>
:)
danjordan has joined #ruby
backhoe has quit [Ping timeout: 264 seconds]
<centrx>
Sakens, Note that is similar to h = Hash.new([]), but the shorter one only creates one array and uses the same object as a re-usable default
dfinninger has quit [Remote host closed the connection]
klmlfl has joined #ruby
peterhu has quit [Quit: reboot]
Morkel has quit [Quit: Morkel]
timanema has quit [Read error: Connection reset by peer]
agjacome has quit [Quit: leaving]
fmcgeough has joined #ruby
timanema has joined #ruby
baweaver has joined #ruby
<centrx>
ellisTAA, correct
nobitanobi has joined #ruby
havenwood has quit []
<mwlang>
ellisTAA: you don’t set @new_keyword to anything until you call add…until then, it is nil.
peterhu has joined #ruby
<ellisTAA>
ty both
Aova has quit [Read error: Connection reset by peer]
maximski has joined #ruby
zenith_ has quit [Ping timeout: 264 seconds]
djbkd_ has joined #ruby
max96at is now known as max96at|off
<ellisTAA>
mwlang: in order to pass the test would i write something that says, if @new_keyword is empty return false?
nanoyak has joined #ruby
maximski has quit [Max SendQ exceeded]
<mwlang>
ellisTAA: I think I would implement “def keywords” as “@keywords ||= []” and then replace all references in the rest of the code to @new_keyword with “keywords”
maximski has joined #ruby
<mwlang>
ellisTAA: no, I wouldn’t implement something just to pass specs. implement something because you want that as your interface
maximski has quit [Max SendQ exceeded]
ghostmoth has quit [Quit: ghostmoth]
<ellisTAA>
what does || = mean again?
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
pengin has joined #ruby
maximski has joined #ruby
Megtastique has quit []
fmcgeough has quit [Read error: Connection reset by peer]
maximski has quit [Max SendQ exceeded]
fmcgeough has joined #ruby
dimaursu16 has quit [Ping timeout: 245 seconds]
<mwlang>
ellisTAA: assign if nil
maximski has joined #ruby
greenbagels has quit [Read error: Connection reset by peer]
nicolastarzia has joined #ruby
iamninja has quit [Ping timeout: 250 seconds]
maximski has quit [Max SendQ exceeded]
<mwlang>
@keywords = [] if @keywords.nil?
merqlove has quit [Quit: Connection closed for inactivity]
Aova has joined #ruby
davedev2_ has quit [Ping timeout: 264 seconds]
<bricker>
mwlang: kinda
<mwlang>
basically. The benefit is that @keywords is returned.
<bricker>
It's more accurate to say "@keywords || @keywords = []"
<mwlang>
bricker: yeah, I wasn’t precise there.
davedev24_ has joined #ruby
djbkd_ has quit [Ping timeout: 276 seconds]
nicolastarzia has quit [Remote host closed the connection]
zenith_ has joined #ruby
<bricker>
And similarly, "@keywords && @keywords = []", which I have never found a real-world use for
ezioa has quit [Read error: Connection reset by peer]
<ellisTAA>
@keywords or @keywords? what’s the difference
thsig has quit [Remote host closed the connection]
dimaursu16 has joined #ruby
ezioa has joined #ruby
Megtastique has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nicolastarzia has joined #ruby
thsig has joined #ruby
chrishough has joined #ruby
nicolastarzia has quit [Remote host closed the connection]
<ellisTAA>
bricker: thanks for the info
<ellisTAA>
mwlang: thanks
baroquebobcat has quit [Quit: baroquebobcat]
agjacome has joined #ruby
baroquebobcat has joined #ruby
commmmodo has quit [Quit: commmmodo]
iamninja has joined #ruby
deol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
baweaver has quit [Remote host closed the connection]
baroquebobcat has quit [Client Quit]
momomomomo has joined #ruby
johnkary has quit [Quit: Computer has gone to sleep.]
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zenith_ has quit [Ping timeout: 256 seconds]
djbkd has quit [Remote host closed the connection]
gr33n7007h has joined #ruby
baroquebobcat has joined #ruby
codeFiend has quit [Quit: codeFiend]
<mwlang>
performance question: I have a page that lists all people in an organization. Across the top it has a Last name initial selector like “A | B | C | D …” and this results in a where(“last_name like “?%”, selected_initial) being added to the query. the “S”’s have gotten long enough that there’s a very noticible delay even tho’ an index is defined on the column (mysql 5.5 database). Any suggestions on how better to
<mwlang>
this query as I think its still full-table scan due to the “like” directive.
thatsnotjack has quit [Ping timeout: 264 seconds]
giuseppesolinas has joined #ruby
OrbitalKitten has joined #ruby
dfinninger has joined #ruby
zachrab has joined #ruby
bronson has quit [Remote host closed the connection]
<centrx>
mwlang, If you're lucky the LIKE should use the index because it _starts with_ a specific character
<centrx>
mwlang, Also you could query the results for these initials and store them in cache
dimaursu16 has quit [Ping timeout: 255 seconds]
zachrab has quit [Ping timeout: 252 seconds]
<mwlang>
centrx: actually, let me come back to this…I don’t think its the query after all. There’s only 95 matches and the query itself is returning in milliseconds
iamninja has joined #ruby
<mwlang>
its more likely all the associations loading needlessly for a simple search results page.
chinmay_dd has quit [Quit: Connection closed for inactivity]
<metrix>
I'm trying to be as immutable as possible. so there isn't a way to do that currently
jonr22 has joined #ruby
malcolmva has quit [Ping timeout: 252 seconds]
<centrx>
metrix, What is the over-all thing you are doing?
gsd has joined #ruby
<_2_cool>
could I talked with you all
<metrix>
I'm trying to add an item to a hash
<metrix>
_2_cool -- sure
TripTastic has joined #ruby
<_2_cool>
ok
<metrix>
I'm just trying to do it in an immutable way
<_2_cool>
what do you want to talk about
<centrx>
metrix, adding an item to a hash means it has to be mutable, it would horribly inefficient to create an entirely new hash every time you add an entry
codecop has quit [Remote host closed the connection]
<centrx>
_2_cool, try ##chat
<_2_cool>
oh
_ixti_ has joined #ruby
<_2_cool>
chat with you?????
<wallerdev>
lol
<metrix>
If that's the case, how do programmers get anything done in Haskell?
<wallerdev>
since everything is immutable you can point to the same memory for accessing part of an object and know that wont change
<wallerdev>
then you only have to store the new part in memory
<wallerdev>
you could do equivelant in ruby by creating a new hash with your extra data only and a reference to the old data in the other hash
Squarepy has quit [Quit: Leaving]
Ankhers has quit [Ping timeout: 250 seconds]
leafybasil has joined #ruby
<metrix>
Ahh. OK -- that makes sense
Zai00 has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jonr22 has quit [Ping timeout: 276 seconds]
JBreit has quit [Ping timeout: 255 seconds]
shredding has quit [Quit: shredding]
dnewkerk has quit [Quit: dnewkerk]
<brian_>
hi
<brian_>
ruby ruby ruby
dc_ has joined #ruby
OrbitalKitten has joined #ruby
momomomomo has joined #ruby
Rollabunna has quit [Quit: Leaving...]
failshell has quit [Remote host closed the connection]
dfinninger has quit [Remote host closed the connection]
thiagovsk has quit [Quit: Connection closed for inactivity]
deol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<GaryOak_>
first step in learning the language, learn it's name you've got it brian_
djbkd has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
<centrx>
You get a bronze star
shredding has joined #ruby
<brian_>
thanks!
livingstn has quit []
JDiPierro has quit [Remote host closed the connection]
danman has quit [Quit: danman]
deol has joined #ruby
<brian_>
So yesterday I learned how to turn on and off a computer.
reinaldob has joined #ruby
<centrx>
how
<brian_>
First I confused turning on with turning off though.
<brian_>
But both works the same way, isn't this fascinating?
sankaber has quit [Read error: Connection reset by peer]
zachrab has joined #ruby
<centrx>
yes
<_2_cool>
whatttttttt
nobitanobi has joined #ruby
backhoe has quit [Quit: Leaving]
EvanFreeman has joined #ruby
djbkd has quit [Ping timeout: 255 seconds]
nik_-_ has quit [Quit: nik_-_]
reinaldob has quit [Ping timeout: 264 seconds]
parduse has quit []
Pharaoh2 has joined #ruby
tonyhb has quit [Quit: peace]
malcolmva has joined #ruby
metrix has quit [Quit: ChatZilla 0.9.91.1 [Firefox 35.0/20150108202552]]
<_2_cool>
i?????? centrx!!!!!!!!!!!
<centrx>
Hello _2_cool
<centrx>
How are you
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
it0a has quit [Quit: WeeChat 1.1]
nanoyak has joined #ruby
<_2_cool>
good
nanoyak has quit [Read error: Connection reset by peer]
tmk1108 has joined #ruby
nanoyak has joined #ruby
<_2_cool>
watcha doing centrx
EvanFreeman has quit [Remote host closed the connection]
paulfm has quit [Quit: Zzzzz...]
<centrx>
Just upgraded Debian testing packages
kl has joined #ruby
shazaum has quit [Quit: Leaving]
_2_cool has quit [Remote host closed the connection]
beef-wellington has joined #ruby
nanoyak has quit [Remote host closed the connection]
nanoyak has joined #ruby
jimms has quit [Remote host closed the connection]
<cobragoat>
I'm looking for some information on how to define instance variables the way mongoid does by having field :foo at the top of my model class. any ideas?
<cobragoat>
it seems to only fire static or class methods and I cant seem to populate instance variables from a class method obviously. I haven't been able to figure out how it is happening from the mongoid code
LetErikTry has joined #ruby
LetErikTry has quit [Changing host]
LetErikTry has joined #ruby
skj3gg has joined #ruby
snath has quit [Ping timeout: 240 seconds]
momomomomo has joined #ruby
zachrab has quit [Remote host closed the connection]
Lexun has joined #ruby
zachrab has joined #ruby
ta_ has joined #ruby
codeFiend has joined #ruby
zachrab has quit [Read error: Connection reset by peer]
<cobragoat>
I'm looking for some information on how to define instance variables the way mongoid does by having field :foo at the top of my model class. any ideas?
Lexun has quit [Remote host closed the connection]
Lexun has joined #ruby
craigp has joined #ruby
bronson has quit [Remote host closed the connection]
ellisTAA has quit [Quit: ellisTAA]
yfeldblum has quit [Ping timeout: 244 seconds]
swgillespie has joined #ruby
olivier_bK has quit [Ping timeout: 276 seconds]
tmk1108 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<kl>
[{:a => 1, :b => 2}] # how can I most easily take that and make {:a => 1, :b => 2}] ?
<kl>
{ :a => 1, :b => 2 } # sorry.
<kl>
(^ The intended result. My original input was correct.)
<kl>
zenspider: I was hoping to avoid injecting. I guess there's no other way?
<zenspider>
kl: why?
<kl>
I can't think of one. But "no other way" is rarely true.
<zenspider>
hashes.reduce { |h,sh| h.merge sh }
<kl>
zenspider: academic, I guess. Curiosity
<kl>
ha ha
<Authenticator>
I'm setting up a small produce/consume queue, using a Queue to avoid blocking. But I don't know before-hand how much will be put into it - how do I use it gracefully, without busy-waiting, and without rescuing Exception to catch deadlocks?
<zenspider>
if you were academic about it, you'd realize this was a fold and you'd want to use inject
<kl>
zenspider: now you say it, I guess it we are folding a collection of monoids.
greenbagels has joined #ruby
iPhone6128 has joined #ruby
iPhone6128 has quit [Remote host closed the connection]
<zenspider>
Authenticator: that's exactly what a queue is for... and you want to block on it. what problem are you actually having?
iPhone6128 has joined #ruby
<kl>
I would guess he's talking about avoiding blocking on delivery, not on receipt
<Authenticator>
No, on receipt. It works as long as the consumers are alive, but if it's blocker, reading, as the last one dies it'll either hang or raise a Deadlock exception.
<zenspider>
last one dies?
<zenspider>
you'll have to show some code. I never have these problems
ta_ has quit [Ping timeout: 272 seconds]
<Authenticator>
q = Queue.new ; readers = 3.times.collect { Thread.new { maybe_die ; q << q_result } } ; loop do ; r = q.pop ; puts r ; end