<lapidary>
Xeago: I like lines, but my better employed friends tell me no lines
sambao21 has quit [Quit: Computer has gone to sleep.]
kofno has joined #ruby
<breakingthings>
nolines
XRPTrader2 has joined #ruby
SuperrMann has quit [Quit: Computer has gone to sleep.]
<breakingthings>
also you're on two pages again
<breakingthings>
shame shame
XRPTrader2 has quit [Remote host closed the connection]
XRPTrader2 has joined #ruby
mmitchell has joined #ruby
<XRPTrader2>
hey everyone i am going insane with a config/initializers/secret_token.rb file. i have placed a rake secret in the file but rake assets:precompile complains there is none, anyone have any ideas?
Guest33369 has left #ruby ["Leaving"]
<Xeago>
breakingthings: I decided on 2 pages, keeps things cleaner
<breakingthings>
welp there goes Xeago's chances of getting hired
<breakingthings>
everybody wish him farewell
<breakingthings>
to hobo land
<Xeago>
I also have a version of 1 page
* breakingthings
pokes fun at Xeago
DonRichie has quit [Quit: Verlassend]
<breakingthings>
Really though you could pretty easily condense that onto one page
<Xeago>
excluding the contractwork, skipping the 2ndary activities and hobbies
DonRichie has joined #ruby
<breakingthings>
but you gotta be fancier with whatever you're using to make it
<Xeago>
I don't want it dense
<breakingthings>
which will be a pain with word
<breakingthings>
doesn't need to be dense
<breakingthings>
Cut the fat, rearrange.
osvico has quit [Ping timeout: 245 seconds]
<Xeago>
I am bad at seeing fat
<Xeago>
it isn't made with word tho
<breakingthings>
embrace the fat, my friend
<breakingthings>
and then surgically remove it
<Xeago>
I am horribly bad at design
<breakingthings>
:p
<Xeago>
this is all taken from or with help of other people
angusiguess has joined #ruby
<kseifried>
I'm curious
<kseifried>
Ruby(Mid-Level),C#,
<kseifried>
so what level is the C# at?
UberCanuck has quit [Quit: Leaving]
<kseifried>
and what does mid level mean? I'd remove that
Davey has joined #ruby
slainer68 has joined #ruby
headius has joined #ruby
<kseifried>
also Java6 -> Java
<kseifried>
they do keyword searching mostly
<kseifried>
assuming you're mass applying
<kseifried>
*nix too
kristofers has quit []
<kseifried>
Linux, FreeBSD, SOlaris, etc.
<breakingthings>
kseifried: well, I had mentioned earlier that if it's a ruby job he's looking at he could be specific with his skill level if he felt it was useful
<breakingthings>
but that also entailed brushing C# and Java and all that crap under a rug.
<kseifried>
AIX? HP-UX? etc. be specific.
allaire has quit []
<kseifried>
I dunno. I've never applied or a job for real
<breakingthings>
And ^ might not be great advice if it's not an ops job
<kseifried>
so what do I know
<breakingthings>
If it's just a dev job *nix is fine.
<kseifried>
it'll miss keywords though
<breakingthings>
it just basically stands for 'I know how to computers'
<kseifried>
and most of this stuff is automated now
skattyadz has quit [Quit: skattyadz]
<kseifried>
I mean ideally you have a base resume you then tailor for each job application seems to be the advice I see a lot, which makes sense, customize it
moshef has quit [Quit: moshef]
<breakingthings>
the kind of companies searching for specific OS experience isn't looking for a dev
m8 has quit [Quit: Sto andando via]
<breakingthings>
they're looking for an ops
<breakingthings>
or a superhero
<kseifried>
not aleways true, like at red hat we prefer to hire devs that know fedora/rhel/derivatives =)
* breakingthings
shrugs
<breakingthings>
Wouldn't say that's particularly common.
<kseifried>
better cultural fit/less training usually/etc
<kseifried>
breakingthings, : we're hiring a ton of people =)
<breakingthings>
Sure, but I just don't think that tends to apply to lots of other companies.
<kseifried>
from what I've seen they like you to at least have basic knowledge
<kseifried>
less training/etc to do
<breakingthings>
ofc
<Xeago>
breakingthings: I want to be a devops guy
<breakingthings>
Xeago: then do it up
<kseifried>
Xeago: yah
<breakingthings>
put all the OS keywords
<Xeago>
but that is not what I am applying for now
<kseifried>
and and make the github thing a url, not just the name
<kseifried>
people are lazy
<breakingthings>
yeah
<breakingthings>
also
<Xeago>
styled an url too?
rickmasta has quit [Read error: Connection reset by peer]
kemist has quit [Quit: Computer has gone to sleep.]
hamakn has joined #ruby
markalanevans has quit [Ping timeout: 245 seconds]
freerobby has joined #ruby
gabrielrotbart has quit [Read error: Connection reset by peer]
moos3 has quit [Quit: Computer has gone to sleep.]
ikea_meatballs has joined #ruby
benlieb has joined #ruby
<ikea_meatballs>
whats the most efficient way to store an array of integers?
idkazuma has quit [Remote host closed the connection]
gabrielrotbart has joined #ruby
moos3 has joined #ruby
nadirvardar has joined #ruby
wsterling has joined #ruby
matayam has joined #ruby
<Ohga>
ikea_meatballs: "the_array = [1, 2, 3]" I guess..
oivoodoo has quit [Ping timeout: 264 seconds]
<ikea_meatballs>
Ohga: i want to compress it
<ikea_meatballs>
base50?
bulters has joined #ruby
<Ohga>
ikea_meatballs: use a compression library?
<ikea_meatballs>
what do you recommend
banjara has quit [Quit: Leaving.]
freerobby has quit [Ping timeout: 246 seconds]
cookiemon5ter has joined #ruby
cookiemon5ter has left #ruby [#ruby]
<Ohga>
ikea_meatballs: well, you're not very precise.. for what purpose are you intending this compression?
<ikea_meatballs>
store in db
mikeg has quit [Read error: Connection reset by peer]
<Ohga>
ikea_meatballs: do you have some value limits on the integers?
drale2k has quit [Quit: Leaving...]
<ikea_meatballs>
Ohga: proably no more than 100 billion
<Ohga>
so you need 64 bit integers..
bulters has quit [Ping timeout: 264 seconds]
<ikea_meatballs>
sure
<Ohga>
ikea_meatballs: is the db dedicated or accessable to other applications?
eka has quit [Quit: Computer has gone to sleep.]
<ikea_meatballs>
Ohga: accessible to other applications
cburyta has quit [Remote host closed the connection]
<Ohga>
ikea_meatballs: then, unless the other apps can be changed to use a custom encoding, you should not store the array in some trixy fashion
<ikea_meatballs>
they can be changed to use a custom encoding
<ikea_meatballs>
theres got to be a space efficient way to store an array of numbers...
Invac has quit []
cburyta has joined #ruby
Hanmac2 has joined #ruby
i_s has quit [Quit: i_s]
generalissimo has joined #ruby
arya_ has joined #ruby
mercwithamouth has quit [Ping timeout: 260 seconds]
<Ohga>
well, most standard compression algorithms work with units of bytes, 8 bits, not 64 as in this case
<ikea_meatballs>
for example, if you wanted to store 1,3,5... you could just do "10101 " => 21
<ikea_meatballs>
and that saves you 1 character.
mercwithamouth has joined #ruby
<Ohga>
oh, you want to use bit fields, and I guess it is given that you don't get the same integer more than once?
Hanmac has quit [Ping timeout: 260 seconds]
<ikea_meatballs>
unique array of random integers, {x | 1<=x<=1 billion}
jellosea_ has quit [Quit: jellosea_]
<Ohga>
ikea_meatballs: but the array may become sparse, as in big gaps of unset bits, right?
<ikea_meatballs>
right
Guedes0 has quit [Quit: Saindo]
arya has quit [Ping timeout: 246 seconds]
<Ohga>
ok, so in the general case it is not efficient to store all bits..
Guedes0 has joined #ruby
jonathanwallace has joined #ruby
<Ohga>
I don't think there is any code ready for this problem since I don't find this to be a common requirement
<ikea_meatballs>
yeah
Tectonic has quit []
<aces23up>
i currently have a regex to split a document into sentances via text.split( /\./ ) how could I structure this so that i wouldn't split on words like Mrs. for instance words with 5 or less characters followed by a period.
<Ohga>
ikea_meatballs: btw, no negative integers? and is 0 a valid element?
<ikea_meatballs>
nope, 1<=x<=1billion
maletor has quit [Quit: Computer has gone to sleep.]
moos3 has quit [Quit: Computer has gone to sleep.]
ttt has joined #ruby
Proshot has quit [Ping timeout: 255 seconds]
matayam has quit [Remote host closed the connection]
<bnagy>
ikea_meatballs: there are a bunch of ways
<ikea_meatballs>
bnagy: name one?
<bnagy>
it mainly depends how spare you're expecting your set to be
<bnagy>
sec
cantonic_ has joined #ruby
benlieb has quit [Quit: benlieb]
<ikea_meatballs>
i'm not expecting it to be very sparse at all
Hanmac2 has quit [Ping timeout: 256 seconds]
mhf has quit [Remote host closed the connection]
<ikea_meatballs>
but definitely sparse to a degree
<bnagy>
I use those for sets of 32 and 64 bit memory addresses, with varying density
<bnagy>
there are various time / space compromises depending which level you use
mikeg has joined #ruby
<ikea_meatballs>
bnagy: im looking at 64 bits
<Ohga>
bnagy: quite interesting
<ikea_meatballs>
bnagy: how would you recommend, syntactically, i use these libraries to store a not-sparse int array
<ikea_meatballs>
bnagy: willing to sacrifice time, but not space
mhf has quit [Read error: Connection reset by peer]
NiteRain has joined #ruby
benlieb has joined #ruby
mhf has joined #ruby
JamieJ_ has joined #ruby
<JamieJ_>
hello
<JamieJ_>
aaaaawwww yeah!
anirudh24seven has quit [Ping timeout: 248 seconds]
wereHams1er has quit [Ping timeout: 240 seconds]
akashj87__ has quit [Quit: Leaving]
<bnagy>
ikea_meatballs: probably keep it as a Set in memory and use compression level 4, but like I said you should bench on your own data
wereHamster has joined #ruby
TorpedoSkyline has joined #ruby
<ikea_meatballs>
bnagy: oh interesting
<bnagy>
oh sorry :) 4 won't work for 64 bit :)
<ikea_meatballs>
where do i set compression level
agarie has quit [Read error: Connection reset by peer]
<ikea_meatballs>
oh in pack
chaluopa is now known as crackfu
crackfu has quit [Changing host]
crackfu has joined #ruby
<ikea_meatballs>
bnagy: what will work for 64 bit
agarie has joined #ruby
newUser1234 has quit [Remote host closed the connection]
<bnagy>
the SparseBitmap, which is really just a Hash under the hood
<bnagy>
it packs via packing w* and then XZ compression
phasma has quit [Ping timeout: 260 seconds]
<ikea_meatballs>
so... 5?
<ikea_meatballs>
or 6?
<bnagy>
6
<ikea_meatballs>
great, ill try 6
<JamieJ_>
Bnagy: whats up
<bnagy>
JamieJ_: morning
unstable has quit [Ping timeout: 240 seconds]
<Ohga>
ikea_meatballs: note that you get, firstly a string, and secondly a string with the compression level embedded. you could customize for your particular need (assuming one of the methods and removing unneccesary code and using first or last element to store length)
<JamieJ_>
i've got my code finally working but there is just very small matter to be fixed
Hanmac has joined #ruby
twoism has quit [Remote host closed the connection]
unstable has joined #ruby
<JamieJ_>
im using the BigDecimal and .round(2) functions to round my numbers off to two decimal places. my output gives me just one
Tectonic has joined #ruby
marcdel has quit []
<bnagy>
>> (3.10).round 2
<ikea_meatballs>
bnagy: cant find xz-utils
flowerhack has quit [Ping timeout: 260 seconds]
<bnagy>
ikea_meatballs: it's a gem you'll need to install
<ikea_meatballs>
ERROR: Could not find a valid gem 'xz-utils' (>= 0) in any repository
<bnagy>
ikea_meatballs: you might also need to install xz itself, depending on your os
<ikea_meatballs>
ah, probably.
<bnagy>
oh and it might be named differently to the require - some stupid gems do that, try xz_utils
pac1 has quit [Quit: I got it one line of code at a time]
<bnagy>
or, like, google :)
[Neurotic] has quit [Ping timeout: 260 seconds]
chessguy has quit [Remote host closed the connection]
ninp0 has joined #ruby
wsterling has quit [Remote host closed the connection]
dqminh has quit [Remote host closed the connection]
apok has quit [Quit: apok]
chessguy has joined #ruby
dhruvasagar has joined #ruby
shevy has quit [Ping timeout: 276 seconds]
havenwood has quit [Remote host closed the connection]
<bnagy>
that code needs prettifying :/
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
anirudh24seven has joined #ruby
<Ohga>
ikea_meatballs: I've found a potential problem with bnagy's code
yeban has quit [Ping timeout: 260 seconds]
hogeo has joined #ruby
cobragoat has joined #ruby
<ikea_meatballs>
bnagy: what?
<ikea_meatballs>
Ohga: * what
<Ohga>
some of the algorithms that pack the array to a string use the 'w' template, which stand for BER-compressed integer and seems to be a way of handling fixednum/bignum structures
<Ohga>
I don't think that's a standardized format so you'll make life very hard for the devs of the other applications if they are not programmed in ruby
dmiller1 has quit [Ping timeout: 252 seconds]
<Ohga>
if you control all the dev of the other applications then just ignore me, but give it some thought anyway
<Ohga>
ikea_meatballs: well ok, seems it is documented somewhere, but still, it is a more wasteful format especialy since you just need a 64 bit value space
forced_request has quit [Read error: Connection reset by peer]
benlieb has quit [Quit: benlieb]
cobragoat has quit [Ping timeout: 264 seconds]
Opettaja has quit [Quit: WeeChat 0.4.0]
psyprus has quit [Ping timeout: 258 seconds]
<bnagy>
you might want to test the code before you make assertions
<bnagy>
feel free to use quadwords and bench
psyprus has joined #ruby
<ikea_meatballs>
bnagy: it looks good to me
<ikea_meatballs>
bnagy: it compresses an array of 250,000 random values 1<x<250000 into a string 34940 characters
robscomputer_ has joined #ruby
<bnagy>
ikea_meatballs: whoa, whoa... it's only for Sets, remember
<Ohga>
just to clarify, I'm not saying it's a bad solution, I'm just saying that if the other applications are third party then you don't want to polute a database with ruby specific mechanics
<bnagy>
no duplication
<ikea_meatballs>
bnagy: it's an array of uniq integers
<ikea_meatballs>
so a set is fine
<bnagy>
ok phew :)
tish has joined #ruby
<bnagy>
just that that Set is 'full' :)
<bnagy>
unless I missed a 0
<bnagy>
so that would actually compress pathologically well with the straight XZ'd bitmap
shevy has joined #ruby
[Neurotic] has joined #ruby
<bnagy>
Ohga: BER isn't ruby specific
robscomputer_ has quit [Ping timeout: 245 seconds]
radic has quit [Disconnected by services]
<Ohga>
bnagy: ok sure, but I mean that it introduce a specific format where a more ordinary format would do. It would introduce extra code dependencies in languages that doesn't have a std lib implementation
radic_ has joined #ruby
macabhaird has quit [Read error: Operation timed out]
dhruvasagar has quit [Remote host closed the connection]
jurassic has joined #ruby
freerobby has joined #ruby
wmoxam has quit [Ping timeout: 245 seconds]
arya_ has quit [Ping timeout: 240 seconds]
<Ohga>
so instead of 'w*', if I understand the docs correct, you could use 'Q>*' (64-bit unsigned, big endian) just as well?
i_s has joined #ruby
IceDragon has quit [Ping timeout: 245 seconds]
indyrl has left #ruby [#ruby]
Ortuna has quit [Quit: Computer has gone to sleep.]
<Ohga>
it would yield the same performance (perhaps slightly better) while being much easier to implement for other languages
<bnagy>
well it's a pretty screwy format from front to back, so anyone trying to use it from another language is probably going to be 'wtf' anyway
<Ohga>
(yes, I'm speaking theoreticaly, but the resoning should be sound)
nari has joined #ruby
<bnagy>
Ohga: yeah, like I said, you can go ahead and bench with quadwords - but it's not quite as good
<bnagy>
you can trivially add it as a level
eddiezane has joined #ruby
<bnagy>
I have a toy script that compresses a bunch of different input sets with all the levels and gives me times and compression raters
<bnagy>
*rates
freerobby has quit [Ping timeout: 245 seconds]
eddiezane has left #ruby [#ruby]
<bnagy>
it's surprising how non-representative made up data can be, though, so you need to bench with real data ideally
arya has joined #ruby
<bnagy>
by real I mean the data you're actually going to use IRL
<Ohga>
bnagy: thinking of it, with BER, smaller values doesn't use 8 bytes of full long?
<callmeivan>
hm.rb:8:in `price': undefined method `[]' for nil:NilClass (NoMethodError)
<callmeivan>
from hm.rb:15:in `block in <main>'
<callmeivan>
from hm.rb:13:in `loop'
<callmeivan>
from hm.rb:13:in `<main>'
<waxjar>
wow
<callmeivan>
am i doing something inherently wrong?
danneu has quit [Ping timeout: 252 seconds]
<Ohga>
parsing markup with regex.....
<callmeivan>
meaning?
freerobby has joined #ruby
<waxjar>
it's better to use a library that you can walk the DOM with
chrishough has joined #ruby
chandankumar is now known as graphite
<callmeivan>
yes that would be better but is there a reason why it randomly fails?
<Ohga>
it may not be the reason for the error, but markup data is to complex to be sure to get right with just regex pattern
<waxjar>
it think google just doesn't like your continuous requests. i'd put a sleep of a few seconds in that loop
freerobby has quit [Client Quit]
<callmeivan>
thats what i do but even with a 20 second buffer it occurs
<waxjar>
HTTP requests can go wrong too
<Paradox>
Mon_Ouie, pry-coolline whines at me about no IO#lines
Lewix has quit [Remote host closed the connection]
osvico has joined #ruby
dmiller1 has joined #ruby
Lewix has joined #ruby
bulters has joined #ruby
bitZero__ has quit [Ping timeout: 248 seconds]
Skofo has joined #ruby
<callmeivan>
i believe the yahoo finance api is free and in real time
malte_ has quit [Quit: malte_]
<callmeivan>
probably better suited, but still curious what happens when it fails :)
graphite has quit [Ping timeout: 245 seconds]
justsee has quit [Ping timeout: 252 seconds]
<xll11>
is it a good idea to learn ruby on rails simultaniously as learning ruby?
IcyDragon has joined #ruby
<bnagy>
guess it depends if it's ever a good idea to learn rails
<waxjar>
i'd learn ruby first, you'll have no idea what you're actually doing in Rails
<waxjar>
at least that's how I felt
bulters has quit [Ping timeout: 252 seconds]
IceDragon has quit [Ping timeout: 245 seconds]
<Lewix>
xll11: I would learn rails first depending on your situation. I regret learning ruby first
<xll11>
bnagy elaborate?
dmiller1 has quit [Ping timeout: 246 seconds]
danneu has joined #ruby
<xll11>
Lewix my situation? I already have basic understanding of ruby, I've gone through the CodeAcademy course (in the process of finishing) and have a decent Java understanding
<Lewix>
xll11: if you want to learn it fast for a job go with rails first. If you have time on your hands go with ruby first
chessguy has quit [Remote host closed the connection]
<xll11>
aha, I'm just enriching myself as I got a holiday off college
<xll11>
^^
<tylersmith>
then learn ruby before rails
<waxjar>
try Sinatra if you want to build something webby, you'll actually learn to write Ruby instead of Rails tricks / conventions
jellosea_ has joined #ruby
Lewix_ has joined #ruby
Lewix has quit [Disconnected by services]
sdavis has quit [Quit: sdavis]
Lewix_ is now known as lewix
lewix has quit [Changing host]
lewix has joined #ruby
<shevy>
don't do it like me xll11
jurassic has quit [Quit: jurassic]
<shevy>
I learned ruby first and then never wanted to really learn RoR anymore
<lewix>
what did I miss
danneu has quit [Ping timeout: 252 seconds]
<lewix>
shevy: exactly
<shevy>
what I now rather do is, write my own webframework, and it takes way too much time :(
<lewix>
I spent about three weeks on ruby because everybody told me how it would make me a better rails dev but I fell in love with it and lost interest for rails
<shevy>
hahaha yeah
<waxjar>
same for me, really.
v0n has quit [Ping timeout: 252 seconds]
mmitchell has quit [Remote host closed the connection]
<lewix>
on top of it when I moved to rails I regretted it because I felt like there was some rails dev out(entry level) there who knew less ruby than I did
anonymuse has joined #ruby
mmitchell has joined #ruby
<lewix>
I meant I didn't have the luxury of college holidays, xll11 =)
chrisnicola has joined #ruby
tylersmith has quit [Quit: tylersmith]
<lewix>
I'm actually learning rails right now, started not long ago
freakazoid0223 has quit [Ping timeout: 245 seconds]
<xll11>
:P
freerobby has quit [Client Quit]
kofno has quit [Remote host closed the connection]
brhelwig_ has joined #ruby
graphite has quit [Ping timeout: 245 seconds]
IcyDragon has quit [Ping timeout: 245 seconds]
banjara has joined #ruby
brhelwig has quit [Ping timeout: 245 seconds]
angusiguess has quit [Ping timeout: 256 seconds]
mattbl has joined #ruby
heliumsocket has quit [Quit: heliumsocket]
<lewix>
xll11: how's codeacademy
<xll11>
very nice
<xll11>
still haven't build a big thing to put it all together
<xll11>
But it teaches the basics pretty nicely so far
rburton- has joined #ruby
<xll11>
if/procs/lambda/classes/inheritance etc
phasma has joined #ruby
JamieJ_ has quit [Quit: Page closed]
nathancahill has quit [Ping timeout: 255 seconds]
chimkan_ has quit [Ping timeout: 252 seconds]
<banisterfiend>
xll11: i heard it sux compared to codeschool
mikeg has quit [Ping timeout: 260 seconds]
daemoen has joined #ruby
<shevy>
so much to learn
daemoen has quit [Client Quit]
<lewix>
I wish they 're had a good up to date rails book out there
daemoen has joined #ruby
<lewix>
shevy: tell me about it, but you're closer to the end than some - if there's such a thing
flowerhack has joined #ruby
chichouw has joined #ruby
<shevy>
I am not sure, concepts which I don't like I tend to not use, and eventually forget, like @@vars
bean has joined #ruby
Rym__ has joined #ruby
<shevy>
and I am still not sure why lambdas are vital to have, for some reason it seems as if I can get away not having to use them
randym_ has joined #ruby
csexton- has joined #ruby
BeLucid_ has joined #ruby
drago777- has joined #ruby
fearoffish_ has joined #ruby
<shevy>
making the right design decisions very early on, is very hard
IcyDragon has joined #ruby
Ohga has quit [Read error: Connection reset by peer]
scrogson_ has joined #ruby
chichou has quit [Read error: Connection reset by peer]
randym has quit [Ping timeout: 258 seconds]
fearoffish has quit [Ping timeout: 258 seconds]
AllStruck has quit [Ping timeout: 258 seconds]
csexton has quit [Ping timeout: 258 seconds]
Rym has quit [Ping timeout: 258 seconds]
aboudreault has quit [Ping timeout: 258 seconds]
BeLucid has quit [Read error: Connection reset by peer]
drago777 has quit [Read error: Connection reset by peer]
scrogson has quit [Ping timeout: 258 seconds]
morrolan_ has quit [Ping timeout: 258 seconds]
Hien has quit [Ping timeout: 258 seconds]
Mathieu has quit [Ping timeout: 258 seconds]
jeffreylevesque has quit [Ping timeout: 258 seconds]
emptymag00 has quit [Ping timeout: 258 seconds]
onewheelskyward has quit [Ping timeout: 258 seconds]
davidcelis has quit [Ping timeout: 258 seconds]
tchebb has quit [Ping timeout: 258 seconds]
cespare has quit [Ping timeout: 258 seconds]
Rym__ is now known as Rym
fearoffish_ is now known as fearoffish
julian-delphiki has quit [Ping timeout: 258 seconds]
rhys has quit [Ping timeout: 258 seconds]
gf3 has quit [Ping timeout: 258 seconds]
mnaser has quit [Ping timeout: 258 seconds]
eregon has quit [Ping timeout: 258 seconds]
Johanna_Meszoros has quit [Ping timeout: 258 seconds]
avalarion has joined #ruby
Hien has joined #ruby
emptymag00 has joined #ruby
cespare has joined #ruby
Mathieu has joined #ruby
NimeshNeema has quit [Ping timeout: 258 seconds]
AllStruck has joined #ruby
eregon has joined #ruby
rhys has joined #ruby
randym_ is now known as randym
anonymuse has quit [Quit: Leaving...]
davidcelis has joined #ruby
Morrolan has joined #ruby
onewheelskyward has joined #ruby
gf3 has joined #ruby
tchebb has joined #ruby
mnaser has joined #ruby
techlife has quit [Ping timeout: 245 seconds]
aboudreault has joined #ruby
Skofo has quit [Quit: Leaving]
<lewix>
shevy: @@ class variable, pretty useless or not advised/good coding habit from what I've read. As for proc I remember it can be used as shortcuts [1,2,3,4].reduce(&:+). I don't remember about lambda
<lewix>
lol
crackfu has quit [Remote host closed the connection]
crackfu has joined #ruby
hemanth has joined #ruby
yeban has joined #ruby
mneorr has joined #ruby
<shevy>
ok but
<shevy>
what is the difference to having a method called .sum there?
<shevy>
or .apply(:+)
chimkan has joined #ruby
<lewix>
don't you have to require stdlib to call .sum?
zeroeth has quit [Ping timeout: 240 seconds]
<shevy>
I don't mean that
<shevy>
I mean, it seems as if I could just use normal methods alone
jdunck has quit [Quit: Computer has gone to sleep.]
uris has quit [Quit: Leaving]
shevy has joined #ruby
TheFuzzball has quit [Ping timeout: 252 seconds]
TheFuzzball has joined #ruby
nomadicoder has joined #ruby
wsterling has quit [Remote host closed the connection]
Rym has quit [Quit: Rym]
zeroeth has joined #ruby
kemist has joined #ruby
danslo has quit [Quit: danslo]
nimred has quit [Quit: leaving]
girija has joined #ruby
nomadicoder has quit [Ping timeout: 260 seconds]
tylersmith has joined #ruby
nimred has joined #ruby
nimred has quit [Changing host]
nimred has joined #ruby
nimred has quit [Client Quit]
<lewix>
what material did you guys use for rails
<Hanmac1>
lewix: this #rubyonrails
<lewix>
they're sleeping
<lewix>
it's hardly as lively
pygmael has quit [Quit: pygmael]
<callmeivan>
conclusion: sometimes google doesnt send me all data i need for my regex match - when it doesnt i still try to access @stock_price[1] which does not contain the match (in that case), i would have to check for nil and act accordingly
jwang has quit [Quit: Leaving]
cantonic has quit [Quit: cantonic]
pygmael has joined #ruby
SCommette has joined #ruby
tomzx_mac has quit [Ping timeout: 252 seconds]
chimkan has quit [Ping timeout: 264 seconds]
codecop has joined #ruby
momomomomo has quit [Quit: momomomomo]
apeiros has joined #ruby
angusiguess has joined #ruby
emocakes has joined #ruby
xll11 has quit [Ping timeout: 276 seconds]
kofno has joined #ruby
keyo has joined #ruby
chrisnicola has quit [Quit: This computer has gone to sleep]
Fredster has joined #ruby
Nahra has quit [Remote host closed the connection]
Fredster has quit [Client Quit]
sambio has quit [Read error: Connection reset by peer]
headius has quit [Quit: headius]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
angusiguess has quit [Ping timeout: 245 seconds]
maletor has joined #ruby
chimkan_ has joined #ruby
pcarrier_ has quit [Ping timeout: 252 seconds]
headius has joined #ruby
headius has quit [Client Quit]
chandankumar has joined #ruby
robustus has quit [Ping timeout: 248 seconds]
crimezone20xx has joined #ruby
kofno has quit [Ping timeout: 245 seconds]
robustus has joined #ruby
a_a_g1 has joined #ruby
chrishough has quit [Quit: chrishough]
a_a_g has quit [Ping timeout: 260 seconds]
rickmasta has quit [Quit: Leaving...]
chrishough has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
a_a_g1 has quit [Ping timeout: 252 seconds]
breakingthings has quit []
crimezone20xx has quit [Quit: leaving]
mockra has joined #ruby
apeiros has quit [Remote host closed the connection]
<JoeHazzers>
i seem to be having some logic (see: fatigue) issues, but how would i prepend a colon to the object at the last index of an array?
<JoeHazzers>
well
<JoeHazzers>
say i have an array, and i want to put a colon in the string in the last index. how would i do it?
greenarrow has quit [Ping timeout: 260 seconds]
<bnagy>
ary.last.prepend ':'
gabrielrotbart has quit [Read error: Connection reset by peer]
momomomomo has joined #ruby
<bnagy>
terrifyingly obscure, I know ;)
pcarrier_ has joined #ruby
<JoeHazzers>
yeah, i've now come to the conclusion i've got an error somewhere else
gabrielrotbart has joined #ruby
SCommette has quit [Quit: SCommette]
<JoeHazzers>
huh
<JoeHazzers>
just wondering
BadLarry has quit [Ping timeout: 240 seconds]
<JoeHazzers>
what would ary[-1].prepend ':' be expected to do?
<Hanmac1>
the same
chandankumar has quit [Ping timeout: 256 seconds]
<JoeHazzers>
i was getting two colons
BadLarry has joined #ruby
<JoeHazzers>
super strange
<Hanmac1>
but both will return an error, if the array is empty or the last item is not a string (or something that does not respond to prepend)
mattbl has joined #ruby
rickruby has joined #ruby
NimeshNeema has joined #ruby
hamakn has quit [Remote host closed the connection]
S3kx has joined #ruby
braoru has joined #ruby
dormousy- has joined #ruby
hamakn has joined #ruby
one8zero has quit [Ping timeout: 245 seconds]
freerobby has joined #ruby
drale2k has joined #ruby
ckipel has joined #ruby
aapzak_ has joined #ruby
robustus|Off has joined #ruby
earthquake has quit [Ping timeout: 240 seconds]
ckipel is now known as earthquake
kuzushi__ has joined #ruby
alexhanh_ has joined #ruby
kapowaz_ has joined #ruby
az_ has joined #ruby
mikemac has joined #ruby
eldariof has joined #ruby
Lemtzas_ has joined #ruby
Freijo has joined #ruby
Mohan__ has joined #ruby
new299_ has joined #ruby
backjlack_ has joined #ruby
jurassic has joined #ruby
nuba_ has joined #ruby
fcoury__ has joined #ruby
jurassic has quit [Client Quit]
tomsthumb has joined #ruby
tomsthumb has quit [Client Quit]
freerobby has quit [Ping timeout: 245 seconds]
DefV_ has joined #ruby
calmyournerves_ has joined #ruby
cjk101010_ has joined #ruby
grn_ has joined #ruby
GeekOnCoffee_ has joined #ruby
elektronaut_ has joined #ruby
fixl has joined #ruby
nyuszika1 has joined #ruby
mksm_ has joined #ruby
robustus has quit [Ping timeout: 276 seconds]
dormoose has quit [Ping timeout: 276 seconds]
aapzak has quit [Ping timeout: 276 seconds]
kapowaz has quit [Ping timeout: 276 seconds]
az has quit [Ping timeout: 276 seconds]
alexhanh has quit [Ping timeout: 276 seconds]
crazymykl has quit [Remote host closed the connection]
fcoury has quit [Ping timeout: 276 seconds]
xiphiasx_ has quit [Remote host closed the connection]
S2kx has quit [Ping timeout: 276 seconds]
Lemtzas has quit [Ping timeout: 276 seconds]
nyuszika7h has quit [Ping timeout: 276 seconds]
new299 has quit [Ping timeout: 276 seconds]
calmyournerves has quit [Ping timeout: 276 seconds]
cjk101010 has quit [Ping timeout: 276 seconds]
Mohan_ has quit [Ping timeout: 276 seconds]
elektronaut has quit [Ping timeout: 276 seconds]
GeekOnCoffee has quit [Ping timeout: 276 seconds]
nuba has quit [Ping timeout: 276 seconds]
deadalus has quit [Ping timeout: 276 seconds]
halfie has quit [Ping timeout: 276 seconds]
backjlack has quit [Ping timeout: 276 seconds]
Fraeon has quit [Ping timeout: 276 seconds]
kuzushi_ has quit [Ping timeout: 276 seconds]
fcoury_ is now known as fcoury
DefV has quit [Ping timeout: 276 seconds]
grn has quit [Ping timeout: 276 seconds]
companion has quit [Ping timeout: 276 seconds]
mksm has quit [Ping timeout: 276 seconds]
vandemar has quit [Ping timeout: 276 seconds]
bricker has quit [Ping timeout: 276 seconds]
sn0wb1rdz has quit [Ping timeout: 276 seconds]
GeekOnCoffee_ is now known as GeekOnCoffee
elektronaut_ is now known as elektronaut
bricker_ has joined #ruby
xiphiasx_ has joined #ruby
companion has joined #ruby
companion has joined #ruby
companion has quit [Changing host]
parus has quit [Ping timeout: 276 seconds]
parus_ has joined #ruby
halfie has joined #ruby
deadalus has joined #ruby
sn0wb1rdz has joined #ruby
kapowaz_ is now known as kapowaz
nyuszika1 is now known as nyuszika7h
mercwithamouth has quit [Ping timeout: 252 seconds]
zigomir has joined #ruby
drale2k has quit [Quit: Leaving...]
yacks has quit [Ping timeout: 246 seconds]
Neurotic has joined #ruby
techlife has quit [Ping timeout: 248 seconds]
benweint has joined #ruby
malte_ has joined #ruby
bulters has joined #ruby
fcoury__ is now known as fcoury_
aganov has joined #ruby
nomenkun has joined #ruby
rickruby has quit [Remote host closed the connection]
gabrielrotbart has quit [Ping timeout: 245 seconds]
malte_ has quit [Client Quit]
techlife has joined #ruby
Heero has quit [Ping timeout: 240 seconds]
hamakn has quit [Remote host closed the connection]
bulters has quit [Ping timeout: 252 seconds]
jurassic has joined #ruby
yacks has joined #ruby
jurassic has quit [Client Quit]
gabrielrotbart has joined #ruby
Neurotic has quit [Remote host closed the connection]
freeayu__ has quit [Ping timeout: 252 seconds]
freeayu has joined #ruby
hamakn has joined #ruby
ananthakumaran has joined #ruby
dqminh has quit [Remote host closed the connection]
nadirvardar has quit [Quit: Computer has gone to sleep.]
chrisnicola has joined #ruby
pygmael has quit [Quit: pygmael]
drale2k has joined #ruby
emocakes has quit [Quit: emocakes]
pygmael has joined #ruby
dmerrick has joined #ruby
carraroj has joined #ruby
tylerbre_ has joined #ruby
a_a_g has joined #ruby
angusiguess has joined #ruby
jurassic has joined #ruby
dmerrick has quit [Ping timeout: 245 seconds]
marcdel has joined #ruby
eldariof has quit []
chrisnicola has quit [Quit: This computer has gone to sleep]
nomenkun has quit [Remote host closed the connection]
IcyDragon has quit [Quit: Space~~~]
vandemar has joined #ruby
Tectonic has quit []
tylersmith has quit [Quit: tylersmith]
greenarrow has joined #ruby
angusiguess has quit [Ping timeout: 260 seconds]
eliasp_ has quit [Ping timeout: 240 seconds]
tagrudev has joined #ruby
DarthGandalf has quit [Ping timeout: 256 seconds]
eliasp has joined #ruby
mockra has quit [Remote host closed the connection]
jdunck has joined #ruby
Nahra has joined #ruby
haxrbyte has joined #ruby
haxrbyte_ has joined #ruby
freeayu has quit [Read error: Connection reset by peer]
chandankumar has joined #ruby
mithro-- has quit [Ping timeout: 264 seconds]
mattbl has quit [Quit: This computer has gone to sleep]
pcarrier_ has quit [Ping timeout: 252 seconds]
jekotia has quit [Quit: sleeeeeeeeeep]
chrishough has quit [Quit: chrishough]
mithro-- has joined #ruby
haxrbyte has quit [Ping timeout: 245 seconds]
brhelwig_ has quit [Remote host closed the connection]
<ant3841>
Having a problem with taskjuggler. I tested on 3 Gentoo machines, different architectures. Tested all combinations of libyaml and ruby19, against the current and previous taskjuggler gem. Getting lost here. I'm sure it's a platform/configuration issue. I get the following errors: http://pastebin.com/iVerPLQH Any pointers, please ? My experience with Ruby is.. now.
tish has quit [Quit: Leaving.]
swex has quit [Remote host closed the connection]
drale2k has joined #ruby
gyre007 has quit [Ping timeout: 264 seconds]
swex has joined #ruby
marcdel has quit []
timmow_ has joined #ruby
<bnagy>
never heard of taskjuggler, sorry
<bnagy>
if I had to guess I would think you're passing it a malformed config of some kind and it's error handling badly
haxrbyte has joined #ruby
gyre008 has quit [Remote host closed the connection]
<bnagy>
Integer( blah ) is a convention people use to make sure something they expect to be convertible to an int really is
gyre007 has joined #ruby
haxrbyte_ has joined #ruby
tonini has quit [Remote host closed the connection]
slainer6_ has joined #ruby
timmow_ has quit [Ping timeout: 252 seconds]
dustint has joined #ruby
haxrbyte has quit [Ping timeout: 245 seconds]
jumpei_ has joined #ruby
Squarepy has joined #ruby
slainer68 has quit [Ping timeout: 245 seconds]
jumpei_ has quit [Remote host closed the connection]
jumpei has quit [Ping timeout: 240 seconds]
swex has quit [Remote host closed the connection]
<ant3841>
bnagy: thanks for the input, but I don't think I'm worried about at Integer stuff. I think the drb is the problem.
swex has joined #ruby
nimred has joined #ruby
nimred has quit [Changing host]
nimred has joined #ruby
VSpike has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
<gestahlt>
Damn its so hard to find some good info on how to pipe to stdin
<VSpike>
Hi. I am not a ruby programmer (I use Python, C#, bash...) but I'm trying to compile a ruby project from git ( https://github.com/taskjuggler/TaskJuggler ). I keep getting this error http://sprunge.us/QgGY. Can anyone give me a clue as to where to look for the problem?
Guedes0 has joined #ruby
francisfish has joined #ruby
Zai00 has quit [Read error: Connection reset by peer]
maxmanders has quit [Quit: Computer has gone to sleep.]
Guedes0 has quit [Ping timeout: 256 seconds]
tonini has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
maxmanders has joined #ruby
mhf has quit [Remote host closed the connection]
hemanth has joined #ruby
statarb3 has joined #ruby
statarb3 has joined #ruby
[eDu] has quit [Quit: [eDu]]
lewix has joined #ruby
statarb3 is now known as Proshot
JonnieCache has quit [Quit: Reconnecting]
JonnieCache has joined #ruby
sonda has joined #ruby
<VSpike>
How can I find out if I have rubygems loaded, and what the Gem:: namespace contains?
jnoob22 has joined #ruby
<VSpike>
ah, I see $LOADED_FEATURES could be useful
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
aryasam has joined #ruby
keymone_ has joined #ruby
Al_ has quit [Quit: Al_]
randym_ has joined #ruby
netto has joined #ruby
timmow_ has joined #ruby
DrCode has quit [Remote host closed the connection]
keymone has quit [Ping timeout: 264 seconds]
keymone_ is now known as keymone
danslo has quit [Quit: danslo]
DrCode has joined #ruby
danslo has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
Al_ has joined #ruby
Al_ has quit [Client Quit]
timmow_ has quit [Ping timeout: 252 seconds]
bean__ has joined #ruby
Al_ has joined #ruby
casheew has quit [Read error: Connection reset by peer]
jewing has joined #ruby
yacks has quit [Ping timeout: 240 seconds]
huttan has joined #ruby
wmoxam has joined #ruby
mikecmpbll has joined #ruby
casheew has joined #ruby
chandankumar has joined #ruby
jewing has quit [Remote host closed the connection]
aryasam has quit [Quit: Bye]
Neandre has joined #ruby
JonnieCache has quit [Quit: leaving]
Czupa has joined #ruby
yshh has quit [Remote host closed the connection]
RonScagz has joined #ruby
yacks has joined #ruby
evenix has quit [Remote host closed the connection]
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
binaryplease has quit [Ping timeout: 264 seconds]
evenix has joined #ruby
daniel_- has joined #ruby
Flex has quit [Ping timeout: 245 seconds]
maxmanders has quit [Quit: Computer has gone to sleep.]
yacks has quit [Ping timeout: 264 seconds]
huttan has quit [Ping timeout: 246 seconds]
MarcWeber has joined #ruby
rickmasta has quit [Quit: Leaving...]
robbyoconnor has quit [Ping timeout: 252 seconds]
maxmanders has joined #ruby
casheew has quit [Read error: Connection reset by peer]
<MarcWeber>
s.add_dependency "mime-types", "~> 1" is used by sup. Does this make sense? Which versions are allowed then?
kofno has joined #ruby
huttan has joined #ruby
chussenot has quit [Quit: chussenot]
casheew has joined #ruby
kofno has quit [Read error: Connection reset by peer]
clocKwize has quit [Quit: clocKwize]
tonini has quit [Remote host closed the connection]
dylan` has joined #ruby
kofno has joined #ruby
JeanMertz has joined #ruby
failshell has joined #ruby
nari has quit [Ping timeout: 245 seconds]
dmerrick has joined #ruby
mneorr has quit [Remote host closed the connection]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
mneorr has joined #ruby
casheew has quit [Read error: Connection reset by peer]
maxmanders has quit [Quit: Computer has gone to sleep.]
ngcazz has joined #ruby
haxrbyte has joined #ruby
<ngcazz>
hi
dmerrick has quit [Ping timeout: 255 seconds]
pi3r has quit [Ping timeout: 245 seconds]
chandankumar has quit [Quit: Leaving]
casheew has joined #ruby
yacks has joined #ruby
newUser1234 has joined #ruby
casheew has quit [Read error: Connection reset by peer]
thebastl has quit [Read error: No route to host]
thebastl has joined #ruby
jumpei has joined #ruby
chichouw has quit [Remote host closed the connection]
<Hanmac1>
MarcWeber: 1.* but not 2.*
haxrbyte has quit [Ping timeout: 240 seconds]
xll11 has joined #ruby
new299_ is now known as new299
<xll11>
any tutorial on creating a simple ruby project? I want to piece together everything I learned ;p
newUser1234 has quit [Remote host closed the connection]
casheew has joined #ruby
fjfish has joined #ruby
francisfish has quit [Ping timeout: 240 seconds]
postmodern has quit [Quit: Leaving]
dustint has quit [Ping timeout: 240 seconds]
drale2k has quit [Quit: Leaving...]
thebastl has quit [Read error: Operation timed out]
Xeago has quit [Remote host closed the connection]
dmerrick has joined #ruby
skattyadz has joined #ruby
ryanh has joined #ruby
headius has quit [Ping timeout: 264 seconds]
newUser1234 has joined #ruby
kornnflake has quit [Read error: Operation timed out]
Morkel has joined #ruby
kornnflake has joined #ruby
<unflores>
xll11: I don't really have a tutorial for you, but https://github.com/jnunemaker/httparty is not insanely complex and it is a pretty standard layout.
huttan has quit [Quit: leaving]
huttan has joined #ruby
girija has quit [Ping timeout: 245 seconds]
sepp2k has joined #ruby
dmerrick has quit [Ping timeout: 255 seconds]
moos3 has joined #ruby
pi3r has joined #ruby
daniel_- has quit [Ping timeout: 264 seconds]
wmoxam has quit [Ping timeout: 260 seconds]
Xeago has joined #ruby
grzywacz has quit [Quit: :wq]
dimka has joined #ruby
jon_w has joined #ruby
jon_w has quit [Max SendQ exceeded]
camilasan has joined #ruby
jon_w has joined #ruby
jon_w has quit [Max SendQ exceeded]
headius has joined #ruby
jon_w has joined #ruby
LennyLinux has joined #ruby
ananthakumaran1 has joined #ruby
timmow_ has joined #ruby
chichou has joined #ruby
justsee has quit [Ping timeout: 240 seconds]
ananthakumaran has quit [Ping timeout: 255 seconds]
brhelwig has quit [Remote host closed the connection]
DonRichie has quit [Ping timeout: 260 seconds]
DonRichie has joined #ruby
drale2k has joined #ruby
timmow_ has quit [Ping timeout: 252 seconds]
vbajpai has quit [Ping timeout: 256 seconds]
m8 has joined #ruby
girija has joined #ruby
<VSpike>
Hanmac1: thanks for the help! got it fixed
<VSpike>
It was stupid in the end. Their install docs referenced an old git repo that's out of date, but only a bit (so it looked valid initially) but the main github repo had been modified to work with 2.0.0
haxrbyte has joined #ruby
VSpike has left #ruby ["WeeChat 0.3.5"]
failshell has quit [Remote host closed the connection]
keyword has joined #ruby
nari has joined #ruby
<keyword>
hi there I have a question I made a code for test proixies with events and sometime return true and sometimes false for proxies that are working is really wierd anyone can helpme? this is the code http://pastie.org/private/aclam9prtdjkwmu3d8c6w
divout has quit [Remote host closed the connection]
chussenot has joined #ruby
headius has quit [Ping timeout: 252 seconds]
haxrbyte_ has joined #ruby
tonini has joined #ruby
j3roen has joined #ruby
failshell has joined #ruby
EPIK has quit [Ping timeout: 245 seconds]
haxrbyte has quit [Ping timeout: 256 seconds]
justsee has joined #ruby
<Hanmac1>
did someone used the observer stuff from stdlib? i want that one object can emit multible events
miso1337 has quit [Quit: afk]
jumpei has quit [Remote host closed the connection]
mark_locklear has joined #ruby
Hanmac2 has joined #ruby
obs has joined #ruby
failshel_ has joined #ruby
huoxito has quit [Ping timeout: 245 seconds]
yshh has joined #ruby
Hanmac has quit [Ping timeout: 258 seconds]
newUser1234 has quit [Remote host closed the connection]
failshell has quit [Ping timeout: 258 seconds]
<xll11>
how can I check if an element is the last in the array?
<tobiasvl>
element == array.last
bean__ has quit [Quit: Computer has gone to sleep.]
tish has quit [Quit: Leaving.]
yshh has quit [Ping timeout: 258 seconds]
<xll11>
array.each { |x| if x==x.last }
<xll11>
but this will give me every object in the array which equals to the last array
<xll11>
i want to know when I reached the last index of the array
<Xeago>
xll11: why?
<Xeago>
give us some more context code
<keyword>
anyione?
<xll11>
I just have a method that prints out an array word by word, and I wanna add spaces between every word, unless its the last element of the array - because then ill have extra space
<Xeago>
xll11: array.join ' '
<apeiros>
xll11: also for future reference - checking each iteration whether you're on the last item is a bad solution
<apeiros>
you iterate for array[0..-2] (all but the last) and then deal with array.last separately
JamesLever has joined #ruby
tsipanov has joined #ruby
<xll11>
words.each { |x|
<xll11>
if x == redact.each { |y| y }
idkazuma has joined #ruby
<xll11>
why isn't this bit of code good for seeing if a element in words array is located on element in redact array?
brhelwig has joined #ruby
bean__ has joined #ruby
hogeo has quit [Remote host closed the connection]
<apeiros>
xll11: since .each returns the receiver, `if x == redact.each { |y| y }` is the same as `if x == redact`
geekbri has joined #ruby
<JamesLever>
Hi, I am writing a graphical ruby program with TK and have problems with running a loop in the background. There is one button that should start a while loop in the background, but this blocks the TK program from reacting. Do you know any way to integrate the loop in the mainloop or somehow allow a loop without freezing the window?
<apeiros>
and since x is presumably a word (bad variable naming btw., `x` says nothing) and thus not an array, it's probably equivalent to `if false`
ngcazz has quit [Ping timeout: 245 seconds]
pskosinski has joined #ruby
<apeiros>
and that, of course, makes no sense
<Hanmac1>
apeiros: did you use the oberserver module from stdlib?
<apeiros>
Hanmac1: only once to try it
shade88 has quit [Remote host closed the connection]
<xll11>
apeiros how would you approach it
<apeiros>
xll11: see Array#include?
lewix has quit [Remote host closed the connection]
NiteRain has quit [Ping timeout: 252 seconds]
<xll11>
apeiros thanks, looks like what I need
<xll11>
words.each { |x|
<xll11>
if redact.include?(x)
<xll11>
print "REDACTED "
<xll11>
this returns true always, for some reason
<JamesLever>
I am quite new to GUI programming, and have pretty much no idea, how to start a background prozess in a GUI-window, without freezing it at the same time
<JamesLever>
Any tipps and ideas could help a lot
brhelwig has quit [Ping timeout: 246 seconds]
dhruvasagar has quit [Ping timeout: 245 seconds]
idkazuma has quit [Remote host closed the connection]
ttt has quit [Remote host closed the connection]
<Xeago>
xll11: try looking into gsub/regex/replacing instead
divout has joined #ruby
<Xeago>
if words match anything in redact, replace with REDACTED instead
coldie has joined #ruby
<Xeago>
my ruby-fu is not advanced enough to write you that but that would look like a better solution to me
invisime has joined #ruby
haxrbyte has joined #ruby
haxrbyte_ has quit [Read error: Connection reset by peer]
<obs>
jamesLever i don't use TK in general for not freeze the program with the GUI, the GUI is one thread and the programs operations others threads
<obs>
if you use all in the same thread the operations wait to gui thread ending
JonnieCache has joined #ruby
<JamesLever>
obs: so you recommend just to start another thread?
<apeiros>
xll11: that's not an actionable question.
j3roen has quit [Read error: Connection reset by peer]
<apeiros>
xll11: if you want help, describe your problem properly. use gist.github.com to provide a copy of code which we can run. state what you expect the code to do. state what the code does instead for you.
tsipanov has quit [Remote host closed the connection]
<obs>
yes, one thread for the GUI and other thread for operations etc...for example if you view the code generated by eclipse or netbeans when you create a new window application is create a thread for the main GUI
<obs>
automatically
gyre008 has joined #ruby
IrishGringo has joined #ruby
tsipanov has joined #ruby
krawchyk has joined #ruby
<JamesLever>
obs, thank you very much! This works great. I kind of assumed that ruby doesn't have threads as it doesn't support many cores in its standard interpretator
gyre008 has quit [Read error: Connection reset by peer]
gyre008 has joined #ruby
carloslopes has joined #ruby
maxmanders has joined #ruby
gyre007 has quit [Ping timeout: 258 seconds]
tsipanov has quit [Remote host closed the connection]
<obs>
JamesLever, i want you see the picture that explain...the thread structure in ruby green threads->gil->ruby interpreter->kernel, is interesting
tsipanov has joined #ruby
<Xeago>
Which of these are a better fit as part of a cover letter?
monkegjinni has quit [Read error: Connection reset by peer]
<Xeago>
After meeting my Swedish girlfriend 3 years ago I decided to do finish my education with an internship abroad. With that concluded I decided to stay here and migrate. I have already received a permit and my Swedish personal number and require no government paperwork to start.
<Xeago>
Having been in Sweden to finish my education with an internship abroad, I have decided to migrate and live with my girlfriend in Sweden. I have already received a permit and my Swedish personal number and require no government paperwork to start.
monkegjinni has joined #ruby
danslo has joined #ruby
snowyrooftops has quit [Quit: Leaving]
<Xeago>
should be "Having been in Sweden to finish my education with an internship abroad for 7 months, I have decided to migrate and live with my girlfriend in Sweden. I have already received a permit and my Swedish personal number and require no government paperwork to start."
hiyakashi has joined #ruby
rdark has quit [Ping timeout: 240 seconds]
<Xeago>
bah, my c/p'ing today is awful
jnoob22 has quit [Remote host closed the connection]
<xll11>
apeiros still don't understand - words, redact both are arrays, I apply .each on words { |x| ... }, and I ask for redact, for each x, if there exists a similiar pair to it
<BlakeRG>
I was under the assumption that gems can be installed in the current directory or in a global location just like node packages. I am incorrect about that assumption?
tsipanov has quit [Remote host closed the connection]
<BlakeRG>
How can i figure out *where* my gems are installed, i can install/uninstall them but i'd like to know where they're being installed to
justsee has quit [Ping timeout: 252 seconds]
Coolhand has joined #ruby
kofno has quit [Remote host closed the connection]
thebastl has joined #ruby
<Hanmac1>
BlakeRG: gem contents gemname
ph^ has quit [Ping timeout: 240 seconds]
kofno has joined #ruby
dmerrick has quit [Ping timeout: 258 seconds]
swex has joined #ruby
tommyvyo has joined #ruby
tish has joined #ruby
drale2k has joined #ruby
nplusp has joined #ruby
puppeh has quit [Remote host closed the connection]
Flex has joined #ruby
<obs>
if you install gems gem install sinatra for example this will be installed on your ruby path if you want unistall use gem uninstall sinatra
puppeh has joined #ruby
cmarques has joined #ruby
akashj87 has joined #ruby
pi3r has joined #ruby
<obs>
you can use also bundler for install your gems from a Gemfile
tsipanov has joined #ruby
jankly has joined #ruby
monkegji_ has joined #ruby
jtharris has joined #ruby
monkegjinni has quit [Ping timeout: 240 seconds]
jankly is now known as memborsky
bitZero__ has joined #ruby
ttt has joined #ruby
JamesLever has quit [Quit: Page closed]
jhn has joined #ruby
arya_ has joined #ruby
j3roen has joined #ruby
<Hanmac1>
BlakeRG: its Gem::Specification.find_by_name(gemname).gem_dir
wolcanus has joined #ruby
jpfuentes2 has joined #ruby
I-Phone-5 has joined #ruby
arya has quit [Ping timeout: 248 seconds]
timeout has joined #ruby
<BlakeRG>
obs: bundler just reads the gemfile and installs all of the dependancies there?
<BlakeRG>
Hanmac1: i figured out what i needed: `gem environment`
arya has joined #ruby
danslo has quit [Quit: danslo]
<Hanmac1>
BlakeRG: some gems like rake might be at different locations
ananthakumaran1 has quit [Quit: Leaving.]
ttt has quit [Ping timeout: 276 seconds]
arya_ has quit [Ping timeout: 245 seconds]
rosster has quit [Ping timeout: 255 seconds]
v0n has joined #ruby
<BlakeRG>
i have two gem paths
<BlakeRG>
libexec/lib/ruby/gems/shared and ~/.gem/jruby/1.9
<BlakeRG>
what flag should i use when installing a gem to specify if i want it installed globally or locally?
timmow_ has joined #ruby
<BlakeRG>
sorry guys, the getting started guides dont make this apparent or else i would not be here asking :P
sailias has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
threesome has quit [Ping timeout: 264 seconds]
rosster has joined #ruby
<spike|spiegel>
BlakeRG: set GEM_HOME env variable to be sure... rubygems gets greedy and tries to use sudo when you didn't ask it to
threesome has joined #ruby
atyz has joined #ruby
girija has quit [Ping timeout: 240 seconds]
interactionjaxsn has joined #ruby
keks has joined #ruby
<keks>
hi, what is the reason that doesn't URI::escape doesn't escape ampersand?
timmow_ has quit [Ping timeout: 252 seconds]
<spike|spiegel>
keks: looking for CGI.escape?
<BlakeRG>
When i run bundle install inside of a project for example, the gems will be installed in my GEM_HOME and not inside the project folder right?
<keks>
I know this function exists
tonini has quit [Remote host closed the connection]
<keks>
but why do you make a practically useless function and give it the name everyone searches for?
Nuck has quit [Ping timeout: 245 seconds]
Nuck has joined #ruby
<keks>
I know I look for CGI::escape, but what is URI::escape good for?
sayan has joined #ruby
<obs>
blakeRG if you want, you can use rbenv or rvm for manage ruby and jruby versions, this programs efforts you instal several versions of ruby and change between him fast and easily, i personally prefer and use rbenv, the system paths and variables are reconfigurated automatically https://rvm.io/https://github.com/sstephenson/rbenv and this is the bundle help http://pastebin.com/qV7mymXf
mercwithamouth has joined #ruby
<keks>
noone?
codecop has quit [Quit: Išeinu]
csexton- is now known as csexton
maxmanders has joined #ruby
sayan has quit [Read error: Connection reset by peer]
<bean>
URI.escape takes a string and an optional "unsafe" paramter, which by default is REGEXP::UNSAFE
<linduxed>
so coming from haskell, my solution to this http://projecteuler.net/problem=1 would be to generate all a list with all the numbers, then filter away those that aren't multiples, then finally sum all the elements in the list
<keks>
which is I'm feeling lucky
idkazuma has quit [Remote host closed the connection]
<keks>
you have to URLescape that
newUser1234 has joined #ruby
<linduxed>
i'm wondering, since i know it can be done many ways in ruby, what the recommended way would be to do it in ruby?
<keks>
and in the end the redirecter gets the btnI parameter and ignores it
sambio has quit []
<linduxed>
do i do it iteratively with a for loop?
<keks>
bean: i just cgi#escape everything and it's fine
jumpei has joined #ruby
<bean>
k
BlakeRG has left #ruby [#ruby]
Heero has joined #ruby
Heero has quit [Changing host]
Heero has joined #ruby
<shevy>
it is basically always the same - you run a method, on your dataset, and inside the block, use your criteria (or, you pass it through a method that you defined on your own, remember ruby is flexible, you can modify everything at runtime if you want to)
wsterling has joined #ruby
Al_ has quit [Ping timeout: 252 seconds]
<keks>
i just don't see the point of uri#escape just escaping 50% of the relevant characters
<linduxed>
shevy: looong ago i needed to register on linuxforums.org and couldn't find a name that wasn't already taken, one of those was "linuxed". as a young nerd i had fallen in love with the system
bean__ has quit [Max SendQ exceeded]
jumpei has quit [Remote host closed the connection]
nplusp has quit [Ping timeout: 256 seconds]
bean__ has joined #ruby
bean__ has quit [Max SendQ exceeded]
<linduxed>
shevy: _obviously_ that name was taken though, so i decided that "popping in a consonant somewhere won't hurt, will be the next best thing"
<linduxed>
shevy: turns out i accidentally made up a name that is pretty much unique if one is to believe google
bean__ has joined #ruby
bean__ has quit [Max SendQ exceeded]
<shevy>
linduxed ah ok
LennyLinux has joined #ruby
bean__ has joined #ruby
bean__ has quit [Max SendQ exceeded]
<linduxed>
shevy: to the point that if i try to register on a site and it says the name isn't available, it's a reminder that i've registered before and forgotten about it :-)
<shevy>
people can have the strangest reasons to pick irc names :D
bean__ has joined #ruby
newUser1234 has quit [Remote host closed the connection]
<linduxed>
shevy: they sure do
yshh has quit [Remote host closed the connection]
edenc has quit [Changing host]
edenc has joined #ruby
<waxjar>
i looked around my room, saw a little jar of hair wax
<waxjar>
that's my story
lewix has quit [Remote host closed the connection]
I-Phone-5 has left #ruby [#ruby]
yshh has joined #ruby
acrussell has joined #ruby
<linduxed>
waxjar: decent though
<linduxed>
simple
tootooroo has quit [Ping timeout: 276 seconds]
<linduxed>
will get taken in some cases however
dylan` has joined #ruby
<shevy>
waxjar really?????
<waxjar>
yup. haha
<shevy>
waxjar hahaha cool
netto has quit [Quit: netto]
<shevy>
I heard that before though... people looking around their computer in order to pick up a name to register
lewix has joined #ruby
jmaya has joined #ruby
RagingDave has joined #ruby
<shevy>
I think the most common is for people to pick something related to their real name, like Hanmac1 here
nari has quit [Ping timeout: 260 seconds]
<linduxed>
if i've got this line (1..max).to_a.select { |i| i % 3 == 0 or i % 5 == 0 }, how could i make it read an array of numbers instead of me hard coding that 3 and 5?
strax_ is now known as strax
gyre007 has joined #ruby
braoru has quit [Quit: Leaving]
<waxjar>
#select { |i| [3,5].all { |j| i % j == 0 } } something like that?
etank has joined #ruby
<waxjar>
eh, nevermind
gyre008 has quit [Ping timeout: 258 seconds]
elux has joined #ruby
<Hanmac1>
linduxed dont use to_a and also look at upto
<waxjar>
#all it is
<waxjar>
* #all?
Arzaga has joined #ruby
<Hanmac1>
waxjar: hm no its any?
<waxjar>
oh right, there's an or in there
awarner_ has quit [Remote host closed the connection]
tmiller has joined #ruby
haxrbyte has joined #ruby
tmiller has quit [Remote host closed the connection]
<acrussell>
then you run something else that is looking specifically at /usr/bin/ruby … the system version which is at 1.8.7
heliumsocket has joined #ruby
<samuelj>
acrussell: I have /opt/local/bin before /usr/local/Cellar/ruby...
<linduxed>
"outputs" is probably a better description
chrisnicola has joined #ruby
<Hanmac1>
linduxed: you miss a function after the upto()
<acrussell>
samuelj: find out where this 1.8.7 ruby is and then either uninstall it or move it out of your path or possibly make a symlink with the same name to the ruby you really want
freakazoid0223 has joined #ruby
<linduxed>
Hanmac1: oh, isn't that what the bracketed stuff is for?
<linduxed>
Hanmac1: i see
swingha has joined #ruby
TorpedoSkyline has joined #ruby
<linduxed>
Hanmac1: i'll try to fix it
dhruvasagar has joined #ruby
CamonZ has joined #ruby
<samuelj>
acrussell: I can't uninstall it, I'll remove it from the path. Good idea, thanks
unstable has quit [Ping timeout: 264 seconds]
tmiller has joined #ruby
HemeDroid has quit [Read error: Connection reset by peer]
<linduxed>
Hanmac1: yeah, just added a select and that did the trick, thx
HemeDroid has joined #ruby
<samuelj>
acrussell: Oh, I can't remove it from the path, could I reorder the path so the brew version is found first?
timmow_ has quit [Ping timeout: 252 seconds]
unstable has joined #ruby
jurassic has joined #ruby
heliumsocket has quit [Client Quit]
stef_204 has quit [Remote host closed the connection]
<acrussell>
samuelj: yes, that is an option. Just put the one you want as far to the left as posisble
monkegjinni has joined #ruby
jhn has quit [Ping timeout: 245 seconds]
<acrussell>
to lthe left of the one you don't want
netto has joined #ruby
chandankumar has joined #ruby
<samuelj>
acrussell: The one I want is /usr/local/bin/ruby, which is already to the left of /usr/bin/ruby
heliumsocket has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
jumpei has joined #ruby
<samuelj>
acrussell: Managed to fix it, reordering seemed to work, though I'm not sure how?
xll11 has joined #ruby
<xll11>
when building a class
ExxKA has quit [Read error: Connection reset by peer]
<xll11>
...
<xll11>
private
<xll11>
method 1
<xll11>
method 2
jumpei has quit [Remote host closed the connection]
<acrussell>
samuelj: as a test mv /usr/bin/ruby /usr/bin/ruby.bak and then ln -s /usr/loca/bin/ruby /usr/bin/ruby
<xll11>
both method 1 and 2 would be private, or would I need to use private again before method 2?
<acrussell>
samuelj: ah ok!
jurassic has quit [Quit: jurassic]
jumpei has joined #ruby
a_a_g has joined #ruby
ShellFu is now known as ShellFu_brb
<acrussell>
samuelj: disregard my lats message, sent before I saw your success. Congrats on getting it to work.
GhettoCode has joined #ruby
daniel_- has joined #ruby
jumpei has quit [Remote host closed the connection]
jurassic has joined #ruby
zmike123 has joined #ruby
beiter has joined #ruby
jumpei has joined #ruby
jumpei has quit [Remote host closed the connection]
heliumsocket has quit [Quit: heliumsocket]
zmike123 has quit [Read error: Connection reset by peer]
Quebert has joined #ruby
rickmasta has joined #ruby
Guedes has quit [Read error: Connection reset by peer]
ShellFu_brb is now known as ShellFu
heliumsocket has joined #ruby
nns_neso[ has joined #ruby
nns_neso[ has quit [Remote host closed the connection]
camilasan has quit [Remote host closed the connection]
v0n has quit [Ping timeout: 252 seconds]
jonahR has joined #ruby
Morkel has quit [Quit: Morkel]
buscon has quit [Quit: Leaving]
swex has joined #ruby
threesome has quit [Ping timeout: 248 seconds]
etank has quit [Quit: WeeChat 0.4.0]
freeayu has quit [Remote host closed the connection]
cburyta has joined #ruby
xbob has joined #ruby
one8zero has joined #ruby
etank has joined #ruby
pduin has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
mahmoudimus has joined #ruby
dmerrick has joined #ruby
bricker`1A has joined #ruby
sambio has joined #ruby
sambio has quit [Changing host]
sambio has joined #ruby
momomomomo has quit [Quit: momomomomo]
cmarques has quit [Ping timeout: 240 seconds]
jumpei has joined #ruby
Hanmac1 has quit [Ping timeout: 246 seconds]
pitzips has joined #ruby
monkegji_ has joined #ruby
carloslopes has quit [Remote host closed the connection]
nateberkopec has joined #ruby
baroquebobcat has quit [Client Quit]
havenwood has joined #ruby
bricker`LA has quit [Ping timeout: 260 seconds]
gaahrdner has quit [Remote host closed the connection]
gaahrdner has joined #ruby
momomomomo has joined #ruby
wolcanus has quit [Remote host closed the connection]
monkegjinni has quit [Ping timeout: 264 seconds]
tubbo has left #ruby [#ruby]
pydave6367 has quit [Ping timeout: 256 seconds]
<xll11>
I want to build a gui program that connects to a database and able to CRUD entries
<xll11>
!
<xll11>
where should I begin
LennyLinux has joined #ruby
<apeiros>
divide and conquer
etcetera has joined #ruby
alex__c2022 has joined #ruby
<apeiros>
make small problems of that big problem. solve those individually. then put it together.
<banisterfiend>
xll11: sounds like u want a front-end to a db, there's lots of them that exist :)
<banisterfiend>
like 'sqlite data browser'
daniel_- has quit [Ping timeout: 264 seconds]
[eDu] has joined #ruby
speakingcode-wor has joined #ruby
jumpei has quit [Ping timeout: 240 seconds]
apeiros has quit [Remote host closed the connection]
Es0teric has joined #ruby
<lewix>
xll11: you don't need to use private again
<speakingcode-wor>
anyone have experience with the rss package? i'm able to use the RSS:Maker class to make an rss feed. when i puts the output of RSS::Maker.make my xml looks fine, but when i wrap it in sinatra get block, and output back that object, it's blank
monkegji_ has quit [Remote host closed the connection]
zeroeth has joined #ruby
nplusp has quit [Read error: Operation timed out]
jumpei has joined #ruby
jurassic has quit [Quit: jurassic]
a_a_g has quit [Quit: Leaving.]
bean__ has quit [Quit: Computer has gone to sleep.]
monkegjinni has joined #ruby
jumpei_ has quit [Ping timeout: 256 seconds]
tootooroo has joined #ruby
sayan has quit [Read error: Connection reset by peer]
whitedawg has quit [Quit: Leaving.]
tootooroo has quit [Client Quit]
RORgasm_ is now known as RORgasm
<Xeago>
seperate line 9
HemeDroid has quit [Ping timeout: 255 seconds]
huoxito has quit [Quit: Leaving]
bean__ has joined #ruby
Es0teric has joined #ruby
<Xeago>
maybe do it differently: not have it accept a max
tootooroo has joined #ruby
<xll11>
1.9.3 or 2.0.0?
wolcanus has joined #ruby
<Xeago>
2.0.0 for new code
<Xeago>
generally
ixti has joined #ruby
ixti has quit [Client Quit]
ixti has joined #ruby
tootooroo has quit [Client Quit]
Yakko has joined #ruby
daniel_- has joined #ruby
bradleyprice has joined #ruby
mikepack has joined #ruby
heliumsocket has quit [Quit: heliumsocket]
<xll11>
Aha, thanks! Any recommendations on how to attach a database to my program?
JMcAfreak has quit [Remote host closed the connection]
newUser1234 has joined #ruby
whitedawg has joined #ruby
girija has joined #ruby
<MrZYX>
depends on your database and your program ;P
maxmanders has quit [Quit: Computer has gone to sleep.]
heliumsocket has joined #ruby
<xll11>
I want to make a standalone program to manage my favourite movies for example
<xll11>
just a exe i open
xll11 has left #ruby [#ruby]
xll11 has joined #ruby
<MrZYX>
how many entities? just movies? or also ratings etc?
NiteRain has joined #ruby
choobie has quit [Read error: Connection reset by peer]
Asher has quit [Read error: Connection reset by peer]
mechcozmo has joined #ruby
<xll11>
lets say column1/column2/column3/...column10
vlad_starkov has joined #ruby
carloslopes has joined #ruby
<mechcozmo>
Hello, are there some good websites that I can read through to learn Ruby?
maletor has joined #ruby
<MrZYX>
xll11: I can't really say that answers my question...
Asher has joined #ruby
lusory has quit [Quit: leaving]
<mechcozmo>
I used it a couple of years ago, so I'm familiar with the basics of the language and remember most of the syntax, but I'd like to get back into it.
<xll11>
well each column is a entity
<MrZYX>
nope
<xll11>
or maybe I got entity wrong? :o
<xll11>
define entity? a table?
<MrZYX>
an entity would something like a movie
<MrZYX>
usually represented through a table/relation
jumpei has quit [Remote host closed the connection]
<waxjar>
it's more of a quick overview / introduction, but it sounds like that's what you need :)
timmow_ has joined #ruby
<MrZYX>
xll11: the columns would be attributes of the entity, like title, year etc
<mechcozmo>
waxjar: Thanks
wolcanus has quit [Remote host closed the connection]
maxmanders has joined #ruby
<mechcozmo>
waxjar: Should I worry about the differences between 1.9 and 2.0?
wolcanus has joined #ruby
keymone has quit [Quit: keymone]
<waxjar>
nope, 2.0 is backwards compatible :)
keymone has joined #ruby
Vainoharhainen has quit [Quit: Leaving...]
rafa2000 has joined #ruby
rafa2000 has left #ruby [#ruby]
<mechcozmo>
Ok; I guess what I was getting at is, are there things that I would be better off learning the 2.0 way versus the 1.9-or-older way?
chrisnicola has quit [Quit: This computer has gone to sleep]
threesome has joined #ruby
<MrZYX>
why start learning outdated stuff? ;)
<bean__>
xll11: ruby won't likely make a .exe ;)
<mechcozmo>
MrZYX: because the site waxjar linked me to seems to be older than 2.0, so I may inadvertently be learning something outdated without knowing it
Voodoofish430 has joined #ruby
tomzx_mac has joined #ruby
anonymuse has joined #ruby
tomzx_mac has quit [Client Quit]
jamie_ca_ has joined #ruby
timmow_ has quit [Ping timeout: 252 seconds]
carloslopes has quit [Ping timeout: 252 seconds]
<MrZYX>
well, as already said 2.0 and 1.9 are largely compatible, 2.0 mostly adds new stuffs and removes some that's already deprecated in 1.9
uxp_ is now known as uxp
<mechcozmo>
So basically, stop worrying about this until I know enough to worry.
pydave6367 has joined #ruby
<MrZYX>
probably the biggest change between the two is that 2.0 supports keyword arguments now
<waxjar>
yup
swingha has quit [Quit: WeeChat 0.4.0]
unstable has quit [Ping timeout: 245 seconds]
robbyoconnor has joined #ruby
momomomomo has joined #ruby
sayan has joined #ruby
<havenwood>
mechcozmo: Basically, think of 1.9.3 as a release candidates for 2.0. If it runs on 1.9, it runs better on 2.0.
unstable has joined #ruby
<mechcozmo>
I don't even know what keyword arguments are :-P
<havenwood>
mechcozmo: If you learn 1.9, it isn't much further to learn 2.0.
<havenwood>
mechcozmo: kwargs
invisime has quit [Quit: Leaving.]
heliumsocket has quit [Quit: heliumsocket]
momomomomo has quit [Client Quit]
heliumsocket has joined #ruby
<havenwood>
2.0 has #lazy, %i, kwargs, neutered refinements, a few txt processing tweaks, uses utf-8 encoding, etc.
<spider-mario>
I’d rather say that 2.0’s biggest changes are refinements, lazy enumerator methods and UTF-8 by default
obs has quit [Quit: Konversation terminated!]
Flex has quit [Remote host closed the connection]
<mechcozmo>
Thanks
<MrZYX>
refinements aren't finalized yet, so I wouldn't use them in production code
<MrZYX>
you even get a warning about that
Tarential has quit [Excess Flood]
Tarential has joined #ruby
obs has joined #ruby
bulters has quit [Quit: Lost terminal]
<havenwood>
2.1 gets mandatory kwargs, dunno what else.
pydave6367 has quit [Ping timeout: 264 seconds]
moos3 has quit [Ping timeout: 252 seconds]
huoxito has joined #ruby
pioz has quit [Quit: This computer has gone to sleep]
<bean__>
mandatory kwargs :(
camilasan has joined #ruby
<waxjar>
does that mean that all arguments have to be keyword arguments?
<spider-mario>
no
<spider-mario>
it must mean you can have keyword arguments that are mandatory
<spider-mario>
right now kwargs must have a default value
<MrZYX>
hm what will be the syntax for that?
chrishough has quit [Quit: chrishough]
<waxjar>
aah, phew :P
rdev has joined #ruby
rdev is now known as rdev5
<spider-mario>
Perl6’s is :var
<spider-mario>
sub blah(Int :$count) {}
<spider-mario>
blah(count => 42);
theRoUS has quit [Ping timeout: 256 seconds]
choobie has joined #ruby
choobie has joined #ruby
choobie has quit [Changing host]
<spider-mario>
(in the sub’s body, the variable is simply referred to as $count, not :$count)
<spider-mario>
(and the Int type annotation is optional)
chrishough has joined #ruby
robscomputer_ has joined #ruby
randomautomator has joined #ruby
filipe has quit [Remote host closed the connection]
tmiller has quit [Remote host closed the connection]
pygmael has quit [Quit: pygmael]
hiroyuki has joined #ruby
tmiller has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
<xll11>
wow
<xll11>
ruby gems is so awesome
<xll11>
:o
<havenwood>
Yeah, I phrased that poorly. I meant arity-sensitive keyword arguments.
uris has joined #ruby
cpk_ has joined #ruby
yshh has quit [Read error: Connection reset by peer]
skattyadz has quit [Quit: skattyadz]
<xll11>
Anyone who now opens my exe will be able to run my program? or some framework needs to be instlaled?
jekotia has joined #ruby
mando has joined #ruby
wudofyr_ has quit [Remote host closed the connection]
wudofyr_ has joined #ruby
<MrZYX>
what exe?
jrajav has joined #ruby
<xll11>
sorry, a .rb file made executeable by using the 'ocra' gem
netto_ has joined #ruby
<MrZYX>
well it advertises itself as needing no additional stuff installed
yshh has joined #ruby
<xll11>
im really starting to like ruby
<xll11>
i hope my java wont suffer from it :p
martinklepsch has quit [Ping timeout: 252 seconds]
nightfalcon has quit [Ping timeout: 240 seconds]
netto has quit [Ping timeout: 245 seconds]
netto_ is now known as netto
mpfundstein has quit [Remote host closed the connection]
fjfish has quit [Remote host closed the connection]
<bean__>
KarlHungus: does it not need that to know what type of object is below it?
chussenot has quit [Quit: chussenot]
arturaz has quit [Ping timeout: 245 seconds]
hashbangchris has joined #ruby
maletor has joined #ruby
<KarlHungus>
bean__: it does, but the data i'm serializing are mostly primitives and i'm consuming the yaml in python on the other side
bigoldrock has joined #ruby
dmiller1 has joined #ruby
chrishough has quit [Quit: chrishough]
<JonnieCache>
KarlHungus: maybe json would be a better choice
<KarlHungus>
during process some of the data is converted to other classes. ideally, i'd have to_yaml methods on these classes to clean up the output, but they're in libs i'm using and that would rapidly become unmaintainable
<JonnieCache>
in fact i'll put it more strongly: use json
<KarlHungus>
JonnieCache: if i could fork and modify the python consumer, i would ;P
theRoUS has joined #ruby
<JonnieCache>
ah shit
theRoUS has quit [Changing host]
theRoUS has joined #ruby
zeade has joined #ruby
<JonnieCache>
which python software is this that accepts yaml from outside and parses it?
mljsimone has joined #ruby
d2dchat has joined #ruby
<KarlHungus>
JonnieCache: i'm generating config files in yaml
`brendan has joined #ruby
alexyz has quit [Remote host closed the connection]
<JonnieCache>
ok so theyre not going in over http or anything
robscomputer_ has quit [Remote host closed the connection]
<JonnieCache>
because we know where that leads
monkegjinni has quit [Read error: Connection reset by peer]
<KarlHungus>
nope. that would be hideous ;)
<KarlHungus>
i promise i'm not crazy! just bumping up against an ugly edge case
slainer68 has quit [Remote host closed the connection]
<JonnieCache>
oh no i quite understand.
<linduxed>
is there a way to do [1,3,5,7,9] by writing something like (1,3..10)?
beneggett has joined #ruby
* JonnieCache
has written some ugly ruby code to generate even uglier nagios config files in the past
monkegjinni has joined #ruby
alup has quit [Quit: Leaving]
<JonnieCache>
KarlHungus: i was actually referring to the recent yamlgate Bdebacle
<xll11>
JonnieCache thanks
<KarlHungus>
linduxed: 1,(3..10).to_a].flatten
lewix has quit [Remote host closed the connection]
moos3 has joined #ruby
<linduxed>
KarlHungus: i'll try that
<KarlHungus>
JonnieCache: oh, yes. lol
<xll11>
whats DSL?
whitedawg has quit [Quit: Leaving.]
nightfalcon has joined #ruby
<JonnieCache>
domain specific language
Rym has joined #ruby
<JonnieCache>
basically a mini language within another language, something you see a lot in ruby
<evenix>
metaprograming
jdunck has joined #ruby
<linduxed>
KarlHungus: that didn't work, it resulted in [1,3,4,5,6,7,8,9,10]
mafolz has quit [Remote host closed the connection]
drale2k has joined #ruby
cmarques has quit [Quit: Lost terminal]
<evenix>
'A DSL is just an internal or external language used to express and solve a problem. Metaprogramming is a programming tool. DSLs do not rely on metaprogramming (but metaprogramming may be used to implement a DSL).'
<hassans>
Can anyone confirm for me that on integers, .to_f.to_d will return the same as .to_r.to_d? In the ruby cookbook is suggests converting to rational as an intermediate, but I don't see why they don't suggest using float instead, since it's in ruby-core
<bean__>
except that won't work
<bean__>
you'll want to filter.
crimezone20xx has joined #ruby
drale2k has joined #ruby
yashshah- has quit [Remote host closed the connection]
<xll11>
TABLE.where(COLUMN == "parameter").delete
<xll11>
this should work?
benlieb has joined #ruby
<xll11>
JonnieCache <3
yashshah- has joined #ruby
a_a_g has quit [Quit: Leaving.]
jonathanwallace has joined #ruby
<linduxed>
bean__: but that didn't answer why i got the error in my code :-/
<bean__>
nope
<bean__>
it didnt
<bean__>
sorry
<bean__>
i havent had enough sleep
<bean__>
good luck
<linduxed>
ok thx
ShellFu_AFK has quit [Read error: Connection reset by peer]
mljsimone has quit [Remote host closed the connection]
ShellFu1 has joined #ruby
hiroyuki has quit [Read error: Connection reset by peer]
arietis has quit [Quit: Computer has gone to sleep.]
nadirvardar has joined #ruby
duosrx has quit [Remote host closed the connection]
<MrZYX>
linduxed: shift returns the first element of the array, so pool is 5 in the second iteration
<linduxed>
MrZYX: ooooh, i thought that shift returns the rest of the list
failshel_ is now known as failshell
<linduxed>
MrZYX: i wanted what's left after the shift
<MrZYX>
no, shift actually modifies the receiver
duosrx has joined #ruby
tootooroo has joined #ruby
thone_ has joined #ruby
<MrZYX>
so separate the shift into a new line
<MrZYX>
pool.shift
bean__ has quit [Quit: Computer has gone to sleep.]
<linduxed>
MrZYX: ok, i'll try that
jgrevich has joined #ruby
Gnubie_ has joined #ruby
unflores has quit [Quit: unflores]
callmeivan has quit [Ping timeout: 240 seconds]
[eDu] has quit [Quit: [eDu]]
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
br4ndon has joined #ruby
dylan` has quit [Read error: Connection reset by peer]
robbyoconnor has quit [Max SendQ exceeded]
banjara has joined #ruby
thone has quit [Ping timeout: 252 seconds]
robbyoconnor has joined #ruby
rickmasta has joined #ruby
_nitti has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
arya_ has joined #ruby
<xll11>
such a weird error
<xll11>
ERROR: Error installing sqlite3:
<xll11>
ERROR: Failed to build gem native extension.
<xll11>
O_O
keymone has quit [Quit: keymone]
arietis has joined #ruby
banjara has quit [Client Quit]
lewix has quit [Remote host closed the connection]
angusiguess has quit [Ping timeout: 255 seconds]
tylersmith has joined #ruby
marcdel has joined #ruby
<xll11>
ok, apparently I need to install SQLite
twoism_ has joined #ruby
chrishough_ has joined #ruby
chrishough has quit [Ping timeout: 240 seconds]
chrishough_ is now known as chrishough
tevio has quit [Remote host closed the connection]
nomenkun has quit [Ping timeout: 245 seconds]
arya has quit [Ping timeout: 240 seconds]
gaahrdner has quit [Ping timeout: 256 seconds]
robbyoconnor has quit [Remote host closed the connection]
lewix has quit [Read error: Connection reset by peer]
jnoob22_ has joined #ruby
lewix has joined #ruby
pygmael has joined #ruby
nateberkopec has quit [Quit: Leaving...]
mengu has quit [Quit: Konversation terminated!]
pygmael has quit [Client Quit]
mockra has joined #ruby
<otters>
heh, you could give that a shot...
sepp2k has quit [Remote host closed the connection]
Al_ has quit [Quit: Al_]
yashshah__ has joined #ruby
arya has joined #ruby
zwevans has joined #ruby
_nitti has quit [Ping timeout: 240 seconds]
lkba has joined #ruby
jnoob22 has quit [Ping timeout: 264 seconds]
kpshek has joined #ruby
angusiguess has joined #ruby
<fission6>
why am i getting this issue when i try to run bundle install http://dpaste.org/JZJrY/
alvaro_o has joined #ruby
alvaro_o has quit [Read error: Connection reset by peer]
_nitti has joined #ruby
moted has joined #ruby
yashshah- has quit [Ping timeout: 240 seconds]
<interactionjaxsn>
fission6: Gemfile.lock?
ebobby has joined #ruby
TorpedoSkyline has quit [Quit: Computer has gone to… zzzzz...]
<fission6>
i have one
<MrZYX>
fission6: because in your Gemfile you have requested haml 3.2.0.beta.2, and in your Gemfile.lock you have 3.1.6 locked
<MrZYX>
btw haml 4 is out
<fission6>
(i am new to this and trying to get an rails project running, coming from django / python) interactionjaxsn
obs has quit [Quit: Konversation terminated!]
jonahR has joined #ruby
<MrZYX>
if you carefully read the output the solution is already thrown against your head
beneggett has quit [Ping timeout: 245 seconds]
<fission6>
MrZYX: ok - so shouldn't it just adhear to my lock file otherwise why have a lock file
Kirotan has quit [Ping timeout: 256 seconds]
tmiller has joined #ruby
<interactionjaxsn>
fission6: you can run the update command like the error output suggests or rm your Gemfile.lock and run again
<MrZYX>
the lockfile is there so you can be sure a bundle install installs the same versions everywhere, no matter if it's your dev machine or a production server
<xll11>
wow
<xll11>
Anyone using Windows + SQLite gem for Ruby?
<MrZYX>
interactionjaxsn: rm Gemfile.lock is a bad solution
etcetera has joined #ruby
crimezone20xx has quit [Quit: leaving]
<fission6>
"the lockfile is there so you can be sure a bundle install installs the same versions everywhere, no matter if it's your dev machine or a production server" so why wouldn't bundle install follow it though - seems like its contradicting itself
<interactionjaxsn>
MrZYX: noted
Kirotan has joined #ruby
sayan has quit [Read error: Connection reset by peer]
banjara has joined #ruby
<MrZYX>
fission6: in your Gemfile you request the version you want, this can be a minimum, a maximum or no requirement at all
<fission6>
its there to ensure something which is has done - but why not just make the lock and Gemfile the same?
<MrZYX>
the lock specifies the actually currently active version
<fission6>
how do i just use the versions specified in my lock
<MrZYX>
do not request different/higher ones in your Gemfile
<fission6>
thats retarded from the standpoint of a newb but ok
<MrZYX>
it's very useful if the gem you use adheres to SemVer
evenix has quit [Remote host closed the connection]
pioz has joined #ruby
<fission6>
ok
bitcycle has joined #ruby
<MrZYX>
so you can run bundle update and have good chances you get all the new versions that are backwards compatible
nfk has quit [Quit: yawn]
<MrZYX>
but you'd never do that on a production machine
br4ndon has quit [Ping timeout: 245 seconds]
DrShoggoth has quit [Quit: Leaving]
Yakko has quit [Remote host closed the connection]
nateberkopec has joined #ruby
banisterfiend has joined #ruby
monkegjinni has quit [Ping timeout: 245 seconds]
<bitcycle>
Hey all. Can someone advise me on how to get more information on an ssh login error? /usr/lib64/ruby/gems/1.9.1/gems/net-ssh-2.3.0/lib/net/ssh.rb:200:in `start': Net::SSH::AuthenticationFailed from test.rb:3:in `<main>' Here's my script: http://pastebin.com/AQUz1ijp
eliasp has joined #ruby
<bitcycle>
I'm super new to ruby, but in python I could catch the exception and then print the message. Would I do that here, too?
tmiller has quit [Ping timeout: 245 seconds]
lewix has quit [Remote host closed the connection]
<hassans>
bitcycle: it could be you're missing the closing parens
<txdv>
O, clippy, he is the leader of this wicked windows croud
<txdv>
crowd*
nazty has quit [Ping timeout: 260 seconds]
<interactionjaxsn>
txdv: or the dispenser of justice in the context of your DOS powered handgun
<fission6>
ok so now that rvm has totally ruined my terminal, how do i remove it and undo what its done to my command prompt and ls colors
<bean>
rvm implode
<bean>
should remove everything rvm
<bean>
though RVM should not have messed with anything but sourcing RVM
<interactionjaxsn>
fission6: i would suggest using a version manager.
Zai00 has quit [Read error: Connection reset by peer]
<txdv>
download ubuntu, install ubuntu
<fission6>
interactionjaxsn: huh?
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
alexyz has quit [Read error: Connection reset by peer]
ericmathison has joined #ruby
alexyz has joined #ruby
timmow_ has quit [Ping timeout: 252 seconds]
<fission6>
i did rvm implode, still have a messed up prompt and ls colors
<fission6>
if i do source .bashrc i get prompted back
<bean>
did you re-open your terminal
<MrZYX>
fission6: again, ask #rvm
<fission6>
thanks
ericmathison has quit [Remote host closed the connection]
brianpWins has joined #ruby
<txdv>
rvm is a manager for ruby runtimes
gaahrdner has joined #ruby
<txdv>
This channel is about trolling and ruby
<bean>
lol, i try to not troll in here
<interactionjaxsn>
fission6: you are quick to pass judgement on the tool sets. too quick. understand the tool, then make your assesment.
<bean>
unless kids say the word "python"
dmiller1 has joined #ruby
<fission6>
interactionjaxsn: thats fair but first reactions mean a lot towards adoption
Villadelfia has quit [Read error: Operation timed out]
skattyadz has joined #ruby
<fission6>
python virtualenv two seconds to create - nothing in python has every taken as long to explore and install as rvm and def has not touched my bash, etc
<bean>
I used to use RVM, it works alright, I recommend source installing, if you're on a mac you can use brew to install a more current ruby.
timonv has joined #ruby
zeade has quit [Quit: Leaving.]
<bean>
fission6, all rvm does is add a line to your bashrc
SeySayux has quit [Ping timeout: 264 seconds]
<bean>
theres no way it modified colors
<bean>
:|
<fission6>
yet here we stand :(
<wsterling>
Is it possible to access ostruct getters using a variable?
Villadelfia has joined #ruby
agent_white has joined #ruby
<fission6>
and it only two 20 minutes to install and 1 second to delete so i am sure it left trash everywhere
robbyoconnor has quit [Ping timeout: 256 seconds]
<bean>
*sigh* you dont even understand
<agent_white>
Is this the right channel for Watir help?
<bean>
agent_white, this is for ruby in general.
nateberkopec has joined #ruby
<bean>
fission6, what OS are you on?
<Spooner>
wsterling, You can still use ostruct[:meth] = 12
nateberkopec has quit [Client Quit]
<fission6>
bean i am asking in #rvm don't want to take up two channels join there if you'd like too
<wsterling>
Spooner: looking
<interactionjaxsn>
fission6: be an optimist prime, not a negatron
rdark has quit [Quit: leaving]
<bean>
k, then quit talking about python here, cuz its not relevant :)
<Spooner>
wsterling, Don't think that works if you are living in a cave (still on 1.8.7 ;) ).
SeySayux has joined #ruby
<wsterling>
yea, I'm in a cave. Not working
tootooroo has quit [Ping timeout: 245 seconds]
<Spooner>
wsterling, ostruct.send("meth=", 12) or update Ruby ;)
dmiller1 has quit [Ping timeout: 246 seconds]
enebo has joined #ruby
<MrZYX>
Spooner: wrong way around, better alternatives should come first :P
enebo has joined #ruby
<agent_white>
Bean: Roger that!
<fission6>
interactionjaxsn: ha - right now if i was a transformer and my firmware was built in ruby, i would have a bunch of apparently bloated lock files all tell me what version i am and a bunch of cutsy module names and an rvm that took 20 minutes to install just to change my prompts
dqminh has quit [Remote host closed the connection]
<bean>
god, fission6, i've been here a few minutes and you're already annoying this shit out of me. RVM doesn't take 20 minutes to install, nor does it fuck with anything except sourcing stuff so it knows where to find ruby.
robbyoconnor has joined #ruby
perun_ has joined #ruby
<wsterling>
Spooner: Thanks the send method is wht I needed
TorpedoSkyline has joined #ruby
<fission6>
bean install rvm and tell me how long it takes
apeiros has joined #ruby
<MrZYX>
wsterling: no, ruby 2.0 or 1.9 is what you need ;)
<bean>
no thanks.
<fission6>
either way ill calm down just not off to get start
<MrZYX>
wsterling: support for 1.8 will end shortly
kpshek has quit []
<wsterling>
MrZYX: agreed. But I want this to work out of the box on Ubuntu 12.04
TorpedoSkyline has left #ruby [#ruby]
marcdel has quit [Ping timeout: 248 seconds]
<Spooner>
wsterling, There is a Ruby 1.9.3 build on that OS.
tmiller has joined #ruby
<MrZYX>
wsterling: install ruby1.9
<Spooner>
wsterling, ruby1.8 and 1.9.1 should have builds (which are 1.8.7 and 1.9.3)
becom33 has joined #ruby
etcetera has quit []
wargasm has joined #ruby
tootooroo has joined #ruby
<shock_one>
Does somebody know Vala?
<txdv>
Yeah
<agent_white>
Looking to check if a fieldset exists in Watir. Any ideas on best ways to go about it? http://pastebin.com/F55LJ5v8 <- my sad, unfinished attemp.
<Spooner>
failshell, I PMed more info if you need it.
robbyoconnor has quit [Ping timeout: 240 seconds]
arya has quit [Ping timeout: 240 seconds]
jeebster has joined #ruby
whitedawg has joined #ruby
sayan has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
<failshell>
Spooner: thanks
RORgasm has quit [Remote host closed the connection]
hiyakashi has quit [Quit: お前は知りすぎた]
rezzack has joined #ruby
xaq has quit [Remote host closed the connection]
mpfundstein has joined #ruby
arya has joined #ruby
<linduxed>
judging by the solutions presented on the forum and on various pages, i don't think i'll find a quick solution to this http://projecteuler.net/problem=3
<linduxed>
even using the Prime library it takes ages
<shock_one>
txdv, Spooner, thank you. I thought those were floats already for some reason.
<linduxed>
apeiros: that could very well be the case, i'm still bad at this
<shock_one>
txdv, I printed them in the console and it showed 1280.000. But I was doing it like tdout.printf("%f\n", a); :)
djwonk has joined #ruby
bradleyprice has joined #ruby
<txdv>
why would you ask in a ruby channel
<apeiros>
linduxed: the biggest possible prime factor is sqrt(600851475143), and probing 2..sqrt(600851475143) doesn't take ages
<shock_one>
txdv, sorry about that. There is no vala channel.
<txdv>
Not if you are a gnome
headius has joined #ruby
<txdv>
the gnome network can hook you up bro
<txdv>
yo should check that stuff out, they have mad skillz
<txdv>
yo
rdev has joined #ruby
<txdv>
actually its called the gimp network
<xll11>
I'm ditching the idea of using SQLite
<xll11>
stinky windows :(
<xll11>
ill try CSV
<txdv>
wow
unflores has joined #ruby
marcdel has joined #ruby
<txdv>
From sqlite to csv
elaptics is now known as elaptics`away
fission6 has quit [Quit: fission6]
jrajav has joined #ruby
<txdv>
this will be the turning point in your life, it will all go to shit
<interactionjaxsn>
xll11: what about postgres or mysql?
lewix has joined #ruby
shock_one has quit [Ping timeout: 264 seconds]
<thmz_>
https://gist.github.com/thomasstr/5312857 i get an error when I'm trying to pass in norwegian characters in the method.. anyone know how i can solve this problem?
<txdv>
sqlite is like the easiest to set up for windows deployments
elliot98 has quit [Quit: Konversation terminated!]
lewix has quit [Remote host closed the connection]
<awc737>
lol.....
unflores has quit [Client Quit]
<awc737>
a CSV database?
<awc737>
is it going to be RELATIONALS or NOSQLS?
RORgasm has joined #ruby
<interactionjaxsn>
Not Only Sql?
BSaboia has joined #ruby
<xll11>
Ok, I am a Ruby newbie and as someone said, I want to make a toy application to practice saving data + gui (not ognna touch the gui part yet) to store my favorite movies and rating of them!
stuartrexking has quit [Quit: Leaving...]
<txdv>
why do you want to rate your movies
<txdv>
imdb has them already rated for you
divout has quit [Remote host closed the connection]
stuartrexking has joined #ruby
<awc737>
at least build something huge, and complex, which has never been done before
stuartrexking has quit [Client Quit]
<awc737>
if you're going to be learning
<awc737>
that's where I would start
etcetera has quit []
Matt has joined #ruby
<awc737>
like a 3d MMORPG in Ruby using WebGL
Matt has quit [Client Quit]
<interactionjaxsn>
awc737: the bar is low on that one
<awc737>
bar?
<awc737>
your saying that would be easy?
hmarr has quit [Ping timeout: 252 seconds]
etcetera has joined #ruby
grzywacz has joined #ruby
<txdv>
interactionjaxsn: the NPC will be AI which are smarter than humans
brennanMKE has joined #ruby
<txdv>
and that AI will be written in a subset of ruby
<interactionjaxsn>
awc737: i miss understood. i thought you grasped the concept of sarcasm.
<txdv>
for which he will create a ruby compiler
<interactionjaxsn>
txdv: the bar is low on that one
v0n has joined #ruby
<txdv>
woot, what do you propose?
r0bby has quit [Ping timeout: 245 seconds]
<awc737>
i don't understand all your metaphors and hyperboles and sarcasms
<linduxed>
apeiros: that's true, forgot about adding that
<awc737>
i don't speak freaky deaky dutch dude
<txdv>
We are not dutch
<txdv>
We are legion
<awc737>
I wonder if Ruby would be any good at all powering a WebGL JS game
<awc737>
probably Python would be better
<txdv>
like using a ruby2js compiler?
<txdv>
to write a webgl js game for the browser?
<interactionjaxsn>
bean: get him!
<awc737>
no
_nitti has quit [Read error: No route to host]
_nitti has joined #ruby
<awc737>
that is crazy there is a Ruby2JS compiler...
<txdv>
there is a c++ to js compiler too
<awc737>
doesn't JS behave pretty different
<awc737>
what if you define a class
<txdv>
It is not a translator, it is a compiler
tootooroo has quit [Quit: +1 (Yes). -1 (No). i (What I have been trying to tell you all along).]
<txdv>
the created code is as ugly as my mother and as fat as yours
_nitti has quit [Read error: Connection reset by peer]
<awc737>
I would imagine
swingha has joined #ruby
_nitti has joined #ruby
<txdv>
by the way, there is a c++ to js compiler, someone has used it to compile the ruby runtime to js so he could have a ruby virtual machine in the browser
ebollens has quit [Ping timeout: 256 seconds]
wudofyr_ has quit [Remote host closed the connection]
generalissimo has quit [Remote host closed the connection]
lewix has joined #ruby
<txdv>
even a javascript runtime written in c++ compiled to js so you can run it in your browser
<speakingcode-wor>
compile your javascript to c++ then back to javascript
<awc737>
does it make it faster
mneorr has quit [Remote host closed the connection]
<txdv>
no
<speakingcode-wor>
it makes it ugly
<awc737>
lol
<speakingcode-wor>
the uglier your code the better your skillz
ananthakumaran has quit [Quit: Leaving.]
_nitti has quit [Remote host closed the connection]
<txdv>
if you want to code your web in ruby
<txdv>
well ... it is possibru
<spider-mario>
v8 in emscripten in v8
<speakingcode-wor>
there ya go
<txdv>
aside from the super ugly javascript code, the size of the app and the additional slowlyness, this is gold
djwonk has quit []
<txdv>
the runtime itself takes a long time to downloda
Squarepy has quit [Quit: Leaving]
<speakingcode-wor>
yo dawg i heard you like javascript, so we wrote v8 to run in v8 so you can exectue your javascript in javascript
girija has quit [Ping timeout: 246 seconds]
reset has joined #ruby
Squarepy has joined #ruby
<txdv>
Yeah
<awc737>
I thought you said VB
wolcanus has quit [Remote host closed the connection]
<txdv>
sqlite ported to js
<txdv>
Why not
<awc737>
that would be sweet. a VB to javascript compiler, so I could compile my JS into C++ and back to JS
<txdv>
o there is QT for JS
<speakingcode-wor>
fork mozilla or chromium project and add in 'native' ruby support so in your pages you can be all <script type="ruby">puts "<div>Hello World</div>" </script>
IceDragon has joined #ruby
duosrx has joined #ruby
<awc737>
why is JS almost the only "client-side" program
timmow has joined #ruby
<awc737>
it's an awkward language, but because it's client side it's so important
<txdv>
because everyone wants to browse porn and you need a browser for that
<speakingcode-wor>
awc737: just happeend that way
<awc737>
but what if someone said "let's make Ruby run client side"?
<awc737>
what would it take
<speakingcode-wor>
browsers adopted javascript early on and it became the defato client side language for web
<speakingcode-wor>
awc737: not much, its probably ablready been done
<txdv>
awc737: it will never happen
jurassic has quit [Quit: jurassic]
<speakingcode-wor>
but the main browsers probably won't pick it up cause so much is already invested in javascript
<awc737>
why will it never happen? Don't a lot of people despise JS?
<speakingcode-wor>
people who despise js just aren't good at it
<txdv>
What natural human languages do you dispise?
wolcanus has joined #ruby
<awc737>
yeah that's true, but admit it takes a bit to get used to coming from traditional OO programming
<apeiros>
speakingcode-wor: incorrect
<apeiros>
speakingcode-wor: people who are good at it still despise it
cantonic has quit [Quit: cantonic]
<awc737>
+1
thebastl has quit [Remote host closed the connection]
<apeiros>
the difference is that those who're good at it can argue why they despise it
<speakingcode-wor>
apeiros: i'm just being oh what's the word... trollish? shrug. i like js
<txdv>
true hackers write code in javascript
<apeiros>
speakingcode-wor: let's be similarly trollish then - you just like js because you've never done anything serious in it
<txdv>
js runtimes outperform python and ruby
mhn23 has joined #ruby
<speakingcode-wor>
javascript has some horrible design decisions, but a subset of the language is beautiful
buibex has joined #ruby
<apeiros>
horrible design decisions - such as not having a true integer type
axl_ has joined #ruby
<txdv>
like [] + {} === new Object()
mhn23 has quit [Client Quit]
<speakingcode-wor>
haven't done anything serious, except build out high-load SOA applications
nomenkun has joined #ruby
<awc737>
a subset of the language?
ixti has quit [Ping timeout: 264 seconds]
duosrx has quit [Ping timeout: 246 seconds]
timmow has quit [Ping timeout: 252 seconds]
<txdv>
I wait for the day when a second language which gets compiled to javascript gets the new webstandard
<wmoxam>
I've coded a fuckton of js over the past 14 years, mostly server side. I like Ruby much more.
<speakingcode-wor>
awc737: yes. certain things in the language are horrible, like their shoehorned classical constructors and new operator, etc.
<wmoxam>
I like js more than php and vbscript though
<speakingcode-wor>
take a peak at JavaScipt - The Good Parts by doug crockford
<txdv>
php5 is a good language, what sucks is the php runtime
<awc737>
yes PHP 5.4 has come a long way
<awc737>
It's bad rep is almost undeserved now
<speakingcode-wor>
the problem with php is dpesite it's 'recent' improvements and maturity, there's so much shit leftover from when it was a messy, scrappy scripting language
<Gate>
javascript has subtleties that make it powerful and quirks that make it annoying
<txdv>
poor people who had to code in the days of PHP3 web pages ... even the js was slow and sucked
<speakingcode-wor>
same can be said for javascript though, lots of leftover mess
<txdv>
o that mess
<apeiros>
well, js at least has a good excuse for not cleaning up
<txdv>
whenever I look at js, it hurts my eyes
<apeiros>
php doesn't
<txdv>
what doesnt php do?
kristofers has quit []
<Gate>
have any excuses.
<speakingcode-wor>
eh i think its the same excuse for both - back compatibility being a primary part of it
haxrbyte_ has quit [Read error: Connection reset by peer]
<apeiros>
speakingcode-wor: bah, that's bullcrap
<txdv>
its always about that old code
<apeiros>
deprecation works and when done properly still hurts, but isn't bad
<speakingcode-wor>
apeiros: not saying i agree, just saying that's probably the main excuse for both languages keeping horrible aspects around
<Gate>
My problem with PHP is its premise. It was a language built from the beginning to be a templating language. That's great for templating, but it would be like trying to implement ruby with ERB as your end goal
<apeiros>
speakingcode-wor: I'm more refering to js having a) no clear leader, b) many runtimes, c) difficult to target runtimes
maxmanders has joined #ruby
<apeiros>
php has none of those
Neomex has quit [Quit: Neomex]
<txdv>
what
<Gate>
and legacy runtimes
<speakingcode-wor>
apeiros: true
<txdv>
and IE6
<txdv>
and IE
<apeiros>
Gate: legacy runtimes, IE6 etc. are "many runtimes"
<speakingcode-wor>
js seems to be kind of getting better about that
<apeiros>
difficult to target => I can't install js version "the latest" on my server and target that. I have a bazillion of customers which potentially run some fuckwhat version of IE
<Gate>
apeiros: point taken, but I see "jruby/rubinius/mri" as "many runtimes" vs. IE6 which is not maintained, updated or used by anyone sane
<speakingcode-wor>
i think it's just because of the ongoing browser wars and browser developers always trying to one up eachother with spinoff features
<apeiros>
with php, I install the latest on my server and write the code targeting that specific version
<speakingcode-wor>
there's not the same kind of motivation for people to make one-off features in say, php
<apeiros>
Gate: still the same as I said. You know what version you install. You can target that single version.
<apeiros>
of course, with libraries the game changes a bit. but not that much.
chandankumar has quit [Quit: Leaving]
pioz has quit [Quit: This computer has gone to sleep]
<speakingcode-wor>
in ruby and such, if people make one offs they usually either keep it internally, or try to merge it back into a future version of the core, but with browsers there's competitive reasons to not do that, meh
<speakingcode-wor>
i'm not a ruby expect but i would imagine most of the various runtimes support the same interface
<apeiros>
that said, js has an advantage php doesn't - competition. (even if that one is relatively new)
<speakingcode-wor>
like java... several java runtimes but they all support the same api
<awc737>
Competition. that was the point I was getting at , which bothers me
<speakingcode-wor>
expert*
<awc737>
regardless how you feel about JS, you HAVE to use it
<apeiros>
speakingcode-wor: yes, the differences between the mature runtimes are miniscule. the biggest issue is the C API
<awc737>
you have no other choice, it's been years. I don't understand why not 1 browser has even tried to use something else
<txdv>
support the same api? what a communist idea
lewix has quit [Remote host closed the connection]
<apeiros>
awc737: silverlight
<apeiros>
but: eeeeeeew
<awc737>
lol... hmm
banisterfiend has quit [Ping timeout: 245 seconds]
<awc737>
is that the same? thats like java
<speakingcode-wor>
yeah.. silverlight, flash....
<apeiros>
also flash (again, eeeeew :D)
jurassic has joined #ruby
<speakingcode-wor>
awc737: yeah, it's the same
<apeiros>
oh, right, java applets
<txdv>
js in the browser > flash
<speakingcode-wor>
either the browser supports it natively or through plugins, or not
<apeiros>
(and once again: EEEEEW)
<Gate>
apeiros: EEEEEEEW
<awc737>
if I could have a language client-side it would be python
<txdv>
you have always to consider that there is worse shit than js
<awc737>
cross platform, fast, threading
adambeynon has joined #ruby
* apeiros
remembers discussions like "but you have to write the website so it still works for people who disable javascript!"
nateberkopec has joined #ruby
<Gate>
java applets: The bastard child of satan and pure unadulterated suckage
<speakingcode-wor>
does ruby not have threading? (pretty new to ruby here)
<txdv>
awc737: wtf, the language has nothing to do with threading
<yxhuvud>
apeiros: I never understood why anyone should cater to that kind of people
Hanmac has joined #ruby
`p has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
<apeiros>
yxhuvud: back then it made sense. today? not so much.
<xll11>
My program is coming together real good.. soon you will all have a good utility program to keep track of your favourite movies
failshell has quit [Remote host closed the connection]
<txdv>
If it creates special syntax for dealing with threading, than yes, but python doesn't have any yet
<awc737>
maybe it does, I don't know ruby
<apeiros>
unless you have a very specific audience
<awc737>
i just heard the cool kids were here
Astralum has joined #ruby
<txdv>
then*
Arzaga has quit [Quit: Computer has gone to sleep.]
<apeiros>
awc737: the cool kids moved on to clojure
<txdv>
scala
<apeiros>
oh, and node *cough*lol*cough*
<awc737>
slashjoin clojure
<speakingcode-wor>
txdv: its more about the runtime supporting it, sure, but usually that entails some language support to make it not a huge pain in the ass
<apeiros>
/join #clojure
<awc737>
node is that awkward language
<apeiros>
d'oh, why u no work? :D
<txdv>
are functions 'some language support' for it?
<awc737>
why didn't that work O_O
<apeiros>
awc737: //join ;-)
<awc737>
lol
Hanmac2 has quit [Ping timeout: 252 seconds]
<speakingcode-wor>
txdv: i mean more like, for instance in java, keywords like synchronized, etc
<txdv>
java is the old dog on the playground
platzhirsch1 has joined #ruby
<apeiros>
java is only 1 or 2 years older than ruby
<speakingcode-wor>
one could implement a threading library without extending a language any, sure, but langauge support can make things easier to write
<awc737>
Clojure is java?
<apeiros>
and about the same age as python
<apeiros>
awc737: no
<platzhirsch1>
Any idea whether I can start a download in Ruby, check the MIME and filetype, and then cancel it?
<apeiros>
it (the main runtime) runs on the jvm
<txdv>
awc737: is JRuby Java?
Tarential has quit [Excess Flood]
<awc737>
It's ruby
<apeiros>
platzhirsch1: that's called a HEAD request
Tarential has joined #ruby
chandankumar has joined #ruby
<apeiros>
platzhirsch1: and to actually answer: yes
<platzhirsch1>
apeiros: thanks *shame on me*
<txdv>
read the header, check, proceed
<apeiros>
no shame in asking
<LiquidInsect>
apeiros: isn't ruby older?
<apeiros>
LiquidInsect: than?
<LiquidInsect>
java in '95, ruby in '93
brhelwig has quit [Remote host closed the connection]
jekotia has quit [Quit: ChatZilla 0.9.90-rdmsoft [XULRunner 18.0.2/20130201065344]]
<platzhirsch1>
this was too obvious, I hate when I forget about HTTP
himsin has joined #ruby
dqminh has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<apeiros>
LiquidInsect: I messed up, but according to WP: Java & Ruby '95, Python '91 - but I guess it depends on what you consider to be the appearance date
<speakingcode-wor>
anyway if one wants to run ruby client side there a number of avenues on which to do it. people have written javascript linux kernels and such so running a ruby interpreter on top of the javascript engine is entirely feasible, can't speak to perfomrance tho
<awc737>
we need a better language client side
<apeiros>
afaik there even is a js ruby interpreter. don't know how complete, though.
<apeiros>
anyway, again, I want <script type="llvm/bytecode">
<hassans>
Topaz?
<LiquidInsect>
yes
<hassans>
err, that's the python one. Opal is ruby -> js
<apeiros>
then we have no quibbles about which language. anything which compiles to llvm bytecode goes.
binaryplease has joined #ruby
nicksloan has joined #ruby
<speakingcode-wor>
lol apeiros
<LiquidInsect>
then we can throw out all this crap that compiles to JS and inherits all of its flaws
<LiquidInsect>
lol? I think it's a fantastic idea
<speakingcode-wor>
i want a language called "reckon" that can parse natural language psuedocode and figure out wtf i mean
<hassans>
Do what I mean, not what I say!
<speakingcode-wor>
^^^^
tootooroo has quit [Read error: Connection reset by peer]
<awc737>
would <script type="llvm/btyecode"> be very dangerous?
nezumi has joined #ruby
<apeiros>
speakingcode-wor: you want to learn shakespeare (the programming language)
<apeiros>
awc737: it's a vm. vm's can be sandboxed.
<apeiros>
so no, it's only dangerous if the implementers of the vm fuck up.
<speakingcode-wor>
apeiros: i beleive i've heard of it before, but i didn't ever dive in
kristofers has joined #ruby
<LiquidInsect>
> Consarn it, I said delete all that crap! ==> formatting all hard drives...
<speakingcode-wor>
apeiros: they will. :-)
LennyLinux has quit [Remote host closed the connection]
<txdv>
is a box with sand good against attacks?
<apeiros>
speakingcode-wor: of course they will. but they did with js and others too.
<apeiros>
iow, it's not "more dangerous"
<LiquidInsect>
txdv: even better than pocket sand
<speakingcode-wor>
sure. it's a back and forth cycle
<speakingcode-wor>
new fixes introduce new flaws and on and on
<xll11>
How can I remove a specific line which from a csv file? say where "hey" is one of the values?
<txdv>
the documentation may reveal your answer xll11
dqminh has quit [Ping timeout: 256 seconds]
<speakingcode-wor>
i'm not sure i understnd the question xll11
<xll11>
txdv I've been reading the documentation..
<apeiros>
xll11: read the csv into an array of rows (csv standard library does that for you), use Array#reject, then write back to the file
thebastl has quit [Remote host closed the connection]
<awc737>
and rails is ruby
d3 has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
<txdv>
no
<awc737>
seriously? who uses ruby without rails? losers
<txdv>
only one side
one8zero has joined #ruby
<rdev>
rails + ruby = web language
<apeiros>
%-S
<LiquidInsect>
@_@
<interactionjaxsn>
awc737: sometimes i use ruby an AR
<rdev>
ruby = system administrator language
Heero has joined #ruby
<rdev>
like perl :P
Heero has quit [Changing host]
Heero has joined #ruby
<apeiros>
ruby = something you buy for your wife
<rdev>
does anyone here have a free moment to look over my controller corresponding functional test? it's all finished, I'm just looking for some feedback, very very simple stuff
<apeiros>
you guys are married? wow are you ooooold…
benzrf has joined #ruby
<yxhuvud>
diamonds? have you looked at the resell value of those? :(
<benzrf>
hello!
<rdev>
apeiros: we established a life first before getting into ruby, how's that? :P
<rdev>
yxhuvud: nope, because we don't plan to resell :)
<apeiros>
hm, I used ruby to establish a life. that's how.
<rdev>
apeiros: and that my friend is what differentiates a nerd from a geek :)
<apeiros>
and which is which?
<benzrf>
I don't really know ruby, but I heard that its blocks let you make new kinds of control structures... from what I've gleaned, that's just because ruby lambdas are concise and look like blocks. couldn't you get almost the same effect in any language with decent lambdas?
<apeiros>
benzrf: yes
<benzrf>
ok
sambio has quit []
<rdev>
nerd = life inside a computer, geek = life outside a computer
maxmanders has quit [Quit: Computer has gone to sleep.]
<benzrf>
damn, python really needs to get quality lambdas
<apeiros>
benzrf: don't underestimate the power of syntax sugar, though :)
hamakn has quit [Remote host closed the connection]
<interactionjaxsn>
apeiros: may i borrow a cup?
<benzrf>
thanks though :)
<yxhuvud>
it is also not only about the syntax for blocks, but how their usage is all over stdlib
<benzrf>
ah, right
akam-it has quit [Remote host closed the connection]
<benzrf>
so you'd say ruby encourages more of a functional style than python?
<apeiros>
and trying to implement my own language, I have to come to appreciate ruby's noise-less style a lot more than I did before already
<apeiros>
it's *really* hard to get such a good signal-to-noise ratio
Weazy has joined #ruby
<apeiros>
benzrf: no. ruby is multiparadigm. I'd say most ruby code isn't using functional style all that much.
Matt has joined #ruby
<benzrf>
ok
rdev is now known as rdev5|work
<benzrf>
I guess I meant, passing around a lot of lambdas
<benzrf>
anyway
<apeiros>
occasionally, sure. but not in the greater picture.
Matt is now known as Guest76721
<apeiros>
that yes. blocks are used pervasively.
sambio has joined #ruby
sambio has joined #ruby
sambio has quit [Changing host]
<benzrf>
my experience with python has been that it lets you tinker with the insides of the language quite a bit and override lots of behaviors, but it doesn't let you really extend it much. for example, you can override most infix operators, but you can't add new ones. how is ruby for extensibility? and also, how is it for letting you override behaviors and tinker with innards?
<speakingcode-wor>
most of the ruby code i've written (not tons) has been pretty funcitonal in nature
<benzrf>
ok
<apeiros>
things like `3.times do … end`, `people.sort_by { |person| person.first_name }`, `after 3.minutes do … end` etc.
<speakingcode-wor>
using the hell out of blocks and collection iterators
<benzrf>
I started the poignant guide
<benzrf>
what's with 'function(args) {block}'?
dmiller1 has joined #ruby
supergiantrobot has quit [Quit: supergiantrobot]
<benzrf>
does ruby let you have args after the parenthesis?
<speakingcode-wor>
benzrf: often you don't need the parenthesis at all when calling a function
<benzrf>
I know
<apeiros>
xll11: you have to install mysql before installing the mysql gem (same for sqlite)
<benzrf>
I'm competent with perl, more or less
jurassic has quit [Quit: jurassic]
<benzrf>
and I see some of the similarities
<yxhuvud>
benz: a block is (sadly) not a normal argument, and doesn't even have to be declared in the method declaration
platzhirsch1 has left #ruby [#ruby]
<benzrf>
hmm
hassans has quit [Quit: hassans]
<benzrf>
special caaaases
<benzrf>
:(
<apeiros>
sadly ruby inherited some of the worse parts of perl too :-/
<benzrf>
bluh
brhelwig_ has joined #ruby
<xll11>
apeiros I have MySQL installed (I think so atleast, using XAMPP)
jlast has quit [Remote host closed the connection]
<benzrf>
btw, I posted a big block earlier, can anybody answer it?
<benzrf>
my experience with python has been that it lets you tinker with the insides of the language quite a bit and override lots of behaviors, but it doesn't let you really extend it much. for example, you can override most infix operators, but you can't add new ones. how is ruby for extensibility? and also, how is it for letting you override behaviors and tinker with innards?
<speakingcode-wor>
yeah syntax around blocks can be a little weird but i've never bumped into issues with it
mando has quit [Remote host closed the connection]
<yxhuvud>
for example, you can only pass one block to a method. (you could convert them to lambdas though if you really need to, but it get a bit unwieldy)
<apeiros>
benzrf: all classes in ruby can be reopened
<apeiros>
you can't add new syntax, though
etcetera has quit []
<speakingcode-wor>
benzrf: ruby is pretty extensible. lots of DSL stuff in ruby
<benzrf>
nice
benlieb has joined #ruby
<xll11>
how nice, mysql has a installer
<speakingcode-wor>
look at Builder, the RSS package, sinatra, or opsode chef for some dsl examples (not how they're implemented, but just the variety out there)
<benzrf>
another python comparison: the actual language is VERY heavily attached to the built-in types
<apeiros>
>> class String; def reverse_capitalize; capitalize.swapcase; end; end; "foo".reverse_capitalize
<apeiros>
(there's more - but those are the ones you'll probably not get around)
<benzrf>
ok cool
<speakingcode-wor>
is ruby duck typed?
<benzrf>
I should hope so!
<apeiros>
ruby is strongly and dynamically typed (and as such, yes, duck typed)
brhelwig has quit [Ping timeout: 245 seconds]
<speakingcode-wor>
thought so
<benzrf>
ok, in python a class is just another attribute. I think in ruby classes are part of an object at a more integral level?
<apeiros>
(strong typing = an object can't change its class, dynamic typing = a variable isn't tied to a single type)
supergiantrobot has joined #ruby
DrCode has quit [Remote host closed the connection]
<speakingcode-wor>
yeah i know typing... im a polyglot
buibex has quit [Remote host closed the connection]
<apeiros>
benzrf: yes. strong typing, as explained above, means an object can't change its class.
<apeiros>
speakingcode-wor: you're not the only one reading ;-)
<speakingcode-wor>
is there type coercion tho?
<interactionjaxsn>
speakingcode-wor: don't cough on me if that is contagious :)
ehaliewicz has joined #ruby
<benzrf>
well, I don't think objects can change class in python either. wait let me see
<apeiros>
there is no type casting (since ruby doesn't work on a binary level, it wouldn't make sense). there is a coercion mechanism for numeric classes.
etcetera has joined #ruby
benlieb_ has joined #ruby
<speakingcode-wor>
cool
<apeiros>
and you can always write methods to return a new object of a different type from another object.
<speakingcode-wor>
since it is dynamically typed
<yxhuvud>
apeiros: while objects can't change it's class, they *can* extend it.
`p has joined #ruby
<speakingcode-wor>
can you specify the type of a param in a method?
atno|AFK is now known as atno
<speakingcode-wor>
or do you jut assume you get an object with the interface you expect and/or use reflection to verify an argument is correct type?
mpfundstein has quit [Remote host closed the connection]
<apeiros>
yxhuvud: good point
jurassic has quit [Client Quit]
benlieb has quit [Read error: Connection reset by peer]
benlieb_ is now known as benlieb
<apeiros>
speakingcode-wor: no, you can't specify the type of a param (or any variable)
<benzrf>
well, python doesn't let you change classes because the attribute is locked
<benzrf>
by integrated at a lower level, I mean that the class is part of an object in a different way from an attribute
<apeiros>
it wouldn't make much sense anyway (ducks all the way down)
<apeiros>
benzrf: well, that's an implementation detail IMO
<speakingcode-wor>
apeiros: is there a way to handle invalid arguments safely? use reflection, i guess? like in javascript
<benzrf>
oh crap, you CAN change the class of an object in python
<benzrf>
never mind :|
<apeiros>
speakingcode-wor: just let it explode
<speakingcode-wor>
:-\
Squarepy has quit [Quit: Leaving]
<benzrf>
ok, if you can call a method by just using its name with no parenthesis, how do you refer to it without calling it?
mercwithamouth has quit [Remote host closed the connection]
<apeiros>
speakingcode-wor: if you insist, you can always do something like `raise ArgumentError, "Expected Foo, got #{arg.class}" unless arg.is_a?(Foo)`
sambao21 has quit [Quit: Computer has gone to sleep.]
<speakingcode-wor>
ah so there is is_a
<apeiros>
speakingcode-wor: but as it may feel uncomfortable for somebody used to different languages - it's not a good way to write code in ruby
marcdel has quit [Ping timeout: 256 seconds]
<apeiros>
speakingcode-wor: in ruby you don't care *what* an object is, all you care is whether it *can behave* the way you expect it to
<speakingcode-wor>
nod
<yxhuvud>
benz: .method(:method_name)
<benzrf>
duck typing ftw
<benzrf>
yxhuvud: ewwwww
<apeiros>
(that said, some people sadly mistake this as "I have to accept everything!!!" - which is even more foolhardy than type checking)
<speakingcode-wor>
so does is_a use ducking, or literally it must be an instance of the given class to return true?
arietis has quit [Quit: Computer has gone to sleep.]
<benzrf>
you have to use reflection?
<benzrf>
blugh
<apeiros>
benzrf: rarely ever needed
<benzrf>
speakingcode-wor: how could it use ducking?
<yxhuvud>
can't get it all. they optimize for the common thing to do.
<benzrf>
apeiros: how do you pass a function as an argument if it's predeclared?
<benzrf>
use a lambda that calls it?!
<apeiros>
benzrf: Object#method returns a Method instance, which includes the receiver, i.e. calling it will call it on the receiver you took it from
<speakingcode-wor>
suppose class A has methods foo and bar... class B also has methods foo and bar.. does a.is_a(B) return true, even if there is no defined relationship between A and B?
<apeiros>
benzrf: you rarely do that :)
<benzrf>
uh
<benzrf>
ok
<apeiros>
benzrf: but if you do, you usually pass the name as a symbol
<apeiros>
benzrf: idioms work differently than in python
rickmasta has joined #ruby
DrCode has joined #ruby
<speakingcode-wor>
suppose class A has methods foo and bar... class B also has methods foo and bar.. does a.is_a(B) return true, even if there is no defined relationship between A and B?
<apeiros>
if you try to apply other language's idioms in ruby, you WILL find it awkward.
<benzrf>
speakingcode-wor: oh, I see
<benzrf>
apeiros: ok, got it
rippa has quit [Ping timeout: 240 seconds]
chussenot has joined #ruby
<speakingcode-wor>
i.e. does is_a go on interface or actual inheritence
chussenot has quit [Client Quit]
<speakingcode-wor>
guess i could just try n see
<apeiros>
benzrf: if you want to speed up learning idioms, I suggest showing small snippets of code here. people here will gladly show you alternatives.
timmow has joined #ruby
<apeiros>
speakingcode-wor: is_a? is inheritance
<apeiros>
speakingcode-wor: behavior testing is usually done by respond_to?
<speakingcode-wor>
ah ok
<speakingcode-wor>
but you say the common thing is to just let it blow up?
<speakingcode-wor>
(regarding receving an invalid type for an argument)
<apeiros>
if all you want is to enumerate - you don't care whether it is a Range, an Array, a Set or a Whatsits - if it responds to .each, you're fine
<apeiros>
and "let it blow up" means you just call .each on it
<speakingcode-wor>
nod
chessguy has joined #ruby
<apeiros>
there are cases where I'd explicitly test.
<apeiros>
e.g. when you store the argument and call .each later.
<benzrf>
why not just try/catch
<apeiros>
it'd be hard to debug if you don't test explicitly there
<apeiros>
benzrf: what for? obviously the user (= coder) made a mistake. there's no point in rescuing a clear error.
<benzrf>
how about this:
angusiguess has quit [Ping timeout: 256 seconds]
<apeiros>
stuff should blow up if it is wrong. otherwise it won't get fixed.
<benzrf>
you make a listener that receives events for clicks
<apeiros>
(it's begin/rescue/end in ruby btw. - we don't measily catch stuff in ruby, we boldly rescue :-p)
<speakingcode-wor>
fair enough but seems weird coming from java where static strong typing prevents type errors AND the common practice is to catch exceptions
ehellman has joined #ruby
rh1n0 has joined #ruby
rh1n0 has quit [Max SendQ exceeded]
<apeiros>
speakingcode-wor: I can understand that sentiment. and it might take something to get used to it. but it works pretty well. and it doesn't feel all that bad once you get used to it.
<yxhuvud>
apeiros: there is throw/catch though as well, even if that is mostly for flow control (and I don't think I've ever seen them used)
<benzrf>
there is something or other you do if you hear any kind of click
<xll11>
k
<benzrf>
but a right click has additional special behavior
<benzrf>
oh wait, a sane api would use an attribute and not the class of the event
<benzrf>
NEVER MIND
<xll11>
im done for today
<reactormonk>
speakingcode-wor, checked exceptions is a bad practice I heard
<apeiros>
speakingcode-wor: I came from Eiffel, which even has contracts. even stronger than Java in that regard. It certainly took me a bit ;-)
<xll11>
gonna give up on databases untill ill install linux on my laptop
rh1n0 has joined #ruby
rh1n0 has quit [Max SendQ exceeded]
<speakingcode-wor>
apeiros: yeah i believe you. i mean in javascript i don't do much type checking, i just document my functions
<speakingcode-wor>
one thing about java tho is
ckrailo has quit [Quit: Computer has gone to sleep.]
<apeiros>
speakingcode-wor: yeah, correct. you don't baby sit the user (= coder) in ruby.
<apeiros>
babysit (one word?)
<apeiros>
bah, engrish
rh1n0 has joined #ruby
<benzrf>
xll11: GNU/LINUX YOU DAMN CAPITALIST
* benzrf
sprouts a neckbeard
<reactormonk>
apeiros, I like typeclasses ;-)
<speakingcode-wor>
if i have a method that could encounter an exception and i don't catch the exception, i have to declare the method throws the exception
sayan has quit [Ping timeout: 256 seconds]
generalissimo has joined #ruby
Squarepy has joined #ruby
<speakingcode-wor>
which means anything calling it won't compile unless it either catches exceptions or explicitly throws it - i like that kind of compiler time explicitness
reset has quit [Quit: Leaving...]
<LiquidInsect>
well, we don't have a compiler
<LiquidInsect>
you gotta let it go man
<reactormonk>
speakingcode-wor, I don't, it leads to code that is way too verbose.
dankest has joined #ruby
<LiquidInsect>
be free
<apeiros>
speakingcode-wor: yeah, that's a downside in ruby.
<speakingcode-wor>
reactormonk: people say that. but in javascript you see this all the time:
majikbytes has joined #ruby
<benzrf>
ok, in java objects act strictly as instances of classes and in js they are entirely free agents that can inherit if you really want them to. in python it's somewhere in between. how do they act in ruby?
<apeiros>
speakingcode-wor: though, that way of working has lead to a lot of awful code in java (oh, lets just catch everything and throw a meaningless exception instead)
<LiquidInsect>
if you're passed an object that doesn't respond to a method, the right thing to do in ruby is let the caller get an exception that sayd "I tried to call 'foo' on this object and it didn't respond to that"
<speakingcode-wor>
function (arg) { if (typeof arg === "this" || typeof arg === "that" ......
rburton- has joined #ruby
<reactormonk>
benzrf, strict instances with mixins
<benzrf>
aww
swex has quit [Remote host closed the connection]
<benzrf>
idk, python seems like it might be more flexible
<benzrf>
and I love the clean syntax
<reactormonk>
speakingcode-wor, that's because you don't have a relable way to get the type of an object
<benzrf>
:p
<yxhuvud>
reactor: except that objects can redefine whatever methods they want to in their singleton class.
<speakingcode-wor>
reactormonk: right. i'm just making a point about verbosity
<reactormonk>
speakingcode-wor, but javascript is not a good example to make your point, as the language just sucks.
<LiquidInsect>
I mean your other options are what? rescue NoMethodError and either return an error value that the caller has to look for (hello C) or raise your own exception, and why bother with the latter when we already have a clear one?
maxmanders has joined #ruby
sonda has quit [Remote host closed the connection]
bradleyprice has quit [Remote host closed the connection]
<speakingcode-wor>
point being static and strong typing, and compile-time enforced explicit exception handling, isn't necessarily more verbose. just depends on the usage. could also throw in scala to argue it even further
<benzrf>
crap my wifi died for a second there
<benzrf>
O:<
<reactormonk>
speakingcode-wor, scala uses sumtypes, not exceptions ;-)
<tootooroo>
Spaceghost|cloud: Scala sucks because kitchensink.
<benzrf>
hey now, javascript is a pretty ok language
<tootooroo>
speakingcode-wor: *
<tootooroo>
Spaceghost|cloud: Not for you sorry!
dmerrick has quit [Remote host closed the connection]
sambao21 has joined #ruby
<reactormonk>
benzrf, yeah, if you use coffeescript ;-)
xaq has joined #ruby
<speakingcode-wor>
yeah but scala has strong static typing (no?) but isn't verbose
<benzrf>
well, coffeescript has most of the same semantics, doesn't it?
<benzrf>
and in the end, semantics are the most important part of a language, not syntax
<reactormonk>
benzrf, yeah, but it helps with some semantics
<benzrf>
ok
<reactormonk>
not all though
<speakingcode-wor>
i just hear a lot of people make the argument that those mechanisms make a language overly verbose but i'm just saying that's not necessarily true, dpeneds on how the language handles it
neku has quit [Read error: Connection reset by peer]
<reactormonk>
benzrf, most notably => instead of -> to bind the current this
neku has joined #ruby
hamakn has joined #ruby
chessguy has quit [Remote host closed the connection]
<reactormonk>
speakingcode-wor, scala uses strong static typing with type inference (which works most of the time)
<speakingcode-wor>
nod. and it's not very verbose (most of the time)
<reactormonk>
it's verbose when it fails and you have to help it a bit
<benzrf>
aww
<reactormonk>
benzrf, exactly ;-)
generali_ has joined #ruby
<speakingcode-wor>
so heres the irony for me. right now i'm working o backend stuff in ruby and client-side anroid app in java... with ruby i get more with less code, but i get more faster in java because of better code completion and such thanks to its compile-time aspects
jimeh has joined #ruby
<benzrf>
no, it's I'm using Xnest so I can xmonad my terminals without making my other stuff abide by its rules
<benzrf>
and now I can't copy and paste stuff easily
<benzrf>
>:(
generalissimo has quit [Read error: Connection reset by peer]
chessguy has joined #ruby
<reactormonk>
benzrf, ... what the outside wm?
<speakingcode-wor>
start the class name, ctrl+space completes it based on whats imported. type . and get the list of available methods, etc etc
jumpei has joined #ruby
<benzrf>
compiz
<benzrf>
for some reason I'm still using unity
<benzrf>
>_>
<benzrf>
one of these days I'm going to move to gnome or openbox though... maaaybe
neku has quit [Ping timeout: 256 seconds]
<speakingcode-wor>
i use awesomewm
angusiguess has joined #ruby
rburton- has quit [Quit: Leaving...]
<speakingcode-wor>
i like it over xmonad
<reactormonk>
speakingcode-wor, so get an "ide" for ruby
<benzrf>
whyyyy
chrishough has quit [Quit: chrishough]
nfk has joined #ruby
<reactormonk>
let the battle begin!
<speakingcode-wor>
reactormonk: any good ones with that level of functionality? i like writing my ruby in vim
<tootooroo>
speakingcode-wor: I was away. But I find it strange that you say Scala is not verbose when languages like Haskell and OCaml exist.
* benzrf
hifives speakingcode-wor
* benzrf
realizes that he has become all that he hates
jimeh has quit [Client Quit]
* benzrf
is sad
<speakingcode-wor>
tootooroo: relatively speaking (between java, scala, ruby and javascript) in regards to type safety
jimeh has joined #ruby
jbueza has joined #ruby
benlieb has quit [Quit: benlieb]
jbueza has quit [Max SendQ exceeded]
<benzrf>
oh shit sometimesredsometimesblue.com is down!!! NOW how will I make my decisions?? D:
jbueza has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<tootooroo>
speakingcode-wor: Type safety? Any language that allows downcasts is intrinsically unsafe.
<speakingcode-wor>
tootooroo: and really not so much that as making a point that strong typing doesn't necessarily equal verbosity
razibog has quit [Quit: Leaving.]
hamakn has quit [Ping timeout: 276 seconds]
TheFuzzball has quit [Quit: Leaving...]
gaahrdner has quit [Read error: Connection reset by peer]
<benzrf>
what I really want is to be able to embed frames within a tiling window manager that run the same wm in them
gaahrdner has joined #ruby
<benzrf>
that way I can have the right side of my screen tile horizontally and the right side vertically
<benzrf>
^_^
<speakingcode-wor>
benzrf: hmm?
<benzrf>
recursive tiling woo
<speakingcode-wor>
oh
<speakingcode-wor>
you can kinda do that with awesome but not quite to that level
<tootooroo>
speakingcode-wor: Well, then I should make the point that strong typing does not require typing. It is possible to have global type inference (as in Haskell, but ironically, as in Python and Ruby as well, since they are unityped), but you need a type system that is not completely broken like Scala's.
<benzrf>
how is scala's broken?
<benzrf>
(note: I don't know scala)
br4ndon has joined #ruby
chandankumar has quit [Quit: Leaving]
<speakingcode-wor>
tootooroo: i'm not an expert on type systems so i can't argue about it any further, was simply making the point that strong typing doesn't dictate verbosity, and used scala vs java as a n example
etcetera has quit []
<tootooroo>
benzrf: Have you seen how many types of inheritance Scala has? Regular inheritance, case classes, traits...
pupoque has joined #ruby
<tootooroo>
benzrf: If that does not scream "KITCHENSINK!", I do not know what does.
<speakingcode-wor>
whether its by inferencing or some other mechanism i know little or nothing about, it isn't necessary to have verbosity to have strong typing
chrishough has joined #ruby
<reactormonk>
tootooroo, welcome to the JVM.
wolcanus has quit [Remote host closed the connection]
_nitti has joined #ruby
jurassic has joined #ruby
<benzrf>
what if I like kitchen sinks?
<benzrf>
:y
<speakingcode-wor>
tootooroo: definitely aint saying scala did it perfect, or even right
br4ndon_ has quit [Ping timeout: 276 seconds]
whitedawg has quit [Quit: Leaving.]
banisterfiend has joined #ruby
forrest has joined #ruby
pkrnj has joined #ruby
jaclinuxhelp has joined #ruby
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
pedda has joined #ruby
<jaclinuxhelp>
newbbie: i've installed gitlab, which uses bundler. now i've written a rake task, and it fails saying that cannot load my require 'csv-mapper' which is an installed gem (at system level /usr/local/shared/gems) . how do i solve it ?
carraroj has quit [Quit: Konversation terminated!]
<canton7>
is this a rake task grabbing its includes from bundler or the system?
predator217 has quit [Ping timeout: 246 seconds]
benzrf has left #ruby [":_"]
predator117 has joined #ruby
<jaclinuxhelp>
from bundler
<canton7>
are you sure? have you added that gem to your Gemfile?
rburton- has joined #ruby
<jaclinuxhelp>
i tried that, but then bundle install throwed an error saying "you've modified your Gemfile and you are in deployment mode!!!"
wargasm has quit [Read error: Connection reset by peer]
<jaclinuxhelp>
first suggestion: cannot be done. i have not version control
<canton7>
delete Gemfile.lock?
<canton7>
(well, rename it)
<jaclinuxhelp>
but that will make aaaaaalll the deploying again ???
<canton7>
what?
<MrZYX>
do not touch Gemfile.lock
spider-mario has quit [Remote host closed the connection]
<MrZYX>
jaclinuxhelp: is that a production or a dev setup?
vlad_starkov has joined #ruby
etcetera has joined #ruby
<canton7>
my if-in-doubt action is to nuke it. presumably it's dev, if he's adding stuff
timonv has quit [Remote host closed the connection]
<jaclinuxhelp>
i renamed it, ant i' ve get a greater error than before
<jaclinuxhelp>
production
<MrZYX>
then do not touch the Gemfile
<MrZYX>
do that on your development install
<jaclinuxhelp>
mmmm
<MrZYX>
and deploy that
<jaclinuxhelp>
i dont have a development install
<jaclinuxhelp>
i just want to add a simply rake task!!!
<jaclinuxhelp>
cant be done ??
krawchyk has quit [Ping timeout: 255 seconds]
<MrZYX>
well, then you're developing :P
<jaclinuxhelp>
i mean, on the production isolated app ?
<MrZYX>
you could get rid of deployment mode
<jaclinuxhelp>
yeah i know
<jaclinuxhelp>
mmm
Liquid-- has joined #ruby
<jaclinuxhelp>
how do i get rid of that ?
<MrZYX>
$EDITOR .bundle/config
arietis has quit [Quit: Computer has gone to sleep.]
<jaclinuxhelp>
many params...
ebollens has joined #ruby
br4ndon has joined #ruby
br4ndon has quit [Client Quit]
xaq has quit [Ping timeout: 240 seconds]
BadQuanta has quit [Read error: Connection reset by peer]
`brendan has quit [Ping timeout: 264 seconds]
vlad_starkov has quit [Ping timeout: 260 seconds]
jabbslad has joined #ruby
bradleyprice has joined #ruby
<jaclinuxhelp>
can i simply add a gem to this bundle "deployment" mode, and then use that gem inside my task, at least... can i do that manually ???
brhelwig has joined #ruby
BadQuanta has joined #ruby
starburst has quit [Quit: .]
<MrZYX>
no
<MrZYX>
the whole purpose of the deployment mode is that you can't edit the dependencies of your app
reset has joined #ruby
<MrZYX>
so you get the right versions no matter how many typos you do
beiter has quit [Quit: beiter]
<jaclinuxhelp>
right
<MrZYX>
but it's just a flag
<MrZYX>
never looked at it but it should be in .bundle/config
<jaclinuxhelp>
and some way to get my rake task working within the already configured environment , but without having to download tons of stuff again ?
beneggett has quit [Ping timeout: 246 seconds]
<MrZYX>
who says you need to download tons of stuff again?
brennanMKE has quit [Remote host closed the connection]
brhelwig_ has quit [Ping timeout: 245 seconds]
araujo has quit [Ping timeout: 255 seconds]
<jaclinuxhelp>
bundle install --no-deployment would not download all that again ?
brhelwig has quit [Read error: Connection reset by peer]
artofraw has quit [Remote host closed the connection]
brhelwig has joined #ruby
generali_ has quit [Read error: Connection reset by peer]
<waxjar>
looks like you haven't installed thin. what does gem list thin say?
dallasm_ has joined #ruby
jurassic has quit [Quit: jurassic]
generalissimo has joined #ruby
<netto>
gem list has thin (1.5.1)
monkegjinni has joined #ruby
jurassic has joined #ruby
jaclinuxhelp has quit [Quit: Ex-Chat]
<netto>
waxjar:
jurassic has quit [Client Quit]
axl_ has quit [Quit: axl_]
<waxjar>
hmm, strange
<netto>
yes
dallasm_ has quit [Remote host closed the connection]
dallasm_ has joined #ruby
ixti has joined #ruby
choobie has quit [Read error: Operation timed out]
brhelwig has quit [Remote host closed the connection]
_nitti has quit [Remote host closed the connection]
rickmasta has quit [Quit: Leaving...]
beneggett has quit [Read error: Connection reset by peer]
davidd12 has joined #ruby
mockra has quit [Read error: Connection reset by peer]
brhelwig has joined #ruby
davidd12 has quit [Remote host closed the connection]
ShellFu is now known as ShellFu_brb
davidd12 has joined #ruby
davidd12 has left #ruby [#ruby]
Morkel has joined #ruby
Proshot has quit [Quit: Leaving]
EPIK has joined #ruby
TheFuzzball has joined #ruby
dmerrick has joined #ruby
acrussell has quit [Quit: Leaving.]
i_s has joined #ruby
mando has joined #ruby
Squarepy has quit [Quit: Leaving]
pkrnj has quit [Ping timeout: 252 seconds]
ShellFu_brb is now known as ShellFu
pkrnj has joined #ruby
hassans has joined #ruby
pskosinski is now known as angeles
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
bean__ has joined #ruby
jurassic has joined #ruby
misunnelig has joined #ruby
<misunnelig>
I'm having trouble using Apache to host my Ruby gems. I wrote up my question on stackoverflow, but haven't had much of a response. I was wondering if one of you would be interested in helping with my problem. Thanks! http://stackoverflow.com/questions/15816725/hosting-ruby-gems-using-apache
maxmanders has quit [Quit: Computer has gone to sleep.]
dallasm_ has quit [Ping timeout: 240 seconds]
moshef has joined #ruby
angeles is now known as pskosinski
arietis has joined #ruby
etcetera has quit [Ping timeout: 245 seconds]
etcetera_ is now known as etcetera
jrajav has quit [Quit: I tend to be neutral about apples]
jnoob22 has quit [Remote host closed the connection]
bradleyprice has joined #ruby
unflores has joined #ruby
generalissimo has quit [Read error: Connection reset by peer]
timmow has quit [Read error: Connection reset by peer]
generalissimo has joined #ruby
unflores has quit [Client Quit]
nfisher has quit [Quit: Good-bye all!]
deever has joined #ruby
<deever>
hi
beneggett has joined #ruby
cjs226 has quit []
<misunnelig>
hi deever
Guest____ has joined #ruby
jbueza has quit [Quit: Leaving.]
<deever>
i've cloned a git repo with a Gemfile in it. How can i install this software now? 'gem install Gemfile' or 'gem install packagename' (after symlinking the Gemfile under .gem/...) don't work, gem seems to always look in some repositories...
grzywacz has quit [Ping timeout: 245 seconds]
tenmilestereo has quit [Quit: Leaving]
daemoen has joined #ruby
<MrZYX>
deever: gem install bundler; bundle
angusiguess has joined #ruby
jumpei has quit [Remote host closed the connection]
agarie has joined #ruby
Neomex has joined #ruby
maxmanders has joined #ruby
anderse has quit [Quit: anderse]
Guest76721 has quit [Quit: This computer has gone to sleep]
lewix has quit [Remote host closed the connection]
Neomex has quit [Client Quit]
arietis has quit [Quit: Computer has gone to sleep.]
ebobby has left #ruby [#ruby]
codecop has quit [Remote host closed the connection]
benlieb has joined #ruby
cobragoat has quit [Remote host closed the connection]
<JamieJ>
i am working with money in my code, and i get two decimal places after the decimal point except when that 2nd number after it is 0
twoism has joined #ruby
<JamieJ>
basically instead of 15.50 i get 15.5
cobragoat has quit [Remote host closed the connection]
<JamieJ>
any other number is just fine
dmiller1 has quit [Ping timeout: 276 seconds]
<bean__>
Money doesn't float
cobragoat has joined #ruby
<shevy>
bean__ witches do not float either, I saw that in The Holy Grail
<bean__>
its true.
<shevy>
unless they are made of wood
v0n has quit [Ping timeout: 256 seconds]
<shevy>
ducks also float on water
<JamieJ>
dead bodies float. eventually
<bean__>
In all seriousness, JamieJ, You're probably better off making a "Currency" class, where that currency class knows its Name, The bit before the ., and the bit after the .
<Spooner>
JamieJ, It is very bad to use floats to describe money, due to potential rounding errors.
<shevy>
soooo... if someone weighs the same as a duck, they are made of wood, and, therefore, a witch!
Hanmac1 has joined #ruby
<bean__>
and then you define to_s on that currency as
<Hanmac1>
alxscms: maybe you mean rack instead of rake?
blacktulip has quit [Remote host closed the connection]
Tricon has joined #ruby
<bean>
and yes, alxscms, it is normal, the index.html bit is a convinience given to us by modern web servers, ie. you'd probably have to add that in yourself
bean__ has quit [Quit: Computer has gone to sleep.]
angusiguess has joined #ruby
pioz has joined #ruby
jeebster has quit [Read error: Connection reset by peer]
jeebster has joined #ruby
jbueza has joined #ruby
<bean>
acidjazz, what OS
ariedler has quit [Ping timeout: 264 seconds]
etcetera has joined #ruby
<acidjazz>
bean: ubuntu. i needed 1.9.1-dev package
<acidjazz>
im good
<acidjazz>
tnx
<bean>
yep
<bean>
:)
Tricon has quit [Quit: Leaving...]
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
jtharris has quit [Quit: WeeChat 0.4.0]
anonymuse has quit [Quit: Leaving...]
<alxscms>
Hanmac: no i'm definitely talking about rake pipeline
ariedler has joined #ruby
<alxscms>
bean: alright thank you
<bean>
rake is not a thing for doing web stuff
<bean>
so
x0F has quit [Ping timeout: 252 seconds]
<bean>
ah, but it comes w/ a preview server
<bean>
got it
gabrielrotbart has joined #ruby
RagingDave has quit [Quit: Ex-Chat]
jbueza has quit [Quit: Leaving.]
jeebster1 has joined #ruby
jeebster has quit [Read error: Connection reset by peer]
hashbangchris has quit [Quit: mt]
Lemtzas has quit [Quit: No Ping reply in 180 seconds.]
<JamieJ>
hey i have a question regarding methods. if a result of one mentod is depended on another, does it matter what order they are placed in a program?
meyebne has joined #ruby
<JamieJ>
*method
predator117 has joined #ruby
<MrZYX>
JamieJ: do you have small example?
meyebne has quit [Client Quit]
<JamieJ>
yes i can gist it. gimme a sec
<JamieJ>
btw i finished that code from yesterday
<JamieJ>
thanks so much for your help
ebollens has quit [Quit: ebollens]
<Xeago>
why does ARGF.read skip the first line of stdin?
mpfundstein has quit [Ping timeout: 276 seconds]
wgosling__ has joined #ruby
meyebne has joined #ruby
danman has quit [Quit: danman]
cburyta has quit [Remote host closed the connection]
<MrZYX>
in that example it doesn't, if you call subtotal, item_cost will be called 2 times
mpfundstein has joined #ruby
tomsthumb has quit [Quit: Leaving.]
<JamieJ>
ok
hamakn has joined #ruby
<MrZYX>
there's no caching or anything, just method calls and return values used from them
drale2k has quit [Quit: Leaving...]
gabrielrotbart has quit [Remote host closed the connection]
solidoodlesuppor has quit [Remote host closed the connection]
drale2k has joined #ruby
wgosling has joined #ruby
wgosling__ has quit [Remote host closed the connection]
slainer68 has quit [Remote host closed the connection]
<JamieJ>
cool
<JamieJ>
thanks MrZYX:
bradleyprice has joined #ruby
wsterling has quit [Remote host closed the connection]
MehLaptop has joined #ruby
mercwithamouth has joined #ruby
stkowski has quit [Quit: stkowski]
hamakn has quit [Ping timeout: 245 seconds]
ShellFu is now known as ShellFu_afk
echevemaster has quit [Quit: Leaving]
meyebne has quit [Quit: leaving]
kemist has joined #ruby
netto has quit [Quit: netto]
emocakes has joined #ruby
nkts has quit [Remote host closed the connection]
DarthGandalf has quit [Ping timeout: 264 seconds]
<MrZYX>
Xeago: cool didn't know ARGF, however docs don't mention that behaviour and I can't find a quick reproducer to it. Are you sure you didn't consume the first line already? Did you try #rewind?
rburton- has joined #ruby
kevinfagan has quit [Ping timeout: 252 seconds]
wgosling_ has joined #ruby
DarthGandalf has joined #ruby
<Xeago>
hmm weird
<Xeago>
cat input| ruby -e 'puts ARGF.read'
<Xeago>
works
nari has joined #ruby
JMcAfreak has joined #ruby
<Xeago>
but
<Xeago>
#!/usr/bin/env ruby -n
<Xeago>
puts $stdin.read
<Xeago>
doesn't
wgosling has quit [Remote host closed the connection]
<graft_>
how do you dynamically add attributes to an instance?
<Xeago>
which is called as ./script < input
<MrZYX>
graft_: why would you want to do that?
<Xeago>
$stdin/ARGF show similar behavior
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
<GeekOnCoffee>
graft_ instance_eval, but why would you want to?
Zelest has quit [Ping timeout: 256 seconds]
<Xeago>
rewinding it does give the full file, yes
<Xeago>
weird that it skips the first line tho
Zelest has joined #ruby
drbawb1 has quit [Read error: No route to host]
<MrZYX>
Xeago: I just can't reproduce it :/
<graft_>
GeekOnCoffee: eh... i have this redis model which i convert into a json blob, and i want to be able to attach attributes to the redis model dynamically so i only have to load the subset of the data i need
kevinfagan has joined #ruby
cburyta has quit [Remote host closed the connection]
jgrevich has quit [Read error: Connection reset by peer]
<MrZYX>
graft_: no chance to convert it to a hash and editing that one?
atmosx has quit [Ping timeout: 245 seconds]
beneggett has quit [Quit: Computer has gone to sleep.]
jgrevich has joined #ruby
generalissimo has quit [Remote host closed the connection]
<graft_>
MrZYX: i could do that, but that would make things 10X messier
kpshek has joined #ruby
callmeivan has quit [Remote host closed the connection]
<Xeago>
MrZYX: try it on ruby 1.8.7
callmeivan has joined #ruby
cnrk has quit [Quit: cnrk]
<MrZYX>
uhm
<MrZYX>
no xD
<Xeago>
boo
lewix has quit [Remote host closed the connection]