apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p327: http://ruby-lang.org (ruby-2.0.0-preview2) || Paste >3 lines of text on http://gist.github.com
megharsh has joined #ruby
kiyoura has joined #ruby
Guest40262 has quit [Quit: Leaving]
phipes has quit [Quit: phipes]
ryanf has joined #ruby
mjolk2 has joined #ruby
jamescarr has quit [Quit: jamescarr]
LyonJT_ has joined #ruby
horofox has joined #ruby
DaZ has quit [Read error: Operation timed out]
Villadelfia has quit [Read error: Operation timed out]
Villadelfia has joined #ruby
Villadelfia has quit [Changing host]
Villadelfia has joined #ruby
F1skr has quit [Quit: WeeChat 0.3.9.2]
statarb3 has quit [Quit: Leaving]
LyonJT has quit [Ping timeout: 245 seconds]
pavilionXP has quit [Read error: Connection reset by peer]
pavilionXP has joined #ruby
<reactormonk> shevy, elisp is fine - and you get vim with evil ;-)
zastern has quit [Remote host closed the connection]
medik has joined #ruby
medik has quit [Excess Flood]
medik has joined #ruby
medik has quit [Excess Flood]
dmiller has joined #ruby
Guest41653 has joined #ruby
three18ti has quit [Quit: Hello.]
emergion has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
tufflax has joined #ruby
three18ti has joined #ruby
jlast has joined #ruby
matti has quit [Quit: Oh dear...]
dmiller has quit [Ping timeout: 265 seconds]
Kuifje has quit [Ping timeout: 265 seconds]
emergion has joined #ruby
<tufflax> Hey, I'm looking for a Ruby that uses msvcrt-ruby19.dll, because my Vim is compiled for a ruby that has msvcrt-ruby19.dll. But all I can find is msvcrt-ruby191.dll and msvcrt-ruby190.dll. Any ideas?
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
LouisGB has joined #ruby
DaZ has joined #ruby
froy has joined #ruby
wargasm has quit [Read error: Connection reset by peer]
skaczor has quit [Remote host closed the connection]
jlast has quit [Ping timeout: 240 seconds]
alexspeller has quit [Remote host closed the connection]
baphled has joined #ruby
_whitelogger has joined #ruby
emergion has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
wuzzzzaah has joined #ruby
emergion has joined #ruby
hotovson has quit [Remote host closed the connection]
daniel_- has quit [Quit: WeeChat 0.3.9.2]
nathancahill has quit [Quit: nathancahill]
mercwithamouth has joined #ruby
ehm_may has joined #ruby
jrist-dogwalk is now known as jrist
AwayLex is now known as Quadlex
Banistergalaxy has quit [Ping timeout: 245 seconds]
dankest|away is now known as dankest
havenn has joined #ruby
hotovson has joined #ruby
miskander has joined #ruby
<JohnTeddy> /usr/bin/ruby1.9.1 -S rspec robot_spec.rb --format documentation --color failed
<JohnTeddy> I'm not sure why I'm getting this error.
havenn has quit [Remote host closed the connection]
ner0x has joined #ruby
havenn has joined #ruby
hotovson has quit [Ping timeout: 244 seconds]
DatumDrop has joined #ruby
Squarepy has quit [Remote host closed the connection]
moshee has quit [Ping timeout: 264 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
<maqr> bundler is prompting me for my root password, but i'm not sure why... i have "--user-install" in my ~/.gemrc, but it seems to be ignoring it... any idea why?
Banistergalaxy has joined #ruby
<shevy> tufflax seems like an old 1.9 ruby for windows
<shevy> tufflax perhaps you could copy msvcrt-ruby190.dll to msvcrt-ruby19.dll it could work
<shevy> there was a ruby 1.9.0 version
<shevy> but a ruby 1.9 ? without .0 append? hmmmm
<tufflax> shevy: Yeah I saw that 1.9.0 had 190.dll, but it didn't work when I changed it
<tufflax> renamed, that is
emocakes has quit [Quit: emocakes]
<havenn> tufflax: Can you install Ruby 1.9.3?
<tufflax> havenn: I can, but I don't think it will work with my vim (but maybe), why?
<havenn> Ruby 1.9 before 1.9.2 is broken!
<havenn> 1.9.3 is current and stable, 1.9.2 is stable, 1.9.1 is not for using. :P
skcin7 has quit []
punkrawkR^Home has quit [Read error: Connection reset by peer]
<aedorn> 1.9.3 p362 is a bit broken too, though
<tufflax> hm ok but i looked in my gvim.exe and there is says specifically that it looks for msvcrt-ruby19.dll
mjolk has joined #ruby
<tufflax> I only want a ruby that works with my gvim
<havenn> tufflax: I'd think 1.9.3 should work better not worse than 1.9.1 but dunno, haven't tried gvim!
hybris has quit [Remote host closed the connection]
cirwin has joined #ruby
DatumDrop has quit [Ping timeout: 240 seconds]
<nmeum> why is ruby yaml library not converting symbol hash keys in to string hash keys if you use the hash.to_yaml instance method?
hayleybarker has joined #ruby
dankest is now known as dankest|away
<havenn> aedorn: Hrm, Hanmac mentioned something about a segfault in p362, but I haven't run into it. What is the problem? Have a link to anything about it? (I'm curious!)
<apeiros_> nmeum: because that'd be wrong?
<nmeum> apeiros_: why?
<tufflax> havenn: ok
<apeiros_> because symbols aren't strings
Onii-san has quit [Ping timeout: 244 seconds]
<nmeum> apeiros_: yeah but a yaml file with --- :mykey: mystring looks kind of invalid, doesn't it?
<apeiros_> nmeum: no it does not
<nmeum> aha?
<apeiros_> there's a yaml spec
<apeiros_> maybe you should read it
<nmeum> apeiros_: so you would prefer --- :mykey: mystring instead of :mykey: mystring?
<nmeum> *instead of --- mykey: mystring
<apeiros_> nmeum: I don't know from what you construed that
<aedorn> havenn: Yeah.. segfaults abound.. it got bugged here: http://bugs.ruby-lang.org/issues/7629
<waxjar> more importantly hash.to_yaml.to_hash == hash would return false
tommyvyo has joined #ruby
<apeiros_> nmeum: again, symbols are not strings. that's all.
<apeiros_> no more, no less. there's no preference in that statement.
toekutr has quit [Read error: Connection reset by peer]
<nmeum> apeiros_: yeah sure ... but yaml isn't using a : before key names usually ...
<apeiros_> oh dear…
<apeiros_> yaml doesn't use anything
<apeiros_> yaml is a language
d2dchat has joined #ruby
<apeiros_> people use yaml
<nmeum> apeiros_: yeah
<nmeum> apeiros_: s/yaml/people/
<apeiros_> nmeum: in case you haven't noticed - *nothing* stops you from using string keys.
moharram06 has quit [Ping timeout: 255 seconds]
<swarley> :key: being a symbol is a rubyism as far as I know.
marr has quit [Ping timeout: 255 seconds]
<nmeum> apeiros_: I just want to complain that a :key: looks ugly in yaml files </firstworldproblems>
<apeiros_> nmeum: dude, then just don't use them.
<swarley> That's your choice lol.
<apeiros_> fwp indeed…
<GlenK> does 5.37 code make sense to anyone? I keep getting "undefined method 'full_title'". http://ruby.railstutorial.org/chapters/filling-in-the-layout#code-full_title_helper_tests
atyz has quit [Quit: Leaving...]
<nmeum> swarley: as in don't use symbols at all?
<swarley> No, it's just up to you
<GlenK> maybe I'm supposed to modify the code somehow? exercise 3 we're talking.
<swarley> Do whatever, just know that you're not constrained to using a symbol for a key
<nmeum> well...I would like to use symbols in ruby but I wouldn't like to use symbols in yaml files
<swarley> k. That's just a FWP
<nmeum> fuck this shit I will just use symbols in yaml files too
<nmeum> :)
JarJar has quit [Quit: Leaving]
<apeiros_> nmeum: you know, you can also, like, translate…
baphled has quit [Ping timeout: 255 seconds]
LouisGB has quit [Ping timeout: 255 seconds]
ekristen has joined #ruby
<havenn> nmeum: Use something that isn't human readable, like MessagePack, then you won't get hung up on the aesthetics of your serialization format :P http://msgpack.org/
moharram06 has joined #ruby
lolcathost has joined #ruby
<nmeum> apeiros_: yeah I am currently using a one liner for this
<maqr> why would 'bundle install --path vendor' cause errors when compiling eventmachine, but 'gem install eventmachine' works fine?
generalissimo has quit [Ping timeout: 248 seconds]
LouisGB has joined #ruby
<maqr> oh, different versions, nevermind :)
<nmeum> related: the "old" (ruby 1.8) hash syntax - will it be removed in future version of ruby?
<apeiros_> nmeum: no
<apeiros_> the new one can't express everything the old can
<swarley> ^
<nmeum> gnah I don't like the idea of having two diffrent hash syntaxs
<apeiros_> fwp…
<apeiros_> then use the old one
<nmeum> hrhr
<swarley> The new one is easier if you have a bunch of symbol keys. The older one is just easier to use in general
<nmeum> any problem with a programming language is a fwp
<swarley> No, I can complain about the lack of an easy multiplication operator in brainfuck
<nmeum> :3
<nmeum> brainfuck \o/
cirwin has quit [Quit: Leaving.]
<nmeum> what was the name of the brainfuck inspired 'esoterik programming language' with Emojis?
<havenn> "I want to make Ruby users free. I want to give them the freedom to choose. People are different. People choose different criteria. But if there is a better way among many alternatives, I want to encourage that way by making it comfortable." ~Matz
elico has quit [Read error: Connection reset by peer]
elico has joined #ruby
ltsstar has quit [Quit: ltsstar]
ryannielson has joined #ruby
willob has joined #ruby
LouisGB has quit [Ping timeout: 255 seconds]
havenn has quit [Remote host closed the connection]
mjolk2 has quit [Quit: This computer has gone to sleep]
joeycarmello has quit [Remote host closed the connection]
<shevy> anyone of you using colours in your ruby scripts on the commandline? if so, what do you use to do so?
phelps has quit [Quit: Textual IRC Client: www.textualapp.com]
Michael has joined #ruby
Michael is now known as Guest67694
kenneth has quit [Quit: kenneth]
kil0byte has joined #ruby
dmiller has joined #ruby
kenneth has joined #ruby
dankest|away is now known as dankest
DatumDrop has joined #ruby
adkron has joined #ruby
horofox has quit [Quit: horofox]
<ober> anything special about calling insance methods with arguments? e.g. ClassA:ClassB.new.some_method(arg_1)?
<aedorn> shevy: I was using highline for awhile
baroquebobcat has quit [Quit: baroquebobcat]
<shevy> aedorn that has colour support?
Jake232 has quit [Quit: Computer has gone to sleep.]
<aedorn> shevy: yes
<shevy> ok cool, will check it out, thanks aedorn
<aedorn> with color schemes, too.
dmiller has quit [Ping timeout: 248 seconds]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
lolcathost has quit [Quit: leaving]
Goles has joined #ruby
<apeiros_> ober: no, nothing special.
<apeiros_> shevy: still just plain ansi sequences.
<ober> can't seem to match the arity in irb
<shevy> apeiros_ hmm do you have a simple example for how you solve this? just one example line that would be used for colour output?
<shevy> I know that term/ansicolors uses stuff like puts "Hello World".red
<ober> Chef::Resources::Template.new.mymethod(1) => ArgumentError: wrong number of arguments (0 for 1)
Virunga has quit [Remote host closed the connection]
<apeiros_> shevy: puts "\e[31mHello World!\e[0m"
mrdtt has joined #ruby
<shevy> ah ok
<apeiros_> 30-39 are foreground color, 40-49 are background
<shevy> ober perhaps new() <-- would need one argument?
<ober> ahh initialize
<apeiros_> 1 is bold
<apeiros_> 0 is reset
alex__c2022 has joined #ruby
<shevy> yeah apeiros_, makes sense. was wondering how that would look in code :)
jaywastaken has quit [Remote host closed the connection]
benlieb has joined #ruby
<JohnTeddy> Is there something to take an rspec, and automatically generate class nesting for it the way the rspec wants it?
karasawa has joined #ruby
<apeiros_> shevy: sometimes I use variables, like: warning = "\e[33;40;1m"
<apeiros_> and then: puts "#{warning} Something went wrong! #{reset}"
alexspeller has joined #ruby
<apeiros_> but I'm not really consistent with that.
<shevy> apeiros_ ah that seems more flexible
slainer68 has quit [Remote host closed the connection]
<shevy> some time ago, I kind of wanted to have colour output in all my .rb scripts as a possibility, but also retain the ability for plain good old uncoloured puts 'hello world' output. still have not solved that to my satisfaction...
<apeiros_> use a different method than puts
<apeiros_> add a method strip_colors
phantasm66 has joined #ruby
phantasm66 has joined #ruby
phantasm66 has quit [Changing host]
<aedorn> or extend String
<apeiros_> (simple gsub, I think gsub(/\e\[[^m]*m/,'') should work)
alex__c2022 has quit [Ping timeout: 248 seconds]
<apeiros_> and watch a global, e.g. $color
<apeiros_> then: cputs "#{warning} Warning #{reset}" --> cputs strips the coloring if $color is false
beneggett has quit [Quit: Computer has gone to sleep.]
<aedorn> can also check terminfo if you want to force colors when capable
<apeiros_> (and yes, this is one of the very rare case where I'd use a global, if you're building a library, that wouldn't apply, though)
tjbiddle has joined #ruby
zeade has quit [Quit: Leaving.]
DatumDrop has quit [Ping timeout: 276 seconds]
otherj has joined #ruby
dankest is now known as dankest|away
hayleybarker has quit [Quit: hayleybarker]
nkts has joined #ruby
<apeiros_> (there are definitively better/nicer designs)
generalissimo has joined #ruby
<shevy> aedorn I am scared of the very name "terminfo" in itself...
<shevy> it gives me nightmares, all the curses like code I saw in my life so far
<aedorn> heh .. I don't think there's another way to determine if a terminal is "color-capable" though
mjolk2 has joined #ruby
<apeiros_> hm, user-input should override detection (e.g. a --[no-]color flag)
<apeiros_> I think I just used $stdin.tty?
goraxe has quit [Read error: Connection reset by peer]
dankest|away is now known as dankest
<shevy> hehe cool
<shevy> I used that too once...
Russell^^ has quit [Quit: Russell^^]
<shevy> puts 'We can display colours!' if $stdout.tty?
goraxe has joined #ruby
emmanuelux has quit [Remote host closed the connection]
<apeiros_> mhm
<apeiros_> $color = opts.fetch(:color, $stdout.tty?)
<aedorn> hmm
ehm_may has quit [Quit: Leaving...]
<aedorn> I'm trying to think of an instance where that doesn't work as expected
<apeiros_> with non-color capable terminals
<apeiros_> they'd still be tty's
<aedorn> heh, well I mean what terminals aren't color capable
lolcathost has joined #ruby
<shevy> cant think of any... xterm has colours
<shevy> that's the lowest I would use... ah and those linux login shells but they have colour suppor tas well
LouisGB has joined #ruby
<apeiros_> quite a few
Xeago has quit [Remote host closed the connection]
<apeiros_> most modern ones are
<aedorn> I guess there's Windows
<apeiros_> on osx terminal.app, you can go to non-color capable easily via settings
Xeago has joined #ruby
<shevy> hmm, you can use bash on windows though, so you have colour support on windows too (msys, cygwin), just avoid the windows command .exe thing
alexspeller has quit [Ping timeout: 252 seconds]
<aedorn> yeah, I think it's only the command line ... or what was formerly known as DOS
<shevy> aedorn it's funny that so many unix things work on windows :)
<shevy> ruby works too... ruby-gnome as well.. it would be *almost* pleasant to use windows
<shevy> hmm does ruby work on DOS?
ekristen_ has joined #ruby
blazes816 has quit [Quit: blazes816]
<aedorn> you can get it to work in FreeDOS
Guest67694 has quit [Remote host closed the connection]
<aedorn> Why would you want to use it is beyond me
<aedorn> (Ruby on DOS)
ekristen has quit [Ping timeout: 240 seconds]
ekristen_ is now known as ekristen
breakingthings has joined #ruby
<aedorn> I don't know why I am sending text over the wire only to gzip at the receiver
<breakingthings> Dear #ruby, have any of you played around with the Curses module?
<aedorn> I was obviously having a genius moment when deciding that was a good idea
Xeago has quit [Ping timeout: 272 seconds]
<apeiros_> breakingthings: I have, and up until 1.9.3 it never played quite right on osx for me. since 1.9.3 it seems to work (seems because i only tried small samples)
karasawa has quit [Ping timeout: 248 seconds]
<aedorn> breakingthings: I haven't, but in a few hours I am going to ... need to use it for a project
<breakingthings> apeiros_: well, that's good news I guess. On a scale of 1 to Give Up Now, how difficult do you suppose setting up a small interactive prompt would be? (Purpose is to have a command interface for an IRC bot… eg have a single line that you can enter text into, with the log printed up realtime above it)
<apeiros_> breakingthings: depends on your abilities. I did a split-screen as one of the samples and would categorize it as a 1
<breakingthings> awesome.
<apeiros_> you can do that with plain ruby too in case curses won't work
<breakingthings> Ah, can you?
<apeiros_> sure
shevy has quit [Ping timeout: 264 seconds]
<apeiros_> ansi escape sequences
<apeiros_> +trap("SIGWINCH") (to detect screen resizes)
hadees has quit [Quit: hadees]
<apeiros_> +io/console
EhyehAsherEhyeh has quit [Ping timeout: 240 seconds]
jaywastaken has joined #ruby
jaywastaken has quit [Changing host]
jaywastaken has joined #ruby
<breakingthings> Hmm, I may took a look at that. Would be cool to do it without even needing curses
<breakingthings> if only because windows support.
<breakingthings> (assuming… windows… can… do anything.)
<apeiros_> curses afaik is cross-platform
rumba has quit [Quit: rumba]
dankest is now known as dankest|away
<aedorn> when it comes down to it you can do most things under Windows as long as you aren't trying to fork processes. And even that you can do, but it's not exactly pleasant unless someone has updated the Win32 Process lib
<JohnTeddy> If I have 8 classes in a file, what is a good way to write a method that will name Class.new on any of the 8 classes. So if I do subject(:class4), it will just do { Class4,new }
crazedpsyc has quit [Ping timeout: 260 seconds]
dankest|away is now known as dankest
<apeiros_> aedorn: I think imperator has
<breakingthings> I was under the impression that curses wouldn't work outside of unix systems
<apeiros_> also Kernel#spawn is cross platform
<breakingthings> that's cool if it does.
<JohnTeddy> or subject(:class4) { Class4.new } being a line in the rspect
ryannielson has left #ruby [#ruby]
* breakingthings doesn't know too much about opratin systums
<apeiros_> JohnTeddy: subject(Class4) does not work?
<apeiros_> (I don't know rspec)
atyz has joined #ruby
Michael has joined #ruby
<apeiros_> JohnTeddy: you can do: x = Class4; x.new
<apeiros_> if that info helps you
Michael is now known as Guest96430
DatumDrop has joined #ruby
lolcathost has quit [Quit: leaving]
crazedpsyc has joined #ruby
atyz has quit [Ping timeout: 248 seconds]
<aedorn> oh good.. 1 bug of too-many-to-count fixed. Feature creep is fun
DerkTheDaring has joined #ruby
jds has quit [Remote host closed the connection]
jbermudes has quit [Ping timeout: 255 seconds]
jimeh has quit [Quit: Computer has gone to sleep.]
emsilva has quit [Ping timeout: 276 seconds]
emsilva has joined #ruby
shevy has joined #ruby
aedorn has quit [Quit: Leaving]
niklasb has quit [Ping timeout: 245 seconds]
baroquebobcat has joined #ruby
beneggett has joined #ruby
Guest96430 has quit [Remote host closed the connection]
IceDragon has quit [Ping timeout: 272 seconds]
alexspeller has joined #ruby
pskosinski has quit [Ping timeout: 245 seconds]
Dreamer3 has joined #ruby
hadees has joined #ruby
DatumDrop has quit [Ping timeout: 252 seconds]
dankest is now known as dankest|away
hadees has quit [Client Quit]
dmiller has joined #ruby
hayleybarker has joined #ruby
havenn has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
beneggett has quit [Quit: Computer has gone to sleep.]
Guest41653 is now known as medik
toekutr has joined #ruby
_alejandro has joined #ruby
rburton- has joined #ruby
dmiller has quit [Ping timeout: 264 seconds]
dan_ has joined #ruby
joeycarmello has joined #ruby
lolcathost has joined #ruby
IceDragon has joined #ruby
nathancahill has joined #ruby
darthdeus has quit [Quit: Leaving...]
Hanmac has joined #ruby
joeycarmello has quit [Ping timeout: 265 seconds]
alexspeller has quit [Ping timeout: 252 seconds]
slainer68 has joined #ruby
Hanmac1 has quit [Ping timeout: 265 seconds]
joeycarmello has joined #ruby
dmiller has joined #ruby
<shevy> oh man
maletor has quit [Quit: Computer has gone to sleep.]
<shevy> I am transferring knowledge from the ruby pickaxe book into my local knowledge base
<shevy> :(
<shevy> and I mean like literally... I work through page by page, transfer what is useful, and throw the rest away into a bin
<shevy> that is the first time I rip a book apart slowly
tchebb is now known as phri
phri is now known as tchebb
sharms has joined #ruby
mpfundstein_home has quit [Ping timeout: 276 seconds]
slainer68 has quit [Ping timeout: 244 seconds]
jds has joined #ruby
jduan1981 has quit [Read error: Operation timed out]
havenn has quit [Remote host closed the connection]
willob has quit [Quit: Leaving.]
krz has joined #ruby
nathancahill has quit [Quit: nathancahill]
DatumDrop has joined #ruby
mockra has quit [Remote host closed the connection]
nwertman has quit [Read error: Operation timed out]
sepp2k1 has quit [Read error: Connection reset by peer]
Jake232 has joined #ruby
kiyoura has quit [Ping timeout: 264 seconds]
the_jeebster has quit [Quit: Leaving.]
rpbertp13 has joined #ruby
sharms has quit [Quit: Leaving]
sharms has joined #ruby
mercwithamouth has quit [Ping timeout: 276 seconds]
jds has quit [Ping timeout: 244 seconds]
ryanf has quit [Read error: Connection reset by peer]
ryanf has joined #ruby
emsilva has quit [Quit: Computer has gone to sleep.]
aedorn has joined #ruby
nga4 has joined #ruby
rakl has quit [Quit: sleeping]
bean has quit [Ping timeout: 255 seconds]
mercwithamouth has joined #ruby
Automorphism has joined #ruby
Nuck is now known as NuckThePainAway
DatumDrop has quit [Ping timeout: 265 seconds]
Michael has joined #ruby
adeponte has quit [Remote host closed the connection]
nga4 has quit [Client Quit]
Michael is now known as Guest42216
havenn has joined #ruby
Yayo has joined #ruby
Loaft has quit [Read error: Connection reset by peer]
jonathanwallace has joined #ruby
jbw has quit [Ping timeout: 255 seconds]
alexspeller has joined #ruby
joofsh has quit [Remote host closed the connection]
nwertman has joined #ruby
dr_neek has quit [Quit: dr_neek]
medik has quit [Quit: medik has no reason]
theRoUS has quit [Ping timeout: 276 seconds]
atyz has joined #ruby
statarb3 has quit [Ping timeout: 276 seconds]
Guest42216 has quit [Remote host closed the connection]
phipes has joined #ruby
DatumDrop has joined #ruby
miskander has quit [Quit: miskander]
nkts has quit []
atyz has quit [Ping timeout: 265 seconds]
Jake232 has quit [Quit: Computer has gone to sleep.]
sharms has quit [Quit: leaving]
DatumDrop has quit [Remote host closed the connection]
rakl has joined #ruby
jbw has joined #ruby
Takehiro has joined #ruby
phipes has quit [Quit: phipes]
ryanf has quit [Read error: Connection reset by peer]
megharsh has quit [Ping timeout: 264 seconds]
ryanf has joined #ruby
wmoxam has quit [Ping timeout: 265 seconds]
moos3 has quit [Quit: Computer has gone to sleep.]
wmoxam has joined #ruby
The_8472 has joined #ruby
LouisGB has quit [Ping timeout: 265 seconds]
hackerdude has quit [Remote host closed the connection]
autumn is now known as autumn-
benlieb has quit [Quit: benlieb]
alexspeller has quit [Ping timeout: 252 seconds]
The_8472` has quit [Ping timeout: 240 seconds]
Coeus has quit [Ping timeout: 240 seconds]
Daman has quit [Quit: u]
autumn has joined #ruby
v0n has joined #ruby
atyz has joined #ruby
autumn has quit [Client Quit]
rburton- has quit [Quit: Linkinus - http://linkinus.com]
sn0wb1rd has quit [Quit: sn0wb1rd]
tommyvyo has quit [Quit: Computer has gone to sleep.]
Automorphism has quit [Quit: leaving]
MattRb has joined #ruby
lolcathost has quit [Quit: leaving]
io_syl is now known as steph021
yacks has joined #ruby
<MattRb> How is OpenGL support for Ruby? Can you use the newest version easily?
megharsh has joined #ruby
Daman has joined #ruby
ekristen has quit [Quit: ekristen]
<shevy> hmm no real idea... are there any bindings to opengl at all?
slainer68 has joined #ruby
Automorphism has joined #ruby
philcrissman has joined #ruby
rapubst has joined #ruby
atyz has quit [Quit: Leaving...]
zeade has joined #ruby
adeponte has joined #ruby
d2dchat has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
slainer68 has quit [Ping timeout: 244 seconds]
LouisGB has joined #ruby
Tref has joined #ruby
BoomCow has quit [Quit: This computer has gone to sleep]
Banistergalaxy has quit [Ping timeout: 272 seconds]
DatumDrop has joined #ruby
Banistergalaxy has joined #ruby
Chryson has quit [Quit: Leaving]
nomenkun has joined #ruby
iamjarvo has joined #ruby
cableray has quit [Quit: cableray]
alexspeller has joined #ruby
SegFaultAX has quit [Ping timeout: 240 seconds]
tectonic has quit [Ping timeout: 244 seconds]
philcrissman has quit [Remote host closed the connection]
ahuman has quit [Quit: No Ping reply in 180 seconds.]
crackfu has quit [Remote host closed the connection]
ahuman has joined #ruby
SegFaultAX has joined #ruby
<bnagy> you can't fork() on WIndows
benlieb has joined #ruby
<bnagy> well.. you can, but nobody has and it's effectively impossible
atyz has joined #ruby
`brendan has joined #ruby
atyz has quit [Client Quit]
kiyoura has joined #ruby
adeponte has quit [Remote host closed the connection]
tectonic has joined #ruby
<bnagy> creating a process and forking one are very different, obviously
tectonic has quit [Client Quit]
sailias has quit [Ping timeout: 272 seconds]
DatumDrop has quit [Remote host closed the connection]
dankest|away is now known as dankest
davidokner has joined #ruby
<davidokner> Hi, I'm having trouble with rspec. What should happen if I type "rspec" at the console?
phantasm66 has quit [Quit: *sleeeep….]
<davidokner> I'm using rubymine and when I run one of my spec.rb files I get "No tests were found".
Tref has quit [Quit: Tref]
<davidokner> I've ran all these tests before, but I'm coming back to this work many months later.
<IceDragon> did you require 'rspec' in your spec.rb?
<IceDragon> and added some describe(s)?
<davidokner> No, I don't have "require 'rspec'"
<davidokner> I have not edited the files. I just tried adding that and it didn't do anything different.
track has quit [Read error: Connection reset by peer]
<davidokner> I might be forgetting something because this is my first time using rspec and I took a long break.
<IceDragon> I dont know much about rspec, I only read a few of *_spec files
<IceDragon> -of
track7 has joined #ruby
track7 has quit [Read error: Connection reset by peer]
flip_digits has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
DatumDrop has joined #ruby
dmiller has quit [Remote host closed the connection]
MattRb has quit [Quit: MattRb]
track7 has joined #ruby
dmiller has joined #ruby
pavilionXP has quit [Read error: Connection reset by peer]
pavilionXP__ has joined #ruby
alexspeller has quit [Ping timeout: 252 seconds]
<shevy> hmmm guys...
amaya_the has joined #ruby
<shevy> I would like to create a tainted module
jduan1981 has joined #ruby
jaygen has quit [Remote host closed the connection]
<shevy> in where, when I require it, the class in the same file, includes that module at once
<shevy> example:
joofsh has joined #ruby
<shevy> require 'evil_module'; class Foo; end; foo = Foo.new; foo.call_evil_method_defined_in_evil_module_here()
jaygen has joined #ruby
mercwithamouth has quit [Ping timeout: 244 seconds]
<shevy> right now, I can do this, via include
MattRb has joined #ruby
<shevy> class Foo; include EvilModule # etc
<MattRb> Hi so anyone here experienced with chruby?
<shevy> but I'd like to know whether it is possible to do so without explicit include
<shevy> what is chruby
<MattRb> a tool for managing ruby installs
<bnagy> shevy: uh, could you use the required hook to monkey patch Module?
<shevy> bnagy hmm that's an idea, yeah
<bnagy> MattRb: postmodern was active on ruby-lang a couple of hours ago
<MattRb> bnagy: not something I'd want to bother the dev about
Automorphism has quit [Quit: leaving]
LouisGB has quit [Read error: Connection reset by peer]
LouisGB has joined #ruby
cyong has joined #ruby
karasawa has joined #ruby
beneggett has joined #ruby
adeponte has joined #ruby
a_a_g has joined #ruby
moos3 has joined #ruby
larissa has quit [Quit: Saindo]
tk___ has joined #ruby
rpbertp13 has quit [Remote host closed the connection]
autumn has joined #ruby
Driscoll has quit [Ping timeout: 255 seconds]
yshh has quit [Remote host closed the connection]
nwertman has quit [Remote host closed the connection]
LouisGB has quit []
tr4656 has quit [Ping timeout: 276 seconds]
dankest is now known as dankest|away
bombgigazord has joined #ruby
jgrevich has quit [Quit: jgrevich]
fbernier has quit [Quit: ZNC - http://znc.in]
<MattRb> JESUS LORD why is the Ruby FTP so slow
fbernier has joined #ruby
<postmodern> MattRb, yo
<postmodern> MattRb, was playing TF2
autumn- has quit [Quit: bye xo]
<postmodern> MattRb, also yes ruby-lang FTP is slow
<davidokner> I'm getting " no tests were found" in rubymine running tests with rspec
<MattRb> postmodern: It's nbd it's probably not your issue and I'm doing something wrong. Installed chruby with brew, and added the source line to my terminal but I get command not found.
<MattRb> That's any I said I wouldn't bother you about it up there
<postmodern> MattRb, weird, what shell?
<MattRb> bash
<postmodern> MattRb, also brew is behind by one version
_alejandro has quit [Remote host closed the connection]
<postmodern> MattRb, you will want to add the conf to /etc/profile.d/chruby.sh or ~/.bashrc
<postmodern> MattRb, and restart the shell
<MattRb> Added to bashrc
<postmodern> MattRb, and your not using some strange terminal?
<MattRb> iterm2, but it's still bash
<postmodern> MattRb, ok, it should load ~/.bashrc
iamjarvo has quit [Quit: Leaving.]
<postmodern> MattRb, unless your /etc/bashrc is broken
<MattRb> Are there any mirrors to the ruby ftp?
<MattRb> Fresh computer, it's unlikely
<postmodern> MattRb, well depending on where bash came from, the maintainers might have changed /etc/bashrc
<bnagy> fwiw I always use bash_profile on osx
alexspeller has joined #ruby
<postmodern> in *nix bash is supposed to always load .bashrc
<bnagy> yep
<postmodern> when you run bash in interactive mode (-l) it then loads .bash_profile
moos3 has quit [Quit: Computer has gone to sleep.]
<bnagy> yep
rapubst has quit [Read error: Connection reset by peer]
<postmodern> also should load /etc/profile.d/*.sh
maletor has joined #ruby
<postmodern> i've run into linux packages of zsh that don't load /etc/profile.d/*.sh
joeycarmello has quit [Remote host closed the connection]
tr4656 has joined #ruby
rezzack has quit [Ping timeout: 265 seconds]
Bosox20051 has joined #ruby
kaen has joined #ruby
DerkTheDaring has quit [Remote host closed the connection]
dankest|away is now known as dankest
jamescarr has joined #ruby
tufflax has left #ruby [#ruby]
jamescarr has quit [Client Quit]
breakingthings has quit []
mockra has joined #ruby
lolcathost has joined #ruby
d2dchat has joined #ruby
alexspeller has quit [Ping timeout: 252 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
DatumDrop has quit [Remote host closed the connection]
moos3 has joined #ruby
otherj has quit [Quit: otherj]
moos3 has quit [Client Quit]
dmiller has quit [Remote host closed the connection]
andrewhl has joined #ruby
<JohnTeddy> raise_error(ArgumentError)
<JohnTeddy> That is in an rspec I'm trying to code for.. how do I raise an ArgumentError? I did raise("ArgumentError"), though that didn't pass the rspec.
hackerdude has joined #ruby
joeycarmello has joined #ruby
jgrevich has joined #ruby
<bnagy> just raise ArgumentError
uris has quit [Quit: Leaving]
DatumDrop has joined #ruby
Targen has quit [Ping timeout: 264 seconds]
tjbiddle has quit [Quit: tjbiddle]
radic has quit [Disconnected by services]
radic_ has joined #ruby
DaZ has quit [Ping timeout: 264 seconds]
moos3 has joined #ruby
DatumDrop has quit [Remote host closed the connection]
joeycarmello has quit [Remote host closed the connection]
dankest has quit [Quit: Leaving...]
<jblack> raise ArgumentError, "Your arguments suck. Go take class in logic"
firefux has joined #ruby
DatumDrop has joined #ruby
DaZ has joined #ruby
BoomCow has joined #ruby
<postmodern> i love ArgumentError and TypeError
<postmodern> so much more descriptive
alexspeller has joined #ruby
jgrevich_ has joined #ruby
ehlu has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
xemu has quit [Quit: Nettalk6 - www.ntalk.de]
miskander has joined #ruby
kenneth has quit [Quit: kenneth]
jgrevich has quit [Ping timeout: 272 seconds]
jgrevich_ is now known as jgrevich
beneggett has quit [Quit: Computer has gone to sleep.]
<bnagy> I like NotImplementedError
v0n has quit [Ping timeout: 272 seconds]
Takehiro has quit [Remote host closed the connection]
<bnagy> so, postmodern, what's the deal with chruby?
<bnagy> any reason I would switch from rbenv?
<bnagy> I saw people whining on twatter that rbenv is 'unmaintained', as if code that simple needs constant love
lolcathost has quit [Ping timeout: 264 seconds]
apeiros_ has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
kiyoura has quit [Ping timeout: 240 seconds]
jaywastaken has quit [Remote host closed the connection]
MattRb has quit [Quit: MattRb]
mjolk2 has quit [Quit: This computer has gone to sleep]
skcin7 has joined #ruby
benlieb has quit [Quit: benlieb]
MattRb has joined #ruby
<JohnTeddy> robot2.should_receive(:wound).with(5)
daniel_hinojosa has quit [Ping timeout: 248 seconds]
<JohnTeddy> This is in an rspec, so in my rb file, I add def attack(victim)\n victim.wound(5)\n end
<JohnTeddy> I hardcoded 5 though, to pass the rspec. Is there a way to call some arbitrary integer or string that rspec puts in the with(5) part?
alexspeller has quit [Ping timeout: 252 seconds]
joeycarmello has joined #ruby
sambio has quit []
firefux has left #ruby [#ruby]
amaya_the has quit [Read error: Connection reset by peer]
kn330 has joined #ruby
mmokrysz has quit [Quit: Leaving.]
lolcathost has joined #ruby
joeycarmello has quit [Ping timeout: 248 seconds]
dnyy has quit [Remote host closed the connection]
DrShoggoth has quit [Quit: Leaving]
bradleyprice has joined #ruby
rakl has quit [Quit: sleeping]
ghanima has quit [Quit: Leaving.]
deadlytoah has joined #ruby
centipedefarmer has quit [Remote host closed the connection]
DatumDrop has quit [Remote host closed the connection]
yacks has quit [Ping timeout: 252 seconds]
yacks has joined #ruby
sayan has joined #ruby
straind has joined #ruby
otherj has joined #ruby
yshh has joined #ruby
miskander has quit [Quit: miskander]
yacks has quit [Ping timeout: 265 seconds]
TheEmpty_ has joined #ruby
mjolk has quit [Quit: returning some videotapes]
emergion has quit [Quit: Computer has gone to sleep.]
amaya_the has joined #ruby
TheEmpty has quit [Ping timeout: 245 seconds]
ananthakumaran has joined #ruby
ryanf has quit [Read error: Connection reset by peer]
ryanf has joined #ruby
hayleybarker has quit [Read error: Connection reset by peer]
hayleybarker has joined #ruby
bigmac has quit [Remote host closed the connection]
ryanf has quit [Read error: Connection reset by peer]
aedorn has quit [Quit: Konversation terminated!]
ner0x has quit [Ping timeout: 244 seconds]
eric_wood has joined #ruby
chriskk has quit [Quit: chriskk]
eric_wood is now known as ericwood
aedorn has joined #ruby
ryanf has joined #ruby
eroc has joined #ruby
alexspeller has joined #ruby
jwang has joined #ruby
yacks has joined #ruby
cyong has quit [Quit: Leaving.]
dyrot has quit [Quit: ThrashIRC v2.8 sic populo comunicated]
aedorn has quit [Client Quit]
aedorn has joined #ruby
kenneth has joined #ruby
ryanf has quit [Ping timeout: 248 seconds]
rezzack has joined #ruby
<shevy> blocks are so awesome
<shevy> bla { foo(); bar(); puts 'hi there' } unless @game_over
<shevy> wonder if any other language can get terser
zeade has quit [Quit: Leaving.]
<shevy> the () I did only for fun
<shevy> :P
<aedorn> hmmm. irc clients sure haven't gone very far over the years
yshh has quit [Ping timeout: 248 seconds]
<yfeldblum> shevy, game_over? or blah { foo ; bar }
<shevy> yfeldblum aha... now that is interesting
<shevy> do I understand this right...
<JohnTeddy> If I have class3 inside class2, inside class1, how can I execute a method in class3, that will execute a method in class1?
<shevy> method1() { block_one } or method2() { block_two }
ner0x has joined #ruby
<shevy> that could work?
ryez has joined #ruby
<shevy> hmmm wait
<shevy> some conditional is missing... I am confused
<shevy> JohnTeddy ok classes act like modules in a namespace too
<shevy> class Class1; class Class2; class Class3
<shevy> uhm
Skelz0r has quit [Read error: Operation timed out]
<yfeldblum> shevy, it's nearly equivalent to your sample
<yfeldblum> shevy, slightly different return value but otherwise the same
<shevy> hmm
otters has quit [Remote host closed the connection]
<shevy> JohnTeddy, http://pastie.org/5614376 this works... does not use 3 classes though
<shevy> yfeldblum I am still not quite getting it hmm, I am going to test your sample :)
elico has quit [Read error: Connection reset by peer]
elico1 has joined #ruby
<shevy> oh I am silly
<shevy> I forgot yield...
<shevy> yfeldblum, yeah works http://pastie.org/5614379
jduan1981 has quit [Quit: jduan1981]
<shevy> kinda funny... have not used "or" in that way before
<shevy> that's like a flag there
otters has joined #ruby
<yfeldblum> hey all - how can i force net-ssh *not* to use any global or user config, such as not using the known-hosts file?
<yfeldblum> shevy, just gotta learn the patters :D
DatumDrop has joined #ruby
ner0x has quit [Quit: Leaving]
<shevy> hehe
m4n has joined #ruby
Takehiro has joined #ruby
alexspeller has quit [Ping timeout: 252 seconds]
a_a_g has quit [Ping timeout: 240 seconds]
joeycarmello has joined #ruby
Skelz0r has joined #ruby
aedorn has quit [Quit: Leaving]
aedorn has joined #ruby
<aedorn> hmmm... interesting.
joeycarmello has quit [Ping timeout: 244 seconds]
kokainepizza has quit [Quit: My pooter is sleep.]
ewnd9 has joined #ruby
snorkdude has joined #ruby
<shevy> :)
elsifaka has joined #ruby
h4mz1d has quit [Ping timeout: 248 seconds]
<shevy> hmmmm
<shevy> can you chain multiple "or" ?
<shevy> and can you do so via ||
<shevy> and can you actually mix or and || ... I am gonna find out
m4n has quit [Ping timeout: 248 seconds]
jekotia has quit [Quit: ChatZilla 0.9.89-rdmsoft [XULRunner 1.9.0.17/2009122204]]
<bnagy> any FFI users around? Just want to know if you can do kind of 'anonymous' unions of structs
<aedorn> shevy: yes, but || and 'or' are different
<bnagy> as usual the wiki is deeply unclear
Skelz0r has quit [Ping timeout: 272 seconds]
DatumDrop has quit [Ping timeout: 272 seconds]
<bnagy> oh, aedorn, you said you can fork on windows
<bnagy> do you have working code for that? :)
scruple has quit [Ping timeout: 265 seconds]
bombgigazord has left #ruby [#ruby]
<aedorn> bnagy: no, I abandoned it a long time ago when I didn't have to automate Motive any longer. But do you really need to fork? Kernel#spawn does work, you'll just have to use something else for ensuring the process started and for any IPC you want to do
dwu1 has joined #ruby
<bnagy> yes, I really want to fork
DrCode_ has joined #ruby
<bnagy> it's a process create time issue. I know "how" to do it, it's just stupidly lowlevel and fragile
wuzzzzaah has quit [Ping timeout: 265 seconds]
DrCode has quit [Ping timeout: 276 seconds]
DrCode_ is now known as DrCode
maletor has joined #ruby
sn0wb1rd has joined #ruby
deadlytoah has quit [Ping timeout: 272 seconds]
wuzzzzaah has joined #ruby
<aedorn> bnagy: you still have to write low level functions in C and import them. It might make you hate life
ewnd9 has quit [Ping timeout: 272 seconds]
<bnagy> nah should be able to do it all in ruby, but that's not really the point
<bnagy> and yes, the hating life and the stupidly OS / version specific was what made me discard the idea
yshh has joined #ruby
rezzack has quit [Quit: Leaving.]
slainer68 has joined #ruby
<aedorn> well, analyze backwards.. you need to copy your entire memory stack for what you want to do, or just part of it?
zeade has joined #ruby
<bnagy> all of it.
guns has joined #ruby
jblack has quit [Ping timeout: 265 seconds]
otherj has quit [Quit: otherj]
h4mz1d has joined #ruby
<aedorn> hmmm. what version of Windows?
nomenkun_ has joined #ruby
IceDragon has quit [Quit: Space~~~]
slainer68 has quit [Ping timeout: 248 seconds]
<bnagy> probably 7 would be sufficient, don't need to do much on XP anymore
nomenkun has quit [Ping timeout: 272 seconds]
gener1c has quit [Remote host closed the connection]
<Eiam> is there some way in Curb to generate a comparable "curl" call that would perform what curb s about to do?
ryanf has joined #ruby
<Eiam> also, every time I try to view the docs for curb, (via gem server curb) it sends me to github where there are no docs for each method..
guns has quit [Client Quit]
guns has joined #ruby
Hanmac_ has joined #ruby
m4n has joined #ruby
alexspeller has joined #ruby
<aedorn> bnagy: If you want simple you can use Cygwin and it does contain a working fork(), but it's not a true fork. In 7, if it's 64 bit, you *can* use low level functions to map memory chunks, but there's no way to do it in pure Ruby. Honestly, the easiest way is going to be spawning a process and using a proxy
<bnagy> yeah cygwin looked at fork then they chickened out
<bnagy> they just use createprocess like everyone
<bnagy> but if you count FFI as pure ruby then you should be able to do everything
<bnagy> only tricky part is inline asm, but I can do that too if I use metasm
<aedorn> and what I mean by proxy is using something like DRb to pass marshalled objects. It's expensive in terms of cycles, but it's still faster than implementing a whole fork system
neurotech has joined #ruby
<bnagy> I already have everything I need using CreateProcess, fork() would just be faster
<aedorn> no, not on Windows =\
<bnagy> but over hundreds of millions of tests, saving half a sec adds up
<bnagy> sure it would
<bnagy> there's more or less a fork() in the posix subsystem
tagrudev has joined #ruby
<bnagy> that does your memory copy
<bnagy> the rest is just fixing some tib peb stuff and telling csrcc what's what
<bnagy> csrss even
adeponte has quit [Remote host closed the connection]
<aedorn> bnagy: yes, but Windows doesn't work that way.. it won't let you do it cheaply
DrCode has quit [Quit: ZNC - http://znc.in]
<bnagy> in what way does it 'not work that way'? It's just a native API call
yshh has quit [Ping timeout: 272 seconds]
<bnagy> just that CreateProcess doesn't expose the options, NtCreateProcess does
zeade has quit [Ping timeout: 260 seconds]
DatumDrop has joined #ruby
friskd has joined #ruby
browndawg has joined #ruby
DrCode has joined #ruby
awestroke has joined #ruby
adeponte has joined #ruby
<aedorn> bnagy: I'm pretty sure that won't fully spawn a clone of the current process past XP, though... but hey, it's been about 3 years since I've done that stuff. I think that's the reason nobody has really fully made fork() work without some hacks of sorts
<bnagy> well the fixups you need to do are very os specific, they keep changing offsets etc
<bnagy> so doing it in a maintainable way for something that aims to be compatible like cygwin would be fucking insane
<bnagy> and it's downright hard to do it at all, for any given os
<bnagy> like fiddly
zeade has joined #ruby
zeade has quit [Client Quit]
hackerdude has quit [Remote host closed the connection]
<bnagy> plus almost nobody cares. That's why I don't think anyone has done it.
m4n has quit [Ping timeout: 244 seconds]
<bnagy> as to whether it could ever work for a graphicl process, that's just a barrel of snakes
kumarat9pm has joined #ruby
kumarat9pm has quit [Max SendQ exceeded]
alexspeller has quit [Ping timeout: 252 seconds]
kumarat9pm has joined #ruby
kumarat9pm has quit [Max SendQ exceeded]
<bnagy> anyway, back to FFI crap
Hanmac_ has quit [Quit: Page closed]
kumarat9pm has joined #ruby
kumarat9pm has quit [Max SendQ exceeded]
Vert has joined #ruby
kumarat9pm has joined #ruby
<aedorn> I don't know.. you're making me want to revisit the whole thing. Maybe I'll see if I can get the old source code at work tomorrow
kumarat9pm has quit [Max SendQ exceeded]
kumarat9pm has joined #ruby
vikhyat has joined #ruby
kumarat9pm has quit [Max SendQ exceeded]
DatumDrop has quit [Ping timeout: 264 seconds]
notVert has quit [Ping timeout: 252 seconds]
kil0byte has quit [Remote host closed the connection]
mafolz has joined #ruby
Pip has joined #ruby
samuel02 has joined #ruby
samuel02 has quit [Remote host closed the connection]
arturaz has joined #ruby
postmodern_ has joined #ruby
postmodern has quit [Ping timeout: 255 seconds]
Bosox20051 has quit [Quit: Leaving]
postmodern_ has quit [Client Quit]
yshh has joined #ruby
postmodern has joined #ruby
Automorphism has joined #ruby
lolcathost is now known as Guest15717
Automorphism is now known as lolcathost
mockra has quit [Remote host closed the connection]
Guest15717 has quit [Ping timeout: 272 seconds]
joofsh has quit [Remote host closed the connection]
kn330 has quit [Remote host closed the connection]
justin_pdx has joined #ruby
<justin_pdx> Howdy all. I am doing a vert simple script with ruby and am having troubles with it in tmux. Here is a paste: http://pastie.org/5614501
<justin_pdx> When I issue a "print" command nothing happens unless I somehow do something like a "puts" or otherwise write a newline.
<justin_pdx> It works fine normally, but not when in a tmux session.
<bnagy> could be buffering, try $stdout.flush before you hang
nomenkun_ has quit [Read error: Connection reset by peer]
m4n has joined #ruby
<bnagy> also you should probably just sleep if you want to wait forever
<bnagy> less cpu abuse
<justin_pdx> Well the waiting isn't the issue, that was just there for demonstration purposes. If it reaches the end of the script it finishes the print.
phelps has joined #ruby
<justin_pdx> Yes, the flushing helps it. That should do it for me. Interesting. Thank you. :D
<bnagy> np
<bnagy> oh wait, try setting sync
huoxito has quit [Quit: Leaving]
<bnagy> then you don't have to do it every time, if that works
<bnagy> $stdout.sync=true at the top of the script
d2dchat has quit [Remote host closed the connection]
d2dchat_ has joined #ruby
alexspeller has joined #ruby
nipar has joined #ruby
nomenkun has joined #ruby
yshh has quit [Ping timeout: 265 seconds]
robustus has quit [Ping timeout: 276 seconds]
<nipar> I have a problem, and its not directly related to coding
robustus has joined #ruby
m4n has quit [Ping timeout: 240 seconds]
<nipar> I've been doing front-end web development for some time, and its getting less and less satisfying. I want to do more back-end stuff, and not just web development
jduan1981 has joined #ruby
dhruvasagar has joined #ruby
DatumDrop has joined #ruby
<nipar> I found that most people would recommend Ruby or Python to learn these things
<nipar> But I don't see the practical uses for learning either
bhavesh has joined #ruby
a_a_g has joined #ruby
bhavesh has quit [Client Quit]
dawkirst_ has joined #ruby
generalissimo has quit [Remote host closed the connection]
dawkirst_2 has quit [Ping timeout: 252 seconds]
<ryanf> nipar: as opposed to what, php?
jblack has joined #ruby
<nipar> as opposed to anything, im a massive consumer of technology
andrewhl has quit [Remote host closed the connection]
eroc has quit [Quit: eroc]
<nipar> I have a high end android/mac/pc/ipad and I love them all
guns has quit [Quit: guns]
<Pip> lol
<Pip> nipar, Do you program?
bhavesh_a_p has joined #ruby
<nipar> I also love the web, and I can literally deploy a PHP app in seconds with a 5$ hosting and use socket functions etc
<nipar> With Ruby & Python, I jsut dont see where I could deploy these apps if I were to make them
<nipar> and with RoR, I am totally clueless
<nipar> there are no cheap hosts, and deploying anything seems like a feat of the century
BoomCow has quit [Quit: This computer has gone to sleep]
* bnagy *rolls eyes*
mockra has joined #ruby
<nipar> no pip, thats the issue :)
ror-inx has joined #ruby
<nipar> I want to learn something, and im hopelessly torned between all wonderful worlds
<Pip> nipar, What's your recommended language for me
<nipar> im having major issues saying "Ruby is great. I'll stick with it."
<bhavesh_a_p> are class methods are singleton methods ?
clocKwize has joined #ruby
<ror-inx> #RubyonRails
<bnagy> bhavesh_a_p: kind of
<nipar> pip, I don´t know - all languages seem great! but I find too many problems with them all to settle down and actually learn them
jblack has quit [Ping timeout: 240 seconds]
<bhavesh_a_p> thanks
yacks has quit [Ping timeout: 248 seconds]
<bnagy> singleton methods is a kind of imprecise term
arturaz has quit [Remote host closed the connection]
<bnagy> generally understood to be a method that exists just on one particular object
<bnagy> so in that sense, yeah class methods are
<clocKwize> say I have an array of numbers [100, 120, 110, 110, 125] what would be the best way to get an array with each item containing the sum of all the previous items in the original array? e.g. the result would be [100, 220, 330, 440, 565]
sayan has quit [Ping timeout: 265 seconds]
lolcathost is now known as Playground
<bhavesh_a_p> so instance methods do part of singleton(anonymous) class ?
<bnagy> instance methods are not singleton, but adding a method to an specific instance of a class would be
aces1up has quit [Ping timeout: 265 seconds]
browndawg has quit [Quit: Leaving.]
gregorg has quit [Quit: Quitte]
<bhavesh_a_p> yes but singleton_methods belongs to singleton class.
m4n has joined #ruby
<bhavesh_a_p> & if class methods might be belongs to same
aces1up has joined #ruby
<bhavesh_a_p> so class methods might be belongs to same
jonathanwallace has quit [Ping timeout: 264 seconds]
justin_pdx has quit [Quit: justin_pdx]
Kamz has joined #ruby
<bnagy> ... wat
justin_pdx has joined #ruby
justin_pdx has quit [Remote host closed the connection]
DatumDrop has quit [Ping timeout: 272 seconds]
<bnagy> clocKwize: a.each_index.with_object([]){|i,b|b<<(a[0..i].inject(:+))}
alexspeller has quit [Ping timeout: 252 seconds]
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
mockra has quit [Remote host closed the connection]
<bnagy> 100, 120, 110, 110, 125].inject([]){|a,i|a<<(i+(a.last||0))}
aces23up has joined #ruby
aces1up has quit [Ping timeout: 248 seconds]
Kamz has left #ruby [#ruby]
mpereira has quit [Ping timeout: 264 seconds]
sayan has joined #ruby
friskd has quit [Quit: friskd]
nipar has quit []
otters has quit [Quit: WeeChat 0.3.9.2]
Myconix has quit [Ping timeout: 245 seconds]
<bnagy> a.inject([]){|a,i|a<<(i+(a[-1]||0))} ok 36 is the shortest I can get
otters has joined #ruby
otters has quit [Client Quit]
yshh has joined #ruby
otters has joined #ruby
m4n has quit [Ping timeout: 264 seconds]
jimeh has joined #ruby
kil0byte has joined #ruby
sayan has quit [Read error: Connection reset by peer]
mahmoudi_ has quit [Quit: Computer has gone to sleep.]
ehm_may has joined #ruby
yacks has joined #ruby
karasawa has quit [Ping timeout: 255 seconds]
otters has quit [Quit: WeeChat 0.4.0-rc1]
locriani has quit [Read error: Connection reset by peer]
browndawg has joined #ruby
locriani has joined #ruby
phelps has quit [Quit: Textual IRC Client: www.textualapp.com]
yshh has quit [Ping timeout: 272 seconds]
elico1 has quit [Quit: elico1]
matrixise has quit [Ping timeout: 265 seconds]
alexspeller has joined #ruby
bradleyprice has quit [Remote host closed the connection]
m4n has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
ananthakumaran has joined #ruby
jprovazn_away is now known as jprovazn
sayan has joined #ruby
Hanmac_ has joined #ruby
hayleybarker has quit [Quit: hayleybarker]
charliesome has joined #ruby
piotr__ has joined #ruby
browndawg has left #ruby [#ruby]
francisfish has quit [Remote host closed the connection]
francisfish has joined #ruby
swex has joined #ruby
<Hanmac_> about FFI ... FFI is nice but some stuff cant be done sane with an C-API ... like obj->getPropertyValue<float>("propertyname")
otters has joined #ruby
alexspeller has quit [Ping timeout: 252 seconds]
filipe has joined #ruby
adeponte has quit [Remote host closed the connection]
otters has quit [Client Quit]
francisfish has quit [Ping timeout: 265 seconds]
zigomir has joined #ruby
slainer68 has joined #ruby
adeponte has joined #ruby
nemesit has joined #ruby
browndawg has joined #ruby
Morkel has joined #ruby
vlad_starkov has joined #ruby
yshh has joined #ruby
browndawg has quit [Read error: Connection reset by peer]
browndawg has joined #ruby
Liothen has joined #ruby
zmo_ has joined #ruby
blacktulip has joined #ruby
vikhyat has quit [Remote host closed the connection]
slainer68 has quit [Remote host closed the connection]
arietis has joined #ruby
akemrir has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
landho has quit [Read error: Connection reset by peer]
landho has joined #ruby
jduan1981 has quit [Quit: jduan1981]
zigomir has quit [Read error: Connection reset by peer]
mengu has quit [Quit: Leaving]
aganov has joined #ruby
otters has joined #ruby
zigomir has joined #ruby
otters has quit [Client Quit]
n0b0dy has joined #ruby
koshii has joined #ruby
<Takehiro> anyone know how to read a csv.gz file by ruby? ;o
dwu1 has quit [Quit: Leaving.]
<bnagy> rubyzip and csv
<bnagy> but imho you're better shelling out to gunzip if you can
nipar has joined #ruby
otters has joined #ruby
snorkdude has quit [Quit: snorkdude]
wermel has joined #ruby
beneggett has joined #ruby
zigomir has quit [Ping timeout: 244 seconds]
zigomir has joined #ruby
cableray has joined #ruby
ephemerian1 has joined #ruby
jonathanwallace has joined #ruby
<Hanmac_> Takehiro so its a gz compressed csv file right?
<Takehiro> might work
<Hanmac_> yeah that should work, if not gome again
nipar has quit [Remote host closed the connection]
<bnagy> oh yeah zlib, oops :) I have a brain full of zip not gz :P
<Takehiro> Hanmac_: thx :)
cableray has quit [Quit: cableray]
<Hanmac_> i had an binding for every possible archive type ... but its currently broken because i does not develop it currently
DatumDrop has joined #ruby
alexspeller has joined #ruby
MattRb has quit [Quit: MattRb]
jonathanwallace has quit [Ping timeout: 272 seconds]
ephemerian1 has quit [Quit: Leaving.]
Skelz0r has joined #ruby
track7 has quit [Read error: Connection reset by peer]
emocakes has joined #ruby
hoelzro|away is now known as hoelzro
beneggett has quit [Quit: Computer has gone to sleep.]
ephemerian has joined #ruby
koshii has quit [Ping timeout: 240 seconds]
n0b0dy has quit [Quit: WeeChat 0.3.9.2]
larssmit has joined #ruby
track7 has joined #ruby
horse has joined #ruby
<horse> Hi all. Happy New Year.
<sonne> cheers
<horse> I'm trying to instal ruby 1.9.2 using RVM on a centos 6.3 machine but not getting very far
<larssmit> Happy new year!
vikhyat has joined #ruby
<horse> i think it's because i'm behind a proxy
<bnagy> ok, well that's 3/3 things you're doing wrong :)
main has joined #ruby
marr has joined #ruby
<horse> heh, really?
<bnagy> rvm, 1.9.2 (oold) and centos
kil0byte_ has joined #ruby
Elhu has joined #ruby
notVert has joined #ruby
<Hanmac_> i thought centos only works on punch cards
<horse> i need to use centos (will be RHEL in production). i'm trying to install ruby as a pre-req for graylog2
<horse> and it says use 1.9.2
kil0byte has quit [Ping timeout: 248 seconds]
<horse> heh Hanmac
ehm_may has quit [Quit: Leaving...]
<bnagy> ok well there should be nothing in 1.9.3 latest stable that is incompatible with code written for 1.9.2
<bnagy> it should just be faster and better
<horse> ok cool. I tried installing that with RVN and that failed in the same way
<bnagy> how is it failing?
<bnagy> like, I assume you've done the rvm install itself (barf)
<horse> yeah
Vert has quit [Ping timeout: 252 seconds]
<bnagy> if you're only ever going to use one version, you might just be best off installing with yum or whatever they call it
<horse> i get this error after it trys to download: http://pastebin.com/Mq6ycaQB
emocakes_ has joined #ruby
<bnagy> probably get some leet version like 1.8.5 knowing centos
<horse> bnagy - yeah correct yum version is too old for the app i want to use
<bnagy> horse: paste the log itself, not the thing that says what log to look at
<bnagy> see if there's a yum 1.9 version
<bnagy> like ruby1.9 or somesuch
awestroke has quit [Remote host closed the connection]
dawkirst_ has quit [Read error: Connection reset by peer]
Elhu has quit [Quit: Computer has gone to sleep.]
<horse> yeah there isnt
alexspeller has quit [Ping timeout: 252 seconds]
emocakes has quit [Ping timeout: 272 seconds]
<horse> annoyingly
<horse> i cant even find an rpm
Elhu has joined #ruby
<arusso> fwiw, on centos/scilinux, my devs find it easiest to use rvm when they need something other than 1.8.7. we havent found a well maintained ruby 1.9 rpm.
<bnagy> hm
<bnagy> well then normally I'd recommend rbenv
DatumDrop has quit [Ping timeout: 272 seconds]
<bnagy> but all the cool kids are using chruby now I think
<bnagy> rvm does wack stuff
<bnagy> I guess you could always get the tarball and configure make make install
<bnagy> :P
ltsstar has joined #ruby
<horse> those are the contents of the other log it points me to
<horse> not really telling me much
cascalheira has joined #ruby
<bnagy> the file exists, so you could be right, it could be a stupid proxy
adeponte has quit [Remote host closed the connection]
cascalheira has quit [Client Quit]
koshii has joined #ruby
aedorn has quit [Quit: WeeChat 0.3.9.2]
<horse> yeah i'm getting a 404 not found when i try to wget
aedorn has joined #ruby
toekutr has quit [Remote host closed the connection]
<bnagy> suk
dawkirst_ has joined #ruby
* Hanmac_ thinks that RHEL is some kind of joke for the same guys that buys Linux disributionen as Enterprice
<bnagy> horse: maybe see if there's an http only link
deadlytoah has joined #ruby
<bnagy> as in without ftp in the url, btu I can't seem to see one quickly
<horse> thanks will do
deadlytoah has quit [Client Quit]
deadlytoah has joined #ruby
koshii has quit [Ping timeout: 265 seconds]
Takehiro has quit [Ping timeout: 272 seconds]
pcarrier has quit []
hotovson has joined #ruby
damagednoob1 has left #ruby [#ruby]
<Hanmac_> but 1.9.2 is bugy, old and the support is allready dropped ... you schould pick up an 1.9.3 version (like the one methothed in the topic)
<horse> will do. i seem about a million miles away from where i need to be with this. this is only one of what seems like hundreads of pre-reqs for the application i'm trying to install
arturaz has joined #ruby
wreckimnaked has joined #ruby
<horse> why is nothing ever simple!
dankest has joined #ruby
tcurdt has joined #ruby
<ruzu> seems odd to use rvm on the server, just curl the source, ./configure make && make install imo
steph021 has quit [Quit: Computer has gone to sleep.]
<horse> I thought there where many more steps to rolling your own ruzu?
karasawa has joined #ruby
main has quit [Ping timeout: 272 seconds]
alexspeller has joined #ruby
slainer68 has joined #ruby
babinho_ has left #ruby [#ruby]
tcurdt has quit [Quit: bye bye]
<postmodern> bnagy, im a cool kid and i recommend rvm
dawkirst_ has quit [Quit: Nettalk6 - www.ntalk.de]
<postmodern> bnagy, granted i just drank my own weight in Sake
jgrevich has quit [Remote host closed the connection]
matrixise has joined #ruby
beneggett has joined #ruby
Phoop has joined #ruby
<bnagy> rvm cannot the unix
nomenkun has quit [Read error: Connection reset by peer]
Playground has quit [Quit: b(not so)rb]
<bnagy> yum, sake
nomenkun has joined #ruby
<bnagy> having japanese for dinner tonight, so I guess I'll do the same
<bnagy> cold weather + hot sake == awesome
d2dchat_ has quit [Ping timeout: 252 seconds]
<bnagy> hey, you know FFI, right?
* Hanmac_ recommend an recent OS with an recent ruby version
<Hanmac_> bnagy what about FFI?
<bnagy> struct / union stuff
<bnagy> I have nfi what to do with those unnamed structs / unions
<bnagy> apart from name them and maybe put a sugary api on it, but that's kind of sucky
<bnagy> I didn't even know you could do that, is it a C++ thing?
m4n has quit [Ping timeout: 248 seconds]
d2dchat has joined #ruby
<Hanmac_> hm no unnamed structs&unions are an C thing, and yeah they confuse me sometimes too ... i dont know if this is portable with (Ruby)FFI ... i mean i could do it with an C-Ext but i dont know if ffi could it too
<bnagy> so you would do like dm.dmCopies and it would work it out somehow?
alexspeller has quit [Ping timeout: 252 seconds]
<bnagy> cause only way I know to do it in FFI is dm[:u1][:s1][:dmCopies]
awestroke has joined #ruby
awestroke has quit [Remote host closed the connection]
<Hanmac_> hm i need to test it (the C-side) ... does your way work? i mean the [:u1]
gyre007 has joined #ruby
<bnagy> I haven't written it, but I'm sure it would
workmad3 has joined #ruby
rdark has joined #ruby
<bnagy> just I could just name them all, I have code like that the works
<bnagy> s/^just/like/
beneggett has quit [Quit: Computer has gone to sleep.]
beneggett has joined #ruby
matrixise has quit [Quit: leaving]
matrixis1 has joined #ruby
<Hanmac_> ... yeah it seems on C, dm.dmCopies work
RagingDave has joined #ruby
_bart has joined #ruby
<Hanmac_> but i dont like C structs ... the union in union smells like an onion :P
koshii has joined #ruby
<bnagy> ok well I'll do it the hacky way for now
<bnagy> as usual
yshh has quit [Remote host closed the connection]
emocakes_ is now known as emocakes
yshh has joined #ruby
Takehiro has joined #ruby
m4n has joined #ruby
matrixis1 is now known as matrixise
beneggett has quit [Quit: Computer has gone to sleep.]
apeiros_ has joined #ruby
<amaya_the> What is the most important update in 1.9.3-p327 ?
karasawa has quit [Ping timeout: 255 seconds]
matled has quit [Remote host closed the connection]
matled has joined #ruby
<heftig> amaya_the: the patch level increase
deadlytoah has quit [Ping timeout: 272 seconds]
<emocakes> bigger numbers :)
<heftig> seriously, look at that number
<heftig> so sexy
<emocakes> very important for any project to be taken seriously
<bnagy> stable is like 362 now
<apeiros_> actually that's already behind
tvw has joined #ruby
<Hanmac_> bnagy NOOO ... p362 is released but it is not stable :'(
apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p362: http://ruby-lang.org (ruby-2.0.0-preview2) || Paste >3 lines of text on http://gist.github.com
dreamfall has quit [Ping timeout: 252 seconds]
wereHamster has quit [Ping timeout: 252 seconds]
<apeiros_> not stable?
<bnagy> Hanmac_: take it up with ruby-lang.org then
wereHamster has joined #ruby
parus has quit [Ping timeout: 252 seconds]
parus has joined #ruby
<amaya_the> "In addition, any security fixes are not included in this release."
<amaya_the> It is sexy , and Dangerous now.
<emocakes> we could make a movie out of this
<emocakes> ruby would be some ultra hot girl
<Hanmac_> https://bugs.ruby-lang.org/issues/7641 https://bugs.ruby-lang.org/issues/7629 https://bugs.ruby-lang.org/issues/7633 p362 does currently have many segmentation failures and build errors
<emocakes> who is dangerous
<emocakes> and she is actually an assasin
maqr has quit [Quit: bbl]
<amaya_the> Hanmac_: Are you still work on your rpg game engine?
<emocakes> amaya_the i am
larssmit has quit [Quit: Leaving.]
alexspeller has joined #ruby
ajf_ has left #ruby [#ruby]
<amaya_the> Is the engine for Linux?
<Hanmac_> amaya_the yes & no, currently i write on tiled_tmx, an nice ruby parser for tmx files ... they could be used later with gosu for an 2d game, my co-worker Quintus_q works currenty on an gtk frontend for the maker itself
statarb3 has joined #ruby
TheEmpty_ has quit [Read error: Connection reset by peer]
<Hanmac_> currently gosu is picked as game engine so the rpg game does work wherever gosu runs
berserkr has joined #ruby
<amaya_the> oh , I see.
<Hanmac_> (i am also write an binding for 3d engine ogre3d but the problem is that its more complicated to make resources)
seich- has quit [Ping timeout: 260 seconds]
elico has joined #ruby
<amaya_the> yeah , 3D is good point.
lkba has quit [Quit: Bye]
DatumDrop has joined #ruby
mengu has joined #ruby
<Hanmac_> the maker would later ported to rwx, my own wxWidgets binding so its more indipent than gtk ( and looks more native), so we could ship different versions of the maker
deadlytoah has joined #ruby
skcin7 has quit [Quit: Computer has gone to sleep.]
<amaya_the> *a good idea.
jacktrick has joined #ruby
jacktrick is now known as Guest25746
<Hanmac_> about my 3d-binding: from the current benchmarks i tested, its nearly as fast as an real C++ program, because the main work is done with the binding (and ruby is mostly only used as callback)
blacktulip has quit [Ping timeout: 272 seconds]
blacktulip has joined #ruby
<amaya_the> So ,It has a gui,and it is fast.
karasawa has joined #ruby
ltsstar has quit [Ping timeout: 240 seconds]
<Hanmac_> you mean the 3d? or do you mean the maker? the 3d binding does not have an gui itself, this would be done with an extra binding (that could be used with 2d gosu too)
jds has joined #ruby
atmosx has joined #ruby
<amaya_the> Well,that is cool ,2d and 3d share the same core.
dreamfall has joined #ruby
francisfish has joined #ruby
woolite64 has quit [Ping timeout: 245 seconds]
karasawa has quit [Read error: Connection reset by peer]
<Hanmac_> hm no, they do not, but because both are in OpenGL(or can use opengl) the other external binding (the one for gui) can use that, (so they do not depend on each other, but can work togehter)
pcarrier has joined #ruby
alexspeller has quit [Ping timeout: 252 seconds]
whowantstolivefo has quit [Quit: who wants to live forever ?]
pcarrier has quit [Read error: Operation timed out]
mrdtt has quit [Quit: mrdtt]
timmow has joined #ruby
<amaya_the> oh, I see. From the point of game maker , 3D is only another way to represent game content.
m4n has quit [Ping timeout: 248 seconds]
DatumDrop has quit [Ping timeout: 248 seconds]
h4mz1d has quit [Read error: Connection reset by peer]
h4mz1d has joined #ruby
mpfundstein_home has joined #ruby
pcarrier has joined #ruby
adambeynon has joined #ruby
<Hanmac_> the bad point is that i cant use the same materials for 2d and 3d ... :& but i think i could life with that ... (currently that game maker will be designed for 2d and will be like the maker from Enterbrain but better (in the gui the map editor is allready working) , the 3d engine and a possible 3d maker will be designed later)
dhruvasagar has quit [Ping timeout: 252 seconds]
<mpfundstein_home> Hanmac_: 2d and 3d are also fundamentally different (in terms of designing the api). mostly it is a waste of effort to combine them into one engine. especially when you want to optimise for certain cases like 3000x3000x3 tiles or whatever.
<mpfundstein_home> Hanmac_: Are your writing it all in ruby?
dhruvasagar has joined #ruby
<Hanmac_> hm yes and no ... the mapfile parser wich is used for the maker and the game is in ruby ... the game itself is in ruby, but used the C-ext gosu, the maker is in ruby but uses gtk or wx bindings
dankest has quit [Quit: Leaving...]
jdripper has joined #ruby
<Hanmac_> the 3d binding is a C++ ext for a C++ lib, (but you could use it in a ruby game)
<mpfundstein_home> Hanmac_: cool. so implementing game logic will happen in ruby?
zigomir_ has joined #ruby
mpfundstein_home has quit [Quit: Lost terminal]
<Hanmac_> mostly yeah
mpfundstein_home has joined #ruby
zigomir has quit [Ping timeout: 272 seconds]
zigomir_ is now known as zigomir
alexspeller has joined #ruby
moshee has quit [Ping timeout: 255 seconds]
moshee has joined #ruby
karasawa has joined #ruby
h4mz1d has quit [Ping timeout: 248 seconds]
dhruvasagar has quit [Ping timeout: 240 seconds]
seich- has joined #ruby
m4n has joined #ruby
dan_ has quit [Ping timeout: 264 seconds]
<amaya_the> About the map tiles , are they square too ?
<amaya_the> Like the rpgmaker vxace.
<Hanmac_> the mapeditor tiled and the map format tmx support orthogonal and isometric, my gosu addon that shows the map and the gtk maker does currently only support orthogonal ... yeah like squares
blacktul_ has joined #ruby
blacktulip has quit [Ping timeout: 248 seconds]
karasawa has quit [Quit: Lost terminal]
<Hanmac_> but with infinite layers ... that means you could put as many tile layers above you want, (and image layer and object layer)
rdark has quit [Quit: leaving]
filipe has quit [Ping timeout: 272 seconds]
karasawa has joined #ruby
karasawa has quit [Client Quit]
wreckimnaked has quit [Ping timeout: 252 seconds]
browndawg has quit [Quit: Leaving.]
karasawa has joined #ruby
rdark has joined #ruby
<amaya_the> oh yeah, We can make some commercial Level games.
karasawa has quit [Client Quit]
karasawa has joined #ruby
Driscoll has joined #ruby
deadlytoah has quit [Ping timeout: 272 seconds]
mikecmpbll has joined #ruby
sayan has quit [Read error: Connection reset by peer]
<Hanmac_> the map format currently supports 2147483648 different tiles from the tilesets attached to the map
browndawg has joined #ruby
RagingDave has quit [Quit: Ex-Chat]
elaptics`away is now known as elaptics
<amaya_the> Wow~ , That is enough for any game.
workmad3 has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Remote host closed the connection]
coldfumonkeh has joined #ruby
<Hanmac_> ... the next map can have the next 2147483648 tiles wich are indipent from the tiles of the first map
polymar has joined #ruby
horofox has joined #ruby
deadlytoah has joined #ruby
filipe has joined #ruby
<Hanmac_> the other values like tilesetsize or map size or tile size are currently only limited by the memory
<amaya_the> So ,We can make some really big maps ,and each of them full of all kinds of details.
yacks has quit [Ping timeout: 240 seconds]
<Hanmac_> yeah there are nothing against that
krz has quit [Quit: krz]
<Hanmac_> PS: about Panorama & LightMap & Fog: because the newest version of the map format supports imagelayer you could put them nearly everywhere you want (even between tilelayers) so you could make an canyon where some hills are above the clounds, and some stuff are in the fog
zarubin has quit []
RagingDave has joined #ruby
Driscoll has quit [Ping timeout: 276 seconds]
<amaya_the> Awesome~ Your aim is definitely commercial game.
fermion has joined #ruby
m4n has quit [Ping timeout: 264 seconds]
bhavesh_a_p has quit [Quit: Leaving]
karasawa has quit [Ping timeout: 248 seconds]
<Hanmac_> currently i will not use it for a commercial game (because i dont have an own creativity, i can only copy things and put them new together), but yes the maker and the game engine can both be used for commercial stuff (from what is planed both get GPL like licenses)
coldfumonkeh has quit [Remote host closed the connection]
<Hanmac_> hm no, the gameengine would be LGPL or MIT like so that the game is not forced to be GPL too
sayan has joined #ruby
<Hanmac_> (but i did not see an commercial ruby product (and rubymotion does not count in this context) )
ToTo has joined #ruby
<amaya_the> I mean it is professional , I hope so .
elico has quit [Ping timeout: 248 seconds]
larissa has joined #ruby
chrisftw has joined #ruby
<chrisftw> Does anyone know what the problem is here?
<chrisftw> C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:129:in `to_ap p': missing run or map statement (RuntimeError) from C:/Source/pigstream/config.ru:1:in `<main>' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb: 40:in `eval'
horofox has quit [Quit: horofox]
parzorep has joined #ruby
dreinull has joined #ruby
<chrisftw> I would really appreciate any pointers
<csmrfx> got all dependencies? ie. gems
<dreinull> If I overwrite a core method like Hash#[] how do I call the original method. Like super in a subclass.
<dreinull> Or is that the wrong approach?
<csmrfx> how is that a special approach?
hotovson has quit [Remote host closed the connection]
<csmrfx> the usual
<mpfundstein_home> is there any major diff between 1.9.1 and 1.9.3 ? my dev environment is 1.9.3 and my production env is 1.9.1 . can that cause problems?
<dreinull> csmrfx: haven't done that before
<Hanmac_> dreinull, use alias or alias_method
reinaldob has joined #ruby
<csmrfx> mpfundstein_home: yes, some diff's, can cause imo
m4n has joined #ruby
<csmrfx> also, looks like you got 1.9.3 ruby with 1.9.1 gems
<dreinull> Hanmac_: how so?
Michael_ has joined #ruby
<mpfundstein_home> csmrfx: ho wyou mean?
<csmrfx> look at your path
<Hanmac_> mpfundstein_home, are you sure that your product env is 1.9.1 ? the 1.9.3 ruby still have 1.9.1 as API version
horofox has joined #ruby
<mpfundstein_home> Hanmac_: I installed the ubuntu bundle 1.9.1
<mpfundstein_home> Hanmac_: But on my dev machine i compiled the latest from scratch
<csmrfx> may well be you want to compile ruby from source in production as well
<mpfundstein_home> csmrfx: /usr/local/lib/ruby/gems/1.9.1 => true
<mpfundstein_home> csmrfx: what to do about it?
<mpfundstein_home> csmrfx: i am on it :-)
parzorep has quit [Quit: parzorep]
<mpfundstein_home> csmrfx: compiling right now. but why is my gem path wrong?
<csmrfx> dunno
horofox has quit [Client Quit]
<csmrfx> I use apt-get for devving
Goles has quit [Quit: Computer has gone to sleep.]
<mpfundstein_home> mac doesnt have this :-)
<csmrfx> but would be wary of apt-gotten, esp gems, in production
wreckimnaked has joined #ruby
<mpfundstein_home> and homebrew etc. stinks. its mostly faster to compile it
<csmrfx> port, dunno if it works better
<Hanmac_> mpfundstein_home do ruby -v or ruby1.9.1 -v on your production system ... as i said the package may be named 1.9.1 but it could be an 1.9.2 or 1.9.3 inside
<shevy> Hanmac_ is the last known debian user
<jds> I've got an array like ['a', 'b', 'c', 'd'...] . I'd like to iteratively call a block, passing in the 'current' element and the following one. So the block would get 'a','b', then 'b','c', then 'c','d', etc
<csmrfx> but debian (ubuntu) has a Quirky way to package ruby gems, alien to ruby worls
<shevy> like the dinosaurs
<mpfundstein_home> Hanmac_: i did -v already. on my dev its 1.9.3 , on my prod (ubuntu) its 1.9.1. but i compile 1.9.3. atm
<jds> I'm sure I've seen an elegant way of doing this in ruby, but can't find it
<csmrfx> shevy: as am I
<Hanmac_> jds look at each_cons(2)
<shevy> csmrfx whoa
<shevy> CONSPIRACY!!!
<mpfundstein_home> shevy: i use debian on 17 severs :-)
<shevy> OMG
<shevy> WORLD CONSPIRACY!!!!!!!!!!
<csmrfx> jds: ri Array.map
<shevy> I am surrounded by debian
<chrisftw> ] <csmrfx> also, looks like you got 1.9.3 ruby with 1.9.1 gems - di dyou mean me?
<jds> Hanmac_: Perfect, thanks
Umren has joined #ruby
<csmrfx> shevy: not a conspiracy, just the best OS in history of the World
zz_chrismcg is now known as chrismcg
<Hanmac_> csmrfx you are wrong he wants two elements at the same time (that what each_slice and each_cons can do)
<jds> I always forget to check the enumerable methods in addition to the array methods
<shevy> csmrfx oohhhh you are from suomi?
Phoop has quit [Quit: Phoop]
<chrisftw> hmm
<csmrfx> shevy: I am from the Internets
<Hanmac_> debian may bee nice for server but for user pc i prefer an ubuntu with gnome-classic
<csmrfx> chrisftw: no afaics
<chrisftw> ah
<shevy> you are one of the guys from In the Pirkinning!
<chrisftw> ok
<csmrfx> Hanmac_: I go with Openbox
<chrisftw> does anyone have any idea what is wrong here?
<chrisftw> C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:129:in `to_ap p': missing run or map statement (RuntimeError) from C:/Source/pigstream/config.ru:1:in `<main>' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb: 40:in `eval' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb: 40:in `parse_file'
<dreinull> Hanmac_: ok, got it, thanks
<mpfundstein_home> Hanmac_: yes, for user pc i prefer ubuntu as well. debian is nice if you get rid of the gui and want a easy to maintain server environment. better than CentOS imo
canuck3141 has joined #ruby
tvw has quit [Remote host closed the connection]
canuck3141 has quit [Client Quit]
zooz has joined #ruby
Michael_ has quit [Remote host closed the connection]
sayan has quit [Ping timeout: 244 seconds]
dhruvasagar has joined #ruby
DatumDrop has joined #ruby
zooz has left #ruby ["Leaving"]
Virunga has joined #ruby
EhyehAsherEhyeh has joined #ruby
yacks has joined #ruby
Virunga has quit [Remote host closed the connection]
banister_ has quit [Ping timeout: 248 seconds]
Spami has joined #ruby
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
slainer68 has quit [Remote host closed the connection]
jrabbit has joined #ruby
<jrabbit> is there a simpler way of having pry "learn" about a gem I just installed without having to exit it manually and start again?
megharsh has quit [Ping timeout: 252 seconds]
sheerun has quit [Ping timeout: 256 seconds]
DatumDrop has quit [Ping timeout: 248 seconds]
wallerdev has quit [Quit: wallerdev]
Phoop has joined #ruby
Goles has joined #ruby
daniel_- has joined #ruby
daniel_- has quit [Changing host]
daniel_- has joined #ruby
tvw has joined #ruby
vlad_starkov has joined #ruby
vlad_starkov has quit [Ping timeout: 276 seconds]
megharsh has joined #ruby
banister_ has joined #ruby
browndawg has quit [Quit: Leaving.]
browndawg has joined #ruby
banister_ has quit [Ping timeout: 255 seconds]
EhyehAsherEhyeh has left #ruby [#ruby]
djdb has joined #ruby
nemesit has quit [Quit: Leaving...]
SiegeX has quit [Ping timeout: 264 seconds]
jcrawford has quit [Excess Flood]
darthdeus has joined #ruby
jcrawford has joined #ruby
koshii has quit [Ping timeout: 276 seconds]
SiegeX has joined #ruby
sheerun has joined #ruby
iamjarvo has joined #ruby
wreckimnaked has quit [Ping timeout: 252 seconds]
alexspeller has quit [Ping timeout: 252 seconds]
<chrisftw> dammit
<chrisftw> i cant figure this out
<jcrawford> so guys what is the difference between doing these: https://gist.github.com/4443136
akemrir has quit [Quit: WeeChat 0.3.9.2]
<apeiros_> jcrawford: they don't do the same
alexspeller has joined #ruby
<apeiros_> the latter only works with inheritance
<apeiros_> i.e., the first one works on the same class the method is defined too, the latter would redefine an existing method on the same class
daniel_- has quit [Ping timeout: 252 seconds]
<apeiros_> chrisftw: your config.ru is broken
<jcrawford> apeiros_: interesting so by using alias_method it's actually working in the parent class?
<apeiros_> jcrawford: o0
<chrisftw> apeiros_ thank you!
<chrisftw> it says:
<chrisftw> $stdout.sync = true
<chrisftw> whatever that means...
<apeiros_> jcrawford: define "working in the parent class"?
<apeiros_> chrisftw: it means "disable line buffering, output everything on $stdout immediately"
<chrisftw> ah
<apeiros_> chrisftw: and you can look that up easily. you get $stdout.class (tells you that it is an IO), then you use `ri IO#sync=`
<chrisftw> any idea how to fix it? it should be a working app I downloaded off github to try to understand ruby
<apeiros_> (in your bash/zsh or whatever shell you use)
<jcrawford> well you said it was not overriding and that it was actually workin in the parent class
v0n has joined #ruby
<chrisftw> ok
francisfish has quit [Remote host closed the connection]
<chrisftw> going into bash
koshii has joined #ruby
<apeiros_> chrisftw: I mean how you can figure out what `$stdout.sync = true` means
<apeiros_> that line in and of itself is correct.
vikhyat_ has joined #ruby
<chrisftw> ok so something is wrong in the application
kn330 has joined #ruby
vikhyat has quit [Ping timeout: 272 seconds]
<chrisftw> ri IO#sync=
<chrisftw> what will this do?
<apeiros_> it will give you the docs of the `sync=` instance method on the class `IO`
<apeiros_> (# denotes instance methods, :: denotes class methods)
<chrisftw> it says
<chrisftw> nothing known about IO
<apeiros_> means you did not install the docs
<chrisftw> in bash on heroku
<apeiros_> did you use rvm?
<chrisftw> rvm erm
<chrisftw> erm
<jcrawford> apeiros_: could you direct me to something to read on the differences between what I showed?
<chrisftw> i downloaded the full rails install
<apeiros_> oh, heroku… no idea what their setup is…
<chrisftw> and bundle install
amaya_the has quit [Ping timeout: 276 seconds]
<jcrawford> i think i am off on when and why to use aliasing :)
<chrisftw> and then pushed
landho has quit [Ping timeout: 272 seconds]
<apeiros_> chrisftw: yeah, bundle is about gems. ri & rdocs is about proper ruby installation
<chrisftw> ok
<chrisftw> so erm
<chrisftw> what is missing?
<apeiros_> chrisftw: you have ruby on your own machine too?
<chrisftw> yes I do
<apeiros_> how did you install it?
<chrisftw> oh no
amaya_the has joined #ruby
Guest25746 has quit [Quit: Leaving]
Xeago has joined #ruby
<chrisftw> I erm installed: rubyinstaller-1.9.3-p362 (1).exe railsinstaller-2.1.0.exe DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe
<apeiros_> oh, windows
<apeiros_> my commiseration - rdoc.info or ruby-doc.org for you then.
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
<chrisftw> ah ok so I am missing some libraries?
Phoop has quit [Quit: Phoop]
Goles has quit [Quit: Computer has gone to sleep.]
foohey has quit [Quit: leaving]
koshii has quit [Ping timeout: 252 seconds]
foohey has joined #ruby
foohey has joined #ruby
foohey has quit [Changing host]
Xeago has quit [Ping timeout: 272 seconds]
Jasko has quit [Ping timeout: 245 seconds]
Virunga has joined #ruby
chrisftw has quit [Ping timeout: 245 seconds]
sheerun has quit [Quit: ZNC - http://znc.in]
notVert has quit [Read error: Connection reset by peer]
<jrabbit> pry is being "cute" about a unicode character how can I pass U+FFC3 so ruby understands it? (1.9)
ekristen has joined #ruby
<jcrawford> ok so after some testing alias_method and the other way I showed seem to output the exact same results
Virunga has quit [Remote host closed the connection]
<jcrawford> so i am not fully understanding this lol
<ekristen> I can't do anything with bundle -- it gets stuck at fetching gem metadata from http://rubygems.org
phelps has joined #ruby
bakis has quit [Ping timeout: 248 seconds]
banisterfiend has joined #ruby
phelps has quit [Client Quit]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<jcrawford> ahh i think i see the light :)
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
mikecmpbll has joined #ruby
skaczor has joined #ruby
hotovson has joined #ruby
DatumDrop has joined #ruby
samuel02 has joined #ruby
koshii has joined #ruby
jfl0wers has quit [Ping timeout: 272 seconds]
Jasko has joined #ruby
daniel_- has joined #ruby
DrCode has quit [Remote host closed the connection]
Nisstyre-laptop has quit [Read error: Operation timed out]
v0n has quit [Ping timeout: 272 seconds]
<Hanmac_> jcrawford: http://eval.in/5866
Goles has joined #ruby
hotovson has quit [Remote host closed the connection]
geekbri has joined #ruby
slainer68 has joined #ruby
DrCode has joined #ruby
Fox_candy has joined #ruby
sheerun has joined #ruby
<jcrawford> Hanmac_: thanks for that makes sense now so alias_method allows for all aliased methods to be executed rather than just the one
landho has joined #ruby
kevinfagan has joined #ruby
Edward__ has quit [Ping timeout: 245 seconds]
DatumDrop has quit [Ping timeout: 264 seconds]
<Hanmac_> but you need to be carefull with the alias name or you trap the code into an "stacklevel-to-deep loop"
pmros has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
sambio has joined #ruby
AlbireoX has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
moos3 has joined #ruby
adkron has quit [Ping timeout: 240 seconds]
AlbireoX has joined #ruby
mikecmpbll has quit [Quit: Computer has gone to sleep.]
reinaldob has quit [Remote host closed the connection]
phaidros has joined #ruby
<phaidros> I am having troubles with resque worker: actually it seems to ignore the PIDFILE variable. is here the right place to find out what to do ?
AlbireoX has quit [Ping timeout: 248 seconds]
nateberkopec has joined #ruby
pskosinski has joined #ruby
tvw has quit [Remote host closed the connection]
sepp2k has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
francisfish has joined #ruby
invisime has joined #ruby
nemesit has joined #ruby
mark_locklear has joined #ruby
rakl has joined #ruby
wreckimnaked has joined #ruby
<mpfundstein_home> is it possible to pass block to a other function if the block is not explicit declared within the argument list (for instance with &block)
elico has joined #ruby
benlieb has joined #ruby
daniel_- has quit [Ping timeout: 252 seconds]
<banisterfiend> mpfundstein_home: yes
<mpfundstein_home> ok how?
<mpfundstein_home> :-)
<banisterfiend> mpfundstein_home: just pass it, and the other method can call it with 'yield'
<mpfundstein_home> yes, but how can i pass it
pmros has quit [Quit: Konversation terminated!]
<banisterfiend> mpfundstein_home: just pass it
<mpfundstein_home> block_given? returns a bool, yield calls the block
<banisterfiend> i'll show u
<mpfundstein_home> where is my block variable actually :-)
ner0x has joined #ruby
<banisterfiend> it's not anywhere, it's just 'there' on the sack
<banisterfiend> stack
<mpfundstein_home> that was my assumption, so ill probably need a method ?
<banisterfiend> mpfundstein_home: https://gist.github.com/f3804f8f74a7fe8af1b4
mikecmpbll has joined #ruby
willob has joined #ruby
<mpfundstein_home> yes but than caller must have &block
elsifaka has quit [Read error: Connection reset by peer]
<banisterfiend> mpfundstein_home: well it doesn't have to
<banisterfiend> mpfundstein_home: watch this
<banisterfiend> mpfundstein_home: https://gist.github.com/3d832502920a6b2b9625
elsifaka has joined #ruby
Goles has quit [Remote host closed the connection]
<mpfundstein_home> will &Proc.new automatically use the current block given?
<banisterfiend> yes
<mpfundstein_home> AWESOME
<mpfundstein_home> SAUCE
<mpfundstein_home> thanks :-)
<banisterfiend> mpfundstein_home: but it's weird to do this, wy not just explicitly pass the block?
Goles has joined #ruby
mark_locklear has quit [Remote host closed the connection]
<banisterfiend> mpfundstein_home: implicit stuff is harder to grok, esp for people who have to maintain your code
<mpfundstein_home> /home/ubuntu/Projects/MyXiteRB/common/database.rb:46:in `new': tried to create Proc object without a block (ArgumentError)
<banisterfiend> mpfundstein_home: because you're not passing a block to caller
<mpfundstein_home> thats whay i thought -.-
<mpfundstein_home> its like this
wereHamster has quit [Changing host]
wereHamster has joined #ruby
<banisterfiend> mpfundstein_home: can you a minimal test case of your code?
<banisterfiend> show a*
<mpfundstein_home> i want raw_query to throw if no block is giving, otherwise yield the error
<mpfundstein_home> that works fine
<mpfundstein_home> but all the method which call raw_query should implement this behaviour automatically
<mpfundstein_home> i think i can do
<mpfundstein_home> raw_query string, block_given? ? &Proc.new : nil
<banisterfiend> mpfundstein_home: you're not showing how you call it
<mpfundstein_home> k mom
<banisterfiend> mpfundstein_home: dont be a dick
<banisterfiend> just provide a decent test case that reproduces your error
<mpfundstein_home> ah that will take time
<mpfundstein_home> i call it like this
<mpfundstein_home> create_database database do |e|
<mpfundstein_home> #ignore
<mpfundstein_home> #here we throw
<mpfundstein_home> end
<mpfundstein_home> use_database database
<mpfundstein_home> thats all
Goles has quit [Ping timeout: 248 seconds]
<banisterfiend> what do u mean "here we throw"
<banisterfiend> that's outside the method
<mpfundstein_home> here i let the method throw
<banisterfiend> and your 'end' should line up with create_database
<banisterfiend> mpfundstein_home: the correct word is 'raise' in ruby :)
<banisterfiend> throw is someting totally different
Oejet has joined #ruby
<mpfundstein_home> kkk , can we ignore this now :-)
<mpfundstein_home> i am at work so time hurries -.-
<mpfundstein_home> &Proc.new raises if no block is given
<banisterfiend> yes
<mpfundstein_home> so i can probably test against it
<banisterfiend> so check for block_given? first
<mpfundstein_home> i will try
<mpfundstein_home> precisely
<banisterfiend> so, it's resolved?
<mpfundstein_home> well
<mpfundstein_home> im on my way
<mpfundstein_home> thanks for the &Proc.new info
<banisterfiend> no problem, but try to avoid using it if u can
tommyvyo has joined #ruby
<banisterfiend> &block in the arg list is better
<mpfundstein_home> yes but than it is necessary
<mpfundstein_home> thats what i want to avoid
benlieb has quit [Quit: benlieb]
<banisterfiend> mpfundstein_home: no it's not necessary
<banisterfiend> &block does not imply a block MUST be provided
<banisterfiend> it just says IF a block is provided then store it in a local var called block
<mpfundstein_home> wait
<mpfundstein_home> i thought ill get an argument error than
Xeago has joined #ruby
<banisterfiend> no you wont
Goles has joined #ruby
<mpfundstein_home> hihi
<mpfundstein_home> thanks :D
<banisterfiend> mpfundstein_home: https://gist.github.com/eda47c279543e0f58a95
<mpfundstein_home> yeah it works already tried it
gregorg has joined #ruby
gregorg has quit [Changing host]
gregorg has joined #ruby
<mpfundstein_home> damn me, i thought when you use &block in the argument list, it is kind of an indicator that here we MUST use a block
<banisterfiend> mpfundstein_home: no, it's just set to nil if u dont get a block
<mpfundstein_home> thanks
<mpfundstein_home> that was the info i needed
workmad3 has joined #ruby
<mpfundstein_home> perfect
marr has quit [Ping timeout: 255 seconds]
kil0byte has joined #ruby
nomenkun has quit [Remote host closed the connection]
havenn has joined #ruby
nomenkun has joined #ruby
havenn has quit [Remote host closed the connection]
deadlytoah has quit [Ping timeout: 252 seconds]
kil0byte_ has quit [Ping timeout: 252 seconds]
kn330_ has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
daniel_- has joined #ruby
d2dchat has quit [Read error: Operation timed out]
ffranz has joined #ruby
iamjarvo has quit [Quit: Leaving.]
neurotech has quit [Remote host closed the connection]
amaya_the has quit [Ping timeout: 240 seconds]
lateau has quit [Read error: Connection reset by peer]
lateau has joined #ruby
d2dchat has joined #ruby
v0n has joined #ruby
otherj has joined #ruby
stopbit has quit [Quit: Leaving]
francisfish has quit [Ping timeout: 265 seconds]
francisfish has joined #ruby
jamescarr has joined #ruby
otherj has quit [Client Quit]
jfl0wers has joined #ruby
Jackneill has joined #ruby
Jackneill has quit [Changing host]
Jackneill has joined #ruby
jfl0wers has quit [Remote host closed the connection]
jfl0wers has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
samuel02 has quit [Remote host closed the connection]
phaidros has left #ruby [#ruby]
t6d has joined #ruby
deadlytoah has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
solidoodlesuppor has joined #ruby
dhruvasagar has joined #ruby
alex__c2022 has joined #ruby
jds has quit [Remote host closed the connection]
breakingthings has joined #ruby
willob has quit [Quit: Leaving.]
rondale_sc has joined #ruby
includex has joined #ruby
miskander has joined #ruby
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
sailias has joined #ruby
ewag has joined #ruby
sailias has quit [Client Quit]
xemu has joined #ruby
the_hack has joined #ruby
postmodern has quit [Quit: Leaving]
includex has quit [Quit: Leaving...]
lateau has quit [Remote host closed the connection]
Neomex has joined #ruby
lateau has joined #ruby
jeffreybaird has joined #ruby
Neomex has quit [Client Quit]
Elhu has quit [Quit: Computer has gone to sleep.]
philips_ has quit [Excess Flood]
francisfish has quit [Ping timeout: 264 seconds]
jerius has joined #ruby
<clocKwize> is it sometime yet
<clocKwize> hometime*
Uranio has joined #ruby
<clocKwize> 7am - ?
<clocKwize> 3pm me thinks
<mikecmpbll> if i have a long condition in an unless, can I stick it on the next line? i.e. foo = bar unless foobar
philips_ has joined #ruby
<mikecmpbll> line break after bar
hotovson has joined #ruby
<mikecmpbll> or do i have to use a block?
the_hack has quit [Quit: Computer has gone to sleep.]
mjolk has joined #ruby
<banisterfiend> mikecmpbll: what do u mean?
niklasb has joined #ruby
mjolk is now known as Guest84888
<mikecmpbll> yeah, that didn't make much sense, just looking for a way to make my code a bit more readable, without doing for a block
<mikecmpbll> for instance, in java, I can do a two line if statement, like:
<mikecmpbll> if blah
<mikecmpbll> [tab] do something
a_a_g has quit [Quit: Leaving.]
joshman_ has joined #ruby
<mikecmpbll> and the if statement will know to treat only the next line as part of the statement.
RagingDave has quit [Read error: Connection reset by peer]
francisfish has joined #ruby
Umren has quit [Ping timeout: 248 seconds]
jonathanwallace has joined #ruby
<banisterfiend> mikecmpbll: like this? https://gist.github.com/064331659bd6a3d95ff9
<mikecmpbll> without the block though
shemerey has joined #ruby
<mikecmpbll> wondering if there was a way to do it in two lines ;)
Guest84888 has quit [Read error: Connection reset by peer]
uris has joined #ruby
mjolk2 has joined #ruby
jds has joined #ruby
altamic has joined #ruby
altamic has quit [Client Quit]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
Umren has joined #ruby
ananthakumaran has joined #ruby
workmad3 has quit [Read error: Operation timed out]
willob has joined #ruby
Pip has quit [Remote host closed the connection]
RagingDave has joined #ruby
marr has joined #ruby
madwilliamflint has joined #ruby
carlyle has joined #ruby
bradleyprice has joined #ruby
cascalheira has joined #ruby
bluOxigen has joined #ruby
includex has joined #ruby
jaywastaken has joined #ruby
jaywastaken has quit [Changing host]
jaywastaken has joined #ruby
jamescarr has quit [Quit: jamescarr]
reinaldob has joined #ruby
TaylorOtwell has joined #ruby
huoxito has joined #ruby
miskander has quit [Quit: miskander]
iamjarvo has joined #ruby
Morkel has quit [Quit: Morkel]
chrisftw_ has joined #ruby
joshman_ has quit [Quit: Computer has gone to sleep.]
<chrisftw_> hi i have a simple question
<chrisftw_> (i hope)
<chrisftw_> my script works
<chrisftw_> on heroku
<chrisftw_> but when I close my CMD window the script stops
cascalheira81 has joined #ruby
<chrisftw_> how do I call it on heroku so it stays on after I disconnect from my shell session?
cascalheira has quit [Quit: Linkinus - http://linkinus.com]
sailias has joined #ruby
joofsh has joined #ruby
TaylorOtwell has left #ruby ["["Textual IRC Client: www.textualapp.com"]"]
blacktul_ is now known as blacktulip
<madwilliamflint> if it behaves like a normal unix session you should be able to use 'nohup <command> &'.
rondale_sc_ has joined #ruby
ror-inx has quit [Remote host closed the connection]
carlyle has quit [Remote host closed the connection]
seventotheseven has joined #ruby
rondale_sc has quit [Ping timeout: 276 seconds]
rondale_sc_ is now known as rondale_sc
karasawa has joined #ruby
kil0byte_ has joined #ruby
jonathanwallace has quit [Ping timeout: 252 seconds]
Hanmac_ has quit [Ping timeout: 245 seconds]
kil0byte has quit [Ping timeout: 248 seconds]
the_hack has joined #ruby
<chrisftw_> thanks madwilliamflint
daniel_- has quit [Ping timeout: 252 seconds]
frogstarr78 has quit [Remote host closed the connection]
<_bart> Hi, I noticed it is possible to add an element using 'Feedzirra::Feed.add_common_feed_entry_element("dt:whois", :as => :whois)'
kpshek has joined #ruby
samphippen has joined #ruby
lateau has quit [Read error: Connection reset by peer]
<_bart> but how do I add a 'collection' node, because .entries only gets the root items.
lateau has joined #ruby
koshii has quit [Ping timeout: 264 seconds]
stopbit has joined #ruby
lateau has quit [Remote host closed the connection]
lateau has joined #ruby
ffranz has quit [Quit: Leaving]
frogstarr78 has joined #ruby
chrisftw_ has quit [Quit: Page closed]
frogstarr78 has quit [Remote host closed the connection]
cascalheira81 has quit [Read error: Connection reset by peer]
frogstarr78 has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
clocKwize has quit [Quit: clocKwize]
megharsh has quit [Quit: WeeChat 0.3.9.2]
Xeago has joined #ruby
koshii has joined #ruby
norm has left #ruby [#ruby]
thone_ has joined #ruby
Astral_ has joined #ruby
bean has joined #ruby
ffranz has joined #ruby
ffranz has quit [Client Quit]
Fox_candy2 has joined #ruby
sayan has joined #ruby
cascalheira has joined #ruby
Fox_candy has quit [Ping timeout: 255 seconds]
thone has quit [Ping timeout: 245 seconds]
ffranz has joined #ruby
kil0byte has joined #ruby
Astralum has quit [Ping timeout: 256 seconds]
kil0byte has quit [Remote host closed the connection]
jfl0wers has quit [Quit: jfl0wers]
jekotia has joined #ruby
pats_Toms has joined #ruby
larissa has quit [Quit: Leaving]
kil0byte_ has quit [Ping timeout: 260 seconds]
akemrir has joined #ruby
jfl0wers has joined #ruby
Umren|2 has joined #ruby
stevechiagozie has joined #ruby
workmad3 has joined #ruby
artm has joined #ruby
Umren has quit [Ping timeout: 265 seconds]
frogstarr78 has quit [Remote host closed the connection]
karl_______ has joined #ruby
phaidros has joined #ruby
<phaidros> can rake give back the pid of a started task?
<phaidros> e.g. for rake resque:work ..
tagrudev has quit [Remote host closed the connection]
<karl_______> I'm not sure that there is actually a difference here - but is it possible to print something to console without having it go to standard out? I'd like to display more verbose information on the console, but not have it carry when I redirect output to a file (using tee)
LyonJT_ has quit [Quit: Linkinus - http://linkinus.com]
_nitti has joined #ruby
<apeiros_> karl_______: there's $stdout and $stderr
<karl_______> apeiros_: does stderr print to console?
philcrissman_ has joined #ruby
beneggett has joined #ruby
willob has quit [Ping timeout: 252 seconds]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mikecmpbll has joined #ruby
frogstarr78 has joined #ruby
blueOxigen has joined #ruby
willob has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
bluOxigen has quit [Ping timeout: 264 seconds]
<apeiros_> karl_______: if you don't redirect it, yes
asteve has joined #ruby
<waxjar> karl_______, you can check if you're printing to a console or whatever i believe with #tty?
mpereira has joined #ruby
<karl_______> waxjar: not sure, but apeiros_ helped solve my dilemma - I can just watch 2 different files
nemesit has quit [Quit: Leaving...]
<waxjar> :)
hack has joined #ruby
ewnd9 has joined #ruby
pats_Toms has left #ruby [#ruby]
tk___ has quit [Quit: ばいばい]
enroxorz-work has joined #ruby
enroxorz-work has quit [Changing host]
enroxorz-work has joined #ruby
miskander has joined #ruby
nga4 has joined #ruby
benlieb has joined #ruby
hooopo has joined #ruby
workmad3 has joined #ruby
<karl_______> apeiros_: thanks kindly for your help
joast has quit [Quit: Leaving.]
<apeiros_> makes me wonder
<apeiros_> can you actually just tie any amount of fd's to the tty?
beneggett has quit [Quit: Computer has gone to sleep.]
<apeiros_> and use the numbers for redirections?
<apeiros_> i.e. you open fd 5 in the script, and outside the script you can redirect it too, like `yourscript 5>somefile`
Pip has joined #ruby
zigomir has quit [Quit: zigomir]
zigomir has joined #ruby
zigomir has quit [Client Quit]
joast has joined #ruby
skaczor has quit [Remote host closed the connection]
skaczor has joined #ruby
adeponte has joined #ruby
ananthakumaran1 has joined #ruby
karasawa has quit [Ping timeout: 264 seconds]
maasha has joined #ruby
a_a_g has joined #ruby
ananthakumaran has quit [Ping timeout: 248 seconds]
<maasha> hiyas
Banistergalaxy has quit [Ping timeout: 255 seconds]
jlast has joined #ruby
mrdtt has joined #ruby
Banistergalaxy has joined #ruby
<maasha> I want to use a C program in a tight loop. Currently I have system(command file1 file2), but that is inefficient because I have to write the files file1 and file2 first. What can be done?
kn330_ has quit [Quit: Ex-Chat]
<maasha> the C program takes two files as arguments and does not read from stdin.
<apeiros_> pipes are files
<maasha> apeiros_: so what to do? popen3?
<apeiros_> IO.pipe creates a pipe. don't know how to go from there.
jrajav has joined #ruby
<maasha> apeiros_: hrm, ok
stkowski has joined #ruby
jamescarr has joined #ruby
karasawa has joined #ruby
rondale_sc_ has joined #ruby
jkarayusuf has joined #ruby
cascalheira has quit [Ping timeout: 276 seconds]
<maasha> O_o
shemerey has quit [Quit: Linkinus - http://linkinus.com]
stkowski has quit [Client Quit]
vlad_starkov has joined #ruby
stkowski has joined #ruby
rondale_sc has quit [Ping timeout: 272 seconds]
rondale_sc_ is now known as rondale_sc
theRoUS has quit [Quit: Leaving]
jonahR has joined #ruby
jds has quit [Remote host closed the connection]
jprovazn has quit [Quit: Leaving]
<mpfundstein_home> maasha: do you have the source code from the C program?
jgarvey has joined #ruby
Elhu has joined #ruby
hooopo has quit [Quit: 离开]
zastern has joined #ruby
d2dchat has quit [Remote host closed the connection]
ewag has quit [Ping timeout: 248 seconds]
<maasha> mpfundstein_home: yeah. but I'd rather not mess with it.
<mpfundstein_home> maasha: if the c program doesnt take stdin as input you can't pipe to it. but its rather trivial to write some code which can do it. is the program open source?
DarkFoxDK has quit [Read error: Operation timed out]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
<maasha> mpfundstein_home: its got some princeton uni license: http://pastie.org/5616677
seventotheseven has quit [Ping timeout: 255 seconds]
t6d has quit [Quit: t6d]
<maasha> mpfundstein_home: you tell me :oD - I dont quite understand what it says ... :oD
<mpfundstein_home> maasha: you can modify it
<mpfundstein_home> maasha: but if you redistribute it you have to open source it and put the header on top
t6d has joined #ruby
darthdeus has quit [Quit: Linkinus - http://linkinus.com]
DarkFoxDK has joined #ruby
cascalheira has joined #ruby
<mpfundstein_home> maasha: or you probably dont even have to open source. but nevermind. if you want performance you should add some code to the program. if you want i can help you
<maasha> mpfundstein_home: I could, but the code is a bit of a mess. I think the data files are actually opened twice each. Once by some cpp program and once by a c program.
mmitchell has joined #ruby
mephux has quit [Remote host closed the connection]
<maasha> mpfundstein_home: I am not really with C and C++ I never touched.
verma has quit [Ping timeout: 255 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
russfrank has quit [Ping timeout: 260 seconds]
mlue has quit [Ping timeout: 255 seconds]
<maasha> mpfundstein_home: http://compbio.cs.princeton.edu/mems/
stevechiagozie has quit [Ping timeout: 240 seconds]
wang has quit [Ping timeout: 260 seconds]
verma has joined #ruby
russfrank has joined #ruby
mlue has joined #ruby
mlue has joined #ruby
mlue has quit [Changing host]
wang has joined #ruby
baroquebobcat has joined #ruby
rondale_sc_ has joined #ruby
mephux has joined #ruby
madhadron has left #ruby [#ruby]
<mpfundstein_home> maasha: the input file gets opened in fasta.cpp
<mpfundstein_home> maasha: the function is load_fasta
<mpfundstein_home> maasha: you can try
<mpfundstein_home> but that is really a hack if it works
<maasha> mpfundstein_home: yes, but the metadata (a name in the file) is read from mummer.cpp as far as I can tell.
<mpfundstein_home> ifstream data(filename.c_str());
rondale_sc has quit [Ping timeout: 265 seconds]
rondale_sc_ is now known as rondale_sc
<mpfundstein_home> rewrite it to data("/dev/stdin")
eldariof has joined #ruby
<maasha> mpfundstein_home: so, how do you make sure that the data from file1 and file2 is treated separately?
miskander has quit [Quit: miskander]
Morkel has joined #ruby
woolite64 has joined #ruby
rondale_sc has quit [Quit: rondale_sc]
<mpfundstein_home> wow the code is really messy
<mpfundstein_home> :D
m_3 has quit [Quit: leaving]
<maasha> mpfundstein_home: the code is brilliant!
karasawa has quit [Quit: Lost terminal]
<maasha> mpfundstein_home: but it is terrible to read :o)
<mpfundstein_home> yes
<mpfundstein_home> i like the variable names :-)
karasawa has joined #ruby
<maasha> computer scientist should stick to writing code on paper
m_3 has joined #ruby
havenn has joined #ruby
piotr__ has quit [Ping timeout: 272 seconds]
Rydefalk has joined #ruby
<mpfundstein_home> ok
<mpfundstein_home> so
<mpfundstein_home> the first file he opens, on the main trhead is your input file
philcrissman_ is now known as philcrissman
obryan has joined #ruby
<mpfundstein_home> the other ones are reference files
<mpfundstein_home> right?
<maasha> mpfundstein_home: so, files are accessed from mummer.cpp and fasta.cpp. Its the same files and they are fasta data. that is some form of ASCII pseudo table where you have a line starting with >follwed by a name. subsequent lines are data until the next >name
jfl0wers has quit [Quit: jfl0wers]
<mpfundstein_home> they dont have to be the same file
<mpfundstein_home> string ref_fasta = argv[optind];
<mpfundstein_home> query_fasta = argv[optind+1];
generalissimo has joined #ruby
<mpfundstein_home> ref_fasta is the one which gets parsed on the main tread from fasta.cpp, query_fasta from mummer.cpp
<maasha> mpfundstein_home: the first FASTA entry - if we feed all entries to the program using stdin - should be the reference, and the remaining entries are the query
<mpfundstein_home> "sa" carries the information from the first file parsed to the ref_query thread
<maasha> hm
<mpfundstein_home> load_fasta(ref_fasta, ref, refdescr, startpos);
<mpfundstein_home> here the first one gets parsed
<maasha> why does he not use the fasta.cpp to parse both files?
<mpfundstein_home> than he creates the global description object
<mpfundstein_home> sa = new sparseSA(ref, refdescr, startpos, _4column, K);
<mpfundstein_home> launches threads
<mpfundstein_home> // Create joinable threads to find MEMs.
<mpfundstein_home> for(int i = 0; i < query_threads; i++)
<mpfundstein_home> pthread_create(&thread_ids[i], &attr, query_thread, (void *)&args[i]);
<mpfundstein_home> and than in query_threads he "compares???" or whatever this algo does..
<maasha> mpfundstein_home: hm, maybe we should move this discussion to a more private place?
<mpfundstein_home> better
<maasha> #sparsemem
_bart has quit [Ping timeout: 272 seconds]
deadlytoah has quit [Ping timeout: 272 seconds]
yshh has quit [Read error: Connection reset by peer]
jfl0wers has joined #ruby
mybrainis301 has joined #ruby
yshh has joined #ruby
m4n has quit [Ping timeout: 264 seconds]
mybrainis301 has quit [Client Quit]
jds has joined #ruby
mikecmpbll has quit []
mikecmpbll has joined #ruby
timmow has quit [Ping timeout: 252 seconds]
adeponte has quit [Remote host closed the connection]
anachronistic has joined #ruby
the_hack has quit [Quit: Computer has gone to sleep.]
andrewhl has joined #ruby
jjbohn has joined #ruby
elux has joined #ruby
jds has quit [Remote host closed the connection]
philcrissman has quit [Remote host closed the connection]
jds has joined #ruby
stevechiagozie has joined #ruby
jfl0wers has quit [Quit: jfl0wers]
timmow has joined #ruby
artm has quit [Quit: artm]
jonahR has quit [Quit: jonahR]
Yaku has joined #ruby
mybrainis301 has joined #ruby
mybrainis301 has left #ruby [#ruby]
jonahR has joined #ruby
philcrissman has joined #ruby
aganov has quit [Remote host closed the connection]
schaerli has joined #ruby
stkowski has quit [Quit: stkowski]
elsifaka has quit [Remote host closed the connection]
stkowski has joined #ruby
francisfish has quit [Remote host closed the connection]
hoelzro is now known as hoelzro|away
francisfish has joined #ruby
rakl has quit [Quit: sleeping]
lirimaery has joined #ruby
karasawa has quit [Ping timeout: 240 seconds]
cdt has joined #ruby
karasawa has joined #ruby
rontec76 has joined #ruby
francisfish has quit [Ping timeout: 265 seconds]
nemesit has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
Oejet has left #ruby [#ruby]
x82_nicole has joined #ruby
polymar has quit [Remote host closed the connection]
xAndy is now known as xandy
jrajav has quit [Quit: I tend to be neutral about apples]
Fox_candy2 has quit [Ping timeout: 276 seconds]
benlieb has quit [Read error: Connection reset by peer]
benlieb has joined #ruby
blazes816 has joined #ruby
mahmoudi_ has joined #ruby
joeycarmello has joined #ruby
jerius has quit []
breakingthings has quit [Read error: Connection reset by peer]
emocakes has quit [Quit: emocakes]
breakingthings has joined #ruby
rakl has joined #ruby
cakehero has joined #ruby
cakehero has quit [Max SendQ exceeded]
wardr0id has joined #ruby
dmiller has joined #ruby
cakehero has joined #ruby
cakehero has quit [Max SendQ exceeded]
Fox_candy has joined #ruby
koshii has quit [Ping timeout: 240 seconds]
cakehero has joined #ruby
fir_ed has joined #ruby
cakehero has quit [Max SendQ exceeded]
<lirimaery> hi guys, can someone help me to figure out why block passed to send is not called?
Fox_candy has quit [Client Quit]
snorkdude has joined #ruby
snorkdude has quit [Client Quit]
<lirimaery> when I call send then "I am here" is not outputed
jjbohn has quit [Quit: Linkinus - http://linkinus.com]
jgrevich has joined #ruby
Hanmac_ has joined #ruby
mpfundstein_home has quit [Ping timeout: 255 seconds]
jjbohn has joined #ruby
piotr_ has joined #ruby
hayleybarker has joined #ruby
<lirimaery> basically I create methods dynamically
<lirimaery> these methods are supposed to take a block as a parameter
jerius has joined #ruby
<lirimaery> when I call send and pass to it block then it is not called
BoomCow has joined #ruby
<lirimaery> ehhh
swi7ch has quit [Quit: Connection closed for inactivity]
ewag has joined #ruby
adeponte has joined #ruby
Guest68672 is now known as ixx
maletor has joined #ruby
mafolz has quit [Quit: mafolz]
miskander has joined #ruby
maasha has quit [Quit: Page closed]
nwertman has joined #ruby
jgrevich has quit [Ping timeout: 244 seconds]
workmad3 has joined #ruby
piotr_ has quit [Remote host closed the connection]
cschneid has joined #ruby
JoeJulian has quit [Quit: ZNC - http://znc.sourceforge.net]
JoeJulian has joined #ruby
dhruvasagar has quit [Ping timeout: 255 seconds]
wreckimnaked has quit [Ping timeout: 264 seconds]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<Eiam> is there a way in Curb (ruby bindings) to generate the request as an actual curl for diagnostic purposes?
smeagol has joined #ruby
kenneth has quit [Quit: kenneth]
piotr_ has joined #ruby
breakingthings has quit []
Jasko has quit [Read error: Connection reset by peer]
Jasko has joined #ruby
Astral_ has quit [Read error: Connection reset by peer]
mahmoudi_ is now known as _mahmoudimus
Astral_ has joined #ruby
MattRb has joined #ruby
fms has joined #ruby
xandy is now known as xAndy
obryan has quit [Quit: Konversation terminated!]
_mahmoudimus is now known as mahmoudimus
benlieb has quit [Read error: Connection reset by peer]
slash_nick has joined #ruby
benlieb has joined #ruby
includex has quit [Quit: Leaving...]
jduan1981 has joined #ruby
cascalheira has quit [Ping timeout: 260 seconds]
solidresolve has quit [Remote host closed the connection]
rontec76 has quit [Remote host closed the connection]
solidresolve has joined #ruby
akemrir has quit [Quit: WeeChat 0.3.9.2]
pwelch has joined #ruby
d2dchat has joined #ruby
RagingDave has quit [Read error: Connection reset by peer]
RagingDave_ has joined #ruby
cascalheira has joined #ruby
jonathanwallace has joined #ruby
jdripper has quit [Quit: Leaving.]
smeagol has left #ruby ["Leaving..."]
stevechiagozie has quit [Quit: stevechiagozie]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
workmad3 has quit [Ping timeout: 240 seconds]
mockra has joined #ruby
mrdtt has quit [Quit: mrdtt]
sambio has quit [Ping timeout: 248 seconds]
fms is now known as ebobby
lentil has joined #ruby
jfl0wers has joined #ruby
jblack has joined #ruby
fourq has joined #ruby
S2kx has joined #ruby
stevechiagozie has joined #ruby
ddsss has joined #ruby
kevinfagan has quit [Quit: Leaving...]
cascalheira has quit [Ping timeout: 272 seconds]
nemesit|osx has joined #ruby
kenneth has joined #ruby
nwertman has quit [Ping timeout: 255 seconds]
Chryson has joined #ruby
hackerdude has joined #ruby
clocKwize has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
dmiller has quit [Remote host closed the connection]
nemesit has quit [Ping timeout: 248 seconds]
BoomCow has quit [Quit: Leaving]
benlieb has quit [Quit: benlieb]
S2kx has quit [Quit: Leaving]
chrismcg is now known as zz_chrismcg
jamescarr has quit [Quit: jamescarr]
Spami has quit [Quit: This computer has gone to sleep]
roman_m has joined #ruby
stevechiagozie has quit [Read error: Connection reset by peer]
rdark has quit [Quit: leaving]
jamescarr has joined #ruby
yshh has quit [Remote host closed the connection]
MattRb has quit [Quit: MattRb]
jonathanwallace has quit [Read error: No route to host]
io_syl has joined #ruby
jonathanwallace has joined #ruby
SeanLazer has joined #ruby
nwertman has joined #ruby
<SeanLazer> hi, i'm trying to download a file from a website, and the URL is something like http://website.com/getFile.php?fileId=2039
jds has quit [Remote host closed the connection]
stevechiagozie has joined #ruby
slainer68 has quit [Remote host closed the connection]
<SeanLazer> when i grab the file through a browser it gets delivered with a proper filename, does anyone know how i can grab that filename when i'm downloading the file via ruby?
roman_m has quit []
roman_m has joined #ruby
MattRb has joined #ruby
a_a_g has quit [Quit: Leaving.]
dankest has joined #ruby
workmad3 has joined #ruby
cdt has quit [Ping timeout: 260 seconds]
Driscoll has joined #ruby
<canton7> it's in one of the http headers iirc
roman_m has quit [Client Quit]
<lentil> SeanLazer: the filename is probably in a Content-Disposition header. If you are using NET::HTTP then the response you get back should let you access the headers with hash access
b0oh has joined #ruby
<lentil> usually looks something like "Content-Disposition: attachment; filename='blah.txt'"
Neomex has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
Neomex has quit [Client Quit]
wuzzzzaah has quit [Quit: wuzzzzaah]
jfl0wers has quit [Quit: jfl0wers]
yshh has joined #ruby
philcrissman has quit [Remote host closed the connection]
jonahR has quit [Quit: jonahR]
stevechiagozie has quit [Read error: Connection reset by peer]
hayleybarker has quit [Quit: hayleybarker]
philcrissman has joined #ruby
stevechiagozie has joined #ruby
<ner0x> Is there something I can put in a ruby file to tell it to ignore everything after that keyword?
jrajav has joined #ruby
karasawa has quit [Ping timeout: 240 seconds]
<slash_nick> like a comment?
<slash_nick> =begin
<ner0x> Perl has __END__
<ner0x> Something comparable to that would do nicely.
<Hanmac_> slash_nick you also need to end it with =end
<slash_nick> aw Hanmac_ is the end required?
<Hanmac_> yeah =begin needs ans coresponding =end
<apeiros_> ner0x: __END__
<apeiros_> just as the very way perl does it, which you mentioned
browndawg has quit [Quit: Leaving.]
bricker_ has joined #ruby
<slash_nick> neato
<ner0x> apeiros_: Fantastic.
ewnd9 has quit [Remote host closed the connection]
baroquebobcat_ has joined #ruby
<ner0x> apeiros_: Always loved that. __DATA__ the same as well?
<apeiros_> just DATA, since __DATA__ would be a local variable
bricker_ has quit [Client Quit]
<RubyPanther> oh, I guess you have to call #to_s because it will be a hash if the attacker added query params
<apeiros_> DATA only reads the data of $0 ($PROGRAM_NAME), not of __FILE__
bricker has quit [Remote host closed the connection]
<apeiros_> if you want that, check my scriptfile repo
<ner0x> apeiros_: Link?
bricker has joined #ruby
<RubyPanther> bitten by a saber-toothed duck!
<apeiros_> should release that as a gem…
<RubyPanther> oops wrong channel
<ner0x> apeiros_: Definitely should.
<ner0x> RubyPanther: I'd love to know where that is on-topic. lol
<ner0x> apeiros_: Consider me a tester.
havenn has quit [Remote host closed the connection]
<slash_nick> role playing?
<RubyPanther> ner0x: rails, and the security alert
MarcWeber has joined #ruby
<RubyPanther> your params are the ducks :)
<apeiros_> lol, that thing is over 5 years old already. damn I'm old :D
havenn has joined #ruby
<ner0x> Oh. Just saw that. lol
sn0wb1rd has joined #ruby
<apeiros_> might have flaws with 1.9
<apeiros_> feel free to send me pull requests :)
<RubyPanther> I'm only speculating on the problem based on the patch in the alert :)
<MarcWeber> I need a http proxy which injects some code. Is em-proxy a good solution? I don't see how I can operate on requests - there are only up and down streams
<Hanmac_> apeiros_ i need to play with DATA ... and with rewind :P
baroquebobcat has quit [Ping timeout: 252 seconds]
baroquebobcat_ is now known as baroquebobcat
<apeiros_> (it's probably mostly just about passing on arguments to File/super)
a_a_g has joined #ruby
matchaw_ has quit [Ping timeout: 272 seconds]
vikhyat has joined #ruby
havenn has quit [Read error: No route to host]
elico has quit [Quit: elico]
havenn has joined #ruby
vikhyat_ has quit [Ping timeout: 272 seconds]
jamescarr has quit [Quit: jamescarr]
generalissimo is now known as general_cuddles
ffranz has quit [Ping timeout: 240 seconds]
sayan has quit [Ping timeout: 240 seconds]
bean has quit [Quit: Computer has gone to sleep.]
jonahR has joined #ruby
jds has joined #ruby
ffranz has joined #ruby
cascalheira has joined #ruby
the_hack has joined #ruby
whowantstolivef1 has joined #ruby
jfl0wers has joined #ruby
hayleybarker has joined #ruby
mercwithamouth has joined #ruby
breakingthings has joined #ruby
sepp2k has quit [Ping timeout: 252 seconds]
the_hack has quit [Client Quit]
Russell^^ has joined #ruby
moos3 has quit [Remote host closed the connection]
timmow has quit [Quit: is having a nap]
sayan has joined #ruby
ashp has joined #ruby
moeSeth_ has joined #ruby
cascalheira has quit [Ping timeout: 248 seconds]
<Eiam> we have a bunch of projects that use various "mini gems" that we maintain. So often times one change requires changing a few parts of the various gems beacuse we are adding functionality etc. this is causing me no end to sadness as when I'm *not* developing on one of the gems, my gemfile points to the repo master, which does't have its version file bumped so its often a few commits behind. I'd like to make it so when I'm doing
<Eiam> development, it uses whats in my local repo
<Eiam> but doing group :development do gem "my-gem", git=> doesn't work
<ashp> Anyone know a clean/easy way to sort a nested hash consistantly so that it always writes out this JSON blob the same each time? I'm tired of enormous diffs.
<Eiam> because I can't define the gem twice
<Eiam> once in development and once outside
thatguycraig has joined #ruby
<ashp> I found a way to do it on the top level keys but that's not quite what I want :)
<ryanf> ashp: can't you just write a method that takes your top-level one and applies it recursively
<Eiam> about this is all I can find
jrist is now known as jrist-lunch
jds has quit [Ping timeout: 265 seconds]
<ashp> ryanf: Not sure I understand, all I ended up with was env2 = env.keys.sort.map { |k| [k, env[k]] } and then JSON.pretty_generate(env2)
matchaw_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
Kuifje has joined #ruby
Kuifje has joined #ruby
enroxorz-work has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
ananthakumaran1 has quit [Quit: Leaving.]
fermion has quit [Quit: P]
<SegFaultAX> What's the best gem template to use?
Takehiro has quit [Remote host closed the connection]
<rking> SegFaultAX: bundle gem
<ryanf> oh oops
lmfao has joined #ruby
beneggett has joined #ruby
h4mz1d has joined #ruby
Spami has joined #ruby
<ryanf> ok, fixed
schaerli has quit [Remote host closed the connection]
miskander has quit [Quit: miskander]
skaczor has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
skaczor has joined #ruby
ananthakumaran has joined #ruby
<rking> ryanf: I like the class Hash; def recursive_sort version better.
Spaceghostc2c has quit [Excess Flood]
<SegFaultAX> rking: Also, when is it appropriate to put something in gemspec vs. putting it in Gemfile?
<rking> SegFaultAX: 100% of my gems' Gemspecs say: source :rubygems; gemspec but that gets tweaked if I'm doing dev and need a git version of something.
sepp2k has joined #ruby
Agbeladem has joined #ruby
kpshek has quit []
<SegFaultAX> rking: But when you're done doing dev you remove that from Gemfile?
<Agbeladem> I can't find each in File's documentation ??
<rking> (Because the Gem::Specification cannot say all the same things a Gemfile can)
<rking> BTW I meant Gemfile not Gemspecs above
<Agbeladem> http://www.ruby-doc.org/core-1.9.3/File.html : no "each" method
miskander has joined #ruby
Spaceghostc2c has joined #ruby
elux has quit [Quit: Bye!]
piotr_ has quit [Read error: Connection reset by peer]
<rking> SegFaultAX: That would depend. I sometimes find myself with a dependency I want to rapidly develop, so I'll 'git submodule add git@github.com/rking/child lib/child' it underneath the parent dir, then do 'gem "child", path: "lib/child"'
<Hanmac_> Agbeladem the each method is in IO
<rking> Then that might be that way for quite a while, but after it settles down, I'll go back to using the rubygem for 'child'
DrCode has quit [Excess Flood]
<Agbeladem> Hanmac_: oh
kpshek has joined #ruby
dnyy has joined #ruby
<SegFaultAX> rking: So what's the difference between putting a gem in Gemfile vs. putting it in gemspec for a gem developer?
enroxorz-work has joined #ruby
workmad3 has quit [Ping timeout: 276 seconds]
jamescarr has joined #ruby
DrShoggoth has joined #ruby
DrCode has joined #ruby
dmerrick has quit [Read error: Connection reset by peer]
chriskk has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
a_a_g has quit [Quit: Leaving.]
Glacer232 has joined #ruby
<rking> SegFaultAX: The only things I know are, 1) if you say gem.add_development_dependency then people can gem install foo --development 2) The Gemfile can be more expressive, such as having '~> 1.2.3' and 'github:' versions.
<ryanf> SegFaultAX: if you put it in the gemspec with add_dependency or add_runtime_dependency, end users who install the gem will also install the dependency
<ryanf> yeah, that
frogstarr78 has quit [Remote host closed the connection]
dmerrick has joined #ruby
<rking> Oh wait, are we talking about the actual gem deps?
wallerdev has joined #ruby
<ryanf> I don't know, just wanted to cover all the bases :)
<rking> Then unquestionably they need to be in the .gemspec
<rking> Yeah, good catch. I could be talking about the completely wrong problem
beneggett has quit [Quit: Computer has gone to sleep.]
reinaldob has quit [Remote host closed the connection]
<rking> I don't know who does gem install foo --development. Any time I want to develop something I'll just clone && bundle
<kenneth> hey, in the pry console, what gets printed is a .to_s of whatever object the expression evaluates to, right?
<kenneth> how would i hide a member ivar from the output without implementing my own full .to_s?
chrisftw_ has joined #ruby
<rking> kenneth: Hrm, I don't remember, because I use awesome_print, which definitely doesn't just do that.
<shevy> hmm when I use .add_dependency in a gemspec file
chrisftw_ has left #ruby [#ruby]
<shevy> and one dependency there depends on another dependency
<shevy> do I specify both, or just the one lateron that already requires the other dependency?
jonahR has quit [Quit: jonahR]
<shevy> hmm nevermind, I will just list both deps
sumeetjain_ has joined #ruby
llaskin has joined #ruby
<llaskin> so I run the following command a = system "ssh SERVER \"svn info /svn/ |grep '^URL:' | sed -e 's/^URL: //'\"" how can I get a to be equal to the URL, and not to "true"?
<banisterfiend> kenneth: pry uses pretty_inspect by deafult
jonahR has joined #ruby
rezzack has joined #ruby
<llaskin> ahah back ticks
<sumeetjain_> Solr question: I'd like to skip reindexing a model entirely - until I finish running some interactions on its records. Is this possible? http://stackoverflow.com/questions/14145544/can-i-instruct-solr-sunspot-to-skip-reindexing-for-a-block-of-code
llaskin has left #ruby [#ruby]
<rking> shevy: I keep it short and only mention the direct dependency.
RagingDave_ is now known as RagingDave
<shevy> rking hmm ok
<shevy> minimalism for the win!
jjbohn is now known as jjbohn|afk
ddsss has left #ruby ["WeeChat 0.3.9.2"]
<rking> As minimal as possible, but no minimaller.
<banisterfiend> rking: it would be cool if you put that listen thing in a gem and added a few k00 commands
<ryanf> kenneth: it's actually the output of .inspect, which calls .to_s by default
<jblack> damn. The more I work with ruby, the better I like it.
jonathanwallace has quit [Ping timeout: 240 seconds]
dan__ has joined #ruby
dan__ is now known as Guest12668
<jblack> It feels like all of the hard parts of my job are already done when I take on a project. =)
geekbri has quit [Remote host closed the connection]
b0oh has quit [Quit: Leaving.]
daniel_- has joined #ruby
<Agbeladem> I have a latin1 file, how do I open it ? I'm getting " invalid byte sequence in UTF-8" so far when browsing it
<shevy> what a strange project
<swarley> What's the encoding?
<ryanf> swarley: latin-1
<shevy> " Vigil is truly vigilant about not allowing code that fails to pass programmatic specifications."
<Agbeladem> swarley: latin-1 = ISO-8850-1
<ryanf> Agbeladem: you can set the encoding when you open the file
<Agbeladem> 8859*
<ryanf> it's in the file docs
<ryanf> or something
<ryanf> the io docs
<ryanf> somewhere
<Agbeladem> ha…
<rking> shevy: That's like the Eiffel language
* Hanmac_ waits so someone trys to install ruby1.9.3-p362 because its standing in the topic :D
<swarley> File.open(filename, encoding: <YourEncodingHere>)
<rking> Agbeladem: Are you not allowed to convert it to UTF-8?
<swarley> :encoding => <YourEncodingHere> if you want to be compatible
lmfao is now known as mpfundstein
<Agbeladem> swarley: oh
cakehero has joined #ruby
<Agbeladem> rking: I'd prefer not to
<shevy> rking hmmm I never tried eiffel... but apeiros_ liked parts of it, is all I remember
cakehero has quit [Max SendQ exceeded]
<swarley> Encoding::ISO8859_1
wermel has quit [Remote host closed the connection]
<swarley> There you go. Try that
cakehero has joined #ruby
cakehero has quit [Max SendQ exceeded]
<swarley> oh uhm
baphled has joined #ruby
<swarley> f = File.open("iso-8859-1.txt", "r:iso-8859-1:utf-8")
<swarley> Agbeladem; ^ try that
<Agbeladem> swarley: :encoding worked
cakehero has joined #ruby
<swarley> oh neat. So I wasn't wrong
<swarley> \o/
cakehero has quit [Max SendQ exceeded]
<Agbeladem> swarley: also, I have "��" characters in it
<apeiros_> shevy: yeah, vigil's approach at correctness is a rather bad image of eiffels contracts
arturaz has quit [Remote host closed the connection]
<Agbeladem> --'
<swarley> all I see are question marks
cakehero has joined #ruby
<Agbeladem> those are supposed to be special whitespaces
<swarley> I loved Eiffel when I was looking at it
lentil has left #ruby [#ruby]
<swarley> Oh, okay
<Agbeladem> any way I could trim my strings ?
<apeiros_> swarley: most files are not ISO8859_1 but Windows_1252
<apeiros_> (Windows_1252 is a superset of iso8859-1)
cakehero has quit [Max SendQ exceeded]
<shevy> apeiros_ oh. yeah that was it... contracts. I think you mentioned that years ago (or perhaps I mix that up with you liking hypercard hehe)
arturaz has joined #ruby
<apeiros_> shevy: no, you're correct.
<swarley> Agbeladem; trim in what way?
arturaz has quit [Remote host closed the connection]
<apeiros_> I think DBC is an awesome concept and it's a shame so few languages copy it
<apeiros_> it's also a shame that ruby doesn't provide language primitives to support it
cakehero has joined #ruby
<Agbeladem> swarley: It's a csv file. I split lines with ';' but then I'm getting elements like "��10" instead of "10"
huntercoool has joined #ruby
cakehero has quit [Max SendQ exceeded]
<swarley> Oh. file_test.gsub!(/�|�/, '')
<Agbeladem> considering those are non-breaking whitespace, I'm hoping there is a good way to get rid of them by splitting my elements
<swarley> I can only assume
Takehiro has joined #ruby
<Agbeladem> fair enough
<swarley> Unless the content is important. Since that would just destroy them
cakehero has joined #ruby
clocKwize has quit [Quit: clocKwize]
<Agbeladem> swarley: lib/csv_importer.rb:18:in `gsub': incompatible encoding regexp match (UTF-8 regexp with ISO-8859-1 string) (Encoding::CompatibilityError) ………
<swarley> oh
cakehero has quit [Max SendQ exceeded]
<Agbeladem> I'm not gonna encode my script in latin-1
<swarley> You can specify the regexp when you create it i think
centipedefarmer has joined #ruby
<swarley> Regexp.new("�|�", ...)
cakehero has joined #ruby
<swarley> I have no idea what the argument is though
<Agbeladem> right
Virunga has joined #ruby
sayan has quit [Quit: Leaving]
cakehero has quit [Max SendQ exceeded]
<Agbeladem> love the japanese examples in the doc
<swarley> oh Agbeladem
<Agbeladem> A regexp’s encoding can be explicitly fixed by supplying Regexp::FIXEDENCODING as the second argument of Regexp.new
joofsh has quit [Remote host closed the connection]
<swarley> That should be a suffix
yshh has quit [Remote host closed the connection]
<swarley> //u or something
<Hanmac_> swarley is right
<swarley> "��".encoding for me gives me UTF8 though.
mutenewt has joined #ruby
<Agbeladem> swarley: oh, so what's //u ?
<swarley> I'm not sure lol.
karasawa has joined #ruby
<shevy> lol
<swarley> [20] pry(main)> "��".encode(Encoding::ISO_8859_1)
<swarley> Encoding::UndefinedConversionError: U+FFFD from UTF-8 to ISO-8859-1
<swarley> from (pry):14:in `encode'
<Agbeladem> swarley: I dunno I copied the chars from my terminal. They might have been converted
Takehiro has quit [Ping timeout: 240 seconds]
geekbri has joined #ruby
<Agbeladem> okay I've done it
<Agbeladem> line.gsub(" ".encode(Encoding::ISO_8859_1), '')
<swarley> Well, get the element that has "��10" and do elem[0..1].map(&:ord) and tell us what it says
<swarley> oh
<swarley> k cool
<Agbeladem> thanks you were a big help
<swarley> Yeah no problem
<swarley> I want to do something stupid
joeycarmello has quit [Read error: Connection reset by peer]
joeycarmello has joined #ruby
<Agbeladem> ho ?
<swarley> something like. RegularExpression.new.that_matches("foo").and("goo").but_not("doo")
<Hanmac_> i read a news that "gangster-style" is dangerous and can litteraly kill you ... http://www.thesun.co.uk/sol/homepage/news/4724624/teen-girl-accidentally-shot-brother-in-head.html
<Agbeladem> but ?
karasawa has quit [Ping timeout: 260 seconds]
<blazes816> didn't you already do that?
<swarley> Well, in a way
kirun has joined #ruby
<Agbeladem> Hanmac_: beautiful !
<swarley> But I'm talking about regular expression inference
hayleybarker has quit [Quit: hayleybarker]
<swarley> Like, RegularExpression.new.that_matches("//comment").but_not("\"//comment\"")
joofsh has joined #ruby
<blazes816> gotcha. sounds cool
<swarley> But, there are tons of ways to make that true as far as I can tell
<blazes816> yeah, for sure. that's the hard part
<havenn> /join #bash
<blazes816> you have to figure out which intermediate states to take
ebouchut has joined #ruby
<swarley> It would need a ton of directives from the user to be able to properly infer the differences to look for
<blazes816> yep
slainer68 has joined #ruby
<swarley> I'm sure there is a way to do it without user aid. But it would require a large dataset and a lot of computational resources
<blazes816> and the best result you could get is probably never going to be 'correct'
sambio has joined #ruby
<blazes816> as in 100% recall and 100% accuracy
Guest12668 has quit [Read error: Connection reset by peer]
nemesit|osx has quit [Quit: Linkinus - http://linkinus.com]
nemesit has joined #ruby
<swarley> It has a chance of being correct, but there is no way to be sure the exact differences were found
kokainepizza has joined #ruby
hayleybarker has joined #ruby
<swarley> I mean, it would be easy to find the similarity between "1234abcd" and "3415ndje"
cascalheira has joined #ruby
<swarley> But not if it was a URL against another URL
<blazes816> you'd have to decide WHY it should match one but not the other
<graft> okay, here's a quickie: map an array of integers to the cummulative sum of previous members
<blazes816> perhaps what you want is a regex matches any string that doesn't contain "j"
<blazes816> graft: do what now?
<swarley> int_a.inject(0) {|x,y| x+y }
<swarley> Oh, the total sum
<swarley> K.
<blazes816> int_a.inject(:+)
<graft> no, i mean like, if i have [1, 2, 3] => [1, 3, 6]
<blazes816> ah
<SegFaultAX> Hanmac_: So... who gets the darwin award.
<graft> easy with some memo variable, but seems impossible without one
<Hanmac_> i think the boy for having such a sister
<blazes816> int_a.map.with_index{|e, i| int_a[0, i+1].inject(:+) } ish?
<swarley> int_a.each_with_object([]) {|i,obj| obj << i+obj.inject(&:+)
<Agbeladem> Hanmac_: Hmm, I'll sure he'll enjoy the prize wherever he is
<swarley> errr
<SegFaultAX> Hanmac_: And he was the one who was actually removed from the gene pool.
<swarley> int_a.each_with_object([]) {|i,obj| obj << i+obj[0..obj.size].inject(&:+)
<swarley> :|
<swarley> int_a.each_with_object([]) {|i,obj| obj << i+int_a[0..obj.size].inject(&:+)
<swarley> There
<swarley> jesus
Eiam has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<blazes816> jesus is a haskell programmer
<swarley> Except I failted
<swarley> failed*
<blazes816> graft: the one I posted works (just tested)
<swarley> oh. That was what I was looking for
<graft> hmm, map + inject each time seems wasteful though
<blazes816> true, write it in a c extension
<swarley> Lol.
<Hanmac_> graft int_a.each_with_object([0]).map{|i,o| o[0] += i}
hayleybarker has quit [Quit: hayleybarker]
<graft> ah, FTW
<Agbeladem> Okay so let's say I have class A and class B. I want to call a method of B with an array of symbols, and B sets all attr_accessible of an instance of A with a value. How do I do that and check my parameter is indeed an array of symbol ?
<graft> hmm, never seen each_with_object
<graft> highly useful
<shevy> Agbeladem one step at a time. first check the parameter via a function
<blazes816> it's like inject but nicer to use
<Agbeladem> shevy: that being my second question haha
jtharris has joined #ruby
<shevy> array = [:a, :b, :c] # => [:a, :b, :c]; array.all {|x| x.is_a? Symbol
<shevy> ^C
<shevy> array.all {|x| x.is_a? Symbol }
<shevy> # => ["/Users/x/SRC/LIBPNG/libpng-1.2.38.tar.xz", "/Users/x/SRC/LIBPNG/libpng-1.4.8.tar.xz", "/Users/x/SRC/LIBPNG/libpng-1.5.12.tar.xz"]; if array.all {|x| x.is_a? Symbol }.size == array.size # <-- all symbols
<shevy> oops
<shevy> didnt mean to paste the result :(
Morkel_ has joined #ruby
<shevy> another try...
<shevy> a = [:a, :b, :c]; a.all {|x| x.is_a? Symbol }; a.all {|x| x.is_a? Symbol }.size == a.size
<shevy> there is probably a shorter way
<shevy> anyway... now to the other question
<Agbeladem> thanks !
<Hanmac_> shevy: the method is named "all?" and does return a boolean
Astral_ has quit [Ping timeout: 255 seconds]
<shevy> Agbeladem there exists no attr_accessible
<Agbeladem> what do you do with that boolean
<shevy> Hanmac_ ah
<Agbeladem> shevy: the exists in ActiveRecord
<shevy> Agbeladem ok then I have no idea
<Hanmac_> he is in the wrong channel
<shevy> I avoid the rails ecosystem whenever possible
<Agbeladem> Haha well that's not the point
Morkel has quit [Ping timeout: 248 seconds]
Morkel_ is now known as Morkel
<shevy> Agbeladem the boolean you can use from your method
<Agbeladem> I was asking ruby questions :P
swex has quit [Remote host closed the connection]
<shevy> but there exists no attr_accessible in standard ruby :(
<Agbeladem> shevy: fair enough
swex has joined #ruby
<shevy> if you want to use dynamic attr_accessor though, that is possible
<shevy> perhaps this also works with attr_accessible or whatever else ActiveRecord gives you
blueOxigen has quit [Ping timeout: 248 seconds]
<Agbeladem> oh
workmad3 has joined #ruby
<Agbeladem> how would that be ?
<shevy> I am not sure... hmm
<shevy> in one project I used something like:
<Hanmac_> shevy do you know that you can define a method with an def block in an def block?
<shevy> def self.add_setter_method(i); define_method("#{i}=") { |inner_val| @data[i] = inner_val }; end
<shevy> attr_accessor(*array)
<Agbeladem> shevy: but if it's accessible why can't I just set it ?
<shevy> Agbeladem, I forgot how I did it
<shevy> what is accessible?
<shevy> the attr* usually create one (sometimes more than one) method
<Agbeladem> shevy: the attributes
Eiam has joined #ruby
jonathanwallace has joined #ruby
<shevy> so you just need to evaluate it in the proper context, then the methods are added to your code
<shevy> the golden rule is to avoid confusing things whenever possible
centipedefarmer has quit [Remote host closed the connection]
<shevy> in two weeks you may have no idea why you added certain complexity into your code
Astralum has joined #ruby
<shevy> aaaaand always give example code on a pastie
<Agbeladem> what complexity ? I want to change a field by it's symbol
ryannielson has joined #ruby
centipedefarmer has joined #ruby
<shevy> you use so strange words... what is a field
_nitti has quit [Ping timeout: 240 seconds]
_nitti_ has joined #ruby
jjbohn|afk is now known as jjbohn
<shevy> or is that activerecord specific
<shevy> :)
<Agbeladem> a field ?
centipedefarmer has quit [Remote host closed the connection]
<Agbeladem> a field is poo
<shevy> lol
<Agbeladem> what the hell do you mean
<Agbeladem> oop*
mutenewt has quit [Quit: WeeChat 0.3.5]
<shevy> you write "I want to change a field". I have no idea what this means in ruby parlance... do you mean an @instance_variable?
<Agbeladem> okay so I checked
<Agbeladem> it seems rails creates all the required setters
yshh has joined #ruby
<Agbeladem> now, I still don't know what to do with my symbol
Takehiro has joined #ruby
reinaldob has joined #ruby
<shevy> Hanmac, I think rails makes people lazy
<Agbeladem> lazy ?
<shevy> yes. brain lazy
<Agbeladem> How so ? This is ruby, it should make think simple and quick
arturaz has joined #ruby
<shevy> rails is "not ruby", it is super specialized. in two years it will become a language on its own
<shevy> it is pure magic
<Agbeladem> perhaps
<SegFaultAX> Uh oh, here we go again.
<shevy> SegFaultAX :D
<blazes816> rails was invented so that dhh had more time to kill babies
<Agbeladem> and only because people like you are ignoring rails on this side, and people from rails ignoring ruby. I'm open-minded and try to do my best with both.
<Agbeladem> that's why it's getting more and more specialized
kinginky has joined #ruby
<Hanmac_> shevy look at this evil code: http://eval.in/5896
<shevy> yeah blazes816
<SegFaultAX> shevy: At worst you could describe rails as being a ruby DSL for web stuff. To say it isn't ruby is absolutely ridiculous.
<Gate> Ruby Rocks, Rails is useful. Problem?
<Agbeladem> Hanmac: wtf !
<kinginky> hello all. writing a server/client application and want to use some kind of pub/sub functionality. i've been looking into some different options, but i was hoping someone could make some recommendations
<kinginky> i would like to have authentication
<shevy> Agbeladem I am not "ignoring" it but I dont need it, so why should I pay special attention to it? it does things in its own style
akl_ has joined #ruby
<kinginky> would redis be good for this, or should i use something websocket based such as faye?
<shevy> manyf newcomers pick up the rails style
<shevy> *many
mercwithamouth has quit [Ping timeout: 260 seconds]
<Agbeladem> shevy: so you make websites with only the ruby standard library ?
<shevy> Agbeladem no, I use my own code for webstuff
yfeldblum has quit [Ping timeout: 260 seconds]
Takehiro has quit [Ping timeout: 248 seconds]
<Agbeladem> Ain't nobody got time for that !
* Hanmac_ can make websites with only C :D
<blazes816> kinginky: the data store doesn't matter too much, but if you have no reason to pick one db or the other, I usually recommend to just stick with mysql/postgres
<Agbeladem> Hanmac_: yeah, so do I, and do what :P
<SegFaultAX> shevy: It's hard to say this without sounding offensive, but you sound like a moron.
<kinginky> blazes816: i'm not asking about persistence, though. i'm asking about pub/sub
reinaldob has quit [Remote host closed the connection]
<shevy> SegFaultAX: that is ok. I am not offensive either, you are just a faggot
<kinginky> shevy: classy
<Agbeladem> shevy: so you don't ignore it, you just avoid it.
<Agbeladem> sure
<blazes816> kinginky: I would look at Cellulloid::IO / Reel
<kinginky> blazes816: will surely give those a look. thanks
<blazes816> np. but, yeah, websockets
<SegFaultAX> shevy: "I use my own code for webstuff" is an utterly useless statement.
<shevy> Agbeladem what do you mean with "ignore". you can not USE rails without spending time LEARNING it, right? I don't dispute the fact that rails gives specific advantages. I am however disputing the fact that the rails way is the only true way
gyre007 has quit [Remote host closed the connection]
Norrin has left #ruby ["Textual IRC Client: www.textualapp.com"]
<shevy> SegFaultAX: it is a clear statement. a fact. what is incorrect in it? what is useless about it?
Guest has joined #ruby
<kinginky> rails IS overrated
<blazes816> not really. he doesn't use rails, and he doesn't only use the std lib. he uses his own code
ffranz has quit [Quit: Leaving]
<kinginky> it's good for what it's good for
<SegFaultAX> shevy: You're saying that it's ok to re-invent every single wheel that has been invented over the last 20+ years of web development.
<shevy> SegFaultAX: if the reinvention is better then yes
<SegFaultAX> But it isn't.
<swarley> Erm
<swarley> Rails is not a pretty picture
<shevy> SegFaultAX: depends on the point of view. you argue as if rails is the only legit way to do webstuff
<swarley> But there are some better ones
<swarley> Sinatra
<SegFaultAX> swarley: I'm not talking about rails.
<kinginky> you've managed to re-implement every major revolution in a better way than years of toiling geniuses?
<Guest> could someone help me out - I'm getting a "No such file to load -- nokogiri" from my ruby script
<shevy> yeah swarley
<kinginky> i find that very hard to believe
<SegFaultAX> shevy: I'm not arguing for or against rails at all.
<swarley> SegFaultAX; I know, I'm just talking about his being better
<SegFaultAX> shevy: But to say that the only way to do web stuff is to write your own everything is utter shit.
<shevy> SegFaultAX uh? but then here another statement: people should use sinatra rather than rails
<swarley> Rails isn't the best, but that's not a good reason to go renegade and make their own frameworks
<swarley> your*
<kinginky> shevy: that isn't really your judgment call
workmad3 has quit [Ping timeout: 244 seconds]
<kinginky> to each his own
<shevy> small is beautiful
<kinginky> rails is good for some things -- just bloated and inefficient
<shevy> kinginky hehe
yshh has quit [Ping timeout: 248 seconds]
<kinginky> i would personally choose sinatra over rails, but it's a preference thing. there isn't really a right way
<Guest> I'm using rvm, but I keep getting "no such file to load -- nokogiri"
<kinginky> Guest: have you installed the nokogiri gem?
<kinginky> gem install nokogiri
<SegFaultAX> Honestly I don't care what framework you use (or if you use one at all), but that doesn't mean I advocate writing everything from scratch either.
<Guest> yes
<Guest> it is installed
<kinginky> Guest: are you using bundler in your project and have you ran bundle install, if so? not sure if that will make a difference, but it may
<Guest> @kinginky and I have a require 'nokogiri' in my script
<shevy> SegFaultAX right. you say that people should never "reinvent the wheel". people should use what is available for them.
<anachronistic> Guest: ruby 1.8.x? 1.9.x?
<Guest> @kinginky and I'm not using bundler
<Guest> @anachronistic ruby 1.8.7
<blazes816> require 'rubygems'
<anachronistic> do you have require 'rubygems' in there somewhere?
<SegFaultAX> shevy: I didn't say that you should never re-invent the wheel. Now you're misrepresenting me.
<kinginky> yup
<Guest> @kinginky @anachronistic aha, that did it!
<Guest> thank you so much
<kinginky> <3 #ruby :)
<anachronistic> Guest: n/p, cheers
<blazes816> SegFaultAX && shevy: FYI, pretty sure you guys are on the same side of the argument you're having
<kinginky> blazes816: sorry man, can you repeat those for me? one was Reel, but what was the other?
<shevy> SegFaultAX I'll take your criticism as challenge to improve on my framework
<SegFaultAX> shevy: But I did say that throwing everything out and doing it yourself is a deeply confused perspective.
<shevy> rails spawned bundler
geekbri has quit [Read error: Connection reset by peer]
<blazes816> kinginky: Celluloid::IO, (which is what reel uses under the hood but is a bit nicer)
geekbri_ has joined #ruby
<SegFaultAX> shevy: Relevant http://xkcd.com/927/
<kinginky> SegFaultAX: you DO have to admit that implementing things on your own every time, while foolish, would lead to a much deeper understanding of the technologies implemented
<shevy> if bundler would work, sure
<shevy> well ok, last time I used it, it worked
<kinginky> blazes816: thanks again
<SegFaultAX> kinginky: But, I have work to do.
<shevy> 2 years ago, following the official rails tutorial, bundler did not work
_student has joined #ruby
<SegFaultAX> kinginky: I have actual things to build and ship.
<blazes816> np, good luck
kpshek has quit []
<kinginky> SegFaultAX: absolutely. see, that's why it's a to-each-his-own thing
<SegFaultAX> kinginky: And I'm not so foolhardy into thinking that I can write an XYZ and make it better than something that's been developed and battle-tested for years or decades.
<kinginky> but if you're a 14 year old teen nerd and you have all day to delve into the depths of what is ruby
<kinginky> more power to you
headius has joined #ruby
<kinginky> and i agree completely with you on that level too
<SegFaultAX> kinginky: /Sometimes/ it's appropriate to roll your own solution. But other times it's definitely not ok (cryptography being the canonical example)
<kinginky> i mean if you can't find a library to do something you need to do, you're doing something wrong
<kinginky> at the worst, you can modify something in existence
<blazes816> or you're doing it write by having original ideas
<shevy> he only reuses what other people gave him
bean has joined #ruby
<kinginky> so, i'm certainly not looking for an argument. just throwing out some mediation here
<shevy> I agree with the lack-of-time argument however
<kinginky> blazes816: guess you've got me there, but you get my point
<slash_nick> I want to do some digital signals processing with ruby... can't find a library that does it. what am i doing wrong?
<blazes816> kinginky: for sure man
Goles has quit [Remote host closed the connection]
centipedefarmer has joined #ruby
<kinginky> blazes816: the ruby gem pool is enormous, as you well know. i love that about ruby
<kinginky> so much to learn and do, it's so overwhelmingly exciting
<shevy> slash_nick not sure, could be that noone else wrote one yet. perhaps it may not be popular? or there could be a binding perhaps in other language? usually if there are bindings in python, bindings in ruby often exist as well
akl_ has quit [Ping timeout: 248 seconds]
ryanf_ has joined #ruby
<blazes816> shevy: I think it was sarcasm ;)
<Agbeladem> shevy: so how do I do obj.f = something, with symbol=:f
<shevy> Agbeladem you could use .send
<SegFaultAX> shevy: I don't only use external solutions. But my first thought when I confront a new requirement isn't "I'm going to write this myself", its "I wonder if someone else has already solved this problem or a problem sufficiently close to mine"
<kinginky> blazes816: do you think it'd be possibly to delegate requests made to your Reel server to Sinatra, and have Reel manage WebSocket requests only?
<shevy> Agbeladem, x = 'Hello World'; y = :size; x.send y # => 11
<SegFaultAX> Because again, I have to actually, ya know, ship stuff.
<slash_nick> shevy: there's a math library with fft right?
ryanf has quit [Quit: leaving]
<shevy> SegFaultAX, yeah. As said, I agree with the time argument as one reason.
yfeldblum has joined #ruby
<shevy> slash_nick fft? what is that?
elaptics is now known as elaptics`away
<Hanmac_> i think he means FFI
<Agbeladem> shevy: I figured, thanks
<blazes816> kinginky: if you're not wanting to use Reel all out, you can try https://github.com/simulacre/sinatra-websocket, or try using Celluloid::IO directly in your sinatra app to handle the websockets.
<blazes816> .
<shevy> hmmm ffi ftp://sourceware.org/pub/libffi/libffi-3.0.11.tar.gz
<SegFaultAX> Probably fast-fourier transform.
<kinginky> blazes816: makes sense.
<shevy> ok, then I have no idea
miskander has quit [Quit: miskander]
<SegFaultAX> Math and FFT in the same sentence.
<blazes816> kinginky: also, I didn't mention it before since this is #ruby, but I much prefer node for that type of thing (ducks)
Uranio has quit [Quit: WeeChat 0.3.8]
<shevy> blazes816 what is that Celluloid::IO thingy?
geekbri_ has quit [Remote host closed the connection]
<slash_nick> Hanmac_: shevy Fast Fourier Transform...
<blazes816> nio4r powered evented IO
<shevy> hmm ok "Celluloid::IO provides an event-driven IO system for building fast, scalable network applications"
miskander has joined #ruby
JarJar has joined #ruby
<slash_nick> SegFaultAX: context clues FTW
<Hanmac_> slash_nick ... did you try to google it?
<Hanmac_> third one was that: https://github.com/slowjud/FFT
<shevy> could be awful Hanmac ;P
ehc_ is now known as ehc
<slash_nick> Hanmac_: yeah, "there's a math library with fft right?"... http://narray.rubyforge.org/
nicoulaj has joined #ruby
willob has quit [Quit: Leaving.]
banisterfiend has quit [Remote host closed the connection]
alex__c2022_ has joined #ruby
<slash_nick> but I don't think anyone's used it to create frequency filters... analyze frequency spectrum of images... compare images... etc
graft has quit [Ping timeout: 245 seconds]
larssmit has joined #ruby
<karl_______> What is the proper way to use "if" and &&? I'm doing 'If a = "foo" && if b = "bar"' and it seems to require an extra 'end' for some reason
<SegFaultAX> slash_nick: I'm a walking elasticsearch.
zeade has joined #ruby
<blazes816> karl_______: don't use a 2nd 'if'
<swarley> because you would need a second end
<swarley> Also
<swarley> You probably want == if you're comparing two things
<blazes816> karl_______: if a == "foo" && b == "bar" ...
<karl_______> blazes816: swarley thank you both (i actually was using ==, just forgot to type it here)
akl_ has joined #ruby
alex__c2022 has quit [Ping timeout: 264 seconds]
alex__c2022_ is now known as alex__c2022
frogstarr78 has joined #ruby
<swarley> no problem
emocakes has joined #ruby
cascalheira has quit [Ping timeout: 248 seconds]
wallerdev has quit [Quit: wallerdev]
yshh has joined #ruby
Jackneill has quit [Quit: Leaving]
moshee has quit [Ping timeout: 265 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
dankest is now known as dankest|away
kpshek has joined #ruby
jrist-lunch is now known as jrist
<dreinull> don't know how to google this. I'm writing a shell script in Ruby and want o return a value to the shell. How and where?
ebouchut has quit [Quit: This computer has gone to sleep]
<dreinull> basically I'm just checking if a file exists, if yes, read, if not create with some value. That value now has to be returned so I can pipe it somewhere lese
<jrajav> dreinull: That's not returning a value to the shell - that's writing to stdout
<jrajav> If you did actually want to return an exit code to the shell, do 'exit <number>'
<dreinull> jrajav: see, that's why I couldnt find anything :S
gener1c has joined #ruby
Goles has joined #ruby
<dreinull> jrajav: no, some String
<gener1c> will ruby ever change the lambda to look like the coffee script lambda?
<gener1c> or the other way around?
<xargoon> anybody else having segfault problems with p362 ?
arturaz has quit [Remote host closed the connection]
jgarvey has quit [Quit: Leaving]
ffranz has joined #ruby
<dreinull> gener1c: yes, Dec. 2015
<gener1c> or is matz planning on deprecating the "lambda" literal?
cascalheira has joined #ruby
<xargoon> what's the last known stable version?
christo_m has joined #ruby
benlieb has joined #ruby
<shevy> gener1c hmm no idea, where did you pick that up?
<christo_m> Hello, is there an accepted method of dealing with rtmp within ruby? client wise
<jrajav> dreinull: You don't return a string as an exit code - it's always a number
<jrajav> dreinull: Pipes are a different beast. That's just redirecting stdout
<christo_m> I found this library http://po-ru.com/diary/implementing-rtmp-in-ruby/ , but i believe its unfinished (and embarassingly enough i have no idea how to install it)
<dreinull> jrajav: no, I don't need an exit code. I want to return some value to stdout
<jrajav> dreinull: puts!
<dreinull> ok
<christo_m> I just spent a couple of minutes fixing some deprecated warnings about mocha, and including the 'rubygems' module in the test files, which all ran successfully
<jrajav> Thought you would have picked that one up in hello world, sorry :P
Goles has quit [Max SendQ exceeded]
<shevy> print "hello world\n"
<shevy> what do you say now jrajav I KILLED YOUR PUTS!!!
<shevy> and your bot
xnm has quit [Read error: Connection reset by peer]
<jrajav> D:
<shevy> and your fingers!
<shevy> at least there is another bot
<shevy> << print "hello world\n"
<shevy> >> print "hello world\n"
<jrajav> My fingers will be displeased to learn that they have been killed
<eval-in> shevy: Output: "hello world\n" (http://eval.in/5897)
<shevy> ah
<jrajav> Wait how am I still typifasd;jvhzbdfiupg4
<shevy> with your nose
<dreinull> jrajav: I, hm, well
ryanf_ has quit [Quit: broken pipes |||]
yshh has quit [Ping timeout: 248 seconds]
* dreinull is slightly embarrased by this whole puts thing...
<christo_m> in fact net-rtmp is the only thing i can find
pcarrier has quit []
<jrajav> Don't be too put out, it's more about unixy/shelly knowledge than Ruby per se
banisterfiend has joined #ruby
ryanf has joined #ruby
<gener1c> (params)-> {} makes alot more sense to me than ->(params){}
cascalheira has quit [Ping timeout: 248 seconds]
<gener1c> or even <-(params){}
hukl has joined #ruby
<gener1c> i still use lambda {|params| code} because of that
<gener1c> and im weary of it being deprecated
<Hanmac_> shevy what did you think about the "def" in a "def" i posted last time?
Goles has joined #ruby
<shevy> Hanmac_ I saw that before and hated it
<shevy> I mean, years before
<gener1c> closures?
kpshek has quit [Ping timeout: 248 seconds]
<gener1c> you can use lambdas for that
<gener1c> :P
kpshek has joined #ruby
<shevy> gener1c I myself do not use -> at all
<shevy> I think it is a mistake to add a new syntax
<shevy> in this example
<gener1c> i agree
<shevy> I dont mind foo: 5 that much
miskander has quit [Quit: miskander]
ryanf_ has joined #ruby
<gener1c> foo: 5?
<shevy> though I still tend to do :foo => 5
vikhyat has quit [Remote host closed the connection]
<shevy> yeah
baroquebobcat has quit [Remote host closed the connection]
ryanf has quit [Client Quit]
Goles has quit [Client Quit]
<shevy> in a hash
<gener1c> :foo => 5
<shevy> gener1c did you see petercoopers example of -> ?
<gener1c> thats alot more readable imo
baroquebobcat has joined #ruby
<shevy> the first example?
<shevy> foo: 5
<gener1c> i am reading thomas's example now
workmad3 has joined #ruby
<shevy> petercooper wrote the only example with -> which I thought was elegant
<shevy> my_while -> { a < 5 } do
<gener1c> that requires real talent
<shevy> aaaaawful
<gener1c> yeah i know
<shevy> gener1c I am trying to find his code...
<gener1c> took me about 3 minuts to get what he was doing
<gener1c> its pretty but hard to read
<gener1c> thanks shevy
bean has quit [Ping timeout: 255 seconds]
<shevy> I am not sure what the name was. he wrote some minimal test library, making clever use of ->
<shevy> I think it was something like
<shevy> ->(:+)
<Hanmac_> i dont like it that -> makes lambdas .. i like procs more ... imo "-<" should make procs :D
<shevy> ->(:-)
baroquebobcat_ has joined #ruby
beneggett has joined #ruby
wallerdev has joined #ruby
baroquebobcat_ has quit [Remote host closed the connection]
baroquebobcat has quit [Read error: No route to host]
baroquebobcat has joined #ruby
whowantstolivef1 has quit [Ping timeout: 248 seconds]
<benwoody> i remember that post. that was a great 'oh i get it' moment for me
<blazes816> it was called dash-rocket or something
<blazes816> nope, testrocket https://github.com/peterc/testrocket
baroquebobcat_ has joined #ruby
<enroxorz-work> I would like to say that win32ole is the coolest damn library that i have run into in a while
<gener1c> lol shevy
bean has joined #ruby
ltsstar has joined #ruby
ryannielson has quit [Quit: ryannielson]
<bricker> Can someone translate this into plain english for me? "admin_user == @record.user || admin_user.is_superuser?" What I *want* is "admin_user is @record.user, OR admin_user is a superuser"
<bricker> but I fear that I may not be getting that
baroquebobcat has quit [Ping timeout: 240 seconds]
baroquebobcat_ is now known as baroquebobcat
emocakes has quit [Quit: emocakes]
miskander has joined #ruby
kpshek has quit []
karl_______ has quit [Quit: Page closed]
artm has joined #ruby
<bricker> It's clear in this case, which is probably what I should be doing anyways: (admin_user == @record.user) || admin_user.is_superuser?
<Pip> When will Ruby beat Python?
pavilionXP__ has quit [Read error: Connection reset by peer]
pavilionXP__ has joined #ruby
<blazes816> erry day
willob has joined #ruby
<shevy> Pip dont think it will anytime soon, there are more python developers out there
workmad3 has quit [Ping timeout: 276 seconds]
<shevy> perhaps if mruby will be a success
<Pip> I want to be a Ruby developer
pavilionXP__ has quit [Max SendQ exceeded]
Guest has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<blazes816> who doesn't
<aedorn> Ruby doesn't need to beat Python.. Python will beat itself. (See Python 3.x)
pavilionXP__ has joined #ruby
<blazes816> haha
<Pip> lol
colonblow_ has quit [Quit: Leaving]
Driscoll has quit [Ping timeout: 255 seconds]
benlieb has quit [Quit: benlieb]
<Hanmac_> ruby used pythons hand that hits python itself *like why you hitting yourself* :P
<blazes816> but python wasn't sure which self ruby was referring to
<Eiam> meh, I used to do python dev for one team at my company.. i moved to another team and we use ruby and not python
<Eiam> that team merged with another team, that used python… but my manager perferred ruby so we stayed ruby
<Eiam> all the same company, and a pretty big one
<Pip> :D
<Pip> It's a great company experimenting the dynamic languages war
<Eiam> and to be honest, when the original team decided on python
<Eiam> we flipped a coin.
<Eiam> between ruby & python
<blazes816> at my old (also big company) I went from being a perl, to python, to tcl, to c, back to perl, then back to python. for the same project
<Eiam> (I'm not kidding)
Nisstyre-laptop has joined #ruby
<blazes816> hope it was double headed
<Eiam> nope. no one knew either language, we knew we'd be startin from the bottom. both languages had their perks and downsides
<Eiam> no one really cared either way
<Eiam> so we flipped for it
<blazes816> well since you're here I imagine you won
eldariof has quit []
<Eiam> no, i left that team a few years later
<Eiam> and the new team uses ruby =)
<Eiam> i did some pretty neat stuff in python, some really cool stuff in twisted to do automated testing against distributed EC2 & azure clusters
<Eiam> i've forgotten all of it now though =)
Vert has joined #ruby
akl_ has quit [Remote host closed the connection]
emocakes has joined #ruby
yshh has joined #ruby
Driscoll has joined #ruby
infinitiguy has joined #ruby
gyre007 has joined #ruby
baroquebobcat has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
general_cuddles is now known as fails_at_jokes
workmad3 has joined #ruby
Todd has joined #ruby
Chryson has quit [Ping timeout: 272 seconds]
graft has joined #ruby
graft has quit [Changing host]
graft has joined #ruby
gyre007 has quit [Ping timeout: 248 seconds]
fails_at_jokes is now known as generalizzimo
larssmit has quit [Quit: Leaving.]
baroquebobcat has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
baroquebobcat_ has joined #ruby
nomenkun has quit [Remote host closed the connection]
christo_m has quit [Quit: Lost terminal]
jrajav has quit [Quit: I tend to be neutral about apples]
baroquebobcat_ has quit [Remote host closed the connection]
daniel_hinojosa has joined #ruby
baroquebobcat_ has joined #ruby
digifiv5e has joined #ruby
baroquebobcat has quit [Read error: No route to host]
baroquebobcat_ is now known as baroquebobcat
philcrissman has quit [Remote host closed the connection]
jcrawford has quit [Excess Flood]
yshh has quit [Ping timeout: 248 seconds]
infinitiguy has quit [Quit: Leaving.]
infinitiguy1 has joined #ruby
jcrawford has joined #ruby
benlieb has joined #ruby
rakl has quit [Quit: sleeping]
hamfz_ has joined #ruby
Takehiro has joined #ruby
Steppen has joined #ruby
<shevy> hmmm for procs
<shevy> why is proc.call(2) more popular than proc[2] ?
Paradox has quit [Ping timeout: 252 seconds]
baroquebobcat has quit [Read error: Connection reset by peer]
<banisterfiend> shevy: because the [] syntax is confusing, my immediate thought is 'ah, an array'
baroquebobcat has joined #ruby
baroquebobcat_ has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
philcrissman has joined #ruby
billy_ran_away has quit [Ping timeout: 255 seconds]
Takehiro has quit [Ping timeout: 240 seconds]
ryanf_ has quit [Read error: Connection reset by peer]
<yfeldblum> shevy, there is a pattern of "callable", where you take *any* object that responds to #call, so the user of your function can pass you a proc or can pass an object with the #call method
cdabba has joined #ruby
<yfeldblum> shevy, it's sort of the inverse of the "to_proc" pattern
baroquebobcat has quit [Ping timeout: 265 seconds]
baroquebobcat_ is now known as baroquebobcat
<cdabba> .msg nickserv identify chris1234
<workmad3> yfeldblum: how about the .() style? :)
<cdabba> oops
<yfeldblum> workmad3, ew
* workmad3 uses .call generally btw
<yfeldblum> workmad3, my code clarity policy for the .() style is "rm -rf /path/to/project"
stkowski has quit [Quit: stkowski]
<Hanmac_> yfeldblum did you hear about "bumblebee" ? :P
<workmad3> yfeldblum: ->(a){puts a}.(".() ftw!")
<yfeldblum> Hanmac, i did; that was a funny story
<bean> cdabba: you may what to change your password quickly.
Steppen has quit [Ping timeout: 248 seconds]
kinginky has quit [Ping timeout: 255 seconds]
<yfeldblum> workmad3, rm -rf /home/workmad3
<workmad3> yfeldblum: jokes on you... I'm on OS X :P
maletor has joined #ruby
<yfeldblum> workmad3, joke's on you: you're on OS X :D
<workmad3> dammit! you're right
rakl has joined #ruby
<yfeldblum> shevy, o = Object.new ; def o.to_proc ; proc { puts "hi" } ; end ; call_a_method(&o)
<ner0x> https://gist.github.com/4447491 Possible missing dependency in guard-minitest?
<shevy> yfeldblum hmm... there is a to_proc ?
<yfeldblum> shevy, you can pass any object in the proc slot using &, so long as the object responds to #to_proc and returns a proc
MattRb has quit [Quit: MattRb]
<shevy> workmad3 .() and .[] is kinda difficult to read for my eyes
<cdabba> is there a hash method like delete that returns the hash, instead of returning the value? or just use delete_if and use a block?
<shevy> yfeldblum oh
<shevy> did not know that about #to_proc
<workmad3> yfeldblum: stop removing the magic from ary.map(&:do_stuff) :(
<yfeldblum> shevy, then the method call_a_method in the example above can just say "yield" instead of having to do anything special with objects and #call
<shevy> workmad3, is that even valid ruby code at all??? ->(a){puts a}.(".() ftw!")
<workmad3> shevy: try it ;)
<yfeldblum> shevy, o = Object.new ; def o.to_proc ; proc{|f| f.puts "hi" } ; end ; File.open("/path/to/file", "w", &o)
<yfeldblum> shevy, sadly, yes
<shevy> whaaaaa
<workmad3> shevy: stabby lambda syntax, ruby 1.9+
baroquebobcat has quit [Remote host closed the connection]
<workmad3> shevy: same with .() I believe
baroquebobcat has joined #ruby
Spaceghostc2c has quit [Excess Flood]
baroquebobcat_ has joined #ruby
<shevy> I can't yet decide whether this is great or awful ...
chrisja has joined #ruby
mengu has quit [Ping timeout: 240 seconds]
baroquebobcat_ has quit [Client Quit]
<workmad3> I don't mind the -> syntax for the very few cases where I need to pass a lambda inline and it takes no arguments
ryanf has joined #ruby
<shevy> the ruby parser must be one of the most insane things in mankind
jaygen_ has joined #ruby
<workmad3> shevy: nah, the ruby parser is nowhere near as insane as language parsers get
jaygen has quit [Read error: Operation timed out]
Virunga has quit [Remote host closed the connection]
Spaceghostc2c has joined #ruby
<yfeldblum> the C parser is insane
evilsushi has joined #ruby
evilsushi has quit [Changing host]
evilsushi has joined #ruby
<shevy> hehe
<shevy> and C++ must be even more insane, because C++ is more complex than C?
<shevy> (the parser)
jkarayusuf has quit [Remote host closed the connection]
<blazes816> insane++
artm has quit [Quit: artm]
peregrine81 has joined #ruby
baroquebobcat has quit [Ping timeout: 260 seconds]
atmosx has joined #ruby
billy_ran_away has joined #ruby
sailias has quit [Quit: Leaving.]
_nitti has joined #ruby
Steppen has joined #ruby
<slash_nick> psychosomatic addict insane
<yfeldblum> when the lexer needs a symbol table just to lex, it's insane
<workmad3> trying to remember the bit of language theory I did
<Hanmac_> workmad3 how bad is this:
<Hanmac_> >> /(?<name>\d+)/ =~ "123";p name
<eval-in> Hanmac_: Output: "\"123\"\n" (http://eval.in/5901)
<workmad3> Hanmac_: :)
digifiv5e has quit [Changing host]
digifiv5e has joined #ruby
Banistergalaxy has quit [Ping timeout: 265 seconds]
<Hanmac_> that is the only way to generate LOCAL variables
chrisja has quit [Quit: leaving]
canton7_mobile has joined #ruby
DylanJ has joined #ruby
Banistergalaxy has joined #ruby
Spaceghostc2c has quit [Excess Flood]
<yfeldblum> >> name='123';p name
<eval-in> yfeldblum: Output: "\"123\"\n" (http://eval.in/5903)
yshh has joined #ruby
_nitti_ has quit [Ping timeout: 244 seconds]
<workmad3> >> p name
<eval-in> workmad3: Output: "/tmp/execpad-78a3033ffbbb/source-78a3033ffbbb:1:in `<main>': undefined local variable or method `name' for main:Object (NameError)\n" (http://eval.in/5904)
<workmad3> >> ->(a){puts a}.("hi there")
<eval-in> workmad3: Output: "hi there\n" (http://eval.in/5905)
<Hanmac_> yfeldblum: you notic that my code ms more usefull and evil than yours right?
<RubyPanther> There is not even a use case where a local is useful but needs to be manipulated from the outside, so it is going to be hard to be useful there
Morkel has quit [Quit: Morkel]
<RubyPanther> 0*x
ryannielson has joined #ruby
<Hanmac_> RubyPanther: so $1, $2 are more understandable?
skaczor has quit [Ping timeout: 248 seconds]
<RubyPanther> $1 and $2 have a long and storied history
<RubyPanther> as does eval, of course. ;)
Spaceghostc2c has joined #ruby
<shevy> ewww
<shevy> I like $1 more than eval
Jasko has quit [Ping timeout: 244 seconds]
<RubyPanther> "#send means never having to say #eval"
<shevy> hmmm .send is better than .eval but somehow I dont like it much either
<shevy> I once used .send and .method_missing together
<bean> you bastard.
<bean> thats sounds terrifying
SeanLazer has quit [Quit: SeanLazer]
<bean> i try to stay away from method_missing abuse
<bean> cuz its so easy to do
ewag has quit [Ping timeout: 252 seconds]
<RubyPanther> IMO method_missing should be viewed only as a prototyping tool, not a valid architecture choice
<Hanmac_> my way is a replacement for $1-$9 with variable names
<shevy> I dont know what I did there... I think I used the object solely via .send alone. cant remember what method_missing was doing
<shevy> object.send 'invoke_method', '5' # something like that, and if the method did not exist, I passed it to another object... which then failed in awful ways...
<RubyPanther> The "replacement" for $1-9 is to not take the shortcut in the first place, and instantiate your MatchData normally.
<RubyPanther> $1 is already the shortcut, no need to replace the warty shortcut with a WTF
Chryson has joined #ruby
thufir_ has joined #ruby
jonahR has quit [Quit: jonahR]
evilsushi has quit [Quit: Lost terminal]
thatguycraig has quit [Quit: Leaving.]
ryannielson has quit [Quit: ryannielson]
ryannielson has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
<shevy> the $1 are weird
<shevy> they are like nanofluctuating globals
<atmosx> 1 USD?
<shevy> yes, inflation. same thing
<Hanmac_> RubyPanther what about using it in switch there you cant use the matchdata object nicely
<atmosx> I see
<shevy> atmosx, I think I once relied on $1, but then suddenly it became nil
<shevy> I looked back at the code and I swear I did not see how it could become nil so easily
<shevy> since that day, I don't trust the $1 family much anymore... they look like globals but seem to behave oddly at times
<workmad3> shevy: they always behave oddly
<shevy> :(
<shevy> the only thing I dont like about MatchData is that it seems more effort to type
<workmad3> shevy: the oddness is understandable... but they're still odd (and I've never wanted to use them enough to understand all of their oddness)
Michae___ has joined #ruby
<shevy> what is it... obj[1] vs $1 ? hmm $1 wins in this example
<shevy> or actually perhaps not.. I really hate to see $
<shevy> I cant remember why I dont use matchdata more
<shevy> workmad3 I am glad to see I am not the only one :)
<RubyPanther> Hanmac_: First of all, switch statements in Ruby are not required to create the same logic, you can build the exact same code with if. In fact, many people do. And if you're bumping up against the edge of what the Ruby switch does... just organize your code normally.
<shevy> I wonder if perl users feel the same about $1 as ruby users would, in their respective languages
blacktul_ has joined #ruby
<RubyPanther> shevy: I came from Perl and I liked $1 just fine, because $ doesn't mean global there and they have high quality scoping. As soon as I got used to $ meaning global, I learned to hate $1
<shevy> I see
pwelch_ has joined #ruby
<shevy> well, that sucks :( people should like ruby more than perl... including the $1
<RubyPanther> Just as Perl has OOP "bolted through" (St. Wall's words), Ruby has $1, $2 "bolted through." Really the only Perl-ism in Ruby that is sometimes hard to avoid.
yshh has quit [Ping timeout: 244 seconds]
blacktulip has quit [Ping timeout: 252 seconds]
nyuszika7h has quit [Remote host closed the connection]
pwelch_ has quit [Client Quit]
emocakes has quit [Quit: emocakes]
blacktul_ has quit [Remote host closed the connection]
nyuszika7h has joined #ruby
pwelch has quit [Ping timeout: 265 seconds]
enroxorz-work has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
workmad3 has quit [Ping timeout: 252 seconds]
<shevy> hmm
<shevy> matz is like a japanese sushi cook
<shevy> every once in a while he tries to find new ingredients
jrajav has joined #ruby
horofox has joined #ruby
<Agbeladem> xd
jeffreybaird has quit [Quit: jeffreybaird]
canton7_mobile has quit [Quit: Bye]
_nitti has quit [Ping timeout: 252 seconds]
Agbeladem has left #ruby [#ruby]
_nitti has joined #ruby
generalizzimo is now known as Denise_
Denise_ is now known as geneREALissimo
diegoviola has joined #ruby
geneREALissimo has quit [Remote host closed the connection]
ehlu has quit [Ping timeout: 264 seconds]
MattRb has joined #ruby
RubyPanther has quit [Ping timeout: 260 seconds]
pcarrier has joined #ruby
Virunga has joined #ruby
dankest|away is now known as dankest
Astralum has quit [Read error: Connection reset by peer]
emmanuelux has joined #ruby
Astralum has joined #ruby
RubyPanther has joined #ruby
love_color_text has joined #ruby
the_jeebster has joined #ruby
Takehiro has joined #ruby
<the_jeebster> can private methods be called from rake?
lentil has joined #ruby
mercwithamouth has joined #ruby
RubyPanther has quit [Ping timeout: 260 seconds]
<atmosx> the_jeebster: directly, I don't think so. Otherwise they shouldn't be private.
infinitiguy has joined #ruby
<shevy> hmm blocks... anonymous functions...
<shevy> could one have a language with only anonymous functions?
<shevy> is there any language that allows more than one block given to a method?
<bean> shevy: have you ever looked at scheme or a lisp?
Takehiro has quit [Ping timeout: 248 seconds]
infinitiguy1 has quit [Ping timeout: 248 seconds]
yshh has joined #ruby
martinssd has joined #ruby
RubyPanther has joined #ruby
<martinssd> Hello there, I am encrypting and decryting a file with openssl in order to do this i need the IV is it secure to store the IV somewhere (unencrypted) on the filesystem?
kpshek has joined #ruby
jonahR has joined #ruby
benlieb has quit [Quit: benlieb]
AlbireoX has joined #ruby
_nitti has quit [Remote host closed the connection]
_nitti has joined #ruby
jonahR has quit [Client Quit]
kokainepizza has quit [Quit: My pooter is sleep.]
<shevy> bean hmm mostly superficially. I scanned through the haxima source code though, it is all written in scheme
<shevy> that was quite elegant, the whole game world was in scheme
jamescarr has quit [Quit: jamescarr]
dankest is now known as dankest|away
<bean> shevy: check out Racket, or just R5RS in general
graft has quit [Quit: Lost terminal]
ap4y has joined #ruby
_nitti has quit [Ping timeout: 248 seconds]
infinitiguy has quit [Quit: Leaving.]
<shevy> ok
infinitiguy has joined #ruby
sumeetjain_ has quit [Quit: sumeetjain_]
jds has joined #ruby
otherj has joined #ruby
eka has quit [Quit: chant Hare Krishna and be Happy]
infinitiguy has quit [Client Quit]
miskander has quit [Quit: miskander]
<Eiam> shevy: I've been reading http://mitpress.mit.edu/sicp/full-text/book/book.html which is taught in Scheme
blazes816 has quit [Quit: blazes816]
<Eiam> its a pretty good read so far..
<Eiam> and came highly recommended. althought it may be "below" you
Jasko has joined #ruby
<shevy> hehe
<atmosx> i MADE IT
<shevy> there is no "below"
<atmosx> I UPLOADED A FILE!
<martinssd> Do I have to understand why people like scheme? It has for too many '(' characters (just as lisp)
pskosinski has quit [Ping timeout: 244 seconds]
<shevy> my brain loves simple things
<atmosx> but I did it using curl hm
<atmosx> that might be a problem
<shevy> atmosx you evil man, why you not used ruby
<shevy> martinssd yes
eka has joined #ruby
<shevy> martinssd but you need to look at the old haxima source code... let me try to find it
jds has quit [Ping timeout: 248 seconds]
eka has quit [Remote host closed the connection]
<shevy> 0.7.0 - let me find an example for you from there
<Eiam> martinssd: I just think of the ( as whitespace
<Eiam> then it stops becoming "too much"
<shevy> (ironically, he rewrote it in python... then abandoned the project...)
<martinssd> Eiam: sounds ... awful
eka has joined #ruby
<Eiam> *shrug* yet people are successful lisp/scheme programmers to this day =)
<atmosx> shevy: because I can't, now I'm looking at HTTPClient apparently can do the same thing
yshh has quit [Ping timeout: 255 seconds]
<Eiam> somehow people maange with javascript and its syntax is awful.
peregrine81 has quit [Quit: Computer sleeping.]
<shevy> martinssd it is awful yeah but one can try to ignore the ugliness, one moment, soon showing something
<martinssd> I tried out scheme for about ~5 hours and I was really confused by the amount of '(' and ')' characters
<martinssd> :)
<shevy> (lambda (loc)
<shevy> (kern-obj-put-at (kern-mk-obj t_gold_coins (kern-dice-roll "5d20")) loc))
<Eiam> ow I think you are just trolling =)
vlad_starkov has joined #ruby
<martinssd> Eiam: no, actually I am not trolling
mockra has quit [Remote host closed the connection]
<shevy> I am not sure what this does... I think it is 5 d20 rolls, to calculate how many gold coins
<shevy> (define (player-found-warritrix?) (not (null? (quest-data-getvalue 'questentry-warritrix 'found))))
<shevy> here a quest conditional... whether the player found a certain NPC yet or not
<shevy> hmmmm admittedly, this is super verbose... let me try to find a better example
<atmosx> there's this http://curl-multi.rubyforge.org/
<havenn> atmosx: How bout Curb? Curl + Ruby ftw? https://github.com/taf2/curb
<Eiam> it calls kern-dice-roll with "5d20", then it calls kern-mk-obj with the results of t_gold_coins and the dice roll
<atmosx> havenn: no idea, do you use curb?
<Eiam> then it calls kern-obj-put-at with the reslt of that and loc
<shevy> ok arms.scm ... basis for armaments, weapons, armours... let's see
breakingthings has quit []
<Eiam> calls/evaluates
<havenn> atmosx: I lib I worked on used it, seemed nice enough - really fast.
<Eiam> atmosx: I do
<shevy> (setfire (and usedmana (equal? (kern-dice-roll "1d3") 1)))
Yaku has quit [Ping timeout: 276 seconds]
<Eiam> (use curb)
<Eiam> works fine
<shevy> hmmm
<Eiam> shevy: thats pretty easy to parse dude
<shevy> :\
<atmosx> Eiam: is it easy to convert this line to curb? $ curl -v --location --upload-file file.txt http://0.0.0.0:3000/upload/
<Eiam> left most thing is the operator
<shevy> wouldn't this be much shorter in ruby though?
otters has quit [Remote host closed the connection]
<Hanmac_> shevy what do you think about "flag=^true" ?
philcrissman has quit [Remote host closed the connection]
headius has quit [Quit: headius]
<Eiam> shevy: I don't think the goal is to be "short" ?
<shevy> Hanmac_ I rarely use ^ so I dont like this, my brain prefers often used patterns
<reactormonk> atmosx, it's more to write for certain.
<shevy> Eiam, well perhaps not
<Eiam> shevy: and I'm not sure what you mean, most of that is just function names anyway?
pskosinski_ has joined #ruby
<shevy> Eiam yeah, but in ruby it would be shorter
<shevy> I am trying to find out why scheme was used
alanp_ has joined #ruby
alanp_ has quit [Read error: Connection reset by peer]
<atmosx> since curb is based on libcurl, I get it that if you have libcurl on the system, you have curl too...
vlad_starkov has quit [Ping timeout: 248 seconds]
Pip has quit [Ping timeout: 240 seconds]
sepp2k1 has joined #ruby
<Eiam> if rollDice("1d3") == 1 && usedMana() { setFire() }
alanp_ has joined #ruby
<atmosx> however curb is nice
alanp has quit [Disconnected by services]
alanp_ is now known as alanp
<shevy> hmm
sepp2k has quit [Ping timeout: 244 seconds]
ryannielson has quit [Quit: ryannielson]
<Eiam> atmosx: https://github.com/taf2/curb check the docs. I see a 3 line example to POST file upload..
dankest|away is now known as dankest
maletor has quit [Quit: Computer has gone to sleep.]
<atmosx> Eiam: thank you
ap4y has left #ruby [#ruby]
<havenn> atmosx: Really nice comparison (from Nakamura's RubyConf 2012 talk) http://bit.ly/RubyHTTPClients2012
mmitchell has quit [Ping timeout: 248 seconds]
<atmosx> havenn: that's good the pure ruby versions could save me from needing curl on every system
d2dchat has quit [Remote host closed the connection]
<Eiam> shevy: raw characters, 51 vs 58 =0
<Eiam> i mean i could make the ruby one shorter with a ternary
sailias has joined #ruby
pskosinski_ has quit [Read error: Connection reset by peer]
otherj has quit [Quit: otherj]
<Eiam> and remove the () that I insist ruby have on any method call
pskosinski has joined #ruby
<Eiam> still, I don't think you win much there, wrong kind of shortness imo
<shevy> Eiam yeah odd, thought the difference would be larger
maletor has joined #ruby
headius has joined #ruby
<Eiam> shevy: should check out that book I linked =)
Steppen has quit [Quit: Leaving]
<Eiam> there isn't a lot to scheme
cableray has joined #ruby
<Eiam> control structure wise etc, its enough to learn the rules in a few hours
nemesit has quit [Quit: Leaving...]
kirun has quit [Quit: Client exiting]
benlieb has joined #ruby
<Eiam> so far the thing i notice most is you start from the inside instead of the outside
_bart has joined #ruby
jerius has quit [Ping timeout: 265 seconds]
DrShoggoth has quit [Quit: Leaving]
<Eiam> but, I'm hardly qualified so =)
<Eiam> there is an epub version of said book
tvw has joined #ruby
keyvan has joined #ruby
keyvan has quit [Changing host]
keyvan has joined #ruby
bean has quit [Quit: Computer has gone to sleep.]
keyvan has quit [Remote host closed the connection]
iamjarvo has quit [Quit: Leaving.]
bean has joined #ruby
bean has quit [Client Quit]
love_color_text has quit [Ping timeout: 252 seconds]
IceDragon has joined #ruby
otters has joined #ruby
solidoodlesuppor has quit [Remote host closed the connection]
martinssd has quit [Changing host]
martinssd has joined #ruby
RagingDave has quit [Quit: Ex-Chat]
martinssd has quit [Quit: Page closed]
centipedefarmer has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Leaving...]
Michae___ has quit [Remote host closed the connection]
joofsh has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
Michael_ has joined #ruby
gabrielrotbart has joined #ruby
mockra has joined #ruby
yshh has joined #ruby
jjbohn has quit [Quit: Leaving...]
ikaros has joined #ruby
neurotech has joined #ruby
headius has quit [Quit: headius]
atno has joined #ruby
<shevy> ok Eiam
<shevy> hmm ruby question
<shevy> given a string like ' 1', how do I display it as '001' ? I wrote that down somewhere...
workmad3 has joined #ruby
<IceDragon> '%03d' % i
<IceDragon> i being your number
dankest has quit [Quit: Leaving...]
<shevy> weird...
<shevy> ohhhh
<IceDragon> >> '%03' % 1
<eval-in> IceDragon: Output: "/tmp/execpad-7fc7fe983b4a/source-7fc7fe983b4a:1:in `%': malformed format string - %*[0-9] (ArgumentError)\n\tfrom /tmp/execpad-7fc7fe983b4a/source-7fc7fe983b4a:1:in `<main>'\n" (http://eval.in/5911)
<IceDragon> >> '%03d' % 1
<eval-in> IceDragon: Output: "" (http://eval.in/5912)
<IceDragon> ...
<shevy> I thought I did that but I forgot the 0
<shevy> thanks IceDragon
pavilionXP__ has quit [Read error: Connection reset by peer]
<IceDragon> np
<IceDragon> >> puts '%03d' % 1
<eval-in> IceDragon: Output: "001\n" (http://eval.in/5913)
pavilionXP has joined #ruby
<IceDragon> :O oh
MattRb has quit [Quit: MattRb]
<shevy> hmmm it likes the newline there
<shevy> >> print '%03d' % 1
<eval-in> shevy: Output: "001" (http://eval.in/5914)
<jrajav> puts puts a newline after its stuff
<jrajav> Always
<IceDragon> what he said
Michael_ has quit [Remote host closed the connection]
<jrajav> "puts puts" I really just said that
<jrajav> I read it at "put ess" so it didn't seem weird at first XD
<IceDragon> i was gonna say: "puts jabs a newline unto your sting"
<Hanmac_> >> puts "%<x>d" % {x: 123}
<eval-in> Hanmac_: Output: "123\n" (http://eval.in/5915)
<jrajav> That is an interesting and wonderful sentence IceDragon
neurotech has quit [Remote host closed the connection]
pavilionXP has quit [Excess Flood]
<IceDragon> O: Hanmac_ thank you! (learned something)
jlast has quit [Ping timeout: 260 seconds]
beneggett has quit [Quit: Computer has gone to sleep.]
<shevy> Hanmac as always you are weird there
<shevy> you really like that hash syntax
<shevy> actually, this is almost like how PHP started
<shevy> as template language
<IceDragon> its pwetty
kokainepizza has joined #ruby
hukl has quit [Quit: Linkinus - http://linkinus.com]
willob has quit [Quit: Leaving.]
v0n has quit [Ping timeout: 240 seconds]
benlieb has joined #ruby
mpfundstein has quit [Ping timeout: 252 seconds]
<Hanmac_> >> puts "x%<x>dx" % {x: x} if /(?<x>\d+)/ =~ "x123x"
<eval-in> Hanmac_: Output: "/tmp/execpad-2a9f60736306/source-2a9f60736306:1:in `<main>': undefined local variable or method `x' for main:Object (NameError)\n" (http://eval.in/5916)
<IceDragon> x = 1
pavilionXP has joined #ruby
stopbit has quit [Quit: Leaving]
love_color_text has joined #ruby
<Hanmac_> yeah this form is nice because you could do setting them to default values, and than assign them with matchings with only two lines
<Hanmac_> >> puts /(?<x>\d+)/ =~ "x123x" ? "x%<x>dx" % {x: x} : nil
<eval-in> Hanmac_: Output: "x123x\n" (http://eval.in/5917)
benlieb has quit [Client Quit]
yshh has quit [Ping timeout: 264 seconds]
<atmosx> is there any way get the filename directly from the 'read_file' object here? https://gist.github.com/4448520
<atmosx> I'm fetching a yml file, and saving the file directly to the another file… but it would better to use the file's filename.
<Hanmac_> atmosx did you try io.path?
<atmosx> no
pcarrier has quit []
Jake232 has joined #ruby
ebobby has quit [Quit: Lost terminal]
<atmosx> read_file.base_uri.to_s works
<Hanmac_> >> /(?<x>\d+)/ =~ "x123x"; "x%<x>dx" % Hash[local_variables.map{|i| [i,binding.eval(i.to_s)]}]
<eval-in> Hanmac_: Output: "" (http://eval.in/5918)
<atmosx> puts object.methods saves
daniel_- has quit [Ping timeout: 252 seconds]
<Hanmac_> >> /(?<x>\d+)/ =~ "x123x"; print "x%<x>dx" % Hash[local_variables.map{|i| [i,binding.eval(i.to_s)]}]
<eval-in> Hanmac_: Output: "x123x" (http://eval.in/5919)
beneggett has joined #ruby
cascalheira has joined #ruby
dankest has joined #ruby
<atmosx> >> string = "http://0.0.0.0:3000/files/Zvbsq.yml"; string.scan(/\w{5}.yml/)
<eval-in> atmosx: Output: "" (http://eval.in/5920)
<atmosx> hm
<atmosx> >> string = "http://0.0.0.0:3000/files/Zvbsq.yml"; string.scan(\w{5}.yml)
<eval-in> atmosx: Output: "/tmp/execpad-5de94813f879/source-5de94813f879:1: syntax error, unexpected $undefined, expecting ')'\nstring = \"http://0.0.0.0:3000/files/Zvbsq.yml\"; string.scan(\\w{5}.yml)\n ..." (http://eval.in/5921)
<atmosx> nice
hack has quit [Ping timeout: 248 seconds]
Michael_ has joined #ruby
Michael_ has quit [Remote host closed the connection]
<atmosx> Hanmac_: did you wrote this bot?
jamescarr has joined #ruby
bigmac has joined #ruby
rburton- has joined #ruby
kpshek has quit []
slash_nick has quit [Quit: leaving]
<Eiam> atmosx: no
MattRb has joined #ruby
<atmosx> Eiam: you dit?
<atmosx> did/dit/s
<Eiam> hanmac looks like Hans Mackowiak
<Eiam> and it looks like eval-in was written by charlie somerville
<Eiam> http://charlie.bz/code shows "eval.in"
workmad3 has quit [Quit: Lost terminal]
alex__c2022 has quit [Quit: alex__c2022]
darthdeus has joined #ruby
alex__c2022 has joined #ruby
fourq has quit [Quit: Lost terminal]
alex__c2022 has quit [Client Quit]
fyolnish has quit [Remote host closed the connection]
lentil has left #ruby [#ruby]
miskander has joined #ruby
jamescarr has quit [Quit: jamescarr]
dagnachew has joined #ruby
love_color_text has quit [Remote host closed the connection]
ikaros has quit [Quit: Ex-Chat]
RagingDave has joined #ruby
love_color_text has joined #ruby
<reactormonk> >> string = "http://0.0.0.0:3000/files/Zvbsq.yml"; p string.scan(/\w{5}.yml/)
<eval-in> reactormonk: Output: "[\"Zvbsq.yml\"]\n" (http://eval.in/5922)
<reactormonk> atmosx, ^
<reactormonk> >> string = "http://0.0.0.0:3000/files/Zvbsq.yml"; puts string.scan(/\w{5}.yml/)
<eval-in> reactormonk: Output: "Zvbsq.yml\n" (http://eval.in/5923)
vlad_starkov has joined #ruby
nateberkopec has joined #ruby
jtharris has quit [Quit: WeeChat 0.3.9.2]
<atmosx> reactormonk: yeap… scan returns an array, I made a string using [0] in the end, I wonder if there's another way.. flatten didn't work.
<atmosx> the code works though :-)
<reactormonk> >> string = "http://0.0.0.0:3000/files/Zvbsq.yml"; puts string[/\w{5}.yml/]
Russell^^ has quit [Quit: Russell^^]
<eval-in> reactormonk: Output: "Zvbsq.yml\n" (http://eval.in/5924)