apeiros changed the topic of #ruby to: Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
randomautomator has quit [Ping timeout: 268 seconds]
dankest has joined #ruby
aryaching has joined #ruby
randomau_ has quit [Ping timeout: 264 seconds]
Rym has quit [Ping timeout: 248 seconds]
DanKnox is now known as DanKnox_away
Rym has joined #ruby
apfelbox has quit [Ping timeout: 248 seconds]
graft has quit [Ping timeout: 276 seconds]
buibex has quit [Remote host closed the connection]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ericmathison has quit [Quit: leaving]
stonevil has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
tkuchiki has quit [Remote host closed the connection]
jp- has joined #ruby
stonevil has joined #ruby
jlast has joined #ruby
GeissT has joined #ruby
hakunin has joined #ruby
snovak has quit [Remote host closed the connection]
hakunin has quit [Remote host closed the connection]
hakunin has joined #ruby
iliketur_ has quit [Quit: zzzzz…..]
araujo has joined #ruby
hogeo has joined #ruby
ehc has joined #ruby
<ehc> what's the rspec method for taking the input as a block and returning something based on that input?
Monie has joined #ruby
antn has quit [Remote host closed the connection]
deception has quit [Quit: Goodbye]
maletor has quit [Quit: Computer has gone to sleep.]
emergion has quit [Ping timeout: 260 seconds]
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
colonolGron has quit [Quit: Lost terminal]
Monie has quit [Ping timeout: 264 seconds]
christianrojas has quit [Quit: Leaving...]
jnix has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
saarinen has quit [Ping timeout: 245 seconds]
saarinen has joined #ruby
bookmage has quit [Remote host closed the connection]
havenwood has joined #ruby
headius has quit [Quit: headius]
nbouscal has quit [Quit: Computer has commenced electric sheep tracking protocol.]
apfelbox has joined #ruby
randomdrake has quit [Quit: randomdrake]
duggiefresh has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
jamesaanderson has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
zeade has quit [Quit: Leaving.]
tjbiddle has joined #ruby
tjbiddle has quit [Client Quit]
jamesaanderson has quit [Client Quit]
fridim_ has joined #ruby
Monie has joined #ruby
flaccid has joined #ruby
goodcodeguy has joined #ruby
saarinen has quit [Quit: saarinen]
macro1 has quit [Ping timeout: 264 seconds]
<skinkitten> what should my first test be using TDD on this problem...http://bpaste.net/show/2Ah362bdfCnJ9rnCzkLR/
<flaccid> hey guys i'm trying to understand what https://github.com/redcar/redcar#installing-from-source actually does. it does a rake init which puts a bundle in ./vendor. when i go to run ruby bin/redcar it returns LoadError: no such file to load -- plugin_manager - i assume this is because the bundle gems are not in path or something?
mansi has quit [Remote host closed the connection]
spalenza has joined #ruby
<r0bgl33s0n> anyone have experience with polymoprhic belongs_to & simple_form/fields_for?
mrsolo has quit [Quit: This computer has gone to sleep]
mansi has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
<r0bgl33s0n> i am passing the polymorphic record to fields_for but it uses the records class name instead of the polymorphic associations name.
snovak has joined #ruby
jdolitsky1 has quit [Quit: Leaving.]
yxhuvud has joined #ruby
lukec has quit [Quit: lukec]
julweber has quit [Remote host closed the connection]
Monie has quit [Ping timeout: 260 seconds]
<r0bgl33s0n> ah-hah!
<r0bgl33s0n> fields_for :polymorphic_name, record.
Xenonucleicacid has left #ruby [#ruby]
jibi has quit [Read error: Operation timed out]
mansi has quit [Ping timeout: 256 seconds]
aryaching_ has joined #ruby
snovak has quit [Ping timeout: 260 seconds]
mrsolo has joined #ruby
duggiefresh has quit [Remote host closed the connection]
jibi has joined #ruby
aryaching has quit [Ping timeout: 276 seconds]
ssvo_ has quit [Ping timeout: 245 seconds]
aryaching_ has quit [Ping timeout: 248 seconds]
aryaching has joined #ruby
sailias has joined #ruby
aryaching has quit [Client Quit]
rcosta_ has quit [Remote host closed the connection]
okinomo has joined #ruby
okinomo_ has joined #ruby
peregrine81 has joined #ruby
rcosta has joined #ruby
fourq_ has joined #ruby
saarinen has joined #ruby
lord1234 has quit [Quit: Leaving.]
okinomo__ has joined #ruby
okinomo_1 has joined #ruby
okinomo_2 has joined #ruby
fgo has joined #ruby
tkuchiki has joined #ruby
javierbuilder has joined #ruby
javierbuilder has quit [Max SendQ exceeded]
unixninja92 has quit [Read error: Connection reset by peer]
mrsolo has quit [Quit: This computer has gone to sleep]
randomautomator has joined #ruby
dodosan has quit [Remote host closed the connection]
splittingred has joined #ruby
kpshek has joined #ruby
kpshek has quit [Remote host closed the connection]
gyre007 has joined #ruby
pvizcay has quit [Ping timeout: 245 seconds]
ryannielson has left #ruby [#ruby]
<skinkitten> how do I give an attribute to my class
<skinkitten> ??
javierbuilder has joined #ruby
jnix-working has joined #ruby
javierbuilder has quit [Max SendQ exceeded]
jnix-working has quit [Changing host]
jnix-working has joined #ruby
buibex has joined #ruby
jibi has quit [Ping timeout: 260 seconds]
jnix-working is now known as jnix
<banister> skinkitten attr_accessor :x
Ripp__ has quit [Quit: Ripp__]
randomdrake has joined #ruby
randomautomator has quit [Ping timeout: 264 seconds]
kofno has joined #ruby
jibi has joined #ruby
snovak has joined #ruby
javierbuilder has joined #ruby
javierbuilder has quit [Max SendQ exceeded]
gyre007 has quit [Ping timeout: 264 seconds]
julweber has joined #ruby
dmerrick has quit [Remote host closed the connection]
nwertman_ has quit [Ping timeout: 248 seconds]
peregrine81 has quit []
Davey has joined #ruby
buibex has quit [Ping timeout: 260 seconds]
javierbuilder has joined #ruby
javierbuilder has quit [Max SendQ exceeded]
bthesorceror has quit [Quit: bthesorceror]
nwertman_ has joined #ruby
Monie has joined #ruby
javierbuilder has joined #ruby
javierbuilder has quit [Max SendQ exceeded]
snovak has quit [Ping timeout: 264 seconds]
sevenseacat has joined #ruby
julweber has quit [Ping timeout: 248 seconds]
hasrb has quit [Remote host closed the connection]
javierbuilder has joined #ruby
javierbuilder has quit [Max SendQ exceeded]
Monie has quit [Ping timeout: 264 seconds]
nwertman_ has quit [Ping timeout: 276 seconds]
hadees has quit [Quit: hadees]
randomautomator has joined #ruby
<xybre> skinkitten: you don't need to specify attributes ahead of time
dkamioka has joined #ruby
Targen has quit [Read error: Connection reset by peer]
pvizcay has joined #ruby
Targen has joined #ruby
ryandeussing has quit [Remote host closed the connection]
ryandeussing has joined #ruby
<volty> xybre: what do you mean by 'ahead of time'?
benwoody has joined #ruby
apfelbox has quit [Ping timeout: 260 seconds]
Nisstyre has quit [Ping timeout: 260 seconds]
<xybre> volty: before ou use them
soba has joined #ruby
ixti has quit [Read error: Connection reset by peer]
momomomomo has quit [Quit: momomomomo]
ixti has joined #ruby
huoxito has joined #ruby
saarinen has quit [Quit: saarinen]
kofno has quit [Quit: leaving]
lukec has joined #ruby
<volty> xybre: you must mean before you write them (inside methods), or, by other words, you must mean that you can invoke attr after you wrote all the methods
dankest has quit [Quit: Peace]
ehaliewicz has joined #ruby
<xybre> You don't need to specify attr* at all.
Domon has joined #ruby
<volty> ah! leave it man! he was asking a simple question, he (and we) was not asking how to rewrite or mimic the implications of attr
reset has quit [Ping timeout: 245 seconds]
ewnd9_ has joined #ruby
javierbuilder has joined #ruby
javierbuilder has quit [Max SendQ exceeded]
<xybre> It sounded to me that it was being over complicated
RobW_ has joined #ruby
shvelo has quit [Read error: Operation timed out]
havenwood has quit [Remote host closed the connection]
<volty> semantically creating instance variables and creating attributes (properties) is not the same // it's about (explicit) properties declaration, getters, setters and maybe optional initializers etc etc
Croms has quit [Quit: Croms]
adkron has joined #ruby
<volty> ops i meant optional initial values
javierbuilder has joined #ruby
spalenza has quit [Remote host closed the connection]
randomautomator has quit [Read error: Connection reset by peer]
randomautomator has joined #ruby
<bnagy> uh
<bnagy> well there's no such thing as 'attributes' or 'properties' so semantically they are kind of the same
endash has quit [Quit: endash]
<volty> there is
javierbuilder has quit [Max SendQ exceeded]
saarinen has joined #ruby
<bnagy> no.
<bnagy> people use those terms, but they're just shorthand
<bnagy> mostly web people afaict
<volty> shorthand for what?
<bnagy> methods
Voodoofish430 has quit [Quit: Leaving.]
<volty> don't pose a pedant to me
blueredturtle has joined #ruby
<sevenseacat> why so argumentative volty
<volty> those are properties of objects
jibi has quit [Quit: .]
<volty> why so curious ?
<volty> sevenseacat:
<bnagy> it's not pedantic. Some people have the impression that there is a 'property' which is somehow distinct from a method
<sevenseacat> if people smarter than you are all telling you the same thing, they're likely right.
<bnagy> those people are mistaken
havenwood has joined #ruby
<volty> sevenseacat: smarty boy, argue
<sevenseacat> i'm no smarty boy.
randomautomator has quit [Ping timeout: 264 seconds]
dhruvasagar has joined #ruby
<volty> ya ya, they are used as properties / attributes, who needs the classic properties just uses the attr class method
aryaching has joined #ruby
<volty> all the rest of talking is you posing as teachers of the series "I"ll tell you what goes behind the scenes"
osvico has joined #ruby
<bnagy> ok, which creates instance variables and methods for you
<bnagy> < volty> semantically creating instance variables and creating attributes (properties) is not the same
<volty> You can of course tell that there are methods behind, but you cannot tell that those are not attributes
<bnagy> ... which is where I came in
alekst has quit [Quit: Leaving...]
dodosan has joined #ruby
nbouscal has joined #ruby
<volty> semantically refers to the spoken language (meaning also : enough pedantry)
<bnagy> well most people use 'semantically' to mean a specific thing when talking about programming
<bnagy> but ok. Carry on.
<skinkitten> uh. I want to create a BasicSalesTax class which has a tax rate of 10%. thats why I asked for the attributes. I wanted to make the tax rate an attribute. And have other sub classes that I can have different taxes
__userna1 has joined #ruby
<sevenseacat> i like chocolate.
<volty> when I say properties I mean properties, behave as properties - it is that simple,
<sevenseacat> who else likes chocolate!?
blueredturtle has quit [Quit: blueredturtle]
<xybre> Also you can't set default attribute values using attr.
peregrine81 has joined #ruby
<volty> you can tell me that behind properties of c++ objects there are instructions for the processors etc etc :)
<bnagy> skinkitten: just use attr_reader
<sevenseacat> we're not in c++ so nice try
Astral_ has quit [Ping timeout: 276 seconds]
<volty> i didn't say that you can set initial values with attr
chriskk has joined #ruby
<volty> sevenseacat: but somebody similar to you can do the same, in a c++ chan
__username__ has quit [Ping timeout: 276 seconds]
Spami has quit [Quit: This computer has gone to sleep]
* sevenseacat goes back to eating chocolate
<xybre> skinkitten: You probably just want to set a constant if your tax value is never going to change programmatically
<bnagy> nooo
<skinkitten> i'm going to have subclasses that will have different taxes xybre class TaxFree < BasicSalesTax
<bnagy> using a constant will make inheritance awful
<volty> smarties, you could have told skinkitten, long before, that there isn't such a thing called 'attributes' in ruby
<volty> were you sleeping ? :)
<skinkitten> or have a BaseItem class and have a class BasicTax < BaseItem
<bnagy> ... this is sounding like a strange architecture
sirupsen has quit [Quit: sirupsen]
bthesorceror has joined #ruby
jbrecht__ has quit [Remote host closed the connection]
bthesorceror has quit [Client Quit]
<xybre> skinkitten: then a class_instance_variable is what you want, or perhaps you want to pass in the tax rate when you instantiate the object
jbrechtel has joined #ruby
okinomo__ has quit [Quit: Lost terminal]
okinomo_1 has quit [Quit: Lost terminal]
okinomo has quit [Quit: Lost terminal]
okinomo_ has quit [Quit: Lost terminal]
okinomo_2 has quit [Remote host closed the connection]
<bnagy> nooo
<volty> ya, now we are going back, right to the teaching of how to make the water warm ...
<volty> too few info to hear the strangeness of his architecture
jrobeson has quit [Ping timeout: 264 seconds]
<bnagy> skinkitten: the tax behaviour of an item belongs to the item class, right?
bthesorceror has joined #ruby
cads has quit [Ping timeout: 248 seconds]
<bnagy> every item of a given class has a tax characteristic
<skinkitten> but they're items that have special taxes
<bnagy> this is not a good use of inheritance
<bnagy> cause an item isn't a kind of tax
<volty> special calculations - he, probably, means
<bnagy> so, option one - just have a @tax_rate instance var in every item class, which you could pass during initialize
<bnagy> option 2 - if you need to do funky stuff, make tax modules and mix them in
ndngvr has quit [Ping timeout: 240 seconds]
jbrechtel has quit [Ping timeout: 264 seconds]
<havenwood> +1 mixin (if actually worth extracting)
<havenwood> include a module instead of inheriting from a class
<volty> skinkitten: listen to an old fox, don't mess with modules until (and unless) you get clear ideas working on your (just) class hierarchy
<bnagy> holy crap what is this, bad advice day?
<sevenseacat> only when volty's around
saarinen has quit [Quit: saarinen]
<bnagy> volty: honestly, I don't know where you came from, but everything I have heard you say so far has been either wrong or pointlessly argumentative
<bnagy> so why don't you pipe down, ok?
Rym_ has joined #ruby
jrobeson has joined #ruby
<Buuyo> he's been a centerpiece in every conversation I've chanced to peek in and see for the last week :p
snovak has joined #ruby
Rym has quit [Ping timeout: 248 seconds]
Rym_ is now known as Rym
rcosta has quit [Remote host closed the connection]
<volty> smart guys, my impression is that you take into account much more your teacher's compulsions than the needs of needy people - failing so to understand their problems (all of them - not less the ability determined by many factors)
saarinen has joined #ruby
<Buuyo> volty: don't make light of the profession of ivory tower building. it's why we get to charge so much for software. :)
pitzips has quit [Quit: Leaving]
peregrine81 has quit []
zeade has joined #ruby
randomdrake has quit [Quit: randomdrake]
xiphffff4 is now known as xiphias
<volty> you, with your posing compulsions, are just making mess in his brain & ideas
xiphias is now known as xiphiasx_
<xybre> skinkitten: What about something like this? https://gist.github.com/acook/6431991
wallerdev has quit [Quit: wallerdev]
akells has joined #ruby
<volty> if you are really interested in helping him, you should ask him more about what he has to handle
<xybre> skinkitten: I don't know 100% how you have to do sales taxes, so cut it to fit
gstamp has quit [Quit: Computer has gone to sleep.]
<havenwood> i came in late... but 'semantic' is a commonly used term of art that isn't fancy or pedantic, attrs are often referred to as attributes and the instance variables and methods behind them are essential to understanding how to use them, and a mixin seems more appropriate than inheritance from the bit i've heard
<bnagy> xybre: that's kind of OK< but if you have a tax free item you'll have to have a negative 'special tax'
<bnagy> which is a bit ugly
<xybre> bnagy: true, but I don't have a use case, so I can't code for it ;)
<bnagy> just use an ivar, and attr_reader - it's just as unchangeable as a constant
<bnagy> ie not at all
<havenwood> meaning totally changable >.>
<volty> you get an attribute, you set an attribute - end of the story !
snovak has quit [Ping timeout: 264 seconds]
rupee has quit [Quit: Leaving]
<volty> if you need something more than an attribute you can study on ... :)
<skinkitten> thats giving me 1 of 0 arguments error xybre
<xybre> skinkitten: what Ruby version?
mansi has joined #ruby
<xybre> It runs here on Ruby 2
nbouscal has quit [Quit: Computer has commenced electric sheep tracking protocol.]
<bnagy> skinkitten: https://eval.in/46619 it runs
mwmnj has joined #ruby
<skinkitten> hmm...I wrote this in python (what i'm comfortable with) http://bpaste.net/show/0g4wpihIYwxmqQ6VPx2p/
<havenwood> skinkitten: works in 1.9.2+ but not in 1.8.7-
ahill-89 has joined #ruby
<sevenseacat> lol187
sailias has quit [Read error: Operation timed out]
<havenwood> skinkitten: 1.8 is past end-of-life, switch to 2.0 or at least 1.9.3.
<xybre> I'm not going to code for 1.8.7, so you're on your own for that
<volty> lol, you need 2.0 for rocket launching calculus? advanced ... // btw i'm quite happy with my 1.8.7
wallerdev has joined #ruby
<sevenseacat> oh dear
<sevenseacat> 1.8.7 is past EOL. upgrade when you can.
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
<havenwood> volty: Security patches will not be released, bugs will not be patched, it is dead. Dead...
Monie has joined #ruby
<havenwood> volty: Are you trolling? :P
* sevenseacat is stuck on 1.8.7 for one project but an upgrade is in the works
<xybre> volty is an actual troll, okay, now I get it
<volty> i have code that happily runs on 1.8.7
<bnagy> https://eval.in/46622 ok that's using attr_
<havenwood> xybre: gotta be
shim has joined #ruby
<volty> i have plenty of qtruby and cannot risk (or loose time) FOR NOW
<sevenseacat> can someone just like mute him?
<volty> havenwood: i'm not trolling
<volty> just telling what i think, what i have, why i have
Legion has joined #ruby
cads has joined #ruby
<volty> you got a pythoner ... :)
havenwood has quit [Remote host closed the connection]
goodcodeguy has quit [Quit: Lost terminal]
havenwood has joined #ruby
<shim> n00b q: writing a script. input a word, scans x.txt for the line with tha word on it, then puts the word. got input and .read but can't get it to print the line back
<volty> skinkitten: why don't you ask in a python chan - since you are so comfortable with python, and, now, writing in python, translating in real time ?
<xybre> shim: puts?
<volty> nuts
<volty> :)
<shim> puts what? from stackoverflow i was told File.readline
havenwood has quit [Read error: Connection reset by peer]
<skinkitten> because i need to program it in ruby
<xybre> shim: to print a string in ruby you use puts
<skinkitten> and plus i should be doign this as a TDD exercise
<shim> derp. this scans a txt file for the line with that word, then returns the line
<volty> skinkitten: then write in ruby
<skinkitten> my first test to test the basic sales class
DanKnox_away is now known as DanKnox
<skinkitten> learning ruby
<skinkitten> well i'm learning at an accelerated pace because of the code you guys have posted
<xybre> shim: gist your code?
gstamp has joined #ruby
Monie has quit [Ping timeout: 264 seconds]
<volty> skinkitten: go on, learn by mistake, create 20 redundant classes and reduce later - BY YOURSELF - the best way - imho
<skinkitten> xybre: how would I do this in rspec. testing the tax percentage
Rym_ has joined #ruby
dkamioka has quit [Read error: Connection reset by peer]
Rym has quit [Ping timeout: 264 seconds]
Rym_ is now known as Rym
<xybre> shim: hm, might be erroring out
dkamioka has joined #ruby
sparq_ has joined #ruby
sparq_ has quit [Read error: Connection reset by peer]
RobW_ has quit [Quit: RobW_]
<xybre> skinkitten: something like .. describe Item do; it 'gives the correct total'; expect(Item.new('dsfkn', 10, 0.10).total).to eq(10.10); end
ehc has quit [Quit: ehc]
<xybre> shim: Yeah I'm getting the same "module" error as you
nari_ has joined #ruby
randomdrake has joined #ruby
<volty> shim: first of all you have 'lword' instead of lword (without quotes)
pvizcay has quit [Quit: leaving]
jp- has quit [Quit: OK, I believe you… but my tommy gun don't]
Monie has joined #ruby
nbouscal has joined #ruby
aryaching has quit [Ping timeout: 248 seconds]
kobain_ has joined #ruby
kobain_ has quit [Remote host closed the connection]
kobain has quit [Read error: Connection reset by peer]
<xybre> shim: oh I see, its the File.include? line
bthesorceror has quit [Quit: bthesorceror]
<volty> of course, speedy
radic__ has joined #ruby
<xybre> shim: File is the class, you want to search your file's instance
awc737 has quit [Ping timeout: 260 seconds]
nbouscal has quit [Client Quit]
benwoody has quit [Quit: benwoody]
narcan has joined #ruby
<volty> that source is too messy
sst66 has quit [Ping timeout: 256 seconds]
RobW_ has joined #ruby
radic_ has quit [Ping timeout: 260 seconds]
<volty> he is the right guy to whom you may teach - since you can be told (or guess) the expected behavior, since there's all that mess
awc737 has joined #ruby
awc737 has quit [Excess Flood]
mary5030 has joined #ruby
javaHelloWorld has joined #ruby
awc737 has joined #ruby
aryaching has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
mrsolo has joined #ruby
nmabry has joined #ruby
io_syl has quit []
sst66 has joined #ruby
<javaHelloWorld> i lovr rubys they are nice and red and i love the way light bounces off them
randomdrake has quit [Quit: randomdrake]
carlyle has joined #ruby
stonevil has quit [Remote host closed the connection]
__userna1 has quit [Ping timeout: 245 seconds]
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
<volty> you left shim?
<skinkitten> xybre: why did you put all caps for BASE_SALES_TAX
<sevenseacat> convention
<skinkitten> is that the idiom?
<skinkitten> so variables are in all caps
<skinkitten> ?
<sevenseacat> no, constants are
dcope has joined #ruby
mansi has quit [Ping timeout: 264 seconds]
<dcope> hey all, any idea why this code works fine when run by itself but when it's run inside of a node iteration with nokogiri the header is the wrong value? http://pastie.org/private/z2j9cqwddngadyslcapha
krz has joined #ruby
<skinkitten> how do I run this script and then call the class in that script to use in the interpreter
ewnd9_ has quit [Ping timeout: 276 seconds]
sayan has joined #ruby
flaccid has left #ruby ["Konversation terminated!"]
Rym has quit [Ping timeout: 264 seconds]
Rym has joined #ruby
mcat1 has joined #ruby
fourq_ has quit [Ping timeout: 256 seconds]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
Levin_22 has joined #ruby
<mcat1> test
<xybre> skinkitten: captials are constants
b00stfr3ak has joined #ruby
b00stfr3ak has joined #ruby
<skinkitten> and the @sku?
<skinkitten> thats like the self.in python ahhhh I see
brain_shim has joined #ruby
iamjarvo has joined #ruby
<skinkitten> ok I'm familiar with the ruby program. now how does an rspec look like for something like this?
dhruvasagar has quit [Ping timeout: 248 seconds]
jlast has quit [Remote host closed the connection]
<b00stfr3ak> hello, I am having an issue with vim. For some reason inside the editor everything looks good but when I post it to github or cat the file all the formatting is messed up. Has any one else run into this issue?
eka has quit [Quit: Computer has gone to sleep.]
snath has quit [Ping timeout: 248 seconds]
mcat1 has quit [Remote host closed the connection]
eka has joined #ruby
volty has quit [Quit: Konversation terminated!]
snovak has joined #ruby
saarinen has quit [Quit: saarinen]
skinkitten has quit [Quit: Page closed]
JumpMast3r has quit [Quit: JumpMast3r]
headius has joined #ruby
lukec has quit [Quit: lukec]
snovak has quit [Ping timeout: 276 seconds]
ssvo has joined #ruby
mansi has joined #ruby
narcan has joined #ruby
Bira has quit []
krzkrz has joined #ruby
krzkrz has quit [Client Quit]
krzkrz has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
randomdrake has joined #ruby
c0rn has joined #ruby
badpie has joined #ruby
c0rn has quit [Client Quit]
snath has joined #ruby
<badpie> Any Clonezilla users floating around here?
aryaching has quit [Ping timeout: 264 seconds]
Nisstyre-laptop has joined #ruby
dodosan has quit [Remote host closed the connection]
aryaching has joined #ruby
shim has quit [Quit: Leaving]
musl has quit [Quit: WeeChat 0.4.1]
saarinen has joined #ruby
v0n has quit [Ping timeout: 260 seconds]
io_syl has joined #ruby
katselphrime has joined #ruby
Soda has joined #ruby
aryaching_ has joined #ruby
stormbytes has joined #ruby
aryaching has quit [Ping timeout: 245 seconds]
pkrnj has joined #ruby
splittingred has quit [Quit: splittingred]
katselphrime has quit [Ping timeout: 248 seconds]
stonevil has joined #ruby
bluOxigen has joined #ruby
blueOxigen has joined #ruby
saarinen has quit [Quit: saarinen]
dkamioka has quit [Remote host closed the connection]
randomdrake has quit [Quit: randomdrake]
akells has quit [Remote host closed the connection]
badpie has left #ruby ["Leaving"]
randomdrake has joined #ruby
Spami has joined #ruby
adkron has quit [Ping timeout: 248 seconds]
stonevil has quit [Ping timeout: 264 seconds]
bluOxigen has quit [Ping timeout: 276 seconds]
zeade has quit [Quit: Leaving.]
iliketur_ has joined #ruby
gildo has quit [Ping timeout: 264 seconds]
krzkrz has quit [Quit: krzkrz]
sirupsen has joined #ruby
ndngvr has joined #ruby
Davey has quit [Ping timeout: 264 seconds]
randomdrake has quit [Quit: randomdrake]
vlad_starkov has joined #ruby
mary5030 has quit [Remote host closed the connection]
iliketur_ has quit [Quit: zzzzz…..]
dodosan has joined #ruby
Nisstyre-laptop has quit [Read error: Operation timed out]
vlad_starkov has quit [Ping timeout: 264 seconds]
mwmnj has quit [Ping timeout: 276 seconds]
javaHelloWorld has quit [Ping timeout: 256 seconds]
saarinen has joined #ruby
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
dodosan has quit [Remote host closed the connection]
saarinen has quit [Client Quit]
Asher2 has joined #ruby
ssvo_ has joined #ruby
Domon has quit [Remote host closed the connection]
Domon has joined #ruby
ereslibre_laptop has joined #ruby
ereslibre_laptop has joined #ruby
jokke1 has joined #ruby
dayepa has quit [Ping timeout: 264 seconds]
Asher has quit [Ping timeout: 264 seconds]
derf- has quit [Ping timeout: 264 seconds]
bmn has quit [Ping timeout: 264 seconds]
Norrin has quit [Ping timeout: 264 seconds]
ereslibre has quit [Read error: Connection reset by peer]
jokke has quit [Ping timeout: 264 seconds]
DonVitoCorleone has quit [Ping timeout: 264 seconds]
blo has quit [Ping timeout: 264 seconds]
zero7 has quit [Ping timeout: 264 seconds]
ismlages has quit [Ping timeout: 264 seconds]
aalmenar has quit [Ping timeout: 264 seconds]
banzounet has quit [Ping timeout: 264 seconds]
epic_ has quit [Ping timeout: 264 seconds]
Blue_Ice has quit [Ping timeout: 264 seconds]
bnagy has quit [Ping timeout: 264 seconds]
supki has quit [Ping timeout: 264 seconds]
epic has joined #ruby
Blue_Ice has joined #ruby
Blue_Ice has quit [Changing host]
Blue_Ice has joined #ruby
mansi has quit [Ping timeout: 245 seconds]
bnagy has joined #ruby
spap has joined #ruby
DonVitoCorleone has joined #ruby
ssvo has quit [Ping timeout: 248 seconds]
dayepa has joined #ruby
Dreamer3 has quit [Remote host closed the connection]
bmn has joined #ruby
Dreamer3 has joined #ruby
aalmenar has joined #ruby
aalmenar has quit [Changing host]
aalmenar has joined #ruby
nwertman_ has joined #ruby
blo has joined #ruby
Dreamer3 has quit [Remote host closed the connection]
derf- has joined #ruby
Dreamer3 has joined #ruby
tylersmith has joined #ruby
Norrin has joined #ruby
Domon has quit [Ping timeout: 264 seconds]
Cyrus_ has joined #ruby
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
banzounet has joined #ruby
supki has joined #ruby
sirupsen has quit [Quit: sirupsen]
marcgg_ has quit [Read error: Connection reset by peer]
marcgg has joined #ruby
Soda has quit [Read error: Connection reset by peer]
optimusprimem has quit [Read error: Connection reset by peer]
digital-ghost has quit [Remote host closed the connection]
nwertman_ has quit [Ping timeout: 264 seconds]
rburton- has joined #ruby
optimusprimem has joined #ruby
optimusprimem has joined #ruby
polaco is now known as polaco_zZz
swordsmanz has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
Domon has joined #ruby
buibex has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
|jemc| has joined #ruby
Emiils has quit [Quit: aizgāja dzert alu]
snovak has joined #ruby
ananthakumaran has joined #ruby
osvico has quit [Ping timeout: 245 seconds]
Davey has joined #ruby
buibex has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
Rym has quit [Ping timeout: 264 seconds]
Rym has joined #ruby
vlad_starkov has joined #ruby
browndawg has joined #ruby
snovak has quit [Ping timeout: 276 seconds]
Davey has quit [Client Quit]
jamesaanderson has joined #ruby
okinomo has joined #ruby
okinomo_ has joined #ruby
okinomo_ has quit [Client Quit]
christianrojas has joined #ruby
okinomo_ has joined #ruby
okinomo has joined #ruby
okinomo_ has quit [Client Quit]
okinomo has quit [Client Quit]
RobW_ has quit [Quit: RobW_]
mrsolo has joined #ruby
ahill-89 has quit [Quit: leaving]
krz has quit [Quit: krz]
Tectonic has joined #ruby
yacks has quit [Quit: Leaving]
lukec has joined #ruby
butblack has joined #ruby
butblack has left #ruby [#ruby]
duper has quit [Ping timeout: 245 seconds]
rburton- has quit [Quit: Leaving...]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rburton- has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
intuxicated has joined #ruby
Rym has quit [Ping timeout: 256 seconds]
Rym has joined #ruby
spap has quit [Remote host closed the connection]
mary5030 has joined #ruby
dcope has quit [Quit: leaving]
Levin_22 has quit [Quit: Levin_22]
kizzx2 has quit [Quit: Leaving.]
nhhagen has joined #ruby
nhhagen has quit [Remote host closed the connection]
kvirani has quit [Remote host closed the connection]
nhhagen has joined #ruby
kvirani has joined #ruby
julweber has joined #ruby
Domon has quit [Remote host closed the connection]
iamjarvo has quit [Remote host closed the connection]
Domon has joined #ruby
iamjarvo has joined #ruby
vlad_starkov has joined #ruby
Legion has quit [Ping timeout: 256 seconds]
jamesaanderson has joined #ruby
tchebb has quit [Ping timeout: 264 seconds]
orionstein_away is now known as orionstein
nhhagen has quit [Ping timeout: 245 seconds]
julweber has quit [Ping timeout: 248 seconds]
kvirani has quit [Ping timeout: 276 seconds]
Domon has quit [Ping timeout: 248 seconds]
tchebb has joined #ruby
Rym has quit [Quit: Rym]
ezotrank has joined #ruby
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
dik_dak has quit [Quit: Leaving]
lukec has quit [Quit: lukec]
iamjarvo has quit [Remote host closed the connection]
Ripp__ has joined #ruby
Monie has quit [Quit: Textual IRC Client: www.textualapp.com]
Naoe-Kanno has quit [Quit: ネウロイを負かさなきゃならないね]
iamjarvo has joined #ruby
intuxicated has quit [Ping timeout: 264 seconds]
chairabanta has joined #ruby
yfeldblum has quit [Ping timeout: 276 seconds]
dhruvasagar has joined #ruby
iamjarvo has quit [Ping timeout: 248 seconds]
druonysus has joined #ruby
axeman- has joined #ruby
Quashie has joined #ruby
QQQ has joined #ruby
Quashie_ has joined #ruby
marcgg_ has joined #ruby
marcgg has quit [Read error: Connection reset by peer]
kizzx2 has joined #ruby
apeiros has joined #ruby
mary5030 has quit [Remote host closed the connection]
Tectonic has quit []
druonysus has quit [Read error: Connection reset by peer]
mansi has joined #ruby
tchebb has quit [Ping timeout: 276 seconds]
codecop has joined #ruby
druonysus has joined #ruby
druonysus has quit [Changing host]
druonysus has joined #ruby
orionstein is now known as orionstein_away
gyzmodo has joined #ruby
SeySayux has quit [Ping timeout: 256 seconds]
seich- has quit [Ping timeout: 260 seconds]
JohnBat26 has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
SeySayux has joined #ruby
PerlPuma has quit [Quit: self.exit(:stage=>:left)]
chairabanta has quit [Quit: Leaving...]
okinomo has joined #ruby
okinomo_ has joined #ruby
tchebb has joined #ruby
mansi has quit [Ping timeout: 245 seconds]
intuxicated has joined #ruby
seich- has joined #ruby
QQQ has quit [Read error: Connection reset by peer]
Quashie_ has quit [Read error: Connection reset by peer]
Quashie has quit [Read error: Connection reset by peer]
Monie has joined #ruby
Quashie has joined #ruby
okinomo_ has quit [Ping timeout: 248 seconds]
okinomo has quit [Ping timeout: 248 seconds]
snovak has joined #ruby
okinomo has joined #ruby
okinomo_ has joined #ruby
swordsmanz has quit [Read error: Connection reset by peer]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
girija has joined #ruby
aryaching_ has quit [Ping timeout: 264 seconds]
snovak has quit [Ping timeout: 276 seconds]
brianpWins has joined #ruby
jamesaanderson has joined #ruby
browndawg has quit [Quit: Leaving.]
apeiros has quit [Remote host closed the connection]
jamesaanderson has quit [Client Quit]
Tectonic has joined #ruby
Domon has joined #ruby
nhhagen has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
aryaching has joined #ruby
BooFar has joined #ruby
rburton- has quit [Read error: Connection reset by peer]
tylersmith has quit [Remote host closed the connection]
mele- has joined #ruby
tylersmith has joined #ruby
swordsmanz has joined #ruby
jamesaanderson has joined #ruby
antulik-afk is now known as antulik
tylersmith has quit [Ping timeout: 248 seconds]
drdru has joined #ruby
nhhagen has quit [Remote host closed the connection]
<drdru> hi guys
<drdru> when I try to install glib2, it fails with: rbglib_utils.c:258:5: error: ‘RUBY_T_HASH’ undeclared (first use in this function)
zigomir has joined #ruby
<drdru> I tried changing RUBY_T_HASH to T_HASH and it successfully built
<drdru> how do I finish the gem install once I get it to build?
tagrudev has joined #ruby
chairabanta has joined #ruby
jimeh has quit [Ping timeout: 245 seconds]
rgoodwin has quit [Ping timeout: 245 seconds]
locriani has joined #ruby
mikemar10 has quit [Ping timeout: 268 seconds]
BooFar has quit [Quit: Leaving]
jimeh has joined #ruby
<drdru> after doing make; make install;, I don't see it listed in gem list
rgoodwin has joined #ruby
BizarreCake has joined #ruby
relix has joined #ruby
vlad_starkov has joined #ruby
fridim_ has quit [Quit: Leaving]
dhruvasagar has quit [Read error: Connection reset by peer]
mikemar10 has joined #ruby
dhruvasagar has joined #ruby
unixninja92 has joined #ruby
d2dchat_ has joined #ruby
iliketur_ has joined #ruby
alepore has joined #ruby
carlyle has quit [Remote host closed the connection]
mick_laptop has quit [Quit: brb]
braoru has joined #ruby
<jrobeson> drdru, so why did you think changing it to T_HASH was the correct thing?
<jrobeson> is it a known bug in ruby glib2?
vlad_starkov has quit [Ping timeout: 264 seconds]
Loaft has joined #ruby
crunch-choco has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gyzmodo has quit [Ping timeout: 245 seconds]
<drdru> it's a 1.8.7 compatibility bug
mrsolo has quit [Quit: This computer has gone to sleep]
zoee has joined #ruby
twoism has quit [Remote host closed the connection]
twoism has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
mele- has quit [Quit: Linkinus - http://linkinus.com]
zero7 has joined #ruby
ananthakumaran has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
jbpros has joined #ruby
mrsolo has joined #ruby
twoism has quit [Ping timeout: 264 seconds]
browndawg has joined #ruby
Loaft has quit []
krz has joined #ruby
popl has joined #ruby
chairabanta has quit [Quit: Leaving...]
jkline has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
Loaft has joined #ruby
timonv has joined #ruby
<jkline> Does anyone have an example Rake task that runs every rspec file in a new rspec process?
<jkline> I recently saw an example of that and don't remember where :(
ayaz has joined #ruby
aryaching has quit [Ping timeout: 249 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pumper has joined #ruby
sayan has quit [Ping timeout: 264 seconds]
tjbiddle has joined #ruby
tonni has quit [Remote host closed the connection]
defaultro has left #ruby [#ruby]
blackmesa has joined #ruby
rezzack has quit [Quit: Leaving.]
JDHankle has quit [Remote host closed the connection]
blkcrwn has quit [Remote host closed the connection]
narcan has joined #ruby
narcan has quit [Client Quit]
dodosan has joined #ruby
Tectonic has quit []
timonv has quit [Remote host closed the connection]
futilegames has joined #ruby
pumper has left #ruby [#ruby]
pumper has joined #ruby
snovak has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
dagobah has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
twoism has joined #ruby
fenicks has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
Macaveli has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
twoism has quit [Remote host closed the connection]
jonkri has joined #ruby
twoism has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
cassivs has joined #ruby
Macaveli has quit [Remote host closed the connection]
snovak has quit [Ping timeout: 264 seconds]
jrhorn424 has quit [Ping timeout: 256 seconds]
Spami has quit [Quit: This computer has gone to sleep]
randomdrake has joined #ruby
antulik is now known as antulik-afk
antulik-afk is now known as antulik
Macaveli has joined #ruby
thesheff17 has quit [Remote host closed the connection]
Spami has joined #ruby
ndrei has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
ananthakumaran has quit [Read error: Connection reset by peer]
kizzx2 has quit [Quit: Leaving.]
razi has joined #ruby
ananthakumaran has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
dhruvasagar has joined #ruby
stormbyte has joined #ruby
Apocalypse has quit [Ping timeout: 245 seconds]
jbpros has quit [Quit: jbpros]
stormbyte has quit [Client Quit]
jonkri has quit [Read error: Connection reset by peer]
Macaveli has quit [Quit: Computer has gone to sleep.]
Apocalypse has joined #ruby
io_syl has quit []
ezotrank has quit [Quit: Textual IRC Client: www.textualapp.com]
KevinSjoberg has joined #ruby
stormbytes has quit [Read error: Connection reset by peer]
b00stfr3ak has quit [Quit: Leaving]
Eiam has quit [Ping timeout: 260 seconds]
twoism_ has joined #ruby
huoxito has quit [Quit: Leaving]
jonkri has joined #ruby
ixti has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
ixti has joined #ruby
avril14th has joined #ruby
antulik is now known as antulik-afk
io_syl has joined #ruby
twoism has quit [Ping timeout: 264 seconds]
jrhorn424 has joined #ruby
twoism_ has quit [Ping timeout: 276 seconds]
dross has quit [Ping timeout: 256 seconds]
tylersmith has joined #ruby
noopq has joined #ruby
drdru has left #ruby [#ruby]
cassivs has quit [Quit: cassivs]
sr78ger has joined #ruby
tylersmith has quit [Ping timeout: 276 seconds]
dash_ has joined #ruby
headius has quit [Quit: headius]
apfelbox has joined #ruby
jonkri has quit [Quit: jonkri]
apfelbox has quit [Remote host closed the connection]
julweber has joined #ruby
headius has joined #ruby
* avril14th puts 'Morning
apfelbox has joined #ruby
buzzybron has joined #ruby
<sevenseacat> syntax error - unterminated string
Spami has quit [Quit: This computer has gone to sleep]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kizzx2 has joined #ruby
ehaliewicz has quit [Remote host closed the connection]
pumper has quit [Ping timeout: 260 seconds]
filipe has joined #ruby
blackmesa has joined #ruby
Es0teric has joined #ruby
javierbuilder has joined #ruby
Aloysius1_ has joined #ruby
txdv_ has joined #ruby
javierbuilder has quit [Max SendQ exceeded]
visof has joined #ruby
taion809_ has joined #ruby
moeSeth_ has quit [Ping timeout: 240 seconds]
DandyPandy has quit [Ping timeout: 240 seconds]
Zespre has quit [Ping timeout: 240 seconds]
drago777 has quit [Ping timeout: 240 seconds]
txdv has quit [Quit: No Ping reply in 180 seconds.]
aetaric has quit [Ping timeout: 240 seconds]
Aloysius1 has quit [Ping timeout: 240 seconds]
taion809 has quit [Quit: No Ping reply in 180 seconds.]
crazysim has quit [Excess Flood]
foobot has quit [Excess Flood]
aetaric_ has joined #ruby
crazysim has joined #ruby
taion809_ is now known as taion809
r0bgl33s0n has quit [Ping timeout: 240 seconds]
the_mentat has quit [Ping timeout: 240 seconds]
robbyoconnor has joined #ruby
aetaric_ is now known as aetaric
jimeh has quit [Ping timeout: 260 seconds]
DandyPandy has joined #ruby
classix has quit [Ping timeout: 240 seconds]
andikr has joined #ruby
drago777 has joined #ruby
lord1234 has joined #ruby
lord1234 has quit [Client Quit]
intuxicated has quit [Ping timeout: 264 seconds]
lord1234 has joined #ruby
ahawkins has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
Es0teric has quit [Client Quit]
the_mentat has joined #ruby
ananthakumaran has joined #ruby
alup has joined #ruby
vlad_starkov has joined #ruby
aganov has joined #ruby
<avril14th> :)
<avril14th> Nothing like a plain error message in the morning
xbob has joined #ruby
lord1234 has quit [Ping timeout: 264 seconds]
iliketur_ has quit [Quit: zzzzz…..]
intuxicated has joined #ruby
xbob has quit [Client Quit]
yshh has joined #ruby
vlad_starkov has quit [Ping timeout: 256 seconds]
xbob has joined #ruby
druonysus has quit [Read error: Connection reset by peer]
druonysus has joined #ruby
jimeh has joined #ruby
okinomo_ has quit [Ping timeout: 260 seconds]
okinomo has quit [Ping timeout: 245 seconds]
jkline has quit [Quit: jkline]
vlad_starkov has joined #ruby
ferdev has joined #ruby
druonysus has quit [Client Quit]
arturaz has joined #ruby
vince_prignano has joined #ruby
stkowski has quit [Quit: stkowski]
buibex has joined #ruby
Macaveli_ has joined #ruby
<sebastianb> morning :)
Macaveli has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
filipe has quit [Ping timeout: 264 seconds]
filipe has joined #ruby
persand has joined #ruby
JDHankle has joined #ruby
gstamp has quit [Quit: Computer has gone to sleep.]
cads has quit [Ping timeout: 276 seconds]
snovak has joined #ruby
tjbiddle has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
dash_ has quit [Ping timeout: 264 seconds]
ndrei has quit [Ping timeout: 248 seconds]
ananthakumaran has joined #ruby
dash_ has joined #ruby
julweber has quit [Remote host closed the connection]
tobago has joined #ruby
|jemc| has quit [Ping timeout: 260 seconds]
linux_noob_666 has quit [Read error: Connection reset by peer]
JDHankle has quit [Ping timeout: 248 seconds]
ndrei has joined #ruby
snovak has quit [Ping timeout: 264 seconds]
adkron has joined #ruby
amacgregor_ has joined #ruby
companion is now known as Companion
virt|a has joined #ruby
krz has quit [Quit: krz]
pranny has joined #ruby
kinigitz has joined #ruby
moted_ has joined #ruby
buzzybron has quit [Ping timeout: 264 seconds]
knigitz has quit [Ping timeout: 264 seconds]
[0x1a] has quit [Ping timeout: 264 seconds]
virtualize has quit [Ping timeout: 264 seconds]
ix007 has quit [Ping timeout: 264 seconds]
lkba has quit [Ping timeout: 256 seconds]
senayar has joined #ruby
Macaveli has joined #ruby
end_guy_ has joined #ruby
fuleo2 has joined #ruby
moted has quit [Ping timeout: 264 seconds]
moted_ is now known as moted
Targen has quit [Read error: Connection reset by peer]
end_guy has quit [Ping timeout: 240 seconds]
crazysim has quit [Excess Flood]
buzzybron has joined #ruby
crazysim has joined #ruby
headius has quit [Quit: headius]
Macaveli_ has quit [Read error: Connection reset by peer]
DanBoy has quit [Ping timeout: 240 seconds]
DrCode has quit [Ping timeout: 240 seconds]
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
Targen has joined #ruby
crunch-choco has quit [Ping timeout: 264 seconds]
SeySayux has quit [Ping timeout: 264 seconds]
axeman- has quit [Ping timeout: 264 seconds]
adkron_ has quit [Ping timeout: 264 seconds]
ejnahc has quit [Ping timeout: 264 seconds]
binw has quit [Ping timeout: 264 seconds]
ninegrid has quit [Ping timeout: 264 seconds]
fuleo has quit [Ping timeout: 264 seconds]
avelldiroll has quit [Ping timeout: 264 seconds]
ninegrid has joined #ruby
senayar has quit [Remote host closed the connection]
Bry8Star{T2 has joined #ruby
amacgregor has quit [Ping timeout: 264 seconds]
Patchou has quit [Ping timeout: 264 seconds]
senayar has joined #ruby
crunch-choco has joined #ruby
ejnahc has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
binw has joined #ruby
axeman- has joined #ruby
ixti has quit [Read error: Connection reset by peer]
avelldiroll has joined #ruby
ixti has joined #ruby
ix007 has joined #ruby
SeySayux has joined #ruby
DrCode has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
tvw has joined #ruby
dash_ has quit [Ping timeout: 260 seconds]
dodosan has quit [Remote host closed the connection]
foobot has joined #ruby
ssvo_ has quit [Ping timeout: 256 seconds]
linux_noob_666 has joined #ruby
intuxicated has quit [Ping timeout: 264 seconds]
troessner has joined #ruby
obs has joined #ruby
kizzx2 has quit [Quit: Leaving.]
Coffers has joined #ruby
Quashie has quit [Ping timeout: 245 seconds]
Fractional has joined #ruby
relix has joined #ruby
ndrei has quit [Ping timeout: 256 seconds]
tobago has quit [Changing host]
tobago has joined #ruby
<tobago> t
<sevenseacat> u
<sebastianb> r
thillux has joined #ruby
DanKnox is now known as DanKnox_away
kjellski has joined #ruby
ndrei has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
apeiros has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
mrsolo has quit [Quit: This computer has gone to sleep]
ananthakumaran has joined #ruby
vlad_starkov has joined #ruby
ndrei has quit [Ping timeout: 256 seconds]
greenysan has joined #ruby
intuxicated has joined #ruby
Al__ has joined #ruby
tesuji has joined #ruby
krz has joined #ruby
timonv has joined #ruby
ckampfe has quit [Ping timeout: 256 seconds]
<buzzybron> how do i debug ruby using the cmd line anyone?
* avril14th notices it's 10:01, time for bonjourmadame.fr
cassivs has joined #ruby
julweber has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
jibi has joined #ruby
cassivs has quit [Client Quit]
tesuji_ has joined #ruby
ssvo has joined #ruby
tesuji has quit [Ping timeout: 276 seconds]
mansi has joined #ruby
adambeynon has joined #ruby
BeLucid has quit [Ping timeout: 260 seconds]
mansi has quit [Ping timeout: 264 seconds]
kizzx2 has joined #ruby
marr has joined #ruby
kizzx2 has quit [Max SendQ exceeded]
ndrei has joined #ruby
Criztian has joined #ruby
kizzx2 has joined #ruby
okinomo has joined #ruby
okinomo_ has joined #ruby
intuxicated has quit [Ping timeout: 256 seconds]
greenysan has quit [Ping timeout: 248 seconds]
popl has quit [Quit: We must make an idol of our fear, and call it God.]
ferdev has quit [Quit: ferdev]
s0ny123 has joined #ruby
ssvo has quit [Ping timeout: 260 seconds]
krzkrz has joined #ruby
krz has quit [Quit: krz]
niceguyjames has joined #ruby
ndrei has quit [Ping timeout: 245 seconds]
zigomir has quit [Read error: Connection reset by peer]
zigomir has joined #ruby
goleldar has quit [Ping timeout: 245 seconds]
mikecmpbll has joined #ruby
Criztian has quit [Remote host closed the connection]
camilasan has joined #ruby
tonni has joined #ruby
io_syl has quit []
Zai00 has joined #ruby
ghr has joined #ruby
BeLucid has joined #ruby
Ziarkaen has joined #ruby
tonni has quit [Remote host closed the connection]
tonni has joined #ruby
intuxicated has joined #ruby
ndrei has joined #ruby
<Ziarkaen> Whey does h = Hash.new(Hash.new(String.new)) not work as expected? e.g. after h['a']['b] = 'c' we have h == {}
allsystemsarego has joined #ruby
allsystemsarego has quit [Changing host]
allsystemsarego has joined #ruby
<apeiros> Ziarkaen: because your expectation is wrong
stonevil has joined #ruby
ndrei has quit [Ping timeout: 245 seconds]
<Ziarkaen> apeiros: In what way?
<apeiros> Hash.new(default) sets a default value. it doesn't not magically store values in the hash.
fuleo2 has quit [Remote host closed the connection]
<apeiros> >> h = Hash.new(Hash.new(String.new)); h['a']['b] = 'c'; h.default
<eval-in> apeiros => /tmp/execpad-051793256fb2/source-051793256fb2:2: syntax error, unexpected tIDENTIFIER, expecting ']' ... (https://eval.in/46673)
<apeiros> gah
<Ziarkaen> Can I use the block construction to do so?
<apeiros> >> h = Hash.new(Hash.new("")); h['a']['b'] = 'c'; h.default
<eval-in> apeiros => {"b"=>"c"} (https://eval.in/46674)
fuleo has joined #ruby
<apeiros> yes
<Ziarkaen> Hash.new { |h, k| h[k] = Hash.new(String.new)}
<apeiros> String.new is silly. just use ""
dennus has joined #ruby
<apeiros> and yes, that's the way to do it
<Ziarkaen> apeiros: OK. Thanks
<apeiros> beware, you again only set the default value of your inner hash.
<Ziarkaen> apeiros: Yeah, got that.
Macaveli has quit [Quit: Computer has gone to sleep.]
<apeiros> I'd probably set it to a frozen string. unless you really want to allow mutation of the default.
Macaveli has joined #ruby
pranny1 has joined #ruby
pranny has quit [Read error: Connection reset by peer]
julweber_ has joined #ruby
<Ziarkaen> apeiros: What do you mean by "frozen string"?
Loaft has quit [Ping timeout: 264 seconds]
<apeiros> Hash.new { |h, k| h[k] = Hash.new("".freeze)}
<Ziarkaen> unmutable?
MrTest_ has joined #ruby
elaptics`away is now known as elaptics
julweber has quit [Read error: Operation timed out]
<apeiros> if you now somewhere do: `x = h['foo']['bar']; x << "d'oh I accidentally mutate my hash default!"`, you'll get an exception
<apeiros> yes, freezing makes an object immutable.
timonv has quit [Remote host closed the connection]
shaunbaker has joined #ruby
<Ziarkaen> Stylistically, why did you use the "<<" operator in lieu of the "=" one?
emergion has joined #ruby
kayloos has joined #ruby
MrTest_ has quit [Ping timeout: 250 seconds]
s0ny123 has quit [Quit: Lost terminal]
ferdev has joined #ruby
<workmad3> Ziarkaen: because '<<' isn't the same as '='
wallerdev has quit [Quit: wallerdev]
<sevenseacat> one is assigning, one is appending
<workmad3> Ziarkaen: '=' would only reassign the variable 'x', while '<<' on a string will modify the string
<workmad3> >> a = "".freeze; a = "foo"; puts a
<eval-in> workmad3 => foo ... (https://eval.in/46675)
<Ziarkaen> workmad3: Ah, OK. I should be reading the docs, rather than asking here. Thanks for the help.
<workmad3> >> a = "".freeze; a << "foo"; puts a
<eval-in> workmad3 => can't modify frozen String (RuntimeError) ... (https://eval.in/46676)
dodosan has joined #ruby
gedanken has joined #ruby
rdark has joined #ruby
<apeiros> Ziarkaen: because with = you wouldn't have the problem. I talk about this:
<apeiros> >> h = Hash.new('default'); s = h[:x]; s << "noooo!"; h[:another_key]
<eval-in> apeiros => "defaultnoooo!" (https://eval.in/46677)
buibex has quit [Remote host closed the connection]
corpuscle has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
ndrei has joined #ruby
randomdrake has quit [Quit: randomdrake]
visof has quit [Ping timeout: 248 seconds]
buibex_ has joined #ruby
dhruvasagar has joined #ruby
dodosan has quit [Ping timeout: 264 seconds]
ananthakumaran has quit [Read error: Connection reset by peer]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
Ripp__ has quit [Quit: Ripp__]
dawkirst has quit [Ping timeout: 246 seconds]
ananthakumaran has joined #ruby
<Ziarkaen> apeiros: I see why that would be a problem. I guess I'm used to string literals being immutable...
jprovazn has joined #ruby
Zespre has joined #ruby
niceguyjames has quit [Quit: Computer has gone to sleep.]
moeSeth_ has joined #ruby
yacks has joined #ruby
Hanmac has joined #ruby
ayaz has quit [Quit: Textual IRC Client: www.textualapp.com]
decoponio has joined #ruby
greenysan has joined #ruby
ayaz has joined #ruby
Zonakusu has joined #ruby
blaxter_ has joined #ruby
arturaz has quit [Remote host closed the connection]
visof has joined #ruby
greenysan has quit [Ping timeout: 260 seconds]
atmosx has joined #ruby
stonevil has quit [Remote host closed the connection]
Xeago has joined #ruby
r0bgl33s0n has joined #ruby
rdark has quit [Ping timeout: 264 seconds]
rdark has joined #ruby
gyre007 has joined #ruby
ndrei has quit [Ping timeout: 245 seconds]
timonv has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Read error: Connection reset by peer]
nmabry has quit [Quit: nmabry]
dhruvasagar has joined #ruby
ananthakumaran has joined #ruby
amacgregor has joined #ruby
amacgregor_ has quit [Ping timeout: 264 seconds]
ssvo has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Read error: Connection reset by peer]
nfk has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
dhruvasagar has joined #ruby
ssvo has quit [Ping timeout: 245 seconds]
thepreacher has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Read error: Connection reset by peer]
buibex has joined #ruby
ananthakumaran has joined #ruby
buibex_ has quit [Ping timeout: 260 seconds]
thepreacher has quit [Client Quit]
sevenseacat has quit [Quit: Leaving.]
xbob has quit [Ping timeout: 250 seconds]
snovak has joined #ruby
dhruvasagar has joined #ruby
nomenkun has joined #ruby
bricker`LA has joined #ruby
Xeago has quit [Remote host closed the connection]
zarubin has joined #ruby
ismael_ has joined #ruby
Heero has quit [Ping timeout: 260 seconds]
graydot has joined #ruby
graydot has quit [Client Quit]
ananthakumaran has quit [Read error: Connection reset by peer]
marcgg has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
marcgg_ has quit [Read error: Connection reset by peer]
wildroman has joined #ruby
[0x1a]_ has joined #ruby
snovak has quit [Ping timeout: 276 seconds]
ananthakumaran has joined #ruby
dhruvasagar has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
marcgg_ has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
wildroman has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
wildroman has joined #ruby
RenderRob has joined #ruby
<RenderRob> is it easy to alternate between versions in rvm?
<xybre> renderrob: yep
<xybre> renderrob: rvm use 1.9.3; rvm use 2.0.0
marcgg has quit [Ping timeout: 256 seconds]
himsin has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
Rollabunna has joined #ruby
senayar_ has joined #ruby
senayar_ has quit [Remote host closed the connection]
senayar has quit [Read error: Connection reset by peer]
ananthakumaran has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
senayar has joined #ruby
ananthakumaran has joined #ruby
niceguyjames has joined #ruby
mklappstuhl has joined #ruby
RubyPanther has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
buibex has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
platzhirsch has joined #ruby
<platzhirsch> Revisiting your 5 month old Ruby code is kind of shocking, what was I thinking when I wrote this *facepalm*
buibex has joined #ruby
<RenderRob> xybre, nice!
<buzzybron> any aptana users here?
rubyguy has quit [Ping timeout: 240 seconds]
ananthakumaran has quit [Read error: Connection reset by peer]
guilleiguaran_ has quit [Ping timeout: 248 seconds]
Guest85414__ has quit [Ping timeout: 256 seconds]
lectrick has quit [Ping timeout: 268 seconds]
randym_ has quit [Ping timeout: 268 seconds]
pusewicz_ has quit [Ping timeout: 264 seconds]
karlfreeman has quit [Ping timeout: 245 seconds]
ziyadb has quit [Ping timeout: 240 seconds]
zero7 has quit [Ping timeout: 248 seconds]
mattyohe has quit [Ping timeout: 248 seconds]
Scorchin has quit [Ping timeout: 245 seconds]
rndstr has quit [Ping timeout: 256 seconds]
stonevil has joined #ruby
dhruvasagar has joined #ruby
heidar has quit [Ping timeout: 276 seconds]
mklappstuhl has quit [Remote host closed the connection]
denysonique has quit [Ping timeout: 264 seconds]
kapowaz has quit [Ping timeout: 276 seconds]
ananthakumaran has joined #ruby
buibex has quit [Remote host closed the connection]
keyvan_ has quit [Ping timeout: 256 seconds]
xerxas has quit [Ping timeout: 246 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
bluehavana has quit [Ping timeout: 268 seconds]
davidboy has quit [Ping timeout: 268 seconds]
HavokOC has quit [Ping timeout: 256 seconds]
dnyy has quit [Ping timeout: 264 seconds]
dhruvasagar has quit [Read error: Connection reset by peer]
ananthakumaran has quit [Read error: Connection reset by peer]
emergion has joined #ruby
amacgregor has quit [Ping timeout: 248 seconds]
ananthakumaran has joined #ruby
emergion has quit [Client Quit]
dhruvasagar has joined #ruby
jokke1 has quit [Quit: WeeChat 0.4.1]
jokke has joined #ruby
ndrei has joined #ruby
intuxicated has quit [Ping timeout: 245 seconds]
ananthakumaran has quit [Read error: Connection reset by peer]
ndrei has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Read error: Connection reset by peer]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
senayar_ has joined #ruby
ananthakumaran has joined #ruby
dhruvasagar has joined #ruby
niceguyjames has quit [Quit: Computer has gone to sleep.]
MrZYX|off is now known as MrZYX
ndrei has joined #ruby
senayar_ has quit [Remote host closed the connection]
tommyvyo has quit [Remote host closed the connection]
pipecloud has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
senayar has quit [Ping timeout: 278 seconds]
dennus has quit []
vlad_starkov has quit [Remote host closed the connection]
niceguyjames has joined #ruby
javierbuilder has joined #ruby
javierbuilder has quit [Max SendQ exceeded]
pagios has joined #ruby
<pagios> hello i am trying to communicate from my laptop with my ledkeypad connected to the arduino using this code: http://pastebin.com/L4VKWMT1 nothing happens when i press on the keypad
ananthakumaran has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Read error: Connection reset by peer]
<xybre> pagios: well, is that the right port?
dhruvasagar has joined #ruby
<pagios> yes xybre it blinks when i connect to it
ananthakumaran has joined #ruby
wildroman has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 256 seconds]
<xybre> pagios: So the port and the keypad is working, but you don't think your script is sending?
<pagios> yes
<pagios> my script needs to read the keypad strokes
<pagios> it is not
wildroman has joined #ruby
javierbuilder has joined #ruby
javierbuilder has quit [Max SendQ exceeded]
ananthakumaran has quit [Read error: Connection reset by peer]
ndrei has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
<xybre> pagios: can you confirm that your code is getting to the `gets` line?
intuxicated has joined #ruby
ananthakumaran has joined #ruby
mklappstuhl has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ndrei has quit [Read error: Connection reset by peer]
ananthakumaran has joined #ruby
dhruvasagar has joined #ruby
ewnd9 has joined #ruby
colonolGron has joined #ruby
<xybre> Also, why are you nesting the while loops?
<pagios> xybre: it is not getting to the gets
<pagios> while true do
<pagios> print "hi" while (i = sp.gets.chomp) do # see note 2 print "hi2"
<pagios> it prints only hi on the console, not hi2
<xybre> pagios: the gets method is a blocking action, so if it never receives input, it will sit there forever
<pagios> so mainly i am not geting the keypad
kayloos has quit [Read error: Connection reset by peer]
kayloos_ has joined #ruby
<xybre> Thats right, it doesn't appear you are getting anything to read from the SerialPort object
zarubin has quit [Remote host closed the connection]
<pagios> if i inplug the usb when the script is running it seems to output: hihi2�"�#������e��0�����"�
varfoo has joined #ruby
varfoo has quit [Client Quit]
ndrei has joined #ruby
<xybre> pagios: Weird, it must be sending a close signal, or maybe just noise?
kapowaz has joined #ruby
Guest85414__ has joined #ruby
denysonique has joined #ruby
zarubin has joined #ruby
<platzhirsch> the chat is broken
Scorchin has joined #ruby
heidar has joined #ruby
<pagios> platzhirsch: what do you mean
<pagios> is this correct? baud_rate = 9600data_bits = 8stop_bits = 1parity = SerialPort::NONE ?
<platzhirsch> oh nevermind, just saw some nice unicode characters
<xybre> pagios: that's something you'll have to confirm with the documentation for the device
apfelbox has quit [Read error: Connection reset by peer]
pusewicz_ has joined #ruby
stonevil has quit [Remote host closed the connection]
apfelbox has joined #ruby
srji has joined #ruby
dnyy has joined #ruby
ssvo has joined #ruby
kayloos_ has quit [Remote host closed the connection]
hakunin has quit [Ping timeout: 248 seconds]
procrastinat0r has joined #ruby
browndawg has quit [Ping timeout: 248 seconds]
procrastinat0r has quit [Remote host closed the connection]
sayan has joined #ruby
buibex has joined #ruby
alepore has quit [Quit: This computer has gone to sleep]
Lindrian has joined #ruby
<Lindrian> Hello
<Lindrian> Is there a way of limiting backtracking in ruby regex?
ssvo has quit [Ping timeout: 260 seconds]
d2dchat_ has quit [Remote host closed the connection]
Targen has quit [Ping timeout: 245 seconds]
Targen_ has joined #ruby
bluehavana has joined #ruby
nari_ has quit [Ping timeout: 245 seconds]
guilleiguaran_ has joined #ruby
javierbuilder has joined #ruby
javierbuilder has quit [Max SendQ exceeded]
buzzybron has quit [Quit: Leaving.]
mklappstuhl has quit [Remote host closed the connection]
ananthakumaran has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Read error: Connection reset by peer]
niceguyjames has quit [Quit: Computer has gone to sleep.]
mklappstuhl has joined #ruby
snovak has joined #ruby
dhruvasagar has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ananthakumaran has joined #ruby
mikecmpbll has joined #ruby
davidboy has joined #ruby
optimusprimem has quit [Ping timeout: 245 seconds]
chairabanta has joined #ruby
javierbuilder has joined #ruby
javierbuilder has quit [Max SendQ exceeded]
shredding has joined #ruby
ndrei has quit [Ping timeout: 256 seconds]
vlad_starkov has joined #ruby
ndrei has joined #ruby
snovak has quit [Ping timeout: 264 seconds]
ixti has quit [Quit: WeeChat 0.4.1]
xerxas has joined #ruby
camilasan has quit [Remote host closed the connection]
YaNakilon has quit [Quit: Íå ñòîèò ðàññêàçûâàòü âñåãî ñðàçó. Ïîòîìó ÷òî íåäîñêàçàííîñòü - îíà êàê...]
camilasan has joined #ruby
javierbuilder has joined #ruby
lectrick has joined #ruby
javierbuilder has quit [Max SendQ exceeded]
lkba has joined #ruby
alepore has joined #ruby
Asher2 has quit [Quit: Leaving.]
gedanken has quit [Quit: gedanken]
Asher has joined #ruby
platzhirsch has quit [Ping timeout: 245 seconds]
ndrei has quit [Ping timeout: 276 seconds]
ndrei has joined #ruby
javierbuilder has joined #ruby
javierbuilder has quit [Max SendQ exceeded]
platzhirsch has joined #ruby
ziyadb has joined #ruby
javierbuilder has joined #ruby
s0ny123 has joined #ruby
javierbuilder has quit [Max SendQ exceeded]
girija has quit [Read error: Operation timed out]
tommyvyo has joined #ruby
chairabanta has quit [Quit: Leaving...]
Splourian has joined #ruby
alepore has quit [Quit: This computer has gone to sleep]
mattyohe has joined #ruby
randym_ has joined #ruby
nari_ has joined #ruby
tvw has quit [Ping timeout: 256 seconds]
javierbuilder has joined #ruby
javierbuilder has quit [Max SendQ exceeded]
Kelet has quit [Read error: Connection reset by peer]
fourq_ has joined #ruby
keyvan_ has joined #ruby
girija has joined #ruby
kofno has joined #ruby
niceguyjames has joined #ruby
niceguyjames has quit [Client Quit]
intuxicated has quit [Ping timeout: 260 seconds]
yshh has quit [Remote host closed the connection]
javierbuilder has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
javierbuilder has quit [Max SendQ exceeded]
camilasan has joined #ruby
Hanmac has quit [Quit: Leaving.]
ananthakumaran has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
rndstr has joined #ruby
pipecloud has joined #ruby
ananthakumaran has joined #ruby
atmosx has quit [Quit: Lost in trance]
kiri has quit [Ping timeout: 264 seconds]
browndawg has joined #ruby
rubyguy has joined #ruby
kiri has joined #ruby
camilasa_ has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
camilasa_ has quit [Read error: Connection reset by peer]
HavokOC has joined #ruby
karlfreeman has joined #ruby
ismaelrb has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
ismael_ has quit [Remote host closed the connection]
Criztian has joined #ruby
dawkirst has joined #ruby
dhruvasagar has joined #ruby
Criztian has quit [Remote host closed the connection]
kayloos has joined #ruby
InFlames has joined #ruby
Splourian has quit [Quit: Leaving]
<shevy> what is the recommended way to use -W ? do people use that?
kayloos has quit [Remote host closed the connection]
soba has quit [Ping timeout: 245 seconds]
emergion has joined #ruby
sevenseacat has joined #ruby
julweber_ has quit [Remote host closed the connection]
brain_shim has quit [Ping timeout: 264 seconds]
senayar has joined #ruby
azcodex has joined #ruby
orionstein_away is now known as orionstein
kayloos has joined #ruby
greenysan has joined #ruby
<xybre> shevy: I use it through syntastic
gildo has joined #ruby
shvelo has joined #ruby
shvelo has joined #ruby
<Lindrian> how do i read post/get variables in ruby?
<Lindrian> using 1.9.3
<xybre> Lindrian: using what library/framework?
Domon has quit [Remote host closed the connection]
Domon has joined #ruby
ndrei has quit [Ping timeout: 245 seconds]
<Lindrian> none, do i need one?
<Lindrian> just started with ruby
<Lindrian> i want to run a very simple web application, all its going to do is output json.
<Lindrian> so light weight is the way for me.
atno has quit [Read error: Connection reset by peer]
Domon has quit [Remote host closed the connection]
greenysan has quit [Ping timeout: 256 seconds]
Domon has joined #ruby
ndrei has joined #ruby
<shevy> Lindrian one way is through the CGI interface
<shevy> params = CGI.new("html4").params
ewnd9 has quit [Read error: Operation timed out]
Monie has joined #ruby
Zai00 has quit [Quit: Zai00]
senayar has quit [Ping timeout: 276 seconds]
<workmad3> Lindrian: you'll probably find it lighter-weight in terms of development to use sinatra rather than CGI directly though ;)
shvelo has quit [Read error: Connection reset by peer]
ananthakumaran has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Read error: Connection reset by peer]
<Lindrian> The only thing I'll need to receive is POST/GET data, and then the rest can probably be done directly in ruby.
neo_ has joined #ruby
<Lindrian> Then output some JSON.
<Lindrian> thats it.
dkamioka has joined #ruby
<workmad3> yeah, that's really nice and easy in sinatra ;)
julweber has joined #ruby
<Lindrian> shevy: uninitialized constant CGI
<workmad3> that's the sort of stuff it makes nice and quick
<shevy> Lindrian you must require it first
atno has joined #ruby
<shevy> require 'cgi'
dhruvasagar has joined #ruby
<shevy> Lindrian and you should use it through a webserver like apache to access get/post
<Lindrian> oh it works
ananthakumaran has joined #ruby
<shevy> or webrick
<Lindrian> i am
Domon has quit [Ping timeout: 256 seconds]
orionstein is now known as orionstein_away
<Lindrian> so the data im sending shevy is JSON
<Lindrian> how do I decode that request?
mklappstuhl has quit [Read error: Connection reset by peer]
<shevy> dunno, do you have a handle to it already?
<shevy> if so I think it will be a hash datastructure
<shevy> JSON.parse or something
osvico has joined #ruby
Neomex has joined #ruby
mklappstuhl has joined #ruby
<Lindrian> handle?
<shevy> yeah
<shevy> you wrote you send data so somehow you must have a handle already
Hanmac has joined #ruby
<Lindrian> through Javascript,ajax
ndrei has quit [Ping timeout: 276 seconds]
Xeago has joined #ruby
InFlames has quit [Remote host closed the connection]
dhruvasagar has quit [Read error: Connection reset by peer]
failshell has joined #ruby
ssvo has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
buibex has quit [Remote host closed the connection]
Neomex has quit [Client Quit]
dhruvasagar has joined #ruby
ananthakumaran has joined #ruby
quoin has joined #ruby
dkamioka has quit [Remote host closed the connection]
katselphrime has joined #ruby
zero7 has joined #ruby
kizzx2 has quit [Quit: Leaving.]
jleishman has quit [Remote host closed the connection]
Soda has joined #ruby
<Lindrian> thats my code currently
ssvo has quit [Ping timeout: 264 seconds]
<Lindrian> but thats not working, how do I print each variable out?
<r0bgl33s0n> ggg
<r0bgl33s0n> dddd
alepore has joined #ruby
<shevy> Lindrian no
julweber has quit [Ping timeout: 264 seconds]
<shevy> Lindrian first you should make sure that what you pass to JSON.parse is correct data
<shevy> second, I dont know how you want to print that anyway or how you run it. I myself usually write a .cgi file
<Lindrian> okay, how di i do that?
ndrei has joined #ruby
<shevy> I dont use JSON myself
dkamioka has joined #ruby
julweber has joined #ruby
Astralum has joined #ruby
yfeldblum has joined #ruby
nbouscal has joined #ruby
kimosabe_ has joined #ruby
Macaveli has quit [Quit: Computer has gone to sleep.]
yxhuvud has quit [Read error: Connection reset by peer]
ananthakumaran has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Read error: Connection reset by peer]
Spami has joined #ruby
dhruvasagar has joined #ruby
yxhuvud has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
<Lindrian> Whats wrong with this http://hastebin.com/rutiniyava.rb ?
Macaveli has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
abhim has joined #ruby
YaNakilon has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
<shevy> Lindrian is there anything wrong with it?
<RenderRob> does everyone think ruby koans is a good place to start?
ewnd9 has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
jleishman has joined #ruby
<workmad3> renderrob: as an absolutely new coder?
<shevy> in .cgi sites you can't use pp, you would have to use html tags, like puts '<pre>'+data+'</pre>'
<Lindrian> Premature end of script headers
<shevy> Lindrian you forgot to output a proper header
<shevy> Lindrian you should read how .cgi works
<Lindrian> but its .rb
<RenderRob> workmad3, no, I'm a dev, mid level
<workmad3> renderrob: probably not a bad place to start then
<RenderRob> full stack dev
<RenderRob> cool
dhruvasagar has joined #ruby
<workmad3> renderrob: it might bore you a bit at times though ;)
<Lindrian> ty
<shevy> how do you want to use cgi with a .rb file, how do you get the commandline arguments Lindrian
<RenderRob> darn
ananthakumaran has joined #ruby
<Lindrian> shevy: what commandline arguments?
<workmad3> renderrob: but it'll show you a fair bit of ruby syntax, get you familiar with a fair bit of core ruby and make sure you're aware of some of the interesting edge-case 'gotchas' in the syntax
<RenderRob> I see
<workmad3> renderrob: without giving you quite so much hand-holding as a beginners tutorial would
<tagrudev> ydd is a good place to start and end
<RenderRob> Is Sinatra still used much or is that out of favor now because of Rails?
<workmad3> sinatra is still popular for lightweight stuff
<workmad3> sinatra is newer than rails btw
<RenderRob> Oh. I thought it was older
<Lindrian> workmad3: http://www.sinatrarb.com/ this is it?
<RenderRob> ya
Macaveli has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
<shevy> Lindrian I dont know how you get the params to cgi, that was your code, not mine. I use .cgi page, not .rb file, I have no idea why you use a .rb file and not a .cgi file, that was your idea not mine
<Lindrian> shevy: i simply want to send some data from my website to a ruby file for it to be executed in ruby behind the scenes, then have ruby output a json string.
<Lindrian> thats it
<Lindrian> i dont want ruby to output any html or similar
<Lindrian> i just want to utilize the ruby language
<shevy> ok then how do you fetch this data from your website
<workmad3> Lindrian: yeah, that's sinatra
<Lindrian> shevy: in python or php i just send some post data, let the language do its thing, then output a json file which my JS code then picks up
<Lindrian> its a simple ajax call
emergion has quit [Quit: Computer has gone to sleep.]
<Lindrian> workmad3: could you help me set sinatra up with some basic working code?
nhhagen has joined #ruby
ldnunes has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
ananthakumaran has quit [Read error: Connection reset by peer]
<shevy> sinatra is so easy man
dhruvasagar has joined #ruby
<shevy> require 'sinatra'
<shevy> get '/' do
<shevy> 'Hello world!'
<shevy> end
<shevy> arguments to it are available through params
<Lindrian> how do i install it on windows?
<matti> shevy: Pastebin!
<sevenseacat> the sinatra docs are pretty good too
ananthakumaran has joined #ruby
<sevenseacat> lol, windows
<Lindrian> i know.
<shevy> Lindrian use gem
<shevy> gem install sinatra
<shevy> and even when you use windows, if irb works, you can do this all in irb
<shevy> system 'gem install sinatra'
<Lindrian> so what do i type in the command prompt?
<shevy> and even when using windows, there are sinatra docs at http://www.sinatrarb.com/documentation.html
lucazi has joined #ruby
<Lindrian> gem install sinatra?
<shevy> Lindrian I already showed you
<shevy> do I have to repeat it 5555 times
<Lindrian> just two
<shevy> nah
<shevy> <shevy> Lindrian use gem
<shevy> <shevy> gem install sinatra
<Lindrian> no workie
<shevy> it's all there man
javierbuilder has joined #ruby
shredding has quit [Quit: shredding]
<shevy> now you must say how precisely you installed ruby
<sevenseacat> well thats a helpful problem report
javierbuilder has quit [Max SendQ exceeded]
nhhagen has quit [Ping timeout: 245 seconds]
<Lindrian> oh it worked! it just took a couple minutes
<Lindrian> it was not doing anything at first
browndawg has left #ruby [#ruby]
<shevy> good
tvw has joined #ruby
<shevy> now start irb and verify that this works:
<shevy> require 'sinatra'
<Lindrian> what is irb?
<platzhirsch> Lindrian: an interactive ruby interpreter
<_br_> A Read-Eval-Print-Loop shell where you can run Ruby commands immediately to see their result.
<platzhirsch> just start it as a normal program and every input you enter is evaluated
<shevy> Lindrian come on man, start it
<platzhirsch> ^^
dhruvasagar has quit [Read error: Connection reset by peer]
<shevy> even in cmd.exe you should be able to type irb<TAB> here
<Lindrian> => true
<shevy> good
<shevy> now you know that sinatra works
ananthakumaran has quit [Read error: Connection reset by peer]
<shevy> now you have to write some sinatra specific code and save it somewhere
<shevy> I have no idea how you setup your webserver though
rdark has quit [Ping timeout: 248 seconds]
<workmad3> shevy: you start with a rackup file
<sevenseacat> sinatra has one built in too, no?
spider-mario has joined #ruby
<shevy> Lindrian http://www.sinatrarb.com/
dhruvasagar has joined #ruby
<shevy> could be, I forgot
<shevy> I hate those russian .ru files
* sevenseacat seems to recall that from very brief forays into sinatra
Macaveli has quit [Read error: Connection reset by peer]
<workmad3> but that should be as easy as dumping the line 'require_relative "app"' in a config.ru file
ananthakumaran has joined #ruby
zachrab has joined #ruby
<workmad3> or just putting your sinatra code directly in config.ru if it's truly simple stuff :)
zachrab has quit [Client Quit]
Macaveli has joined #ruby
<workmad3> and then 'rackup' in a terminal in the same directory as that
zachrab has joined #ruby
optimusprimem has joined #ruby
optimusprimem has joined #ruby
rdark has joined #ruby
DonRichie has joined #ruby
<Lindrian> waah
jbpros has joined #ruby
rcosta has joined #ruby
<zachrab> whats the best proxy server app for mac os?
<Lindrian> "Someone is already performing on port 4567!"
<workmad3> Lindrian: try 'rackup -p 3000'
<platzhirsch> how would you remove the leading dot from the File.extname("blah/keks.rb") result? [1..-1] ?
guardian_ has joined #ruby
<Lindrian> workmad3: im not using that port myself, but perhaps i have misconfigured ruby and apache
<Lindrian> i see two ruby.exe running
<workmad3> Lindrian: hmm... did you close your IRB session?
DaZ has quit [Ping timeout: 245 seconds]
<Lindrian> ya
<workmad3> dunno then
<workmad3> what happens if you go to 'localhost:4567'? :)
stonevil has joined #ruby
<Lindrian> ah that works.
yshh has joined #ruby
<Lindrian> but this feels weird
<Lindrian> i dont want to have a web server running
<Lindrian> on a different port
blaxter_ is now known as blaxter
shredding has joined #ruby
twoism has joined #ruby
<abhim> What is sinatra used for?
twoism has quit [Remote host closed the connection]
twoism has joined #ruby
stonevil has quit [Remote host closed the connection]
shashank_ has joined #ruby
shashank_ has quit [Remote host closed the connection]
stonevil has joined #ruby
stonevil has quit [Read error: Connection reset by peer]
<shevy> platzhirsch if you have to remove it sure, otherwise you can use [1..-1]
<shevy> platzhirsch but if I must chop off leading characters from a string, and I have a variable, I do usually var[0,1] = ''
stonevil has joined #ruby
<platzhirsch> ok
Xeago has quit [Remote host closed the connection]
buibex has joined #ruby
yshh has quit [Ping timeout: 260 seconds]
ferdev has quit [Quit: ferdev]
<Lindrian> Whats wrong with just having a ruby file that accepts some data and outputs json?
<RenderRob> exit
RenderRob has quit [Quit: Leaving]
rcosta has quit [Remote host closed the connection]
ArchBeOS has quit [Read error: Connection reset by peer]
<shevy> Lindrian nothing wrong with that
ArchBeOS has joined #ruby
niceguyjames has joined #ruby
<shevy> Lindrian but even in your example in python, you needed to have a handle for obtaining the data in the first place
ksh has quit [Quit: ksh]
kimosabe_ has left #ruby [#ruby]
niceguyjames has quit [Client Quit]
claymore has joined #ruby
zastern has joined #ruby
claymore has quit [Changing host]
claymore has joined #ruby
senayar has joined #ruby
<Lindrian> i dont even know what handle means man
<Lindrian> I run flask in python
<Lindrian> but that does not create a new server like sinatra seems to
crus` has joined #ruby
crus has quit [Read error: Connection reset by peer]
eka has joined #ruby
thesheff17 has joined #ruby
<sevenseacat> well you need to serve the app somehow
neo_ has quit [Quit: Leaving]
rockets has quit [Ping timeout: 245 seconds]
dhruvasagar has quit [Ping timeout: 248 seconds]
<Lindrian> okay
<Lindrian> flask in python is a microframework
<sevenseacat> it aint gonna serve itself >_>
<sevenseacat> so how do you serve flask?
<Lindrian> it runs through WSGI
nbouscal has quit [Quit: Computer has commenced electric sheep tracking protocol.]
<shevy> what does that mean
tkuchiki has quit [Remote host closed the connection]
<shevy> cant you just show what code you use in python
<sevenseacat> right, so it talks to another server
<sevenseacat> so it still needs a server
mklappstuhl has joined #ruby
<sevenseacat> you can set up sinatra to be served via apache or something, but for development its easier to just serve it by itself
camilasan has quit [Remote host closed the connection]
<shevy> from flask import Flask
<shevy> @app.route('/', methods=['GET', 'POST'])
<shevy> hmm that is actually indeed very little code
camilasan has joined #ruby
<shevy> how does it know that my_function() must be called though?
camilasan has quit [Remote host closed the connection]
<Lindrian> oh wait, forgot one part
camilasan has joined #ruby
<shevy> !
<shevy> I guess @app.route is the same as using "get" in sinatra
<shevy> ok but
<shevy> this still does not explain how they know that my_function() must be called
<Lindrian> it has @app.route decorator
<shevy> does flask assume that all functions defined in a file must be used?
<Lindrian> no.
<Hanmac> shevy what do you think about "frozen string"f ;P
kayloos has quit [Remote host closed the connection]
mmitchell has quit [Remote host closed the connection]
<shevy> hanmac what is the f doing
<Lindrian> shevy: i want something similar to that python code, but in ruby
<Lindrian> simple and easy
senayar has quit [Remote host closed the connection]
<shevy> Lindrian I still do not know how you mysteriously can call my_function() in that code and say that this works
yalue has joined #ruby
<Lindrian> the decorator says it all
senayar has joined #ruby
<shevy> magic
<Lindrian> yes.
<shevy> whatever the name, it will be called
<shevy> what if you add 100 functions
ssvo has joined #ruby
<Hanmac> shevy an f after a string marks a string as frozen ( an b maybe would mark a string as binary) but this is nightly stuff ;P
<shevy> how does it figure out which one to call?
starfox21 has joined #ruby
<Lindrian> shevy: it calls the one with the decorator on it.....
<shevy> aha
<shevy> now I understand
mikecmpbll has quit [Quit: Computer has gone to sleep.]
<shevy> that reminds me of how "private" in ruby works
ananthakumaran has quit [Read error: Connection reset by peer]
jlebrech has joined #ruby
mwmnj has joined #ruby
<Lindrian> now you see what i really want to do shevy, can i do something similar in ruby?
osvico has quit [Ping timeout: 264 seconds]
ananthakumaran has joined #ruby
jdenen has joined #ruby
<shevy> Lindrian possible sure but probably not with just a few lines of code, ruby does not have such pre-defined decorators as python has for instance
<Lindrian> okay
<shevy> it would be nice to do so without rack
ssvo has quit [Ping timeout: 256 seconds]
<shevy> I have an idea
kvirani has joined #ruby
yacks has quit [Quit: Leaving]
<Lindrian> the first thing you said, about cgi.new().params
<Lindrian> seems to be the cloest thing to do what i want
<Lindrian> without any frameworks
<shevy> Lindrian, http://pastie.org/8297295
<shevy> well I thought you needed something on the web
<shevy> I did not know you only need to fetch data
<shevy> Lindrian, if you save this as .rb file and run it
<shevy> you can go to: localhost:2000/
<shevy> and it will output Hello world on the cmd.exe
Zai00 has joined #ruby
<Lindrian> i just want the code to run and output data like that
<Lindrian> thats it
<Lindrian> thats my python code running
nari_ has quit [Ping timeout: 264 seconds]
<shevy> then change what you return from it
<shevy> in your method, return this
<shevy> probably via JSON something something
<Lindrian> yes
<Lindrian> but your code seems to start a web server
<shevy> because I need to fetch the data somewhere
okinomo_ has quit [Ping timeout: 248 seconds]
okinomo has quit [Ping timeout: 248 seconds]
snovak has joined #ruby
mikecmpbll has joined #ruby
kayloos has joined #ruby
<shevy> even in your code you use some client
<Lindrian> why cant just apache serve?
<shevy> then let it serve
<Lindrian> flask is served by the web server; apache.
<shevy> but where is your handle
Maokomioko has joined #ruby
gr33n7007h has joined #ruby
<shevy> from where do you get the data
<Lindrian> that i send to it?
<shevy> sure
<Lindrian> once again, simple ajax call through javascript
nari_ has joined #ruby
<shevy> flask is doing all of this behind the scenes?
<gr33n7007h> Why does Socket.gethostbyname('www.google.com') return some sort of hex instead of ip addr
Maokomioko is now known as Maoko
<Lindrian> no shevy
<Lindrian> javascript send a POST request with JSON data to the python code
<sevenseacat> 'some sort of hex'?
<shevy> gr33n7007h hmm odd
<sevenseacat> what kind of hex?
<shevy> # => ["www.google.com", [], 2, "@\x0Fqb", "@\x0Fqm", "@\x0Fq{", "@\x0Fqr", "@\x0FqY", "@\x0Fql", "@\x0Fqw", "@\x0FqT", "@\x0Fq^", "@\x0Fqq", "@\x0Fq]", "@\x0Fqc", "@\x0Fqg", "@\x0Fqv"]
<sevenseacat> an ipv6 address?
<gr33n7007h> "\xAD\xC2)\xB2"
<sevenseacat> o.O
nari_ has quit [Read error: Connection reset by peer]
snovak has quit [Read error: Operation timed out]
<gr33n7007h> How to get the ip addr of google
<shevy> Lindrian I have no idea how json works, I figure in ruby it will work similar http://stackoverflow.com/questions/5410682/parsing-a-json-string-in-ruby
ryannielson has joined #ruby
<shevy> gr33n7007h, ip = IPSocket.getaddress 'www.google.com'
ehc has joined #ruby
<gr33n7007h> shevy, lemme check that
<Lindrian> shevy: ok i wont confuse you with json
ismaelrb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alekst has joined #ruby
srji has quit [Ping timeout: 264 seconds]
<Lindrian> shevy: i can do this aswell python_file.py?this=is&some=data
<Lindrian> thats GET
<shevy> this is what ruby cgi does too
<gr33n7007h> shevy, Perfect thanks
kayloos has quit [Remote host closed the connection]
<Lindrian> okay, so I don't need anything but CGI then shevy.
shunt has joined #ruby
<shevy> where this will become a key called "this" and its value is "is"
<shevy> and "some" is another key with "data" being its value
<Lindrian> yep
mmozuras has joined #ruby
<Lindrian> thats what i want
<shevy> well, CGI is one way
<shevy> I am sure there are more ways, rails somehow does it, ramaze does it, sinatra does it
mmozuras has quit [Client Quit]
rcosta has joined #ruby
<shevy> I was too lazy to learn rails :(
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Lindrian> but those are full fledged frameworks
<Lindrian> if vanilla ruby supports it, thats all i need.
Uranio has joined #ruby
<shevy> well CGI
<shevy> "The standard CGI environmental variables are available as read-only attributes of a CGI object. The following is a list of these variables:"
rcosta has quit [Remote host closed the connection]
<shevy> I guess there is some spec that mentions these variables
ryandeussing has quit [Remote host closed the connection]
<sevenseacat> rails is awse.
<shevy> AUTH_TYPE
<shevy> REMOTE_ADDR
<shevy> is flask standard python? as in when I compile python from source, flask is available?
nbouscal has joined #ruby
nbouscal has quit [Client Quit]
tk__ has joined #ruby
<shevy> ImportError: No module named 'flask'
<shevy> ok so it is an addon
<shevy> in order to be equal, we need to compare other addons too :D
poga has joined #ruby
<Lindrian> no flask is not standard
<Lindrian> if you have something as lightweight and simple as flask, shoot.
<shevy> Lindrian, someone in #sinatra said that https://gist.github.com/dariocravero/6436274 should be equivalent to the code you wrote in python
JohnBat26 has quit [Ping timeout: 273 seconds]
<shevy> it's hard to compare because I have no idea how flask works and barely any idea outside cgi either ;)
ismaelrb has joined #ruby
zarubin has quit [Remote host closed the connection]
<shevy> I hate cgi but it was also enough for me to get query params through an URL and I never wanted more complicated stuff... save for redirections or sane URLs perhaps
bluOxigen has joined #ruby
orionstein_away is now known as orionstein
<Lindrian> thats what i want to do too, query params
<Lindrian> query params through post and get
blueOxigen has quit [Ping timeout: 248 seconds]
Bira has joined #ruby
brbcoding has joined #ruby
ewnd9 has quit [Ping timeout: 264 seconds]
browndawg has joined #ruby
rcosta has joined #ruby
stonevil has quit [Remote host closed the connection]
rcosta has quit [Remote host closed the connection]
krzkrz has quit [Quit: krzkrz]
lord1234 has joined #ruby
nari_ has joined #ruby
claymore_ has joined #ruby
dEPy has joined #ruby
<dEPy> Hi all
<dEPy> I've installed rbenv on my mac and ruby 2.0.0-rc2
zarubin has joined #ruby
sst66 has quit [Ping timeout: 256 seconds]
<dEPy> if I do ruby -v it shows right version, but when i go "gem install bundler" it installs it under 1.8.7 ruby
<dEPy> and "rbenv which gem" shows 2.x version also
<dEPy> any ideas? (it's on MacOS)
kaldrenon has joined #ruby
sst66 has joined #ruby
<Hanmac> dERy that means that your PATH is wrong and does not have the rbenv stuff inside
<Hanmac> maybe
claymore has quit [Ping timeout: 276 seconds]
nbouscal has joined #ruby
jealous-pated77 has quit [Quit: jealous-pated77]
jp- has joined #ruby
<Hanmac> dEPy so "gen env" shows you 1.8.7 ?
<Hanmac> "gem env"
wildroman has quit [Remote host closed the connection]
tenner36 has joined #ruby
<dEPy> no, shows 2.0.0-rc2
<dEPy> oh wait, it says bundle is now installed on 2.x
sailias has joined #ruby
devoldmx3 has joined #ruby
<dEPy> but, when I run bundle it complains about ":" and wrong syntax which seems like it's using older version?
twoism_ has joined #ruby
adkron_ has joined #ruby
<Hanmac> hm yeah the ":" on an when is wrong syntax … in which file does it happen?
devoldmx has quit [Ping timeout: 276 seconds]
<dEPy> in Gemfile
pranny1 has quit [Quit: Leaving.]
<dEPy> on this line: gem 'devise', github: 'plataformatec/devise', branch: 'master' # Authentication
lord1234 has left #ruby [#ruby]
<Hanmac> hm yeah then maybe the gemfile is broken
ananthakumaran has quit [Read error: Connection reset by peer]
<dEPy> It's not likely cause it works fine on my linux machine
claymore_ has quit [Ping timeout: 264 seconds]
twoism has quit [Ping timeout: 264 seconds]
<Hanmac> hm no this is vaild in ruby … i think you should pick an newer version, not the rc
twoism_ has quit [Ping timeout: 245 seconds]
iamjarvo has joined #ruby
ananthakumaran has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
visof has quit [Ping timeout: 264 seconds]
<dEPy> but rc-2 is the newest I think :)
locriani has quit [Remote host closed the connection]
Spami has joined #ruby
claymore_ has joined #ruby
<sevenseacat> see channel topic
<sevenseacat> no it is not
browndawg has left #ruby [#ruby]
himsin has quit [Quit: himsin]
Hanmac has left #ruby [#ruby]
Hanmac has joined #ruby
krawchyk has joined #ruby
<dEPy> hm, ok
<dEPy> i'll try that
tkuchiki has joined #ruby
ndrei has quit [Ping timeout: 261 seconds]
ndrei has joined #ruby
niceguyjames has joined #ruby
Bira has quit [Remote host closed the connection]
girija has quit [Ping timeout: 245 seconds]
ferdev has joined #ruby
colonolGron has quit [Quit: Lost terminal]
burlyscudd has joined #ruby
starfox21 has quit [Quit: starfox21]
snovak has joined #ruby
Monie has joined #ruby
sambao21 has joined #ruby
Bira has joined #ruby
jerius has joined #ruby
wildroman has joined #ruby
jerius has quit [Max SendQ exceeded]
ananthakumaran has quit [Read error: Connection reset by peer]
jerius has joined #ruby
devoldmx has joined #ruby
jerius has quit [Client Quit]
devoldmx3 has quit [Read error: Connection reset by peer]
mwmnj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ananthakumaran has joined #ruby
pumper has joined #ruby
<dEPy> hm, ok problem is not what I thought it was
ferdev has quit [Ping timeout: 276 seconds]
<dEPy> seems like bundle calls old version of gem or something already installed on macos
senayar_ has joined #ruby
Tania has joined #ruby
nbouscal has quit [Quit: Computer has commenced electric sheep tracking protocol.]
<dEPy> Have no idea how to remove it, gem list doesn't show it
ryandeussing has joined #ruby
mwmnj has joined #ruby
mwmnj has quit [Max SendQ exceeded]
Tania has left #ruby ["http://miranda-im.org"]
phantasm66 has joined #ruby
<dEPy> ah ok found the b1tch
<dEPy> had to uninstall rbenv ruby version then uninstall bundler
devoldmx has quit [Ping timeout: 258 seconds]
mark_locklear has joined #ruby
MrZYX is now known as MrZYX|off
locriani has joined #ruby
Astral_ has joined #ruby
senayar has quit [Ping timeout: 260 seconds]
corpuscle has quit [Quit: WeeChat 0.4.1]
kayloos has joined #ruby
girija has joined #ruby
breakingthings has joined #ruby
jbrechtel has joined #ruby
buibex has quit [Remote host closed the connection]
niceguyjames has quit [Quit: Textual IRC Client: www.textualapp.com]
buibex has joined #ruby
DrShoggoth has quit [Quit: Leaving]
Astralum has quit [Ping timeout: 248 seconds]
ssvo has joined #ruby
<Lindrian> Is there any way to control backtracking of the regex engine in ruby?
locriani has quit [Ping timeout: 245 seconds]
<Hanmac> Lindrian yeah, use it or dont use it
hogeo has quit [Remote host closed the connection]
allsystemsarego has quit [Quit: Leaving]
<Lindrian> ...what?
okinomo has joined #ruby
<platzhirsch> What's the correct way of adding module methods to another module?
hogeo has joined #ruby
<Lindrian> hanmac: What are you on about?
<dEPy> ok another problem, now I installed bundler gem inside rbenv 2.0.0-p247 ruby
<dEPy> and it doesn't recognize "bundle" command
<Hanmac> Lindrian: did you read there http://www.ruby-doc.org/core-2.0/Regexp.html about ?
ssvo has quit [Ping timeout: 245 seconds]
jbrechte_ has joined #ruby
<dEPy> nevermind, rehash
jbrechtel has quit [Ping timeout: 264 seconds]
<Lindrian> hanmac: I didnt find anything about backtracking comtrol
Xeago has joined #ruby
jordanbsanders has joined #ruby
ferdev has joined #ruby
visof has joined #ruby
<Hanmac> Lindrian: fourth section from the last before Constants, search the site for "backtracking"
<platzhirsch> okay, I didn't know it had to be so complicate to add module methods to another http://stackoverflow.com/questions/4662722/extending-a-ruby-module-in-another-module-including-the-module-methods
okinomo_ has joined #ruby
<Lindrian> All i see is atomic grouping hanmac
mlpinit has joined #ruby
<Lindrian> Not what i need
ewnd9 has joined #ruby
<Hanmac> Lindrian: you never really tell us what do you need
hogeo has quit [Remote host closed the connection]
<Lindrian> I need to limit backtracking attempts. Like max_backtrack=100000
<Lindrian> Or something
<Lindrian> Is that possible?
Monie has quit [Quit: Textual IRC Client: www.textualapp.com]
<Hanmac> Lindrian, not with ruby currently (but it maybe your regexp fault)
<Lindrian> Alright
Zai00_ has joined #ruby
<Lindrian> Can you time out a function if it runs for too long?
<_br_> Sure, timeout module
jamesaanderson has joined #ruby
pedda has joined #ruby
<Lindrian> Neat
senayar_ has quit [Remote host closed the connection]
jordanbsanders has quit [Quit: Textual IRC Client: www.textualapp.com]
<Lindrian> Does this exist in 1.9.3?
<crunch-choco> bibip, <<EOF breaks on quote, is there a way to avoid that problem?
Zai00 has quit [Ping timeout: 276 seconds]
Zai00_ is now known as Zai00
senayar has joined #ruby
michaellynch has joined #ruby
Squarepy has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
JumpMast3r has joined #ruby
ananthakumaran has joined #ruby
vramana has joined #ruby
kayloos has quit [Remote host closed the connection]
jerius has joined #ruby
iamjarvo has quit [Remote host closed the connection]
iamjarvo has joined #ruby
<crunch-choco> for instance I want this <<EOF #{variable} EOF, where variable = "Home"
mmitchell has joined #ruby
robscomputer_ has quit [Ping timeout: 272 seconds]
fgo has quit [Read error: Connection reset by peer]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dhruvasagar has joined #ruby
fgo has joined #ruby
michaellynch has quit [Ping timeout: 245 seconds]
mmitchell has quit [Remote host closed the connection]
<vramana> Hi, I don't have any knowledge of ruby. But I am trying to install this https://github.com/feedbin/feedbin on Ubuntu 12.04. So far I have installed Ruby 2.0.0-p247 using rvm. then "bundler" gem and postgres-9.2.4 I cloned the feedbin git repo entered the directory.
Macaveli has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
<vramana> When I try to run bundle. The terminal is showing an error like this ERROR: RVM Ruby not used, run `rvm use ruby` first.
iamjarvo has quit [Ping timeout: 240 seconds]
mmitchell has joined #ruby
<vramana> Can somebody please help
<vramana> ??
<_br_> crunch-choco: Doesn't break on quote for me.
JDHankle has joined #ruby
predator217 has quit [Remote host closed the connection]
mpereira has joined #ruby
persand has quit [Quit: persand]
dEPy has quit [Remote host closed the connection]
<crunch-choco> _br_: oh oops, i guess my script is bugged elsewhere
Maoko has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kpshek has joined #ruby
ffranz has joined #ruby
<wuest> vramana: sounds like you need to make sure rvm is being used. Try rvm use --default 2.0.0
jamesaanderson has joined #ruby
MrZYX|off is now known as MrZYX
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
tommyvyo has joined #ruby
hasrb has joined #ruby
Hanmac has quit [Quit: Leaving.]
<vramana> wuest: This is what I am getting http://pastebin.com/x1tMem2K
<wuest> vramana: the instructions it's giving you are pretty clear... Are you not at all familiar with Unix terminals?
pranny has joined #ruby
vramana has quit [Quit: ChatZilla 0.9.90.1 [Firefox 23.0/20130803215302]]
predator117 has joined #ruby
crus` has quit [Ping timeout: 260 seconds]
kayloos has joined #ruby
ZoanthusR has joined #ruby
pabloh has joined #ruby
crus has joined #ruby
pranny has quit [Client Quit]
verto has joined #ruby
kayloos has quit [Remote host closed the connection]
interactionjaxsn has joined #ruby
girija has quit [Ping timeout: 264 seconds]
mcat1 has joined #ruby
kirun has joined #ruby
Hanmac has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
codecop has quit [Remote host closed the connection]
gr33n7007h has quit [Quit: Where's John Conner]
RobW_ has joined #ruby
kayloos has joined #ruby
stonevil has joined #ruby
krzkrz has joined #ruby
sr78ger has quit [Quit: Textual IRC Client: www.textualapp.com]
girija has joined #ruby
DrCode has quit [Ping timeout: 240 seconds]
BillCriswell has joined #ruby
mcat1 has left #ruby [#ruby]
yacks has joined #ruby
catphish has joined #ruby
jlast has joined #ruby
dkamioka has quit [Read error: Connection reset by peer]
yacks has quit [Remote host closed the connection]
devoldmx has joined #ruby
<catphish> is net::http being unreasonable here: http://paste.codebasehq.com/pastes/jrsltbek8r5zmnnz0t
<catphish> or am i doing something wrong?
ananthakumaran has quit [Read error: Connection reset by peer]
filipe has quit [Ping timeout: 248 seconds]
yacks has joined #ruby
niceguyjames has joined #ruby
krzkrz has quit [Client Quit]
filipe has joined #ruby
jocellyn has joined #ruby
jocellyn has left #ruby [#ruby]
krz has joined #ruby
krz has joined #ruby
krz has quit [Changing host]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
swordsmanz has left #ruby [#ruby]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
Maokomioko has joined #ruby
zachrab has quit [Remote host closed the connection]
burlyscudd has quit [Quit: Leaving.]
Maokomioko has quit [Client Quit]
Nisstyre-laptop has joined #ruby
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
zachrab has joined #ruby
<wuest> catphish: URI doesn't play nice with IP6 addresses. This is a longstanding issue, afaik.
mary5030 has joined #ruby
DrCode has joined #ruby
<catphish> wuest: i figured that was the issue, but i can't even find a workaround, since net::http seems to depend on uri
<catphish> short of moving to a 3rd party http library
devoldmx3 has joined #ruby
<wuest> I'm not aware of a solution. :/
kjellski has quit [Ping timeout: 260 seconds]
MrThePlague has joined #ruby
zachrab has quit [Remote host closed the connection]
<workmad3> catphish: docs seem to reckon you need to wrap the ipv6 address in []
devoldmx has quit [Ping timeout: 264 seconds]
tabolario has joined #ruby
gyre008 has joined #ruby
<catphish> i did try that, but then it tries to resolve it, because at that point it treats it as a hostname
<workmad3> >> require 'uri'; puts URI("//[2a00:67a0:a:2::141]").host
<eval-in> workmad3 => [2a00:67a0:a:2::141] ... (https://eval.in/46692)
rcedillor has joined #ruby
zachrab has joined #ruby
burlyscudd has joined #ruby
<catphish> workmad3: that might work if i pass it as a URI, the downside is i have to add code to detect ipv6 addresses and wrap them
wicketn01b has quit [Ping timeout: 260 seconds]
<lupine> it's a bit of a pain, aye
wicketn00b has joined #ruby
<workmad3> catphish: hmm, doesn't it need to be resolved in order to make the request? :)
* lupine checks what he did when confronted by this
zoee has quit [Quit: zoee]
<catphish> workmad3: no, it's an ip address :)
rodacato has joined #ruby
marcgg has joined #ruby
snath has quit [Ping timeout: 245 seconds]
<workmad3> catphish: right, so it doesn't need to undergo DNS resolution
v0n has joined #ruby
* workmad3 has to admit, he hasn't really dealt with anything ipv6 related yet
<catphish> correct, but if you put it in square brackets, URI likes it, but net::http doesn't recognise it as an IP
nari_ has quit [Quit: Ex-Chat]
<lupine> uh-oh
<lupine> I didn't actually fix it
gyre007 has quit [Ping timeout: 264 seconds]
Criztian has joined #ruby
<lupine> I just used hostnames and added the mapping to /etc/hosts instead
<catphish> lol
<lupine> I did this for postgres's db adapter too
<lupine> ipv6 literals cause a lot of pain
<catphish> i might just require up another http library
<catphish> simpler that way
jbpros has quit [Quit: jbpros]
marcgg_ has quit [Ping timeout: 248 seconds]
<workmad3> catphish: it would need to be one that doesn't use ruby's Socket library
persand has joined #ruby
<workmad3> catphish: as my quick googling seems to indicate that's where the problem propagates from
<catphish> workmad3: i disagree, i understood ruby's sockets to be fine with ipv6
<catphish> but i guess i'll see
<lupine> the issue is that [2001::1] is interpreted as a domain name that needs resolving
shaunbaker has quit [Remote host closed the connection]
ravster has joined #ruby
sst66 has quit [Ping timeout: 248 seconds]
platzhirsch has quit [Quit: Leaving.]
splittingred has joined #ruby
shaunbak_ has joined #ruby
ssvo has joined #ruby
<workmad3> yeah, seems to be that socket doesn't like [ipv6], which is what net/http gives it
devoldmx3 has quit [Ping timeout: 268 seconds]
<catphish> oh yeah, because [::1] is neither a hostname nor an ip address
<catphish> the bug is in http though, not the socket itself
<workmad3> and that http://[ipv6] is how you're meant to specify ipv6 addresses in a URI
<catphish> net::http *should* detect square brackets in the URL and strip them before passing it to Socket
<catphish> but it doesn't :(
<workmad3> looks that way
clocKwize has joined #ruby
<catphish> and it *should* add square brackets when specifying an ipv6 address as the ip to connect to before building the URI
<catphish> but it doesn't do that either
<workmad3> URI will leave the [] in on a .host call, strips them out on a .hostname call
rhys_ has joined #ruby
<catphish> makes sense, the bug is purely in net::http itelf then
rhys_ is now known as Guest77577
sst66 has joined #ruby
stonevil has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 264 seconds]
<catphish> thanks for looking anyway
<catphish> i'll just find another http library for now
michaellynch has joined #ruby
stonevil has joined #ruby
pedda has quit [Quit: Textual IRC Client: www.textualapp.com]
devoldmx has joined #ruby
ssvo has quit [Ping timeout: 240 seconds]
<shevy> how to properly subclass from hash
<shevy> class MyFoo < Hash
<shevy> def initialize(*i)
<shevy> super(*i)
<workmad3> shevy: you don't
<shevy> ???
<shevy> waaaah :( why not
thesheff17 has quit [Read error: Operation timed out]
<workmad3> shevy: because it fails in mayn ways
<workmad3> *many
<shevy> hmm
ananthakumaran has quit [Quit: Leaving.]
arunagw has joined #ruby
<workmad3> shevy: wrap the hash in your own class rather than subclass
hogeo has joined #ruby
stonevil_ has joined #ruby
<workmad3> shevy: a lot of the hash methods will create a new hash, which will not be of your subclass type
<Hanmac> shevy its like subclassing integer or TrueClass, it may not be a good idea ;P
mansi has joined #ruby
<shevy> I would not have this idea with integer because integer is rather useless :P
ndrei has joined #ruby
<workmad3> well, with Integer and TrueClass, it's pretty much impossible to have a useful subclass :)
michaellynch has quit [Remote host closed the connection]
<workmad3> so they're just not good ideas
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<workmad3> with things like Hash and Array, because they're built into core syntax what you end up with is a bad idea rather than a 'well, it's kinda pointless' idea
michaellynch has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
cody-- has joined #ruby
<workmad3> shevy: here's an article about some of the weird side-effects: http://words.steveklabnik.com/beware-subclassing-ruby-core-classes
ayaz has quit [Quit: Textual IRC Client: www.textualapp.com]
stonevil has quit [Ping timeout: 256 seconds]
tilmans has joined #ruby
arunagw has quit [Client Quit]
Kabaka has quit [Ping timeout: 240 seconds]
tilmans has quit [Remote host closed the connection]
azcodex has quit [Quit: azcodex]
tilmans has joined #ruby
rgbdev has joined #ruby
Rym has joined #ruby
braoru has quit [Remote host closed the connection]
<shevy> hmm
maletor has joined #ruby
mikecmpbll has joined #ruby
robscomputer has joined #ruby
deception has joined #ruby
tagrudev has quit [Remote host closed the connection]
robscomputer has quit [Remote host closed the connection]
kpshek has quit []
KevinSjoberg has quit [Quit: Computer has gone to sleep.]
starfox21 has joined #ruby
boblu has joined #ruby
lukec has joined #ruby
dml has joined #ruby
robscomputer has joined #ruby
dml is now known as Guest19311
ismaelrb has quit [Quit: Textual IRC Client: www.textualapp.com]
Cyrus_ has quit [Quit: Cyrus.sleep()]
optimusprimem has quit [Ping timeout: 245 seconds]
avril14th has quit [Remote host closed the connection]
iamjarvo has joined #ruby
jamesaanderson has joined #ruby
iamjarvo has quit [Read error: Connection reset by peer]
jbpros has joined #ruby
iamjarvo has joined #ruby
a13x212 has left #ruby [#ruby]
iamjarvo has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
browndawg has joined #ruby
noopq has quit [Ping timeout: 256 seconds]
mary5030 has quit [Remote host closed the connection]
jamesaanderson has quit [Client Quit]
shunt has quit [Ping timeout: 260 seconds]
julweber has quit [Remote host closed the connection]
thesheff17 has joined #ruby
pothibo has quit [Quit: pothibo]
lusory has quit [Ping timeout: 264 seconds]
iamjarvo_ has joined #ruby
alepore has quit [Quit: This computer has gone to sleep]
Guest19311 has quit [Quit: Textual IRC Client: www.textualapp.com]
jbpros has quit [Quit: jbpros]
dml_ has joined #ruby
acrussell has joined #ruby
acrussell has left #ruby [#ruby]
jordanbsanders has joined #ruby
DrShoggoth has joined #ruby
tilmans has quit [Remote host closed the connection]
dml_ has quit [Client Quit]
gusnasis has joined #ruby
iamjarvo has quit [Ping timeout: 245 seconds]
dml_ has joined #ruby
poga has quit [Remote host closed the connection]
abhim has quit [Ping timeout: 245 seconds]
Nisstyre-laptop has quit [Remote host closed the connection]
angusiguess has quit [Ping timeout: 245 seconds]
niceguyjames has quit [Quit: Computer has gone to sleep.]
tilmans has joined #ruby
huoxito has joined #ruby
<shevy> hmm we have File.extname
tesuji_ has quit [Ping timeout: 264 seconds]
poga has joined #ruby
<shevy> is there the reverse.. or rather, how to get all but the extname ?
starfox21 has quit [Ping timeout: 245 seconds]
robscomputer has quit [Ping timeout: 268 seconds]
gyre008 has quit [Remote host closed the connection]
<Hanmac> File.basename ?
gyre007 has joined #ruby
mrsolo has joined #ruby
dhruvasagar has joined #ruby
quoin has quit [Remote host closed the connection]
starfox21 has joined #ruby
lukec has quit [Quit: lukec]
<shevy> that does not seem to do anything
<catphish> i gave up and wrote my own 2-line http client for what was supposed to be an incredibly simple task :)
<shevy> File.basename "foo.pdf" # => "foo.pdf"
<shevy> File.extname 'foo.pdf' # => ".pdf"
<Hanmac> shevy: File.basename(s,File.extname(s))
<shevy> nice
<shevy> that's better than my current solution via .gsub
pothibo has joined #ruby
aryaching has joined #ruby
<Hanmac> hm basename also cuts the dir … :/
robscomputer has joined #ruby
dross_ has joined #ruby
Skylab has joined #ruby
vlad_sta_ has joined #ruby
<Hanmac> shevy so do you need the dir too? if yes use File.join( File.dirname(s),File.basename(s,File.extname(s))) … or something like rhat (maybe you can use Pathname?)
vlad_starkov has quit [Read error: Connection reset by peer]
<shevy> I dont need the dir
_serial_ has joined #ruby
<shevy> but with File.join it becomes really ugly and verbose
<shevy> like java
angusigu1ss has joined #ruby
stonevil_ has quit [Remote host closed the connection]
tobago has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
gyzmodo has joined #ruby
<Hanmac> shevy: how to park a car - NASA Style: https://i.chzbgr.com/maxW500/7744937216/h97B537C2/
diegoviola has joined #ruby
mary5030 has joined #ruby
gyzmodo has left #ruby [#ruby]
gyzmodo has joined #ruby
gyzmodo has left #ruby [#ruby]
azcodex has joined #ruby
tonni has quit [Remote host closed the connection]
<shevy> hanmac well
visof has quit [Ping timeout: 240 seconds]
<shevy> they got lots of money to do all those things
kobain has joined #ruby
Macaveli has quit [Quit: Computer has gone to sleep.]
angusigu1ss has quit [Read error: Connection reset by peer]
burlyscudd has quit [Quit: Leaving.]
Tomasso has joined #ruby
jerius has quit [Ping timeout: 256 seconds]
fmcgeough has joined #ruby
ahegyi has joined #ruby
julweber has joined #ruby
Macaveli has joined #ruby
alex__c2022 has joined #ruby
<Tomasso> i have a class named Context, but it gets confused with other class. I declared a module around it, and in my code referenced it as mapping::Context but I get "class/module name must be CONSTANT (SyntaxError)"
ahawkins has quit [Quit: leaving]
mary5030 has quit [Remote host closed the connection]
jerius has joined #ruby
filipe has quit [Ping timeout: 264 seconds]
tk__ has quit [Quit: ばいばい]
taion809 is now known as zzz_taion
_serial_ has quit [Quit: Ex-Chat]
Macaveli has quit [Client Quit]
yshh has joined #ruby
<hoelzro> Tomasso: your module's name probably needs to be Mapping
optimusprimem has joined #ruby
optimusprimem has joined #ruby
rgbdev has quit [Quit: rgbdev]
alup has quit [Read error: No route to host]
iamjarvo has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
<Tomasso> ,, uppercase
iamjarvo_ has quit [Ping timeout: 240 seconds]
<hoelzro> exactly.
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<Lindrian> im submitting POST data with content type application/json to a ruby file. How do I parse it and get data out of it?
mpereira has quit [Remote host closed the connection]
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jprovazn has quit [Quit: Leaving]
<catphish> the json gem will help you
jprovazn has joined #ruby
Soda has quit [Read error: Connection reset by peer]
<Lindrian> im using it, but when i do json.parse() i get an error like "cant convert string to hash" or similar
<Tomasso> you were right thansks
<Lindrian> the data sent is correct json
enebo has joined #ruby
fgo has quit [Remote host closed the connection]
sayan has quit [Ping timeout: 264 seconds]
<workmad3> Lindrian: you're doing my_json = JSON.parse(string_from_request)?
krz has quit [Ping timeout: 240 seconds]
<workmad3> Lindrian: and then treating 'my_json' as a ruby hash?
io_syl has joined #ruby
kayloos has quit [Remote host closed the connection]
jprovazn has quit [Client Quit]
atyz has joined #ruby
<Lindrian> right now i dont get an error, but i get no result either.
mpereira has joined #ruby
mansi has quit [Remote host closed the connection]
<Lindrian> I'm doing post_data = JSON.parse(CGI.new("html4").params)
<Lindrian> shouldnt i be able to do post_data["key"] then?
sevenseacat has quit [Quit: Leaving.]
tilmans has quit [Quit: tilmans]
<workmad3> Lindrian: I thought you were using sinatra now? or did you go back to raw CGI?
robscomputer has quit [Read error: Connection reset by peer]
robscomputer_ has joined #ruby
<hoelzro> isn't CGI...dead?
<hoelzro> like, really dead?
<workmad3> Lindrian: and the body of your request is the JSON string, yes? no form encoding or anything silly?
<Lindrian> its application/json, straight up and down
<Lindrian> workmad3: sinatra hosted its own web server and stuff, i dont want that
<workmad3> Lindrian: so in sinatra, it should just be something like 'post_data = JSON.parse(request.body)'
<Lindrian> i just want to retreive POST data, calculate stuff, output json. the end.
<Lindrian> apache is my web server, i want no other.
<workmad3> Lindrian: sinatra needs an app server... yes... but you can choose what you want for that
<workmad3> Lindrian: such as the passenger module for apache
<Lindrian> so i can install a module for apache to serve sinatra?
<workmad3> yes
<workmad3> it's called phusion_passenger
<Lindrian> now thats more interesting.
<Todd> and it works for lots of things
wallerdev has joined #ruby
Bira has quit [Remote host closed the connection]
filipe has joined #ruby
<workmad3> rackup just makes a choice of a simple app server to run with, rather than forcing everyone to use apache and passenger
clocKwize has quit [Quit: clocKwize]
<Todd> I like to think of it as a development server
s0ny123 has quit [Quit: Lost terminal]
<Todd> you start talking about passenger in production (devops handles all that madness)
<workmad3> ^^ :)
buibex has quit [Remote host closed the connection]
<workmad3> although I tend to use something other than passenger for my app server
<Lindrian> ugh, so much setup
d2dchat_ has joined #ruby
<Todd> is this a small home machine or what?
ahegyi_ has joined #ruby
Bira has joined #ruby
<Lindrian> im using apache
<Lindrian> also, my test box is running windows unfortunately
Spami has quit [Quit: This computer has gone to sleep]
<Todd> I'm so sorry for your loss.
<Todd> I forgot my laptop the other day. They offered me a loaner windows machine. I took a sick day.
<Lindrian> i literally need the most lightweight basic framework in the entire world.
ahegyi has quit [Ping timeout: 264 seconds]
<Lindrian> Receive POST/GET, do stuff, print JSON. The end.
<Todd> sorry
catphish has left #ruby ["Leaving"]
<Todd> that's as light weight as you're going to get in ruby :)
<Lindrian> okay, how do I use it?
tonni has joined #ruby
<Todd> I really don't want to be that guy.
RORgasm has joined #ruby
<Todd> but I'd probably start by reading the docs
filipe has quit [Ping timeout: 240 seconds]
alex__c2022 has quit [Quit: alex__c2022]
RORgasm has quit [Remote host closed the connection]
RORgasm has joined #ruby
krz has joined #ruby
alex__c2022 has joined #ruby
zachrab has quit [Remote host closed the connection]
vlad_sta_ has quit [Remote host closed the connection]
<Lindrian> also, why can't I just use CGI?
buzzybron has joined #ruby
cads has joined #ruby
peregrine81 has joined #ruby
<Todd> You said lightweight :)
swordsmanz has joined #ruby
dodosan has joined #ruby
<Lindrian> isnt cgi lightweight?
rodacato has quit [Remote host closed the connection]
Quashie has joined #ruby
azcodex has quit [Read error: Connection reset by peer]
<hoelzro> imo, once you've used Rack once, it's *way* easier to work with than CGI
<Hanmac> one day i will make a gem that is bigger than all other gems combined … and then i will name it "lightweight" ;P
benwoody has joined #ruby
adambeynon has joined #ruby
<Todd> Ruby itself isn't really lightweight but I digress. CGI provides horrible performance compared to rack or sinatra (sinatra sits on top of rack).
atmosx has joined #ruby
tjbiddle has joined #ruby
<Lindrian> is rails much slower?
<Todd> Sigh.
<Todd> For every CGI request you have to load the ruby interpreter all over again.
<Todd> rack/sinatra/rails provide a way around that
<hoelzro> and all your modules!
Coolhand has joined #ruby
<Todd> I think what you mean is easy to configure and use.
<Todd> Lightweight isn't striking me as what you REALLY want.
alekst has quit [Quit: Leaving...]
<Lindrian> i want rubys equivalence of pythons flask
<Lindrian> simple, easy and lightweight
<yxhuvud> then sinatra is what you want.
<banister> Lindrian also, from what i've read, flash was inspired by sinatra, so it's more like you were using the equivalent of ruby's sinatra in python :)
<banister> flask
<hoelzro> mind explosion!
<Lindrian> ha
<atmosx> with the power of greyskull
cads has quit [Ping timeout: 264 seconds]
<Todd> lol.. you guys
<rdark> banister: ++
niceguyjames has joined #ruby
havenwood has joined #ruby
persand has quit [Quit: persand]
pentameter has joined #ruby
Rym has quit [Ping timeout: 246 seconds]
<Lindrian> excuse me for a few minutes, gotta take care of my wash. ill pester you in a few again!
peret has joined #ruby
Zonakusu has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
filipe has joined #ruby
ananthakumaran has joined #ruby
nhhagen has joined #ruby
VTLob has joined #ruby
troessner has quit [Quit: Leaving]
girija has quit [Ping timeout: 256 seconds]
guardian_ has quit [Ping timeout: 264 seconds]
boblu has quit [Ping timeout: 246 seconds]
hogeo has quit [Remote host closed the connection]
carlyle has joined #ruby
okinomo_ has quit [Quit: Lost terminal]
okinomo has quit [Quit: Lost terminal]
havenwood has quit [Remote host closed the connection]
randomdrake has joined #ruby
havenwood has joined #ruby
kpshek has joined #ruby
end_guy_ is now known as end_guy
rgbdev has joined #ruby
rodacato has joined #ruby
rodacato has quit [Remote host closed the connection]
JumpMast3r has quit [Quit: JumpMast3r]
yshh has quit [Ping timeout: 256 seconds]
banister has quit [Quit: Computer has gone to sleep.]
kayloos has joined #ruby
__userna1 has joined #ruby
andikr has quit [Remote host closed the connection]
jsatk has joined #ruby
Soda has joined #ruby
niceguyjames has quit [Quit: Computer has gone to sleep.]
mrsolo has joined #ruby
ssvo has joined #ruby
Kabaka has joined #ruby
Coffers has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
dkamioka has joined #ruby
RichardBaker has joined #ruby
Tricon has joined #ruby
zachrab has joined #ruby
banisterfiend has joined #ruby
zachrab has quit [Remote host closed the connection]
wildroman has quit [Remote host closed the connection]
Targen_ has quit [Read error: Operation timed out]
Criztian has quit [Remote host closed the connection]
gusnasis has quit [Read error: Connection reset by peer]
gusnasis has joined #ruby
iamjarvo_ has joined #ruby
iamjarvo has quit [Read error: Connection reset by peer]
carlyle has quit [Remote host closed the connection]
blandflakes has quit [Quit: Page closed]
burlyscudd has joined #ruby
greenrose1 has joined #ruby
greenrose has quit [Ping timeout: 245 seconds]
mary5030 has joined #ruby
deception has quit [Quit: Goodbye]
deception has joined #ruby
lukec has joined #ruby
shredding has quit [Quit: shredding]
Xeago has quit [Remote host closed the connection]
benwoody has quit [Quit: benwoody]
Guest77577 is now known as rhys_
rhys_ has quit [Changing host]
rhys_ has joined #ruby
iamjarvo_ has quit [Remote host closed the connection]
Animawish has joined #ruby
iamjarvo has joined #ruby
grits has joined #ruby
m8 has joined #ruby
benwoody has joined #ruby
ArchBeOS has quit [Quit: Leaving]
mary5030 has quit [Remote host closed the connection]
digital-ghost has joined #ruby
ArchBeOS has joined #ruby
ArchBeOS has quit [Changing host]
ArchBeOS has joined #ruby
mary5030 has joined #ruby
niceguyjames has joined #ruby
benwoody has quit [Client Quit]
iamjarvo has quit [Ping timeout: 245 seconds]
burlyscudd has quit [Ping timeout: 264 seconds]
rodacato has joined #ruby
<Lindrian> fuck this is such a chore
<Lindrian> still cant get sinatra to run
niceguyjames has quit [Client Quit]
rodacato has quit [Remote host closed the connection]
robscomputer_ has quit [Ping timeout: 264 seconds]
Macaveli has joined #ruby
<shevy> to run
<shevy> what do you mean
<shevy> basic sinatra apps work just fine
<Lindrian> why do i need this weird ass folder structure?
<shevy> dunno
snovak_ has joined #ruby
<Lindrian> why is it so hard just to execute some arbitrary ruby code without having to go through all this hassle
mlpinit_ has joined #ruby
<Lindrian> jesus christ im getting so annoyed right now
DrCode has quit [Ping timeout: 240 seconds]
<havenwood> Lindrian: You can just have your Sinatra app live in a single file until it is time to extract it out. The conventions are optional but convenient.
HavokOC has quit [Changing host]
HavokOC has joined #ruby
HavokOC has quit [Changing host]
HavokOC has joined #ruby
<Lindrian> what does that even mean
cads has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
<shevy> hehe
devoldmx has quit [Read error: Connection reset by peer]
<Lindrian> gaaah fucking ruby
snovak has quit [Ping timeout: 248 seconds]
mlpinit has quit [Ping timeout: 240 seconds]
senayar has quit [Ping timeout: 264 seconds]
robscomputer has joined #ruby
dagobah has quit [Remote host closed the connection]
<Lindrian> i installed ruby, installed sinatra, installed passenger
<Lindrian> but i still cant run my app
robscomputer has quit [Read error: Connection reset by peer]
unixninja92 has quit [Ping timeout: 264 seconds]
d2dchat_ has quit [Remote host closed the connection]
robscomputer has joined #ruby
<havenwood> Lindrian: Sinatra requires you to understand what you're doing, but is really powerful when you do. Maybe look at some existing Sinatra apps or even use a generator to create your Sinatra app layout if you aren't comfy with the conventional places things go?
timonv has quit [Remote host closed the connection]
<Lindrian> I'm just trying to print hello world, nothing else.
mikepack has joined #ruby
wallerdev has quit [Quit: wallerdev]
<havenwood> Lindrian: Create a single file, called 'app.rb', and like on the home page put: require 'sinatra'; get '/hi' do; "Hello World!"; end
tvw has quit [Read error: Connection reset by peer]
<havenwood> Lindrian: Then to run your app: ruby app.rb
mityaz has joined #ruby
<havenwood> Lindrian: There is a Sinatra specific channel too called #sinatra.
<havenwood> Lindrian: http://www.sinatrarb.com/
<shevy> Lindrian these instructions worked for me 100%
<havenwood> They work for everyone. :P
unixninja92 has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
<havenwood> Lindrian: What is the problem you're running into?
ssvo_ has joined #ruby
poga has quit [Remote host closed the connection]
Voodoofish430 has joined #ruby
poga has joined #ruby
ssvo has quit [Ping timeout: 264 seconds]
<shevy> he is running windows
<havenwood> :O
mlpinit_ has quit [Remote host closed the connection]
mlpinit has joined #ruby
<Lindrian> Invalid command 'RackBaseURI'
ewnd9 has quit [Ping timeout: 264 seconds]
<Lindrian> im on debian now
<Hanmac> shevy better than running though windows ,P
quoin has joined #ruby
<shevy> oh rack
<shevy> I always hated rackup
vince_pr_ has joined #ruby
nhhagen has quit [Remote host closed the connection]
<Lindrian> i was following this guide
<shevy> hanmac hmm I used to use apachefriends php xampp stack or what the name was
<shevy> ack 4 years
nhhagen has joined #ruby
<shevy> do you always randomly try to follow 4 years old guides by unknown people
<Lindrian> yes.,.
<shevy> that guide looks indeed awful
<shevy> look at the crap that is in config.ru
<Lindrian> looks like the rest of them then
vince_prignano has quit [Ping timeout: 276 seconds]
<havenwood> Lindrian: Using Passenger with its Apache module is gunna be loads more confusing than just running your app with Webrick, Thin, Unicorn, Puma, or whatever.
<shevy> I always tell people to not use russian ruby files
<Lindrian> havenwood: i dont even know what any of those things are
filipe has quit [Remote host closed the connection]
snath has joined #ruby
<Lindrian> i dont want to host a web server, i just want to be able to send data to a ruby file and have it output json
<shevy> Lindrian no, there are great guides, but you need to find the right people to write them, not just random entries on the www
<Lindrian> how on earth can that be so hard.
<shevy> you never said that before
<shevy> you said you must fetch data from a website
<Lindrian> I SAID IT A THOUSAND TIMES
<shevy> no
d2dchat_ has joined #ruby
mlpinit has quit [Ping timeout: 256 seconds]
<Lindrian> I said I will POST data THROUGH JAVASCRIPT to RUBY. I then want RUBY to simply output JSON.
<Lindrian> I will make an AJAX CALL.
<havenwood> Lindrian: They are Rack webservers. So Sinatra (like Rails) is a DSL/framework build on Rack. On the other side of Rack is a webserver. The default, zero-configuration one is called Webrick. Imho, use that till you have reason to switch (unless you just wanna start with Unicorn or Thin or something sane.)
<Lindrian> Plain and simple.
gtrak has joined #ruby
<shevy> "<Lindrian> The only thing I'll need to receive is POST/GET data, and then the rest can probably be done directly in ruby."
<shevy> "<Lindrian> i want to run a very simple web application, all its going to do is output json."
Quashie has quit [Ping timeout: 240 seconds]
<Lindrian> Yes, how can you not understand that?
<shevy> "<Lindrian> through Javascript,ajax"
DrCode has joined #ruby
<Lindrian> Once more time for you shevy. JAVASCRIPT sends AJAX (through POST) to my_ruby_file.rb. My ruby file then reads the posted JSON, does some stuff with it, outputs a new JSON string.
<Lindrian> THE END.
<shevy> I dont think your requirement is simple in the slightest, if it would have been to "send data to a ruby file", you could just use ARGV
<Lindrian> I said this a gazillion times.
grits has quit [Quit: Textual IRC Client: www.textualapp.com]
<Lindrian> I also said I don't want to create a new web server.
<Lindrian> I want apache to serve the script.
nhhagen has quit [Ping timeout: 264 seconds]
jxport has joined #ruby
rodacato has joined #ruby
rodacato has quit [Remote host closed the connection]
<Lindrian> I dont want to build my site in ruby, I just want to run a script in ruby.
<shevy> you dont want "just" anywhere
mlpinit has joined #ruby
<Lindrian> You now know exactly what I want, I hope.
pito has joined #ruby
sr78ger has joined #ruby
<workmad3> Lindrian: 'a file' can't be posted to
<workmad3> Lindrian: it needs some form of interface in order to understand a HTTP POST request
<Lindrian> Right, I can buy that.
adkron_ has quit [Ping timeout: 260 seconds]
<workmad3> Lindrian: CGI is clunky, old and difficult to work with
<workmad3> Lindrian: sinatra is pretty easy to work with
quoin has quit [Ping timeout: 268 seconds]
<Lindrian> i still havent gotten it to work
<Lindrian> could you please walk me through it?
carlyle has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<workmad3> Lindrian: however, it does need to be run on a rack adapter (rack is a web server interface for ruby), which requires something like a separate app server (*not* a web server) or a module like phusion passenger
<workmad3> Lindrian: all the stuff people have linked to here work fine for me :/
<shevy> use cgi
* apeiros smacks shevy
Animawish has quit [Quit: Animawish]
<shevy> apeiros will walk you through Lindrian
<apeiros> seriously…
cody-- has quit [Quit: Computer has gone to sleep.]
<shevy> he is a rails guru
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<Lindrian> workmad3: i have not managed to get anything working.
<Lindrian> workmad3: i created the map structure, i installed a bunch of bolony, and nothing it working.
rodacato has joined #ruby
<RubyPanther> rack does use CGI, generally. They all do.
<apeiros> RubyPanther: bullshit.
<Todd> RubyPanther, what?
<RubyPanther> We only stopped _calling_ it CGI because CGI came to mean "... and not anything else"
<apeiros> rack *can* use CGI. it generally does *not*.
<apeiros> RubyPanther: utter uninformed bollocks.
<workmad3> ^^
<RubyPanther> actually, it is very informed, and much more true than not
<Todd> the CGI Class in Ruby has a lot of useful tools that can be used outside the context of a web CGI server <- it's true
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
<RubyPanther> It is true that the CGI class is not generally used, of course
Spami has joined #ruby
Spami has joined #ruby
Spami has quit [Changing host]
jonkri has joined #ruby
jonkri has joined #ruby
jonkri has quit [Changing host]
<apeiros> RubyPanther: no.
<Lindrian> so
<Lindrian> how do i get this working
<apeiros> RubyPanther: if you use rackup you don't use CGI. if you use passenger, you don't use CGI
<apeiros> RubyPanther: if you use it the other way round via puma, thin etc., you do not use CGI
burlyscudd has joined #ruby
<apeiros> seriously, stop telling bullshit.
<Todd> apeiros, he may be simply referring to the ruby CGI class
<apeiros> Todd: then it makes even less sense
<Todd> apeiros, which isn't the same as serving requests via CGI
pito has quit []
Guest64473 has quit [Ping timeout: 245 seconds]
Rollabunna has quit [Remote host closed the connection]
<Todd> apeiros, I'm not familiar enough with the inner-workings of rack, sinatra, rails to say for sure
<apeiros> the only thing CGI and rack have in common is that they define an interface of some sorts
<havenwood> Lindrian: Follow a tutorial created in 2012 or later. I can't tell if you really need AJAX or if that is just what you're calling POST/PUT requests.
splittingred_ has joined #ruby
<Lindrian> i followed this
<RubyPanther> if it is true but just not in the first way you thought of it, you're really not understanding enough to claim it is wrong
Rollabunna has joined #ruby
bio has joined #ruby
bio is now known as Guest11924
<apeiros> RubyPanther: maybe you check what exactly CGI means. hint: it obviously does not mean what you think it does.
randomautomator has joined #ruby
<Lindrian> havenwood: dont worry about ajax, i just need to get this running first. the guide i followed isnt helping me
splittingred has quit [Ping timeout: 268 seconds]
splittingred_ is now known as splittingred
<Todd> if we're actually talking about CGI requests I'm siding with apeiros.. if we're talking about the use of the CGI class or related classes I'd have to check the code
<Lindrian> require File.expand_path '../app.rb', __FILE__ <---- where should i put my app here?
<RubyPanther> why are you so sure that I am mistaken, and not yourself?
<Lindrian> in the folder above the config.ru file?
<RubyPanther> is CGI a type of "request?"
yacks has quit [Quit: Leaving]
<apeiros> RubyPanther: CGI is an *interface*
<apeiros> it's part of the very abbreviation
<Todd> RubyPanther, CGI is a common gateway interface
<apeiros> it defines how a script and a webserver communicate
burlyscudd has quit [Read error: Operation timed out]
<zzak> whats wrong with the recipe?
<apeiros> and rack does NOT communicate via the CGI protocol with webserver (generally - it can, but it's not advisable)
<jxport> What *is* the CGI protocol?
radic__ has quit [Read error: Connection reset by peer]
<workmad3> jxport: old and convoluted :)
<zzak> Lindrian: put that in yoru config.ru
<Lindrian> not gonna get any help now am i.
<apeiros> RubyPanther: I'm so sure because I know the specs and I'm not just talking out of my ass like you.
<Lindrian> zzak: sure, but where does it link to?
shaunbak_ has quit [Remote host closed the connection]
<jxport> CGI seems like one of those terms that isn't worth knowing the definition for
<Lindrian> zzak: should my app.rb file be in the folder above?
<apeiros> RubyPanther: but please, feel free to provide evidence why all rack is CGI.
<zzak> you can also just do "require './app.rb'" in modern versions of ruby
<jxport> Then again, I'm on the side of the fence that doesn't know it
<zzak> Lindrian: no in the same folder
<workmad3> zzak: 'require_relative "app.rb" ' in modern rubies
<Lindrian> zzak: okay. do i put this entire folder structure inside my htdocs folder or outside of it?
<apeiros> jxport: correct. it's rather useless nowadays. the reason I know it is because I wrote my first CGI >15y ago when it was more or less the only way
<zzak> Lindrian: you can setup a virtual host and put it anywhere you want
<workmad3> zzak: 'require "./app.rb" ' has always worked... and has always been problematic, because '.' is dependent on the CWD of the process, not on the file you're currently in ;)
<zzak> Lindrian: did you see the bit about Virtual Host?
<apeiros> the one advantage CGI has is that it is *very* simple
<apeiros> all you need is stdin, stdout and env
<Todd> CGI basically takes a request, figures out what interpreter is needed to handle the request, forks the handler, then returns whatever the handler returns(overly simplistic). fastcgi is an attempt to fix this by allowing a process to be long running as apposed to forking for every request.
Rollabunna has quit [Ping timeout: 264 seconds]
<zzak> noise noise noise
<workmad3> apeiros: rack is pretty simple in ruby terms :)
<apeiros> workmad3: rack is very complex
<apeiros> workmad3: it is simple *to use*
<RubyPanther> generally you can check your ENV vars, and if there is webby gunk in there, then CGI is actually still being used most likely. Even though you're not using a thing in the webserver that is labeled "cgi" and everything is labeled as something else
<apeiros> RubyPanther: seriously, stop spouting utter nonsense. thank you.
<Lindrian> zzak: ill add a new virtualhost, hold on.
<Todd> RubyPanther, that makes no sense
mlpinit has quit [Remote host closed the connection]
<zzak> Lindrian: im on the edge of my seat
<Lindrian> zzak: what?
<zzak> on hold
spider-mario has quit [Remote host closed the connection]
mlpinit has joined #ruby
<workmad3> apeiros: fair enough... I tend to think of 'rack' in terms of the interface it needs within a ruby object, rather than the stuff it does to interface to HTTP requests
<RubyPanther> okay, okay, if it made _no_sense_ then I apologize, it must have been phrased in way that is inaccessible. Surely doesn't make it nonsense, however. Or untrue.
<zzak> if i go afk, its only because ive completely given up on irc, but you can just pm me or whatever
jlast has quit [Remote host closed the connection]
<Lindrian> if I already have a
<Lindrian> <VirtualHost *:80>, should I still create a new one?
mlpinit has quit [Read error: Connection reset by peer]
<Lindrian> or append to the previous one?
<zzak> Lindrian: what does the recipe say?
<Lindrian> Does not specify.
Macaveli has quit [Quit: Computer has gone to sleep.]
<Lindrian> Just says "setup"
mlpinit has joined #ruby
snovak_ has quit [Remote host closed the connection]
<Lindrian> But this virtualhost would conflict with my previous one
<workmad3> apeiros: but you're right... the stuff it does to interface to the request environment is pretty complex :)
timonv has joined #ruby
<apeiros> workmad3: LOC alone tells you as much ;-)
<Lindrian> they cant both listen to the same port and have different documentroots
<zzak> Lindrian: right
snovak has joined #ruby
<workmad3> apeiros: yeah, 'rack the implementation' vs 'rack the interface'
<zzak> Lindrian: you could try a different port just to test that it works
<workmad3> apeiros: you were, I believe, talking implementation, while I was talking interface ;)
ghr has quit [Quit: Computer has gone to sleep.]
<Lindrian> alright
<apeiros> but it's not really fair to compare CGI impl. with rack impl
<apeiros> since rack covers multiple avenues while CGI will always only be a single one
<Lindrian> ideally i would like it all under the same virtualhost, and not running different servers on different ports
<apeiros> workmad3: yes. I think we don't differ in opinion.
<workmad3> apeiros: not on this situation anyway :)
<zzak> apeiros: are you going to arrrcamp next month?
<Todd> Lindrian, what you want is name based virtualhosts
<apeiros> zzak: no confs for me this year :(
<Todd> Lindrian, in which case <*:80> is correct as long as you want it to listen on all interfaces
<RubyPanther> Lindrian: you can't just use a half-ass recipe on apache config, you need either a full recipe, or years of practice at apache wrestling
<zzak> half-assed or not, whats wrong with it can be fixed, right?
mityaz has quit [Quit: See ya!]
<Lindrian> zzak: I added the virtualhost for port 8080, not working.
__userna1 has quit [Quit: none 0.4.1]
<RubyPanther> I dunno, I see stuff about a wrong vhost, probably lots of stuff is wrong
wallerdev has joined #ruby
camilasan has quit [Remote host closed the connection]
<zzak> Lindrian: whats your vhost look like?
<RubyPanther> I don't see the file, is there is gist?
<Lindrian> just like in the recepie
<Lindrian> recipe
<RubyPanther> fail
<RubyPanther> maybe it is... maybe it isn't
<zzak> Lindrian: did you change the "/path/to/whatever" to point to your app?
<Lindrian> i made it point to /public like in the example
camilasan has joined #ruby
<zzak> does your app have a public dir?
<Todd> Lindrian, pastebin or bust
sayan has joined #ruby
carlyle has quit [Remote host closed the connection]
<apeiros> Lindrian: I'd put the project on github as a public repository. easier for the others to help.
<workmad3> Todd: please, please, not pastebin :( gist or pastie
* apeiros won't help - still at work
<Lindrian> zzak: i just followed the guide, i dont even have an app yet.
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
<zzak> Lindrian: you dont have an app? :(
<Todd> workmad3, meh.. I don't care either way
<Todd> workmad3, just paste it somewhere
<RubyPanther> the example shouldn't be interesting to anybody but you, the file you're actually using is all somebody should want to see to help you . It is bad enough to have to read one broken config file, you want us to also read a sucky, unclear recipe?
<workmad3> Todd: :)
camilasan has quit [Remote host closed the connection]
<Lindrian> i want to kill myself right now
<Lindrian> this is horrible.
sambao21 has joined #ruby
<Todd> Lindrian, write the sinatra application and test it using the build in web server! that's what it's for!
<Lindrian> I created an app.rb file
<Todd> Lindrian, when the application is written THEN you deploy it to your apache environment
<Todd> s/build/built/
end_guy has quit [Remote host closed the connection]
radic has joined #ruby
<zzak> yeah, i would worry about deployment last
<Lindrian> its just the hello world example.
<RubyPanther> so use a hello world that uses webrick
Animawish has joined #ruby
Animawish has quit [Client Quit]
<workmad3> Lindrian: hmm... didn't you say you were workning on windows?
<Lindrian> im on debian now
<workmad3> ah, ok :)
<zzak> the recipe should still work tho, however suck, unclear, and half-assed it is
<Lindrian> i have to go take care of my wash, give me a few minutes.
<zzak> i helped write it, and as one of the maintainers, should help fix it if theres something wrong
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
lucazi has quit [Quit: Leaving.]
ananthakumaran has quit [Quit: Leaving.]
mlpinit has quit [Remote host closed the connection]
locriani has joined #ruby
jlebrech has quit [Quit: Konversation terminated!]
nomenkun has quit [Ping timeout: 276 seconds]
rodacato has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
dkamioka has quit [Remote host closed the connection]
adkron_ has joined #ruby
cads has quit [Ping timeout: 246 seconds]
apfelbox_ has joined #ruby
iamjarvo has joined #ruby
pabloh has quit [Remote host closed the connection]
zeade has joined #ruby
krz has quit [Quit: krz]
maasdesigner has joined #ruby
tjbiddle has joined #ruby
NealJ has quit [Ping timeout: 248 seconds]
Macaveli has joined #ruby
dachi has joined #ruby
MarcWeber has quit [Ping timeout: 264 seconds]
<dachi> Hello everybody. Please help. Inside a gem, when creating a file, ie File.open("file.txt.... How to indicate a correct path relative to gem's root
Targen has joined #ruby
jhn has joined #ruby
apfelbox has quit [Ping timeout: 260 seconds]
<apeiros> dachi: you can't rely on gem's structure to remain the same when installed
splittingred has quit [Quit: splittingred]
<apeiros> dachi: I usually use Gem.datadir(gemname)
<dachi> apeiros: thanks and how do I write to files then, which directory path should I indicate?
lukec has quit [Quit: lukec]
<apeiros> you should *absolutely not* write files into your gem dir
<apeiros> you may not even have write access
blackmesa has quit [Ping timeout: 240 seconds]
cads has joined #ruby
kaldrenon has quit [Remote host closed the connection]
<dachi> File.open(Gem.datadir('my_gem') + '/file.cvs'). .. . like this?
kaldrenon has joined #ruby
<dachi> Oh okay. So I need to have a csv file or similar to store info downloaded from web
<dachi> Should I rely on ~ Home directory then?
rodacato has joined #ruby
<apeiros> for example, yes. or allow the user to specify a location.
jokke has quit [Ping timeout: 245 seconds]
<dachi> great. thank you!
greenysan has joined #ruby
buzzybron has quit [Quit: Leaving.]
mlpinit has joined #ruby
goleldar has joined #ruby
rodacato has quit [Remote host closed the connection]
azcodex has joined #ruby
timonv has quit [Remote host closed the connection]
yshh has joined #ruby
aganov has quit [Remote host closed the connection]
dankest has joined #ruby
kaldrenon has quit [Ping timeout: 240 seconds]
girija has joined #ruby
mrwizard has joined #ruby
ZoanthusR has quit [Quit: Linkinus - http://linkinus.com]
atmosx_ has joined #ruby
dachi has quit [Quit: Page closed]
brain_shim has joined #ruby
kaldrenon has joined #ruby
brain_shim has quit [Max SendQ exceeded]
brain_shim has joined #ruby
yshh has quit [Ping timeout: 256 seconds]
julweber has quit [Remote host closed the connection]
mklappstuhl has quit [Remote host closed the connection]
Macaveli has quit [Remote host closed the connection]
dkamioka has joined #ruby
rupee has joined #ruby
iamjarvo has quit [Remote host closed the connection]
ckampfe has joined #ruby
nwertman_ has joined #ruby
altamic has joined #ruby
MarcWeber has joined #ruby
kpshek has quit []
altamic has left #ruby [#ruby]
jokke has joined #ruby
nwertman has quit [Remote host closed the connection]
SHyx0rmZ has joined #ruby
Zai00 has quit [Quit: Zai00]
lukec has joined #ruby
Rym has joined #ruby
randomdrake has quit [Quit: randomdrake]
jlast has joined #ruby
randomdrake has joined #ruby
<Lindrian> zzak: i followed it and im not able to get it to work
ixti has joined #ruby
<Lindrian> i have no bloody clue what im doing wrong
x1337807x has joined #ruby
locriani has quit [Remote host closed the connection]
Ripp__ has joined #ruby
crunch-choco has quit [Quit: leaving]
tylersmith has joined #ruby
tabolario has joined #ruby
sepp2k has joined #ruby
kjellski has joined #ruby
atmosx has quit [Quit: WeeChat 0.4.1-rc2]
sayan has quit [Quit: Leaving]
iliketur_ has joined #ruby
iamjarvo has joined #ruby
svend has joined #ruby
KevinSjoberg has joined #ruby
platzhirsch has joined #ruby
<platzhirsch> roar
c0rn has joined #ruby
dankest has quit [Quit: Peace]
Al__ has quit [Quit: Al__]
Loaft has joined #ruby
jlast has quit [Ping timeout: 240 seconds]
shunt has joined #ruby
<Lindrian> ive grown to hate ruby over a period of less than 3 hours.
<platzhirsch> Lindrian: btw. why have you started to learn Ruby? :)
azcodex has quit [Quit: azcodex]
<Lindrian> learn ruby they said
tvw has joined #ruby
<Lindrian> its a great language they said
<Lindrian> its so easy they said
enebo has quit [Ping timeout: 246 seconds]
<platzhirsch> What's your background?
jerius has quit [Ping timeout: 246 seconds]
<Lindrian> java, python, javascript, php, .NET
<Lindrian> among other things
nwertman has joined #ruby
carraroj has joined #ruby
<platzhirsch> and what annoys the most at the moment about Ruby?
<Lindrian> i havent even managed to deploy my app
<Lindrian> >.<
<havenwood> Lindrian: You seem to be stuck on configuring an Apache module. Apache confs are a bad way to learn Ruby. :P
<banisterfiend> Lindrian deploy to heroku
<havenwood> Lindrian: Serve your app on the default port, forget port 80 at least until you have something to serve up. Then you can move forward and learn rather than being stuck on fact that you aren't familiar enough with Apache to get the server setup right away.
svend has quit [Remote host closed the connection]
<Lindrian> banisterfiend: i would rather have it on my own server
quoin has joined #ruby
<Lindrian> havenwood: theres no point for me to learn ruby if i cant get it to work with apache right now
<Lindrian> it would be a waste of time
<havenwood> Lindrian: Get something running in dev that is actually doing something, then worry about deployment. Easier to deploy when something works.
<Lindrian> i have working hello world
YaNakilon has quit [Ping timeout: 248 seconds]
<zzak> Lindrian: can you open a ticket?
<havenwood> Lindrian: Okay, so serve it up on a port other than 80?
<Lindrian> i have tried havenwood
<havenwood> Lindrian: Ports are open?
<Lindrian> yes.
<zzak> Lindrian: that recipe was written around 3 years ago
Xeago has joined #ruby
<zzak> and i know passenger has changed a bit
<havenwood> And you're doing: ruby app.rb -p xxxx
<zzak> maybe check the passenger docs too
ehaliewicz has joined #ruby
xibalba has left #ruby ["Leaving"]
<Lindrian> yes
<zzak> and also please report any issues to the sinatra-recipes bug tracker: https://github.com/sinatra/sinatra-recipes/issues
<zzak> where we will be able to help you further
<Lindrian> ive just come to the conclusion its not worth it for me right now -.-
cody-- has joined #ruby
<platzhirsch> I am downloading compressed files, like gzip and zip and want to uncompress them on the disk. Is there another approach than system("gunzip #{file}")?
jhn has quit [Ping timeout: 268 seconds]
<platzhirsch> before I did the uncompressing in Ruby with zlib and zipruby
<Hanmac> hm there are gems that use libarchive … (but mine isnt commited for a long time)
<Lindrian> ill attack this another day
DanKnox_away is now known as DanKnox
<Lindrian> is there a quick and easy way to remove all the ruby related files I had to add?
quoin has quit [Ping timeout: 240 seconds]
<havenwood> Lindrian: Uninstall all gems?
<platzhirsch> hanmac: just found you repo
<Hanmac> platzhirsch: you can make issues if you have problems with it ...
<havenwood> Lindrian: (Gems are the packages like Sinatra and Passenger. Is that what you want to remove?)
<platzhirsch> hanmac: yeah, I will definietly make you some issues
<Lindrian> havenwood: yes
<platzhirsch> heh, well I am just wondering now, what's the advantage over just jamming out the system commands
<Lindrian> havenwood: i want to return to where i was before i installed all of this stuff
YaNakilon has joined #ruby
d2dchat_ has quit [Ping timeout: 264 seconds]
<platzhirsch> well, it's a programmatic approach where i don't have to deal with the file ending
<platzhirsch> file type*
ixti has quit [Read error: Connection reset by peer]
stkowski has joined #ruby
mwmnj has joined #ruby
<havenwood> Lindrian: You can `rm -rf $GEM_HOME` to nuke all the gems. In the upcoming RubyGems 2.1.0.rc.1 you can: gem uninstall --all
<havenwood> Enough people asked here how to uninstall all gems that I submitted a patch. :P
jerius has joined #ruby
rdark has quit [Quit: leaving]
<havenwood> 2.1 ftw!
<havenwood> Can use now with: gem update --system --pre
jdolitsky1 has joined #ruby
ixti has joined #ruby
<Todd> rvm gemset empty <-
<Todd> I know rvm is the devil.
<platzhirsch> no, RVM to the rescue
<havenwood> chruby!
asobrasil has joined #ruby
katselphrime has quit [Remote host closed the connection]
nickbend_ has joined #ruby
<havenwood> No idea if anyone uses it but RVM actually has a Mini-RVM mode where it installs Ruby but uses chruby to select versions: https://rvm.io/workflow/chruby
nickbend_ is now known as nickbender_
<platzhirsch> The pricing at Heroku is hilarious
jlast has joined #ruby
obs has quit [Quit: Konversation terminated!]
<havenwood> platzhirsch: lolroku
atmosx_ has quit [Quit: Lost in trance]
<platzhirsch> havenwood: bless you
relix has joined #ruby
hukl has joined #ruby
azcodex has joined #ruby
felixjet has joined #ruby
Es0teric has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
twoism has joined #ruby
kpshek has joined #ruby
MrPoT4tO has joined #ruby
azcodex has quit [Read error: Connection reset by peer]
maasdesigner has quit [Ping timeout: 246 seconds]
baordog_ has joined #ruby
<shevy> do you guys use coloured output when you write .rb file for commandline stuff?
azcodex has joined #ruby
<Lindrian> when i used CGI i was able to simply send data to my ruby app without any hussle
zigomir has quit [Read error: Connection reset by peer]
<Lindrian> all i did was install ruby and worked from there.
<Lindrian> (added .rb to apache cgi)
ssvo_ is now known as ssvo
apfelbox_ has quit [Remote host closed the connection]
chairabanta has joined #ruby
alekst has joined #ruby
<Lindrian> why cant sinatra be as easy
zigomir has joined #ruby
hukl has quit [Remote host closed the connection]
RobW_ has quit [Quit: RobW_]
apfelbox has joined #ruby
hukl has joined #ruby
baordog_ is now known as solidoodlesuppor
<havenwood> Lindrian: Just a different problem domain. Embedding a script in a webpage versus a web app with its own webserver.
zeade has quit [Quit: Leaving.]
<Lindrian> I want the former
<Lindrian> I dont want a web app and a webserver
<platzhirsch> shevy: do you mean coloring the console output?
blaxter has quit [Quit: foo]
<shevy> Lindrian did I not tell you to use cgi!!!
<Lindrian> but its the only thing that works
<shevy> the frameworks are more complicated because they integrate rack
<Lindrian> i tried using your fancy frameworks
<shevy> my?
<shevy> I dont use any frameworks, I use only .cgi since about 7 years
<havenwood> Lindrian: For static website generation Jekyll is really nice: http://jekyllrb.com/
<platzhirsch> CGI? Hipster platzhirsch does not approve
zarubin has quit [Ping timeout: 245 seconds]
<shevy> platzhirsch yeah... let's say normal ruby code is "black on white" on your console, or something like that
<shevy> platzhirsch do you use only black+white, or also colours? and if colours, what do you use for that in your ruby files?
RobW_ has joined #ruby
mrwizard has quit [Quit: leaving]
<platzhirsch> shevy: I have provided a customization for my Rails logger, which prints WARN, INFO, ERROR in different colors
shunt has quit [Quit: leaving]
endash has joined #ruby
<shevy> the problem is when you dont use cgi, you must use a myriad of things that take time to learn... like rails
<shevy> platzhirsch ok but how do you do that, can you give a minimal example?
mklappstuhl has joined #ruby
<shevy> like you want to show info, then error
<shevy> info "You suck."
<Lindrian> havenwood: but this still gets served by its own server
<shevy> error "Because you suck, we must remove all your files now."
<havenwood> shevy: I like to use colors in command line apps. Usually just red and green, sometimes blue.
ferdev has quit [Quit: ferdev]
zarubin has joined #ruby
mansi has joined #ruby
ndrei has quit [Ping timeout: 256 seconds]
<havenwood> Lindrian: Yeah, it is the Ruby way (if you're setting up a server from scratch, it is cake).
<shevy> havenwood ok... three colours (and black/white I guess, so five perhaps). How do you do that for the colour output though? do you use a specific library or hardcoded values for the colours?
mrwizard has joined #ruby
vlad_starkov has joined #ruby
nhhagen has joined #ruby
<shevy> Lindrian hates servers
<havenwood> Lindrian: If you just want access to a Ruby gem or Ruby scripting in an existing PHP or whatev website then CGI may be the path of least resistance.
<havenwood> shevy: Depends how many colors I need and if bold is also needed.
<shevy> ok let's make it simple, only 3 colours, no boldness
<havenwood> and does red always mean abort?
<shevy> hehehe
<havenwood> or warn?
<shevy> hmmmmm
<havenwood> what colors?
<shevy> I use it only for warn... actually, I use red for both warn and abort
saarinen has joined #ruby
<shevy> but I want to see what people use for colour-output in general
<Todd> oh my God.. I've ate lunch, took a walk and smokes and we're still harping on CGI.
jbpros has joined #ruby
<Todd> /ragequit :[
Tuxist has joined #ruby
<shevy> Todd but you heard Lindrian complain... anything else is more complicated to use than python's flask
ndrei has joined #ruby
splittingred has joined #ruby
greenysan has quit [Ping timeout: 268 seconds]
<Todd> shevy, he's been requiring hand holding since this morning
<shevy> he was using windows for a long while
kidoz has joined #ruby
<platzhirsch> shevy: puts "\033[31mColor!\033\n"
<platzhirsch> prints Color! in red
<shevy> ok
<shevy> that is the hardcoded approach
<shevy> but do you really use that in a .rb file?
mklappstuhl has quit [Remote host closed the connection]
carraroj has quit [Ping timeout: 260 seconds]
<platzhirsch> shevy: It sounds strange when you say, use that in a rb file?
<shevy> yeah, a script
dankest has joined #ruby
<platzhirsch> ok, well no
<shevy> hmmmmm
<platzhirsch> Isn't there a nice gem which wraps that behavior?
end_guy has joined #ruby
<shevy> that is the thing... it seems people use ruby differently than I do :\
jibi has quit [Quit: .]
<platzhirsch> shevy: so you want to craft a rainbow tool?
<shevy> there are many colour related gems, sure. but I think most are rather annoying... I'd like to find someone who uses colour-related output since a very long time and can "swear by one library / way to rule them all"
polaco_zZz is now known as polaco
<shevy> platzhirsch one that would be better than the others sure... but right now it seems barely anyone else is doing coloured output in ruby :\
<shevy> or perhaps you have all been converted into web-people
<platzhirsch> shevy: the gem bundler uses colors :P
noopq has joined #ruby
<shevy> hmm true... I shall find out how it does that
nickbender_ has quit [Remote host closed the connection]
<platzhirsch> I think colors should be used sparely in a console tool
brain_shim has quit [Ping timeout: 245 seconds]
<platzhirsch> sparsely*
<shevy> :(
<Lindrian> havenwood: then i guess im going to stick with CGI
<shevy> Lindrian \o/
<Lindrian> havenwood: if i bother with ruby at all
<shevy> that's how I used php for a long time!
<shevy> then I wanted to write an IRC bot in php
<shevy> and failed
<shevy> then I tried in ruby
<shevy> and got it working after some days
<platzhirsch> and then you painted the bot colorful?
zeade has joined #ruby
alvaro_o has joined #ruby
<shevy> platzhirsch haha almost
<shevy> there are IRC colours right? test
<shevy> I got them to work too
<Mattias> PHP, Ruby? What are we talking about?
<shevy> but then I did not change it since 2 years
<Mattias> running a ruby and php server?
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
<shevy> Mattias coloured output from a ruby script
<platzhirsch> Mattias: crazy things are happening here, someone brought drugs
<Mattias> and how did php get into this?
<xybre> Mattias: this dude is mad at ruby for not being php
<shevy> Lindrian is talking mostly about sinatra, ruby and php
<Mattias> -.-
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
vlad_starkov has quit [Ping timeout: 240 seconds]
ananthakumaran has joined #ruby
<Morrolan> Mattias: He doesn't like that you need an application server for Ruby web apps.
<shevy> Mattias I mentioned php because Lindrian said he will stick to CGI, which is what I did when I used php... I only wrote stupid little .php files that displayed useless things to me
<Morrolan> E.g. "why is there no mod_ruby for apache"
<Mattias> just use nginx, then proxy to php-fpm / ruby server
<shevy> and E.g. "why is it all so complicated"
<Mattias> nginx is the shiz
browndawg has left #ruby [#ruby]
vlad_starkov has joined #ruby
jaimef has quit [Excess Flood]
<wuest> Mattias: truth.
c0rn has joined #ruby
persand has joined #ruby
mikeg has joined #ruby
jaimef has joined #ruby
azcodex has quit [Quit: azcodex]
maasdesigner has joined #ruby
<Lindrian> big man shevy
azcodex has joined #ruby
<apeiros> Lindrian: if you want "mod_php" style stuff, take a look at rack-server-pages
<Mattias> Back to reading about edible mushrooms~
graft has joined #ruby
graft has joined #ruby
persand has quit [Client Quit]
crus has quit [Ping timeout: 240 seconds]
<Morrolan> Mattias: As in, "I just learned that there's edible mushrooms", or as in "I want to gather some myself without getting food poisoning"?
jprovazn has joined #ruby
<Mattias> Morrolan: Learning more of them so I can pick more when in the woods :)
zachrab has joined #ruby
cascalheira has joined #ruby
<Morrolan> Ah. :)
splittingred has quit [Quit: splittingred]
peta_ has joined #ruby
robscomputer has quit [Read error: Connection reset by peer]
<Lindrian> or "i want to know which get me high"
razi has quit [Quit: Leaving.]
<Mattias> This book has 100~ edible mushrooms (Swedish book, Swedish mushrooms)
robscomputer has joined #ruby
<shevy> wtf
<shevy> swedish mushrooms
razi has joined #ruby
locriani has joined #ruby
<Mattias> Yeah, it lists all the common ones located in sweden :)
robscomputer has quit [Read error: Connection reset by peer]
apeiros has quit [Remote host closed the connection]
<Lindrian> shevy: all I am going to do with ruby is accept post/get and output json. i feel its unnecessary to run an entire server just for that.
splittingred has joined #ruby
robscomputer has joined #ruby
Astral_ has quit [Ping timeout: 264 seconds]
adambeynon has quit [Quit: Textual IRC Client: www.textualapp.com]
g3orge has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
devoldmx has joined #ruby
alekst has quit [Quit: Computer has gone to sleep.]
Squarepy has quit [Quit: Leaving]
crus has joined #ruby
rkowalick has joined #ruby
brianpWins has joined #ruby
Ripp__ has quit [Quit: Ripp__]
kjellski has quit [Ping timeout: 264 seconds]
tonni has quit [Remote host closed the connection]
toothe has joined #ruby
timonv has joined #ruby
<toothe> Hi, just starting out with this language and reading one of the documents.
jbpros has quit [Quit: jbpros]
<toothe> I do not understand what this means: class Blah / def name / @ name / end / end
<toothe> What does the @name mean?
deception has quit [Quit: Goodbye]
<Morrolan> '@' indicates an instance variable.
<Morrolan> (In python it'd be self.name, in Java this.name etc. etc)
<toothe> but, what does just "@variable" do?
<g3orge> and the returned value is the last statement
<toothe> there's appears to be no manipulation of the variable
<rkowalick> it isa variable tied to an instance of a class
<g3orge> it returns the global name variable
<toothe> ahh....
<Morrolan> It evaluates to the value of the 'name' instance variable, which will get returned.
cascalheira has quit [Quit: Linkinus - http://linkinus.com]
<toothe> so, its the equivalent of "return privateVariable;" in C++
<Morrolan> Yea. The last value in a function gets, implicitly, returned.
<toothe> kewl, thanks :-)
<MrZYX> method ;P
<Morrolan> Screw terminiology. :P
<Morrolan> s/nio/no/
<rkowalick> instance variables are one of the main ways an object can store state
<Mattias> Morrolan: So, do you pick mushrooms?
mcat1 has joined #ruby
<Morrolan> Mattias: Nah, I was just curious. :)
<Morrolan> MrZYX: But yea, I have a hard time remembering what's what. (Maybe it's because I don't try too hard ;D)
<MrZYX> methods have an receiver, functions don't
rodacato has joined #ruby
rkowalick has quit [Quit: Page closed]
<MrZYX> ruby has no functions ;)
<Lindrian> should i not have passenger.conf or similar under /etc/apache2/mods-available?
alpha123 has joined #ruby
<banisterfiend> Lindrian did you name yourself after a character in a narnia book?
YaNakilon has quit [Ping timeout: 240 seconds]
<Lindrian> i dont think so
<Lindrian> why?
cads has quit [Ping timeout: 260 seconds]
ferdev has joined #ruby
julweber has joined #ruby
c0rn has joined #ruby
Speed has joined #ruby
awarner_ has joined #ruby
iamjarvo has quit [Remote host closed the connection]
azcodex has quit [Remote host closed the connection]
<wuest> Mattias: one of the things I miss most from my trip to the general area (Finland, given, but geographically similar) is fresh mushrooms.
iamjarvo has joined #ruby
iamjarvo has quit [Read error: Connection reset by peer]
awarner has quit [Ping timeout: 245 seconds]
<platzhirsch> hanmac: I am looking through libarchive-ruby, I cannot rename the archive extraction through this, can I? This has to be done afterwards?
kjellski has joined #ruby
YaNakilon has joined #ruby
iamjarvo has joined #ruby
ixti has quit [Read error: Connection reset by peer]
angusiguess has joined #ruby
ixti has joined #ruby
<Hanmac> platzhirsch, hm i dont think it works, but you can use 2 Archive objects and move the files from one to the other
julweber has quit [Ping timeout: 264 seconds]
ndrei has quit [Ping timeout: 260 seconds]
kobain has quit [Ping timeout: 252 seconds]
Targen has quit [Quit: No Ping reply in 180 seconds.]
ananthakumaran has quit [Quit: Leaving.]
Targen has joined #ruby
headius has joined #ruby
azcodex has joined #ruby
<platzhirsch> hanmac: mh, I meant that I want to rename the file inside an archive after extraction (or before)
mcat1 has left #ruby [#ruby]
yacks has joined #ruby
mlpinit has quit [Read error: No route to host]
<Hanmac> hm i hink i need to test something (normaly the name may not be changeable … )
quoin has joined #ruby
mikeg has quit [Remote host closed the connection]
mlpinit has joined #ruby
iamjarvo has quit [Ping timeout: 260 seconds]
sethetter has left #ruby [#ruby]
ndrei has joined #ruby
<platzhirsch> in any case, .extract returns an array of extracted files so I could use the result to perform the renaming
Tomasso has quit [Read error: Connection reset by peer]
Ripp__ has joined #ruby
xk_id has quit [Quit:
RobW_ has quit [Read error: Connection reset by peer]
Tomasso has joined #ruby
gyre007 has quit [Ping timeout: 256 seconds]
quoin has quit [Ping timeout: 264 seconds]
V8Energy has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<V8Energy> is there a method to specify which character to trim in the end of the string? like "test.".trim('.') ?
havenwood has quit [Remote host closed the connection]
lele has quit [Ping timeout: 264 seconds]
<MrZYX> if it's just one: .chomp
<Hanmac> platzhirsh you can also extracts specific files
<V8Energy> thanks
RobW_ has joined #ruby
havenwood has joined #ruby
azcodex has quit [Remote host closed the connection]
iamjarvo has joined #ruby
<platzhirsch> hanmac: yeah, found that on your README doc :)
rupee has quit [Quit: Leaving]
lele has joined #ruby
burlyscudd has joined #ruby
alekst has joined #ruby
carraroj has joined #ruby
havenwood has quit [Ping timeout: 260 seconds]
Bira has quit [Remote host closed the connection]
azcodex has joined #ruby
fenicks has joined #ruby
unixninja92 has quit [Read error: Connection reset by peer]
unixninja92 has joined #ruby
marcdel has joined #ruby
<Hanmac> platzhirsch, there is also an way to extract files inside into IO objects …
Targen has quit [Read error: Connection reset by peer]
<platzhirsch> hanmac: yeah, feeling meta-vibes here
mikeg has joined #ruby
Targen has joined #ruby
apeiros has joined #ruby
burlyscudd has quit [Ping timeout: 268 seconds]
<platzhirsch> that's really cool if you want to work memory efficient
<platzhirsch> and with my 1 GB RAM this gets my attention
apfelbox has quit [Remote host closed the connection]
rcosta has joined #ruby
yacks has quit [Read error: Operation timed out]
apfelbox has joined #ruby
momomomomo has joined #ruby
ckampfe has quit [Ping timeout: 264 seconds]
<Hanmac> platzhirsch: info: my ones currently does not use temp files for the archives … that means all data for making and reading archives are stored inside the ram … just in case you want to extract an archive that is bigger than your ram ...
Kabaka has quit [Remote host closed the connection]
carraroj_ has joined #ruby
carraroj has quit [Ping timeout: 264 seconds]
<platzhirsch> Nooooooo
carraroj_ is now known as carraroj
<platzhirsch> gem uninstall libarchive-rubyu
carraroj has quit [Client Quit]
carraroj has joined #ruby
apfelbox has quit [Ping timeout: 240 seconds]
nwertman_ has quit [Quit: leaving]
Kabaka has joined #ruby
nwertman_ has joined #ruby
<Hanmac> platzhirsch: i currently dont know how to solv it the nice way
Nilium has quit [Ping timeout: 276 seconds]
greenysan has joined #ruby
<platzhirsch> I can imagine
vlad_sta_ has joined #ruby
atmosx has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
jonathanwallace has joined #ruby
hanoi has joined #ruby
nickbend_ has joined #ruby
<banisterfiend> platzhirsch u have only 1 gig ram?
<zzak> Lindrian: i think there is a #passenger channel for help
<platzhirsch> banisterfiend: on my linode VPS ;)
<banisterfiend> ah
<apeiros> wow, still at that problem?
<apeiros> somehow that's impressive
vlad_starkov has quit [Ping timeout: 240 seconds]
<platzhirsch> I think 25 USD is already expensive enough for fooling around
<platzhirsch> apeiros: do you mean me?
s0ny123 has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
<apeiros> no, Lindrian
greenysan has quit [Ping timeout: 264 seconds]
<platzhirsch> phew
<zzak> apeiros: i am very latent
Speed has quit [Ping timeout: 240 seconds]
AlSquire has joined #ruby
rcosta has quit [Remote host closed the connection]
yebyen has left #ruby [#ruby]
<shevy> you are a damn lagger
polaco is now known as polaco_zZz
<shevy> do we use a "spec/" dir or a "specs/" dir? hmm
<shevy> or a "specification/" dir... or perhaps just a "test/" dir instead
havenwood has joined #ruby
rodacato has quit [Remote host closed the connection]
blackmesa has joined #ruby
ner0x has joined #ruby
obs has joined #ruby
RobW_ has quit [Quit: RobW_]
iamjarvo_ has joined #ruby
<atmosx> shevy: did you receive an email from Conjune LLC?
burlyscudd has joined #ruby
<shevy> huh?
<shevy> dont think so
timonv has quit [Read error: Operation timed out]
unixninja92 has quit [Ping timeout: 268 seconds]
<shevy> perhaps in spam folder but I never look into that one :\
apfelbox has joined #ruby
ndrei_ has joined #ruby
zachrab has quit [Remote host closed the connection]
iamjarvo has quit [Ping timeout: 240 seconds]
<Lindrian> apeiros: oh okay then
nickbend_ is now known as nickbender_
<apeiros> hm?
<Lindrian> you said no
jbpros has joined #ruby
<Lindrian> assumed you were answering my question
<apeiros> Lindrian: I was answering platzhirsch's question
jbpros has quit [Client Quit]
Coolhand has quit [Remote host closed the connection]
<apeiros> he asked whether I was referring to him/his question, and I replied "No, [I am referring to] Lindrian['s question]"
jbpros has joined #ruby
ndrei has quit [Ping timeout: 246 seconds]
<platzhirsch> unzip doesn't have an option to remove the zip file after decompression, sucky zip
<Lindrian> apeiros: yes im still at that problem
robscomputer_ has joined #ruby
robscomputer has quit [Read error: Connection reset by peer]
<apeiros> Lindrian: making progress?
<Lindrian> not at all
Coolhand has joined #ruby
<apeiros> where are you stuck?
<Lindrian> i dont even know man
<Lindrian> thats how i feel
<apeiros> lol
<apeiros> ok
<apeiros> lets make an anamnesis then
<apeiros> you have a running ruby?
* platzhirsch puts Lindrian to sleep
<apeiros> i.e., `ruby -v` works and prints what?
* Morrolan snrks
zachrab has joined #ruby
Bira has joined #ruby
<Morrolan> platzhirsch: Deliberate misunderstandings can be entertaining, eh. :)
kjellski has quit [Ping timeout: 264 seconds]
kjellski has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
<platzhirsch> : ))
<Lindrian> ruby 1.9.3p448 (2013-06-27 revision 41675) [i686-linux]
akemrir has joined #ruby
<apeiros> platzhirsch: def unzip_and_delete(file) unzip(file); File.delete(file); end # enjoy!
zachrab has quit [Read error: Connection reset by peer]
jbpros has quit [Client Quit]
<platzhirsch> apeiros: one function doing two things! burn the witch!
hamakn has quit [Remote host closed the connection]
zachrab has joined #ruby
<apeiros> Lindrian: you want a script which is accessible by a browser and returns JSON?
<Lindrian> correct
<Lindrian> i dont want to "build" my entire site in ruby, just have a ruby script available
<apeiros> Lindrian: and you ultimately want that script to run on apache?
hamakn has joined #ruby
<Lindrian> correct
momomomomo has quit [Quit: momomomomo]
<apeiros> it sounds like you already have that script?
unixninja92 has joined #ruby
<Lindrian> i do not
<apeiros> ok
allsystemsarego has joined #ruby
allsystemsarego has joined #ruby
polaco_zZz is now known as polaco
<Lindrian> i'll create it, thats not the problem
<Lindrian> getting it to work with apache is
<shevy> :O
<apeiros> I see
sr78ger has quit [Ping timeout: 256 seconds]
decoponio has quit [Quit: Leaving...]
mwmnj has quit [Quit: Textual IRC Client: www.textualapp.com]
zachrab has quit [Remote host closed the connection]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nfk has quit [Quit: yawn]
<apeiros> I generally use rack based stuff for the whole application, so let me gather a bit of info first
momomomomo has joined #ruby
<apeiros> you did use CGI before rack?
<apeiros> or rather, before trying to go via sinatra?
<Lindrian> correct
<Lindrian> see this guy, this guy speaks my language. we totally seem to understand eachother.
marcdel has joined #ruby
<Fractional> I speak English :D
ixti has quit [Read error: Connection reset by peer]
rcosta has joined #ruby
<apeiros> what was the reason to move away from CGI? (I generally think not using CGI is a good idea, though)
ixti has joined #ruby
<ericwood> ¿qué?
<Lindrian> apeiros: people in here said it would summon the devil and he would consume my soul
hamakn has quit [Ping timeout: 245 seconds]
<apeiros> that's pretty much correct. but for your case it might actually be suited (and I owe shevy an apology)
g3orge has quit [Quit: leaving]
<apeiros> it's akin to saying "goto is bad, don't use it" - it applies to 99.9%. But there is cases where it is "the right choice"™
<Lindrian> i see
Bira has quit [Ping timeout: 240 seconds]
nickbender_ has quit [Remote host closed the connection]
<shevy> I think what he actually mostly just needs is a minimal library that gives him post/get data, like CGI.new.params does
<apeiros> I am currently scanning passengers documents, as I've only ever used it for fully ruby based apps, and I think passenger is generally geared towards that. but I might be wrong, so I check.
Coolhand has quit [Remote host closed the connection]
awarner_ has quit [Remote host closed the connection]
JohnBat26 has joined #ruby
<Todd> will is_a? return true for base classes of the actual class that you're working with?
tonni has joined #ruby
<apeiros> Todd: yes
<platzhirsch> What's a nice Ruby core exception for "What the hell is this kind of value? I don't know what to do"
<apeiros> >> [].is_a?(Enumerable)
<eval-in> apeiros => true (https://eval.in/46705)
<Todd> apeiros, thank you.. I was scratching my head
pskosinski has joined #ruby
polaco is now known as polaco_zZz
<apeiros> Todd: if you don't want that, use .instance_of?
<apeiros> >> [[].is_a?(Enumerable), [].instance_of?(Array)]
<eval-in> apeiros => [true, true] (https://eval.in/46706)
<Todd> apeiros, I'm reading a co-worker's code
<apeiros> whoops
<shevy> hehehe
<shevy> show us
<apeiros> >> [[].instance_of?(Enumerable), [].instance_of?(Array)]
<eval-in> apeiros => [false, true] (https://eval.in/46707)
<Todd> I can't really.
<shevy> I have a soft spot for co-workers
<shevy> :(
<shevy> show us and say it is your code... :P
<Todd> Nothing I do here is my code. :)
<apeiros> platzhirsch: ArgumentError maybe? TypeError?
<shevy> hmm
<Todd> Amerika.
<shevy> sounds as if you made it into management already
baroquebobcat has joined #ruby
<platzhirsch> apeiros: yeah! decisions, decisions,..
<Todd> No. I write code. I just don't own any of it.
<apeiros> platzhirsch: get a coin. it works like a charm.
polaco_zZz is now known as polaco
diegoviola has quit [Quit: WeeChat 0.4.1]
<Todd> Agile and all. We get in trouble for calling things "mine" or "my".
<Todd> Go team!
<apeiros> hrmpf, I thought passenger had an option to limit it to a directory…
<Todd> </sarcasm>
<platzhirsch> Yeah, putting an MIT license on it and then going like I don't own it
unixninja92_ has joined #ruby
<platzhirsch> public domain or chicken
<Todd> On top of legal issues and crazy network security guys.
huoxito has quit [Quit: Leaving]
Coolhand has joined #ruby
<apeiros> Lindrian: would solving it via CGI and (if possible) moving it to non-cgi later be a workable way for you?
Rym_ has joined #ruby
unixninja92 has quit [Ping timeout: 256 seconds]
unixninja92_ is now known as unixninja92
<Todd> I put some stuff on github once that I was using to assist with a project. Had no privacy issues or company secrets or anything in it. Was signed off on by my manager . They still raised a stink about it afterwards.
<apeiros> Todd: ouch…
<apeiros> my employer wouldn't do good if they did that with me :-D
<platzhirsch> Todd: yeah what's wrong with you, probably was a huge financial damage
<Lindrian> apeiros: im pretty sure CGI would work
<Lindrian> its nothing fancy at all
<Todd> And I'm a huge fan of open source. I didn't go to college. If not for open source I wouldn't know how to code. ie. I'd be unemployed or digging a ditch.
<apeiros> Lindrian: I'd say go ahead, use CGI for the time being. get the gratification of seeing it work.
<Todd> So it's kind of painful for me to deal with nonsense like that.
<platzhirsch> Funny thing in Germany, we had an issue with open souring the Open(!) Government Data Platform, because due to laws, it's generally not allowed to open source something (give for FREE away), that was financed with TAXES
Rym has quit [Ping timeout: 264 seconds]
<apeiros> platzhirsch: lol? that's totally counterintuitive…
rcosta has quit [Remote host closed the connection]
<platzhirsch> apeiros: absolutely
<apeiros> open-sourcing is the ultimate form of giving it "back" to the public
<apeiros> i.e., public gets what it paid for…
<platzhirsch> the loophole was to argue through some used libraries had some open source, share alike licenses, so well... "we had to open source it"
<V8Energy> is there a way to scale down an image file without using rmagick? is there some sort of gem?
<apeiros> lucky I'm in your southern neighbor country where we'd just have made a Volksinitiative and put that silliness to an end
<shevy> hehe
<apeiros> V8Energy: there's also imagescience
amospalla has joined #ruby
tonni has quit [Read error: Connection reset by peer]
razi has quit [Ping timeout: 256 seconds]
<V8Energy> apeiros: would it require me to install addtional software like rmagick?
<shevy> platzhirsch funny typo btw... "open souring" ;-)
amospalla has left #ruby ["WeeChat 0.4.1"]
<Morrolan> Except some political parties would oppose it, because it has always been like this and works just fine ;D
<platzhirsch> shevy: Freudian typo
rcosta has joined #ruby
awarner has joined #ruby
<shevy> Morrolan that's quite the only way of political discussion... group A says this, group B opposes it ... rinse and repeat ...
<apeiros> V8Energy: I think it want's a compiler (since it uses ruby-inline)
Rym_ has quit [Ping timeout: 256 seconds]
<Morrolan> shevy: Mweh.
<apeiros> V8Energy: also check ruby-toolbox. there are probably other alternatives.
<V8Energy> apeiros: thanks i will check it out
quoin has joined #ruby
<Todd> V8Energy, any native gem will require you to have the libs and headers installed which are needed for compilation
burlyscudd1 has joined #ruby
<Lindrian> apeiros: alright, thanks man.
burlyscudd has quit [Ping timeout: 240 seconds]
<apeiros> Lindrian: you're welcome. and sorry you've been suffering.
Rym has joined #ruby
<Todd> V8Energy, I'm not aware of anything that's 100% ruby that will resize images for you, but let us know if you find it
<apeiros> shevy: my apologies. you have been right. CGI was a good answer back a couple of hours.
<shevy> no worries
<Todd> apeiros, I'm maintaining my soap box on this one. CGI is never the answer.
<shevy> haha :D
<shevy> see Morrolan? CGI is like a political discussion... you always find those in favour and those to oppose it
<apeiros> Todd: I'd be glad to hear a better alternative
<Todd> apeiros, I must have missed something important
<Todd> apeiros, name something CGI can do that sinatra cannot
<Morrolan> shevy: There's more than opposing and being in love with, isn't there.
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> Todd: the key part is "only a single page of my whole website is ruby"
<shevy> yeah
<apeiros> and it's technically not even a page
<shevy> Morrolan the 99% rest of "man, I don't care either way" ;P
<Todd> apeiros, so? he's talking about writing a service not a "page"
pskosinski has quit [Quit: Til rivido Idisti!]
burlyscudd1 has quit [Client Quit]
khushildep has joined #ruby
<Todd> apeiros, and the "page" would not be ruby.. he was talking about making xmlhttpdrequest's via javascript to his ruby service
<shevy> or perhaps ... "I dont use cgi and don't care because I use rails"
<Todd> apeiros, so it matters not where the ruby lives or run
quoin has quit [Ping timeout: 246 seconds]
elaptics is now known as elaptics`away
<shevy> Lindrian will you use rails one day?
<apeiros> Todd: so how'd you do it?
<Lindrian> maybe, no point unless im building a full fledged website in it
<Lindrian> apeiros: thanks
<Todd> apeiros, we have about 10 or 15 rails projects which merely act a services for our perl cms
<shevy> ohhh
<apeiros> Todd: sure. but there you have fully fledged services.
<apeiros> Todd: not single URL responders
<shevy> you are the guy with the million of lines of old perl legacy code, right Todd?
mansi has quit [Read error: Connection reset by peer]
<Todd> apeiros, he's talking about a service
<Todd> apeiros, albeit a tiny one
<Todd> :P
<Todd> shevy, yeah :(
<shevy> that's damn impressive
mansi has joined #ruby
<apeiros> Todd: sure. but your suggestion sounds like "make a separate vhost for the service"
seich- has quit [Ping timeout: 272 seconds]
<apeiros> and then let that vhost be a complete sinatra app with a single route
s0ny123 has quit [Quit: leaving]
<apeiros> or am I mistaken?
<Todd> apeiros, nothing wrong with that if it's a production system
s0ny123 has joined #ruby
<Todd> apeiros, if it's something he's playing with at home.. CGI it up
<Todd> apeiros, if it's critical.. do it right
polaco has left #ruby [#ruby]
<apeiros> ok. now this might be a part I missed as I was at work before - is this going to be a private or a professional thing?
seich- has joined #ruby
<Todd> yeah I missed it too.. I'm trying to work
<platzhirsch> With %x { } I feel I like more hip
<shevy> what was %x again
<shevy> symbols?
<platzhirsch> execute
<MrZYX> %i is symbols
<apeiros> Todd: also IMO it's better to get it to work. get a lot of problems out of the way. then deal with the then isolated problem of migrating from a single CGI resource to a single-route rack-app
<shevy> I mostly just use %w()
<apeiros> %x is actually a bastard. looks like a literal. is really a method.
noopq has quit [Ping timeout: 256 seconds]
Rym has quit [Ping timeout: 268 seconds]
<MrZYX> well, `` too
<apeiros> yupp
akemrir has quit [Quit: WeeChat 0.4.1]
sirupsen has joined #ruby
rcosta has quit [Remote host closed the connection]
Kruppe has joined #ruby
deception has joined #ruby
<Todd> apeiros, the code itself has nothing to do with CGI vs. Rack.
kjellski has quit [Ping timeout: 256 seconds]
futilegames has quit [Quit: futilegames]
<Todd> apeiros, he can write up a quick class to deal with the JSON and munge it however he so please locally
Rym has joined #ruby
<apeiros> partially
<apeiros> he's new to ruby
kobain has joined #ruby
<Todd> apeiros, I suppose at this point I have no opinion. :)
<apeiros> and if he has troubles for what, 5h to get rack to work/integrate, then that's 4h more than it would have taken to just write the CGI
<apeiros> and it's much easier to migrate from a working system
shtirlic has quit [Read error: Operation timed out]
<Todd> apeiros, I did get a little flustered by his begging for hand holding which caused me to be a bit crass.
<apeiros> Todd: in such cases, divide and conquer
hamakn has joined #ruby
<Todd> apeiros, for that I apologize... Maybe I'm getting old crotchety, but I come from the land of RTFM.
<apeiros> try to slice the problem into separate smaller problems
<platzhirsch> ah maybe I should use system, it looks more natural
mansi has quit [Remote host closed the connection]
<apeiros> Todd: na, it's difficult sometimes
zz_dbRenaud has quit [Ping timeout: 240 seconds]
<Todd> s/d c/d and c/
<apeiros> I don't want to know how often I brushed somebody off undesiredly…
Tobarja has quit [Ping timeout: 245 seconds]
<apeiros> err
mark_locklear has quit [Ping timeout: 276 seconds]
<apeiros> undeservedly
mansi has joined #ruby
jalcine has quit [Ping timeout: 245 seconds]
mumblerit has quit [Ping timeout: 245 seconds]
<apeiros> (undeserved for/to/by the brushed-off party, that is - wtf, english fail…)
machuga has quit [Ping timeout: 264 seconds]
iamjarvo_ has quit [Remote host closed the connection]
<apeiros> platzhirsch: system and `` differ quite a bit
ckampfe has joined #ruby
<apeiros> platzhirsch: system returns true/false based on exit status, `` returns $stdout output
<Todd> you should definitely read about the differences between system and exec
<platzhirsch> apeiros: well `` only makes sense if you want the return value
<apeiros> and iirc both will just print stderr output on $stderr
mumblerit has joined #ruby
iamjarvo has joined #ruby
the_mentat has quit [Ping timeout: 248 seconds]
Kovensky has quit [Ping timeout: 248 seconds]
DanKnox has quit [Ping timeout: 248 seconds]
Guest41314 has quit [Ping timeout: 248 seconds]
xybre has quit [Ping timeout: 245 seconds]
paul__k has quit [Ping timeout: 264 seconds]
yonahw_ has quit [Ping timeout: 264 seconds]
sindork has quit [Ping timeout: 240 seconds]
gf3 has quit [Ping timeout: 240 seconds]
wormwood has quit [Ping timeout: 264 seconds]
onewheelskyward has quit [Ping timeout: 264 seconds]
mumblerit is now known as Guest12247
failshel_ has joined #ruby
mfilipe has quit [Ping timeout: 260 seconds]
scrogson has quit [Ping timeout: 276 seconds]
rgrinberg has quit [Ping timeout: 276 seconds]
<Todd> well, something just went down
marcdel has joined #ruby
yonahw has joined #ruby
Tobarja has joined #ruby
DanKnox has joined #ruby
rgrinberg has joined #ruby
wormwood has joined #ruby
xybre has joined #ruby
xybre has quit [Changing host]
xybre has joined #ruby
onewheelskyward has joined #ruby
zz_dbRenaud has joined #ruby
machuga_ has joined #ruby
machuga_ has quit [Changing host]
machuga_ has joined #ruby
c0rn has joined #ruby
the_mentat has joined #ruby
mfilipe has joined #ruby
machuga_ is now known as machuga
gf3 has joined #ruby
mansi has quit [Ping timeout: 240 seconds]
mumblet has joined #ruby
paul_k has joined #ruby
sindork has joined #ruby
Kovensky has joined #ruby
shtirlic has joined #ruby
Gnubie has joined #ruby
<platzhirsch> Won't make a big difference, although I might want to pass on the stdout/stderr spaming
Gnubie is now known as Guest38604
visof has joined #ruby
scrogson has joined #ruby
failshell has quit [Ping timeout: 264 seconds]
Guest12247 has quit [Ping timeout: 260 seconds]
cads has joined #ruby
Al__ has joined #ruby
jalcine has joined #ruby
robustus has quit [Ping timeout: 245 seconds]
huoxito has joined #ruby
nwertman_ has quit [Quit: leaving]
Coolhand has quit [Read error: Connection reset by peer]
greenysan has joined #ruby
hamakn has quit [Ping timeout: 245 seconds]
Astralum has joined #ruby
<platzhirsch> tomorrow I finish the Well-Grounded Rubyist, I think David Black did a great job on that book
zarubin has quit [Ping timeout: 264 seconds]
Alina-malina has quit [Quit: Leaving]
sirupsen has quit [Quit: sirupsen]
robustus has joined #ruby
<atmosx> I must start reading ruby books (apparently)
<apeiros> platzhirsch: he sometimes visits. realDAB
huoxito has quit [Client Quit]
huanmnl has joined #ruby
<apeiros> I must start writing ruby books (apparently)
<platzhirsch> realDAB?
<apeiros> that's his nick
<platzhirsch> atmosx: it depends, for me it was good to go over some fundamentals which I learned on the fly, it filled a lot of gaps and it was a nice read for someone who is a) not new to Ruby b) not new to programming
chriskk has quit [Ping timeout: 264 seconds]
<V8Energy> i tried science_magic to resize images, but it still requires me to install 2 things as opposed to rmagick which only requires me to install the rmagick lol. i need a standalone gem that can resize images D:
chriskk has joined #ruby
<atmosx> platzhirsch: I need practice with Ruby and I'd love to get some experience working on "real projects" with deadlines, on a team etc.
greenysan has quit [Ping timeout: 240 seconds]
<platzhirsch> atmosx: add cucumber and it's a gig
chairabanta has quit [Quit: Leaving...]
<atmosx> cucumber?
s0ny123 has quit [Quit: leaving]
<atmosx> what's that?
Guest12247 has joined #ruby
<platzhirsch> framework for developing an application in a behavior driven manner
mrsolo has quit [Quit: This computer has gone to sleep]
Guest12247 has quit [Read error: Connection reset by peer]
mrwizard_ has joined #ruby
hadees has joined #ruby
<atmosx> what do you mean by behavior driven manner?
Guest12247 has joined #ruby
saarinen has quit [Quit: saarinen]
girija has quit [Ping timeout: 260 seconds]
<platzhirsch> atmosx: do you know use cases, from software engineering?
<atmosx> platzhirsch: no. (or maybe I do but don't see what you mean, which happens more often than not actually)
<Lindrian> apeiros: now that im running CGI, could you help me parse my JSON data?
<shevy> hehe
sailias has quit [Quit: Leaving.]
<platzhirsch> atmosx: just take a look http://cukes.info/
<Morrolan> Lindrian: JSON.parse(json_data) will return a nice Ruby hash.
<apeiros> Lindrian: require 'json'; JSON.parse(json_data)
<Lindrian> damnit I tried that.
<apeiros> returns either a hash or an array
Al__ has quit [Quit: Al__]
<apeiros> Lindrian: paste your code and exception (or problem description) on gist.github.com
<Lindrian> sec
<platzhirsch> oh btw. JSON.parse, have a look at this recursive_parse implementation, do you think it's legit to use the exception for returning the value parts? https://gist.github.com/platzhirsch/354cedcbea021de48f2f
mrwizard has quit [Ping timeout: 245 seconds]
<platzhirsch> I was thinking about whether I use the exceptions here as a control flow tool
momomomomo has quit [Quit: momomomomo]
azcodex has quit [Remote host closed the connection]
Guest12247 has quit [Ping timeout: 240 seconds]
mansi has joined #ruby
<atmosx> platzhirsch: is that a sort of advancement over TDD?
Guest12247 has joined #ruby
<platzhirsch> atmosx: I think it goes a step further, somehow. Because the abstraction is different
verto has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> Lindrian: should puts "Content-type: application/json\r\n"
failshel_ has quit [Remote host closed the connection]
<V8Energy> dragonfly8
<V8Energy> oops sorry.
<apeiros> or puts "Content-type: application/json\r"
<platzhirsch> you view your project and code that needs to be implemented from the feature, or user scenario perspective
saarinen has joined #ruby
<Lindrian> ok
<apeiros> since spec says \r\n is header terminator, not just \n
<atmosx> platzhirsch: it's the same sort of logic though, adds a step further (hence the abs)
<platzhirsch> rather than the, well we need a function x, with behavior y, let's write a test before implementing x
<atmosx> platzhirsch: thanks, I'll have a look at it.
failshell has joined #ruby
jprovazn has quit [Ping timeout: 268 seconds]
<apeiros> Lindrian: CGI.new("html4").params returns a params hash
<Lindrian> okay
<apeiros> you also need to extract the param you care about
verto has joined #ruby
<Lindrian> im sending it as json though
<apeiros> #!/Ruby193/bin/ruby <-- usually better is #!/bin/env ruby
jonathanwallace has quit [Ping timeout: 245 seconds]
<apeiros> but since you're on debian…
<Lindrian> this is on windows right now
<Lindrian> ill change when i publish to the server
<apeiros> oh…
chriskk has quit [Quit: chriskk]
<apeiros> Lindrian: you mean your url is in the form of: `http://127.0.0.1/your_ruby_cgi.rb?JSON_HERE`?
iamjarvo_ has joined #ruby
<Lindrian> im sending it as POST data right now
iamjarvo_ has quit [Remote host closed the connection]
iamjarvo has quit [Read error: Connection reset by peer]
<V8Energy> i need a standalone gem that can resize image files and doesn't require the user to install any additional software. suggestions?
mumblet is now known as mumblerit
burlyscudd has joined #ruby
<apeiros> with content-type: application/json ?
iamjarvo has joined #ruby
<Lindrian> correct
<Lindrian> i can send as application/form-data too
<Lindrian> or anything really.
Guest12247 has quit [Ping timeout: 260 seconds]
mumblerit is now known as Guest34380
cody-- has quit [Quit: Computer has gone to sleep.]
kurt21 has joined #ruby
saarinen has quit [Client Quit]
Guest12247 has joined #ruby
<apeiros> no, should send application/json
<kurt21> For ruby on rails on Ubuntu, should I install via normal apt-get or should I use rvm?
<apeiros> let me check, been a decade since I wrote CGI
mansi has quit [Read error: Connection reset by peer]
mansi has joined #ruby
<kurt21> Most unix utilities are best installed via apt-get. I know for Java/Scala work, it's better to install manually. The Java in the official repos is some weird variant
<atmosx> kurt21: rvm any day
<atmosx> kurt21: on every *NIX
<kurt21> awesome. thanks
marcdel has quit [Quit: Textual IRC Client: www.textualapp.com]
rupee has joined #ruby
mrsolo has joined #ruby
<atmosx> kurt21: ruby's on every linux distribution are mstly viewed as *part of the system*. Other binaries (i.e. vim) depend on them. That's why they are veeeery slow on updates, they lag behind. It's better to have a totally separated dev environment and leave the system's ruby alone.
<kurt21> even core ruby? uninstall the apt-get version and install through rvm?
MrPoT4tO has quit [Read error: Connection reset by peer]
<Morrolan> God no, leave the system ruby in place.
<kurt21> ah, gotcha
<Morrolan> As he mentioned, several applications depend on it.
<kurt21> makes perfect sense
<atmosx> kurt21: leave it.
MrPoT4tO has joined #ruby
<kurt21> thanks guys :)
<Morrolan> :)
<apeiros> Lindrian: hm, don't see a way to just get the whole request body. you could try `json = $stdin.read?
<apeiros> whoops
<apeiros> you could try `json = $stdin.read`
Al__ has joined #ruby
<Lindrian> and then parse that?
ndrei_ has quit [Read error: Operation timed out]
<Lindrian> A JSON text must at least contain two octets! (JSON::ParserError)
tvw has quit []
tvw has joined #ruby
brbcoding has quit [Ping timeout: 245 seconds]
momomomomo has joined #ruby
allsystemsarego has quit [Quit: Leaving]
<Morrolan> Do a `puts json` after having read from stdin, so we have some clue what it is.
<Morrolan> `p json` is even better.
<Lindrian> Bad header: ""
ndrei has joined #ruby
Al__ has quit [Quit: Al__]
<Lindrian> changed p to puts and now it doesnt error anymore
<Lindrian> but it prints nothing
<Morrolan> Oh, welp.
<Morrolan> Yea, forgot that everything which you print to stdout gets relied to the client. *sigh*
RichardBaker has joined #ruby
<apeiros> ^^
<apeiros> $stderr.puts json.inspect
<apeiros> stderr should be printed to the terminal
Fuzai_ is now known as Fuzai
burlyscudd has quit [Quit: Leaving.]
<apeiros> `p obj` does essentially the same as `puts obj.inspect`, and with $stderr.puts we explicitly print on stderr
<Lindrian> $stderr.puts json.inspect
<Lindrian> err
<Lindrian> Premature end of script
<Morrolan> Now you probably have an open quote, bracket, or similar.
momomomomo has quit [Client Quit]
<Lindrian> i dont think so
Xeago has quit [Read error: Connection reset by peer]
<apeiros> well, you still have to send a valid response to the browser
burlyscudd has joined #ruby
Xeago has joined #ruby
Guest12247 is now known as mumblerit
yalue has quit [Read error: Connection reset by peer]
azcodex has joined #ruby
mikepack has quit [Remote host closed the connection]
v0id_ has joined #ruby
<ehc> Is there an Array.find method that is defined by rails?
burlyscudd has quit [Client Quit]
<apeiros> ehc: there's an Array#find method defined by core ruby
<Lindrian> apeiros: im not sure where stderr will be now.
<Lindrian> im on windows remember, things are crippled.
Xeago has quit [Read error: Connection reset by peer]
krawchyk has quit [Remote host closed the connection]
azcodex has quit [Client Quit]
Xeago has joined #ruby
postmodern has joined #ruby
<apeiros> Lindrian: wherever your server logs to
<shevy> were you not on debian a moment ago
<atmosx> Windows? uuh… scary
Uranio has quit [Ping timeout: 256 seconds]
bronson_ has joined #ruby
<apeiros> Lindrian: hm, let me suggest a middle way
<apeiros> I can't meaningfully run a CGI here without some effort
<apeiros> but I can do something else
brianpWins has quit [Quit: brianpWins]
<Lindrian> alright
pskosinski has joined #ruby
devdazed has quit [Ping timeout: 264 seconds]
mumblerit has quit []
mansi has quit [Remote host closed the connection]
<apeiros> try whether this works for you
Guest34380 is now known as mumblerit
<apeiros> if so, then we have a) an easy start when migrating and b) a common ground and c) still CGI for you :)
rcosta has joined #ruby
mansi has joined #ruby
<Lindrian> undefined method `each' for "{}":String (NoMethodError)
Bira has joined #ruby
<Lindrian> but it does not seem to complain about rack
mansi has quit [Read error: Connection reset by peer]
<apeiros> gah
<apeiros> sorry
mansi has joined #ruby
mary5030_ has joined #ruby
devdazed has joined #ruby
corpuscle has joined #ruby
<havenwood> ehc: Ruby's Enumerable#find is the inherited method available on Array. The tool Pry is really useful easily checking where methods come from: http://pryrepl.org/
starfox21 has quit [Quit: starfox21]
<Lindrian> it works!
visof has quit [Changing host]
visof has joined #ruby
burlyscudd has joined #ruby
iamjarvo has quit [Remote host closed the connection]
brianpWins has joined #ruby
zeade has quit [Quit: Leaving.]
iamjarvo has joined #ruby
burlyscudd has quit [Client Quit]
mary5030 has quit [Ping timeout: 240 seconds]
peregrine81 has quit []
bluOxigen has quit [Ping timeout: 256 seconds]
zeade has joined #ruby
gyre007 has joined #ruby
quoin has joined #ruby
saarinen has joined #ruby
<apeiros> Lindrian: still getting my setup working… moment
pyx has joined #ruby
<Morrolan> What kind of machine are you on, that you don't control the environment? :)
pyx has quit [Client Quit]
<Lindrian> apeiros: you're an angel
<Lindrian> Morrolan: im just on my windows box right now, i dont have linux to boot into
<Lindrian> will fix that soon though
<Lindrian> ill probably throw ubuntu on it
peregrine81 has joined #ruby
saarinen has quit [Client Quit]
<Morrolan> Oh, I actually was wondering about apeiros' environment, since he said that he couldn't get CGI set up in reasonable amount of time.
<apeiros> Morrolan: well, I have no apache installed and getting a rack app running is quick
iamjarvo has quit [Ping timeout: 240 seconds]
<apeiros> the thing now is that I need something which does the JSON request :)
ckampfe has quit [Ping timeout: 245 seconds]
peregrine81 has quit [Read error: Connection reset by peer]
<Morrolan> Ruby?
peregrine81 has joined #ruby
<Morrolan> Anyway, I see. Lack of apache might make it difficult indeed. :)
marr has quit [Ping timeout: 264 seconds]
Companion is now known as companion
<apeiros> Morrolan: na, html document with jquery
<Morrolan> Hah, that works too, I guess.
<apeiros> Morrolan: not difficult, but I don't want to spend time installing and configuring apache ;-)
<apeiros> could do the request via ruby, sure
<apeiros> but since Lindrian uses an ajax request, I'll do too
thillux has quit [Quit: Leaving]
dkamioka has quit [Remote host closed the connection]
rcosta has quit [Remote host closed the connection]
quoin has quit [Ping timeout: 264 seconds]
thillux has joined #ruby
v0id_ has quit [Quit: leaving]
cody-- has joined #ruby
thillux has quit [Read error: Connection reset by peer]
dkamioka has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
rupee has quit [Quit: Leaving]
<apeiros> Lindrian: ok. got it.
<Lindrian> yay
<apeiros> body should contain your whole request body
momomomomo has joined #ruby
<Lindrian> how can i output it?
<apeiros> oh, actually I omitted to replace a line
sirupsen has joined #ruby
shvelo has joined #ruby
<apeiros> you don't know where the server logs to, right?
zigomir has quit [Ping timeout: 264 seconds]
<Lindrian> nein
<Lindrian> you can return stuff in the return header thats fine
<apeiros> write it to a file then. not nice, but at least a work-around
<Lindrian> wont this work [200, {"Content-Type" => 'application/json'}, body]
<Lindrian> ?
elaptics`away is now known as elaptics
<apeiros> that would, yes
<apeiros> it'd just mirror the json inputted
saarinen has joined #ruby
momomomomo has quit [Client Quit]
<Lindrian> great
saarinen has quit [Client Quit]
<Lindrian> and to get each individual item, how do I do that?
<apeiros> you can reopen/reassign $stdout/$stderr so it goes to files you know
<platzhirsch> Apropos differences between exec, system, backticks, %x etc. I thought I put the differences together into this SO question which doesn't have a very detailed answer yet http://stackoverflow.com/questions/6338908/ruby-difference-between-exec-system-and-x-or-backticks/18623297#18623297
<shevy> Is this a good prototype for method_missing implementation in a class: def method_missing(method_sym, *arguments, &block)
MrZYX is now known as MrZYX|off
bronson_ has quit [Quit: bronson_]
<apeiros> Lindrian: now comes what was initially wanted - JSON.parse
jkamenik has joined #ruby
jkamenik has quit [Client Quit]
<Lindrian> i see
brisbin has quit [Read error: Connection reset by peer]
dankest has quit [Quit: Peace]
vince_prignano has joined #ruby
vince_prignano has quit [Remote host closed the connection]
vince_prignano has joined #ruby
saarinen has joined #ruby
<Lindrian> thanks apeiros
<Lindrian> this is all i ever wanted
deception has quit [Quit: Goodbye]
ahegyi_ has quit [Ping timeout: 240 seconds]
brisbin has joined #ruby
BizarreCake has quit [Read error: Operation timed out]
<Lindrian> apeiros: how do i check if the key "regex" exists in data?
<apeiros> line 5 & 6 open files to send stderr and stdout of the ruby script
<apeiros> Hash#has_key?
<apeiros> data.has_key?("regex")
<apeiros> `Hash#has_key?` reads as `instance method "has_key?" of class Hash`
platzhirsch has left #ruby [#ruby]
<Lindrian> thanks
<Lindrian> you deserve a price my friend
Hanmac has quit [Quit: Leaving.]
rupee has joined #ruby
<apeiros> help is top down. just pass it on to the next who needs help ;-)
<Lindrian> apeiros: if you're curious to know what im doing, its to provide a ruby flavor for my regex testing website. I figured I would do everyone a solid and provide a solid online regex tester for ruby
<Lindrian> I already have full support for JS/PHP/Python
<apeiros> you're welcome. after all, you proved to have quite an impressive endurance :)
<Lindrian> heh
vince_prignano has quit [Remote host closed the connection]
<fryguy> isn't that what rubular is for
<apeiros> nice
InFlames has joined #ruby
vince_prignano has joined #ruby
<Lindrian> fryguy: i guess. rubular was what inspired me to create my own site
<Lindrian> regex101.com
<Lindrian> is my website
<apeiros> Lindrian: btw., this is a viable rack-app. means only the last line would have to be replaced to have it run by whatever adapter you want.
vince_prignano has quit [Remote host closed the connection]
<Lindrian> amazing
<breakingthings> My kingdom for a flash-less Regexr clone
<Lindrian> fryguy: rubular is quite limited in my opinion
vince_prignano has joined #ruby
vince_pr_ has quit [Remote host closed the connection]
<Lindrian> breakingthings: what is?
<Lindrian> rubular?
jocellyn has joined #ruby
<breakingthings> Lindrian: As in, I would give my kingdom for a flashless Regexr clone.
<Lindrian> then im sure my site would please you
<apeiros> Lindrian: an important thing: ^ and $ are not start/end of string in ruby. they're start/end of line.
Kabaka has quit [Remote host closed the connection]
vince_prignano has quit [Remote host closed the connection]
<apeiros> \A and \z are start/end of string in ruby
greenysan has joined #ruby
<Lindrian> thanks
<Lindrian> i was skimming through the docs
vince_prignano has joined #ruby
slyv has joined #ruby
<Lindrian> my code is very adaptable, a few rules would take care of that. only real "problem" is the very very weird char class syntax in ruby
slyv has quit [Max SendQ exceeded]
<breakingthings> Lindrian: I wish it had inline, realtime highlighting of matches like Regexr though :)
Kabaka has joined #ruby
Bira has quit [Remote host closed the connection]
robscomputer_ has quit [Remote host closed the connection]
<Lindrian> breakingthings: i discussed that with a few people, turns out its more cons than pros with a solution like that.
Xeago has quit [Remote host closed the connection]
dkamioka has quit [Remote host closed the connection]
* breakingthings shrugs
<breakingthings> I found it useful on more than one occasion when I was building a regex from scratch.
robscomputer has joined #ruby
<apeiros> Lindrian: take a look at debuggex.com too
<breakingthings> But I won't say your tool isn't useful :)
<Lindrian> my website will actually validate your regex, and find errors and explain them to you. if it did this on every keystroke, you'd see errors even though you still werent done.
<breakingthings> Well, not the errors.
ckampfe has joined #ruby
<breakingthings> Just highlighting matches.
<Lindrian> breakingthings: secondly, people tend to look at their regex when they write it, then the result.
vince_prignano has quit [Remote host closed the connection]
mary5030_ has quit [Remote host closed the connection]
<Lindrian> breakingthings: it will simply not highlight anything then
vince_prignano has joined #ruby
Bira has joined #ruby
<Lindrian> apeiros: i've seen it. great stuff, horrible interface though.
<breakingthings> Lindrian: It would highlight the test string. See how regexr does it.
bronson_ has joined #ruby
<breakingthings> I can figure out whether the token I just put worked immediately
<breakingthings> and you can remove the need for a highlighting box on the right
<Lindrian> if my regex is invalid, regexr just does not highlight anything
vince_prignano has quit [Client Quit]
<Lindrian> how do I know if my regex is invalid or the page is broken?
vince_prignano has joined #ruby
phantasm66 has quit [Quit: *sleeeep….]
<kurt21> which is better: rvm or rbenv?
<breakingthings> I didn't say regexr was the best thing in the world. Obviously show errors. I just want to see things highlight in realtime.
<breakingthings> Errors can still be there.
<breakingthings> They don't have to be realtime either.
rodacato has joined #ruby
jonathanwallace has joined #ruby
greenysan has quit [Ping timeout: 260 seconds]
<Lindrian> breakingthings: i see what you're saying. i cant do that with my current solution as im running ajax requests.
<Lindrian> regexr runs flash on your browser
jonkri has quit [Quit: jonkri]
<breakingthings> I realize that.
Spami has joined #ruby
<breakingthings> Though you can run realtime calculations clientside.
<Lindrian> how so? i could only do that with javascript
<Lindrian> the rest would still require ajax
<breakingthings> well, yes. with javascript.
<postmodern> kurt21, chruby :)
sailias has joined #ruby
<breakingthings> I see your point at that point with other langs.
<kurt21> oh no, another one!
InFlames has quit [Quit: Leaving]
robscomputer has quit [Ping timeout: 240 seconds]
InFlames has joined #ruby
iamjarvo has joined #ruby
<Lindrian> im planning on creating a full fledged regex debugger aswell
sirupsen has quit [Quit: sirupsen]
<Lindrian> which would run in perl
<Lindrian> but would be quite applicable in most languages i think
jbrechte_ has quit [Remote host closed the connection]
<alpha123> postmodern: is chruby the currently recommended one? I too am very confused about the multitude of rvm-like things.
<postmodern> alpha123, rvm is still the recommended one for new users
<Morrolan> RVM does more than chruby.
<alpha123> postmodern: ok. doesn't it do ugly things to my shell though?
jbrechtel has joined #ruby
Ripp__ has quit [Quit: Ripp__]
Ripp__ has joined #ruby
<postmodern> alpha123, sort of. they have improved some things
<havenwood> +1 chruby
vince_prignano has quit []
<jrobeson> alpha123, there is no favorite atm
<jrobeson> other than rvm :(
zachrab has joined #ruby
<jrobeson> i've been using rbenv since it doesn't mess with my shell
<jrobeson> but that was from before chruby existed
<fryguy> i like using rbenv for development, and chruby for production
<fryguy> probably going to end up just using chruby for everything
mansi has quit [Remote host closed the connection]
<jrobeson> ruby apps are like osx apps.. :(
<jrobeson> everyhting is packaged
mansi has joined #ruby
jbrechtel has quit [Ping timeout: 260 seconds]
mcat1 has joined #ruby
rafacv has joined #ruby
platzhirsch has joined #ruby
mcat1 has left #ruby [#ruby]
<platzhirsch> There's one problem with unzipping archives via system & co. I don't get the filename of the file that was inside, so I really go down that road and compare the directory list before and after?
mansi has quit [Read error: Connection reset by peer]
<platzhirsch> meh
mansi has joined #ruby
Banistergalaxy has quit [Ping timeout: 256 seconds]
zachrab has quit [Ping timeout: 245 seconds]
<jrobeson> why are you unzipping with system ?
mansi has quit [Remote host closed the connection]
<jrobeson> i haven't done any archive unpacking in ruby.. but i figured there were libraries
<platzhirsch> jrobeson: That was my previous solution, I don't want to load them into memory
michaellynch has quit [Ping timeout: 268 seconds]
sepp2k has quit [Read error: Connection reset by peer]
seich- has quit [Ping timeout: 240 seconds]
burlyscudd has joined #ruby
<platzhirsch> there is zlib (for gzip) and rubyzip (for zip)
s0ber_ has joined #ruby
ixti has quit [Read error: No route to host]
mansi has joined #ruby
<platzhirsch> although.. maybe it's not a problem. If both use IO object and stream it, then the memory shouldn't be affect much, should it?
mansi has quit [Remote host closed the connection]
robscomputer has joined #ruby
alpha123 is now known as alpha123-afk
mansi has joined #ruby
sepp2k has joined #ruby
Tuxist has quit [Read error: Connection reset by peer]
s0ber has quit [Ping timeout: 256 seconds]
c0rn has quit [Ping timeout: 268 seconds]
s0ber_ is now known as s0ber
reset has joined #ruby
ckampfe has quit [Ping timeout: 260 seconds]
aryaching has quit [Ping timeout: 264 seconds]
kaldrenon has quit [Read error: Connection reset by peer]
c0rn has joined #ruby
havenwood has quit [Remote host closed the connection]
kaldrenon has joined #ruby
zachrab has joined #ruby
havenwood has joined #ruby
havenwood has quit [Read error: Connection reset by peer]
Eiam has joined #ruby
danman has joined #ruby
mansi has quit [Ping timeout: 260 seconds]
mansi has joined #ruby
s0ny123 has joined #ruby
seich- has joined #ruby
kaldrenon has quit [Ping timeout: 264 seconds]
rodacato has quit [Remote host closed the connection]
kpshek has quit [Ping timeout: 264 seconds]
mengu has joined #ruby
rezzack has joined #ruby
Quashie has joined #ruby
colonolGron has joined #ruby
mrsolo has quit [Read error: Connection reset by peer]
kpshek has joined #ruby
mrsolo has joined #ruby
nhhagen has quit [Remote host closed the connection]
ldnunes has quit [Quit: Leaving]
nhhagen has joined #ruby
momomomomo has joined #ruby
jp- has quit [Quit: OK, I believe you… but my tommy gun don't]
mansi has quit [Read error: Connection reset by peer]
Skylab has quit [Quit: Skylab]
mansi has joined #ruby
Nilium has joined #ruby
fcahoon has joined #ruby
nhhagen has quit [Ping timeout: 264 seconds]
capsuley has joined #ruby
JDHankle has quit [Remote host closed the connection]
iamjarvo_ has joined #ruby
ckampfe has joined #ruby
ner0x has quit [Quit: Leaving]
mansi has quit [Read error: Connection reset by peer]
hornairs has joined #ruby
jonathanwallace has quit [Ping timeout: 260 seconds]
<platzhirsch> IO.copy_stream is really nice for that
quoin has joined #ruby
mansi has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
zachrab has quit [Remote host closed the connection]
iamjarvo has quit [Ping timeout: 246 seconds]
iamjarvo_ has quit [Ping timeout: 240 seconds]
Speed has joined #ruby
alex__c2022 has quit [Quit: alex__c2022]
marr has joined #ruby
JohnBat26 has quit [Ping timeout: 256 seconds]
quoin has quit [Ping timeout: 245 seconds]
dfdx2 has joined #ruby
thillux has joined #ruby
s0ny123 has quit [Quit: leaving]
<pontiki> can you stick the decomp in there?
s0ny123 has joined #ruby
jdenen has quit [Read error: Connection reset by peer]
danman has quit [Quit: danman]
atyz has quit [Quit: Leaving...]
tonni_ has joined #ruby
nhhagen has joined #ruby
twoism_ has joined #ruby
twoism has quit [Read error: Connection reset by peer]
s0ny123 has quit [Client Quit]
ehc has quit [Quit: ehc]
JDHankle has joined #ruby
KevinSjoberg has quit [Quit: Computer has gone to sleep.]
RenderRob has joined #ruby
Bira has quit [Remote host closed the connection]
<RenderRob> just downloaded the ruby koans. Why do the first several tests pass by default?
<RenderRob> AboutAsserts#test_assert_truth has expanded your awareness.
<RenderRob> AboutAsserts#test_assert_with_message has expanded your awareness.
<RenderRob> AboutAsserts#test_a_better_way_of_asserting_equality has expanded your awareness.
<RenderRob> AboutAsserts#test_fill_in_values has expanded your awareness.
<RenderRob> AboutAsserts#test_assert_equality has expanded your awareness.
<RenderRob> AboutNil#test_nil_is_an_object has damaged your karma.
nickbend_ has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
momomomomo has quit [Quit: momomomomo]
nickbend_ is now known as nickbender_
julweber has joined #ruby
claymore_ has quit [Quit: Leaving]
<Eiam> hmm they didn't pass for me when i did them a few years ago! =0
Spami has joined #ruby
<RenderRob> Eiam, what is invoking these methods? All I see are methods in classes, but I don't see what's calling them or in what order they are being called.
<Eiam> RenderRob: doing them online? http://koans.heroku.com/en/about_asserts
<RenderRob> Are they called in order if each return true?
<RenderRob> Eiam, I downloaded it
jocellyn has quit [Remote host closed the connection]
<RenderRob> I use sublime
thillux_ has joined #ruby
<Eiam> RenderRob: yes, the first 5 pass for me too
quoin has joined #ruby
<RenderRob> odd
Bira has joined #ruby
beneggett has joined #ruby
havenwood has joined #ruby
<Eiam> well, they are pretty basic but yes, odd
quoin_ has joined #ruby
apfelbox has quit [Ping timeout: 246 seconds]
greenysan has joined #ruby
GeissT has quit [Ping timeout: 248 seconds]
<RenderRob> right, but they differ from the instructions
<RenderRob> nicht gut!
thillux has quit [Ping timeout: 260 seconds]
atmosx has quit [Quit: Lost in trance]
<Eiam> RenderRob: so at a glance it looks like path to enlightenment defines your progress order
<Eiam> and neo.rb handles executing the files in each about_blah.rb
kofno has quit [Quit: leaving]
thillux_ has quit [Remote host closed the connection]
haukur has joined #ruby
<RenderRob> ah yes, I see now
Nisstyre has joined #ruby
<Eiam> also it looks like the read me explains this =)
<haukur> what's the general convention regarding line-spacing, two lines between classes, two lines after requires, etc?
peregrine81 has quit []
<RenderRob> ah, I was following the instructions online, so I didn't look for a readme
quoin has quit [Ping timeout: 240 seconds]
<havenwood> haukur: a single blank line
apfelbox has joined #ruby
<haukur> havenwood: always single lines?
soba has joined #ruby
<havenwood> haukur: two blank lines in a row is heresy
<haukur> okay, thanks
<haukur> coming from Python :)
<haukur> be gentle
<RenderRob> ha
greenysan has quit [Ping timeout: 264 seconds]
<Eiam> havenwood: psh.
* Eiam skims his code
<havenwood> Eiam: There is a limited amount of whitespace. If you use too much, we'll run out!
<havenwood> Eiam: Then where will we be!?
<Eiam> two returns for significant departures in related code blocks
<Eiam> one for things to visually separate
BillCriswell has quit [Remote host closed the connection]
mansi has quit [Read error: Connection reset by peer]
<Eiam> havenwood: yeah gotta save those primary keys too, might run out =)
<havenwood> haukur: There isn't a strict convention. Comes down to helping others read your code. But generally one blank line suffices.
JDHankle has quit [Remote host closed the connection]
mansi has joined #ruby
Fractional has quit []
<workmad3> Eiam: don't joke
mmitchell has quit [Ping timeout: 268 seconds]
<workmad3> Eiam: I came across a codebase once where they used a 1 byte mysql int for the primary key...
<haukur> havenwood: thanks. I've seen some people leave empty lines after a class declaration and before the final end, is this generally done?
<Eiam> well, I cannot help people who don't know what they are doing
<RenderRob> what is this called? thing = :something
<Eiam> RenderRob: assigning a variable the value of a symbol?
<workmad3> RenderRob: assignment?
swistak35 is now known as swistak36
<RenderRob> --> "symbol"
swistak36 is now known as swistak35
<havenwood> RenderRob: "string actually"
<havenwood> >> "string".class
<eval-in> havenwood => String (https://eval.in/46710)
<havenwood> >> :symbol.class
<eval-in> havenwood => Symbol (https://eval.in/46711)
DrShoggoth has quit [Ping timeout: 256 seconds]
gusnasis has quit [Read error: Connection reset by peer]
classix has joined #ruby
gusnasis has joined #ruby
<havenwood> RenderRob: You can convert back and forth with #to_s and #to_sym (or #intern, since Symbol is an interned string).
dhruvasagar has quit [Ping timeout: 264 seconds]
<shevy> hmm
<shevy> #intern is as #to_sym ?
<Eiam> yeah
<Eiam> thats kind of weird
guardian_ has joined #ruby
<havenwood> aliases
<Eiam> but whatever, i guess its collect vs map
<shevy> all those who use collect must die!
<RenderRob> havenwood, what would be an analogous object from another language?
<Eiam> shevy: I just went through and find/replaced a part time code base contributors usage of "collect"
<workmad3> RenderRob: to a symbol?
<Eiam> for some reason it mentally throw me off =(
<RenderRob> right
<workmad3> RenderRob: maybe the Symbol object from Smalltalk ;)
<RenderRob> hmm, haven't used smalltalk
<Eiam> a global pointer to the same instance
<Eiam> ?
<RenderRob> I've used python, php, c++
c0rn has quit [Quit: Computer has gone to sleep.]
<havenwood> RenderRob: Ruby's come from the Lisp terminology. Other languages call them Atoms instead of Symbols. Like an atom in Elixir.
<shevy> Eiam hehe yeah, it distracts me as well... but I must admit, ruby code written by other people often confuses me a lot
<workmad3> RenderRob: there isn't an exactly analogous construct in those languages, afaik...
<Eiam> shevy: yes, ruby lends itself very well to being confusing if written by what I call "assholes"
gusnasis has quit [Ping timeout: 240 seconds]
<Eiam> shevy: or worse, "clever assholes"
<RenderRob> lol
<workmad3> RenderRob: C++ has enums, which are somewhat like them
volty has joined #ruby
<Eiam> workmad3: enums are like symbols?!
<apeiros> symbols are a bit like a number with a name
<workmad3> RenderRob: in the way they're used at least
<Eiam> a global number..
<Eiam> with a name..
<apeiros> all numbers are global :)
<platzhirsch> With 'rubyzip' I can create a IO-like object with is = Zip::InputStream.open("my.zip"), but somehow with File.new('decompressed, 'w') { |f| IO.copy_stream(is, f) } the content is not written into that file. Any thoughts what could be missing?
<workmad3> Eiam: symbols are frequently used in a similar manner to C++ enums
Targen has quit [Ping timeout: 245 seconds]
<workmad3> and tbh, 'number with a name' describes a C++ enum perfectly ;)
<Eiam> workmad3: yeah, I've thought about it more since my initial reaction 30 seconds ago
<Eiam> and I'm agreeing now =)
<pontiki> platzhirsch: does using File.open there make any difference?
<Eiam> apeiros: point =p
<Eiam> apeiros: I still think its important to mention symbols are global
<shevy> who
breakingthings has quit []
<apeiros> workmad3: don't enums provide additional restrictions, though? as in, you can only use the values listed in an enum?
<shevy> oops... I meant whoa
<Eiam> vs x =2 not being global
<apeiros> (IMO an advantage for many use cases)
kvirani has quit [Remote host closed the connection]
<workmad3> apeiros: yeah, somewhat analogous, not a perfect mapping ;)
<shevy> but nubmers are beautiful globals
<shevy> *numbers
<platzhirsch> pontiki: indeed, I get a undefined method length method for nil class, seems there is a problem with the implementation
kvirani has joined #ruby
verto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> RenderRob: symbols are used to identify everything with a name in ruby
<pontiki> hmm...
<apeiros> local variables, @ivars, constants, method names
Targen has joined #ruby
<apeiros> whenever you define something with a name, a symbol with that value comes into existence
<RenderRob> "with a name"
<platzhirsch> pontiki: I think they provide their own copy_stream method, I have seen something like this
hukl has quit [Quit: Leaving...]
<RenderRob> 0_o
<pontiki> ah...
peta_ has quit [Quit: peta_]
d2dchat_ has joined #ruby
<workmad3> apeiros: aren't a lot of those lazily constructed though?
<workmad3> apeiros: which I know is an implementation detail :)
solidoodlesuppor has quit [Remote host closed the connection]
<apeiros> workmad3: I think not. but I never checked that. I assume you mean in MRI/KRI?
<apeiros> RenderRob: `def foobar; end`
jbrechtel has joined #ruby
<apeiros> you created a method, it has a name: "foobar"
<apeiros> you identify it by that
<apeiros> @flubber = 123 # you defined an instance variable, it has a name "@flubber", you identify it by that
<apeiros> and that's where Symbols shine: identifying things.
<RenderRob> hmm
<workmad3> apeiros: ah, they do seem to be immediately created, you're right
<workmad3> apeiros: and yeah, I was meaning in MRI 1.9/2.0
Bira has quit [Remote host closed the connection]
<Eiam> RenderRob: {:name =>"John"}
fcahoon has quit [Quit: Leaving]
asobrasil has left #ruby [#ruby]
kvirani has quit [Ping timeout: 276 seconds]
<RenderRob> looks like a JS object or PHP array
<Eiam> RenderRob: [{:name =>"John"},{:name =>"Joe"}]
<RenderRob> array of objects
<RenderRob> ?
<apeiros> array of hashes
<workmad3> ^^
<apeiros> >> {}.class
<eval-in> apeiros => Hash (https://eval.in/46712)
<volty> symbols are immutable strings, with assigned id numbers, that live in the global space - quite efficient
pskosinski has quit [Quit: Til rivido Idisti!]
<apeiros> $ ruby -e 'x = Symbol.all_symbols.dup; eval "def foobar; end"; p(Symbol.all_symbols-x)'
<apeiros> [:foobar]
<volty> if you need a two (or more) word enum-like you use, e.g., :"first name"
jbrechtel has quit [Ping timeout: 264 seconds]
<RenderRob> all symbols are global?
corpuscle has quit [Quit: WeeChat 0.4.1]
<Eiam> or :first_name
<apeiros> volty: that one is also nice for interpolated symbols
<volty> yap
<apeiros> RenderRob: global and never garbage collected
<Eiam> RenderRob: yes
alekst has quit [Quit: Computer has gone to sleep.]
<workmad3> RenderRob: the first time you use a :symbol, it gets created
<apeiros> which is why you should not use it for arbitrary user input
momomomomo has joined #ruby
<apeiros> or rather: which is why you should not use it for user-input
<workmad3> RenderRob: thereafter, everytime you use the same :symbol literal, the same Symbol object is provided
<volty> apeiros: i do agree, symbols are good as syntactic sugar and should not be created "on-fly" - unless one has a very cute and precise ideas ...
snovak has quit [Remote host closed the connection]
alpha123-afk is now known as alpha123
<RenderRob> That might be the first time I've ever heard of an idea being had which is characterized as "cute" :)
haukur has quit [Quit: Lost terminal]
<Eiam> i like symbols I think they are kind of neat =p
eshlox has left #ruby ["."]
axeman- has quit [Remote host closed the connection]
<shevy> I hate them
<workmad3> shevy: you hate everything :P
<Eiam> =p
<shevy> every moment I have to ask myself "will I use a symbol or will I use a string"
<workmad3> shevy: it's just a case of whether you hate it more or less than something else ;)
<Eiam> shevy: lol..
<shevy> workmad3 nah, ruby has a good foundation
<volty> «apeiros: global and never garbage collected» - remember this! whenever you have problems with objects going out of scope (for whatever reason - usually created by external libs) put them in global var or a global array that you clean after by hand
<shevy> workmad3 it just has warts on the outside
<Eiam> shevy: whats that matteR?
<apeiros> shevy: just use strings.
graft has quit [Ping timeout: 268 seconds]
nickbender_ has quit [Remote host closed the connection]
<Eiam> or just use symbols ;p =)
<Eiam> save those precious object_ids!
<RenderRob> so all variables and objects in ruby automatically generate a symbol?
<shevy> Eiam well consider user_input = gets.chomp, from this point on you have a string right? so internally, if you work with it, you always want to work on a string everywhere
<apeiros> RenderRob: all variables yes, all objects no
<apeiros> variables have names. objects do not
jaynewstrom has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
<Eiam> apeiros: ???
<Eiam> apeiros: >> x ="a"; :x
<Eiam> >> x="a"; :x
<eval-in> Eiam => :x (https://eval.in/46714)
<apeiros> Eiam: yes?
<Eiam> apeiros: variable x didn't get a symbol
nbouscal has joined #ruby
<apeiros> Eiam: of course it did.
<Eiam> shevy: thats user input.. which I generally agree should always be a string..
<kurt21> If I want to use specifically Rails version 3.2.13, which version of Ruby do I want?
<Eiam> shevy: when interacting with my own objects, in particular hashes and their keys, I prefer symbols
<apeiros> >> x = "a"; Symbol.all_symbols.map(&:to_s).include?("x")
<eval-in> apeiros => true (https://eval.in/46715)
<shevy> Eiam so when you have a hash with keys only, you must convert user input queries to symbols right?
<apeiros> kurt21: #rubyonrails
<apeiros> kurt21: probably newest patchlevel of 1.9.3
hasrb has quit [Remote host closed the connection]
<volty> RenderRob: think about it this way: a symbol is created for whatever could be referenced
<kurt21> apeiros: thanks!
<Eiam> shevy: If I'm dealing with data like that sure, but my data models don't generally flow that way
<shevy> do you never have or store user input :P
<Eiam> shevy: DB <-> Internal Object -> JSON.
<shevy> ok I see, anything less than a database is not where you work :P
<shevy> what happened to good old perl days!
<Eiam> IO will have symbols. to_json moves it to strings. frontend talks in strings, and those don't get converted into internal objects so no need to deal with symbols
<Eiam> shevy: I'm not sure what you mean by "less than a DB"
<workmad3> shevy: sure, convert a user command to a symbol... but only once you've validated that it is a command you know about ;)
<Eiam> i just described a general input output flow where I use symbols but don't have to worry about input conversion to symbols was all
elaptics is now known as elaptics`away
MrPoT4tO has quit [Read error: Connection reset by peer]
E23 has joined #ruby
adkron_ has quit [Ping timeout: 264 seconds]
MrPoT4tO has joined #ruby
<platzhirsch> pontiki: still complaining, that one of the two streams would not be opened for reading. I just hope I can achieve the stream extracting through another interface method
rcosta has joined #ruby
rhys_ has quit [Quit: Leaving]
<workmad3> shevy: also, there's many popular 'hash with indifferent access' implementations that will let you access the same value with both "key" and :key (and I hope at least most of them convert :key to "key" rather than "key" to :key :D)
cody-- has quit [Quit: Computer has gone to sleep.]
vlad_sta_ has quit [Remote host closed the connection]
v0n has quit [Ping timeout: 260 seconds]
<shevy> workmad3 hah funny that you mention that... I went the exactly opposite way for a class Configuration I wrote... only symbols may be stored in my hash (that was my earlier question when I wanted class Configuration < Hash)
robscomputer has quit [Remote host closed the connection]
<apeiros> n8
apeiros has quit [Remote host closed the connection]
<shevy> but get this, before I did this I could have had ...
<shevy> some_hash[:debug]
robscomputer has joined #ruby
<shevy> some_hash['debug']
<shevy> in the same hash!
apeiros has joined #ruby
E23 has left #ruby [#ruby]
<workmad3> shevy: well yeah... they're different objects, they hash to different things... they're different :P
mlpinit has quit [Remote host closed the connection]
Zai00 has joined #ruby
momomomomo has quit [Quit: momomomomo]
<volty> I don't like hashes for config - since i cannot decide the order of the keys // the order is important if you are creating, f.e., a gui dialog programatically
<volty> and, said that, btw, can you suggest me something nice for that purpose ?
<volty> (key, value pairs where i can change the order of keys)
starfox21 has joined #ruby
Naoe-Kanno has joined #ruby
<workmad3> volty: xml? </troll> ;)
SHyx0rmZ has quit [Ping timeout: 245 seconds]
<volty> i don't mind xml // i was thinking of a nice extension for Hash - nice but also excepted by users if not as standard
nbouscal has quit [Quit: Computer has commenced electric sheep tracking protocol.]
<Eiam> volty: hashes are ordered as of 1.9..
robscomputer has quit [Ping timeout: 268 seconds]
c0rn has joined #ruby
<Eiam> workmad3: hey I use xml for configuration sometimes =)
<Eiam> beats yaml IMO
<Eiam> I'd probably just use json if I did it over =) or a database!
<workmad3> Eiam: drats... I should have gone for INI files :P
<volty> as for the troll: I don't like the little compulsive teachers - that's all // talk about whatever but not teach a novice, that hasn't read a single line of ruby-doc, what is an instance variable
lnormous has joined #ruby
<Eiam> huh?
<volty> Eiam: what if I want to reorder? Or define the order of known-in-advance keys without having to assign in that order?
cody-- has joined #ruby
zastern_ has joined #ruby
<volty> ini files aren't a bad idea :)
<Eiam> volty: well, hash order is defined by order of insertion
<shevy> at least XML does not force you into just one encoding
jonathanwallace has joined #ruby
<workmad3> shevy: which is a shame :P
<Eiam> volty: if you want to re-order, sort the hash? =)
jerius has quit [Ping timeout: 264 seconds]
Zai00 has quit [Quit: Zai00]
<shevy> RenderRob better than nothing
<RenderRob> trying to figure out which things are objects in ruby
NinjaBot_ has joined #ruby
<shevy> assume that most are
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<NinjaBot_> hi
<shevy> and from this point continue
<volty> what is not?
<RenderRob> variables are not?
guardian_ has quit [Ping timeout: 264 seconds]
<NinjaBot_> I'm written in Ruby!
<Eiam> blocks
<workmad3> RenderRob: if you can examine it, then it'll be an object when you examine it
<workmad3> Eiam: blocks are objects
dfdx2 has quit [Quit: Leaving]
<shvelo> blocks are objects too
<workmad3> Eiam: once you get a handle on one, it's a proc ;)
<shevy> volty, well ... x = 5; def x.hi; puts "hi"; end
<RenderRob> oh no, ruby is like quantum mechanics. This is a bad sign
Croms has joined #ruby
<volty> shevy: what about that?
<shevy> that is not a real object
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kayloos has quit [Remote host closed the connection]
<Eiam> workmad3: right, once you get it as a proc
<RenderRob> variables are objects once observed? Do they create interference patterns too?
<workmad3> RenderRob: nah, it's just that in some cases, the main ruby interpreter will be a bit lazy about things
<Eiam> its an object
<Eiam> workmad3: but before you get the &block its not an object..
<workmad3> Eiam: implementation detail
<Eiam> workmad3: =p
<shevy> a real object would allow you to use singleton methods
<volty> shevy you have more objects inside that piece of code
kpshek has quit []
<shevy> what piece of code
<volty> yours
<shevy> my code doesnt even work
capsuley has quit [Ping timeout: 256 seconds]
jonathanwallace has quit [Ping timeout: 240 seconds]
Rym has quit [Quit: Rym]
<Eiam> >> <<.object_id
<eval-in> Eiam => /tmp/execpad-17bf8c42ff35/source-17bf8c42ff35:2: syntax error, unexpected << ... (https://eval.in/46717)
<banisterfiend> RenderRob methods are not objects
NinjaBot_ has quit [Remote host closed the connection]
<workmad3> Eiam: which is easier to reason through - 'a block is just syntax for passing a proc to a method' or 'a block is special. The VM will only turn it into an object when I actually need it as an object, up until then it's not an object *as long as I don't look at it*' ;)
<shevy> Eiam what was that
<workmad3> banisterfiend: but once you ask for a method programmatically, you get a Method object ;)
<volty> shevy: ah, sorry, was distractted, fixnum are an exception
lewis has joined #ruby
<Eiam> shevy: me wondering if << had an object_id ? =)
<workmad3> >> method(:<<).object_id
<eval-in> workmad3 => undefined method `<<' for class `Object' (NameError) ... (https://eval.in/46718)
<shevy> oh man... I never had this idea in my life
<workmad3> >> [].method(:<<).object_id
<eval-in> workmad3 => 542443800 (https://eval.in/46719)
<Eiam> >> +.object_id
<eval-in> Eiam => /tmp/execpad-a0c742acdc19/source-a0c742acdc19:2: syntax error, unexpected '.' ... (https://eval.in/46720)
<Eiam> same..
<Eiam> yeah
<shevy> huh wait... who has the object_id here?
<Eiam> figured
<Eiam> shevy: [] right?
<workmad3> >> 1.method(:+).object_id
<eval-in> workmad3 => 549751130 (https://eval.in/46721)
<shevy> ohhhh
<workmad3> Eiam: no, it's the object ID of the method object for << on []
<shevy> x = [].method(:<<) # => #<Method: Array#<<>
khushildep has quit [Quit: getting the flock() outta here]
<Eiam> workmad3: right so Fixnum has a method + with an id of 549....
<shevy> cool
<workmad3> Eiam: well, it had that ID this time
<workmad3> Eiam: again, method objects are, afaik, constructed lazily
<shevy> huh
<banisterfiend> workmad3 but it's a different Method object each time ;)
<workmad3> banisterfiend: ah, I was wondering about that :)
<banisterfiend> workmad3 if it was the same Method object you could probably convince yourself they're objects
nhhagen has quit [Remote host closed the connection]
m8 has quit [Quit: Sto andando via]
nhhagen has joined #ruby
rodacato has joined #ruby
<workmad3> >> a = 1.method(:+); puts 1.method(:+).object_id == a.object_id
<eval-in> workmad3 => false ... (https://eval.in/46722)
<banisterfiend> >> method(:puts).equal? method(:puts)
<eval-in> banisterfiend => false (https://eval.in/46723)
nbouscal has joined #ruby
snovak has joined #ruby
<Eiam> weird
<Eiam> why would you make a new one every time
<Eiam> seems expensive?
<workmad3> banisterfiend: can I apply extensionality to them please? they do the same thing, therefore they are the same thing ;)
<shevy> especially for an Integer
<workmad3> Eiam: it's pretty rare to need a method object
<Eiam> workmad3: come again?
<workmad3> Eiam: in part because they're a bit of a PITA to get a hold of :)
<lewis> hey guys
lewis is now known as Lewix
<Eiam> its rare to do <<, + and so on?
<Lewix> why would someone do this string.split[0..(wordcount-1)].
<Lewix> what's the point
nbouscal has quit [Client Quit]
nathan28 has joined #ruby
<workmad3> Eiam: no, calling a method doesn't require the interpreter to create a method object ;)
<Eiam> Lewix: they are splitting a string based on a range from the start to the i presume wordcount-1? =)
<workmad3> Eiam: the method object is only created when you ask for it
<banisterfiend> workmad3 it's a shame they're not in some ways, a method object might be a cool place to store state for a method without polluting the object itself
<banisterfiend> i think that trick is used in python
<workmad3> banisterfiend: sounds javascripty :)
<Eiam> workmad3: oh, okay =)
<Eiam> >> "Hello".split[0..3]
<eval-in> Eiam => ["Hello"] (https://eval.in/46724)
<Eiam> >> "Hello".split[0..2]
<eval-in> Eiam => ["Hello"] (https://eval.in/46725)
<Lewix> Eiam: see what i mean?
<Eiam> oh is this the lazy way to convert a string to an array
<Eiam> Lewix: see ^
nhhagen has quit [Ping timeout: 264 seconds]
<Eiam> I sometimes use a split to convert a string to an array, but the second part is unnecessary
snovak has quit [Ping timeout: 256 seconds]
<workmad3> Lewix: they're relying on the default separator always being ' '
<volty> Lewix: they are splitting a substring of the string (from 0 till wordcount)
sepp2k has quit [Read error: Connection reset by peer]
<volty> default
<banisterfiend> Eiam Method objects just store a bunch of metadata about the method that can be useful for introspection
<volty> being /^\s+/
nathan28 has quit [Quit: leaving]
<workmad3> >> puts "foo bar".split
<eval-in> workmad3 => foo ... (https://eval.in/46726)
<platzhirsch> What I like in Ruby more than in Python, that it seems to promote a lot more dynamic programming paradigms. No rules, no conventions, just pure dam break
<workmad3> >> puts "foo bar".split.inspect
<banisterfiend> Eiam arity, paramètres, source locations, etc
<eval-in> workmad3 => ["foo", "bar"] ... (https://eval.in/46727)
MrThePlague has quit [Remote host closed the connection]
greenysan has joined #ruby
<workmad3> Lewix: of course, what I think is the bigger WTF in your sample is... why are they doing 0..(wordcount-1)?
<workmad3> why aren't they just doing 0...wordcount ?
<Lewix> workmad3: volty: Eiam: "hello".split[0..1] is not any different from "hello".split[0..2]
<workmad3> Lewix: it wouldn't be
<workmad3> Lewix: "hello".split returns the array ["hello"]
cody-- has quit [Quit: Computer has gone to sleep.]
<volty> Lewix: but "hello lewix how are you". split[0..1] is quite diffrent from split[0..3]
<workmad3> Lewix: and then you're asking for the array slice from item 0 to item 1
<Lewix> ahhh
<Lewix> stupid me
<workmad3> Lewix: and then the array slice from item 0 to item 2 ;)
ndrei has quit [Ping timeout: 268 seconds]
<volty> first split than index
<volty> then
MrPoT4tO has quit [Remote host closed the connection]
<Lewix> I got it
maletor has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<Lewix> Eiam: that wasnt my issue
<Lewix> but i understand it now
Skylab has joined #ruby
<Lewix> Idk why the hell I got confused
maletor has joined #ruby
<volty> because tired and distracted
<workmad3> Lewix: because it's a pretty crappy way of writing a max-words method
<banisterfiend> workmad3 have you been to any ruby conferences?
splittingred has quit [Quit: splittingred]
<workmad3> banisterfiend: no :(
robscomputer has joined #ruby
greenysan has quit [Ping timeout: 246 seconds]
<banisterfiend> thinking about going to the one in ghent
<workmad3> banisterfiend: well, I went to magrails in manchester a couple of years ago
<volty> where's that max-words code?
<workmad3> volty: string.split[0..(wordcount-1)]
<volty> how would you write it?
mansi has quit [Remote host closed the connection]
<platzhirsch> banisterfiend: apparently you know include_complete ?
<platzhirsch> banisterfiend: lol, apparently you wrote it
locriani has quit [Remote host closed the connection]
mansi has joined #ruby
<platzhirsch> just came across a SO answer of yours
locriani has joined #ruby
<workmad3> volty: probably like 'words = string.split(/\s+/); words[0...wordcount]'
<banisterfiend> platzhirsch include_complete won't work in recent ruby versions
<volty> workmad3: it's all the same, lewix's is shorter, more compact
<banisterfiend> platzhirsch think i wrote it for 1.9.2
<Lewix> workmad3: i have to agree with volty
<platzhirsch> come on man, why do always newer Ruby versions break the coolest toys ^^
ewnd9 has joined #ruby
<workmad3> Lewix,volty: consider which one you'd prefer to come across 6 months from now in a code-base ;)
<Eiam> platzhirsch: to make way for cooler toys? =)
<RenderRob> << is a method? Looks like a type of assignment operator
<alpha123> RenderRob: operators are methods
pcfreak30 has joined #ruby
<Lewix> workmad3: ok I see what you mean, Im in the very situation... and that's why i got confused -)
<platzhirsch> Eiam: no, to break every dependency there is and drown in the lake of bleeding edge
modernbob has quit [Quit: Leaving]
<platzhirsch> I highly endorse that
<workmad3> Lewix: yeah, compactness and low character count isn't everything ;)
Levin_22 has joined #ruby
saarinen has quit [Quit: saarinen]
<pcfreak30> Whats the difference between a module function and a class method. What should be use in what case?
<RenderRob> so then 1 + 1 is like 1.add(1) ?
mansi has quit [Ping timeout: 240 seconds]
<workmad3> RenderRob: 1.+(1)
<volty> workmad3: first_words = string.split(/^s+/ #optional)[0..wordcount - 1]; // separating it in tow pieces adds nothing to readability of the code
<alpha123> RenderRob: 1.+(1)... yes, the number class defines a def +(n) method
<RenderRob> are there any assignment operators in ruby?
<workmad3> volty: hehe, you just wrote a syntax error ;)
musl has joined #ruby
<Eiam> RenderRob: blah = 2 ?
<alpha123> RenderRob: well there are assignment methods :)
<Eiam> RenderRob: x = 5 if "yo" == "yo"
<RenderRob> right. Wouldn't that just be blah.=(2)
<workmad3> RenderRob: no
<Eiam> RenderRob: fire up pry and type it in =)
<workmad3> RenderRob: = isn't an operator
<platzhirsch> Actually I wanted to mix my parse_recursively method into the JSON module, does somehow have an alternative idea where to put this?
KobraKao has joined #ruby
saarinen has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
mansi has joined #ruby
<RenderRob> = is not an operator?
<Eiam> RenderRob: fixnum does not implement an "add" method
<Eiam> >> 1.add(1)
<eval-in> Eiam => undefined method `add' for 1:Fixnum (NoMethodError) ... (https://eval.in/46728)
<workmad3> volty: but yeah... I like to make the separator explicit in a split, and I repeat, why use 0..wordcount -1 instead of 0...wordcount? :P
<RenderRob> >> 1.+(1)
<eval-in> RenderRob => 2 (https://eval.in/46729)
doritostains has joined #ruby
jbrechtel has joined #ruby
<workmad3> Eiam: it does give you a .succ though ;)
<workmad3> >>1.succ
<eval-in> workmad3 => 2 (https://eval.in/46730)
<RenderRob> I wasn't being literal since I have never used ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<Eiam> workmad3: not the same thing ;p
beneggett has joined #ruby
<volty> workmad3: not a good idea - the explicit separator
<volty> workmad3: beacuse he nees till wordcount - 1
jbrechte_ has joined #ruby
<volty> needs
<RenderRob> I don't understand this eval.in
<banisterfiend> Eiam recent rubies are really conservative in their exposed C functions, so you really can't do as much cool stuff as you used to be able to :(
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<workmad3> volty: right, which is what 0...wordcount gives
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Eiam> volty: this is .. vs ...
Rym has joined #ruby
<Eiam> one is inclusive one is not
<volty> but he needs wordcount -2 since he states wordcount - 1 as right boundary :)
<volty> vs
musl has quit [Client Quit]
<workmad3> volty: yes, when using an inclusive range
<workmad3> volty: so he's saying '0 upto and including wordcount - 1)
musl has joined #ruby
<platzhirsch> banisterfiend: but why implement the gem through C if it can also implemented with Ruby?
phantasm66 has joined #ruby
phantasm66 has quit [Changing host]
phantasm66 has joined #ruby
<workmad3> volty: which is the same as '0 upto but not including wordcount) (which is 0...wordcount)
<volty> workmad3: that one you might forget after six month (i never use them)
phantasm66 has quit [Remote host closed the connection]
musl has quit [Client Quit]
JDHankle has joined #ruby
<banisterfiend> platzhirsch because it can't be cleanly implemented in ruby
<banisterfiend> platzhirsch i wouldn't know how to implement include_complete in pure ruby
<workmad3> volty: or to avoid that confusion... words[0, wordcount]
<volty> (are there 3 dots // i didn't see them)
musl has joined #ruby
<volty> nicer
<volty> much nicer
<platzhirsch> banisterfiend: I thought using the ClassMethods module was the way to do that
x1337807x has joined #ruby
<banisterfiend> platzhirsch the whole point of include_complete was to avoid that ;)
JDHankle has quit [Read error: Connection reset by peer]
jbrechtel has quit [Ping timeout: 245 seconds]
JDHankle has joined #ruby
Astral_ has joined #ruby
Bira has joined #ruby
<platzhirsch> banisterfiend: well, if you don't see it and that part is extracted into the gem, it's still an improvement
jibi has joined #ruby
Astral__ has joined #ruby
<banisterfiend> platzhirsch not sure what u mean but ok :)
obs has quit [Quit: Konversation terminated!]
hamakn has joined #ruby
Ziarkaen has quit [Read error: Connection reset by peer]
<RenderRob> a = 1
<RenderRob> a += 1
<RenderRob> a.+=(1) # error
<Aloysius1_> Hey, all: I'm constructing an object from an incoming params hash, and then planning to store it to Mongo. To construct the object, I use "instance_variable_set" looping over the incoming hash. I have validators on a few fields, and the others I'm indifferent to (at least for now). I think to get it into Mongo, I need to turn it back to a hash. Is that so?
ewnd9 has quit [Ping timeout: 240 seconds]
<Aloysius1_> And if so, should I just do the complement of the instance_variable_set loop?
simplyaubs has joined #ruby
<platzhirsch> The gem would simply eliminate the redundancy of going through the ClassMethods approach every time a module for module mixin should be created. The functionality is encapsulated and the user does not have to deal with that every time, nor does he/she see the code
Astralum has quit [Ping timeout: 260 seconds]
<volty> RenderRob: there's a dot after a ? kidding us
Astral_ has quit [Ping timeout: 245 seconds]
simplyaubs has left #ruby [#ruby]
zarubin has joined #ruby
<RenderRob> just noticing that +() is a method but += is not
gstamp has joined #ruby
<banisterfiend> platzhirsch still don't really get what u mean, what would the gem do exactly? if it only works on modules that already have a ClassMethods defined, then that module would likely provide the included() hook anyway. And if it's working on modules that do not have a ClassMethods defined, then I'm not sure how it could work at all
<RenderRob> @ volty
<alpha123> RenderRob: that's because x += 1 is equivalent to x = x.+(1)
Cyrus_ has joined #ruby
<platzhirsch> banisterfiend: ah okay, I haven't put thought into the actual implementation. I assumed some eval magic works always
<banisterfiend> :P
malcolmva has joined #ruby
cody-- has joined #ruby
hamakn has quit [Ping timeout: 260 seconds]
snovak has joined #ruby
maasdesigner has quit [Quit: whowantstolivefo]
<platzhirsch> so there are boundaries in Ruby
strgbrew has quit [Ping timeout: 276 seconds]
<volty> RenderRob: i see, tried it with send too
fourq__ has joined #ruby
<volty> ops
s0ber_ has joined #ruby
<visof> hello
poga_ has joined #ruby
<volty> i remember it now: + can be regular method because it creates a new Fixnum instance
<platzhirsch> banisterfiend: do you think adding a parse_recursively method to the JSON module is a legitimate scenario for singleton classes
<volty> += cannot be a methods because you cannot change the value of the fixnum inside a method
graft has joined #ruby
graft has joined #ruby
graft has quit [Changing host]
VTLob has quit [Quit: VTLob]
jlast has quit [Remote host closed the connection]
<visof> i have arr = ["hello", "world", "take", "this"] , i want to get a format string like this from this array : "1:hello,2:world,3:take,4:this" ?
<visof> how can i do this?
<pcfreak30> Whats the difference between a module function and a class method. When should you use each?
jbrechte_ has quit [Remote host closed the connection]
poga has quit [Ping timeout: 240 seconds]
<volty> RenderRob: that's why you cannot create singletons on Fixnum objects
locriani has quit [Remote host closed the connection]
<banisterfiend> pcfreak30 module functions can only be defined on modules
jbrechtel has joined #ruby
<xybre> pcfreak30:
<banisterfiend> pcfreak30 and a module function is both a (private) instance method as well as a public class method
s0ber has quit [Ping timeout: 268 seconds]
s0ber_ is now known as s0ber
<xybre> module_function is a method that sets up a state for the rest of the module block definition that does what banisterfiend said
<banisterfiend> pcfreak30 a class method is just a method that is invokable on a Module instance
* xybre hit enter by accident
robscomputer has quit [Remote host closed the connection]
<pcfreak30> I know a class comes from a module. And I understand modules are both basically static classes and used for organizations. I just dont get the purpose of class methods.
<platzhirsch> embarassing
jeebster has joined #ruby
<pcfreak30> I come from C/JAVA/PHP so some o the block and module ideals are confusing
<xybre> pcfreak30: class methods are often called "service methods" or "Static functions"
mansi has quit [Remote host closed the connection]
<jeebster> not really a ruby question, but…how battery taxing are server daemons in osx? I do a fair bit of accessing local database servers and I'd like to know if having many of these daemon processes constantly running would severely impact the battery life of the new macbook air
<volty> visof: s = ""; arr.each_with_index { |w, i| s << "#{i+1}:#{w}" }
<banisterfiend> pcfreak30 well in ruby classes/modules are objects too
mansi has joined #ruby
ferdev has quit [Quit: ferdev]
<banisterfiend> pcfreak30 a class method is just a method where the receiver is a class/module
<pcfreak30> xybre: If so then whats the purpose of module functions besides using as mixin's
locriani has joined #ruby
<volty> pcfreak30: namespace
<pcfreak30> And do you have to define a module at each level like A::B or can you just define A::B alone
jsatk has quit [Remote host closed the connection]
marr has quit []
<banisterfiend> pcfreak30 no a module function is typically for a method that behaves like a pure function
<xybre> pcfreak30: Really, theres not a huge reason to use them. They're usually used for grouping together functions. Like the Math standard lib, you don't instantiate anything, its just a collection of functions.
<pcfreak30> like module A module B end end
stkowski has quit [Quit: stkowski]
<xybre> pcfreak30: It's not a great practice, so module_function isn't used much.
<banisterfiend> pcfreak30 that is, it carries no state, and is invoked like a function
<pcfreak30> xybre: So its a way of doing procedural in OOP?
snovak has quit [Ping timeout: 268 seconds]
jsatk has joined #ruby
jbrechtel has quit [Ping timeout: 246 seconds]
<RenderRob> so symbols are really just entries in a global index?
rcosta has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
<pcfreak30> xybre: I get that, but still not following when a class method should be used vs a module method
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
colonolGron has quit [Quit: Lost terminal]
<volty> RenderRob: yap, useful for mapping, for efficency
<xybre> pcfreak30: Its not really procedural, but its just a way to namespace functions. It's useful though, because you can still mix in the module, and all the functions will be mixed in as private methods. I've used it for that a few times, but its a rare occurance.
<visof> volty, what about ',' ?
<xybre> pcfreak30: a class method and a module method aren't really different in any meaningful way except that modules can be mixed into classes and classes can be inhereited from.
jlast has joined #ruby
<banisterfiend> xybre i think he meant module function, no?
mansi has quit [Ping timeout: 256 seconds]
<pcfreak30> xybre: I am just trying to ensure I do the proper way before I make a bad habbit.
<banisterfiend> pcfreak30 you can ignore module_function
<pcfreak30> I havent even started coding, but trying to et all ruy's unique abilities understoof
<banisterfiend> pcfreak30 module_function is really not very important, and it relies on a deep magic
<xybre> banisterfiend: There's not really any such thing as a "module function", was my point.
<volty> visof: i put a semicolon thinking you did put semicolon; just change it
<volty> (not seeng well)
<banisterfiend> xybre i assume he meant methods generated via the module_function keyword
rcedillor has quit [Ping timeout: 268 seconds]
Tomasso has quit [Ping timeout: 260 seconds]
<pcfreak30> and are the like "attr abc" for attribute accessors stuff in a class/module a function?
<xybre> pcfreak30: Try to avoid either one is the best practice. There's uses for each, but they're not a go-to solution.
iamjarvo has joined #ruby
<xybre> banisterfiend: same here
<banisterfiend> xybre out of interest, what do you think module_function does?
<pcfreak30> xybre: I understand static funcions and static variables. So I am just tring to understand the ruby use case equiv
<xybre> pcfreak30: no, but there's ways os making it happen. attr is just a helper that generates generic functions for instance variables.
<pcfreak30> xybre: is attr a build in function or an internal statement
<volty> attr is a helper for creating what is called attributes (or properties)
Lewix has quit [Remote host closed the connection]
<xybre> banisterfiend: It makes methods defined after it class-level (can be accessed directly from a module without mixing it it, ie Module.method_name) and also makes them private methods on the module, so when the module is mixed-in the methods are available as private methods on the class.
rodacato has quit [Remote host closed the connection]
<volty> "generates generic functions" is a sort of a language of puppet teachers
zastern has quit [Ping timeout: 248 seconds]
<banisterfiend> xybre yeah
<volty> and do not dare to say that i'm trolling
<volty> having this one arround
Lewix has joined #ruby
adkron_ has joined #ruby
zastern has joined #ruby
<volty> teaching but doesn't know what is in namespace, the function or its name
<pcfreak30> as I am seeing what looks like function calls at the top of class files and trying to figure out if they are definition/statements or internel methods
* xybre ignores volty
<volty> i do not care if you ignore me
<volty> i will make clear that you know little and talk much - making confusion
<xybre> pcfreak30: the attr* methods are C functions, but they're treated like normal methods
<volty> though not now, but in the following days
<pcfreak30> volty: Like this page, http://stackoverflow.com/questions/5046831/why-use-rubys-attr-accessor-attr-reader-and-attr-writer, is attr_accessor a built in statement or a method
brain_shim has joined #ruby
<platzhirsch> volty: you have a pink colored name in my chat
Lewix has quit [Remote host closed the connection]
<pcfreak30> so what else are you able to run inside a class thats not in a method?
<banisterfiend> volty i didn't really see anything wrong with what xybre said..and i think your explanation was less clear
<banisterfiend> :)
<volty> banisterfiend: i'm patient, I will show you how much the little compulsive teacher knows .... :)
<pcfreak30> I just think that multiple inheritance is better thsn mixins. Just see mixins as something that can get a bit messy
<banisterfiend> volty so much rage, you should take yourself outside and have a word with yourself
huanmnl has left #ruby ["Textual IRC Client: www.textualapp.com"]
<volty> we all live in this world
d2dchat_ has quit [Remote host closed the connection]
starfox21 has quit [Quit: starfox21]
<volty> if xybre wants to teach he has to learn before
adkron_ has quit [Ping timeout: 260 seconds]
<platzhirsch> time for some discharge
Bira has quit [Remote host closed the connection]
<volty> pcfreak30: multiple inheritance is a nightmare to implement in a scripting language like ruby
<volty> i come from c++ and got used with mixins
<banisterfiend> volty I think you're just jealous ;)
<volty> ahahah
<pcfreak30> volty: comping from a C backround it just seem cleaner as I can see you haing a 100 mixins compared to a few subclasses
<platzhirsch> #c++ is a nightmare
saarinen has joined #ruby
<volty> pcfreak30: why 100 mixins?
badabim has joined #ruby
lnormous has quit [Ping timeout: 264 seconds]
<xybre> pcfreak30: I like know what you mean, but composition is a better approach (though not exclusive)
greenysan has joined #ruby
<pcfreak30> volty: the fact that you can only sub class 1 time means that any future subclass has to be overwritten via mixn based on what i have understood
mlpinit has joined #ruby
<volty> yes, #c++ is a nightmare when you get lost in ill-ingineered (or too complicated) hierarchy with templates above it
jibi has quit [Ping timeout: 264 seconds]
<Eiam> anyone recommend a fuzzy matcher of sorts?
julweber has quit [Remote host closed the connection]
<xybre> Eiam: in what environment/for what purpose?
<platzhirsch> volty: I meant the channel
<xybre> pcfreak30: I wouldn't recommend using lots of mixins, or many at all
<volty> platzhirsch: i don't understand what you mean
<Eiam> I've got a giant hash of attributes ranging from nicknames, email addresses, first & last names, alias names, and I'd like to snag the top say, 35 "best case" matches from this large dataset for a given string
<Eiam> the hash is about 50 MB
<xybre> pcfreak30: you can overwrite and reopen classes and subclasses, so no need to use mixins for that
beneggett has joined #ruby
Bira has joined #ruby
<Eiam> xybre: env = ruby/sinatra
<Eiam> + redis
jibi has joined #ruby
<pcfreak30> volty: they how do you do multiple sub classing? is subclasses and inheritance not the same?
<volty> xybre: you cannot "overwrite" classes
<volty> !
<platzhirsch> Eiam: and is the Hash in memory?
<Eiam> platzhirsch: yep
<volty> this man makes me nervous by his fuzzy language
<xybre> Eiam: The only thing I know of that does anything like that is a gem I worked on :/
<platzhirsch> Eiam: implement a <=> only for this hash object, sort them and fetch the first 35?
pentameter has quit [Read error: Connection reset by peer]
<xybre> pcfreak30: you can have multiple subclasses of a single superclass, if thats what you're asking
predator117 has quit [Ping timeout: 240 seconds]
<Eiam> platzhirsch: sort them based on which key..
<pcfreak30> how exactly do custom comparison operators even work
jibi has quit [Read error: Connection reset by peer]
<platzhirsch> oh I thought there are other criteria for that
johnkary has joined #ruby
<Eiam> platzhirsch: if the string I get is "12341" and their employee id is "1233" but their email address is "12341@gmail.com" how does it sort those? =)
<pcfreak30> xybre: i mean C < B < A.
<volty> pcfreak30: difficult to tell it in this, generic, way // give a real example and see what mixed ppl say :)
<xybre> pcfreak30: You can have subclasses of subclasses as well
<shevy> can I have the moebius strip of subclassing until they subclass each other
predator117 has joined #ruby
<pcfreak30> volty: been reading and been seing like <=> as methods and such.
ckampfe has quit [Ping timeout: 240 seconds]
<platzhirsch> Eiam: you said the best matches, what did you meant with this, something like a string search?
<xybre> Eiam: is something like this useful? https://github.com/acook/enumerable_deep_search
kurt21 has quit [Read error: Operation timed out]
<Eiam> platzhirsch: well "best" is clearly subjective, which is why i said a fuzzy matcher
mlpinit has quit [Ping timeout: 245 seconds]
<platzhirsch> :|
<Eiam> platzhirsch: in my given example, I'd expect both records to be returned
<Eiam> the employee ID that nearly matches, and the email address that also nearly matches
<Eiam> let the user decide which one they intended
<pcfreak30> xybre: if so, then when should a mixin be used. By inharitance I take you cant accessa property in A from C?
tomzx_mac has joined #ruby
<xybre> pcfreak30: You can define "class variables" that are accessible between subclasses
snath has quit [Ping timeout: 240 seconds]
<volty> pcfreak30: quite a different story in ruby with modules and properties, modules do not have nor variables nor properties
<pcfreak30> volty: I never stated module. I was referring to classes
<xybre> pcfreak30: Rather, class variables are shared between all related classes. There's also class instance variables, whose contents are not shared.
<volty> so, people: pcfreak30 is coming from c++, xybre seems to not have a minimal idea about inheriting object variables from multiple parent classes (c++), and go on on on and on
<pcfreak30> xybre: I know. static and regular in C. Im stating due to non-multipl inheritance you cant access an instance variable in C from A?
<volty> goes on on on
johnkary has quit [Client Quit]
<banisterfiend> volty shhh, you're getting creepy.
<volty> banisterfiend: isn't true what I said?
<xybre> pcfreak30: you can never access instance variables from different instances or classes, by definition
fourq__ has quit [Ping timeout: 264 seconds]
<pcfreak30> volty: My main language is PHp, but I know C# and JAVA and some c++. So a C lang ansestory
rcosta has joined #ruby
<platzhirsch> bad vibes
<banisterfiend> volty your fixation on xybre is weird, stop
emergion has joined #ruby
iamjarvo has quit [Remote host closed the connection]
DonRichie has quit [Quit: Verlassend]
<volty> banisterfiend: i argument on what xybre writes, stop
iamjarvo has joined #ruby
<volty> if I am wrong just tell me where I am wrong. stop
<banisterfiend> volty Just leave him alone :)
badabim has quit [Quit: Leaving...]
<platzhirsch> Eiam: that looks nice
<xybre> pcfreak30: instance variables are encapsulated in their instance
<volty> banisterfiend: just leave me alone :) // i confine myself to arguing, not to insulting
<Eiam> so i figure I'll just match the provided string against every attribute in the hash
<banisterfiend> volty if you pick at him again, i will kick you from this channel
<Eiam> platzhirsch: sum the matches and take the ones that rank the closest to 1
<volty> do it hunny, and again and again, the next times, so I can document on what issues i was banned
<Eiam> err, average the matches
chimmy has joined #ruby
<pcfreak30> xybre: ok so unlike C, you dont "define" a non-static/instance variable before hand? You just set it in the method?
<banisterfiend> volty no problem
<volty> what's the purpose of this chan? why I didn't have problems (on contrary!) with apeiros and so many others ... ?
<platzhirsch> Eiam: sounds legitimate
<Eiam> volty: its to get help and be helpful
<Eiam> and learn
<platzhirsch> and swag
<banisterfiend> volty primarily you're being annoying, constantly picking at someone who is trying to provide help is not useful, it's clearly a personal beef you have with xybre, but you can keep it out of this channel
<volty> i want to learn, and i want other people to learn, and i think that xybre, with his fuzzy language, is contributing to augment the confusion of novices
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<volty> xybre's is not help, xybre's is just posing as a teacher without being qualified for it
verto has joined #ruby
<pcfreak30> xybre, volty: http://pastie.org/private/dcszt2ijteyit4ntnneiug that will work or not?
beneggett has joined #ruby
<xybre> pcfreak30: Right, there's no need to define instance variables in advance. It can be helpful to generate accessor/setter methods for them, but that can break encapsulation too.
Bira has quit [Remote host closed the connection]
<xybre> pcfreak30: well, you need to define A, then B, then C
<pcfreak30> xybre: "but that can break encapsulation too."? dont follow
dml_ has quit [Quit: Computer has gone to sleep.]
<xybre> pcfreak30: directly accessing the internal state of another object breaks encapsulation
cupakromer has joined #ruby
<platzhirsch> I think in my JSON.parse_recursively method I use exceptions as control flow, but honestly I wouldn't have a clue to implement this otherwise: https://gist.github.com/platzhirsch/67236be774c8be5fda58
<pcfreak30> xybre: I know the order is wrong, just typed it up quicly. In ruby, does the order that classe are defined matter?
<volty> though you can Class A; end; // and later define it
<pcfreak30> xybre: What you mean by encapsulation. dont understand that term
<xybre> pcfreak30: in Ruby code is evaluated as its parsed (for the most part)
ckampfe has joined #ruby
mrsolo has quit [Read error: Connection reset by peer]
<xybre> pcfreak30: so you can't refer to constants that haven't been defined yet according to the parser
<pcfreak30> xybre: eh, i guess in php, its interpreted then executed
Croms has quit [Quit: Croms]
mrsolo has joined #ruby
tylersmith has quit [Remote host closed the connection]
<RenderRob> not quite warming up to these classes and modules yet
<xybre> pcfreak30: "What is encapsulation? Well, in a nutshell, encapsulation is the hiding of data implementation by restricting access to accessors and mutators.
<RenderRob> what do modules do for me?
<banisterfiend> pcfreak30 we can be sure that whatever php does it's probably doing it wrong
tylersmith has joined #ruby
<banisterfiend> ;)
<pcfreak30> RenderRob: I agree. ruby's take on oranizing stuff is ratically different
<platzhirsch> lol
<pcfreak30> banisterfiend: eh well really no language can do someyhing "wrong". Its just its design and how view change
<platzhirsch> RenderRob: they let you define behavior (methods). So you can group a certain group of behaviours into a module
<RenderRob> are modules like static classes?
<platzhirsch> RenderRob: I would say no
<RenderRob> sounds like the same purpose
<xybre> Another quote about encapsulation: "Encapsulation in Object Oriented programming refers to the convention of not allowing one part of a program to modify another part of the program without an interface. For example, one object should not modify the internal state (the instance variables) of another object without an interface. Doing so may cause undesirable and difficult to debug behavior."
<platzhirsch> first I thought that, too
<pcfreak30> RenderRob: Heres what i have understood so far
<RenderRob> that's what we use static classes for in Laravel (PHP framework)
<volty> modules add their methods to the existing class when mixed - that's all folks
<banisterfiend> pcfreak30 that's really not true ;) languages can have bugs
<platzhirsch> RenderRob: but modules unfold, when you use them as mixins
<pcfreak30> RenderRob: a module is mainly for namespacing/packaging
<RenderRob> oh shit, mixins.
<platzhirsch> which means you have say a class Butterfly and a module FlyingThing
<pcfreak30> RenderRob: a class is a subclass of a module thus gets all its ailities
<banisterfiend> pcfreak30 even the 'design' can have bugs, for example in ruby 1.8 block variables were not local to the block, but closed over outer variables, this was fixed in 1.9
<volty> "unfold" ? are you in the same class?
<pcfreak30> RenderRob: a module doesnt have state nor can it have an instance so it IS like a static class in a sense.
<volty> :)
gtrak has quit [Ping timeout: 264 seconds]
* platzhirsch pokes volty in the eye with a hot fry
chimmy has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pcfreak30> RenderRob: but due to classes subclassing modules, a class can have a static (class method) too.
<volty> must be a kind of glocal
<pcfreak30> RenderRob: Thats when my brain melted tryin to find the use case :P
tylersmith has quit [Ping timeout: 240 seconds]
jonathanwallace has joined #ruby
<pcfreak30> RenderRob: mixins i basically merging or includng a set of functions into a class from a module
katsrc has joined #ruby
gyre007 has quit [Remote host closed the connection]
<volty> pcfreak30: you are right about that // mixins are,maybe, more about template programming than multiple inheritance (without properties!) logic
<RenderRob> haha
Galgorth has joined #ruby
<platzhirsch> I liked the approach of using modules for encapsulating behavior. Because through the classes you have a hierarchy with only one parent class. There can only be one direct ancestor. But modules allow you to add infinite behavior
<Galgorth> what's the difference between a module mixing with a class and class inheritance?
<RenderRob> okay, I think I see the logic
zarubin has quit [Ping timeout: 260 seconds]
<Galgorth> isn't a module basically just a superclass that its 'mixed' classes inherit from?
cupakromer has left #ruby [#ruby]
<banisterfiend> Galgorth not much, other than the singleton class for a class is mixed into the parallel (singleton) inheritance chain
jsatk has quit [Remote host closed the connection]
slyv has joined #ruby
<pcfreak30> On that thought, how is it handled if you have mested modules/classes and you do a mixin of a parent module?
<RenderRob> interesting that classes can be subclasses of modules or of other classes
<banisterfiend> Galgorth with modules, only the module itself is mixed into the classes inheritance chain, but the singleton class inheritance chain is untouched
<volty> yes platzhirsch, but the in the real world you have to deal with adding behavior TOGETHER with new, added, attributes (of that added behavior)
iliketur_ has quit [Quit: zzzzz…..]
<Galgorth> banisterfiend: ok thanks
<platzhirsch> volty: so?
<pcfreak30> like you have class A in module a then module b in module a, then have a independant class C incuding modue a?
<xybre> Well. Technically, modules are like uninstantiable classes. They can have class instance variables defined on them. Probably class variables as well, but I've never tried it.
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<RenderRob> sounds similar to traits in PHP, which is new and I haven't had a chance to use yet
mansi has joined #ruby
<volty> so you can't just do it with mixins // you have to go another way
<platzhirsch> do what?