<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]
<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
<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?
<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]
<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
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]
<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?
<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.]
<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
<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]
<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>
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
<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 :'(
<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
<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?
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 ?
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)
<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.
<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]
<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.
<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
<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
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>
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
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)
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
<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
<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>
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]
<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)
<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.
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
<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
<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
<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
<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
<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)
<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]
<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]
<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