MrPoT4tO has quit [Remote host closed the connection]
tjbiddle has quit [Client Quit]
<mcatch>
Can someone help explain to my why Hash[*x.split("\n")] returns a populated hash while Hash[x.split("\n")] (missing the *) returns an empty hash? in both cases, x.split("\n") returns an even numbered array, so shouldn'
<mcatch>
Hash[] be able to take it?
nomenkun has joined #ruby
momomomomo has quit [Quit: momomomomo]
hakunin has quit [Remote host closed the connection]
odrade has quit [Read error: Connection reset by peer]
zodiak has joined #ruby
saarinen has quit [Quit: saarinen]
Shirakawasuna has quit [Ping timeout: 264 seconds]
devoldmx has joined #ruby
tommyvyo has quit [Quit:]
fooo has quit [Ping timeout: 256 seconds]
ssvo has quit [Ping timeout: 245 seconds]
julweber has joined #ruby
jonkri has quit [Quit: jonkri]
nomenkun has quit [Ping timeout: 264 seconds]
danslo has joined #ruby
cj3kim has quit [Remote host closed the connection]
justsee has quit [Remote host closed the connection]
rsahae has quit [Ping timeout: 268 seconds]
banachtarski has joined #ruby
ssvo has joined #ruby
<banachtarski>
how do i run bash commands as a different user from within ruby
rsahae has joined #ruby
momomomomo has joined #ruby
lele has quit [Ping timeout: 264 seconds]
atno has quit [Read error: Connection reset by peer]
ILoveYou has quit [Read error: Connection reset by peer]
arya__ has quit [Ping timeout: 248 seconds]
ILoveYou has joined #ruby
hakunin has joined #ruby
lele has joined #ruby
arya_ has joined #ruby
julweber_ has joined #ruby
emmanuelux has quit [Remote host closed the connection]
reset has quit [Quit: Leaving...]
bigkm has joined #ruby
bigkm has quit [Max SendQ exceeded]
rsahae has quit [Ping timeout: 264 seconds]
rsahae has joined #ruby
reset has joined #ruby
<alainus>
who knows how to use arel ?
julweber has quit [Ping timeout: 264 seconds]
<alainus>
banachtarski, you should probable use su - user or sudo
Nisstyre has joined #ruby
<zendeavor>
i would recommend against running shell scripts at all
<zendeavor>
but that's just me.
ILoveYou has quit [Read error: Connection reset by peer]
momomomomo has quit [Ping timeout: 264 seconds]
ILoveYou has joined #ruby
burlyscudd has joined #ruby
jalcine has joined #ruby
lwt has quit [Ping timeout: 276 seconds]
zastern has quit [Remote host closed the connection]
<MarcWeber>
You don't know at all how to use the tools you're trying to use.
<MarcWeber>
So the best way to help you is trying to understand what you want to do.
<nerder>
so this tool dnt have an iterface or something
<nerder>
i just put input from a file
<MarcWeber>
nerder: Reply like this: "I want this script to ...."
<Dekade>
should of stayed in F1 marc :p
Shirakawasuna has joined #ruby
nomenkun has quit [Ping timeout: 264 seconds]
<nerder>
ok MarcWeber, i'm just playing a CTF
<nerder>
and this one is a challs
<nerder>
there's a mail in there
<nerder>
i have to get the flag
<MarcWeber>
nerder: ctf is a game?
<nerder>
yep
Shirakawasuna has quit [Client Quit]
<nerder>
is a capture the flag game
<MarcWeber>
And that game is about "solving little ruby tasks"?
<Dekade>
"hacking" game
Shirakawasuna has joined #ruby
<Dekade>
reverse engineering and stuff
<nerder>
white hacking game
<nerder>
yep
seejohnrun has quit [Ping timeout: 248 seconds]
<bnagy>
ctf is definitely not about getting IRC to solve problems for you
<MarcWeber>
nerder: and how does the flag look like you're trying to get?
<bnagy>
go fail level 1 by yourself
<nerder>
but i'm not so confident with ruby
<fryguy>
nerder: so instead of taking other people's solutions and just trying to run them without knowing what's going on, how about taking some time and learning the basics and going line by line through this and figuring it out yourself? you know, the entire point of games like this
AlbireoX has quit [Remote host closed the connection]
<ntzrmtthihu777>
</badjapanese>
freerobby has quit [Ping timeout: 264 seconds]
sailias has quit [Quit: Leaving.]
jmimi has joined #ruby
sayan has joined #ruby
<ntzrmtthihu777>
I don't suppose anyone here has jruby 1.7.4 + lwjgl experience?
t-mart_ has quit [Remote host closed the connection]
Dekade has quit []
brennanMKE has quit [Remote host closed the connection]
Guga_ has quit [Quit: ~]
freakazoid0223 has joined #ruby
<popl>
ntzrmtthihu777: If you have a ruby question just ask, and if someone knows or wants to help they probably will.
nomenkun has joined #ruby
<ntzrmtthihu777>
popl: ah durr, I know better than that XD, my bad. the question:
<ntzrmtthihu777>
basically I'm following this n00bie tut here: http://www.compoundtheory.com/?action=displayPost&ID=559 , and when I run the script with rvm + jruby I get NameError: uninitialized constant OpenGL. am I missing something here?
codesoda has joined #ruby
DanKnox is now known as DanKnox_away
fomatin has quit [Quit: Computer has gone to sleep.]
cha1tanya has joined #ruby
<havenwood>
ntzrmtthihu777: If you add `require 'openssl'` does it help?
<fryguy>
ntzrmtthihu777: show us the actual code you wrote
thesheff17 has quit [Ping timeout: 276 seconds]
<fryguy>
ntzrmtthihu777: and the exact error message
nomenkun has quit [Ping timeout: 248 seconds]
<ntzrmtthihu777>
havenwood: openssl? you for real? :P
queston has quit [Remote host closed the connection]
<ntzrmtthihu777>
my filetree is as follows: http://paste.ubuntu.com/5848691/ and the test.rb script is more or less identical to the one at that link.
odrade has quit [Quit: leaving]
<havenwood>
'opengl' >.>
<popl>
hurr
<ntzrmtthihu777>
havenwood: actually I tried it with require 'OpenGl', should I lowercase that instead?
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<havenwood>
convention is lowercase
<popl>
that file tree does nothing to help us figure out your problem btw
Opettaja has quit [Quit: WeeChat 0.4.1]
<ntzrmtthihu777>
popl: ah. i thought maybe knowing where I had lwjgl stored and all may make a dif.
<fryguy>
still waiting for exact error
araujo has quit [Quit: Leaving]
<ntzrmtthihu777>
fryguy: NameError: unitialized constant OpenGl \n const_missing at org/jruby/RubyModule.java:2631 \n (root) at test.rb:8
<ntzrmtthihu777>
havenwood: trying with require 'OpenGl' and require 'opengl' both returns LoadError: no such file to load -- opengl
<popl>
do you have opengl installed?
<popl>
gem list|grep opengl
<havenwood>
ntzrmtthihu777: gem install opengl
burlyscudd has joined #ruby
<ntzrmtthihu777>
havenwood: doing.
<ntzrmtthihu777>
popl: thought that came with lwjgl, one sec whil havenwood's command finishes up :P
Guedes0 has joined #ruby
<popl>
heh
<havenwood>
popl: Can just do `gem list opengl` but <3 grep.
<popl>
ok, good to know
<ntzrmtthihu777>
grep rocks :P
<ntzrmtthihu777>
havenwood: NotImplementedError: C extension support is not enabled. Pass -Xcext.enabled=true to JRuby or set JRUBY_OPTS or modify .jrubyrc to enable.
<havenwood>
ntzrmtthihu777: ah, yeah no C-exts in JRuby
Guedes0 has quit [Client Quit]
<havenwood>
ntzrmtthihu777: Ruby or RBX only
<ntzrmtthihu777>
havenwood: oh yeah, forgot about that. one reason I like it :P
thecommongeek has joined #ruby
DanKnox_away is now known as DanKnox
wargasm1 has quit [Ping timeout: 248 seconds]
paissad_ has quit [Quit: This computer has gone to sleep]
burlyscudd has quit [Ping timeout: 264 seconds]
GeissT has joined #ruby
thesheff17 has joined #ruby
ejnahc has quit [Read error: Operation timed out]
Binauralman has quit [Ping timeout: 264 seconds]
heidar has joined #ruby
cj3kim has quit [Remote host closed the connection]
jonathanwallace has quit [Ping timeout: 256 seconds]
cads has quit [Ping timeout: 256 seconds]
mahmoudimus has joined #ruby
dmiller has quit [Remote host closed the connection]
brennanMKE has joined #ruby
ejnahc has joined #ruby
chxane has quit [Quit: Leaving]
cooldman224 has quit [Remote host closed the connection]
pitzips has quit [Ping timeout: 268 seconds]
wargasm has joined #ruby
<ntzrmtthihu777>
havenwood: popl: I'ma head over to #jruby, as this is more for that. I do, however, thank you for your assistance.
ntzrmtthihu777 has left #ruby ["For a good time, try: 'curl -L http://bit.ly/10hA8iC | bash' ;)"]
postmodern has quit [Quit: Leaving]
nomenkun has joined #ruby
asgardBSD has joined #ruby
brennanMKE has quit [Ping timeout: 256 seconds]
<mcatch>
Can someone help me wrap my head around this regex? puts "Scripting language" if "Python" =~ /P(erl|ython)/
<bnagy>
| is or
nettoweb has quit [Quit: nettoweb]
cha1tanya has quit [Ping timeout: 276 seconds]
nomenkun has quit [Ping timeout: 264 seconds]
ra4king has joined #ruby
DanKnox is now known as DanKnox_away
<ra4king>
boo
<ra4king>
BOO!
* ra4king
waits for someone to be scared
<popl>
s/scared/annoyed/ # :P
* ra4king
bows head in sadness
* ra4king
cries
* ra4king
runs away
ra4king has left #ruby ["Leaving"]
Node has joined #ruby
Heero has joined #ruby
Heero has joined #ruby
Heero has quit [Changing host]
havenwood has quit [Remote host closed the connection]
Node has quit [Client Quit]
thesheff17 has quit [Ping timeout: 268 seconds]
freerobby has joined #ruby
vdandre has joined #ruby
cj3kim has joined #ruby
moeSeth has joined #ruby
freerobby has quit [Ping timeout: 256 seconds]
mikepack has joined #ruby
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
Mars` has quit [Ping timeout: 276 seconds]
bluehavana has joined #ruby
guilleiguaran_ has joined #ruby
sarcilav has joined #ruby
mroth has joined #ruby
jonathanwallace has joined #ruby
chriskk has quit [Ping timeout: 256 seconds]
davidboy has joined #ruby
mikepack has quit [Ping timeout: 256 seconds]
dnyy has joined #ruby
wargasm has quit [Ping timeout: 264 seconds]
cofin has joined #ruby
stkowski has quit [Quit: stkowski]
nfk has quit [Quit: yawn]
wargasm has joined #ruby
xerxas has joined #ruby
niftylettuce has joined #ruby
headius has joined #ruby
reset has joined #ruby
cool has joined #ruby
NimeshNeema has joined #ruby
nomenkun has joined #ruby
wargasm has quit [Ping timeout: 248 seconds]
haxrbyte has joined #ruby
Bry8Star{T2 has joined #ruby
ForSpareParts has quit [Read error: Connection reset by peer]
ForSpareParts has joined #ruby
Heero has quit [Ping timeout: 256 seconds]
vlad_starkov has joined #ruby
jhowarth_ has joined #ruby
nomenkun has quit [Ping timeout: 264 seconds]
haxrbyte has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
asgardBSD has quit [Remote host closed the connection]
strax has joined #ruby
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
momomomomo has joined #ruby
arubin has joined #ruby
ziyadb has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
osvico has quit [Ping timeout: 276 seconds]
burlyscudd has joined #ruby
didlix has joined #ruby
chuk has joined #ruby
notbrent___ has joined #ruby
huoxito has quit [Quit: Leaving]
Heero has joined #ruby
Heero has quit [Changing host]
Heero has joined #ruby
freerobby has joined #ruby
_seanc_ has joined #ruby
stef_204 has joined #ruby
burlyscudd has quit [Ping timeout: 276 seconds]
randym_ has joined #ruby
r0bgleeson has quit [Read error: Connection reset by peer]
harrymoreno has joined #ruby
r0bgleeson has joined #ruby
mogsy has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
banghouse has quit [Remote host closed the connection]
nomenkun has quit [Ping timeout: 248 seconds]
Pacra has quit [Quit: Pacra]
pyx has quit [Quit: WeeChat 0.4.1]
ravenzz has joined #ruby
<ravenzz>
hello
<Mars`>
ravenzz: hi
<ravenzz>
hi Mars`
akashj87 has joined #ruby
<popl>
ravenzz: Do you have a Ruby question?
<ravenzz>
I need Ruby and RubyGems to set up a Jekyll blog which eventually will be hosted on github. Which version of ruby should I download? the RubyInstaller or the DevKit?
<ravenzz>
popl not really but yeah ruby-related
<ravenzz>
oh I am on windows btw
<bnagy>
devkit is not a version of ruby
<bnagy>
it's an adjunct to the rubyinstaller
<ravenzz>
yeah
freerobby has joined #ruby
<ravenzz>
version was the wrong word :)
<BarneyRubble>
ravenzz, you want to write haml, scss etc?
<BarneyRubble>
yeah, if it is close to what you want definitely worth downloading and trying it, i use it myself
Mars` has quit [Ping timeout: 248 seconds]
freerobby has quit [Ping timeout: 276 seconds]
<ravenzz>
I'll definitely give it a try. It should be useful for small projects. Anyway what I really need now is Ruby and RubyGem in order to install a local copy of Jekyll
<ravenzz>
thanks by the way
<BarneyRubble>
yeah, that is how i got to prepos, i got stuck on installing ruby etc, so i cant help there :)
<ravenzz>
yeah same situation here. So did you manage to setup a jekyll blog locally with prepos?
<BarneyRubble>
I gave up on the jekyll and went another way, but if you need a project to have scss/compass/haml etc then i dont see why prepos wouldnt work
arya_ has quit []
<ravenzz>
yes it could be handy. Although I already have a bunch of grunt tasks to do so
tomzx_mac has quit [Ping timeout: 248 seconds]
danslo has joined #ruby
zeromodulus has quit [Remote host closed the connection]
<ravenzz>
I apparently I did it, ruby is up and running :)
lewis has joined #ruby
<ravenzz>
thanks for the suggestion though!
<lewis>
hi
cofin has quit [Quit: cofin]
harrymoreno has quit [Quit: harrymoreno]
jbueza has joined #ruby
jbueza has quit [Max SendQ exceeded]
nomenkun has joined #ruby
jbueza has joined #ruby
lethjakman has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
cj3kim_ has joined #ruby
ananthakumaran has quit [Ping timeout: 268 seconds]
nomenkun has quit [Ping timeout: 268 seconds]
rickmasta has quit [Quit: Leaving...]
burlyscudd has joined #ruby
timeout has joined #ruby
arubin has quit [Quit: Computer has gone to sleep.]
nycjv321 has quit [Quit: leaving]
burlyscudd has quit [Ping timeout: 248 seconds]
thebastl has joined #ruby
freerobby has joined #ruby
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
freerobby has quit [Ping timeout: 268 seconds]
CaptainJet has quit []
tvw has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Hanmac has quit [Read error: Connection reset by peer]
wallerdev has quit [Quit: wallerdev]
rickruby has joined #ruby
rickruby has quit [Remote host closed the connection]
emergion has quit [Quit: Computer has gone to sleep.]
lethjakm1 has joined #ruby
nomenkun has joined #ruby
tacos1de_ has quit [Ping timeout: 240 seconds]
lethjakman has quit [Ping timeout: 264 seconds]
tacos1de has joined #ruby
zmike123 has joined #ruby
nomenkun has quit [Ping timeout: 268 seconds]
burlyscudd has joined #ruby
iamjbecker has joined #ruby
iamjbecker has quit [Remote host closed the connection]
fomatin has quit [Quit: Computer has gone to sleep.]
threesome has joined #ruby
axeman- has joined #ruby
lethjakm1 is now known as lethjakman
Deele has joined #ruby
burlyscudd has quit [Ping timeout: 264 seconds]
emergion has joined #ruby
freerobby has joined #ruby
nomenkun has joined #ruby
akashj87 has quit [Read error: Connection reset by peer]
axeman- has quit [Remote host closed the connection]
akashj87 has joined #ruby
Gruu has joined #ruby
freerobby has quit [Ping timeout: 256 seconds]
axeman- has joined #ruby
akashj87_ has joined #ruby
akashj87 has quit [Ping timeout: 276 seconds]
Gruu has quit [Client Quit]
binw has quit [Read error: Connection reset by peer]
codesoda has quit [Remote host closed the connection]
sayan has joined #ruby
AlHafoudh has joined #ruby
staafl has joined #ruby
rickruby has joined #ruby
binw has joined #ruby
axeman- has quit [Remote host closed the connection]
axeman- has joined #ruby
paissad has joined #ruby
axeman- has quit [Remote host closed the connection]
<canton7>
RomainT, arrays are passed by reference - they're not copied before being passed
freeayu has joined #ruby
<canton7>
so everyting's modifying the same array
jds has joined #ruby
<RomainT>
At where point do I pass an array by reference? :s
<RomainT>
dispatchable_groups ?
<canton7>
hmm misread it a little, one sec
ffio_ has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
Spooner has quit [Remote host closed the connection]
<canton7>
is that the full output? you haven't removed any lines?
<RomainT>
Yes
Spooner has joined #ruby
<RomainT>
(exect the line 8 of the log, i added it myself to emphasis the problem ^^)
postmodern has joined #ruby
<RomainT>
You can run the script as is via ruby 10_script.rb
axeman- has quit [Remote host closed the connection]
<canton7>
yeah that makes sense, I think
<canton7>
so both of the "Add game_search ..." messages are from the same call to dispatchable_groups_for_format
renderful has quit [Ping timeout: 264 seconds]
<RomainT>
Hmm…
<RomainT>
That's right
<canton7>
dispatchable_groups_for_format gets called initially, and there are two items in other_game_searches. it loops through them, calls dispatchable_groups_for_format for the first one. in that call, there are no items in other_game_searches, so it prints "Initialse...", then exits. second time around the loop it prints the second "Add game_search ..."
<canton7>
(why #map, btw, not #each?)
jimg has quit [Ping timeout: 264 seconds]
<RomainT>
It's 1 character less for the same effect.
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<RomainT>
(just kidding i don't really care about that :p)
<MrZYX>
in theory
<MrZYX>
#map consumes more memory
Heero` has joined #ruby
<canton7>
yeah, but we're not playing golf :P when I see a #map, I'm looking for the return value to be used somewhere
<canton7>
it's about intention :P
<RomainT>
Yes, i was just kidding (i planned to use a reduce style)
<canton7>
cool, no worries
<RomainT>
Though i don't really get what i should do :/
<cool>
canton7: why would I worry?
<RomainT>
xD
<canton7>
cool, hah! nice. you needn't
relix has joined #ruby
<cool>
:D
<MrZYX>
RomainT: I think line 16 should be remaining_game_searches = other_game_searches - selected_game_searches
rubarlio_ has joined #ruby
Heero has quit [Ping timeout: 256 seconds]
Pacra has joined #ruby
<MrZYX>
hm, no, that doesn't change anything
<RomainT>
Yep
workmad3 has joined #ruby
rubarlio_ has quit [Remote host closed the connection]
<RomainT>
Hm
<RomainT>
I have to reset selected_game_searches to the empty array when i dispatch it
rubarlion has quit [Ping timeout: 264 seconds]
jonkri has joined #ruby
jonkri has quit [Changing host]
jonkri has joined #ruby
fgo has joined #ruby
<RomainT>
Between lines 18 and 19 in have to add selected_game_searches = []
emergion has quit [Quit: Computer has gone to sleep.]
coderhut has quit [Quit: Page closed]
Zeeraw has joined #ruby
queston has joined #ruby
fgo has quit [Remote host closed the connection]
<RomainT>
Thank you canton7 and MrZYX for helping me! :)
<canton7>
np :)
thepumpk_ has joined #ruby
<RomainT>
(it's the match maker of my webgame! It allowed to compose teams with players in common. Quite weird. :p)
<RomainT>
(I couldn't play chess against myself :/)
thepumpkin has quit [Ping timeout: 264 seconds]
alainus is now known as alainus[-_-]
swordsmanz has joined #ruby
atno has quit [Quit: Leaving]
tonini has quit [Ping timeout: 248 seconds]
cantonic has joined #ruby
jefflyne has joined #ruby
hamakn_ has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
burlyscudd has quit [Ping timeout: 256 seconds]
nomenkun has joined #ruby
EPIK has joined #ruby
mzelinka has joined #ruby
mzelinka has left #ruby ["Leaving"]
Hanmac1 has joined #ruby
nomenkun has quit [Ping timeout: 264 seconds]
jonkri has quit [Ping timeout: 276 seconds]
alainus[-_-] is now known as alainus
Hanmac has quit [Ping timeout: 264 seconds]
jds has joined #ruby
bluenemo has joined #ruby
bluenemo has joined #ruby
RomainT has left #ruby [#ruby]
axeman- has joined #ruby
JZTech101 has joined #ruby
jds has quit [Ping timeout: 256 seconds]
braincra- has joined #ruby
lwt has joined #ruby
alem0lars has quit [Ping timeout: 276 seconds]
braincrash has quit [Ping timeout: 248 seconds]
rubarlio_ has quit [Ping timeout: 248 seconds]
emergion has joined #ruby
Ry0_ has joined #ruby
wesside has quit [Quit: Computer has gone to sleep.]
freerobby has quit [Quit: Leaving.]
braincrash has joined #ruby
braincra- has quit [Ping timeout: 248 seconds]
browndawg has joined #ruby
workmad3 has joined #ruby
seejohnrun has joined #ruby
takezawa has joined #ruby
Ry0__ has joined #ruby
Ry0_ has quit [Read error: Connection reset by peer]
v0n has joined #ruby
shaunbaker has quit [Remote host closed the connection]
subbyyy has joined #ruby
browndawg has quit [Ping timeout: 264 seconds]
stozza has joined #ruby
stozza has left #ruby [#ruby]
AndChat| has joined #ruby
jonkri has joined #ruby
jonkri has quit [Changing host]
jonkri has joined #ruby
seejohnrun has quit [Ping timeout: 276 seconds]
sepp2k has quit [Quit: Leaving.]
sambao21 has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
alem0lars has joined #ruby
hogeo has quit [Remote host closed the connection]
ILoveYou has joined #ruby
lkba has quit [Ping timeout: 248 seconds]
ntus1017 has joined #ruby
ILoveYou[ has joined #ruby
Virunga has joined #ruby
predator117 has quit [Ping timeout: 256 seconds]
sepp2k has joined #ruby
predator117 has joined #ruby
kofno has joined #ruby
ILoveYou has quit [Ping timeout: 264 seconds]
jimg has joined #ruby
wesside has joined #ruby
browndawg has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
bluenemo has quit [Quit: Verlassend]
ciziar has joined #ruby
cantonic has quit [Ping timeout: 264 seconds]
JZTech101 has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC]
jimg has quit [Ping timeout: 248 seconds]
kofno has quit [Ping timeout: 276 seconds]
wesside has quit [Client Quit]
kpshek has joined #ruby
cantonic has joined #ruby
gustavn has joined #ruby
jztech101_ has joined #ruby
chxane has joined #ruby
cofin has joined #ruby
wesside has joined #ruby
freerobby has joined #ruby
Ortuna has quit [Quit: Computer has gone to sleep.]
kpshek has quit [Ping timeout: 268 seconds]
jztech101_ has quit [Client Quit]
Ortuna has joined #ruby
JZTech101 has joined #ruby
burlyscudd has joined #ruby
shaunbaker has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
freerobby has quit [Ping timeout: 264 seconds]
Jackneill has quit [Remote host closed the connection]
anay has joined #ruby
burlyscudd has quit [Ping timeout: 256 seconds]
nomenkun has joined #ruby
visof has joined #ruby
vlad_starkov has joined #ruby
sambao21 has joined #ruby
ravenzz has joined #ruby
ravenzz has quit [Changing host]
ravenzz has joined #ruby
visof has quit [Client Quit]
sambao21 has quit [Client Quit]
Ry0__ has quit []
leonid__ has joined #ruby
nomenkun has quit [Ping timeout: 264 seconds]
Ry0_ has joined #ruby
wallerdev has joined #ruby
akashj87 has joined #ruby
wesside has quit [Quit: Computer has gone to sleep.]
anay has quit [Remote host closed the connection]
jalcine has quit [Excess Flood]
bklane has joined #ruby
pskosinski_ has joined #ruby
Dekade has joined #ruby
pskosinski has quit [Ping timeout: 240 seconds]
seejohnrun has joined #ruby
DaniG2k has joined #ruby
sambao21 has joined #ruby
takezawa has quit [Remote host closed the connection]
maxmanders has joined #ruby
_serial_ has joined #ruby
freeayu has quit [Remote host closed the connection]
pskosinski_ is now known as pskosinski
_serial_ has quit [Client Quit]
maxmanders has quit [Ping timeout: 256 seconds]
akashj87_ has joined #ruby
workmad3 has quit [Ping timeout: 276 seconds]
pitzips has joined #ruby
akashj87 has quit [Ping timeout: 276 seconds]
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
atno has quit [Remote host closed the connection]
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
seejohnrun has quit [Ping timeout: 264 seconds]
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
goshakkk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jefflyne has joined #ruby
jalcine- has joined #ruby
jalcine- has quit [Excess Flood]
r0bgleeson has quit [Ping timeout: 256 seconds]
akashj87__ has joined #ruby
julweber has quit [Remote host closed the connection]
noop has joined #ruby
atno has joined #ruby
JZTech101 has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC]
akashj87_ has quit [Ping timeout: 276 seconds]
cburyta_ has joined #ruby
jimg has joined #ruby
Binauralman has joined #ruby
kofno has joined #ruby
atno has quit [Remote host closed the connection]
denver has joined #ruby
atno has joined #ruby
vdandre has joined #ruby
poseid has joined #ruby
jalcine- has joined #ruby
akashj87_ has joined #ruby
ILoveYou[ has quit [Read error: Connection reset by peer]
JZTech101 has joined #ruby
jimg has quit [Ping timeout: 264 seconds]
kofno has quit [Ping timeout: 248 seconds]
ILoveYou has joined #ruby
sailias has joined #ruby
akashj87__ has quit [Ping timeout: 276 seconds]
relix has joined #ruby
ravster has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<alem0lars>
I'm trying to use FFI to declare a struct stat using FFI::Struct, however it doesn't work. I'm supposing that it doesn't find the types. Is this correct: https://gist.github.com/alem0lars/5940149
tkuchiki has joined #ruby
poseid has quit [Quit: poseid]
gustavn has quit [Quit: Leaving]
vlad_starkov has quit [Remote host closed the connection]
Ry0_ has quit [Remote host closed the connection]
cam`_ has joined #ruby
DestinyAwaits1 has joined #ruby
ILoveYou has quit [Read error: Connection reset by peer]
poseid has joined #ruby
arya__ has joined #ruby
julweber has joined #ruby
ravster has left #ruby [#ruby]
IceDragon has joined #ruby
ILoveYou has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
freerobby has joined #ruby
DestinyAwaits has quit [Ping timeout: 256 seconds]
DestinyAwaits1 is now known as DestinyAwaits
DestinyAwaits has quit [Changing host]
DestinyAwaits has joined #ruby
cburyta_ has quit [Remote host closed the connection]
burlyscudd has joined #ruby
jonathanwallace1 has joined #ruby
jonathanwallace has quit [Read error: Connection reset by peer]
cofin has quit [Quit: cofin]
freerobby has quit [Ping timeout: 248 seconds]
shaunbaker has quit [Remote host closed the connection]
generalissimo has joined #ruby
tkuchiki has quit [Remote host closed the connection]
Mattix has joined #ruby
burlyscudd has quit [Ping timeout: 264 seconds]
arietis has quit [Quit: Computer has gone to sleep.]
ILoveYou has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
nomenkun has joined #ruby
cofin has joined #ruby
cburyta_ has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
ILoveYou has joined #ruby
ntus1017 has quit [Remote host closed the connection]
akashj87__ has joined #ruby
DaniG2k has left #ruby [#ruby]
nomenkun has quit [Ping timeout: 248 seconds]
JZTech101 has quit [Read error: Connection reset by peer]
tkuchiki has quit [Ping timeout: 264 seconds]
sailias has quit [Quit: Leaving.]
akashj87_ has quit [Ping timeout: 276 seconds]
ryanhirsch has joined #ruby
ryanhirsch has quit [Max SendQ exceeded]
pythogorian has joined #ruby
wallerdev has quit [Quit: wallerdev]
ryanhirsch has joined #ruby
ryanhirsch has quit [Max SendQ exceeded]
axeman- has quit [Ping timeout: 268 seconds]
ryanhirsch has joined #ruby
ryanhirsch has quit [Max SendQ exceeded]
axeman- has joined #ruby
<alem0lars>
how can i use an already defined C struct (struct stat) using FFI?
ryanhirsch has joined #ruby
ravenzz has quit []
flaritycat has joined #ruby
<flaritycat>
Hi, could anyone point me in the right direction of reading good examplecode for Ruby? I am interested in examples that are alike to UDF's and such.
ciziar has quit [Quit: Computer has gone to sleep.]
nuba_ is now known as nuba
meowsus has joined #ruby
Ry0_ has joined #ruby
workmad3 has joined #ruby
ravster has joined #ruby
sayan has quit [Ping timeout: 268 seconds]
arietis has joined #ruby
blischalk has joined #ruby
JZTech101 has joined #ruby
ashleyis has joined #ruby
havenwood has joined #ruby
Pacra has quit [Quit: Pacra]
nbouscal has joined #ruby
r0bgleeson has joined #ruby
thepumpk_ has quit [Remote host closed the connection]
IcyDragon has joined #ruby
ILoveYou has quit [Read error: Connection reset by peer]
ILoveYou has joined #ruby
Ry0_ has quit [Remote host closed the connection]
IceDragon has quit [Ping timeout: 264 seconds]
ntus1017 has joined #ruby
kofno has joined #ruby
brennanMKE has joined #ruby
ravster has quit [Ping timeout: 256 seconds]
Astralum has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
Ry0_ has joined #ruby
lwt has quit [Ping timeout: 264 seconds]
ntus1017 has quit [Remote host closed the connection]
julweber has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
jonathanwallace2 has joined #ruby
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
jonathanwallace1 has quit [Ping timeout: 264 seconds]
kobain has joined #ruby
Davey has joined #ruby
arubin has joined #ruby
AlHafoudh has joined #ruby
joshcheek has joined #ruby
jimg has joined #ruby
jonathanwallace3 has joined #ruby
joshcheek has quit [Read error: Connection reset by peer]
subbyyy has quit [Read error: Connection reset by peer]
jonathanwallace2 has quit [Ping timeout: 268 seconds]
joshcheek has joined #ruby
subbyyy has joined #ruby
gustavn has joined #ruby
joshcheek has quit [Read error: Connection reset by peer]
<alainus>
I have an array made like this: %w(bla bla bla), but Arel (a SQL query builder) only takes symbols, so I need to convert the array to [:bla, :bla, :bla], any tips ?
<Morrolan>
There's a few things wrong with that example. You can not assign to the block variable, you are lacking string interpolation, and a string needs to be converted to a symbol again.
<havenwood>
alainus: You can have a Symbol like :"%why%" but not :%never%
<havenwood>
but why?
<Morrolan>
Oh, welp, I was scrolled up.
ravster has quit [Ping timeout: 248 seconds]
Emmanuel_Chanel has quit [Quit: Leaving]
zodiak has joined #ruby
freerobby has quit [Ping timeout: 264 seconds]
<alainus>
havenwood, I'm trying to use Arel as a SQL builder. It works like this: user.project(:id).where(user[:email].matches_any(emails)) where emails = %i(a b c). That'll output: SELECT id FROM user WHERE (email LIKE "a" OR email LIKE "b" OR email LIKE "c")
<alainus>
However, I need SELECT id FROM user WHERE (email LIKE "%a%" OR email LIKE "%b%" OR email LIKE "%c%")
kofno has quit [Remote host closed the connection]
<alainus>
yeah it does.
<alainus>
I was hoping sqldsl could work, as it is much simpler to use
jonkri_ has joined #ruby
<alainus>
but the thing hasn't been updated in about 5 years
<r0bgleeson>
why not use Sequel?
banghouse has joined #ruby
<alainus>
r0bgleeson, that was the alternative. But I'm concerned that it only works when you have an active_record connection and corresponding database structure (i.e. Person.where("id" = 1) --> SELECT 'people' WHERE ('id' = 1); )
<alainus>
I don't know if you can use it with any database
<alainus>
which is what I'm doing
<r0bgleeson>
why do you think it only works with an AR schema?
jonkri has quit [Ping timeout: 264 seconds]
<r0bgleeson>
i mean, im sure it uses foreign keys in the same way
<r0bgleeson>
the focus isn't on being *just* an ORM though
vlad_starkov has quit [Ping timeout: 248 seconds]
Ortuna has quit [Quit: Computer has gone to sleep.]
arietis has joined #ruby
Ortuna has joined #ruby
nomenkun has quit [Ping timeout: 256 seconds]
ILoveYou has quit [Read error: Connection reset by peer]
<alainus>
r0bgleeson, I'll investigate. Arel has a pretty complicated usage, and algo it only works when the connection to the database is made with ActiveRecord (ActiveRecord::Base.establish_connection()). I'd like to use mysql2 for simplicity.
<alainus>
Not to mention it has zero documentation
<havenwood>
Sequel gem is nice.
Ry0_ has joined #ruby
ILoveYou has joined #ruby
<alainus>
how would you guys do it ? If you had to build a script to do some simple-to-not-so-simple MySQL queries on a database, but keep the queries dynamically built from arrays, external files, etc.
robscomputer_ has joined #ruby
Emmanuel_Chanel has joined #ruby
JZTech101 has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC]
<r0bgleeson>
I'd use sequel
<havenwood>
If the DB is MySQL, I'd use Sequel.
<alainus>
ok I'm going for that then. Bye bye Arel
<alainus>
Thanksx
sayan has joined #ruby
anay has joined #ruby
cburyta_ has quit [Remote host closed the connection]
<havenwood>
Ruby Object Mapper looks really interesting for the future: http://rom-rb.org
<havenwood>
Datamapper 2 ^
robscomputer has quit [Ping timeout: 264 seconds]
<Morrolan>
Oh? Neat. I used DM a while ago when working with a legacy scheme, worked like a charm.
ravster has joined #ruby
Shirakawasuna has joined #ruby
viszu has quit [Quit: Leaving.]
workmad3 has quit [Ping timeout: 248 seconds]
jefflyne has joined #ruby
ILoveYou has quit [Read error: Connection reset by peer]
jonathanwallace4 has joined #ruby
Hanmac has quit [Remote host closed the connection]
jonathanwallace3 has quit [Ping timeout: 268 seconds]
workmad3 has joined #ruby
<Morrolan>
You're quite fond of these two tools, eh? :P
cofin has quit [Quit: cofin]
viszu has joined #ruby
<r0bgleeson>
i switched to chruby
<r0bgleeson>
still using ruby-build though
<r0bgleeson>
now its just ruby-build 2.0.0.-p0 ~/.rubies/2.0.0.-p0
browndawg has quit [Quit: Leaving.]
<r0bgleeson>
i like that chruby fuzzy matches when you version switch
<alainus>
Now that's what I call documentation =D
<r0bgleeson>
i can say 'chruby 2.0.0' and it'll figure it out.
<alainus>
Sequel
sambao21 has joined #ruby
atno has quit [Ping timeout: 264 seconds]
<r0bgleeson>
yup, good docs
<r0bgleeson>
it doesnt focus on the ORM
Ry0_ has quit [Remote host closed the connection]
<r0bgleeson>
ping
pythogorian has quit [Ping timeout: 276 seconds]
sambao21 has quit [Client Quit]
<havenwood>
r0bgleeson: w00t, yeah ruby-install is just barely ready for prime time
<havenwood>
Morrolan: yup, i'm a fan boi
predator117 has quit [Ping timeout: 256 seconds]
<r0bgleeson>
havenwood: i think adding 'rbenv install' was probably a bad idea
freerobby has joined #ruby
sambao21 has joined #ruby
<r0bgleeson>
havenwood: it removed the separation of responsibilities from user and made them visible just to the developers
mcatch has quit [Quit: Page closed]
<r0bgleeson>
i forgot ruby-build even existed for a while :)
Davey has quit [Quit: Computer has gone to sleep.]
sam113101 is now known as sam113101_afk
_Andres has joined #ruby
Quashie has joined #ruby
Gruu has joined #ruby
Gruu has quit [Read error: Connection reset by peer]
freerobby has quit [Ping timeout: 256 seconds]
predator117 has joined #ruby
jonathanwallace4 has quit [Ping timeout: 268 seconds]
havenwood has quit [Ping timeout: 268 seconds]
lwt has joined #ruby
<alainus>
can rescue * => e be used in a begin .. end block to get ANY error into "e" ?
<MrZYX>
just omit the *. Note though that's a code smell
havenwood has joined #ruby
poseid has quit [Quit: poseid]
<alainus>
MrZYX, what's that?
jmimi has quit [Ping timeout: 256 seconds]
<MrZYX>
you should almost always list the exceptions you expect
<MrZYX>
an indicator for bad code
<alainus>
I mean, I have the ones I expect, but I'd like to do something when something I don't expect comes up
sambao21 has quit [Quit: Computer has gone to sleep.]
<alainus>
Which, possibly, is just being paranoid
<MrZYX>
yeah, you'll notice soon enough if something bubbles up you don't expect :P
<MrZYX>
rescuing everything and then log it usually just leads to you ignoring them :P
Davey has joined #ruby
<r0bgleeson>
if im making network calls i always rescue SystemCallError
thecommongeek has joined #ruby
<r0bgleeson>
MrZYX: in a Rails app its not uncommon for a background job to rescue everything and pass the exception to Airbrake.notify
<MrZYX>
sure, that's why I'm using "usually", "almost" etc all the time ;)
<MrZYX>
it's not the general case however
<r0bgleeson>
yeah, it can be hard to rescue the right exceptions sometimes though
<r0bgleeson>
APIs rarely document that
Pacra has quit [Quit: Pacra]
<MrZYX>
so I guess all I really wanted to emphasize is that rescuing all exceptions should be a very conscious decision and not laziness
snearch has quit [Quit: Verlassend]
<r0bgleeson>
yup
<MrZYX>
and that's why I always consider such a statement as something to review
codezombie has joined #ruby
Pacra has joined #ruby
Pacra has quit [Client Quit]
<r0bgleeson>
for example when i am using wrappers for web services or APIs sometimes it just isnt documented what happens in the event of error, so I rescue SystemCallError & usually a generic error class that might also cover the SystemCallError, hard to know
jimg has joined #ruby
<r0bgleeson>
it might just be for a bad API response
codecop has quit [Remote host closed the connection]
Ry0_ has joined #ruby
Ry0_ has quit [Remote host closed the connection]
<havenwood>
a nice Rack challenge this time
Ortuna has quit [Read error: No route to host]
Ry0_ has joined #ruby
Ortuna has joined #ruby
ryanhirsch has joined #ruby
viszu has quit [Quit: Leaving.]
predator117 has joined #ruby
kobain has quit [Ping timeout: 276 seconds]
<alainus>
In a rescue Exception => e, how do I output the line number ?
<alainus>
Uh, no matter
Ry0_ has quit [Ping timeout: 268 seconds]
hamakn has joined #ruby
burlyscudd has joined #ruby
cofin has quit [Quit: cofin]
cantonic has quit [Quit: cantonic]
hamakn has quit [Remote host closed the connection]
blackmesa has joined #ruby
vlad_starkov has joined #ruby
visof has joined #ruby
<visof>
hello
cburyta_ has joined #ruby
<MrZYX>
alainus: e.backtrace contains the backtrace as an array
burlyscudd has quit [Ping timeout: 256 seconds]
nomenkun has joined #ruby
Neomex1 has joined #ruby
queston has joined #ruby
abbsi has joined #ruby
meowsus has left #ruby [#ruby]
hamakn has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
<r0bgleeson>
a string is a crappy representation of a backtrace though
<visof>
i'm write a script that create a file then use `External command working on this file` but the command sees the file empty but when i check it using cat it has a content
<visof>
is there any issues using ` ` ?
queston_ has joined #ruby
Neomex has joined #ruby
<Neomex>
does qtruby support ruby 2.0.0? can't make it work
<Neomex>
it says it cant find qtruby4.so (LoadError), though this file exist
queston has quit [Read error: Connection reset by peer]
<Neomex>
ive installed qtbindings gem on windows
JZTech101 has joined #ruby
Neomex1 has quit [Client Quit]
vlad_starkov has quit [Ping timeout: 264 seconds]
nomenkun has quit [Ping timeout: 276 seconds]
<Neomex>
alternatively, what other ruby2 compatible GUI library would you recommend?
<MrZYX>
visof: put a minimal example to reproduce into a gist
lewix has joined #ruby
ssvo has joined #ruby
fomatin has joined #ruby
<Neomex>
even require 'qt' causes this
<popl>
Neomex: can you paste the exact error message to gist?
<visof>
the error i got error: File rpmbuild/SPECS/cookbooks.spec does not appear to be a specfile.
<popl>
Neomex: are you using require 'Qt4' in your code?
arietis has quit [Quit: Computer has gone to sleep.]
<visof>
when i do check this spec file it has the content
<visof>
i don't know what is the problem
cj3kim has joined #ruby
<visof>
i have tried running the command using `` and exec and system
Es0teric has joined #ruby
<visof>
but the same error i got
<r0bgleeson>
visof: dont know if its the issue or not, but you should close the file so ruby is forced to flush its buffers (if any)
<Neomex>
popl: I wasn't, but it doesnt work with it either
<visof>
r0bgleeson, oh
<popl>
Neomex: How did you install Qt4?
<visof>
that's the issue
<visof>
i will check
<MrZYX>
visof: that neither uses `` nor is it self contained to reproduce whatever issue with `` you have. However your issue is that you use open & write without closing it before invoking the command. Use File.write instead
<Neomex>
popl: through JetBrains gem manager
<visof>
thanks r0bgleeson MrZYX
<popl>
Neomex: I mean the Qt4 library.
<popl>
Neomex: You're on Windows. You need to install that if you want to use Qt4
<popl>
well I guess you'd need to install it anywayss
thecommongeek has quit [Quit: This computer has gone to sleep]
<alainus>
Thanks MrZYX
burlyscudd has joined #ruby
pkrnj has joined #ruby
ryanhirsch has quit [Ping timeout: 268 seconds]
freerobby has quit [Ping timeout: 248 seconds]
pipework has joined #ruby
Xeago has joined #ruby
nari has quit [Ping timeout: 256 seconds]
vlad_starkov has joined #ruby
jonathanwallace4 has joined #ruby
matematikaadit has joined #ruby
ryanhirsch has joined #ruby
nomenkun has joined #ruby
pythogorian has joined #ruby
EPIK has quit [Ping timeout: 256 seconds]
lethjakman has quit [Ping timeout: 248 seconds]
DandyPandy_ has joined #ruby
Xeago_ has joined #ruby
bnagy has joined #ruby
burlyscudd has quit [Ping timeout: 268 seconds]
<DandyPandy_>
Hi everyone. I have an object on which I would like to update multiple attributes on an existing. Is there a general method that applies to all objects to make multiple attribute assignments, or do I have to assign each attribute individually?
yacks has joined #ruby
<DandyPandy_>
wow, that sentence was messed up. *an existing object
DandyPandy_ is now known as DandyPandy
m8 has quit [Read error: Connection reset by peer]
echevemaster has joined #ruby
Neomex has quit []
nomenkun has quit [Ping timeout: 264 seconds]
Ortuna has quit [Ping timeout: 264 seconds]
vlad_starkov has quit [Ping timeout: 276 seconds]
<waxjar>
"attributes" (instance variables, really) can only be accessed trough method calls (attr_accessor & friends just define methods)
bklane has joined #ruby
<DandyPandy>
waxjar: I'm barely inducted into the world of ruby. I'm coming to it via chef, so my nomeclature is surely to be off
queston has quit [Remote host closed the connection]
jbpros has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
anay has quit [Remote host closed the connection]
<Morrolan>
DandyPandy: Might be a good idea if you uploaded some example code on gist.github.com, and described your desired behaviour? :)
brennanMKE has quit [Remote host closed the connection]
Virunga has quit [Remote host closed the connection]
<r0bgleeson>
fbernier: locked shared by all instances, probably
<r0bgleeson>
lock*
cj3kim has quit [Remote host closed the connection]
<r0bgleeson>
so when one instance hits #synchronize other instances in different threads will need to wait
<r0bgleeson>
probably because there is shared state
Asher1 has joined #ruby
<fbernier>
makes sens, thanks
sam113101_afk is now known as sam113101
b0oh has left #ruby [#ruby]
jonkri_ has quit [Quit: jonkri_]
Asher has quit [Ping timeout: 264 seconds]
jds has joined #ruby
DanKnox_away is now known as DanKnox
pitzips has quit [Ping timeout: 256 seconds]
pythogorian has left #ruby [#ruby]
poseid has quit [Quit: poseid]
<matematikaadit>
DandyPandy: your example is fine as it is. But if you prefer you could iterate over a symbol and use #instance_variable_get #instance_variable_set
Hugo_Henrique has joined #ruby
berkes has joined #ruby
Hugo_Henrique has left #ruby [#ruby]
<DandyPandy>
matematikaadit: thanks for taking a look
jonahR has joined #ruby
pythogorian has joined #ruby
pythogorian has quit [Quit: Lost terminal]
Node has joined #ruby
Ry0_ has joined #ruby
<matematikaadit>
DandyPandy: np
atno has joined #ruby
Mars` has joined #ruby
vlad_starkov has joined #ruby
Ry0_ has quit [Ping timeout: 248 seconds]
Jefus has quit [Ping timeout: 268 seconds]
Asher1 has quit [Ping timeout: 268 seconds]
matematikaadit has quit [Quit: Leaving]
jds has quit [Remote host closed the connection]
pythogorian has joined #ruby
jds has joined #ruby
alem0lars has quit [Ping timeout: 256 seconds]
queston has joined #ruby
seejohnrun has quit [Ping timeout: 264 seconds]
pythogorian has quit [Client Quit]
Hare has joined #ruby
queston has quit [Remote host closed the connection]
james_ has joined #ruby
<Hare>
Im trying to use reg ex to extractthe body of an email sent from yahoo(dunno if that matters) anyways I have ot working.. but my code seems sloppy.. can anyone tell me if there is a better way to do it. http://pastebin.com/qarm2SWq
james_ is now known as Guest60757
jimg has joined #ruby
thecommongeek has joined #ruby
jds has quit [Ping timeout: 264 seconds]
troker has quit [Quit: troker]
brennanMKE has joined #ruby
lateralus has joined #ruby
fenicks has quit [Ping timeout: 264 seconds]
queston has joined #ruby
tjbiddle has joined #ruby
jbpros has quit [Quit: jbpros]
lateralus has quit [Client Quit]
ntus1017 has joined #ruby
Asher has joined #ruby
altivec has joined #ruby
altivec has quit [Client Quit]
jimg has quit [Ping timeout: 264 seconds]
fenicks has joined #ruby
petru has joined #ruby
<petru>
Hi. Can anyone please point me to a simple IRC framework that works and is fairly well documented?
wesside has quit [Quit: I think I heard an ice cream truck..]
kindjal has quit [Ping timeout: 264 seconds]
BombStrike has joined #ruby
freerobby has joined #ruby
wesside has joined #ruby
diegoviola has joined #ruby
lwt has quit [Ping timeout: 248 seconds]
thoolihan has joined #ruby
Asher has quit [Ping timeout: 268 seconds]
Astralum has quit [Ping timeout: 276 seconds]
freerobby has quit [Ping timeout: 276 seconds]
lwt has joined #ruby
icecandy has joined #ruby
tonini has quit [Ping timeout: 248 seconds]
colonolGron has joined #ruby
goshakkk has joined #ruby
nomenkun has joined #ruby
icecandy has quit [Remote host closed the connection]
cofin has joined #ruby
icecandy has joined #ruby
zeromodulus has joined #ruby
zeromodulus has quit [Changing host]
zeromodulus has joined #ruby
Ry0_ has quit [Ping timeout: 248 seconds]
headius has quit [Quit: headius]
queston has joined #ruby
ryanhirsch has joined #ruby
nomenkun has quit [Ping timeout: 268 seconds]
fomatin has joined #ruby
kaichanvong has quit [Read error: Operation timed out]
headius has joined #ruby
alem0lars has joined #ruby
kaichanvong has joined #ruby
queston has quit [Ping timeout: 264 seconds]
Shirakawasuna has quit [Quit: Leaving]
machuga- is now known as machuga
cofin has quit [Quit: cofin]
headius has quit [Client Quit]
destruct1re has quit [Read error: Operation timed out]
colonolGron has quit [Quit: Lost terminal]
generalissimo has quit [Remote host closed the connection]
destructure has joined #ruby
<alainus>
Given a = [1,2,3,4,5], how can I build: "ELT(1+rand()*4, [1, 2, 3, 4, 5])", I'm attempting with Splat, but it doesn't work: "ELT(1+rand()*#{a.count-1}, #{*a})"
queston has joined #ruby
<alainus>
I'm sorry, what I need to build is: "ELT(1+rand()*4, 1, 2, 3, 4, 5)"
gokul has quit [Ping timeout: 248 seconds]
<alainus>
"ELT(1+rand()*4, [1, 2, 3, 4, 5])" is what I DON'T want
<alainus>
I get caught in the sophistication of Ruby and forget the basics
Matip has joined #ruby
queston has quit [Ping timeout: 264 seconds]
<waxjar>
the splat operator is used to catch a couple of arguments as an Array: if you have a method with the signature name(one, *two), the first argument will be caught by "one" and the rest of the arguments will be caught as an Array in "two".
<waxjar>
it's also used in variable assignment like so: one, two = *[1, 2]
<waxjar>
one is now 1, two is 2
<MrZYX>
uhm, one, two = [1, 2] work just fine since = 1, 2 is an implicit array
Mattix has quit [Ping timeout: 248 seconds]
<MrZYX>
also the splat can be used when calling a method to pass an array to as individual arguments, def foo(one, two); end; foo(*[1, 2])
thebastl has quit [Remote host closed the connection]
<waxjar>
oh wow, i did not know that
<alainus>
this is great
<MrZYX>
and on the left hand side of an assignment to eat up the rest, one, *other = [1, 2, 3]; other #=> [2, 3]
<MrZYX>
or even *other, three = [1, 2, 3]; other #=> [1, 2]
freerobby has joined #ruby
freerobby has quit [Ping timeout: 264 seconds]
<MrZYX>
now lets combine that with array decomposition: (one, *two_and_three), (four, *five_and_six) = [1, 2, 3], [4, 5, 6]
<MrZYX>
and yes, you can use that in method definitions too
iamjbeck_ has joined #ruby
txdv has quit [Ping timeout: 248 seconds]
iamjbecker has quit [Ping timeout: 268 seconds]
Asher has joined #ruby
chattmatt has quit [Quit: chattmatt]
Virunga has quit [Remote host closed the connection]
reset has quit [Quit: Leaving...]
brennanMKE has joined #ruby
staafl has joined #ruby
AlHafoudh has quit [Quit: Computer has gone to sleep.]
txdv has joined #ruby
popl has joined #ruby
Astralum has joined #ruby
iamjbeck_ has quit [Remote host closed the connection]
jimg has joined #ruby
berkes has quit [Ping timeout: 264 seconds]
goshakkk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
stkowski has joined #ruby
CaptainJet has joined #ruby
jimg has quit [Ping timeout: 264 seconds]
ssvo has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.1]
goshakkk has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
<jmsbrwr>
My project is telling me it can't require a gem that bundler installed. If there were something going wrong with the gem, would I still get a 'cannot load such file' error when requiring it
pskosinski has quit [Remote host closed the connection]
braincra- has joined #ruby
pskosinski has joined #ruby
tjbiddle has joined #ruby
pskosinski has quit [Remote host closed the connection]
icecandy has quit [Remote host closed the connection]
xardas has quit [Ping timeout: 268 seconds]
<prsn>
does anyone here use the ruby emacs mode? And if so, have you found a way to fix its horrible overindentation of function args on new lines?
postmodern has joined #ruby
thepumpkin has joined #ruby
xardas has joined #ruby
axe has joined #ruby
subbyyy has joined #ruby
axe has quit []
Davey has quit [Quit: Computer has gone to sleep.]
kirun has quit [Quit: Client exiting]
lwt has quit [Ping timeout: 268 seconds]
dwirc has quit [Ping timeout: 268 seconds]
mickeyd has joined #ruby
nettoweb has quit [Quit: nettoweb]
freerobby has joined #ruby
lwt has joined #ruby
<mickeyd>
im trying to write a ruby script and I defined a method at the bottom of the script but when i try to refer to it, it says its an undefined method what am I doing wrong? https://gist.github.com/anonymous/3f2bd174101b975f7776
<MrZYX>
you called it before you defined it
<mickeyd>
oh! thanks :D
brennanMKE has quit [Remote host closed the connection]
<MrZYX>
foo; def foo; end; doesn't work. note though that def bar; foo; end; def foo; end; bar; would work
freerobby has quit [Ping timeout: 248 seconds]
Node has joined #ruby
alem0lars has quit [Ping timeout: 264 seconds]
asellus has quit [Quit: WeeChat 0.4.0]
ssvo has quit [Ping timeout: 264 seconds]
jmimi has quit [Ping timeout: 264 seconds]
kaichanvong has quit [Quit: _]
jimg has joined #ruby
alem0lars has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
cofin has joined #ruby
rickruby has joined #ruby
swills has quit [Read error: Connection reset by peer]
swills has joined #ruby
swills has quit [Changing host]
swills has joined #ruby
cofin has quit [Ping timeout: 276 seconds]
Asher has quit [Ping timeout: 276 seconds]
braincra- has quit [Ping timeout: 264 seconds]
Fire-Dragon-DoL has joined #ruby
dwirc has joined #ruby
_seanc_ has quit [Quit: _seanc_]
zigomir has quit [Ping timeout: 276 seconds]
pkrnj has joined #ruby
ericmathison has quit [Quit: leaving]
_seanc_ has joined #ruby
thibauts_ has quit [Ping timeout: 268 seconds]
thibauts has joined #ruby
braincrash has joined #ruby
yacks has quit [Ping timeout: 248 seconds]
freerobby has joined #ruby
Mars^ has joined #ruby
brennanMKE has joined #ruby
Mars` has quit [Ping timeout: 264 seconds]
verto has quit [Ping timeout: 276 seconds]
thibauts has quit [Ping timeout: 248 seconds]
nomenkun has joined #ruby
Node has quit [Ping timeout: 256 seconds]
freerobby has quit [Ping timeout: 276 seconds]
jmimi has joined #ruby
dwirc has quit [Read error: Connection reset by peer]
_seanc_ has quit [Quit: _seanc_]
dwirc has joined #ruby
nomenkun has quit [Ping timeout: 264 seconds]
Pholey has joined #ruby
<Pholey>
allrighty
thibauts has joined #ruby
<Pholey>
in python there is is something called input, which run's python code in it's parameters
<Pholey>
well
<Pholey>
what the user entered as python code
brennanMKE has quit [Ping timeout: 276 seconds]
blischalk has joined #ruby
subbyyy has quit [Quit: none 0.3.9.2]
subbyyy has joined #ruby
<Morrolan>
In Python 2, that is. Python 3's input() is equivalent to Python 2's raw_input().
<Morrolan>
Got a feeling there's more to your question though, eh. ;)
<Pholey>
yeah haha
<Pholey>
basically, i have a random string of ruby code
<Pholey>
that i would like to execute
<Morrolan>
Aaand you feel the need to evaluate it.
<Pholey>
aha
<Pholey>
yes
<Pholey>
thanks
<MrZYX>
where do you have that string? in a file? in the shell? in a ruby program?
<Pholey>
ruby program
<Pholey>
but eval was what i needed
rickruby has quit [Remote host closed the connection]
<Pholey>
eval(ruby_code)
<Pholey>
i am writing a brainfuck to ruby interpreter
<MrZYX>
hm, can you describe the actual usecase? I never had the need to use eval in ruby yet
<MrZYX>
a
<MrZYX>
h
<MrZYX>
hm
<MrZYX>
"to"?
<Pholey>
well,
bklane has quit [Remote host closed the connection]
<Pholey>
lets say i have x, x = gets
<Pholey>
lets say the user enters "puts 'hello'"
<Pholey>
i want it to print back "hello"
kaichanvong has joined #ruby
<MrZYX>
well, that's irb or ruby -e
<Morrolan>
So far it sounds like you're replicating irb or pry.
<Morrolan>
*snrk*
<Pholey>
sorta
<Pholey>
like i said its an interpreter
<Pholey>
from brainfuck to ruby
codecop has quit [Remote host closed the connection]
<MrZYX>
still not sure what the "to" here means
kindjal has joined #ruby
<MrZYX>
a brainfuck to ruby converter? a brainfuck interpreter in ruby?
<Pholey>
convert brainfuck code into ruby code
<Pholey>
in ruby
<Pholey>
so both haha
<MrZYX>
so why do you need to eval it then?
<MrZYX>
just print the result
<Pholey>
well, because after it is done translating, i want it to run
<MrZYX>
I wouldn't expect a converter to actually run it
<MrZYX>
should be up to the user what to do with it IMO
iamjbecker has quit [Remote host closed the connection]
<Pholey>
yes, but i want it to stay inside the interpreter entirely
generalissimo has joined #ruby
<MrZYX>
well then it's an interpreter
<Pholey>
so no shell commands
<MrZYX>
no need to generate ruby at all
Es0teric has quit [Remote host closed the connection]
<Pholey>
well
<Pholey>
its brainfuck to ruby
dwirc has quit [Ping timeout: 276 seconds]
<MrZYX>
but if the generated shall only ever be executed and never leave the thing, why bother generating it at all?
suporte85 has joined #ruby
<MrZYX>
*generated ruby
<MrZYX>
feels pointless
<Pholey>
you misunderstand
danslo has quit [Quit: danslo]
<Pholey>
./bf.rb inputfile.bf
<Pholey>
ok
`p has joined #ruby
Mars^ has quit [Ping timeout: 248 seconds]
<Pholey>
so after *converting* i need to execute
<Pholey>
think brainfuck with ruby syntax
<Xeago_>
then don't convert it, just interpret it
<Xeago_>
no need to translate it into ruby
<Pholey>
but i am telling you i need to
<MrZYX>
yeah, all you need is a counter and print iirc
<MrZYX>
you gave no reason yet
<Pholey>
its complicated.. haha
<Pholey>
can we just trust that its for a good reason
<MrZYX>
nope :P
<Pholey>
:/
<Pholey>
well
queston has quit [Ping timeout: 252 seconds]
<MrZYX>
I guess I should get some sleep instead :P
<Pholey>
better yet
nbouscal has quit [Quit: Computer has commenced electric sheep tracking protocol.]
<Pholey>
code = "puts 'hello"
<Pholey>
in a ruby script, how would i put "code" as part of the script itself
<Pholey>
code = "puts 'hello"
ToApolytoXaos has quit [Quit: Leaving]
<Pholey>
end = " world"
<Pholey>
how would i get hello world with given information
<Pholey>
and not "puts hello world"
<MrZYX>
gsub("puts ", "") ? scnr
<Pholey>
:/
<Pholey>
but without any substitution methods
<Morrolan>
You know the obligatory question now, yes?
<Pholey>
?
<Morrolan>
"Why without substitution?" :P
pitzips has joined #ruby
jbueza has joined #ruby
<Pholey>
because i want the variable "code" to be run as just that, code.
jbueza has quit [Max SendQ exceeded]
dwirc has joined #ruby
braincra- has joined #ruby
<MrZYX>
eval can do that. However the real issue is again why you need it. Unless you're building a REPL of some sort there's almost always a better way for the user to input the information and for you to process it
jbueza has joined #ruby
<Pholey>
ok,
<Pholey>
let me see if i can explain
nettoweb has joined #ruby
jbueza has quit [Client Quit]
<prsn>
pholey, do you understand why people are giving you a hard time about eval?
JZTech101 has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC]
queston has joined #ruby
<Pholey>
not really haha
<prsn>
it's because in general it's incredibly dangerous.
<MrZYX>
I bet you can translate that to ruby, can't you?
<Pholey>
meaning, it cannot translate very well into ruby, since it can only really use basic programming things
<Pholey>
well, i have a pure brainfuck interpreter already
<Pholey>
no eval
<Pholey>
it works just fine
freerobby has joined #ruby
<prsn>
ok, so what is actual new use case you want to support?
<Pholey>
however if i want to use ruby syntax with brainfuck...
<prsn>
what do you mean "use with"?
<Pholey>
so i can for example use "http.get"
<Pholey>
translate it to a string, then run in ruby
queston has quit [Ping timeout: 248 seconds]
<prsn>
why do you want the string? what will you do with it?
<Pholey>
because there is nothing for http get in brainfuck
<Morrolan>
As in, use Brainfuck to create an arbitrary string, then execute it in Ruby?
<Pholey>
^
<Pholey>
winner
sailias has joined #ruby
<Pholey>
its mainly a "pass the time" project
<prsn>
ahhhh, that was VERY unclear ^_^
<Pholey>
i didn't know how to explain it haha
<Pholey>
so yes, while eval might be unsafe, it is as unsafe as running a normal script in this case
ybart has joined #ruby
<Pholey>
at least i would think so
<MrZYX>
I still think you should do that with ruby bf.rb input | ruby
<prsn>
so wait, is the idea to write brainfuck programs that, WHEN RUN, output ruby programs?
maxmanders has joined #ruby
<prsn>
or do you want to be able to somehow mix ruby into brainfuck programs?
<prsn>
like, extend brainfuck's syntax with an "eval as ruby" operator?
<Pholey>
well, i intend to mix brainfuck into ruby programs as well,
pitzips has quit [Ping timeout: 256 seconds]
CaptainJet has quit [Ping timeout: 248 seconds]
<Pholey>
but currently when run, they output ruby programs
freerobby has quit [Ping timeout: 256 seconds]
<Pholey>
but only when a special argument is passed however
<Pholey>
otherwise it just falls back to the normal brainfuck interpreter
<prsn>
but the brainfuck you mix in is not going to just do what you want it to do, it's going to output ruby that does what you want it to do?
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
<Pholey>
uhh
<prsn>
so you'll have a source file that has some lines which are ruby that should just run, and some lines which are brainfuck that produces ruby strings that should run?
<Pholey>
yes?
<Pholey>
lol
<Pholey>
i think so
<Pholey>
if i understand you correctly
<prsn>
okay. that's pretty weird ^_^
<Pholey>
ahah
<Pholey>
except i don't want it to output a file, make it look like it is all the "interpreter's doing"
<Pholey>
make sense?
<prsn>
yes
JZTech101 has joined #ruby
<prsn>
but i think you can still avoid eval
<Pholey>
how so?
r0bby has quit [Read error: Connection reset by peer]
<Pholey>
to make things simpler, lets use the previous example code
maxmanders has quit [Ping timeout: 256 seconds]
<Pholey>
code = "puts 'hello"
<Pholey>
end = "world"
v0n has quit [Ping timeout: 264 seconds]
<Pholey>
how do i get "hello world" without substitution or eval?
fomatin has quit [Quit: Computer has gone to sleep.]
CaptainJet has joined #ruby
thepumpkin has quit [Remote host closed the connection]
<prsn>
just keep the "file" in memory. write a script that has two parts: 1) a preprocessor reads in the file line by line, executes the brainfuck and replaces those lines with the results. 2) pipe the result to a ruby process
blischalk has quit [Read error: Operation timed out]
robbyoconnor has joined #ruby
pskosinski has quit [Quit: Til rivido Idisti!]
robbyoconnor is now known as r0bby
<prsn>
I think the only real reason to avoid eval though is like, separation of concerns. You are really doing two different things (preprocessing/interpreting brainfuck, and then running a ruby sourcefile) and it makes sense to keep them separate, e.g., not do them in the same ruby runtime
<prsn>
with eval there could be namespace issues
<Pholey>
i see
arya_ has quit [Ping timeout: 248 seconds]
ffio has joined #ruby
r0bby is now known as robbyoconnor
CaptainJet has quit [Client Quit]
<prsn>
but i mean, it's your for-fun project, so do what you like :)
nettoweb has quit [Quit: nettoweb]
nettoweb has joined #ruby
DanKnox is now known as DanKnox_away
eka has quit [Quit: Computer has gone to sleep.]
arya_ has joined #ruby
fomatin has joined #ruby
brennanMKE has joined #ruby
thoolihan has quit [Quit: thoolihan]
pskosinski has joined #ruby
thepumpkin has joined #ruby
thoolihan has joined #ruby
nettoweb has quit [Read error: Connection reset by peer]
JZTech101 has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC]
CaptainJet has joined #ruby
wargasm has quit [Ping timeout: 268 seconds]
thecommongeek has quit [Quit: This computer has gone to sleep]
blischalk has joined #ruby
danslo has joined #ruby
Node has joined #ruby
Node has quit [Client Quit]
Beoran_ has joined #ruby
JZTech101 has joined #ruby
redramires has joined #ruby
freerobby has joined #ruby
MrZYX is now known as MrZYX|off
arya_ has quit [Ping timeout: 248 seconds]
Beoran__ has quit [Ping timeout: 248 seconds]
renderful has joined #ruby
fomatin has quit [Quit: Computer has gone to sleep.]
emmanuelux has joined #ruby
arya_ has joined #ruby
CaptainJet has quit []
freerobby has quit [Ping timeout: 248 seconds]
statarb3 has quit [Quit: Leaving]
xardas has quit [Ping timeout: 276 seconds]
brandon has joined #ruby
cj3kim has joined #ruby
brandon is now known as Guest73681
niklasb has joined #ruby
danslo has quit [Quit: danslo]
thoolihan has quit [Quit: thoolihan]
<Pholey>
still on prsn?
<Pholey>
this eval method is only accepting numbers :(
Xeago_ has quit [Remote host closed the connection]
cofin has joined #ruby
ybart has quit [Quit: ybart]
wallerdev has joined #ruby
ntus1017 has quit [Remote host closed the connection]
snearch has joined #ruby
zets has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
<Morrolan>
pholey: Well, 0 is the return value of the 'start' function.
<Morrolan>
Now in main you assign ruby = start(args), and then try to eval(ruby).
<Pholey>
gahh
JZTech101 has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC]
Xeago has quit [Remote host closed the connection]
doug1 has joined #ruby
freerobby has quit [Ping timeout: 256 seconds]
<Pholey>
uhh
<doug1>
newb question... return a value from a function? "foo"? return "foo" ?
Guest76890 has joined #ruby
<Pholey>
how do i get rid of it?
<Morrolan>
doug1: If there is no 'return' in a function, the last value will be returned implicitly.
<Pholey>
it was working just a minute ago :/
<Pholey>
without "0"
generalissimo has quit [Remote host closed the connection]
lwt has quit [Remote host closed the connection]
<kindjal>
For rails + rbenv + passenger, why can't my rails app see gems installed by "bundle install"
<kindjal>
I'm wondering if my apache config needs some SetEnv settings or something.
arya_ has quit [Ping timeout: 248 seconds]
<doug1>
Morrolan: something else is up then. Working with puppet custom facts. I've got Facter.add("instance_type") do "unknown" end... and it's not returning 'unknown'
IcyDragon has joined #ruby
Guest76890 has quit [Client Quit]
fomatin has quit [Quit: Computer has gone to sleep.]
<Morrolan>
kindjal: Might be a good idea to ask #rubyonrails as well. :)
<kindjal>
Morrolan: aha, thanks
BlueProtoman has joined #ruby
<BlueProtoman>
/join #sass
<BlueProtoman>
Oops
arya_ has joined #ruby
thesheff17 has joined #ruby
petru is now known as Petru_
<Morrolan>
doug1: The return value of this function call will depend on the code which gets executed *after* the block has been executed.
echevemaster has joined #ruby
petru has joined #ruby
Petru_ has quit [Quit: Leaving]
<doug1>
Morrolan: well, I had it working at one point. :(