<centrx>
Firespirit, it looks like you can just manipulate the DOM with Nokogiri and then call #to_s on it
zorak8 has quit [Ping timeout: 260 seconds]
<Firespirit>
yeah i saw that waller but like i said i'm fairly new to programming and i still don't understand how to add element to a existing xml file
<centrx>
Firespirit, I only use it for scraping/reading, but all the components are there to edit element attributes, add and remove elements, edit text, etc.
pu22l3r has quit [Remote host closed the connection]
jeremy04 has quit [Remote host closed the connection]
hellangel7 has joined #ruby
ursooperduper has joined #ruby
bmurt has quit []
<Firespirit>
if someone have experience into xml editing and try to give me a bit of guidance would be cool
<jhass>
and yeah, the singleton class is a transparently (on access) added class that's the actual parent of the object and thus sits between it and its class
<ericwood>
zenspider: giving a talk on how it all works and the internals of the library tomorrow, I'll have some materials from it available soon
vinleod has joined #ruby
manzo has quit [Ping timeout: 246 seconds]
Apocalypse has joined #ruby
Apocalypse has joined #ruby
Apocalypse has quit [Changing host]
RyanV has joined #ruby
RyanV has quit [Client Quit]
hanjianwei has joined #ruby
orolo has joined #ruby
mtncode has quit [Ping timeout: 245 seconds]
sdegutis has joined #ruby
Takle has joined #ruby
moritzschaefer has quit [Ping timeout: 272 seconds]
<sdegutis>
Is it bad practice to pass an implicit block to .new?
emmesswhy has quit [Quit: Leaving]
radic has quit [Disconnected by services]
radic_ has joined #ruby
<centrx>
sdegutis, why?
krz has joined #ruby
davispuh has quit [Ping timeout: 272 seconds]
<centrx>
sdegutis, why would it be bad, by implicit do you mean yield vs &block ?
Tricon has joined #ruby
<sdegutis>
I'm considering doing: x = Foobar.new(123, ["bla"]) do ... end
<centrx>
sdegutis, yield is significantly faster, or was recently at least
<sdegutis>
Cool. But I mean API design wise.
IcyDragon has joined #ruby
pu22l3r has joined #ruby
<jhass>
sdegutis: core does that, for example on Array and Hash. I'm not sure where you got the feeling it's a bad idea
<sdegutis>
Okay.
<sdegutis>
Thanks :)
<sdegutis>
I am going to go back to writing my stupid little app now.
pibby has quit [Quit: leaving]
sepp2k1 has quit [Read error: Connection reset by peer]
perrier has quit [Remote host closed the connection]
<centrx>
sdegutis, I've never had any use for putting a block on #new for a class I created, so I must think it's a bad idea
<sdegutis>
Okay.
ursooperduper has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<centrx>
sdegutis, it may be more descriptive to put the block on a method of the class, rather than adding too much complication to the initialize method
sinkensabe has joined #ruby
<sdegutis>
Thanks.
<multi_io>
what does it do? yield the just created object to the block?
sdegutis has quit [Quit: Leaving...]
<centrx>
multi_io, yes
mikeg has quit [Remote host closed the connection]
<centrx>
multi_io, or not that actually
<centrx>
multi_io, it yields to the block whatever you tell it to, like yield(x, y)
pibby has joined #ruby
perrier has joined #ruby
GriffinHeart has joined #ruby
<benzrf>
>> Struct.new
<centrx>
multi_io, or variable_that_is_usually_called_block.call(x, y)
<eval-in_____>
benzrf => wrong number of arguments (0 for 1+) (ArgumentError) ... (https://eval.in/194385)
<lemur>
Takes a hash and makes virtus generators for it.
<lemur>
that could easily be hooked in there.
<lemur>
I swear I make too many gems...
hiyosi has quit [Ping timeout: 260 seconds]
<sevenseacat>
i dont know what that gem is for
<lemur>
API returns JSON
<centrx>
is it for washing goats
<lemur>
JSON goes to hash
tlarevo has quit [Remote host closed the connection]
<lemur>
that makes generators for classes that match that, much like a factory
<lemur>
except auto updating
Dogcow has joined #ruby
<lemur>
look into virtus
rezzack1 has quit [Ping timeout: 255 seconds]
<centrx>
I'd watch out with that one, one typo and you'll have a virus on your hands
kireevco has quit [Quit: Leaving.]
<ght>
I have an odd situation where I have a lenghty if conditional, with a series of if a.to_i == b.to_i && a.to_i == c.to_i && a.to_i == d.to_i, etc, and for some reason, about the 4th conditional in, Ruby throws an exception saying a.to_i is suddenly nil, despite the fact that testing indicates that a.to_i is certainly not nil.
Dogcow has left #ruby [#ruby]
<sevenseacat>
yes, i see what it does
<sevenseacat>
i dont know what you would use it for
<ght>
Anyone ever seen anything like that? Where if you have a long, multi-&& if conditioanl, ruby seemingly randomly begins indicating a parameter you know is not nil is nil?
<centrx>
ght, #1 put this logic in methods like, if valid_dates? && has_notation?
<ght>
do what?
mikeg has joined #ruby
<sevenseacat>
ruby doesnt make shit up like that
<lemur>
making serializers primarily.
<centrx>
ght, instead a long, complicated conditional
<ght>
I would assume not, it's just quite bizarre.
<centrx>
ght, separate the logic into clearly named methods
RichardLitt has joined #ruby
<ght>
yes, but the issue is, I'm pulling a series of values from an API, having to break them down, convert them for time zone utc offsets, etc. I suppose I could simply reconstruct the values into two large strings and compare them.
<centrx>
ght, Why do you say it's happening on the fourth conditional, not the first?
<ght>
centrx: That's why I'm in this channel askig, I haven't a clue. It makes no sense.
RichardLitt has quit [Client Quit]
<ght>
Just wondering if that was some known phenomenon with large conditionals like that.
<lemur>
pastebin it.
<ght>
Yes, I'll make a gist, but it's irrelevant considering the issue is as I describe it in the given example.
<ght>
It's one value being compared over and over to another value, and then at some point, around 4 conditionals in, Ruby randomly decides that it's nil.
<lemur>
more context is needed, I strongly doubt that's the issue.
<lemur>
it won't, you're doing something odd.
<ght>
Fair enough, thank you.
<ght>
Obviously I'm missing something, didn't know if that was some known phenomenon.
<ght>
Will review code.
<lemur>
If you put it in a gist we can look
gvenkat has joined #ruby
hmsimha has quit [Ping timeout: 260 seconds]
<czaks>
>> class Array; def to_proc; proc { |a| a[*self] } end end
milkohol has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
milkohol has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
Phrogz_ has joined #ruby
codeurge has joined #ruby
cndiv has joined #ruby
<Phrogz_>
Fun problem that took me a bit of time to solve: given a word list, find all the "vowel-permuted anagrams": words where the vowels have been changed but the consonants haven't.
Phrogz_ is now known as Phrogz
milkohol has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Phrogz>
e.g. Texas/taxes, or mantel/mental, or panelist/penalist
Insanity_ has quit [Remote host closed the connection]
cirn0 has joined #ruby
sinkensabe has joined #ruby
mocfive has quit [Remote host closed the connection]
<Phrogz>
jfisk87: Throw a -V on there?
j4jackj has joined #ruby
mocfive has joined #ruby
MasterPiece has joined #ruby
shock_one has joined #ruby
sinkensa_ has joined #ruby
<mozzarella>
I put spaces around operators, but what about '..' and '...'? should I put spaces around them?
cirn0 has quit [Ping timeout: 272 seconds]
oo_ has joined #ruby
mocfive has quit [Ping timeout: 245 seconds]
<Radar>
mozzarella: no
mercwithamouth has joined #ruby
sinkensabe has quit [Ping timeout: 246 seconds]
relix has joined #ruby
shevy has joined #ruby
davasaurous has quit [Remote host closed the connection]
<mozzarella>
it's weird that .. is inclusive and ... is exclusive
<Phrogz>
mozzarella: I use _why's mnemonic. The .. is an accordion joining the end values. When you use ... you stretch the accordion and one note slips out, making it smaller.
<Phrogz>
But yes, I agree, it's hard to remember that the visually-longer range covers fewer values.
BadQuanta has joined #ruby
yetanotherdave has joined #ruby
<mozzarella>
I just tell myself "it's the other way around in ruby"
<Phrogz>
I find that logic dangerous, because soon you (I) forget which way I thought it was originally.
<Phrogz>
The topic of mnemonics brings up the mnemonic I created and am proud of: if you can't remember whether .shift or .unshift adds or removes values from the array, mentally drop the 'f' from the name and it becomes clear. :)
niftylettuce__ has quit [Quit: Connection closed for inactivity]
<Phrogz>
Also, it makes me feel guilty whenever I unshift an array.
mercwith1mouth has joined #ruby
centrx has quit [Quit: The plan is programmed into every one of my one thousand robots]
lxsameer has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
jpopo23 has joined #ruby
Phrogz has quit [Quit: Goodnight, sweet friends.]
SouL has quit [Ping timeout: 258 seconds]
timgauthier has joined #ruby
kamilc__ has joined #ruby
gil has joined #ruby
timgauthier is now known as timgauthier_isaw
gil is now known as Guest81004
jpopo23 has quit [Quit: jpopo23]
mocfive has joined #ruby
mary5030 has quit [Remote host closed the connection]
jhass is now known as jhass|off
ramfjord has joined #ruby
Jarboe has quit []
skammer has joined #ruby
BlkDynmt has quit [Ping timeout: 245 seconds]
tlarevo has joined #ruby
BlkDynmt has joined #ruby
patrick99e99 has joined #ruby
timgauthier_isaw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
davasaurous has joined #ruby
yetanotherdave has quit [Quit: Lost terminal]
skammer has quit [Ping timeout: 245 seconds]
patrick99e99 has quit [Ping timeout: 245 seconds]
yeticry has quit [Read error: Connection reset by peer]
linojon has quit [Quit: linojon]
poguez_ has quit [Quit: Connection closed for inactivity]
awc737 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
awc737 has joined #ruby
hiyosi has joined #ruby
oo_ has quit [Remote host closed the connection]
yeticry has joined #ruby
mary5030 has joined #ruby
<agent_white>
I have an issue that when I hit the HOME and END keys in pry, I get "~". Using urxvt as my terminal... how do I go about fixing this?
hiyosi has quit [Ping timeout: 245 seconds]
yfeldblum has quit [Remote host closed the connection]
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has joined #ruby
ooloo has joined #ruby
jack_rabbit has quit [Ping timeout: 258 seconds]
oleo has quit [Quit: Verlassend]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
ballpointcarrot has quit [Remote host closed the connection]
kireevco has joined #ruby
<agent_white>
eam: I need to look into termcap and terminfo?
abdulsattar has joined #ruby
<eam>
oh, not on osx
<eam>
probably just remap it using whatever it is osx uses
codecop has joined #ruby
<agent_white>
Is pry written for osx in mind?
<agent_white>
eam: Ah nevermind... yeah I'll see what I can do.
kireevco has quit [Client Quit]
<agent_white>
Bah I should've just stuck with using xterm... this little issues never happen. :P
<eam>
oh sorry I misread, termcap is relevant for rxvt on osx
yeticry has quit [Ping timeout: 246 seconds]
<eam>
pry doesn't actually deal with those keys, your terminal does
<agent_white>
eam: Ah no worries! I just tried xterm to see if it worked or not, looks like my terminal is the issue... and found a little snippet on fixing it in urxvt.
<agent_white>
Aye! :P
yeticry has joined #ruby
tkuchiki_ has joined #ruby
<eam>
pry sees what's called "cooked" input
<eam>
that is, whatever's in the buffer when you hit enter
IcyDragon has quit [Quit: Space~~~]
mocfive has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 246 seconds]
mocfive has joined #ruby
rkalfane has joined #ruby
robbyoconnor has joined #ruby
orolo has quit [Quit: This computer has gone to sleep]
carraroj has joined #ruby
Rollabunna has joined #ruby
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
<agent_white>
eam: Ahhh
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
mocfive has quit [Ping timeout: 245 seconds]
kireevco has joined #ruby
<agent_white>
eam: Yeah turned out I had defined $TERM in my bashrc to xterm >.<
<agent_white>
WOOPS
kireevco has quit [Max SendQ exceeded]
northfurr has quit [Quit: northfurr]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
kireevco has joined #ruby
mr-foobar has joined #ruby
kireevco has quit [Max SendQ exceeded]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
Davedo has quit [Ping timeout: 272 seconds]
orolo has joined #ruby
kireevco has joined #ruby
mr-foobar has quit [Remote host closed the connection]
kireevco has quit [Max SendQ exceeded]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
Rollabunna has quit [Ping timeout: 245 seconds]
kireevco has joined #ruby
tagrudev has joined #ruby
kireevco has quit [Max SendQ exceeded]
kireevco has joined #ruby
mr-foobar has joined #ruby
ta has quit [Remote host closed the connection]
Davedo has joined #ruby
maletor_ has quit [Quit: Computer has gone to sleep.]
starkhalo has quit [Ping timeout: 245 seconds]
vinleod has joined #ruby
fold has quit [Ping timeout: 272 seconds]
fabrice31 has joined #ruby
ht__th has joined #ruby
arup_r has joined #ruby
davasaurous has quit [Remote host closed the connection]
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Lewix has quit [Remote host closed the connection]
astav has joined #ruby
Lewix has joined #ruby
fabrice31 has quit [Ping timeout: 260 seconds]
Jackneill has joined #ruby
kyb3r_ has joined #ruby
davasaurous has joined #ruby
JoshGlzBrk has joined #ruby
bruno- has joined #ruby
JohnFord has quit [Ping timeout: 272 seconds]
jfisk87 has quit [Quit: Leaving.]
northfurr has joined #ruby
tkuchiki_ has quit [Remote host closed the connection]
rkalfane has joined #ruby
tkuchiki has joined #ruby
kireevco has quit [Quit: Leaving.]
Wolland has quit [Remote host closed the connection]
melik_ has quit [Quit: Computer has gone to sleep.]
Wolland has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
melik_ has joined #ruby
Macaveli has joined #ruby
<Firespirit>
Hi
<Firespirit>
I edit a xml file with nokogiri... when i open it with internet explorer i see my change in the xml... if i check with notepad++ i don,t see them
<Firespirit>
why?
beneggett has joined #ruby
beneggett has quit [Client Quit]
shock_one has quit [Quit: Computer has gone to sleep.]
Wolland has quit [Ping timeout: 272 seconds]
krisquigley has joined #ruby
<agent_white>
Firespirit: How are you editing it? With code? If so, can you show us your code?
timonv_ has quit [Read error: Connection reset by peer]
EasyCo has joined #ruby
timonv_ has joined #ruby
SouL has quit [Ping timeout: 245 seconds]
arup_r has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
skammer has quit [Ping timeout: 260 seconds]
bal has joined #ruby
aganov has joined #ruby
jfisk87 has joined #ruby
nfk has joined #ruby
hiyosi has joined #ruby
niklasb has quit [Read error: Connection reset by peer]
eivindml has joined #ruby
eivindml has quit [Max SendQ exceeded]
SouL_ has joined #ruby
pagios has joined #ruby
eivindml has joined #ruby
hiyosi has quit [Ping timeout: 272 seconds]
<pagios>
hello coders, i have a yaml file with different fields, when doing a File.open("onfig.yml","w") {|f| f.write(targetHash) } everything is flushed and only that param is inserted on top of file. What i would like to do is only modify the line that reads that hash and create it instead it is not there
lyanchih has quit [Quit: lyanchih]
shock_one has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eivindml has quit [Client Quit]
techsethi has joined #ruby
suy_ is now known as suy
Fusl has quit [Ping timeout: 245 seconds]
sparrovv has joined #ruby
arup_r has joined #ruby
Lewix has joined #ruby
Fusl has joined #ruby
astav has quit [Quit: astav]
weems_ has joined #ruby
weems__ has quit [Read error: Connection reset by peer]
sinkensa_ has quit [Read error: Connection reset by peer]
orolo has quit [Quit: This computer has gone to sleep]
<agent_white>
pagios: Looks like you're opening a file, and starting at the beginning of it. So anything you write into it will overwrite the existing contents.
<agent_white>
Maybe look into "a+" mode?
<pagios>
its not only append, its modify
<agent_white>
pagios: Eep sorry, didn't read your question correctly
<agent_white>
pagios: Maybe you need to seek through the file to the param you want to modify>
<agent_white>
?*
<pagios>
thats it
<pagios>
there should be an easy way to do it with YAML
devoldmx33 has quit [Remote host closed the connection]
LiohAu has joined #ruby
krisquigley has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
timonv_ has quit [Remote host closed the connection]
v0n has quit [Ping timeout: 258 seconds]
mikecmpbll has joined #ruby
wallerdev has quit [Quit: wallerdev]
arup_r has quit [Remote host closed the connection]
joast has quit [Ping timeout: 250 seconds]
kaspertidemann has joined #ruby
melik_ has quit [Quit: Computer has gone to sleep.]
v0n has joined #ruby
roolo has joined #ruby
Aaaal has joined #ruby
timonv_ has joined #ruby
gvenkat has quit [Quit: This computer has gone to sleep]
gvenkat has joined #ruby
Aaaal has quit [Client Quit]
kevinfagan_ is now known as kevinfagan
mikeg has joined #ruby
timonv_ has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
<jokke>
hi
shredding has quit [Ping timeout: 240 seconds]
sinkensabe has quit [Remote host closed the connection]
lsmola______ is now known as lsmola
yfeldblum has quit [Remote host closed the connection]
Takle has joined #ruby
InhalingPixels has joined #ruby
timonv_ has joined #ruby
oivoodoo has quit [Remote host closed the connection]
SouL_ has quit [Read error: Connection reset by peer]
SouL_ has joined #ruby
shredding has joined #ruby
skammer has joined #ruby
jottr has joined #ruby
InhalingPixels has quit [Ping timeout: 258 seconds]
kedare has quit [Quit: WeeChat 0.4.1]
ndrei has joined #ruby
mr-foobar has quit [Ping timeout: 272 seconds]
bidigo has joined #ruby
ephemerian has joined #ruby
skammer has quit [Ping timeout: 245 seconds]
timgauthier has joined #ruby
timonv_ has quit [Remote host closed the connection]
carraroj has quit [Ping timeout: 246 seconds]
kedare has joined #ruby
codecop has quit [Remote host closed the connection]
Jake232 has joined #ruby
blackmes1 has quit [Ping timeout: 246 seconds]
kalusn has joined #ruby
bidigo has quit [Quit: Leaving]
sinkensabe has joined #ruby
rdark has joined #ruby
hiyosi has joined #ruby
timonv_ has joined #ruby
ndrei has quit [Ping timeout: 246 seconds]
emocakes has joined #ruby
arup_r has joined #ruby
the_f0ster has quit [Read error: Connection reset by peer]
Advocation has joined #ruby
timonv_ has quit [Remote host closed the connection]
Akagi201 has quit []
speakingcode has joined #ruby
ndrei has joined #ruby
agjacome has joined #ruby
linojon has joined #ruby
agjacome has quit [Client Quit]
carraroj has joined #ruby
JohnFord has joined #ruby
pearlyshellsfrom has joined #ruby
endash has joined #ruby
hiyosi has quit [Ping timeout: 260 seconds]
<pearlyshellsfrom>
Hi. Should I use Sinatra if I want to create simple sort of "bot" that tweets everyday? Or just plain ruby?
W0rmDr1nk has joined #ruby
elaptics`away is now known as elaptics
timgauthier is now known as timgauthier_isaw
timgauthier_isaw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kyb3r_ has quit [Read error: Connection reset by peer]
kyb3r_ has joined #ruby
JohnFord has quit [Ping timeout: 260 seconds]
roolo has quit [Quit: Leaving...]
sectionme has quit [Read error: No route to host]
mikeg has quit [Remote host closed the connection]
<jokke>
don't know if this is the right channel, but i'm having some trouble setting up octopress with jekyll-assets (sprockets for jekyll) and i'm wondering if anyone here could help me out. My problem: image paths are set correctly (with cache busters and all) but they're not put into the assets/ directory..
<j416>
pearlyshellsfrom: Sinatra is for making (M)VC web things, like a website or an API
pencilcheck has quit [Read error: Connection reset by peer]
shredding has quit [Quit: shredding]
<j416>
pearlyshellsfrom: you seem to want to do the opposite, i.e. just communicate with an API
codecop_ has joined #ruby
codecop_ has quit [Remote host closed the connection]
codecop has joined #ruby
pencilcheck has joined #ruby
<j416>
pearlyshellsfrom: should be able to achieve something simple like that without using any gem really, just do plain requests; if you really need there's the rest-client gem (or so google says) but I think it would be overkill
orolo has quit [Quit: This computer has gone to sleep]
timonv_ has joined #ruby
charliesome has joined #ruby
sectionme has joined #ruby
timgauthier has joined #ruby
timgauthier has quit [Max SendQ exceeded]
timgauthier has joined #ruby
shredding has joined #ruby
aspiers has joined #ruby
sprihodko has joined #ruby
bruno- has joined #ruby
<pearlyshellsfrom>
Yeah i'm kind of a noob.. you see I'm just trying to autotweet something.. Would anyone here mind checking out my noob codes?
kaspertidemann has quit []
yfeldblum has joined #ruby
<agent_white>
pearlyshellsfrom: Just post your code and someone is bound to help.
pwestlund has joined #ruby
<sevenseacat>
playing the dumb card wont garner sympathy
timonv_ has quit [Remote host closed the connection]
Takle has quit [Read error: Connection reset by peer]
Takle_ has joined #ruby
<pearlyshellsfrom>
And then I'm just going to call the url of that "app" everyday... It's really frustrating cos I planned on making it a plain ruby script but I wasn't sure of the oauth thingy
SouL_ has quit [Ping timeout: 255 seconds]
Advocation has quit [Quit: Advocation]
yfeldblum has quit [Ping timeout: 255 seconds]
<waxjar>
you don't need sinatra at all pearlyshellsfrom
bruno- has quit [Ping timeout: 260 seconds]
SouL_ has joined #ruby
<waxjar>
just the twitter gem should be enough
krisquigley has quit [Remote host closed the connection]
<pearlyshellsfrom>
I won't be needing this as well: OmniAuth::Builder ?
<multi_io>
does rdoc support markdown anchors, i.e. links within a document?
sevenseacat has quit [Remote host closed the connection]
timonv_ has quit [Remote host closed the connection]
ta has joined #ruby
shredding has joined #ruby
InhalingPixels has joined #ruby
oivoodoo has joined #ruby
mr-foobar has joined #ruby
tlarevo has quit [Remote host closed the connection]
tlarevo has joined #ruby
patrick99e99 has joined #ruby
skammer has joined #ruby
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timonv_ has joined #ruby
InhalingPixels has quit [Ping timeout: 245 seconds]
oivoodoo has quit [Ping timeout: 246 seconds]
cougarten has joined #ruby
banister has joined #ruby
timonv_ has quit [Remote host closed the connection]
oivoodoo has joined #ruby
AlSquire has joined #ruby
patrick99e99 has quit [Ping timeout: 245 seconds]
tlarevo has quit [Ping timeout: 272 seconds]
skammer has quit [Ping timeout: 246 seconds]
threesixes has quit [Remote host closed the connection]
BlkDynmt has quit [Quit: BlkDynmt]
timonv_ has joined #ruby
Guest22613 has quit [Ping timeout: 260 seconds]
corehook has quit [Quit: Leaving.]
corehook_ has joined #ruby
charliesome has joined #ruby
a_ has joined #ruby
hiyosi has joined #ruby
corehook_ has quit [Client Quit]
ramfjord has quit [Ping timeout: 240 seconds]
Wollan___ has quit [Remote host closed the connection]
carraroj has quit [Ping timeout: 246 seconds]
narph has joined #ruby
JohnFord has joined #ruby
nhhagen has joined #ruby
dumdedum has joined #ruby
hiyosi has quit [Ping timeout: 240 seconds]
corehook has joined #ruby
aspiers has quit [Ping timeout: 246 seconds]
einarj has joined #ruby
agent_white has left #ruby [#ruby]
JohnFord has quit [Ping timeout: 260 seconds]
sectionm1 has joined #ruby
Takle_ has quit [Remote host closed the connection]
bruno- has joined #ruby
sectionme has quit [Read error: No route to host]
marr has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
orolo has quit [Quit: This computer has gone to sleep]
<msx>
hello guys, do you know any good static blog generator written of course in Ruby? I'm looking something like Nikola or Pelican (they are built with Python)
<canton7>
msx, jekyll, nanoc
<msx>
canton7: thank you, heading to the Big G now :D
blackmes1 has joined #ruby
sectionm1 has quit [Ping timeout: 240 seconds]
a_ has quit [Ping timeout: 245 seconds]
timgauthier has joined #ruby
Rollabunna has joined #ruby
unshadow has joined #ruby
kaspertidemann has quit []
bruno- has quit [Ping timeout: 272 seconds]
sectionme has joined #ruby
karupa is now known as zz_karupa
mkaesz has joined #ruby
SouL_ has joined #ruby
orolo has joined #ruby
timonv_ has quit [Remote host closed the connection]
timonv_ has joined #ruby
timonv_ has quit [Remote host closed the connection]
lolmaus has joined #ruby
lolmaus__ has quit [Ping timeout: 272 seconds]
Tomme has quit [Ping timeout: 272 seconds]
Rollabunna has quit [Ping timeout: 255 seconds]
AtumT has joined #ruby
timonv_ has joined #ruby
Takle has joined #ruby
qba73_ has joined #ruby
qba73_ has quit [Remote host closed the connection]
chabier has quit [Remote host closed the connection]
<unshadow>
Hi, I want to print information from an array, but only from the second veriable till the end, I dont know how many veriables are stored, how would I do that ?
<Hanmac>
mikecmpbll: because it your version its nearly useless
<mikecmpbll>
doesn't work for me without, but might be my minimal IRB fu.
adironduck has quit [Quit: adironduck]
<mikecmpbll>
wat
<Hanmac>
mikecmpbll: like for sample why not write " Serialisers.find(type).deserialise(resource) " in one go? because in your current samples you also does not check if a type is valid too
<mikecmpbll>
because if there is no type, i don't want to deserialise :)
<mikecmpbll>
type is valid whatever happens, because if it doesn't exist as a type it returns a default serialiser.
<mikecmpbll>
but if there is no type value, then it's a primative and i don't need to deserialise.
duncannz has quit [Ping timeout: 245 seconds]
<Hanmac>
hm ok are you sure that is that what find() in that case does?
<mikecmpbll>
yes, i wrote it :d
<Firespirit>
lol
Azulinho has joined #ruby
doodlehaus has joined #ruby
timonv_ has quit [Ping timeout: 272 seconds]
InhalingPixels has quit [Ping timeout: 272 seconds]
jheg_ has joined #ruby
jheg has quit [Read error: Connection reset by peer]
<startupality>
how to display all the local variables and methods on a current object?
<Hanmac>
Firespirit: hm thats nice, but it should work without, because currently you are using TWO xml libs at the same time ... imo thats a no-go
hiyosi has quit [Ping timeout: 272 seconds]
sevenseacat has joined #ruby
<Hanmac>
tobiasvl: he did used tabs and that pastie does turn tabs into 8 spaces ...
<tobiasvl>
ah … tabs
<Firespirit>
i know i use to lib but that was the only solution to have a pretty output
<Firespirit>
2 lib*
doodlehaus has quit [Remote host closed the connection]
alexherbo2 has joined #ruby
<Firespirit>
the only issue remaining is that if i want to use system.webServer a field it's giving me an error
alexherbo2 is now known as Alex``
<Firespirit>
i think because he think system is a variable or an object...
Alex`` is now known as `Alex`
`Alex` is now known as Alex``
timonv_ has joined #ruby
JohnFord has quit [Ping timeout: 272 seconds]
yfeldblum has quit [Ping timeout: 255 seconds]
bluenemo has joined #ruby
sevenseacat has quit [Ping timeout: 260 seconds]
chrishough has quit [Ping timeout: 272 seconds]
gvenkat has joined #ruby
kaspertidemann has quit []
doritostains has quit [Quit: doritostains]
baltazore has joined #ruby
orolo has quit [Quit: This computer has gone to sleep]
chrishough has joined #ruby
<Hanmac>
Firespirit: like it said it works forme without RXML, your problem is that your File.write wants to "fix" the lineending with might not does what you want
<Firespirit>
i agree Hanmac but do you have a better solution to propose me :)
<Hanmac>
(12:23:26) Hanmac: Firespirit: look at your File.open ... replace "w" with "wb"
<Hanmac>
that should fix it (or at least try it)
<Firespirit>
i just try
<Firespirit>
no chance :(
DaveTaboola has joined #ruby
orolo has joined #ruby
roolo has joined #ruby
GriffinHeart has joined #ruby
vinleod has joined #ruby
kirun has joined #ruby
Aaaal has joined #ruby
linojon has quit [Quit: linojon]
skip_freely has joined #ruby
sivteck has joined #ruby
memph1s has joined #ruby
chipotle has quit [Quit: cya]
adamholt has quit [Ping timeout: 250 seconds]
Takle has joined #ruby
emocakes has joined #ruby
bluenemo_ has joined #ruby
bluenemo has quit [Ping timeout: 240 seconds]
banister has quit [Read error: Connection reset by peer]
<DaveTaboola>
Hi all :) i hope i wont be annoying asking for a silly question, but i've tried doing my research before posting a question here.
arup_r has quit [Remote host closed the connection]
PanPan has quit [Quit: ChatZilla 0.9.90.1 [Firefox 32.0.1/20140911151253]]
banister has joined #ruby
jhass|off is now known as jhass
adironduck has joined #ruby
<DaveTaboola>
which is responsible of reading large file of data (nginx.log) and compress it, while im running the code in irb, it works like a charm and everything is as should be, but when i'm running the code from a ruby application (logstash) it reaches the max-heap size capacity and fails
<DaveTaboola>
needless to say i've been running debug on the application and i know that the process is killed only due to that statement
<DaveTaboola>
am i missing something?
tlarevo has quit [Ping timeout: 245 seconds]
arup_r has joined #ruby
robbyoconnor has quit [Quit: Konversation terminated!]
sivteck has left #ruby ["To Infinity and Beyond."]
<DaveTaboola>
anyone? :)
<j416>
DaveTaboola: google suggests GC.stat holds some info
<j416>
DaveTaboola: you should be able to change values through setting env vars
<DaveTaboola>
i can make the heap_size larger :) i just want to know what am i doing wrong so i could fix it haha
<j416>
DaveTaboola: but perhaps the more proper way is designing your program so that it doesn't need so much memory in the first place (parse stream-based)
anaeem___ has joined #ruby
tlarevo has joined #ruby
<j416>
DaveTaboola: first error is that you're not indenting your file :P
<j416>
DaveTaboola: and don't monkey-patch File
elstif has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
<DaveTaboola>
j416: i am i just re-wrote that part so people wont scratch their heads trying to understand what
elstif has joined #ruby
rgcouk has joined #ruby
Aaaal has quit [Quit: Aaaal]
Advocation has joined #ruby
<j416>
DaveTaboola: while chunk = f.read(chunk_size) { ... }
<j416>
DaveTaboola: but that wasn't what you were asking, so nevermind.
<j416>
:)
anaeem1 has quit [Ping timeout: 255 seconds]
memph1s has joined #ruby
<DaveTaboola>
j416: and regarding the stream-based parsing, well i'm worried of doing that, as the files i need to process can reach unknow size (10GB for instance) and i'm "not parsing it" as i'm compressing it :) so reading it line by line seems odd
<j416>
I didn't say line by line
<j416>
I said stream
<j416>
which is what you are already doing
<DaveTaboola>
sorry i miss-read that :) (to many people are leaving and joining the room every second! it can drive me crazy :P)
lolmaus has quit [Ping timeout: 272 seconds]
lolmaus has joined #ruby
<j416>
DaveTaboola: anyway, I'd start by simplifying your code, and then finding the error
<j416>
remove the class File thing
<j416>
be consistent in how you open files
<j416>
File.open
sgray10 has quit [Ping timeout: 272 seconds]
arup_r has quit [Remote host closed the connection]
BadQuanta1 has joined #ruby
tkuchiki has quit [Ping timeout: 258 seconds]
Xeago has quit [Read error: Connection reset by peer]
<toretore>
what's that site where you can test stuff in ie?
Xeago has quit [Read error: Connection reset by peer]
rimenes has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Hanmac>
IE does still exist?
AndChat| has quit [Ping timeout: 272 seconds]
<toretore>
unfortunately
Xeago_ has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
max06 has joined #ruby
Aaaal has joined #ruby
<toretore>
found it - browserstack.com
aspiers has joined #ruby
jottr has quit [Ping timeout: 260 seconds]
InhalingPixels has quit [Ping timeout: 272 seconds]
jheg has joined #ruby
<max06>
Good morning. I'm having some troubles installing the gem savon. Gem says, a dependency needs at least ruby version 1.9.2 while ruby -v says it's 1.9.2p0
<max06>
(Debian 6.0.9)
<max06>
maybe someone of you knows how to fix that?
patrick99e99 has quit [Ping timeout: 255 seconds]
Xeago has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
tmba has quit [Ping timeout: 258 seconds]
Imofftopic has joined #ruby
Xeago has joined #ruby
yfeldblum has joined #ruby
Hobogrammer has quit [Ping timeout: 245 seconds]
krisquigley has quit [Read error: Connection reset by peer]
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
max06: it probably wants a later patchlevel, -p0 has known bugs. Besides 1.9.2 is completely out of official support, consider getting ruby 1.9.3 or newer
rimenes has joined #ruby
hiyosi has joined #ruby
<max06>
jhass: is there an easy way to get that when it's not in the debian repo? (Sorry, never used ruby before)
<jhass>
The easiest way is probably a ruby version manager like RVM or Rbenv
<jhass>
don't install those through the repo though
Tomme has joined #ruby
troulouliou_dev has quit [Ping timeout: 272 seconds]
yfeldblum has quit [Ping timeout: 246 seconds]
<max06>
jhass: okay, start reading…
fabrice31 has joined #ruby
<jhass>
max06: btw., debian 6 is out of support too
<max06>
yes, but I can't switch this system to a newer version
janmuffino has joined #ruby
timonv_ has quit [Ping timeout: 272 seconds]
JohnFord has joined #ruby
SouL_ has quit [Ping timeout: 240 seconds]
Ghis_ has joined #ruby
hiyosi has quit [Ping timeout: 272 seconds]
lemur_ has joined #ruby
ndrei has quit [Ping timeout: 246 seconds]
ldnunes has joined #ruby
ndrei has joined #ruby
chipotle has joined #ruby
Takle has quit [Remote host closed the connection]
<j416>
DaveTaboola: yes.
tlarevo has quit [Ping timeout: 260 seconds]
WillAmes has joined #ruby
JohnFord has quit [Ping timeout: 245 seconds]
hrrz has joined #ruby
timonv_ has joined #ruby
<DaveTaboola>
j416: wooohooooo :) thank you
<j416>
DaveTaboola: I didn't say it was good..
<DaveTaboola>
jhass: are you from Lithuva? (just asking)
DaniG2k has quit [Ping timeout: 258 seconds]
<DaveTaboola>
j416: i know, i'm checking it
Tomasso has joined #ruby
lemur has quit [Ping timeout: 272 seconds]
<j416>
DaveTaboola: and I suggested how you could read the data in chunks. You don't have to do it manually like that.
DaniG2k has joined #ruby
<jhass>
DaveTaboola: no
<Tomasso>
gsub! delete... return nil in case of string not modified. this is causing me headache, how could I make it return the string itself in case of not modified ?
orolo has quit [Quit: This computer has gone to sleep]
aspiers has quit [Ping timeout: 272 seconds]
bluenemo_ has quit [Quit: Verlassend]
sgray10 has joined #ruby
<max06>
jhass: I used RVM to install ruby-1.9.3, and: rvm alias create default ruby-1.9.3-p547
<max06>
sadly, gem is still complaining about the version
<max06>
and ruby -v still shows the old 1.9.2
<jhass>
max06: try RVM use 1.9.3
britneywright has joined #ruby
<jhass>
btw. the newest ruby version is 2.1, maybe start with that while learning ruby :)
DaniG2k has quit [Ping timeout: 240 seconds]
<max06>
RVM is not a function, selecting rubies with 'rvm use ...' will not work.
<jhass>
did you login again after installing RVM?
<max06>
yes
<max06>
I have to use the full path to use the rvm
<max06>
something failed while installing… weird stuff
BraddBitt has quit [Read error: Connection reset by peer]
orolo has joined #ruby
<pearlyshellsfrom>
What is a cool Rails project to do for beginner in Ruby (but has programming background) that is not a blog and a bookmark sharer? :P
weems_ has quit [Read error: Connection reset by peer]
<jhass>
max06: what's your terminal emulator?
skammer has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<max06>
iterm2 with bash
cougarten_ has joined #ruby
<max06>
connected per ssh
<jhass>
pearlyshellsfrom: todo list? scnr. #rubyonrails might have better ideas ;)
<jhass>
max06: does it work after you run source .profile ?
<pearlyshellsfrom>
Ah i see. Didnt know there's also #rubyonrails thanks for the heads up
BraddBitt has joined #ruby
cougarten has quit [Ping timeout: 250 seconds]
sgray10 has quit [Ping timeout: 272 seconds]
<max06>
nope
rkalfane has joined #ruby
<jhass>
so did rvm not add a sourcce line to .profile for you?
<max06>
Let me install rvm again, then I can show you the exact error
<wasamasa>
pearlyshellsfrom: I have a love/hate relationship with scraping, too
<max06>
manually? Why not rvm or similar? :)
<max06>
I thought that's the reason for such tools
<shevy>
tar -vjxf ruby-2.1.2.tar.bz2
<wasamasa>
pearlyshellsfrom: the task itself isn't that hard, but turning the data into something useful and presenting them...
<shevy>
max06 what do you need rvm? for version switching. how many different ruby versions will you need to run your code?
<jhass>
max06: if the requirement is to run as root but only from one user account, you can still do so with a rvm installation to that iuser account and rvmsudo
InhalingPixels has joined #ruby
phoo1234567 has quit [Max SendQ exceeded]
claymore has joined #ruby
timonv_ has joined #ruby
phoo1234567 has joined #ruby
<jhass>
shevy: he's on ancient ruby thanks to ancient debian and says he can't upgrade
<max06>
~10 different users with sudo perms
<gregf_>
>>str = "foo bar"; %w{test foo}.each { |repl| a = str;puts a.gsub!(/#{repl}\s*/,"") || a }
gvenkat has quit [Quit: This computer has gone to sleep]
charliesome has quit [Quit: zzz]
bking39116 has joined #ruby
<shevy>
if you use debian you may have to get a few dev packages to uncripple their setup, though it is actually not really necessary; the bindings are in the subdirectory ext/* - for instance, ext/openssl or ext/readline and so forth
Xeago has quit [Read error: Connection reset by peer]
<shevy>
actually, in principle you could also not use psych
<shevy>
there is a syck gem too
Xeago has joined #ruby
perrier has quit [Remote host closed the connection]
timonv^ has quit [Read error: Connection reset by peer]
timonv_ has joined #ruby
<gizmore>
some rails stuff is quite nice though... like reverse_merge and... well that´s it?
techsethi has quit [Quit: techsethi]
mengu has quit []
cheeti has left #ruby [#ruby]
* shevy
adds txdv to his personal list of sla... erm... followers.
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
I always though ruby has cryptic error messages
<shevy>
but C is even worse
<shevy>
ccc.c:26:23: error: lvalue required as left operand of assignment
lxsameer has quit [Quit: Leaving]
pierombaabu has quit [Remote host closed the connection]
DroidBurgundy has joined #ruby
<max06>
shevy: that message is pretty clear to me ;)
<gizmore>
error in line 23 or 26, something is not a long
<shevy>
oops
<shevy>
yeah it was a chained ||
<shevy>
I used one = rather than == in there :\ :/
<tobiasvl>
classic
<gizmore>
it should throw a warning: You typed something different than you thought :(
<shevy>
well that is strange
BlkDynmt has joined #ruby
<shevy>
my eyes are not used to multiple ||
kalusn has quit [Remote host closed the connection]
rp__ has joined #ruby
qba73 has quit []
<shevy>
my ruby code reaches this complexity
<shevy>
if bla
<txdv>
shevy: that lvalue happens most of the time when you write = instead of ==
<shevy>
else
linojon has quit [Quit: linojon]
<max06>
short trip back to installing ruby on debian… :D
astav has joined #ruby
<max06>
it works for root now, can I also use the installation for the other users?
<max06>
because for me it's still using the old 1.9.3
<max06>
instead of the actual 2.1.2 installed as root
Inhaling_ has joined #ruby
kalusn has joined #ruby
rkalfane has joined #ruby
<txdv>
just use rvm
dblessing has joined #ruby
<Tomasso>
i tried to add a method to the string class in ruby 1.9.3 by declaring a class String def mymethod end end and it doesnt work, why could that be >?
Kricir has quit [Remote host closed the connection]
<jhass>
max06: read the nick ;)
<jhass>
apeiros: ^
<_2_niallsbabe>
you are six
jeremy04 has joined #ruby
GGMethos has quit [Quit: WeeChat 1.1-dev]
<max06>
yeah… sure ;)
<shevy>
lol
jaygen has joined #ruby
<shevy>
_2_niallsbabe go learn ruby man
<max06>
and you're a girl, just because your nick :D
<max06>
And I don't like to get spammed in private!
<gizmore>
my age is a composite of two numbers which both have only one different digit
<_2_niallsbabe>
I am a girl
<_2_niallsbabe>
how old are tyou
<_2_niallsbabe>
you
<shevy>
max06 well those were paths very similar to GoboLinux, they also used an AppDir approach. It was superconvenient to add or remove programs and instantly know which program belongs to which app
<Tomasso>
girls??!
Inhaling_ has quit [Remote host closed the connection]
<shevy>
sadly Gobolinux more or less died
<_2_niallsbabe>
yes
<mikecmpbll>
troll alert.
<max06>
You'll never no my age ;)
<max06>
(typing today… know for sure)
<shevy>
the different versions provided something like rvm does for ruby, but for all programs instead
<_2_niallsbabe>
tell me I will date you if you do
InhalingPixels has joined #ruby
<mikecmpbll>
...
<shevy>
_2_niallsbabe please man, go learn ruby, go become useful in society
fsapo has joined #ruby
<_2_niallsbabe>
nah
<jhass>
jeez, why don't you all just ignore
<max06>
_2_niallsbabe: sorry, I'm married to my job… no chance ;)
<max06>
jhass: just because of some fun
<_2_niallsbabe>
how old are ou
weems|mac has joined #ruby
weems|mac has joined #ruby
<tobiasvl>
what is this
Squarepy has joined #ruby
<max06>
okay, fun is over, ignored :)
Squarepy has quit [Changing host]
Squarepy has joined #ruby
<_2_niallsbabe>
what
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tkuchiki has quit [Remote host closed the connection]
jaygen_ has quit [Ping timeout: 272 seconds]
hiyosi has joined #ruby
<_2_niallsbabe>
who has snap chat
Hanmac has joined #ruby
<DefV>
teenage girls
duggiefresh has joined #ruby
grenierm has joined #ruby
<_2_niallsbabe>
yes
Squarepy has quit [Client Quit]
silkfox has joined #ruby
tkuchiki has joined #ruby
Squarepy has joined #ruby
bmurt has joined #ruby
krisquigley has quit [Remote host closed the connection]
britneywright has joined #ruby
<_2_niallsbabe>
defv how old are you
jaygen_ has joined #ruby
krisquigley has joined #ruby
<DefV>
why
<_2_niallsbabe>
because
<tobiasvl>
apeiros!
krisquigley has quit [Remote host closed the connection]
<jhass>
Tomasso: I can't make sense of your code, it doesn't even have a matching number of openings and ends and I don't know what regexs is
gvenkat has quit [Quit: This computer has gone to sleep]
yfeldblum has joined #ruby
<jhass>
Tomasso: it's also horribly indented
jheg has joined #ruby
<_2_niallsbabe>
jhass shut up
hiyosi has quit [Ping timeout: 246 seconds]
jaygen has quit [Ping timeout: 245 seconds]
<tobiasvl>
ok ignored
<_2_niallsbabe>
idc
reisl has joined #ruby
_2_niallsbabe has left #ruby [#ruby]
Xeago has quit [Remote host closed the connection]
mark_locklear has joined #ruby
<shevy>
lol
xcv has quit [Remote host closed the connection]
<shevy>
boredom slayed that troll
sgray10 has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
orolo has quit [Quit: This computer has gone to sleep]
chabier has joined #ruby
oleo has joined #ruby
jottr has joined #ruby
mr-foobar has quit [Quit: Leaving...]
bricker`LA has joined #ruby
AxonetBE has quit [Quit: AxonetBE]
terlar has joined #ruby
hellangel7 has joined #ruby
tkuchiki has quit [Remote host closed the connection]
orolo has joined #ruby
BlkDynmt_ has joined #ruby
AxonetBE has joined #ruby
BlkDynmt has quit [Ping timeout: 272 seconds]
blackmes1 has quit [Ping timeout: 260 seconds]
DaniG2k has joined #ruby
kaspertidemann has joined #ruby
GGMethos has joined #ruby
BlkDynmt_ has quit [Read error: Connection reset by peer]
evrei has joined #ruby
shredding has quit [Quit: shredding]
chabier has quit [Remote host closed the connection]
benzrf|offline is now known as benzrf
Channel6 has joined #ruby
timgauthier_isaw is now known as timgauthier
grenierm has quit [Quit: grenierm]
GGMethos has quit [Client Quit]
benzrf is now known as benzrf|offline
x1337807x has joined #ruby
benzrf|offline is now known as benzrf
jaygen has joined #ruby
GGMethos has joined #ruby
Takle has quit [Remote host closed the connection]
<apeiros>
tobiasvl: what's up?
Stalkr_ has joined #ruby
ursooperduper has joined #ruby
zeroNones has joined #ruby
zeroNones has quit [Max SendQ exceeded]
<tobiasvl>
apeiros: just wanted you to ban a troll but it sorted itself out
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
jaygen_ has quit [Ping timeout: 272 seconds]
noopq has quit [Ping timeout: 255 seconds]
cirn0 has joined #ruby
kalusn has quit [Remote host closed the connection]
DaveTaboola has quit [Quit: Page closed]
<jhass>
Tomasso: the whole .each could probably be simplified to something like ticket.gsub!(Regexp.union(regexs.keys), regexs) if regexs would be properly defined
kalusn has joined #ruby
Takle has joined #ruby
mikepack has joined #ruby
perrier has quit [Remote host closed the connection]
flowerhack has joined #ruby
timgauthier has quit [Read error: Connection reset by peer]
ndrei has quit [Ping timeout: 260 seconds]
perrier has joined #ruby
mtncode has joined #ruby
cirn0 has quit [Ping timeout: 272 seconds]
<Tomasso>
jhass: yes.. im doing some refactoring.. my problem was the gsub.. i tought it returned another instance of modified string. and left untouched the receiver
Kricir has joined #ruby
<jhass>
Tomasso: that's the difference between .gsub and .gsub!
BadQuanta1 has quit [Ping timeout: 246 seconds]
<jhass>
.gsub always returns the value, modified or not, it never touches the receiver. .gsub! returns the receiver only if it was modified, (hence it does modify the receiver), nil otherwise
reisl is now known as larissa
zeroNones has joined #ruby
carraroj has quit [Ping timeout: 272 seconds]
zeroNones has quit [Max SendQ exceeded]
blackmes1 has joined #ruby
zeroNones has joined #ruby
zeroNones has quit [Max SendQ exceeded]
xcv has joined #ruby
Lewix has joined #ruby
Xeago has joined #ruby
northfurr has quit [Quit: northfurr]
freelusion has joined #ruby
ffranz has joined #ruby
JohnFord has joined #ruby
tkuchiki has joined #ruby
rgcouk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
spastorino has joined #ruby
freelusion has quit [Client Quit]
tlarevo has joined #ruby
corehook_ has joined #ruby
Imofftopic has quit [Quit: Leaving]
<gregf_>
>> class String; def mysub! regex, repl; self.gsub!(Regexp.union(regex.keys),repl) || self; end; end ;for val in [{ "test" => "test" }, { "\n" => "\n" }]; p "foo123 bar \n 234".mysub!(val,"<br>"); end
timonv_ has quit [Read error: Connection reset by peer]
diegoviola has joined #ruby
timonv_ has joined #ruby
ohwhoa has joined #ruby
paulfm_ has quit [Ping timeout: 260 seconds]
Xeago has joined #ruby
bMalum has quit [Quit: bMalum]
adironduck has quit [Quit: adironduck]
timonv^ has joined #ruby
apeiros has joined #ruby
earfin has quit [Read error: Connection reset by peer]
shock_one_ has quit [Quit: Computer has gone to sleep.]
matchaw_ has quit [Ping timeout: 260 seconds]
adironduck has joined #ruby
orolo has quit [Remote host closed the connection]
matchaw has joined #ruby
adironduck has quit [Client Quit]
shock_one_ has joined #ruby
timonv_ has quit [Ping timeout: 245 seconds]
GriffinHeart has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
<shevy>
txdv right now I am on slackware 32bit (32 bit because I need the program wine, and 64 bit slackware requires some manual steps to enable multi-lib again)
<shevy>
txdv I compiled most software anew though
cougarten_ has joined #ruby
<shevy>
txdv current snapshot http://pastie.org/pastes/9562023/text - obviously I still have to update kernel, glibc and gcc - gcc I update currently
DaniG2k_ has joined #ruby
oponder has joined #ruby
aganov has quit [Quit: Leaving]
kalusn has quit [Remote host closed the connection]
<shevy>
I also switched ruby to prefix /usr for now, will move it into /Programs/Ruby/VERSION lateron
cougarten has quit [Ping timeout: 250 seconds]
<shevy>
txdv I finally decided to learn C seriously though, working through "The C programming language" on my left side
wpp has quit [Quit: ZZZzzz…]
sdegutis has joined #ruby
<sdegutis>
What's a good tool for deploying a Rails app to production?
mikepack has joined #ruby
oponder has quit [Client Quit]
earfin has joined #ruby
tjr9898 has joined #ruby
prawnsalad has left #ruby [#ruby]
stephanepaul has joined #ruby
DaniG2k has quit [Ping timeout: 255 seconds]
Waheedi has quit [Remote host closed the connection]
giorni has joined #ruby
banister has joined #ruby
<ericwood>
capistrano, et. all
<apeiros>
git + 10 line bash script
<ericwood>
there's some tools out there that mimic the whole heroku deploy process but I can't remember the names
aspires has quit []
<ericwood>
honestly though I'm pretty sure most people roll their own
giorni has left #ruby [#ruby]
ndrei has quit [Ping timeout: 272 seconds]
<apeiros>
we use capistrano at work. but IMO so utterly overengineered.
<ericwood>
you can make it crazy complex if you want to
<apeiros>
(note: doesn't mean I see no value in cap - just that it's not the best tool in many cases)
<ericwood>
then throw things like puppet into the mix
cndiv has joined #ruby
<apeiros>
ericwood: yupp.
yfeldblum has joined #ruby
<ericwood>
if you have a very complex app setup and it has several servers etc. puppet is a good idea
<ericwood>
but I am the worst ops guy ever
fabrice31 has quit [Remote host closed the connection]
<apeiros>
I guess the same applies to cap
<ericwood>
yep yep yep
<lsone>
I think I could give you a run for your money on that title ericwood
<apeiros>
you want a repeatable deploy process
Wolland has joined #ruby
sinkensabe has quit [Remote host closed the connection]
a has joined #ruby
<apeiros>
for simple apps you can get that very cheaply. for more complex setups, things like cap & puppet might pay off
britneywright has joined #ruby
<ericwood>
as you get more copmlex you should just hire a devops dude
a is now known as Guest86026
jheg has quit [Quit: jheg]
<apeiros>
probably a good idea
<yxhuvud>
we use rpm, but then we do produce something that in practice is a (centos-based) dist. I wouldn't recommend it unless you need it
mikepack has quit [Ping timeout: 272 seconds]
tjr9898 has quit []
thejoecarroll has quit [Ping timeout: 245 seconds]
phutchins has quit [Remote host closed the connection]
<shevy>
rpm!
shock_one_ has quit [Ping timeout: 255 seconds]
<ericwood>
having a devops team has been such a good idea
<ericwood>
like, people that actually know how to do networking and admin
Advocation has quit [Quit: Advocation]
Hobogrammer has joined #ruby
bricker`LA has joined #ruby
<ericwood>
most devs are awful admins :)
yfeldblum has quit [Ping timeout: 246 seconds]
<ericwood>
I am one of them. I know just enough to cause some serious damage...
<shevy>
are you a dev ericwood
Wolland has quit [Ping timeout: 260 seconds]
<shevy>
no wait
<shevy>
are you an admin ericwood
<sdegutis>
We have 2 servers in production, one for DB and one for web app. And we have a copy of this in staging sometimes.
<apeiros>
sdegutis: anyway, bottom line is: the common tools are cap, puppet, chef. I think the latter two are less about deploy and more about infrastructure management.
<apeiros>
sdegutis: if you want to see how to do it with git+bash, let me know. I can gist it.
Takle has quit [Remote host closed the connection]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
emacster has joined #ruby
starkhalo has joined #ruby
<emacster>
Hi everyone
tectonic has joined #ruby
AxonetBE has quit [Quit: AxonetBE]
eivindml has joined #ruby
oivoodoo has joined #ruby
eivindml has quit [Max SendQ exceeded]
Ghis_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<emacster>
I've just started learning ruby(came from Java), and have finished the beginner's guide
eivindml has joined #ruby
eivindml has quit [Max SendQ exceeded]
timonv^ has quit [Remote host closed the connection]
<emacster>
what are some resources to carry me beyond?
<ericwood>
the pickaxe book is pretty great
<sdegutis>
Pickaxe.
<sdegutis>
Totally.
<emacster>
great
timonv_ has joined #ruby
<ericwood>
then start writing some sweet programs
eivindml has joined #ruby
<emacster>
ericwood: not confident enough, want to delve more
<ericwood>
just write some terrible terrible programs
<shevy>
hehe
<ericwood>
rip them apart, rewrite
<ericwood>
it usually takes 5 iterations to get it right when you're starting out
<ericwood>
but honestly actually writing it is the best way to learn!
<ericwood>
roll up your sleeves, dig into the codes
Kricir has joined #ruby
<emacster>
Pickaxe ruby from google returns some pragmatic programmer resource
<emacster>
is it what i should look at?
<ericwood>
yep
<ericwood>
we all call it the pickaxe book because it has a cool pickaxe on the cover
<ericwood>
Dave Thomas wrote it
<sdegutis>
I have been rewriting my programs for 5 years. I think they are getting close to okay.
<shevy>
emacster work through this here: https://pine.fm/LearnToProgram/chap_01.html the navigation is a bit broken right now, but when you click through it all, you will be able to answer this question at least: "When and how to use yield in Ruby?"
<apeiros>
emacster: if nobody said it yet - eloquent ruby
<apeiros>
sdegutis: certainly an interesting article. but IMO its statement is not to not use !!. or rather, not using !! would not have helped with his basic issue.
<j_mcnally>
They said i could be anything, so i became a method.
nhhagen_ has quit [Ping timeout: 240 seconds]
timonv_ has joined #ruby
<apeiros>
j_mcnally: and what's your subject?
<sdegutis>
Mommy, when I grow up, I want to be the concept of referentiality!
* apeiros
is an exception
ixti has quit [Ping timeout: 272 seconds]
<apeiros>
:-p
<sdegutis>
Okay dear, just make sure to study hard and get good grades, and also invent a way to convert your inherent nature.
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
nah, not necessary.
<apeiros>
it's sufficient if I have a message
<apeiros>
and for the backtrace, you can ask the NSA :D
<momomomomo>
~_~ +1 list
bricker`LA has quit [Quit: leaving]
RichardLitt has joined #ruby
<apeiros>
ah damn, I like that kind of humor. but seems I'm the only one :(
<apeiros>
so… decisions have to be made. should I work or play zelda, wind waker?
maletor_ has joined #ruby
bking39116 has quit [Quit: bking39116]
mleone has joined #ruby
Xeago has quit [Remote host closed the connection]
BadQuanta has joined #ruby
sdegutis has quit [Quit: Leaving...]
krisquigley has quit [Remote host closed the connection]
RichardLitt has quit [Quit: RichardLitt]
lkba has quit [Ping timeout: 272 seconds]
thejoecarroll has joined #ruby
<shevy>
continue on coding for your games!
lkba has joined #ruby
momomomomo has quit [Quit: momomomomo]
Takle has quit [Remote host closed the connection]
Akuma has joined #ruby
anarang has quit [Quit: Leaving]
Takle has joined #ruby
kaspergrubbe has quit [Read error: Connection reset by peer]
maestrojed has joined #ruby
kiwnix has quit [Quit: Leaving]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
kireevco has joined #ruby
voodoofish4301 is now known as voodoofish430
ixti has joined #ruby
Wolland has joined #ruby
alex88 has quit [Quit: Leaving...]
troyready has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
anaeem1_ has joined #ruby
niklas123 has joined #ruby
wallerdev has joined #ruby
ooloo has quit [Read error: Connection reset by peer]
rezzack has joined #ruby
Advocation has joined #ruby
snath has joined #ruby
<Lewix>
apeiros: zelda is the best game I have ever playes
<Lewix>
played*
ooloo has joined #ruby
ooloo has quit [Read error: Connection reset by peer]
* Lewix
is reminiscing about his time playing N64
krisquigley has joined #ruby
<apeiros>
the n64 games are available on the wii/wii U for the virtual machine :)
<apeiros>
I only got me the first 3 zeldas for that, though
max06 has quit [Ping timeout: 272 seconds]
MatthewsFace has joined #ruby
<Lewix>
zelda on N64 was a brilliant game. I wonder if the newest zelda are as good
Advocation has quit [Client Quit]
earfin_ has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
momomomomo has joined #ruby
DaniG2k_ has quit [Quit: leaving]
awc737 has joined #ruby
momomomomo has quit [Client Quit]
krisquigley has quit [Remote host closed the connection]
HelperW_ has joined #ruby
yfeldblum has joined #ruby
<benzrf>
Lewix: there were 2 n64 zleda
<Lewix>
benzrf: ocarina of time
Advocation has joined #ruby
gsd has joined #ruby
<apeiros>
majoras mask was the other one?
liam__ has joined #ruby
zekriad has joined #ruby
earfin has quit [Ping timeout: 246 seconds]
<apeiros>
one day I have to play all the GBA, 3DS, N64 and GC zeldas
icarus has joined #ruby
<Lewix>
"Even after nine years, Ocarina of Time holds up surprisingly well, offering a lengthy and often-amazing adventure".[34] Edge magazine commented in its 2007 "The 100 Best Games" special issue, "[Ocarina of Time] was an astonishing achievement in 1998 and, almost a decade later, still serves as the landmark for its successors and 3D adventure games in general...
<apeiros>
zelda & metroid are my all time favorite game series I think
nhhagen has joined #ruby
kireevco has quit [Quit: Leaving.]
<apeiros>
though I really hate how they basically assassinated samus' character in "other m" >:-(
bruno- has quit [Ping timeout: 240 seconds]
patrick99e99 has joined #ruby
HelperW has quit [Ping timeout: 272 seconds]
ep3static has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
j4rh3rd has quit [Ping timeout: 260 seconds]
HelperW_ has quit [Ping timeout: 240 seconds]
<liam__>
System.out.println("test")[-
<liam__>
Wrong window
mikepack has quit [Remote host closed the connection]
timgauthier_isaw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
skammer has joined #ruby
memph1s has quit [Quit: I couldn't come up with quit message :(]
memph1s has joined #ruby
mtncode has quit [Ping timeout: 258 seconds]
cndiv has joined #ruby
mikecmpbll has quit [Ping timeout: 272 seconds]
<shevy>
this makes me even sadder
mikeg has joined #ruby
wallerdev has quit [Quit: wallerdev]
<shevy>
"Annotations themselves may be annotated"
<shevy>
@Retention(RetentionPolicy.RUNTIME)
<shevy>
@Target({ElementType.METHOD})
felipecvo has joined #ruby
<shevy>
public @interface Tweezable {}
<shevy>
so it is not enough to be verbose
<shevy>
it is not enough to have types
<shevy>
no, you also need extra annotations for that extra superpowers
fsapo has joined #ruby
<aarkerio>
hi! Is there a way to "intercept" File.write with $stdout ? I tried:
<aarkerio>
saved = $stdout = StringIO.new; File.open("/tmp/whatever.txt", 'w', 0666) do |f| f.write('foo') end
<apeiros>
eam: no, you're not alone in that (rspec)
<shevy>
perhaps I could build a whole program through annotations by themselves
carraroj has joined #ruby
<apeiros>
eam: I do like DSLs. but in the case of rspec, I don't see it adding any value, but costing tremendously.
perrier has quit [Remote host closed the connection]
<eam>
aarkerio: guessing #reopen?
masolino has quit [Quit: Lost terminal]
<apeiros>
aarkerio: hm? you're not writing to stdout. you're writing to the file. maybe I don't get your question, though…
perrier has joined #ruby
<apeiros>
aarkerio: also `saved = $stdout = StringIO.new` assigns the StringIO.new to saved too. from the name of the var I'd guess that that's not what you intended.
momomomomo has joined #ruby
blackmes1 has joined #ruby
krisquigley has joined #ruby
AndChat| has joined #ruby
fantazo has joined #ruby
shinobi_one_ has joined #ruby
momomomomo has quit [Client Quit]
shinobi_one has quit [Ping timeout: 272 seconds]
shinobi_one_ is now known as shinobi_one
<aarkerio>
I have a script that save some info into a file, all of it very basic File.write('foo'), but I need to test the script without actually using the filesystem
dda has joined #ruby
carraroj has quit [Ping timeout: 245 seconds]
mikepack has joined #ruby
lkba has quit [Ping timeout: 255 seconds]
michaeldeol has joined #ruby
<apeiros>
aarkerio: use a stubbing/mocking lib then. or fakefs.
liam__ has quit [Quit: Page closed]
Wolland_ has joined #ruby
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
threesixes has joined #ruby
kaspergrubbe has joined #ruby
momomomomo has joined #ruby
gattie has joined #ruby
pietr0 has joined #ruby
slester has joined #ruby
bMalum has quit [Quit: bMalum]
Wolland has quit [Ping timeout: 245 seconds]
momomomomo has quit [Client Quit]
mercwithamouth has quit [Ping timeout: 240 seconds]
ixti has quit [Ping timeout: 245 seconds]
adrenaline_ has quit [Remote host closed the connection]
<aarkerio>
ok, thx!
timgauthier has joined #ruby
timgauthier is now known as timgauthier_isaw
Guest86026 has quit [Ping timeout: 240 seconds]
mikepack has quit [Remote host closed the connection]
deric_skibotn has joined #ruby
freerobby has joined #ruby
linojon has quit [Quit: linojon]
nettoweb has joined #ruby
nettoweb has quit [Max SendQ exceeded]
ghr has quit [Ping timeout: 272 seconds]
nettoweb has joined #ruby
nettoweb has quit [Max SendQ exceeded]
timonv_ has joined #ruby
nettoweb has joined #ruby
poguez_ has joined #ruby
Spami has quit [Read error: Connection reset by peer]
Spami has joined #ruby
aarkerio has quit [Quit: Verlassend]
max06 has joined #ruby
timgauthier_isaw is now known as timgauthier
melik_ has joined #ruby
SouL has joined #ruby
Tomme has quit [Ping timeout: 245 seconds]
perrier has quit [Remote host closed the connection]
rbenv has joined #ruby
chth0n has quit [Ping timeout: 272 seconds]
max06 has quit [Client Quit]
adrenaline_ has joined #ruby
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
perrier has joined #ruby
jay has joined #ruby
failshell has quit []
mocfive_ has quit [Remote host closed the connection]
eshy has quit [*.net *.split]
lyuzashi has quit [*.net *.split]
cibs has quit [*.net *.split]
jay is now known as rubyonrails
lyuzashi has joined #ruby
cibs has joined #ruby
eshy has joined #ruby
mocfive has joined #ruby
SouL has quit [*.net *.split]
perrier has quit [*.net *.split]
gattie has quit [*.net *.split]
Wolland_ has quit [*.net *.split]
threesixes has quit [*.net *.split]
icarus has quit [*.net *.split]
corehook has quit [*.net *.split]
eivindml has quit [*.net *.split]
Kricir has quit [*.net *.split]
rippa has quit [*.net *.split]
paulfm has quit [*.net *.split]
InhalingPixels has quit [*.net *.split]
doodlehaus has quit [*.net *.split]
cocotton has quit [*.net *.split]
phoo1234567 has quit [*.net *.split]
andrewh has quit [*.net *.split]
dumdedum has quit [*.net *.split]
stef_204 has quit [*.net *.split]
Cecen has quit [*.net *.split]
badhatter has quit [*.net *.split]
bjornar has quit [*.net *.split]
Kilo`byte has quit [*.net *.split]
jimmyhoughjr has quit [*.net *.split]
Sou|cutter has quit [*.net *.split]
psyprus has quit [*.net *.split]
Kruppe has quit [*.net *.split]
xiphias has quit [*.net *.split]
jayne has quit [*.net *.split]
flagg0204 has quit [*.net *.split]
Urocyon has quit [*.net *.split]
zwischenzug has quit [*.net *.split]
PhilK has quit [*.net *.split]
thoolihan has quit [*.net *.split]
mleone has quit [Remote host closed the connection]
Paul_McFreely has quit [Quit: Computer has gone to sleep.]
andrewjanssen has quit [Quit: Leaving...]
fredsir has quit [Ping timeout: 272 seconds]
webguynow has joined #ruby
Paul_McFreely has joined #ruby
chrishough has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jokke>
don't know if this is the right channel, but i'm having some trouble setting up octopress with jekyll-assets (sprockets for jekyll) and i'm wondering if anyone here could help me out. My problem: image paths are set correctly (with cache busters and all) but they're not put into the assets/ directory.
16WAAJOWC has joined #ruby
18VAAZA7K has joined #ruby
timonv_ has quit [Ping timeout: 245 seconds]
mocfive has quit [Ping timeout: 272 seconds]
fredsir has joined #ruby
braincrash has joined #ruby
bMalum has joined #ruby
ValicekB has quit [Ping timeout: 260 seconds]
Smujo_ has quit [Ping timeout: 260 seconds]
Smujo has quit [Ping timeout: 246 seconds]
m8 has joined #ruby
ixti has joined #ruby
britneywright has quit [Read error: Connection reset by peer]
britneywright has joined #ruby
wallerdev has joined #ruby
fabrice31 has joined #ruby
corehook has quit [Remote host closed the connection]
corehook has joined #ruby
Jarboe has joined #ruby
benzrf is now known as benzrf|offline
bMalum has quit [Client Quit]
krisquigley has quit [Remote host closed the connection]
andrewlio has joined #ruby
<wallerdev>
morning
<jokke>
evening
<wallerdev>
whats up
abdulsattar has joined #ruby
b00stfr3ak has quit [Quit: leaving]
b00stfr3ak has joined #ruby
giorni has joined #ruby
fabrice31 has quit [Ping timeout: 272 seconds]
mailo_ has joined #ruby
roolo has quit [Read error: Connection reset by peer]
giorni has left #ruby [#ruby]
linojon has joined #ruby
tkuchiki has quit [Remote host closed the connection]
ValicekB has joined #ruby
Jackneill has joined #ruby
elaptics is now known as elaptics`away
shinobi_one has quit [Quit: shinobi_one]
zz_jrhorn424 is now known as jrhorn424
timgauthier is now known as timgauthier_isaw
pozican has joined #ruby
nanoyak has joined #ruby
awc737 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timgauthier_isaw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Jarboe has quit [Ping timeout: 240 seconds]
<pozican>
Is there a way to investigate what attributes an object has? My instinct is that I'd need to convert it to a hash then look at the datastructure from there
shinobi_one has joined #ruby
benzrf|offline is now known as benzrf
<jhass>
pozican: you mean what instance variables?
Jake232 has joined #ruby
<pozican>
I'm not sure, i'll find out what it is
mailo_ has quit [Quit: Leaving...]
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shinobi_one has quit [Client Quit]
bruno- has joined #ruby
rezzack has quit [Quit: Leaving.]
<pozican>
jhass: I'm just getting returned an object from this method, and I know I can use obj.name, but there must be more attributes than that
AndChat| has quit [Ping timeout: 240 seconds]
<jhass>
so what methods
<pozican>
well it's not ruby core, it's in fog
<pozican>
I guess I could look through fog
mikepack has joined #ruby
nanoyak has quit [Client Quit]
muhammadn has joined #ruby
<dda>
pozican: You could try to use the `pp` method to pretty print your object.
<jhass>
1) call .class on it to find out its type and look up the docs 2) call .methods on it to find all methods 3) get hold of that object in a pry session and run ls obj inside pry
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
enriclluelles has quit [Remote host closed the connection]
nanoyak has joined #ruby
<pozican>
dda: jhass seitensei thanks
gvenkat has joined #ruby
Nieralyte has joined #ruby
nhhagen has quit [Remote host closed the connection]
Rollabunna has quit [Remote host closed the connection]
weeb1e has joined #ruby
sectionme has joined #ruby
HelperW_ has joined #ruby
Soda has quit [Remote host closed the connection]
abdulsattar has quit [Ping timeout: 272 seconds]
centrx has joined #ruby
vallieres_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_lexjm has joined #ruby
weeb1e has quit [Client Quit]
weeb1e has joined #ruby
chrishough has joined #ruby
sectionme has quit [Ping timeout: 245 seconds]
TorpedoSkyline has joined #ruby
ctp has joined #ruby
msmith__ has joined #ruby
anildigital has quit [Changing host]
anildigital has joined #ruby
bruno- has quit [Ping timeout: 258 seconds]
jfisk87 has joined #ruby
HelperW_ has quit [Ping timeout: 272 seconds]
mikepack has quit [Remote host closed the connection]
stephanepaul has joined #ruby
jfisk87 has quit [Client Quit]
omosoj has joined #ruby
carraroj has joined #ruby
niklas123 has quit [Quit: Leaving]
moritzs has joined #ruby
ramfjord has joined #ruby
mikecmpbll has joined #ruby
codeurge has joined #ruby
mtncode has joined #ruby
moritzs has quit [Max SendQ exceeded]
bruno- has joined #ruby
robh71 has joined #ruby
jrhorn424 is now known as zz_jrhorn424
endash has quit [Read error: Connection reset by peer]
endash has joined #ruby
qwyeth has joined #ruby
bwilson has quit [Read error: Connection reset by peer]
ooloo has joined #ruby
shackleford has quit [Remote host closed the connection]
carraroj has quit [Ping timeout: 245 seconds]
bwilson has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
agjacome has joined #ruby
mtncode has quit [Ping timeout: 240 seconds]
zz_jrhorn424 is now known as jrhorn424
earfin_ has quit [Ping timeout: 255 seconds]
larissa has quit [Quit: Leaving]
Jetchisel has joined #ruby
jusmyth has joined #ruby
jusmyth has left #ruby [#ruby]
shock_one_ has joined #ruby
mark_locklear has joined #ruby
dumdedum has quit [Ping timeout: 258 seconds]
devoknievo_ has joined #ruby
BadQuanta has quit [Ping timeout: 272 seconds]
jrhorn424 is now known as zz_jrhorn424
bruno- has quit [Read error: Connection reset by peer]
msmith__ has quit [Remote host closed the connection]
Xeago has joined #ruby
timonv_ has joined #ruby
IceDragon has joined #ruby
bruno- has joined #ruby
ep3static has quit [Quit: WeeChat 0.4.2]
tastycode has joined #ruby
timonv_ has quit [Remote host closed the connection]
krisquigley has joined #ruby
<tastycode>
When I use up a lot of memory in a new thread, and i’m sure that i’m totally done with any memory i used in that thread.. how do i get that memory back? http://pastebin.com/xfV7p31Y
existensil_ has quit [Ping timeout: 260 seconds]
Xeago has quit [Read error: Connection reset by peer]
vallieres_ has joined #ruby
<tastycode>
GC.start doesn’t seem to do anything, and there is no explicit free()
vallieres_ has quit [Max SendQ exceeded]
<centrx>
tastycode, Find the variables for your big data structures
<centrx>
tastycode, Set them = nil when you want to clear the memory they use
emocakes has quit []
<centrx>
tastycode, GC determines what memory to clear based on how many references there are to it (> 0)
failshell has joined #ruby
<centrx>
tastycode, Setting the referent variable(s) to nil thus clears the memory references and so the GC clears that memory
AlSquire has quit [Quit: This computer has gone to sleep]
einarj has quit [Remote host closed the connection]
bruno- has quit [Read error: Connection reset by peer]
timgauthier has joined #ruby
bruno- has joined #ruby
<tastycode>
centrx: thanks, http://pastebin.com/95wP3dY4 So , that helps a bit… now i am down about 10mb in the example.. is GC.start asynchronous? is it actually going to pretty soon free all those ostructs and i’m just checking too early?
awc737 has joined #ruby
doritostains has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
AlSquire has joined #ruby
AlSquire has quit [Client Quit]
<centrx>
tastycode, Usually you don't really need to call GC.start as it runs automatically pretty well
klmlfl has joined #ruby
zz_jrhorn424 is now known as jrhorn424
Lewix has quit [Remote host closed the connection]
<centrx>
tastycode, GC.start is synchronous
klmlfl has quit [Remote host closed the connection]
klmlfl has joined #ruby
<tastycode>
I wish i could do something like “free_everything { something_really_expensive } “
<centrx>
tastycode, before thread mem: 7712768
<centrx>
tastycode, add another one I guess it doubles it
<tastycode>
what do you mean? “add another one” ?
havenwood has joined #ruby
<centrx>
7MB isn't that much, I think that's pretty expected with an interpreted language/threading/creating 10,000,000 objects
muhammadn has quit [Ping timeout: 260 seconds]
<centrx>
tastycode, join
bruno- has joined #ruby
<centrx>
tastycode, it suspends the current execution, and starts a new thread, no?
<centrx>
tastycode, so you start off with 7MB, then you start a new thread, and it almost doubles the memory usage
vallieres_ has joined #ruby
<centrx>
two threads vs one thread
slester has quit [Quit: *poof*]
<centrx>
though one is paused
<tastycode>
Yeah, but this is a microcosm for a bigger problem with a scheduling library … in the real world i’m using rufus-scheduler and doing a whole bunch of complex business logic … in reality, this is 290mb, going up to 350mb and it never seems to free.. infinitely until the worker runs out of memory
goganchic has joined #ruby
goganchic has quit [Max SendQ exceeded]
<tastycode>
it makes sense now that the memory is doubled, .. but that doesn’t get me to where i’m using less memory
<centrx>
tastycode, right, so you need to find more variables to nilify, maybe with changing some of the structure of your program
Earl2day has joined #ruby
<centrx>
After all, a class makes it easy to implement something like: free_everything { something_really_expensive }
thams has joined #ruby
goganchic has joined #ruby
<Earl2day>
hey there, is there a way to force the order in which bundle install installs things? It doesnt follow the order of gems written in the Gemfile
goganchic has quit [Max SendQ exceeded]
Tomme has joined #ruby
killerbunny_ has joined #ruby
<centrx>
tastycode, class instance gets constructed, then you nilify it along with everything inside it
<tastycode>
centrx: can you elaborate?
goganchic has joined #ruby
goganchic has quit [Max SendQ exceeded]
killerbunny_ has left #ruby [#ruby]
<tastycode>
just setting the instance to nil? wait.. because the mark and sweep follows references, if i kill the root reference.. does it kill all the children?
<centrx>
tastycode, A class encapsulates a set of instance variables, whose memory is cleared when the cl
marr has quit [Ping timeout: 255 seconds]
<tastycode>
the instance or the class?
<centrx>
I'm not sure what your setup is with roots and children
<centrx>
the instance
<tastycode>
right
Photism_ has quit [Quit: Leaving]
<centrx>
clearing references to an instance, will clear its memory
<centrx>
You could even have a class called MemoryDome
<centrx>
that includes everything you want to clear, but might not be good design
<tastycode>
yeah.. but in a deep object graph .. i would have to couple everything to memorydome
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fantnn has joined #ruby
Nieralyte has quit []
anildigital is now known as zz_anildigital
Caius has joined #ruby
peckermanzzz has joined #ruby
soulcake has joined #ruby
<centrx>
I don't know what your app really looks like
Caius has quit [Changing host]
soulcake has joined #ruby
Caius has joined #ruby
soulcake has quit [Changing host]
<centrx>
tastycode, if you nilify the root of a tree, and the tree is only referenced through the root, that would clear the entire tree
mikepack has joined #ruby
Mekkis has joined #ruby
yfeldblum has joined #ruby
<tastycode>
quick ? if i did Post.all.each {|p| p.something_expensive} would i need to explicitly set the p to nil to free it or is that implied by the block?
Wolland_ has quit []
fantnn has left #ruby [#ruby]
michaeldeol has joined #ruby
<centrx>
tastycode, implied by the block
JoshGlzBrk has joined #ruby
threesixes has quit [Remote host closed the connection]
<tastycode>
Let’s say i did Post.all.each {|p| ExceptionLibrary.rescue(“procesing post: #{p.id}”) { p.something_expensive }} , does the extra internal clojure create a stronger reference to “p” ?
<centrx>
no none of it persists past the block
sprihodko has joined #ruby
<banister>
tastycode lol @ "clojure" ;)
<tastycode>
sorry, muscle memory
abdulsattar has joined #ruby
<centrx>
but if you do: x = []; Post.all.each {|p| x << p }
<centrx>
suddenly all the p's are attached to x and depend on the life of x
jkline has joined #ruby
<tastycode>
well clearly, that would hold the reference outside
<centrx>
ok right
andrewjanssen has joined #ruby
michaeldeol has quit [Client Quit]
<tastycode>
Gaf , i gotta find this memory leak… thanks for your help
BadQuanta has joined #ruby
rdark has quit [Quit: leaving]
yfeldblum has quit [Ping timeout: 272 seconds]
timonv_ has joined #ruby
momomomomo has joined #ruby
jottr has quit [Ping timeout: 260 seconds]
troulouliou_dev has quit [Quit: Leaving]
zz_anildigital is now known as anildigital
fantnn has joined #ruby
ctp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
codeurge has quit [Quit: Sleep.]
wpp has joined #ruby
wpp has quit [Client Quit]
<centrx>
tastycode, Usually I find this happens when things are attached to a class, such as a caching system
<centrx>
tastycode, instances usually end up dying naturally
<tastycode>
say more?
bwilson has quit [Ping timeout: 240 seconds]
<tastycode>
like class variables?
mtncode has joined #ruby
<tastycode>
or effectively class variables?
Azulinho has quit [Ping timeout: 245 seconds]
britneywright has joined #ruby
agent_white has joined #ruby
nanoyak has quit [Read error: Connection reset by peer]
rgcouk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
anildigital is now known as zz_anildigital
zz_anildigital is now known as anildigital
tier_ has joined #ruby
mtncode has quit [Ping timeout: 272 seconds]
yacks has quit [Ping timeout: 272 seconds]
kalusn has joined #ruby
kalusn has quit [Remote host closed the connection]
bayed has quit [Quit: Connection closed for inactivity]
sparrovv has joined #ruby
ctp has joined #ruby
shackleford has joined #ruby
jkline has joined #ruby
rippa has quit [Read error: Connection reset by peer]
jimmyhoughjr has quit [Read error: Connection reset by peer]
jkline has quit [Client Quit]
rippa has joined #ruby
shackleford has quit [Remote host closed the connection]
<shevy>
centrx believes in the natural death of instances
ghr has joined #ruby
tier has quit [Ping timeout: 240 seconds]
shackleford has joined #ruby
<tastycode>
so, eh.. i do this quite a bit, but it should be equivalent to an instance: class SomeCommand; def self.run(*args); new(*args).run; end; end
Luyt has left #ruby [#ruby]
ctp has quit [Client Quit]
<Hanmac>
shevy do he also belives in the afterlife of instances? ;P
anildigital is now known as zz_anildigital
jeremy04 has joined #ruby
<havenwood>
Hanmac: tough luck when your afterlife is garbage collected
<toretore>
new euphemism for dying: he was garbage collected
<Hanmac>
xDD
sectionme has joined #ruby
<tastycode>
aww.. no one referred to him anymore.. so he just went away :(
shock_one_ has quit [Quit: Computer has gone to sleep.]
<Hanmac>
toretore: internal ruby objects can have a Zombie type, but that one is not visible outside
vinky_ has quit [Ping timeout: 250 seconds]
<toretore>
tastycode: soml :(
ghr has quit [Ping timeout: 258 seconds]
tylersmith has joined #ruby
timonv_ has quit [Remote host closed the connection]
hellangel7 has quit [Read error: Connection reset by peer]
rgcouk has joined #ruby
vinky has joined #ruby
easier has quit [Ping timeout: 246 seconds]
doodlehaus has quit [Remote host closed the connection]
zz_anildigital is now known as anildigital
sectionme has quit [Ping timeout: 245 seconds]
reset has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
keen__ has joined #ruby
<agent_white>
ZOMBIES
benlieb has joined #ruby
bruno- has joined #ruby
<agent_white>
Good afternoon folks. ^-^
<havenwood>
agent_white: if only they knew in zombie movies that you just need to kill the parent process...
sevvie has joined #ruby
<havenwood>
oh, zombies...
<havenwood>
they're back!!
<agent_white>
Hahah
tier_ has quit [Remote host closed the connection]
keen_ has quit [Ping timeout: 272 seconds]
formerlyLemons has joined #ruby
<formerlyLemons>
hello?
<agent_white>
I'm going to quote you on that one.
<formerlyLemons>
yes, it's working!
<agent_white>
No it is not. Test has failed. ABORTABORT
skammer has quit [Ping timeout: 260 seconds]
<formerlyLemons>
I've never had any success on running irc through my school's server, but I guess the chromebooks they purchased this year don't have the same security dialogue
jottr has joined #ruby
michaeldeol has joined #ruby
shosti has joined #ruby
<toretore>
no, they just have better surveillance capabilities. they *want* you to get through
<formerlyLemons>
in fact, for them to edit the security script they'd need an IT guy proficient in linux, which isn't going to happen, they're windows junkies
<formerlyLemons>
and possibly, yeah
<formerlyLemons>
but I'm going to take it as it is for now
Aaaal has quit [Quit: Aaaal]
<arrubin>
formerlyLemons: There are always web clients like IRCCloud.
shock_one_ has joined #ruby
<toretore>
so i shouldn't mention that you're an al-qaida secret agent probably
doodlehaus has joined #ruby
<formerlyLemons>
well, that there are. But for the most part, everything's blocked on this network
benlieb has quit [Read error: Connection reset by peer]
<formerlyLemons>
oh, and thanks jhass, I'll keep that in mind
mikepack has quit [Remote host closed the connection]
tier has joined #ruby
Earl2day has quit []
nanoyak has quit [Ping timeout: 240 seconds]
kedare has quit [Quit: WeeChat 0.4.1]
bricker`work has joined #ruby
<formerlyLemons>
I'm actually kind of surprised by what these Chromebooks can do with web apps. Of course, if I had one I'd install Ubuntu instantly on it.
abdulsattar has quit [Ping timeout: 246 seconds]
<toretore>
well that's probably why it works.. it probably uses an http <-> irc gateway
fschuindt has joined #ruby
<formerlyLemons>
it's just what I'm comfortable with. Chromium's a cleancut OS, I'll give it that, but it's usefulness cuts off at a certain point where you need to go offline. And yeah, I was guessing that.
<toretore>
though you can probably do straight tcp on it too i assume
<toretore>
http kinda sucks, so i wouldn't want to be stuck with that
<fschuindt>
Guys, I pushed a new gem version to RubyGems and yanked two old ones, but RubyGems.org is showing a even older version to download, what the?
asteve has joined #ruby
devoknievo_ has quit [Quit: Computer has gone to sleep.]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bricker`work>
fschuindt: I think you'd have to do them one by one with yank
<fschuindt>
bricker`work: ok
robustus has quit [Ping timeout: 250 seconds]
anaeem1_ has quit [Remote host closed the connection]
lemur has joined #ruby
fabrice31 has joined #ruby
doritostains has quit [Quit: doritostains]
anaeem1 has joined #ruby
kamil has joined #ruby
freerobby has quit [Quit: Leaving.]
shosti has quit [Ping timeout: 245 seconds]
havenwood has quit [Remote host closed the connection]
freerobby has joined #ruby
lemur has quit [Ping timeout: 258 seconds]
cmoneylulz has quit [Quit: Leaving]
carraroj has quit [Quit: Konversation terminated!]
robustus has joined #ruby
fabrice31 has quit [Ping timeout: 260 seconds]
alvaro_o has joined #ruby
cirn0 has joined #ruby
Mars___ has joined #ruby
baltazore has quit [Remote host closed the connection]
<fschuindt>
how to remove all the older versions of my gem? I have yanked all the pre release versions but they still in the versions list, I want to keep just the 1.0 version (current) https://rubygems.org/gems/rails-fix-permissions
chabier has joined #ruby
benlieb has quit [Read error: Connection reset by peer]
benlieb has joined #ruby
RichardLitt has joined #ruby
ep3static has joined #ruby
cndiv has quit [Ping timeout: 260 seconds]
havenwood has joined #ruby
hiyosi has quit [Ping timeout: 245 seconds]
jheg has quit [Quit: jheg]
cirn0 has quit [Ping timeout: 245 seconds]
cndiv has joined #ruby
Photism has joined #ruby
atmosx has joined #ruby
<centrx>
fschuindt, gem uninstall -v 1.2.3 as I recall
mikepack has joined #ruby
<fschuindt>
centrx: I want to remove them from RubyGems.org
<centrx>
fschuindt, gem help commands
ctp has joined #ruby
<pipework>
centrx: he means on rubygems.
<centrx>
tricky
wallerdev has quit [Quit: wallerdev]
noopq has joined #ruby
<atmosx>
[22:08:39] <atmosx> Hello
<atmosx>
[22:09:04] <atmosx> I'm having this check (which obviously doesn't work): redirect '/panel' if @res['categories'].nil? ... I keep getting this error undefined method `[]' for ArgumentError:Class
<atmosx>
tries empty? too... any other ideas?
<atmosx>
rescue ?
Ankhers has quit [Remote host closed the connection]
<centrx>
atmsSomehow your @res object is of class "ArgumentError"
<centrx>
atmosx, assuming that's the part of code it is referencing
benlieb has quit [Read error: Connection reset by peer]
jheg has joined #ruby
chabier has quit [Remote host closed the connection]
LiohAu has quit [Quit: LiohAu]
<jhass>
worse, it doesn't seem to be of the class ArgumentError, it seems to be the class object itself
tier_ has joined #ruby
chabier has joined #ruby
<centrx>
*gasp*
mikepack has quit [Ping timeout: 245 seconds]
paulfm_ has joined #ruby
mark_locklear has quit [Ping timeout: 260 seconds]
<atmosx>
jhass: that's what confuses me too. I don't know how to catch it except as generic exception and that's a no-no
<jhass>
atmosx: how and where does @res get set?
<atmosx>
prior line
<jhass>
sorry, didn't hack your computer yet to see your screen
<atmosx>
argh
<atmosx>
you couldn't anyway ;-)
Lewix has joined #ruby
<atmosx>
but there's an easier way
<jhass>
I just don't want to
<atmosx>
so you think you could?
tier has quit [Ping timeout: 260 seconds]
<pipework>
jhass: Come on, you don't get off by looking at people's crappy code on their computers without them knowing?
tier_ has quit [Remote host closed the connection]
chrishough has quit [Ping timeout: 246 seconds]
anaeem1_ has quit [Read error: Connection reset by peer]
chabier has joined #ruby
anaeem1 has joined #ruby
benzrf|offline is now known as benzrf
chabier_ has joined #ruby
<pipework>
centrx: Most languages do.
emmesswhy has joined #ruby
<pipework>
Ruby just feels as if it sucks less to do so, compared to other languages.
emmesswhy has quit [Remote host closed the connection]
<eam>
ruby kinda made oneliners a little crappy, but it's still nicer than say python
westinw is now known as puppynation
tcrypt is now known as tylersmith
marr has joined #ruby
AxonetBE has joined #ruby
<centrx>
Ruby is the best at pristine self-documenting code
baltazore has joined #ruby
Mars___ has quit [Remote host closed the connection]
chabier has quit [Ping timeout: 260 seconds]
<centrx>
I.assert Ruby.is_a?(GoodThing)
narph has quit [Quit: Connection closed for inactivity]
Mars___ has joined #ruby
Stalkr_ has quit [Quit: Leaving...]
puppynation has quit [Remote host closed the connection]
chabier_ has quit [Ping timeout: 245 seconds]
joelsmith has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<centrx>
developer.cries if language.is_not_a?(Ruby)
freerobby has quit [Quit: Leaving.]
<benzrf>
centrx: bulllshit!
<benzrf>
haskell causes non tears
<benzrf>
*non
<benzrf>
...
<benzrf>
*no
<centrx>
RubyChannel.can help(many) because Ruby.is_so?(Great)
aapole_ has quit [Ping timeout: 240 seconds]
<lolmaus>
Is there a shortcut for `['foo', 'bar'].concat(['bar', 'baz']).uniq` ? I thougt of .merge but it doesn't exist for Arrays/Enums :(
<centrx>
lolmaus, a | b
treehug88 has quit [Ping timeout: 260 seconds]
n_blownapart has joined #ruby
<shevy>
jhass well I am not sure... some people say they have the best ideas while jogging/running, for instance. I am also sure designers tend to think in different ways... a friend studied industrial design, and when he looks at an old painting, he can see visual details I can't see because my brain just does not focus on them in that way (my brain usually dubs things into boring, and interesting, and when somethi
<shevy>
ng is boring, my attention span drops)
bruno- has joined #ruby
<shevy>
atmosx yeah, ruby can chuck a lot information into a few lines of code
<centrx>
lolmaus, | is "union"
<pipework>
lolmaus: look up union arrays in ruby
baltazore has quit [Remote host closed the connection]
<lolmaus>
centrx: pipework: thx. Where is union defined?
baltazore has joined #ruby
<shevy>
eam do you really use one-liners in ruby?
<lolmaus>
Can't find it in docs for Array and Enumerable
aapole has joined #ruby
Soda has joined #ruby
shock_one_ has quit [Quit: Computer has gone to sleep.]
<ericwood>
I seriously doubt 725 people have downloaded my roomba gem, though
Phrogz_ is now known as Phrogz
failshel_ has joined #ruby
lemur has quit [Ping timeout: 260 seconds]
failshell has quit [Read error: Connection reset by peer]
benlieb has joined #ruby
AlSquire has quit [Quit: This computer has gone to sleep]
britneywright has quit [Client Quit]
<shevy>
ericwood well some bots download too
<ericwood>
robots
<Phrogz>
I'm torn on the syntax for a DSL/API that I'm writing, and I'd appreciate any feedback. See this gist for a short background on the problem, and a few syntax-colored options. TIA! https://gist.github.com/Phrogz/f4538280acb3e051dc8f
<ericwood>
:o
mengu has joined #ruby
<Phrogz>
ROBOTS DOWNLOADING SOFTWARE ABOUT ROBOTS
<shevy>
fschuindt my estimate is that about 80% of most downloads are bots or automated when you hit the range 5000-25000
<shevy>
well I have found that publishing even in small little steps is better than
<shevy>
publishing late
<waxjar>
you could use opacity_for(1) instead of opacity[1] or something
<shevy>
or spending hours improving the documentation
chrishough has joined #ruby
klmlfl_ has joined #ruby
chrishough has quit [Client Quit]
<eam>
I wrote ruby bindings for mdbm, then I found someone already made a gem called "mdbm" :(
<eam>
name paralysis => perish
vanila has left #ruby ["Leaving"]
chrishough has joined #ruby
_lexjm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<waxjar>
so it'd be clear(er) what kind of object you expect / don't have to explicitly test for it
Tricon has joined #ruby
<suy>
Noobie question: In a course, it warns of "a gotcha of using accessors": http://pastie.org/9564661 Why self.destination instead of @destination?
stephanepaul has quit [Ping timeout: 272 seconds]
<Phrogz>
waxjar: Interesting. that's a fourth option. Thanks for the input.
stephanepaul has joined #ruby
klmlfl has quit [Ping timeout: 240 seconds]
<Phrogz>
suy: You could use @destination in this case. However, if you later replace your simple attr_accessor with a real method, then @destination= will bypass that code.
<wallerdev>
i tend to never use accessors inside of classes
<Phrogz>
e.g. def destination=( new_dest ); raise "OH NO" if new_dest==:moon; @destination=new_dest; end
<wallerdev>
id just do @destination =
arup_r has quit [Quit: Leaving.]
BadQuanta has quit [Ping timeout: 260 seconds]
devoknievo_ has joined #ruby
<wallerdev>
but one goes through the accessor, one doesnt
<shevy>
wallerdev even for simple accessors?
<shevy>
def foo; @foo; end
<Phrogz>
wallerdev: I myself vacillate on this. The purity side smells like I ought to use the method. The premature optimization side wants the direct variable assignment. Then the purity side says "Yes, but what if you want to refactor the method?" Then the pragmatic side says, "Well, isn't that exactly what refactoring is all about?"
<wallerdev>
huh?
<shevy>
well attr_acessor is attr_reader and attr_writer combined in one
aspiers has joined #ruby
<shevy>
suy the first has higher priority and means to assign to a local variable
<wallerdev>
yeah idk, in my experience if i ever want to change what a getter/setter does its almost always just for the outside the class things accessing it
kiwnix has joined #ruby
mofai has quit []
gccostab_ has joined #ruby
<wallerdev>
if you use it everywhere and want to change it for only things outside the class you can't really do that as easily
<suy>
Phrogz: ah, ok, I think I see the point then. @foo is accessing directly the variable, and self.foo is calling a method
omosoj has joined #ruby
havenwood has quit [Remote host closed the connection]
<wallerdev>
understanding self.foo = blah is important though because of stuff like rails
<wallerdev>
where when you set a model property you need to go through the setter or it wont trigger a change in rails and wont save to the db when you call save
<waxjar>
lately i sort of always use the accessor unless it's a "private" instance variable (one i don't expose)
havenwood has joined #ruby
<Phrogz>
suy: correct
<jhass>
suy: yes, the method foo= to be precise (the = is part of the name). As you can see there's no clear tendency to what is preferred ;)
fold has joined #ruby
shock_one_ has joined #ruby
havenwood has quit [Remote host closed the connection]
<suy>
Well then. Thank you all. :)
nanoyak has joined #ruby
gccostabr has quit [Ping timeout: 272 seconds]
carraroj has joined #ruby
<pmarreck>
Anyone know of some service online that will let me cryptographically sign any document that I can then send to someone and they can verify that my identity signed it?
<wallerdev>
do you have a certificate from a signing authority?
<wallerdev>
or are you going to send them a self signed certificate
<pmarreck>
that is a very good question. If this service exists, it would be able to do either
_lexjm has joined #ruby
<pmarreck>
Ideally it would be trustless somehow
slester has quit [Ping timeout: 245 seconds]
<pmarreck>
Signing authorities of course imply trust
<pmarreck>
wallerdev: ^
<wallerdev>
probably a service that does it, ive just used commandline tools though
timonv_ has quit [Remote host closed the connection]
shevy has quit [Read error: Connection reset by peer]
<wallerdev>
that way it can be part of the build process
rimenes has joined #ruby
<waxjar>
is that something gpg does?
carraroj has quit [Ping timeout: 272 seconds]
freelusion has joined #ruby
b00stfr3ak has quit [Ping timeout: 272 seconds]
<Phrogz>
PGP?
<Phrogz>
gpg == "gretty pood grivacy"?
<canton7>
gnu privacy guard, pretty good privacy
<wallerdev>
ive only done it on mac & windows so not sure
<Phrogz>
ahhh :)
<canton7>
'cos, you know, it's clearer if similar programs have confusingly similar acronyms
brownfox has joined #ruby
klmlfl_ has quit []
<Phrogz>
Ahck! I conflated Ruby and JS, and thought that there was a way to make a full-fledged object out of immediate values (e.g. 42) to be able to extend them. Not the case in Ruby, neh?
<centrx>
Phrogz, not sure what you mean
<centrx>
Phrogz, You can extend Fixnum/Numeric
<centrx>
Phrogz, or you can define a class that has a @value
<Phrogz>
centrx: I can monkeypatch them. I can't extend instances, e.g. x = 42; x.extend(MyModule)
<pmarreck>
wallerdev: yeah I want something that Joe Clueless and Mary Luddite can use between each other on the Internet. and yes waxjar, gpg will do that, but not everyone is technical
Spami_ has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
freelusion has quit [Client Quit]
timonv_ has joined #ruby
bMalum has quit [Ping timeout: 255 seconds]
<wallerdev>
well make something pmarreck :p
<pmarreck>
wallerdev: Yeah no kidding, I'm considering!
fschuindt has quit [Quit: WeeChat 0.4.3]
<Phrogz>
centrx: I'm hesitant to make a delegation class, because I assume I will fail to make it behave appropriately under all circumstances. Maybe that's cynical.
<pmarreck>
Phrogz: Interestingly, I THINK you can attach an attribute to an integer
Tomme has joined #ruby
<centrx>
Phrogz, class SpecialNumber < Fixnum; include MyModule; end
<centrx>
Phrogz, anyway it sounds like bad practice to me, it's either a number or its not, and you either want to add methods to numbers or not (Fixnum.extend(MyModule))
Spami has quit [Ping timeout: 245 seconds]
<Phrogz>
centrx: It probably is a bad idea; too much magic.
narph has joined #ruby
Mars___ has quit [Remote host closed the connection]
Spami has joined #ruby
Mars has joined #ruby
<centrx>
Phrogz, The delegation class can use method_missing to pass every method called on it to the composed @value inside
Mars is now known as Guest52942
<Phrogz>
Delegator, yes.
dumbdove has joined #ruby
brownfox has quit [Quit: leaving]
dumbdove has quit [Client Quit]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
dumbdove has joined #ruby
kireevco has joined #ruby
<Phrogz>
Delegator is certainly much easier than hand-rolling (which is not as easy as just method_missing).
brownfox has joined #ruby
awc737 has joined #ruby
skip_freely has quit [Ping timeout: 245 seconds]
shock_one_ has quit [Quit: Computer has gone to sleep.]
Guest52942 has quit [Ping timeout: 255 seconds]
<dumbdove>
Hey all, I'm kind of lost here and I lack the google-fu to find a proper answer.
duncannz has joined #ruby
<dumbdove>
I want to execute a method based on a user input string
ht__th has quit [Remote host closed the connection]
thams has joined #ruby
<slash_nick>
dumbdove: look at #instance_eval ...
<centrx>
dumbdove, #1 Make sure to validate the user input string first, against a list of valid methods they are allowed to call
<slash_nick>
and ^
18VAAZA7K has quit [Ping timeout: 240 seconds]
<centrx>
dumbdove, object.send(user_input_string)
16WAAJOWC has quit [Ping timeout: 272 seconds]
<dumbdove>
I know about that one, but it seems a little clumsy
jottr_ has joined #ruby
<dumbdove>
Isn't it possible to do something like a hash of 'commands' to functions?
<brownfox>
cant you just compare the string input against a variable or an array of variables and the rest is elsif?
<centrx>
dumbdove, That's certainly doable but it seems more clumsy than #send
duggiefresh has quit []
fabrice31 has joined #ruby
<centrx>
send is really just four extra characters than calling the method directly
<dumbdove>
Hmm, you're right.
jottr has quit [Ping timeout: 260 seconds]
<dumbdove>
I'll do that.
<dumbdove>
thanks a lot!
<centrx>
dumbdove, dynamic programming/metaprogramming is like this
krisquigley has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
<centrx>
dumbdove, In Object-oriented/Smalltalk/Ruby, each method call is a message being "sent" to the "receiver", the object it is called upon
<centrx>
dumbdove, so basically receiver.method is just the same as receiver.send(method)
krisquigley has joined #ruby
ooloo has quit [Remote host closed the connection]
milkohol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<centrx>
dumbdove, what brownfox said above is a good secure solution, as you have to validate the commands from the user anyway, so it's only slightly less succinct compared to using send()
<Phrogz>
And lets you do crazy things like define foo= methods that take two arguments, and call them in a completely useless way :)
jpopo23 has joined #ruby
mikeg has quit [Remote host closed the connection]
<Phrogz>
>> def foo=( a, b=nil ); p [a,b]; end; self.foo = 42; self.send(:foo=,42,17)
<dumbdove>
object_methods(false), if I recall correctly
<dumbdove>
So, not including inherited methods
Smujo has joined #ruby
Smujo_ has joined #ruby
<Phrogz>
Right, false is to ignore inherited.
aclearman037 has quit []
milkohol has joined #ruby
jaygen_ has joined #ruby
ELLIOTTCABLE_ is now known as ELLIOTTCABLE
ppinto has quit [Quit: ppinto]
jaygen has quit [Ping timeout: 272 seconds]
sgray10 has quit [Ping timeout: 260 seconds]
Deele has quit [Ping timeout: 260 seconds]
fsapo has quit [Remote host closed the connection]
timgauthier has joined #ruby
timgauthier has quit [Client Quit]
hiyosi has joined #ruby
timgauthier has joined #ruby
timgauthier has quit [Max SendQ exceeded]
timgauthier has joined #ruby
<jhass>
to nitpick, obj.foo is equal to obj.public_send(:foo)
qwyeth has quit [Remote host closed the connection]
fold has quit [Ping timeout: 272 seconds]
<slash_nick>
jhass: whereas obj.send(:foo) could invoke a private method #foo ?
jheg has joined #ruby
<jhass>
yes
lemur has joined #ruby
shevy has joined #ruby
<slash_nick>
that's more than just nitpicking :)
timonv_ has joined #ruby
<slash_nick>
I suppose that if the list of methods he's checking user input against does not include private methods, then it wouldn't bite him... but i'd want to use #public_send in case
b00stfr3ak has joined #ruby
milkohol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bmurt has quit []
spastorino has quit [Quit: Connection closed for inactivity]
jeremy04 has quit [Remote host closed the connection]
<jhass>
I default to #public_send in fact
<jhass>
for any usage
<slash_nick>
dumbdove: see that bit from jhass about using #public_send ?
<jhass>
#send is only for monkey patching nowadays
<slash_nick>
jhass: i typically use it for invoking private methods lol
<shevy>
I use it to invoke methods with ' ' as part of their name
<jhass>
the need to invoke private methods dynamically is surprisingly rare for me
wjimenez5271 has joined #ruby
<shevy>
but you can invoke public methods with .send or?
ghr has quit [Ping timeout: 245 seconds]
kireevco has quit [Quit: Leaving.]
<dumbdove>
Indeed, shevy
lemur has quit [Ping timeout: 260 seconds]
<slash_nick>
jhass: usually to set up expectations in test.. say i have a public method that calls `some_obj.new(some_obj_arguments)`, I will likely have a private method #some_obj_arguments... in the test i use the private method to set up the expected arguments for my mocks
ctp has quit [Read error: Connection reset by peer]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
krisquigley has joined #ruby
lukevinc has quit [Remote host closed the connection]
ctp has joined #ruby
<philosophically>
total fresh noob looking for some help with summing values within an array, these arrays are json responses, any help is appreciated! thank you! http://pastebin.com/1D7we1x7
icarus has quit [Remote host closed the connection]
kiwnix has quit [Quit: Leaving]
jeremy04 has quit [Ping timeout: 260 seconds]
n_blownapart has joined #ruby
rgcouk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sepp2k has joined #ruby
cougarten has joined #ruby
linojon has quit [Quit: linojon]
andrewlio has quit [Quit: Leaving.]
aspiers has quit [Read error: Connection reset by peer]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
narcan has quit [Ping timeout: 260 seconds]
momomomomo has quit [Quit: momomomomo]
snath has quit [Ping timeout: 245 seconds]
toretore has quit [Quit: Leaving]
one has joined #ruby
mary5030 has quit [Remote host closed the connection]
<one>
hi, does anyone know if i can run a rails app, then open a console and interact with the running app?
cndiv has quit [Quit: WeeChat 0.4.3]
fantazo has quit [Quit: Verlassend]
linojon has joined #ruby
cndiv has joined #ruby
<one>
hi, does anyone know if i can run a rails app, then open a console and interact with the running app?
northfurr has joined #ruby
<Phrogz>
one: a) #rubyonrails b) Not really, I think, unless you mean using Pry.
damada has joined #ruby
<one>
thanks
<Phrogz>
In other words, without a breakpoint to tell it where/when to interact, what sort of interaction would you imagine? get '/my/route' ?
oleo is now known as Guest4552
oleo__ has joined #ruby
<one>
i want to change a global variable
kriskropd has quit [Ping timeout: 250 seconds]
nettoweb has joined #ruby
<one>
without having to restart, e.g. if it's a production environment
nettoweb has quit [Max SendQ exceeded]
stephanepaul has quit [Quit: stephanepaul]
blackmesa has joined #ruby
kriskropd has joined #ruby
endash has quit [Quit: endash]
jobewan has quit [Quit: Leaving]
Guest4552 has quit [Ping timeout: 260 seconds]
kireevco has quit [Quit: Leaving.]
workmad3 has joined #ruby
troyready has joined #ruby
fabrice31 has joined #ruby
blackmes1 has quit [Ping timeout: 260 seconds]
sinkensabe has joined #ruby
nettoweb has joined #ruby
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
nettoweb has quit [Max SendQ exceeded]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
g0bl1n has joined #ruby
nettoweb has joined #ruby
Takle has joined #ruby
nettoweb has quit [Max SendQ exceeded]
omosoj has joined #ruby
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
nettoweb has joined #ruby
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
djstorm has quit [Ping timeout: 246 seconds]
<wasamasa>
sounds like a case for lisp
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
charliesome has joined #ruby
kireevco has joined #ruby
Poky has quit [Ping timeout: 272 seconds]
philosophically has quit [Quit: philosophically]
kireevco has quit [Max SendQ exceeded]
fabrice31 has quit [Ping timeout: 255 seconds]
chipotle has joined #ruby
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
zettam has quit [Read error: Connection reset by peer]
cougarten has quit [Ping timeout: 258 seconds]
kireevco has joined #ruby
zettam has joined #ruby
sparrovv has quit [Remote host closed the connection]
sinkensabe has quit [Ping timeout: 258 seconds]
sparrovv has joined #ruby
cougarten has joined #ruby
dda has joined #ruby
stephanepaul has joined #ruby
ramfjord has quit [Ping timeout: 246 seconds]
damada has left #ruby [#ruby]
fantnn has quit [Quit: Leaving.]
awc737 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Tricon has quit [Quit: Leaving...]
chabier has joined #ruby
Rhainur1 has left #ruby [#ruby]
lkba has joined #ruby
sparrovv has quit [Ping timeout: 260 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chabie___ has joined #ruby
freerobby has quit [Quit: Leaving.]
awc737 has joined #ruby
chabi____ has joined #ruby
sambao21 has quit [Ping timeout: 255 seconds]
<Phrogz>
one: Pretty sure that ain't going to be possible. Suggest you put the variable in a DB (or, ick, file) to reload periodically (or when a custom route is calleD)
Es0teric has joined #ruby
renderfu_ has joined #ruby
chipotle_ has joined #ruby
krisquigley has joined #ruby
chabier has quit [Ping timeout: 272 seconds]
nettoweb has joined #ruby
chab_____ has joined #ruby
freerobby has joined #ruby
nettoweb has quit [Max SendQ exceeded]
<Phrogz>
Man, sometimes I wish that Ruby had both 'undefined' and 'nil' so that I could write def foo( a, b=undefined ) instead of def foo( a, b=:DEARGODDONOTPASSTHISVALUE ) to differentiate when the user passes explicit `nil` vs no second param.
nettoweb has joined #ruby
nettoweb has quit [Max SendQ exceeded]
<Phrogz>
There's no .arity_of_invocation is there?
lkba has quit [Ping timeout: 260 seconds]
jheg has quit [Quit: jheg]
chabier has joined #ruby
<Phrogz>
one: Or environment variable, even.
Guest69148 has quit []
Spami_ has quit [Quit: This computer has gone to sleep]
dziga has joined #ruby
chipotle has quit [Ping timeout: 272 seconds]
chabier_ has joined #ruby
tlarevo has quit [Remote host closed the connection]
chabie___ has quit [Ping timeout: 272 seconds]
<Phrogz>
I suppose what I'm really wanting in this case is method invocation by signature.
crdpink has joined #ruby
renderful has quit [Ping timeout: 255 seconds]
tlarevo has joined #ruby
<jhass>
Phrogz: well, you could do *args and deconstruct that in the first lines
nettoweb has joined #ruby
chabi____ has quit [Ping timeout: 260 seconds]
chabier__ has joined #ruby
fnordperfect has quit [Read error: Connection reset by peer]
<Phrogz>
jhass: Good point. Makes the rdoc signature ugly, but then it's ugly my way, too.
nettoweb has quit [Max SendQ exceeded]
iceden has quit [Read error: Connection reset by peer]
krisquigley has quit [Ping timeout: 260 seconds]
mikeg has joined #ruby
<jhass>
what's your concrete case? maybe you want to write two methods actually
<one>
Phrogz: it is an environment variable
chab_____ has quit [Ping timeout: 272 seconds]
nettoweb has joined #ruby
<one>
its in config/environments/production.rb but i cant update the variable in the config without restarting the server
<Phrogz>
jhass: Supporting foo['bar'] = 42 and foo['bar',3] = 17 via def []=( attr, optional_index, new_value )
nettoweb has quit [Max SendQ exceeded]
stunder has quit [Remote host closed the connection]
<Phrogz>
one: Can't you call a route in your app that does the work for you?
chabier has quit [Ping timeout: 245 seconds]
<Phrogz>
Hrm, does Ruby 2 support def foo(a,b=nil,c) ?
* Phrogz
tests
<jhass>
yes
nettoweb has joined #ruby
<Phrogz>
Well, there you go then. :) I'm stuck in 1.8 thinking :p
<jhass>
optional arguments can be anywhere, they just need to be together
<Phrogz>
Thanks for pursuing! :)
chabier_ has quit [Ping timeout: 245 seconds]
<one>
one of the variables in config is pointing to a server, which changed because of a load balancer issue, so the variable needs to be updated to the new server address, but dont want to restart the whole app to do that
nettoweb_ has joined #ruby
nettoweb_ has quit [Max SendQ exceeded]
charliesome has quit [Quit: zzz]
davasaurous has joined #ruby
nettoweb_ has joined #ruby
<Phrogz>
one: Right. So update your environment variable, then HTTP get (or post, or whatever) "/reloadserver"
<jhass>
one: if your app isn't prepared to update an environment variable from the inside there's no way to do that
northfurr has quit [Quit: northfurr]
<one>
"/reloadserver".... is that a rails thing that will reload the config? does it restart the server/kick out active sessions?
dda has quit [Remote host closed the connection]
davedev2_ has joined #ruby
lemur has joined #ruby
timonv_ has joined #ruby
dda has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
stephanepaul has quit [Quit: stephanepaul]
davedev24_ has quit [Ping timeout: 260 seconds]
nettoweb has quit [Ping timeout: 260 seconds]
milkohol has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Phrogz>
one: No, I am suggesting that you write a route that executes Ruby code to do whatever you were going to do via a console.
<pipework>
Why not just restart the process?
<Phrogz>
Stop asking the right question.
<pipework>
Phrogz: Stop asking the left ones.
freerobby has quit [Quit: Leaving.]
sheepman has quit [Ping timeout: 250 seconds]
lemur has quit [Ping timeout: 260 seconds]
InhalingPixels has quit []
dda has quit [Ping timeout: 260 seconds]
<multi_io>
in rdoc, what's the preferred markup format these days? rdoc, rd, markdown?
<pipework>
when I use rdoc, I tend to use rdoc.
j_mcnally has joined #ruby
timonv_ has quit [Ping timeout: 258 seconds]
<multi_io>
I have an old rcoc file with headlines formatted like == this, and rake's rdoc tasks processes these correctly, but I can't find a rdoc command line option that makes those work.
mikepack has quit [Remote host closed the connection]
emmesswhy has joined #ruby
<multi_io>
apparently header like ## this are more common these days?
Spami_ has joined #ruby
chabier__ has quit [Remote host closed the connection]
<multi_io>
## headers are markdown, apparently
<multi_io>
so what's == headers?
<multi_io>
rdoc?
codeurge has quit [Quit: Sleep.]
kireevco has quit [Quit: Leaving.]
GriffinHeart has joined #ruby
<shevy>
dunno
<shevy>
I was too lazy to cater to it
<shevy>
it ran through my .rb files and produced shit
jottr_ has quit [Ping timeout: 246 seconds]
<Lewix>
Does anyone here know how to play chess
<shevy>
markdown is much nicer to handle
<multi_io>
you mean cater to rdoc as a whole?
<shevy>
multi_io, yeah. for instance, I use such things:
<shevy>
did you add that yourself with your own code?
<Phrogz>
Aye.
linojon has quit [Quit: linojon]
chabier has quit [Remote host closed the connection]
gccostabr has quit [Quit: ZZZzzz…]
<pipework>
I use rdoc. :(
<multi_io>
Phrogz: so how do you generate API documentation for your projects, if not with rdoc?
n_blownapart has quit []
<Phrogz>
multi_io: Manually in Markdown, and then let RubyGems host whatever manual RDoc it generates.
omosoj has quit [Ping timeout: 260 seconds]
dda has joined #ruby
<bricker`work>
I am concerned that when I curl my local server and set I18n.locale=, then curl again and check I18n.locale, it is the same as what I just set in the previous request. This is using passenger. Shouldn't Thread.current prevent that from happening?
ndrei has quit [Ping timeout: 240 seconds]
threesixes has joined #ruby
<multi_io>
ah, that was going to be my next question: gems and rdoc
<multi_io>
so the generated docs aren't usually written to the gem?
britneywright has joined #ruby
shackleford has quit [Remote host closed the connection]
<workmad3>
bricker`work: unless passenger is using a thread pool with selection algorithm that always chooses the same thread when a single request comes in at a time...
gccostabr has joined #ruby
<workmad3>
bricker`work: which sounds quite likely from your observed behaviour ;)
marr has quit [Ping timeout: 260 seconds]
lkba has joined #ruby
<multi_io>
Phrogz: by "let RubyGems host" you mean rubygems.org?
a has joined #ruby
Rollabunna has joined #ruby
a is now known as Guest33694
ramfjord has joined #ruby
britneywright has quit [Client Quit]
thumpba has quit [Remote host closed the connection]
Squarepy has quit [Quit: Leaving]
Lewix has quit [Remote host closed the connection]
<Phrogz>
multi_io: Aye. Though, come to think of it, I don't have any real Ruby gems out there whose API is interesting to document. I have Docubot, but that's all command-line documentation.
charliesome has quit [Quit: zzz]
phoo1234567 has quit [Quit: Leaving]
<volty>
you should try to rewrite yourself :) <== <shevy> I tend to rewrite projects from scratch way too often
icebourg has quit []
cpruitt has quit [Quit: cpruitt]
<pipework>
shevy: rewrite yourself to return -1 when comparing shevy <=> shevy
mozzarella has quit [Quit: WeeChat 0.4.3]
Rollabunna has quit [Ping timeout: 258 seconds]
mtncode has joined #ruby
ramfjord has quit [Ping timeout: 245 seconds]
diegoviola has quit [Quit: WeeChat 1.0]
linojon has joined #ruby
mozzarella has joined #ruby
Phrogz has quit [Quit: Hometime]
<volty>
i have to share my knowledge, i am studying haskell. The language is pretty intriguing. But today I discovered that you cannot have the same names in different data defs (records, struct, class in ruby). So if somebody asks you for an advice, advice him to study it in free time and not even try it for production (unless something limited in complexity deriving from many different kinds of data)
<zenspider>
haskell has a single namespace (a lisp1)? that's your problem with it?
<zenspider>
there's so many better reasons to not like haskell...
<pipework>
zenspider: name one?
* pipework
actually has no clue why one should dislike the language itself
<volty>
shevy: because they do not tell you that to learn monads you have to master very well the type system (and the wikipedia entry is the best to start with)
dda has quit [Remote host closed the connection]
mary5030 has quit [Ping timeout: 258 seconds]
<volty>
because at the current stage it is a toy language --- for the trendy fibonacci felt in love
omosoj has joined #ruby
<zenspider>
readability/complexity of syntax would be a big one for me. a personal bias would be the typing, tho haskell's isn't half as bad as some. le monad. etc.
InhalingPixels has joined #ruby
bruno- has quit [Ping timeout: 245 seconds]
skammer has quit [Ping timeout: 260 seconds]
<volty>
you ask them how to handle staff (functions, matching , etc) with Point ( x :: Float, y :: Float) and they answer you that it is haskellish to use just a tupple ( (x,y) )
<volty>
it means that those people have no idea about the complexity of a bigger project
startupality has quit [Quit: startupality]
<pipework>
Isn't every array a tuple in haskell?
sambao21 has joined #ruby
mpistone has quit []
startupality has joined #ruby
<volty>
they are different types
jottr_ has quit [Ping timeout: 245 seconds]
<pipework>
I guess it's just the purpose, where tuples have structure and lists are just ordered elements.
<volty>
tricky at first, nice, elegant, complex, useful learning (BUT NON AT THE EXPENSE OF ANOTHER, PRODUCTIVE, LANGUAGE)
chrisja has quit [Quit: Lost terminal]
<volty>
the lists aren't polymorphic
<multi_io>
does Haskell have structs and classes in the Ruby sense at all? I always thought they're just, like, type classes or something.
Cecen_ has joined #ruby
<multi_io>
they don't open up a new namespace
Es0teric has joined #ruby
<volty>
something like «data Point = Point { x :: Float, y ::Float )» and then p = Point 3 4, then to get x you have to «x p» (but as I said, you cannot have other defs with x as a member)
sambao21 has quit [Ping timeout: 245 seconds]
Es0teric has quit [Client Quit]
Cecen has quit [Ping timeout: 258 seconds]
<volty>
the productiveness of ruby is unmatchable
havenwood has joined #ruby
<volty>
but they are now fixing that name clashing and, !!!!!, going to use p.x (to get that x) :)
britneywright has joined #ruby
Wolland has joined #ruby
<shevy>
is p.x a monad
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
krisquigley has joined #ruby
dapz has joined #ruby
b00stfr3ak has quit [Ping timeout: 272 seconds]
memph1s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<volty>
you probably mean p (p.x will be the function «x p» - get out x of p -- read accessor in ruby) . anyway no, simple data, to be a monad it has to satisfy other things
gccostabr has quit [Quit: ZZZzzz…]
wink_ndge has joined #ruby
<shevy>
what other things
<shevy>
is this like a satanic ritual
<shevy>
sacrifice one goat and de-virgin one virgin
stephanepaul has joined #ruby
stephanepaul has quit [Client Quit]
nanoyak has quit [Quit: Computer has gone to sleep.]
jhass is now known as jhass|off
krisquigley has quit [Ping timeout: 260 seconds]
<volty>
shevy: i bookmarked somewhere nice explanation, i'll paste you the link one of next days (would be too much for a ruby chan :) )
one has left #ruby [#ruby]
<volty>
now going to sleep
volty has left #ruby ["Konversation terminated!"]
thumpba has joined #ruby
pu22l3r has joined #ruby
<multi_io>
so, how does gem/ri process documentation file in gems?
<multi_io>
.ms is treated differently from .rdoc?
<multi_io>
*.md
asteve has joined #ruby
<multi_io>
I see that e.g. rails/activerecord comes with .rdoc documentation files containing == headers, while other gems come with .md documentation files containing ## headers