apeiros_ changed the topic of #ruby to: programming language || ruby-lang.org || Paste >3 lines of text in http://pastie.org || Rails is in #rubyonrails
nfluxx has quit [Remote host closed the connection]
nfluxx has joined #ruby
ph^_ has joined #ruby
dnyy has joined #ruby
niku4i has joined #ruby
Solnse has joined #ruby
ph^_ has quit [Remote host closed the connection]
beilabs has joined #ruby
ph^ has quit [Ping timeout: 244 seconds]
classix has quit [Ping timeout: 245 seconds]
jimeh2 has quit [Ping timeout: 244 seconds]
dankest has joined #ruby
xaq has quit [Remote host closed the connection]
jimeh2 has joined #ruby
benatwork has joined #ruby
maesbn has joined #ruby
classix has joined #ruby
JonnieCache has quit [Ping timeout: 265 seconds]
d2s has quit [Ping timeout: 265 seconds]
perryh_away is now known as perryh
benatwork has quit [Ping timeout: 245 seconds]
d2s has joined #ruby
gmci has quit [Read error: Connection reset by peer]
SegFaultAX|work2 has quit [Read error: Connection reset by peer]
yxhvuud has joined #ruby
gmci has joined #ruby
saidin_ has quit [Ping timeout: 265 seconds]
ZachBeta has joined #ruby
yxhuvud has quit [Ping timeout: 248 seconds]
bwlang_ has joined #ruby
SegFaultAX|work2 has joined #ruby
bwlang has quit [Ping timeout: 244 seconds]
bwlang_ is now known as bwlang
perryh is now known as perryh_away
moeSeth_ has joined #ruby
moeSeth has quit [Max SendQ exceeded]
moeSeth_ is now known as moeSeth
maesbn has quit [Remote host closed the connection]
madhatter has quit [Ping timeout: 245 seconds]
adamkittelson has quit [Remote host closed the connection]
andrewhl has quit [Remote host closed the connection]
Boohbah has quit [Ping timeout: 276 seconds]
madhatter has joined #ruby
Boohbah has joined #ruby
igotnolegs has quit [Quit: Computer has gone to sleep.]
mattonrails has joined #ruby
kawa_xxx has quit [Read error: Connection timed out]
kawa_xxx has joined #ruby
tvw has quit [Ping timeout: 245 seconds]
kawa_xxx has quit [Remote host closed the connection]
b3gott3n has joined #ruby
kenichi has quit [Remote host closed the connection]
undersc0re97 has quit [Ping timeout: 248 seconds]
beilabs has quit [Ping timeout: 240 seconds]
c0rn has joined #ruby
iocor has quit [Quit: Computer has gone to sleep.]
rmascarenhas has joined #ruby
perryh_away is now known as perryh
Solnse has quit [Read error: Connection reset by peer]
akem has quit [Read error: Operation timed out]
akem has joined #ruby
akem has quit [Max SendQ exceeded]
c0rn has quit [Client Quit]
banisterfiend has quit [Remote host closed the connection]
bwlang has quit [Quit: bwlang]
affix has quit [*.net *.split]
saispo has quit [*.net *.split]
rotor has quit [*.net *.split]
__main__ has quit [*.net *.split]
TheMoonMaster has quit [*.net *.split]
regedarek has quit [*.net *.split]
Veejay has quit [*.net *.split]
wvms has joined #ruby
Ammar_iD has joined #ruby
akem has joined #ruby
mattonrails has quit [Remote host closed the connection]
akem has quit [Max SendQ exceeded]
akem has joined #ruby
ipoval has quit [Quit: ipoval]
Ammar01 has quit [Ping timeout: 244 seconds]
saispo has joined #ruby
affix has joined #ruby
rotor has joined #ruby
Veejay has joined #ruby
__main__ has joined #ruby
regedarek has joined #ruby
TheMoonMaster has joined #ruby
beilabs has joined #ruby
dankest has quit [Quit: Leaving...]
trend has joined #ruby
perryh is now known as perryh_away
kevinbond has joined #ruby
cousine has quit [Remote host closed the connection]
shevy has quit [Ping timeout: 245 seconds]
Galgorth has quit [Ping timeout: 240 seconds]
mikepack_ has quit [Remote host closed the connection]
mikepack has joined #ruby
r4um has quit [Ping timeout: 252 seconds]
perryh_away has quit [Ping timeout: 252 seconds]
zealinux has joined #ruby
mikepack has quit [Ping timeout: 244 seconds]
ryanf has quit [Ping timeout: 265 seconds]
Okasu has joined #ruby
<Okasu>
hello
<Okasu>
i'm getting troubles with net/imap
<zealinux>
Hello everyone, I have a knotty issue
yxhvuud has quit [Ping timeout: 250 seconds]
<Okasu>
how can i fetch emails that were recieved after ruby script start?
<zealinux>
when "rake db:create" then
<zealinux>
the cmd echo "rake aborted! Could not find a JavaScript runtime."
<TTilus>
scanf: but if u know u r good with system ruby, you need ruby1.9, -dev and rubygems1.9 i think
<scanf>
seems to have worked with 1.8
<TTilus>
scanf: imo it is wise to keep gems and deb from interacting, ie use gems only outside of paths used by debs
<TTilus>
scanf: ok 1.8 it is then
krusty_ar has quit [Read error: Connection reset by peer]
<TTilus>
scanf: you keep daemons from flying out of your nose
scp1 has joined #ruby
<TTilus>
scanf: and of course you still need to install system lib deps if u have gems that have native deps, and -dev pkgs for c extensions
krusty_ar has joined #ruby
wonderwall has joined #ruby
yoklov has quit [Quit: bye!]
subbyyy has joined #ruby
_sjs has joined #ruby
sebastorama has quit [Quit: Leaving...]
krusty_ar has quit [Ping timeout: 245 seconds]
hadees has quit [Quit: hadees]
knightwalker has joined #ruby
<_sjs>
can anyone help me figure out how to get tk working with rvm? I'm running ubuntu and the default version can import tk fine, but when I switch to the rvm version it can't find it. I tried looking the the $: variable but I couldn't figure out where it's coming from
dnyy has quit [Remote host closed the connection]
<TTilus>
_sjs: i assume u need tk-dev package(s) in your system when installing tk gem, u have it installed in both rubies right?
dankest has quit [Quit: Leaving...]
<TTilus>
_sjs: afaik your system and rvm rubies have reparate gems by default, so if you have some gem in your system ruby your other rubies wont see it
niku4i has joined #ruby
<TTilus>
is tk stdlib or a gem? (im being terribly clueless now...)
<_sjs>
it's not a gem, libtcltk-ruby is install on ubuntu by default
<TTilus>
if its stdlib then i think it could be about your system not having tk dev when installing rvm ruby
tayy has joined #ruby
<TTilus>
you rvm ruby is sepöarate from sys, it doesnt see or benefit from *-ruby debs
Vert has quit [Ping timeout: 252 seconds]
niku4i has quit [Ping timeout: 265 seconds]
<TTilus>
it still could be a gem, gems are packaged as debs on debians
robbyoconnor has quit [Ping timeout: 250 seconds]
Vert has joined #ruby
mikepack has quit [Remote host closed the connection]
<TTilus>
_sjs: hum, it seems that you need to (re)compile your rvn rubies with tcl/tk dev packages installed so that vompilation is able to pick them up, dunno how you exactly make it happen though, sorry...
mikepack has joined #ruby
<TTilus>
damn typos
<TTilus>
ircing from phone :)
savage- has quit [Remote host closed the connection]
Okasu has left #ruby [#ruby]
* TTilus
goes to cook brekfast
robbyoconnor has joined #ruby
ipoval has joined #ruby
mikepack has quit [Ping timeout: 240 seconds]
b3gott3n has quit [Ping timeout: 244 seconds]
RudyValencia has joined #ruby
bambanx has quit [Quit: Saliendo]
savage- has joined #ruby
yannis_ has joined #ruby
yannis has quit [Read error: Connection reset by peer]
zomgbie has joined #ruby
yannis_ has quit [Client Quit]
ananthakumaran has joined #ruby
Asher has quit [Remote host closed the connection]
ice_cream has joined #ruby
ice_cream has quit [Changing host]
ice_cream has joined #ruby
Asher has joined #ruby
ice_cream has quit [Remote host closed the connection]
icy` has quit [Remote host closed the connection]
jonathanwallace has quit [Ping timeout: 260 seconds]
subbyyy has quit [Quit: Leaving.]
jonathanwallace has joined #ruby
scanf has left #ruby ["Off"]
ananthakumaran has quit [Ping timeout: 252 seconds]
icy` has joined #ruby
icy` has quit [Changing host]
icy` has joined #ruby
eywu has quit [Quit: Leaving.]
scp1 has left #ruby [" "]
benatwork has joined #ruby
havenn has quit [Remote host closed the connection]
Jackneill has joined #ruby
Jackneill has quit [Changing host]
Jackneill has joined #ruby
knightwalker has quit [Quit: knightwalker]
benatwork has quit [Ping timeout: 244 seconds]
Urth|Away is now known as Urthwhyte
tayy has quit [Remote host closed the connection]
Facefox has quit [Ping timeout: 244 seconds]
yeggeps has quit [Read error: Connection reset by peer]
seanstickle has quit [Quit: seanstickle]
ananthakumaran has joined #ruby
yeggeps has joined #ruby
Facefox has joined #ruby
dankest has joined #ruby
dangerousdave has joined #ruby
fifteenhundred has joined #ruby
ananthakumaran has quit [Ping timeout: 252 seconds]
tvw has joined #ruby
ryanf_ is now known as ryanf
adeponte has quit [Remote host closed the connection]
mpereira has quit [Ping timeout: 248 seconds]
king313 has joined #ruby
king313 has quit [Changing host]
king313 has joined #ruby
mneorr_ has joined #ruby
mneorr has quit [Ping timeout: 240 seconds]
fifteenhundred has quit [Quit: Leaving.]
keymone has quit [Read error: Connection reset by peer]
keymone has joined #ruby
luckyruby has quit [Remote host closed the connection]
tscolari has joined #ruby
bglusman has quit [Read error: Connection reset by peer]
bglusman has joined #ruby
pk1001100011 has joined #ruby
mikepack has joined #ruby
tscolari has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
beneggett has joined #ruby
mikepack has joined #ruby
savage- has quit [Remote host closed the connection]
mikepack has quit [Read error: Operation timed out]
savage- has joined #ruby
ericcoleman has joined #ruby
jonathan_ has joined #ruby
mikepack has joined #ruby
mikepack has quit [Remote host closed the connection]
mikepack has joined #ruby
trung has left #ruby [#ruby]
SPYGAME has joined #ruby
ananthakumaran has joined #ruby
jonathanwallace has quit [Ping timeout: 265 seconds]
SPYGAME has quit [Client Quit]
mikepack has quit [Ping timeout: 244 seconds]
rippa has quit [Ping timeout: 252 seconds]
tk___ has joined #ruby
mrsrikanth has joined #ruby
trend has quit [Quit: trend]
Hanmac has quit [Ping timeout: 265 seconds]
savage- has quit [Remote host closed the connection]
tomzx has quit [Ping timeout: 248 seconds]
klip has quit [Ping timeout: 260 seconds]
khakimov has quit [Quit: Computer has gone to sleep.]
jonathan_ has quit [Ping timeout: 245 seconds]
charliesome has quit [Ping timeout: 248 seconds]
daniel_hinojosa has quit [Ping timeout: 240 seconds]
mrsrikanth has left #ruby ["Leaving"]
nfk has joined #ruby
jonathanwallace has joined #ruby
niku4i has joined #ruby
charliesome has joined #ruby
xbayrockx has quit []
ramblex has quit [Quit: ramblex]
jimeh2 has joined #ruby
CheeToS has joined #ruby
xbayrockx has joined #ruby
wookiehangover has quit [Quit: i'm out]
beneggett has quit [Ping timeout: 252 seconds]
Galgorth has joined #ruby
roams has quit [Ping timeout: 252 seconds]
Galgorth has quit [Client Quit]
Galgorth has joined #ruby
martisj has quit [Remote host closed the connection]
sepp2k has joined #ruby
beneggett has joined #ruby
wookiehangover has joined #ruby
alan00 has joined #ruby
beneggett has quit [Client Quit]
alan00 has quit [Client Quit]
jonathanwallace has quit [Remote host closed the connection]
Raduwen has joined #ruby
alan00 has joined #ruby
shadoi has quit [Remote host closed the connection]
shadoi has joined #ruby
ph^ has joined #ruby
adamkittelson has quit [Remote host closed the connection]
Solnse has joined #ruby
beneggett has joined #ruby
yonggu_ has joined #ruby
shadoi has quit [Remote host closed the connection]
yonggu_ has quit [Read error: Connection reset by peer]
yonggu_ has joined #ruby
cousine has joined #ruby
keymone has quit [Read error: Connection reset by peer]
keymone has joined #ruby
cousine has quit [Remote host closed the connection]
Solnse has quit [Read error: Connection reset by peer]
<natibl>
I'm using Jekyll but when I add a new file in my _post folder, I run jekyll --server but my file isn't generating in the _site folder. How to force it ?
<Tasser>
natibl, 250
<Tasser>
natibl, #jekyll or #nanoc
<natibl>
oh ok, sorry
* rking
lazily refuses to dodge lasermissle.
nfluxx has quit [Ping timeout: 240 seconds]
<Mon_Ouie>
You need #hash and #eql? for #uniq to work
<zomgbie>
because obviously i'm always doing the same (proably not very rubyesque) things, should peek into other peoples code to learn more
mneorr has quit [Remote host closed the connection]
<zomgbie>
canton7: thanks for the link.. didn't know ruby had such well written docs 8-O why i never found them up to know while googling is a miracle to me
<Tasser>
Hash.new(foo: 23) {|h,k| ... } was hash with default?
looopy has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
geekfactor has joined #ruby
naz has quit [Ping timeout: 250 seconds]
<joshcheek>
I have a block. I need it to call it with arguments (including a block), within the context of a given instance. Is there anything for this? (instance_exec can't do the block)
naz has joined #ruby
<canton7>
Tasser, please clarify?
<flori>
Tasser: your default is now { foo: 23 }
<shevy>
hey
<shevy>
on windows, I can disable caps lock key by using regedit
<shevy>
then changing the key ... HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout
<shevy>
does one of you know if this is possible via ruby too?
<shevy>
I dont feel like manually editing that every time :\
<canton7>
shevy, appears to be possible using Win32::Registry
<joshcheek>
Best solution I have now is to define a method on the object, with the block, get a reference to it, remove it it, then invoke it
<baniseterfiend`>
joshcheek: oh it cant do the block
<joshcheek>
baniseterfiend`: yeah :(
<baniseterfiend`>
joshcheek: yeah i did the same thing, define_method iirc
<joshcheek>
IDK, maybe the arity thing for def/remove is not so bad.
seanstickle has quit [Quit: Nihil sub sole novum]
Chryson has quit [Quit: Leaving]
<baniseterfiend`>
joshcheek: it's an interesting edge case
<Tasser>
flori, oh
<baniseterfiend`>
joshcheek: probalby only situation i've wanted ruby to accept multiple blocks
<joshcheek>
Yeah, twisting Ruby in unintended ways, lol
undersc0re97 has joined #ruby
undersc0re97 has quit [Changing host]
undersc0re97 has joined #ruby
<shevy>
aha
<shevy>
apeiros wanted to have multiple blocks in ruby
<Tasser>
joshcheek, #bind ?
savage- has joined #ruby
JonnieCache has quit [Ping timeout: 245 seconds]
<Tasser>
hmm, methods only
<baniseterfiend`>
joshcheek: alternatively maybe u could redefine the metohd so it takes an optinoal proc object? (in lieu of a block)
<joshcheek>
Tasser: A good idea, though, I looked for it myself.
<flori>
Tasser: but, you should only use this form for immediate objects like Integers, for the others you should use Hash.new { |h, k| h[k] = [] }
<joshcheek>
baniseterfiend`: Not sure what you mean.
<Tasser>
flori, I know, I know
<joshcheek>
baniseterfiend`: Oh, you mean get the ref to the real method, then define my own that invokes it, ensuring proper arity is achieved?
maccosmo has joined #ruby
deryldoucette is now known as deryl
h4mz1d has joined #ruby
akem has joined #ruby
Morkel has quit [Quit: Morkel]
thone has joined #ruby
villainous has joined #ruby
<msch>
newbish ruby question, i'd like to paginate, so if i have 12345 results i'd like to have a block called in a loop with the arguments |0,9|, |10,19|, |20,29| etc. how do i best acomplish that?
naz has quit [Ping timeout: 244 seconds]
tomb_ has joined #ruby
<villainous>
Does anyone know where I can get some documentation on how to create rail ties for a gem I've created? It's an ORM kind of like Mongoid, so needs config hooks and model/config generators, which I've written, but I get "Could not find generator …" when I try to run them from a test app.
thone_ has quit [Ping timeout: 252 seconds]
<_br_>
msch: Are you using e.g. DataMapper? You can do that then easily with dm-pager. e.g. blah.page( @page, :per_page => 40)
<msch>
flori: ah right, i just saw that it returns an actual slice and not a number like .step does. that's exactly what i need, then i can just do slice.first and slice.last (would be nice to just get first/last though, in case i sometimes need slices of 100000000 items)
Richmond has joined #ruby
<rking>
Any of you fellers in Austin?
Sean_BE is now known as seanBEL
<_br_>
Nope, japan.
khakimov has quit [Quit: Computer has gone to sleep.]
<shevy>
_br_ cool. why are you in japan? coding the future of ruby?
Richmond has quit [Max SendQ exceeded]
<QKO>
_br_: do you play Guilty Gear?:D
<sec_>
wc
sec_ has left #ruby [#ruby]
<_br_>
shevy: I wish. Though, the guys from the ruby core are not far. Actually, same university as Sasada though :)
yabuki has quit [Remote host closed the connection]
user__ has joined #ruby
<_br_>
QKO: Unfortuantely no :[ Quite busy these days.
<QKO>
awww
Richmond has joined #ruby
<QKO>
there's been location testing these weekend
<QKO>
you missed out
akem has quit [Read error: Connection reset by peer]
<QKO>
like me:P
<_br_>
:)
<QKO>
though I heard it had input delay
<QKO>
and I strongly expect it was induced on purpose
xaxisx has joined #ruby
<_br_>
hehe might be
user__ has quit [Max SendQ exceeded]
<QKO>
hopefully they take it out again
user__ has joined #ruby
<QKO>
and if they can't release on consoles, just a PC port(preferably Linux)
<shevy>
hehe
<shevy>
a port for linux
<shevy>
what comes next man ... perl 6 on GNU Hurd?
<QKO>
well actually, Valve is starting to port to Linux
<QKO>
officially
webusnix has joined #ruby
<QKO>
if arcsys does make a Linux version, we won't be needing consoles for tournaments
akem has joined #ruby
<QKO>
we can use older PCs, put them in new housing and install a Linux that is set to boot just the game
Richmond has quit [Max SendQ exceeded]
<_br_>
shevy: lol :DD
neersighted is now known as neersight[d]
user__ has quit [Read error: Connection reset by peer]
Richmond has joined #ruby
seanBEL has quit [Quit: seanBEL]
<QKO>
with the consumer versions of windows, this isn't really possible
h4mz1d has joined #ruby
<QKO>
partially due to lisencing issues and partially because windows runs a LOT of crap
lkba has joined #ruby
looopy has joined #ruby
Guest46313 has quit [Remote host closed the connection]
user__ has joined #ruby
seanBEL has joined #ruby
akem has quit [Read error: Connection reset by peer]
<shevy>
hehe
seanBEL has quit [Quit: seanBEL]
looopy has quit [Remote host closed the connection]
seanBEL has joined #ruby
looopy has joined #ruby
h4mz1d has quit [Ping timeout: 260 seconds]
benatwork has joined #ruby
thecreators has joined #ruby
siksia has quit [Ping timeout: 245 seconds]
benatwork has quit [Read error: Operation timed out]
jamescotterill has quit [Read error: Operation timed out]
<Mon_Ouie>
Because you pass the block to be executed as a block argument to instance_exec, so there's no room left to pass an actual block argument to it
Jamone has quit [Ping timeout: 244 seconds]
<msch>
Mon_Ouie: but don't you use &block1 &block2 for that?
mneorr has quit [Remote host closed the connection]
<Mon_Ouie>
No, you can only pass one block argument to a method
<Mon_Ouie>
Yours is a syntax error
diegok has joined #ruby
sepp2k has quit [Ping timeout: 245 seconds]
Croms has quit [Quit: Leaving...]
ZachBeta has quit [Quit: Computer has gone to sleep.]
deadbea7_ has quit [Quit: leaving]
ownthesky has joined #ruby
fantazo has joined #ruby
<ownthesky>
hey, does anyone here work as part of an Agile team?
nfluxx has joined #ruby
zomgbie has joined #ruby
Croms has joined #ruby
mdw has joined #ruby
<yfeldblum>
no, ruby is a highly enterprisy language, and most of its users prefer to have thousand-page spec documents to be delivered to them through three layers of middlemen and management
fayimora has joined #ruby
<yfeldblum>
ruby comes bundled with six different and incompatible process control frameworks for slowing down and stopping forward progress on projects, and ruby enforces that every single ruby project use at least two of them
zomgbie has quit [Ping timeout: 252 seconds]
yoklov has quit [Quit: computer sleeping]
mneorr has joined #ruby
<yfeldblum>
we typically banish ruby users who like agile to the sunshine lands of java
ownthesky has left #ruby [#ruby]
ParadoxQuine has joined #ruby
jetblack has joined #ruby
jgrevich has joined #ruby
looopy has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
nfluxx_ has joined #ruby
moshee has quit [Ping timeout: 256 seconds]
arturaz has quit [Remote host closed the connection]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
nfluxx has quit [Ping timeout: 244 seconds]
nfluxx_ is now known as nfluxx
vonsar has quit [Quit: Leaving]
jonathanwallace has quit [Remote host closed the connection]
looopy has quit [Remote host closed the connection]
mdw has quit [Remote host closed the connection]
dotnull has joined #ruby
budakbaiklah has joined #ruby
fserb has joined #ruby
naz has joined #ruby
budakbaiklah has quit []
<dotnull>
if anyone has done much with ruboto, it requires me to download ruboto-core on the device before the application will run. is there a way to package everything in the apk so the device doesn't have to download ruboto-core?
benatwork has joined #ruby
xaxisx has left #ruby [#ruby]
yoklov has joined #ruby
dbgster has quit [Quit: dbgster]
<deryl>
dotnull: that would probably have to be answered by the ruboto crew themselves. you'd probably have to download their sources and repackage yourself and then push via your sdcard to your device. but then you wouldn't be able to use Play to manage updates.
naz has quit [Quit: switching servers]
naz has joined #ruby
kenperkins has joined #ruby
Poapfel has quit [Quit: Need a new quit message? Why not Zoidberg?"]
benatwork has quit [Ping timeout: 245 seconds]
fserb has quit [Quit: ttyl]
Criztian has joined #ruby
Poapfel has joined #ruby
<dotnull>
@deryl ok
<dotnull>
thanks!
<deryl>
np
zomgbie has joined #ruby
<dotnull>
just not really a fan of having to install something else on the device in order to run something that I would think should be standalone
<deryl>
it is standalone, once you install the ruboto-core which is the core requirement for rubuto based applications. thats why they split out core to its own. then your app can depend on the core requirement and not the other available apps
nlc has joined #ruby
mdw has joined #ruby
villainous has quit [Quit: villainous]
zinjacoder has joined #ruby
nicoulaj has joined #ruby
atmosx has quit [Ping timeout: 250 seconds]
naz has quit [Ping timeout: 256 seconds]
mneorr has quit [Remote host closed the connection]
atmosx has joined #ruby
shadoi has joined #ruby
MasterIdler has quit [Ping timeout: 240 seconds]
<Tasser>
where do I find levensthein and lcs?
ipoval has joined #ruby
dbgster has joined #ruby
mdw has quit [Remote host closed the connection]
jetblack has quit [Quit: leaving]
mengu has joined #ruby
fantazo has quit [Ping timeout: 244 seconds]
mneorr has joined #ruby
trend has quit [Quit: trend]
ZachBeta has joined #ruby
Ammar01 has joined #ruby
test34 has joined #ruby
pk1001100011 has quit [Quit: Bredząc trzy po trzy oznajmiłeś, że Ty; Dasz im Władcę Snów; Nie pojęli Twych słów; Więc zginęły miliony – ich słowa brzmiały dziwnie; Ten sam Bóg nosił inne imię (…)]
Ammar_iD has quit [Ping timeout: 244 seconds]
pk1001100011 has joined #ruby
bosphorus has quit [Remote host closed the connection]
rdesfo has left #ruby [#ruby]
burgestrand has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
seanBEL has quit [Quit: seanBEL]
mikepack has quit [Remote host closed the connection]
Fezzler has joined #ruby
mikepack has joined #ruby
looopy has joined #ruby
ZachBeta has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
fantazo has joined #ruby
Croms has quit [Quit: Leaving...]
fserb has joined #ruby
williamcotton has quit [Quit: williamcotton]
seanstickle has joined #ruby
ZachBeta has joined #ruby
Poapfel has quit [Quit: Need a new quit message? Why not Zoidberg?"]
Chryson has joined #ruby
mikepack has quit [Ping timeout: 244 seconds]
trvr has joined #ruby
fr0gprince_mac has left #ruby ["Be back later"]
ringotwo has joined #ruby
maletor has joined #ruby
rgrinberg has joined #ruby
Guest48881 has quit [Remote host closed the connection]
ronniy has quit [Remote host closed the connection]
rmascarenhas has joined #ruby
qwerxy has joined #ruby
Fezzler has quit [Quit: Leaving]
Poapfel has joined #ruby
trend has joined #ruby
RubyPanther has joined #ruby
ringotwo has quit [Remote host closed the connection]
ringotwo has joined #ruby
fayimora has quit [Read error: Connection reset by peer]
fayimora has joined #ruby
alup has quit [Ping timeout: 245 seconds]
atmosx has quit [Quit: leaving]
moshee has quit [Ping timeout: 248 seconds]
mwmnj has joined #ruby
dankest has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
parallel21 has joined #ruby
td123 has quit [Read error: Connection reset by peer]
fserb has quit [Quit: ttyl]
qwerxy has quit [Quit: Computer has gone to sleep.]
<Taos>
Wrapping the function in another function, the @something syntax is the same as saying old_func = decorator(old_func)
<Taos>
the decorator function returns a callable object (in this case wrapped)
<baniseterfiend`>
Taos: ok, we'd just use alias_method
Norrin_ has joined #ruby
<Taos>
baniseterfiend`: can You give an example? :3
<baniseterfiend`>
Taos: sure, one sec
<burgestrand>
It’s common to rename the original method, write your own with the same name as the original, and then call the new original in your own replacement
<Taos>
baniseterfiend`: aye thats very "class" orientated, im thinking of lose functions
<baniseterfiend`>
Taos: loose functions dont exist in ruby, sorry
<baniseterfiend`>
Taos: it's a *pure* OOP language
<Taos>
baniseterfiend`: huh?
<baniseterfiend`>
Taos: basically if you're not thinking in classes, you're doing it wrong :)
<baniseterfiend`>
Taos: Ruby doesn't have loose functions homie, everything is an instance method defined on a class
<burgestrand>
Taos: all methods in ruby have a receiver, even those you define outside a class or a module
Eldariof59-ru has quit []
<Taos>
baniseterfiend`: what about top level functions
<Taos>
:s
<baniseterfiend`>
Taos: what you've been defining are top-level methods, they're actually private instance methods on the Object class
<baniseterfiend`>
Taos: they're not actually functions, they just look that way
minijupe has quit [Quit: minijupe]
<Taos>
ah I see
<baniseterfiend`>
Taos: using top-level functions the way you have is OK for testing things out in a REPL (irb), but generally discouraged in serious programs
<shevy>
NameError: undefined method `multipy' for class `Object'
<shevy>
baniseterfiend` can not type :P
naz has quit [Ping timeout: 245 seconds]
<burgestrand>
Huh, there’s a UnboundMethod#force_bind gem
<burgestrand>
What could possibly go wrong
punkrawkR has joined #ruby
<Mon_Ouie>
Probably every method that was written in C and cares about its receiver
nobitanobi has joined #ruby
<baniseterfiend`>
Taos: not really IMO. If you want *functions* the closest we have is lambdas i guess
<nobitanobi>
What is this supposed to do? : addresses = %w[user@foo,com user_at_foo.org example.user@foo.] -- shouldn't it be with () instead of [] ?
looopy has quit [Remote host closed the connection]
<baniseterfiend`>
Taos: multiply = ->(x, y) { 2 * x * y }
<Taos>
hmmm
StoSun has quit []
<Mon_Ouie>
nobitanobi: %w[…] and %w(…) are exactly the same thing
diegok has quit [Remote host closed the connection]
<baniseterfiend`>
Taos: multiple.(2, 3) #=> 8
<baniseterfiend`>
Taos: multiply.(2, 3) i mean (typo)
<Mon_Ouie>
You can choose pretty much any delimiter for %-style literals
<Taos>
This is a tad trippy
<burgestrand>
%w:x: — valid ruby
<burgestrand>
%:): also valid ruby!
<baniseterfiend`>
Taos: i think it's a result of the pure smalltalk based OOP model
<rking>
Taos: It's only syntax. Don't let it throw you.
<Taos>
Eh well im really only learning ruby incase someone offers me a job in it
looopy has joined #ruby
<baniseterfiend`>
Taos: pretty much everything is either an object or a method on an object i.e objects and messages (sent between objects)
<Taos>
No offence? But its a pretty wierd langauge
<Taos>
^^
<Mon_Ouie>
inject(:-) is fun too
<burgestrand>
and cheerful
<Veejay>
:)
baroquebobcat has joined #ruby
<baniseterfiend`>
Taos: it's interesting :) it has more exotic roots than some other mainstream languages, ruby is heavily inspired by smalltalk and lisp
looopy has quit [Remote host closed the connection]
<baniseterfiend`>
Taos: other languages will probably look boring to you after you've done ruby for a while :)
<nobitanobi>
Mon_Ouie: thanks
<seanstickle>
APL will not look boring though.
<seanstickle>
Nor Prolog. Or ML.
<baniseterfiend`>
i was more thinking of java, python, C, when i said that :)
apok has joined #ruby
siksia has quit [Ping timeout: 244 seconds]
<Taos>
baniseterfiend`: python does pretty much anything I ask it to without weird necromancy
trend has quit [Quit: trend]
<seanstickle>
baniseterfiend`: ah, ok
kvirani has joined #ruby
<baniseterfiend`>
Taos: all langauges should do anythign you ask them to do, assuming you program them correctly :) that's kind of irrelevant
<Taos>
baniseterfiend`: okay rephrase, It does it in a way that I like and makes me happy inside
<baniseterfiend`>
Taos: That's cool. But i only said it would look boring after you've *done ruby for a while* :)
<baniseterfiend`>
it may not, you may find yourself preferring the python way, but for many people the ruby way is more entertaining
<Taos>
baniseterfiend`: give me a good example? Im not closed minded :3
<shevy>
the biggest difference between ruby and python is the different philosophy
<baniseterfiend`>
Taos: this is cute: 1.upto(10) { |v| puts v }
<seanstickle>
What's the philosophy?
<baniseterfiend`>
Taos: or to loop 10 times: 10.times { puts "odelay!" }
<shevy>
in ruby everything is a truly beautiful object
<Taos>
blocks / procs *shrug*
<Taos>
baniseterfiend`: the second example was nothing short of a fancy for loop
maletor has quit [Ping timeout: 244 seconds]
berserkr has quit [Quit: Leaving.]
benatwork has joined #ruby
<Taos>
baniseterfiend`: for example using blocks to do file operations is simply another format of using a with statement in python ^_^
<burgestrand>
Taos: rspec
<baniseterfiend`>
Taos: blocks are more general
<Taos>
baniseterfiend`: granted
maletor has joined #ruby
<burgestrand>
… or Sinatra :)
<baniseterfiend`>
Taos: the 'with' statement in python is just a special case of ruby blocks for only one use caes
<shevy>
Taos, you can pass a block to any method in ruby though
<Taos>
baniseterfiend`: with works with any form of context manager?
<shevy>
foo('one argument')
<Taos>
shevy: thats kinda cool
<shevy>
foo('one argument') { 'hello this is a block "argument"' }
<baniseterfiend`>
Taos: the example i gave before: 10.times { }, is also another application of blocks. Whether you think it's nothing short of a fancy for loop'. In fact there's nothing fancy about it all. It falls out naturally from ruby
celm has joined #ruby
<baniseterfiend`>
Taos: in python you'd probably have to add special syntax again for that, like you did with 'with'
<shevy>
I think you can also call blocks inside methods inside blocks inside methods inside ...
siksia has joined #ruby
mneorr has quit [Remote host closed the connection]
Vert has quit [Read error: Connection reset by peer]
<baniseterfiend`>
Taos: blocks work with absolutely anything, even threads use blocks: Thread.new { puts "hi i'm in another thread" }
td123 has quit [Quit: WeeChat 0.3.8]
benatwork has quit [Ping timeout: 245 seconds]
<Taos>
Idk if its just python but I have grown up believing threads are evil
<baniseterfiend`>
Taos: even works with 'fork': fork { puts "hi im in another unix fork" }
<baniseterfiend`>
Taos: irrelevant, i'm not encouraging you to use threads, im just showing you how general purpose blocks are
<Taos>
hmm
<shevy>
threads are quite simple, if one keeps them simple
<shevy>
seanstickle, yeah but how do you do parallel stuff then
<seanstickle>
shevy: erlang
<seanstickle>
:D
<shevy>
hmm
<Taos>
seanstickle: +10
<shevy>
!!!
<Taos>
shevy: parallel stuff is a lie
<Taos>
Aparantly even ruby has a Global interpreter Lock
<baniseterfiend`>
Taos: another example would be the decorator code i showed u before, you can build a feature into ruby that has to implemented as syntax in python
<offby1>
use multiple processes.
<seanstickle>
Or just fork it and let the OS deal with the parallelism
<baniseterfiend`>
Taos: we could even add almost analogous syntax to the python syntax if we wantd to
<seanstickle>
offby1: ++
dorei has joined #ruby
Vert has joined #ruby
snearch has quit [Quit: Verlassend]
<dorei>
hello
<dorei>
i have a hash, how can i quickly delete keys (and their values) from it?
<Taos>
Does ruby even have multiple process support?
<baniseterfiend`>
Taos: the advantage in ruby is the flexibility of the language, u can eve build new control structures that look/behave like built-in control structures
<Taos>
baniseterfiend`: oh yea ruby is the king of the dsl market