<bnagy>
riceandbeans: 'static' regex in blocks get magically cached by the interpreter, but if you're using #{interpolation} I think it has to create it every time
Popple has quit [Quit: Computer has gone to sleep.]
<bnagy>
... which is pretty cool ( the regex caching )
mmitchell has quit [Ping timeout: 260 seconds]
ravster has quit [Quit: Leaving.]
<bnagy>
MrZYX: o_0
<volty>
could you help a poor man? should I post a piece of code that makes me crazy? :)
randomnick_ has quit [Quit: Leaving]
antix_ has quit [Ping timeout: 256 seconds]
<MrZYX>
nobody's going to prevent you ;)
Jdubs has quit [Remote host closed the connection]
<volty>
i'm asking if you are going to give it a look
<MrZYX>
you'll never find out that way
dkamioka has joined #ruby
Jdubs has joined #ruby
<bnagy>
MrZYX: what iiiif... symbols were stored in some static hashtable or something?
* bnagy
way to lazy to actually read source today ;)
<MrZYX>
bnagy: I get that for all kind of objects
antix_ has joined #ruby
<bnagy>
oh, so just weirdness with :TOTAL ?
<MrZYX>
I guess so
<MrZYX>
>> a = ObjectSpace.count_objects[:T_OBJECT]; Object.new; ObjectSpace.count_objects[:T_OBJECT]-a
gja has quit [Quit: This computer has gone to sleep]
zz_karupa64 has joined #ruby
IceDragon has quit [Quit: Space~~~]
Mars` has quit [Remote host closed the connection]
jiyinyiyong has joined #ruby
KobraK has joined #ruby
KobraKao has quit [Read error: Connection reset by peer]
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
Mars` has joined #ruby
jiyinyiyong has quit [Max SendQ exceeded]
Jdubs has joined #ruby
ukd1 has joined #ruby
Ox6abe has joined #ruby
Mars` has quit [Ping timeout: 248 seconds]
antix_ has quit [Ping timeout: 264 seconds]
antix_ has joined #ruby
freerobby has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
tjbiddle has quit [Ping timeout: 245 seconds]
hadees has joined #ruby
Ox6abe has quit [Remote host closed the connection]
tbrock_ has quit [Quit: Computer has gone to sleep.]
Ox6abe has joined #ruby
notjohn has quit [Quit: notjohn]
antix_ has quit [Ping timeout: 240 seconds]
Ox6abe has quit [Ping timeout: 264 seconds]
io_syl has quit []
Hanmac1 has joined #ruby
antix_ has joined #ruby
bubblehead has quit []
ukd1 has quit [Ping timeout: 260 seconds]
gja has joined #ruby
kreeves has quit [Ping timeout: 240 seconds]
Hanmac has quit [Ping timeout: 240 seconds]
mmitchell has joined #ruby
freezey has joined #ruby
upd_ has joined #ruby
upd has quit [Disconnected by services]
upd has joined #ruby
kmurph has joined #ruby
antix_ has quit [Ping timeout: 248 seconds]
antix_ has joined #ruby
mmitchell has quit [Ping timeout: 246 seconds]
kemist has joined #ruby
hadees has quit [Quit: hadees]
alvaro_o has quit [Quit: Ex-Chat]
gja has quit [Quit: This computer has gone to sleep]
upd_ has quit [Ping timeout: 252 seconds]
Inside has quit [Ping timeout: 240 seconds]
tonni has quit [Ping timeout: 245 seconds]
ehc has joined #ruby
tonni has joined #ruby
kemist has quit [Ping timeout: 248 seconds]
antix_ has quit [Ping timeout: 251 seconds]
upd has quit [Ping timeout: 248 seconds]
antix_ has joined #ruby
SilverKey has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
mdst3 has quit [Read error: Connection reset by peer]
mdst3 has joined #ruby
voidPirate has quit [Remote host closed the connection]
cads has joined #ruby
T_T has quit [Remote host closed the connection]
lfox has quit [Quit: ZZZzzz…]
Soda has joined #ruby
linuxman44 has joined #ruby
<linuxman44>
RUBY IS CRAP
* Nilium
strangles linuxman44 to death
<Nilium>
You have been found defective, accept your fate.
antix_ has quit [Ping timeout: 264 seconds]
<r0bgl33s0n>
linuxman44: why don't you just be straight about it, /nickname troll, and introduce yourself with "i have vented up and unexplained issues that make me go into IRC channels and look for arguments"
<r0bgl33s0n>
you won't be engaged here
<r0bgl33s0n>
so you might want to try /part
<Nilium>
I'm not sure he's serious.
<linuxman44>
LOL
antix_ has joined #ruby
<Nilium>
If he were, it doesn't really make sense that he'd just say 'ruby is crap' in all caps
<Nilium>
It's kind of an obviously ineffective troll.
<r0bgl33s0n>
sorry if you're not serious, but you have the profile of someone like that so far
<r0bgl33s0n>
they're not uncommon in here
S0da has joined #ruby
notjohn has joined #ruby
tylersmith has quit [Read error: Connection reset by peer]
<linuxman44>
FUCK
threesome has quit [Ping timeout: 248 seconds]
<r0bgl33s0n>
ok
Soda has quit [Ping timeout: 248 seconds]
mayorga has quit [Remote host closed the connection]
<linuxman44>
fedora is shit as well
mikepack has quit [Remote host closed the connection]
<r0bgl33s0n>
agreed
antix_ has quit [Ping timeout: 240 seconds]
dmiller has joined #ruby
tabolario has joined #ruby
<r0bgl33s0n>
Nilium: your troll detector needs work
<Nilium>
I'm just bad at detecting bad trolls.
zeade has quit [Quit: Leaving.]
KobraK has quit [Read error: Connection reset by peer]
tylersmith has joined #ruby
chihhsin has quit [Quit: leaving]
antix has joined #ruby
antix has joined #ruby
ukd1 has joined #ruby
antix is now known as Guest82193
KobraKao has joined #ruby
alekst has quit [Quit: Leaving...]
snovak has joined #ruby
chihhsin has joined #ruby
quoin has joined #ruby
Ox6abe has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
Guest82193 has quit [Ping timeout: 260 seconds]
cj3kim has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
iliketurtles has joined #ruby
elux has joined #ruby
clov3r has joined #ruby
linuxman44 has quit [Ping timeout: 250 seconds]
quoin has quit [Ping timeout: 264 seconds]
iliketurtles has quit [Read error: Connection reset by peer]
nari has joined #ruby
iliketurtles has joined #ruby
bluOxigen has joined #ruby
cj3kim has quit [Ping timeout: 256 seconds]
ehc has quit [Quit: ehc]
antix_ has quit [Ping timeout: 260 seconds]
ukd1 has quit [Ping timeout: 260 seconds]
antix_ has joined #ruby
clov3r has quit [Remote host closed the connection]
bluOxigen has quit [Remote host closed the connection]
bluOxigen has joined #ruby
nari has quit [Ping timeout: 252 seconds]
Inside has joined #ruby
Inside has joined #ruby
Inside has quit [Changing host]
bluOxigen has quit [Remote host closed the connection]
bluOxigen has joined #ruby
antix_ has quit [Ping timeout: 246 seconds]
Spami has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
Lewix has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
bluOxigen has quit [Remote host closed the connection]
thesheff17_ has joined #ruby
bluOxigen has joined #ruby
thesheff17 has quit [Disconnected by services]
noop has joined #ruby
thesheff17_ is now known as thesheff17
Apocalypse has joined #ruby
mmitchell has joined #ruby
Ox6abe has quit [Remote host closed the connection]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
antix_ has quit [Ping timeout: 246 seconds]
zxq9 has quit [Remote host closed the connection]
elux has quit [Quit: Bye!]
alexju has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
vpretzel has joined #ruby
zxq9 has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
Targen has quit [Ping timeout: 245 seconds]
Mars` has joined #ruby
coaster has quit [Ping timeout: 248 seconds]
saarinen has quit [Quit: saarinen]
maletor has joined #ruby
Lewix has joined #ruby
zz_karupa64 is now known as karupa64
Lewix has quit [Changing host]
Lewix has joined #ruby
antix_ has quit [Ping timeout: 248 seconds]
karupa64 is now known as karupanerura
antix_ has joined #ruby
Targen has joined #ruby
jonahR has joined #ruby
iliketurtles has joined #ruby
freezey has quit [Remote host closed the connection]
jefflyne1 has joined #ruby
Mars` has quit [Ping timeout: 260 seconds]
robbyoconnor has joined #ruby
jefflyne has quit [Ping timeout: 240 seconds]
iliketurtles has quit [Read error: Connection reset by peer]
<LLckfan>
I have a Gateway laptop and when I opened the lid the power light was on but the laptop was aleep. then after i ushed the power it started flashing with the light bulb light and the battery light but only when it was plugged in. Is this a sign I need a new end tip for my power supply?
<popl>
LLckfan: battery
quoin has quit [Ping timeout: 246 seconds]
<LLckfan>
It is not the battery
<popl>
Well maybe you should ask in #laptophardwareadvice instead of #ruby
iliketurtles has quit [Quit: zzzzz…..]
<popl>
I've got no idea. :)
kemist has joined #ruby
<sam113101>
take a look inside the manual
<sam113101>
it tells you what it means when the leds are flashing
nanoxd_ has quit [Ping timeout: 252 seconds]
user258467 has joined #ruby
lucazi has joined #ruby
<sam113101>
you should be able to find it online
<LLckfan>
There is no channel with that name
<popl>
if you're lucky you can hear a capacitor pop in yoru adapter in which case you'd know what it was
<LLckfan>
I have looked n the manual
<LLckfan>
Nothing
<popl>
what about ##gateway?
<sam113101>
is your laptop still working correctly, though?
i_s has quit [Ping timeout: 246 seconds]
antix_ has quit [Ping timeout: 260 seconds]
antix_ has joined #ruby
kemist has quit [Ping timeout: 248 seconds]
fgo has joined #ruby
senayar has joined #ruby
skaflem2 has quit [Quit: Leaving]
<LLckfan>
sam113101 yes
<LLckfan>
No channel with that name
<popl>
LLckfan: I am joking, man. Fix your sarcasm detector. :P
<popl>
LLckfan: what model is your laptop?
skaflem has joined #ruby
<sam113101>
LLckfan: what if you unplug all of the devices connected to it?
<sam113101>
I once had a sd card blocking POST, lol
<LLckfan>
NV57h50u
<popl>
sam113101: how?
<sam113101>
and the leds were acting crazy too
<LLckfan>
sam113101 no device
<sam113101>
popl: I have no idea
<Hanmac>
LLckfan: i have a similar laptop, the power light pulsing when the laptop is asleep is a sign that its asleep and not shutdown
<popl>
is that seriously it?
mmitchell has joined #ruby
<sam113101>
rofl
tatsuya_o has quit [Remote host closed the connection]
snovak has quit [Ping timeout: 246 seconds]
<popl>
mine does the same thing Hanmac
<popl>
I presumed LLckfan was familiar with this behavior and talking about something else.
<sam113101>
you guys put your computer asleep?
amacgregor_ has joined #ruby
<sam113101>
I only use hybernate
antix_ has quit [Ping timeout: 248 seconds]
<w33dWizard[420]>
i literally cannot sleep without the soft, comforting whir of my fans
<LLckfan>
I closed the lid
<sam113101>
s/y/i/
<Hanmac>
sam113101: i dont know, on my its maybe a mix between them
amacgregor has quit [Ping timeout: 246 seconds]
jbpros has joined #ruby
<popl>
LLckfan: Did you recently purchase the laptop?
antix_ has joined #ruby
nanoxd has joined #ruby
adeponte has joined #ruby
<popl>
I have to sleep because my swap drive is slightly smaller than my RAM. Eventually I will fix that but I have not decided if I want to leave my swap decrypted for that purpose or not.
<popl>
*to make my laptop sleep
mmitchell has quit [Ping timeout: 240 seconds]
<LLckfan>
no
<sam113101>
why not use a swap file instead?
Kar- has joined #ruby
julian-delphiki has joined #ruby
antix_ has quit [Ping timeout: 245 seconds]
Coffers has joined #ruby
ghr has quit [Quit: Computer has gone to sleep.]
avril14th has quit [Remote host closed the connection]
antix_ has joined #ruby
ghr has joined #ruby
DanBoy has quit [Remote host closed the connection]
ghr has quit [Read error: Connection reset by peer]
DanBoy has joined #ruby
persand has joined #ruby
fixl has joined #ruby
bean has quit [Ping timeout: 240 seconds]
ewnd9 has quit [Ping timeout: 264 seconds]
anderson has joined #ruby
<popl>
sam113101: I didn't want to reserve the space on / initially since I had the swap partition already set up. I had considered it, though.
maletor has quit [Quit: Computer has gone to sleep.]
tvw has quit []
<krz>
when i do foo = @@foo, and change a the value of foo. it also changes the value of @@foo. is this the intend behaviour?
senayar has quit [Remote host closed the connection]
<krz>
intended
senayar has joined #ruby
antix_ has quit [Ping timeout: 248 seconds]
Mars` has quit [Remote host closed the connection]
antix_ has joined #ruby
Elhu has joined #ruby
lunarjar has quit [Ping timeout: 245 seconds]
ZadYree has quit [Ping timeout: 240 seconds]
ehaliewicz has quit [Ping timeout: 256 seconds]
lunarjar has joined #ruby
schaerli has joined #ruby
ZadYree has joined #ruby
senayar has quit [Ping timeout: 264 seconds]
pushpak has joined #ruby
obs has quit [Quit: Konversation terminated!]
schaerli has quit [Remote host closed the connection]
ayaz has quit [Ping timeout: 260 seconds]
freerobby has joined #ruby
antix_ has quit [Ping timeout: 240 seconds]
<krz>
ok dup works
elaptics`away is now known as elaptics
obs has joined #ruby
antix_ has joined #ruby
lucazi is now known as lucazi_away
haxrbyte has quit [Remote host closed the connection]
ghr has joined #ruby
haxrbyte has joined #ruby
troessner has joined #ruby
freerobby has quit [Ping timeout: 260 seconds]
kazuuu has quit [Read error: Connection reset by peer]
schaerli has joined #ruby
dhamidi has quit [Ping timeout: 252 seconds]
kazuuu has joined #ruby
kazuuu_ has joined #ruby
kazuuu has quit [Read error: Connection reset by peer]
antix_ has quit [Ping timeout: 245 seconds]
adeponte has quit [Remote host closed the connection]
relix has joined #ruby
adeponte has joined #ruby
DanKnox is now known as DanKnox_away
antix_ has joined #ruby
noop has quit [Ping timeout: 264 seconds]
saimaz has joined #ruby
Criztian has joined #ruby
noop has joined #ruby
ayaz has joined #ruby
claymore has quit [Quit: Leaving]
adeponte has quit [Ping timeout: 248 seconds]
BRMatt has joined #ruby
zeel has joined #ruby
antix_ has quit [Ping timeout: 256 seconds]
obs_ has joined #ruby
senayar has joined #ruby
obs has quit [Ping timeout: 240 seconds]
antix_ has joined #ruby
Zai00 has joined #ruby
Macaveli has joined #ruby
SilverKey has quit [Quit: Zzzzzz.]
Macaveli_ has quit [Read error: No route to host]
lucazi_away has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dagobah has joined #ruby
dhamidi has joined #ruby
obs_ is now known as obs
noname001 has joined #ruby
antix_ has quit [Ping timeout: 260 seconds]
einarj has joined #ruby
antix has joined #ruby
xk_id has joined #ruby
workmad3 has joined #ruby
antix is now known as Guest81466
ayaz has quit [Ping timeout: 252 seconds]
yacks has joined #ruby
quoin has joined #ruby
shaunbaker has joined #ruby
snovak has joined #ruby
bricker`1A has joined #ruby
xk_id has quit [Quit:
Guest81466 has quit [Ping timeout: 240 seconds]
Kar- has quit [Ping timeout: 264 seconds]
bricker`LA has quit [Ping timeout: 252 seconds]
chee has left #ruby ["WeeChat 0.4.1"]
antix_ has joined #ruby
quoin has quit [Ping timeout: 246 seconds]
Macaveli_ has joined #ruby
Macaveli has quit [Ping timeout: 245 seconds]
zarubin has joined #ruby
kevinykchan has joined #ruby
snovak has quit [Ping timeout: 240 seconds]
Domon has quit [Remote host closed the connection]
Domon has joined #ruby
jefflyne has quit [Ping timeout: 245 seconds]
antix_ has quit [Ping timeout: 252 seconds]
Kar- has joined #ruby
antix_ has joined #ruby
sacoetzee has joined #ruby
mikecmpbll has joined #ruby
<sacoetzee>
Hi guys! Could one of you be so kind as to disconnect from the matrix long enough to download your Ruby knowledge into my brain?
mmitchell has joined #ruby
Domon has quit [Ping timeout: 246 seconds]
shay- has joined #ruby
<r0bgl33s0n>
lol
<shay->
hi, i am very new to ruby and need a quick answer for that: i have class A class B def function1 end end class A::B::name; how can I access function on there?
<r0bgl33s0n>
whats up sacoetzee
whunt has quit [Quit: Computer has gone to sleep.]
<sacoetzee>
not much and you?
<r0bgl33s0n>
nm
popl has left #ruby [#ruby]
nari has joined #ruby
<r0bgl33s0n>
shay-: you should define 'name' as a class method A::B.
<sacoetzee>
sorry i had no real question, but i am complete noob in ruby, struggling with a project on Github, so I thought I'd come lurk and see how the pros get things done :D
<r0bgl33s0n>
function1 is an instance method
<shevy>
sacoetzee we can download only 1 byte per second
Mars` has joined #ruby
<r0bgl33s0n>
you'd need to create an instance of A::B to call it
whunt has joined #ruby
antix_ has quit [Ping timeout: 252 seconds]
<r0bgl33s0n>
A::B::name should work, that's a method from Module now(i believe)
<sacoetzee>
@shevy: wow this might take a while. what ISP do you use?
<shevy>
sacoetzee old brain 0.2 version, I am trying to get an upgrade but they tell me that old hardware sucks in general :(
mmitchell has quit [Ping timeout: 240 seconds]
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
<sacoetzee>
be wary about the new upgrades. They promise to make you waterproof, but i think that was a hoax
Domon has joined #ruby
bricker`1A has quit [Ping timeout: 252 seconds]
Advocation has joined #ruby
atno has quit [Read error: Connection reset by peer]
nouitfvf has quit [Ping timeout: 240 seconds]
lucazi has joined #ruby
ReBoRN_ has joined #ruby
anotherwise has joined #ruby
InFlames has quit [Quit: Leaving]
ganeshran has joined #ruby
<ganeshran>
is there any detailed guide on how to install Rails with Apache on Windows? I googled but most of the guides involve passenger on linux
saimaz has quit [Remote host closed the connection]
fgo has quit [Remote host closed the connection]
adambeynon has joined #ruby
saimaz has joined #ruby
antix_ has quit [Ping timeout: 248 seconds]
adambeynon has quit [Read error: No route to host]
atno has joined #ruby
antix_ has joined #ruby
whunt has quit [Quit: Computer has gone to sleep.]
antix_ has quit [Changing host]
antix_ has joined #ruby
klaut has joined #ruby
postmodern has quit [Quit: Leaving]
saimaz has quit [Ping timeout: 252 seconds]
<shay->
r0bgl33s0n: ok thanks i will give it a try
<coderhs>
ganeshran: ditch windows, would be the best choice. Not sure of the advantage you hope to get for using windows
nari has quit [Ping timeout: 240 seconds]
antix_ has quit [Ping timeout: 256 seconds]
sergicles has joined #ruby
<ganeshran>
coderhs: I would gladly ditch windows :( but my company doesnt have any spare servers at the moment
tvw has joined #ruby
<shay->
r0bgl33s0n: so A::B.new.function1 should do it?
<ganeshran>
coderhs: the only one is a windows box
ReBoRN_ has quit [Quit: Lost terminal]
lkba has quit [Ping timeout: 256 seconds]
adambeynon has joined #ruby
antix_ has joined #ruby
quoin has joined #ruby
gyre007 has joined #ruby
<r0bgl33s0n>
shay-: yup
obs has quit [Read error: Operation timed out]
gyre007 has quit [Remote host closed the connection]
obs has joined #ruby
freerobby has joined #ruby
<shay->
r0bgl33s0n: doesn ot work :/ maybe i don't get the whole picture because i am using opscode chef here. I think the A::B::name function2 is called in an instance of A::B with "name.function2" and my function2 wants to call A::B.function1, but does not know it.
Xeago has joined #ruby
lucazi is now known as lucazi_away
siwica has joined #ruby
havv has joined #ruby
gnnr has quit [Ping timeout: 252 seconds]
Xeago has quit [Remote host closed the connection]
Mars` has quit [Remote host closed the connection]
antix_ has quit [Ping timeout: 240 seconds]
freerobby has quit [Ping timeout: 240 seconds]
antix_ has joined #ruby
marcgg_ has joined #ruby
gja has joined #ruby
tatsuya_o has joined #ruby
marcgg has quit [Ping timeout: 260 seconds]
shredding has joined #ruby
antix_ has quit [Ping timeout: 240 seconds]
gyre007 has joined #ruby
<Macaveli_>
what is the best way to remove "spaces/white spaces" from a string? I've read strip/trim/gsub ...
antix_ has joined #ruby
zarubin has quit [Ping timeout: 245 seconds]
akemrir has joined #ruby
<mikecmpbll>
Macaveli_: then you know the answer, presumably?
sacoetzee has quit [Ping timeout: 264 seconds]
<Macaveli_>
mikecmpbll probaly trim
<Macaveli_>
is the best
<workmad3>
Macaveli_: kinda depends on where in the string the whitespace is
sacoetzee has joined #ruby
ewnd9 has joined #ruby
havv has quit [Quit: Page closed]
<mikecmpbll>
where's the trim method? o.o
adeponte has joined #ruby
axsuul has quit [Ping timeout: 264 seconds]
ElderFain has joined #ruby
<Macaveli_>
The trim method returns the string stripped of whitespace from both ends. trim does not affect the value of the string itself.
gyre008 has joined #ruby
gyre007 has quit [Ping timeout: 260 seconds]
<Macaveli_>
does not seem to work tho it is in the documentation
<Macaveli_>
undefined method `trim' for "testuser72@gmail.com":String
<workmad3>
Macaveli_: I think that's 'strip'
lucazi_away has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Macaveli_>
aah workmad3 mikecmpbll i was looking at javascript code lol
gyre008 has quit [Remote host closed the connection]
<workmad3>
Macaveli_: :)
<Macaveli_>
just started using Dash my bad
Lewix has joined #ruby
<mikecmpbll>
:~
schaerli has quit [Remote host closed the connection]
schaerli has joined #ruby
antix_ has quit [Ping timeout: 246 seconds]
adeponte has quit [Ping timeout: 264 seconds]
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
saimaz has joined #ruby
anotherwise has quit [Quit: anotherwise]
Al____ has joined #ruby
schaerli has quit [Ping timeout: 240 seconds]
ics has quit [Ping timeout: 260 seconds]
Boohbah has quit [Ping timeout: 240 seconds]
Lewix has quit [Remote host closed the connection]
antix_ has quit [Ping timeout: 248 seconds]
saimaz has quit [Read error: Operation timed out]
xk_id has joined #ruby
antix has joined #ruby
end_guy has quit [Remote host closed the connection]
obs_ has joined #ruby
antix is now known as Guest90651
obs has quit [Remote host closed the connection]
sarkie_ is now known as Sarkie
snovak has joined #ruby
LLckfan has quit []
<sacoetzee>
any of you fine people ever written a chef plugin?
Boohbah has joined #ruby
postmodern has joined #ruby
Guest90651 has quit [Ping timeout: 240 seconds]
cads has quit [Read error: Operation timed out]
antix_ has joined #ruby
einarj has quit [Remote host closed the connection]
kiri has quit [Ping timeout: 240 seconds]
khushildep has joined #ruby
einarj has joined #ruby
cj3kim has joined #ruby
antix_ has quit [Ping timeout: 260 seconds]
mmitchell has joined #ruby
snovak has quit [Ping timeout: 264 seconds]
antix_ has joined #ruby
gyzmodo has quit []
catphish has joined #ruby
cj3kim has quit [Remote host closed the connection]
S0da has quit [Read error: Operation timed out]
<catphish>
i'm using rack with unicorn, and it seems to render all exceptions (Rack::ShowExceptions), i can't work out how to turn it off
<catphish>
oh, RACK_ENV
scottstamp is now known as zz_scottstamp
khushildep has quit [Ping timeout: 240 seconds]
mmitchell has quit [Ping timeout: 240 seconds]
mneorr has joined #ruby
renanoronfle has quit [Quit: This computer has gone to sleep]
cutmail has joined #ruby
antix_ has quit [Ping timeout: 240 seconds]
ayaz has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
Kar- has quit [Ping timeout: 264 seconds]
vishal_ has joined #ruby
khushildep has joined #ruby
Macaveli_ has quit [Read error: Connection reset by peer]
bricker`LA has joined #ruby
jbpros has quit [Quit: jbpros]
lucazi has joined #ruby
nari has joined #ruby
saimaz has joined #ruby
devoldmx3 has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
antix_ has quit [Ping timeout: 245 seconds]
zeel has left #ruby [#ruby]
dhamidi has quit [Ping timeout: 260 seconds]
vishal has quit [Ping timeout: 240 seconds]
aagdbl1 has joined #ruby
DrForr has quit [Ping timeout: 240 seconds]
himsin has quit [Quit: himsin]
chrishough has quit [Quit: chrishough]
antix_ has joined #ruby
gallon|w has quit [Ping timeout: 240 seconds]
DrForr has joined #ruby
gallon|w has joined #ruby
MrZYX|off is now known as MrZYX
devoldmx3 has quit [Ping timeout: 260 seconds]
aagdbl has quit [Ping timeout: 260 seconds]
nomenkun has joined #ruby
cj3kim has joined #ruby
cj3kim has quit [Remote host closed the connection]
antix_ has quit [Ping timeout: 252 seconds]
decoponio has joined #ruby
helloworld has quit [Ping timeout: 245 seconds]
QKO has quit [Ping timeout: 240 seconds]
jbpros has joined #ruby
QKO has joined #ruby
mengu has quit [Remote host closed the connection]
lucazi has quit []
mengu has joined #ruby
<shevy>
anyone using ruby with excel?
freerobby has joined #ruby
antix_ has joined #ruby
kitak has quit [Read error: Connection reset by peer]
sepp2k has joined #ruby
kitak has joined #ruby
saimaz has quit [Remote host closed the connection]
vishal has joined #ruby
saimaz has joined #ruby
nemesit|znc has quit [Ping timeout: 240 seconds]
blastDAbLast has joined #ruby
mayday_jay has quit [Ping timeout: 240 seconds]
mengu has quit [Ping timeout: 252 seconds]
Stygia has joined #ruby
freerobby has quit [Ping timeout: 260 seconds]
saimaz has quit [Read error: No route to host]
end_guy has joined #ruby
saimaz_ has joined #ruby
vishal_ has quit [Ping timeout: 252 seconds]
mayday_jay has joined #ruby
kevinykchan has quit [Quit: Computer has gone to sleep.]
Rollabunna has joined #ruby
antix_ has quit [Ping timeout: 240 seconds]
roadt_ has quit [Ping timeout: 252 seconds]
antix_ has joined #ruby
roadt_ has joined #ruby
jibi has joined #ruby
intuxicated has quit [Ping timeout: 240 seconds]
intuxicated has joined #ruby
schaerli has joined #ruby
kevinykchan has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
Mars` has joined #ruby
antix_ has quit [Ping timeout: 240 seconds]
nfk has joined #ruby
naturehack has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
Kar- has joined #ruby
smlgs has joined #ruby
<shevy>
hmmm I suppose there is no way to keep a float in a specific precision? like only 3 numbers after the digit, other than just displaying in this format?
gilesw_ has quit [Ping timeout: 240 seconds]
Mars` has quit [Ping timeout: 260 seconds]
lkba has joined #ruby
<Hanmac>
shevy hm no use Decimal or Rational
naturehack has quit [Ping timeout: 240 seconds]
<catphish>
decimal is a much better choice if you're interested in decimal precision
<catphish>
alternatively, you can always round(3) as needed
antix_ has quit [Ping timeout: 240 seconds]
antix has joined #ruby
antix is now known as Guest83917
Kar- has quit [Remote host closed the connection]
cutmail has quit [Remote host closed the connection]
sevenseacat has quit [Quit: Leaving.]
cutmail has joined #ruby
renanoronfle has joined #ruby
khoury has joined #ruby
<khoury>
lul
khoury has left #ruby [#ruby]
varfoo has quit [Quit: WeeChat 0.4.0]
snovak has joined #ruby
forced_request has quit [Ping timeout: 248 seconds]
varfoo has joined #ruby
atno has quit [Remote host closed the connection]
Guest83917 has quit [Ping timeout: 252 seconds]
BizarreCake has joined #ruby
blastDAbLast has quit [Ping timeout: 240 seconds]
blastDAbLast has joined #ruby
cutmail has quit [Ping timeout: 264 seconds]
varfoo has quit [Client Quit]
varfoo has joined #ruby
<jokke>
hello!
Macaveli has joined #ruby
<jokke>
anyone here familiar with drb? (distributed ruby)
antix_ has joined #ruby
<jokke>
i've been playing around with it a while now and i'm still having some issues i need help with
<jokke>
is there some secret parameter i need to set for disabling a timeout or something else that i'm missing?
antix_ has quit [Ping timeout: 240 seconds]
<jokke>
also would you consider shellwords safe?
<jokke>
as in really safe?
allsystemsarego has joined #ruby
<jokke>
it would kinda suck if someone could just send a message that would inject some malicious code to be executed...
mmitchell has joined #ruby
Guest27882 has joined #ruby
antix_ has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
<jokke>
somehow it seems drb is still quite unknown/unused...
TMM has joined #ruby
<TMM>
hi all! I'm using rspec with simplecov and simplecov claims that certain lines aren't being tested which seems entirely impossible given my tests
yfeldblum has joined #ruby
<TMM>
rspec executes a particular method, which it absolutely has to to get a result from the test, and some printf debugging shows that the code is being called
<TMM>
yet simplecov claims only the declaration of the method is executed
<shevy>
question
<shevy>
10 ** 3 # => 1000 but how do I make 10 ** -3 ?
quoin has quit [Remote host closed the connection]
cutmail has joined #ruby
quoin has joined #ruby
Domon has quit [Ping timeout: 240 seconds]
kitak has quit [Remote host closed the connection]
ce_afk is now known as cescalante
cutmail has quit [Remote host closed the connection]
girija_ has joined #ruby
kitak has joined #ruby
drumsrgr8forn8 has joined #ruby
dhamidi has joined #ruby
saimaz_ has quit [Remote host closed the connection]
kiri has joined #ruby
saimaz has joined #ruby
Guest21458 has quit [Ping timeout: 256 seconds]
sectionme has quit [Ping timeout: 260 seconds]
quoin has quit [Ping timeout: 246 seconds]
Macaveli has quit [Read error: Connection reset by peer]
renanoronfle has quit [Quit: This computer has gone to sleep]
antix_ has joined #ruby
saimaz has quit [Read error: No route to host]
saimaz_ has joined #ruby
Kar- has joined #ruby
seynb has quit [Quit: Leaving]
AlSquire has joined #ruby
fgo has joined #ruby
quoin has joined #ruby
BSaboia has joined #ruby
raphaelivan has joined #ruby
antix_ has quit [Ping timeout: 260 seconds]
Kar- has quit [Ping timeout: 240 seconds]
antix_ has joined #ruby
vikhyat has joined #ruby
johnmilton has quit [Remote host closed the connection]
Macaveli has joined #ruby
freerobby has joined #ruby
gyzmodo has joined #ruby
vikhyat has quit [Remote host closed the connection]
antix_ has quit [Ping timeout: 240 seconds]
kevinykchan has quit [Quit: Computer has gone to sleep.]
<krz>
is there a method that runs in batches?
<krz>
or how can i run times in batches?
renanoronfle has joined #ruby
<krz>
1000.times_in_batches would be great
freerobby has quit [Ping timeout: 252 seconds]
<krz>
1000.times_in_batches(100) => run 1000 times in batches of 100
jbpros has quit [Quit: jbpros]
Kar- has joined #ruby
antix_ has joined #ruby
cj3kim has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
raphaelivan1 has joined #ruby
raphaelivan has quit [Read error: Connection reset by peer]
Lewix has quit [Remote host closed the connection]
BSaboia has quit [Ping timeout: 260 seconds]
cj3kim has quit [Ping timeout: 240 seconds]
<apeiros>
1000.times.each_slice(100)
antix_ has quit [Ping timeout: 240 seconds]
ewnd9 has quit [Ping timeout: 245 seconds]
antix_ has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
rahim has joined #ruby
Es0teric has joined #ruby
<udoprog>
Is it possible to use gem without a home directory? I'm trying the following; 'sudo env HOME=/nonexistent gem install bundler', however there is a part in spec_fetcher.rb where the users home directory is stat:ed
mfojtik has joined #ruby
soba has quit [Ping timeout: 256 seconds]
<mfojtik>
hi guys, do you know about some ruby gem that do http downloads and allows to set a rate limit?
shredding has quit [Quit: shredding]
<mfojtik>
like curl --limit-rate ;-)
antix_ has quit [Ping timeout: 240 seconds]
xcv has joined #ruby
mikecmpbll has joined #ruby
himsin has joined #ruby
himsin has quit [Client Quit]
rdark has quit [Quit: leaving]
fgo has quit [Remote host closed the connection]
antix_ has joined #ruby
Liothen has quit [Quit: System of a down……]
<coderhs>
which is the better usage $stdout.flush or $>.flush
kyle__ has quit [Ping timeout: 256 seconds]
rdark has joined #ruby
kyle__ has joined #ruby
tonini_ has quit [Ping timeout: 264 seconds]
ldnunes has joined #ruby
antix_ has quit [Ping timeout: 260 seconds]
varfoo has quit [Quit: WeeChat 0.4.0]
claymore has joined #ruby
khushildep has quit [Quit: khushildep]
antix_ has joined #ruby
byprdct has joined #ruby
BSaboia has joined #ruby
gr33n7007h has joined #ruby
Xeago has joined #ruby
jprovazn has quit [Quit: Leaving]
helloworld has joined #ruby
antix_ has quit [Ping timeout: 248 seconds]
jefflyne has quit [Ping timeout: 240 seconds]
antix_ has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
sectionme has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
mmitchell has joined #ruby
butblack has joined #ruby
Popple has quit [Quit: Computer has gone to sleep.]
Matip has quit [Ping timeout: 246 seconds]
BSaboia has quit [Ping timeout: 248 seconds]
mmitchell has quit [Ping timeout: 252 seconds]
saimaz_ has quit [Remote host closed the connection]
Advocation has quit [Quit: Advocation]
saimaz has joined #ruby
antix_ has quit [Ping timeout: 240 seconds]
antix has joined #ruby
headius has joined #ruby
antix is now known as Guest14337
angusiguess has joined #ruby
jwicked has joined #ruby
mlpinit has joined #ruby
<weeb1e>
coderhs: Use common sense :)
ewnd9 has joined #ruby
saimaz has quit [Ping timeout: 246 seconds]
<canton7>
which is clearer?
<weeb1e>
shevy: So I eventually scrapped FFI and working with the WinAPI and built a frontend in AutoItScript separately which spawns my packaged ruby application and uses an IPC for two way communication
<Hanmac>
there is also STDOUT.flush but its a little bit different
<shevy>
weeb1e that sounds insanely complicated!
Lewix has joined #ruby
<shevy>
no wait
<weeb1e>
shevy: Way less complicated than the WinAPI.
<shevy>
yeah
buibex has joined #ruby
<shevy>
at first I read it that you call the WinAPI directly now
WillAmes has quit [Remote host closed the connection]
gja has joined #ruby
WillAmes has joined #ruby
<weeb1e>
Haha, I gave up after realizing it would take me a ridiculous amount of time to implement everything I needed
ganeshran has quit [Ping timeout: 250 seconds]
Guest14337 has quit [Ping timeout: 245 seconds]
butblack has quit [Quit: butblack]
<weeb1e>
Took less than two days to build the entire front end GUI and tray interface + IPC to ruby
<weeb1e>
As well as all the changes required to the origional ruby application, so that it never blocks, threads heavy filesystem stuff and is always running the EventMachine reactor for IPC purpose
VTLob has joined #ruby
antix_ has joined #ruby
sambao21 has joined #ruby
sevenseacat has joined #ruby
ArchBeOS has joined #ruby
Matip has joined #ruby
dennus has joined #ruby
<xybre>
weeb1e: have you profiled your reactor?
nemesit|znc has quit [Ping timeout: 240 seconds]
<xybre>
coderhs: They do the exact same thing, but $stdout is prefered for clarity. On the other hand STDOUT does not serve the same purpose, and I would strongly discourage its use.
<weeb1e>
xybre: Nope, why?
buibex has quit [Remote host closed the connection]
<weeb1e>
I got over 300Mbps download speed on files being written to disk using the CLI version of the app
snovak has joined #ruby
<weeb1e>
Which is more than enough for most peoples internet connections
antix_ has quit [Ping timeout: 248 seconds]
<xybre>
weeb1e: Reactors have the problem of being easily broken, if you end up with a blocking operation anywhere in the loop for any reason, your entire application just stops.
DrCode has quit [Ping timeout: 240 seconds]
<weeb1e>
xybre: I have been building async applications for over 6 years now, I almost never work synchronously ;)
jprovazn has joined #ruby
<weeb1e>
That may be an issue for people who are inexperienced, but that is no issue if you know how to work asynchronously
<xybre>
weeb1e: Right, but what about your libraries and IO operations?
<xybre>
Eh, six years is a long time. I just don't know how long you've been using Ruby.
antix_ has joined #ruby
<weeb1e>
The applications I build are generally IO-heavy, the libraries I use depend on the performance I need to acheive. If I don't need it to scale extremely well I am happy to use a synchronous mongodb library for instance
<xybre>
Since you mentioned "threads" I was unsure if you were using them in MRI, in which case makes it suspect.
<weeb1e>
Most of what my applications do are related to UDP and TCP protocols, so if there is no EM library for the protocol I need, I implement it myself
<weeb1e>
I'll clarify by saying, I avoid threads at all costs, but sometimes they are necessary, such as with this application
<xybre>
Right but blocking operations break reactors. There's no way to hand off an operation if it blocks.
<xybre>
And MRI doesn't do concurrent threads.
<weeb1e>
This application has to create MD5 hashes of up to 30 000 files from the filesystem, a total of 25+ GB, in which case I use EM.defer
freerobby has joined #ruby
mmitchell has joined #ruby
<weeb1e>
I then forward status updates from that thread back to the reactor and to my IPC
krz has quit [Quit: krz]
krz has joined #ruby
<xybre>
Is using EM and "threads" legitimately faster/simpler than just writing a loop?
snovak has quit [Ping timeout: 252 seconds]
mark_locklear has joined #ruby
lucazi has joined #ruby
<weeb1e>
I'm honestly not 100% sure on the MRI thread status these days, as far as I know 1.9.3 is a lot better than 1.8's green threads. As I mentioned I avoid threading at all costs and almost never have a reason to defer
<weeb1e>
In cases like this for heavy filesystem operations, deferring does not appear to hurt my reactor
<weeb1e>
Though in such cases, my reactor would not be serving a huge amount of clients, so if it were slower that is not the end of the world
buibex has joined #ruby
<weeb1e>
I haven't noticed it stop ticking, as the frontend is updated correctly
lucazi has quit [Client Quit]
<xybre>
I'm just saying that you might have been able to get away with not adding all that complexity at all, unless you benchmarked it and *not* using EM and "threads" was less efficient.
antix_ has quit [Ping timeout: 240 seconds]
krz has quit [Client Quit]
<xybre>
MRI up to 2.0 still has the GIL, which means only 1 thread is ever executing at once.
<weeb1e>
I have used EM for all my applications for years, I prefer not to use threads even if I "could get away with it"
nisstyre has quit [Quit: Leaving]
schaerli has quit [Remote host closed the connection]
buibex has quit [Client Quit]
lyanchih has joined #ruby
<weeb1e>
As I mentioned, I build IO-heavy applications, threading for IO is nothing but unneccessary overhead
antix_ has joined #ruby
freerobby has quit [Ping timeout: 252 seconds]
<weeb1e>
I am anal about verbosity and overhead, and so I will stick with single threaded applications whenever possible
Elhu has joined #ruby
saimaz has joined #ruby
mayday_jay has quit [Quit: c ya!]
sailias has joined #ruby
<weeb1e>
I also work with game servers a lot, which are also generally single threaded, reactor based
<weeb1e>
xybre: And to answer your earlier question, I'm not quite sure how long I've been using ruby now, but it is many years already
<xybre>
Threading for IO is the only reason to do threading in MRI, since thats the only time threads actually do *anything*. Otherwise, threads are executed in the order they're join'd to the main thread.
<weeb1e>
I could maybe find a timestamp from one of my earliest projects
shredding has joined #ruby
<weeb1e>
I have been using EventMachine right from the beginning, just as I used twisted in python before learning ruby
<jokke>
how can i modify the class of an existing object at runtime? as in add methods and such.
<xybre>
Oh you used twisted. Nevermind then.
<xybre>
jokke: Just reopen it like you were writing it anew.
<weeb1e>
xybre: What is that supposed to mean exactly?
<jokke>
xybre: no i can't do that
<weeb1e>
I will note I used twisted very little before I stopped using python completely
<xybre>
jokke: Oh you want to change which class an object belongs to?
<jokke>
um i guess so
<jokke>
this thing has a name too
<jokke>
i can't remember
<weeb1e>
I've been using ruby for 4 - 5 years now
<xybre>
jokke: you can change an existing class like: class ExistingClass; def new_method; puts "new method in existing class"; end; end
Guest85712 has joined #ruby
<jokke>
xybre: i don't want to do that
<xybre>
jokke: but you cannot change *which* class an object is a member of.
<xybre>
If variable.class == Array, then it will always be.
<jokke>
i just want to change the class of a *specific* object
schaerli has joined #ruby
antix_ has quit [Ping timeout: 240 seconds]
<jokke>
not all objects of that class
jwicked has quit [Ping timeout: 248 seconds]
<jokke>
xybre: that's not what i want either
<xybre>
jokke: Yeah I got it, that doesn't happen. What are you really trying to do?
ryandeussing has joined #ruby
Talyn has joined #ruby
<Talyn>
Hello?
<Guest85712>
hi every budy
<Talyn>
I'm a pretty severe newbie when it comes to Ruby, I'm trying to get a dicebot to work. If someone could PM me, so I don't flood the channel, would be appeciated
antix_ has joined #ruby
<xybre>
weeb1e: it means anyone I've run into that used to use twisted never seem to be able to use any other pattern ever again. Every problem looks like a nail.
<Guest85712>
ok im ready
<xybre>
Talyn: Use gist.github.com to paste more than 1 line of code.
<weeb1e>
xybre: Interesting notion
mklappstuhl has joined #ruby
<jokke>
something like class A; def foo; p 'foo'; end; end; a = A.new; special_a = A.new; special_a.class.change_method_foo_somehow; a.foo => 'foo'; special_a.foo => 'bar'
<Talyn>
Well, to be honest, I've got no idea how to monkey with the code, I'm just trying to figure out what's wrong with the bot and get it working.
IceyEC has joined #ruby
<weeb1e>
The first async reactor based application I worked on was in C++ without any "real" framework, the PvPGN game server
obs_ has quit [Quit: Konversation terminated!]
<weeb1e>
But apart from overhead, syncing threads is not run even by itself
<xybre>
Talyn: IS there a support channel, forum, or mail list for the bot?
jkamenik has joined #ruby
<weeb1e>
Even when forced to defer to another thread, I still use the EM reactor for synchronization purposes, and it works great
<Talyn>
Not that I've managed to find...
<weeb1e>
*is not fun even by itself
<xybre>
jokke: You can't change an object's class at run time. What are you *really* trying to do?
<jokke>
yes you can
gilesw_ has joined #ruby
<weeb1e>
I think jokke wants to mixin another module into his class
<xybre>
jokke: Not without extending the Ruby interpreter you can't.
nemesit|znc has joined #ruby
priyam__ is now known as yeban
<jokke>
nope
quoin has quit [Remote host closed the connection]
antix_ has quit [Ping timeout: 260 seconds]
Kar- has quit [Ping timeout: 240 seconds]
raphaelivan1 has quit [Quit: Leaving.]
<weeb1e>
jokke: You need to explain better what your exact use case is, there are likely a few ways you can go about solving your problem
<jokke>
HAH!
ryandeussing has quit [Remote host closed the connection]
<jokke>
i did it
<artmann_>
I'm goin g to create a gem to handle an api, can someone link me some good tutorials?
<jokke>
okay i explain
<weeb1e>
Your example?
<xybre>
weeb1e: I just really get this suspicion that its all overhead. EM has a very finite set of use cases and threading in ruby even moreso. Yet I know people who use EM for everything.
mark_locklear has quit [Read error: Operation timed out]
kennym has quit [Ping timeout: 248 seconds]
<xybre>
artmann_: Good tutorials for... making a gem?
<artmann_>
Making an api wrapper
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
<artmann_>
or link me to a good basic one on github
krawchyk has joined #ruby
<weeb1e>
xybre: I am one of those people, but as I said, I build IO-heavy applications that generally make and receive many connections all the time. I know of nothing better than EM for my use cases and have never had an issue with it
<xybre>
weeb1e: Right, which is why I said nevermind. It works for you, and so long as I know that, I don't need to discuss the pros and cons of that approach, just accept and move on to other things.
<jokke>
i thought setting $SAFE = 1 would prevent this kind of thing
Macaveli has joined #ruby
obs has joined #ruby
<weeb1e>
xybre: At the same time I will never ignore others opinions, which is why I continued our conversation :)
<shevy>
weeb1e hmm how long have you been using ruby? 20 years already? :D
<xybre>
jokke: Oh, you just wanted to add a method to the singleton class. Yeah you can do that.
<weeb1e>
shevy: Only about 5
<shevy>
ah hmm
<shevy>
but you have been using another language before or? or do I confuse you with someone else...
nemesit|znc has quit [Ping timeout: 256 seconds]
<xybre>
jokke: you can also write a module and do this: special_a.extend(MyModule)
<jokke>
the thing is. I have an object that is served via drb. Any client can connect to it. I thought of implementing some password authentication but anyone with a bit of ruby knowledge could just bypass that by redefining the method
<weeb1e>
I have built countless applications, many pretty massive, I'm actually quite interested in my total ruby LOC now
Kar- has joined #ruby
Lewix has quit [Remote host closed the connection]
<jokke>
is there any way to prevent that
<jokke>
?
kilophoton has joined #ruby
<weeb1e>
shevy: I have used almost every popular language over the years, but these days I stick to ruby whenever possible, though of course ruby does not suite every one of my use cases. I am forced to also use C++, SourcePawn, Lua, Javascript (CoffeeScript) and a couple other domain specific languages
obs has quit [Client Quit]
<shevy>
hmm
Talyn has left #ruby [#ruby]
<shevy>
I can't trust my brain's ability to remember
robbyoconnor has quit [Ping timeout: 246 seconds]
antix_ has quit [Ping timeout: 248 seconds]
<jokke>
hm no wait
<shevy>
the most complicated thread-use I had was not more than @thread = Thread.new {}
<jokke>
i think i got it all wrong
<shevy>
jokke drb made me angry every time I look at its documentation
<jokke>
haha
<jokke>
but it's beautiful
shaunbaker has joined #ruby
kaldrenon has joined #ruby
Guest85712 has quit [Read error: Connection reset by peer]
<weeb1e>
The only time I have ever used threading like that in ruby is with hacked together scripts for local use
antix_ has joined #ruby
<shevy>
the name is odd DRb ... two upcased, one downcased
dennus has quit []
<jokke>
yes i give you that
Criztian has quit [Remote host closed the connection]
<xybre>
weeb1e: I feel like I know the internals of how Ruby uses each of those strategies and I'm very aware of their pitfalls. I'm working on a distributed architecture that requires a large number of socket connections and I might end up using a reactor pattern for that, because it makes sense. Otherwise I'll need to do more IPC (which I might do in the end, depending).
dennus has joined #ruby
shaunbak_ has joined #ruby
<weeb1e>
xybre: Well why wouldn't you use a reactor? One reason may be the lack of a decent DRB implementation for EventMachine
funburn has joined #ruby
<xybre>
jokke: Ruby doesn't have great sandboxing support. However, there might be a way to accept/deny connections to a DRb host.
geekbri has joined #ruby
<weeb1e>
I have had to roll my own EventMachine based IPC systems for my platforms, as there are simply no solid open source implementations
<jokke>
yes but i don't want/i can't make firewall rules based on ip's or so
fmcgeough has joined #ruby
Sarkie has left #ruby ["Leaving"]
<xybre>
weeb1e: There's lots of reasons not to use an reactor. A multiprocess model might be ideal here since each connection could end up doing a lot of work. Or else I could have a tiny reactor and then fork before doing anything intensive. There's a lot of possibilities there. But the real danger of one of my libs breaking the reactor under the covers is concerning. A lot more work will go into fine tuning a
<xybre>
reactor, because I'd want it done right.
flipture has quit [Ping timeout: 252 seconds]
<weeb1e>
If you have hard work to do and think ruby threads are insufficient (which they very well may be), then I would use a reactor which forks and manages the forked processes
shaunbaker has quit [Ping timeout: 245 seconds]
<sweeper>
jruby has real threads \o
<weeb1e>
I built a process_manager application specifically for forking, exec'ing and monitoring arbitary processes, with its own IPC to my platforms
antix_ has quit [Ping timeout: 264 seconds]
blackratdog has joined #ruby
KobraKao has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
Kar- has quit [Ping timeout: 260 seconds]
<weeb1e>
The process_manager runs as root and spawns processes as what ever user it needs to, it also handles correcting the env and things like giving processes realtime privs with chrt and configuring ionice
antix_ has joined #ruby
karupanerura is now known as zz_karupanerura
<weeb1e>
sweeper: Sure does, but I make it my lifes mission to avoid installing either Java or .Net on any of my servers
fjalvarez has joined #ruby
<xybre>
Rubinius has real threads too.
<weeb1e>
xybre: Out of interest sake, what kind of heavy work do you need to get done?
<fjalvarez>
hello, I've some issues trying to execute cucumber using the ruby version 2.0.0
<weeb1e>
Rubinius I would consider a real option, but unfortunately there was too many pieces of my software broken by it when I last looked at using it. Biggest issue is gems which contain MRI native extensions
_bart has joined #ruby
<weeb1e>
*there were too many
<weeb1e>
Excuse me. I have been up for a day and a half now, it's already almost 3pm :|
<xybre>
weeb1e: It's a platform, so the "apps" that run on it could essentially do anything.
gja has quit [Quit: This computer has gone to sleep]
antix_ has quit [Ping timeout: 248 seconds]
<_bart>
Hi Rubyists!
<skaflem>
Hello
<weeb1e>
xybre: Then yeah, I would definitely consider using a reactor for central management and forking child workers
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
asobrasil has left #ruby [#ruby]
<weeb1e>
Or even using threads instead of worker processes if you can get away with using Rubinius
intuxicated has quit [Ping timeout: 248 seconds]
freerobby has joined #ruby
<_bart>
I have a weird not-so-ruby-related question. When I run 'whois some-godaddy-website.com' in the terminal I get different output when I run `whois some-godaddy-website.com` in Ruby, or with 'exec' or %x{}. Any idea how whois would be different when started from Ruby instead of terminal? (how could godaddy detect that)
<shay->
hi, i have a method testsystem? But I'm not really sure what the correct way is to return true or false? Now I have just return true; and return false; But this should be objects if i understood this right
intuxicated has joined #ruby
<workmad3>
_bart: what sort of differences?
dmiller has quit [Remote host closed the connection]
sacoetzee has quit [Quit: Leaving]
<weeb1e>
shay-: Everything is an object, including "true" and "false"
<xybre>
weeb1e: I want the ability to reap resources, so threads - even in jruby/rubinius - have limited usage here.
<shay->
weeb1e: so return false; is corrent and create implicit an object of class FalseClass, right?
<weeb1e>
xybre: In that case worker processes sound like your only real option, but that could make IPC tricky
<shay->
correct*
<xybre>
shay-: "false" is a singleton object that is the only instance of FalseClass.
KobraKao has quit [Read error: Connection reset by peer]
schaerli has quit [Remote host closed the connection]
<_bart>
workmad3: but I think it's weird, because I tried it a few times, and 'exec "whois ...."' results into that captcha link, but running whois for the same domain in my terminal never does.
lkba has quit [Ping timeout: 252 seconds]
schaerli has joined #ruby
<weeb1e>
shay-: What xybre said. And if it is the last line in your codes flow control or method, you don't need the "return" keyword, just "false" is fine
<weeb1e>
shay-: The last line of a method is what is returned
<workmad3>
_bart: weird... how about if you do `which whois` in ruby vs your terminal?
<shay->
weeb1e: thank you very much =)
<_bart>
workmad3: How could using exec or %x{} be different from running it in my terminal? whois doesn't sense and sends a different environment to godaddy I think?
<xybre>
weeb1e: Yeah I know, its not going to be easy. But I *think* I can keep the core pretty simple, just accept connections and fork to handle the live socket. But there's the potential for tunneling between sockets and worker processes, so we're back to needing a way of handling all that.
<_bart>
workmad3: guess it's time to look into the whois script to see if it sends some kind of "User Agent" to Godaddy, or something like that
<_bart>
workmad3: ah nvm, silly me, I was working in two different terminals, one remote and one local. They seem to use the IP, that's clear now
antix is now known as Guest72815
nutella is now known as Guest34983
<_bart>
xybre: thanks for your suggestion though
<workmad3>
_bart: aha :)
schaerli has quit [Ping timeout: 245 seconds]
<xybre>
_bart: ohh yeah that'll do it :)
marcgg has joined #ruby
vpretzel has quit [Read error: Connection reset by peer]
vpretzel has joined #ruby
<weeb1e>
xybre: Well I guess it depends on just how heavy those worker tasks really are, as I mentioned, when defering to another thread to do blocking heavy filesystem operatings, my reactor still ticks and I can use it for communication
siwica has quit [Quit: siwica]
<weeb1e>
xybre: I'm gonna delete my cache file quick and run my app, forcing it to hash 13GB of files in a blocking loop which is inside a EM.defer block
kreeves has joined #ruby
<xybre>
>.<
marcgg_ has quit [Ping timeout: 245 seconds]
<weeb1e>
xybre: What sort of thoughput are you looking for?
tomzx_mac has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
Guest72815 has quit [Ping timeout: 256 seconds]
schaerli has joined #ruby
butblack has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
nbrosnahan has quit [Ping timeout: 245 seconds]
lfox has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
<xybre>
weeb1e: I'll consider it an acomplishment when it can max out the bandwidth of multiple 100MB connections and juggle ~100ish connections. The latency doesn't need to be "real time ish" but it should be low. The prototype will use TCP but then I'll move to UDP once the proof of concept is done.
yfeldblum has quit [Read error: Operation timed out]
dbjeepn has joined #ruby
zoee has quit [Quit: zoee]
<weeb1e>
xybre: Well I meant per worker
snovak has joined #ruby
lfox has quit [Client Quit]
breakingthings has joined #ruby
<weeb1e>
Do you mean ~100 workers?
lyanchih has quit [Quit: lyanchih]
nbrosnahan has joined #ruby
mary5030 has joined #ruby
<xybre>
weeb1e: No, not per worker. Ideally there'd only be a handful of "active" workers doing heavy lifting.
siwica has joined #ruby
larissa has joined #ruby
devoldmx has joined #ruby
antix_ has quit [Ping timeout: 264 seconds]
<weeb1e>
xybre: Well I'd assume the IO bottleneck will be the workers
antix_ has joined #ruby
<weeb1e>
I don't really have stuff set up here to do an accurate benchmark for you right now
danshultz has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
<weeb1e>
And the sleep deprivation is also beginning to set in :/
saimaz has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
thesheff17 has joined #ruby
<xybre>
weeb1e: Yeah I finally got some sleep, I'd been sleeping 1.5 and 3 hour intervals for a couple of days and just got my first real sleep in a while.
saimaz has joined #ruby
dhamidi has quit [Remote host closed the connection]
<xybre>
weeb1e: I'll need to do benchmarks to find out. Profile all the things!
burlyscudd has joined #ruby
lyanchih has joined #ruby
relix has quit [Remote host closed the connection]
snovak has quit [Ping timeout: 240 seconds]
tatsuya_o has joined #ruby
thesheff17 has quit [Read error: Connection reset by peer]
relix has joined #ruby
<weeb1e>
xybre: Let me know how it goes
Coffers has quit [Read error: No route to host]
thesheff17 has joined #ruby
Coffers_ has joined #ruby
dkamioka has joined #ruby
<weeb1e>
As I mentioned, I managed to get over 300Mbps with a EM reactor pulling 60 files concurrently from S3 and writing them to hard drive
dareTake has joined #ruby
funburn has quit [Quit: funburn]
kay has joined #ruby
<weeb1e>
I didn't expect that performance, mostly because I didn't know my server even had access to that throughput, haha
<xybre>
Yeah I only have a 100Mbps line in my house, so that will be the greatest I'll be able to test from here, but I'll be able to spin up a bunch of VPSs for a short time to test larger scales. And hopefully remember to turn them all off before they bankrupt me.
<weeb1e>
You have 100Mbps and you're complaining! Shame on you
<weeb1e>
I only have 8Mbps at home
<Hanmac>
xybre: i dont whant to hear the word "ONLY" from you
<xybre>
weeb1e: haha, not complaining, just difficult to test anything more than that :)
<Hanmac>
i have 2Mbps and there is not more in my area!
Advocation has joined #ruby
<xybre>
Hanmac: Damn, even my wimax card is faster than that.
<weeb1e>
Pretty sure the ISP hosting that box I got 300Mbps assumed it was a DDOS attack and throttled me the next day
saimaz has quit [Ping timeout: 252 seconds]
<weeb1e>
Either way, I'm not quite sure of the limited of a single EM reactor, but that seems fairly good in my books
<derekv2>
if I add a method to this file, rake build, gem install, i can 'require' it in irb and use $" to see the list of methods, and my method is there
<derekv2>
but if I try to call the method in the same way as the others in the first file, it fails saying no variable is defined.
drumsrgr8forn8 has quit [Ping timeout: 240 seconds]
snovak has joined #ruby
byprdct has quit [Ping timeout: 246 seconds]
mikecmpbll has joined #ruby
antix_ has quit [Ping timeout: 240 seconds]
DanBoy has quit [Remote host closed the connection]
<derekv2>
I was finally able to call the method by creating my own class, including the operations module, and then calling it on an instance of that class, but none of the variables that are in the module (are they like static variables?) are not defined in this case
ravster has joined #ruby
IceyEC has joined #ruby
dennus has quit []
nouitfvf has joined #ruby
<xybre>
derekv2: "variables defined in the module" how are the variables defined? Which module?
jlast has joined #ruby
<shevy>
module Calabash module Android
<shevy>
why do you not use a newline in between these two
antix_ has joined #ruby
mklappst_ has joined #ruby
iamjarvo has joined #ruby
Zeeraw has quit [Ping timeout: 246 seconds]
<derekv2>
shevy: this isn't my project, but I'm modifying it
<shevy>
ah I see
Gruu has joined #ruby
zarubin has joined #ruby
<shevy>
very deepled nested... 3 modules
kaspergrubbe has joined #ruby
<shevy>
derekv2 I find it much more common to see variables defined within a class than a module, but which variables do you mean?
cescalante is now known as ce_afk
<derekv2>
xybre: shevy: in the module there appears to be some context, eg "default_device"
fixl has quit [Read error: Connection reset by peer]
schaerli has quit [Remote host closed the connection]
buibex has quit [Read error: Connection reset by peer]
saimaz has quit [Remote host closed the connection]
<weeb1e>
AS/core_ext is something I use in most of my applications, even though I only use a handful of features
buibex has joined #ruby
<xybre>
I didn't know you could pass a argument to flatten. this changes everything!
<weeb1e>
workmad3: That seems less efficient
iamjarvo has quit [Remote host closed the connection]
<weeb1e>
arr.is_a?(Array) ? arr : [arr]
<workmad3>
weeb1e: yup...
<apeiros>
The use of flatten IMO is a 99.999% accurate hint at an earlier failure
<xybre>
I don't like the weight of AS
g0bl1n has quit [Quit: g0bl1n]
iamjarvo has joined #ruby
<weeb1e>
xybre: Even just core_ext?
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
<xybre>
Especially core_ext. Not having core_ext encourages me to build more value objects and I'm generally much happier for it.
joaoh82_ has joined #ruby
<weeb1e>
Keeping in mind I'm not really too familiar with any other parts of AS, I learnt rails when I learnt ruby but have pretty much never used it
<weeb1e>
To be honest, I stopped using many of the reasons I used to have to include AS, I now do it for only a couple methods
<xybre>
weeb1e: Which methods do you use?
joaoh82 has quit [Ping timeout: 264 seconds]
<weeb1e>
I used to use #blank? and stuff, now I don't even use #present? and prefer .size > 0 for efficiency
<weeb1e>
xybre: Good question :P
brennanMKE has quit [Ping timeout: 240 seconds]
Floydzy has joined #ruby
<xybre>
Yeah, blank is useful in Rails because you don't know what you're getting half the time. But outside of Rails its much less useful.
freerobby has joined #ruby
<weeb1e>
String#to_sentence, 5.minutes
ffranz has joined #ruby
<weeb1e>
Mostly the time methods I think
Advocation has quit [Quit: Advocation]
<xybre>
What does String#to_sentence do?
tomzx_mac has quit [Ping timeout: 245 seconds]
yfeldblum has joined #ruby
<weeb1e>
%w[ one two three ].to_sentence => "one, two and three"
<MrZYX>
That's Array#to_sentence then
Guest34983 has quit [Ping timeout: 264 seconds]
<xybre>
Wouldn't that be Array#to_sentence?
KobraKao has quit [Ping timeout: 240 seconds]
<weeb1e>
Err :P
<weeb1e>
As I said, I am seriously tired, and should leave now
<apeiros>
I can help with that :D
rh1n0 has joined #ruby
<weeb1e>
Just because I can do stuff on auto-pilot doesn't mean it's always correct
<xybre>
The thing that bugs me about 5.minutes is that what I *actually* want is a good Units library, not just 5 * 60. It is convinient though given that Ruby doesn't have support for Units.
kvirani has joined #ruby
<weeb1e>
apeiros: Calm down :P
antix_ has quit [Ping timeout: 264 seconds]
<apeiros>
weeb1e: don't get me all excited and then tell me to calm down!
<xybre>
weeb1e: you always say that, but then I'll find you here 6 hours later, still doing stuff :p
<apeiros>
that's not fair!
Advocation has joined #ruby
<weeb1e>
xybre: Integer#kilobytes and stuff is also useful
<xybre>
weeb1e: again with the units!
<weeb1e>
Yeah, I think that is the majority of my AS use cases
<weeb1e>
I use very few other things these days
<weeb1e>
I can't even think of others off the top of my head, but that also could be because I am so used to having those features in all my applications
antix has joined #ruby
pushpak has quit [Ping timeout: 256 seconds]
antix is now known as Guest3810
<shevy>
Integer has kilobytes?
<xybre>
weeb1e: Try not using it once, or removing it just to see how much it affects.
<xybre>
shevy: ActiveSupport
<shevy>
ack
<weeb1e>
Well I don't start new applications all that often
<weeb1e>
I mostly build onto my existing massive platforms
theRoUS has quit [Read error: Operation timed out]
<derekv2>
this is weird, the Operations module is included in a class called Abase, but with a code search I see nowhere that this gets instantiated
fjalvarez has quit [Ping timeout: 240 seconds]
pwh has quit []
KobraKao has joined #ruby
<xybre>
derekv2: is it subclassed?
tkuchiki has quit [Remote host closed the connection]
<weeb1e>
Oh
mfojtik has left #ruby [#ruby]
<weeb1e>
Object#try is AS :O
tkuchiki has joined #ruby
fjalvarez has joined #ruby
gr33n7007h has quit [Ping timeout: 240 seconds]
<weeb1e>
I also use quite a few *alize methods
<apeiros>
weeb1e: 5.minutes should have its own proper class - Duration
<derekv2>
xybre: doesn't seem like it, "abase" doesn't appear anywhere else in the code, except where the file is 'require' d
<weeb1e>
And Enumerable#sum
<xybre>
derekv2: is it instantiated inside the file itself?
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<derekv2>
xybre: not that I can see.
sambao21 has quit [Quit: Computer has gone to sleep.]
<xybre>
derekv2: he might have done some metaprogramming voodoo :(
Guest3810 has quit [Ping timeout: 260 seconds]
<derekv2>
xybre: yea I think so.
mklappstuhl has joined #ruby
jonathanwallace has joined #ruby
<derekv2>
there's a dependancy too called cucumber and the voodoo could be happening there
polaco_zZz is now known as polaco
tkuchiki has quit [Ping timeout: 264 seconds]
sambao21 has joined #ruby
Deele has joined #ruby
<derekv2>
ok I'll post to the google group and continue with my workaround for now
<weeb1e>
Hash#except, Hash#slice, Time#ago, Time#from_now, for String: camelize, classify, humanize, ordinalize, pluralize, titleize, underscore, and occasionally constantize
<weeb1e>
xybre: That covers almost everything I think
<derekv2>
thanks for taking a look.
bean has joined #ruby
mklappst_ has quit [Ping timeout: 264 seconds]
devoldmx3 has quit [Ping timeout: 256 seconds]
<weeb1e>
I actually really thought Object#try was a ruby method, I try not to abuse it, but it does work very well in a bunch of cases, just like the trailing ? operator in CoffeeScript
hogeo has quit [Remote host closed the connection]
hogeo has joined #ruby
lukec has joined #ruby
BizarreCake has quit [Read error: Connection reset by peer]
obs_ has joined #ruby
<jokke>
shevy: can you give me a short security analysis on my code? :)
<Hanmac>
PS: you need to be carefull when you use multible DATA.read ... it seems they are blocking ...
<shevy>
if I can not use #, then I can not use comments, in which case using __END__ is kinda useless for me - it is easier to continue using comments, and just use File.readlines instead
<DaniG2k>
workmad3: hmm i think thats more than I need
<shevy>
nah Hanmac if I really can not use # then I will not use __END__ again
<Hanmac>
shevy just do it a line before
<workmad3>
DaniG2k: are you planning on using vim as your main editor?
<shevy>
but I need to test on 1.8 first
Gruu has quit [Quit: Gruu]
mark_locklear has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ce_afk is now known as cescalante
Apocalypse has joined #ruby
tonini_ has quit [Ping timeout: 264 seconds]
sorbo_ has joined #ruby
joaoh82 has quit [Remote host closed the connection]
Ahti333 has joined #ruby
joaoh82 has joined #ruby
Guest27882 has quit [Remote host closed the connection]
antix_ has quit [Ping timeout: 240 seconds]
<sorbo_>
say I have a Polygon module with some methods. if I include that in Square and Triangle classes, _instances_ of those classes get the Polygon methods. If I extend Polygon in Square and Triangle, the classes _themselves_ get those methods
<sorbo_>
SO
<sorbo_>
what is the difference between defining class methods on Polygon and including that in Square and Triangle
coderhs has quit [Quit: Leaving]
<sorbo_>
vs having instance methods on Polygon and extending Square and Triangle with Polygon?
<sorbo_>
(sorry for the mouthful, can gist up if easier)
<workmad3>
sorbo_: one works, one doesn't ;)
<sorbo_>
haha I noticed that
<sorbo_>
why does defining class methods on the module and including it not work?
wallerdev has joined #ruby
<catphish>
sorbo_: it does, they'd become class methods on the class
<workmad3>
sorbo_: because class methods aren't in the lookup chain for instances
leehambley has quit [Ping timeout: 245 seconds]
antix_ has joined #ruby
<sorbo_>
and you can't get to them via self.class.method_name_here in the instance?
cody-- has quit [Quit: derp]
<catphish>
why does a triangle need class methods anyway, it's just a shape ;)
<sorbo_>
haha we simplified the problem from a much weirder block of code from a Sinatra app
<workmad3>
catphish: class methods on a module don't become class methods of the class you include the module in
alex__c2022 has joined #ruby
<catphish>
workmad3: oh, i thought that worked
* workmad3
wishes there was a better term than 'class methods' for doing 'def self.method_name' inside a module
<sorbo_>
I think the base question is, "how do I package stuff up in a module such that I can dump instance and class methods into including classes"
<catphish>
workmad3: what *does* it do?
kemist has joined #ruby
<workmad3>
catphish: makes it a method you can call on the module directly
<sorbo_>
but those methods
<ravster>
Hey all. I'm using jruby and would like to use all my cores for processing. I've used the "parallel" gem in the past, but would like to know if anyone knows of an easier way to do parallel programming in ruby. Thanks.
<catphish>
makes sense, though odd that it doesn't get included
<sorbo_>
DON'T get mixed into the including classes
<shevy>
burlyscudd yeah, it's strange... that guy may possibly use another language in addition to ruby
<burlyscudd>
shevy: sometimes it's kinda nice — like json gem assumes that JSON(<some hash>) is a call to encode the hash as JSON
<burlyscudd>
shevy: Ruby lets you do all sorts of weird things
<shevy>
Hanmac for some reason you are obsessed with frozen objects
<workmad3>
'def Then(txt)' makes me think he's writing something like a gherkin scenario runner
<burlyscudd>
not quite as "blow your foot off with a shotgun" as some things (Lua, anyone?), but you can still be so "expressive" that you do stupid stuff
<burlyscudd>
it's not prescriptivist
<apeiros_>
burlyscudd: not really "assumes". it's Kernel#JSON
<burlyscudd>
like Python
<apeiros_>
i.e., a method
<shevy>
!!!
<Hanmac>
shevy: i found a crown ... ;P (AdventureTime reference ;P )
<shevy>
Kernel#JSON()
<shevy>
!!!!!
acrussell has joined #ruby
<burlyscudd>
apeiros_: oh is that in Kernel now? cool I thought that was in the gem
<bpgoldsb>
irssi didn't auto join the right channels and my fat fingers missed the / :P
Spami has quit [Quit: This computer has gone to sleep]
antix has joined #ruby
antix has joined #ruby
antix has quit [Changing host]
Bry8Star{T2 has joined #ruby
<bean>
yeah but this is #ruby
<bean>
python is the devils work
arturas_ has quit [Ping timeout: 240 seconds]
antix is now known as Guest45553
valesk has quit [Remote host closed the connection]
bklane has quit [Ping timeout: 264 seconds]
valesk has joined #ruby
Boohbah has joined #ruby
tylersmith has quit [Ping timeout: 245 seconds]
jlebrech has quit [Quit: Konversation terminated!]
einarj has quit [Remote host closed the connection]
<xybre>
Devilry is the pythonistas work.
<shevy>
fat fingers that is all relative
<shevy>
I can't handle smartphones for shit with mine
<shevy>
and laptops neither :(
coaster has joined #ruby
mklappstuhl has joined #ruby
dancardamore has joined #ruby
Lewix has joined #ruby
ssvo has joined #ruby
<valesk>
Quassl is broken on windows wahhhhhhhhhhhhhhhh!
<platzhirsch>
bpgoldsb: what? That totally blows the joke. I love channel wars
juarlex has joined #ruby
iliketurtles has joined #ruby
IceDragon has quit [Quit: Space~~~]
iliketurtles has quit [Client Quit]
<platzhirsch>
but Python makes me wonder, started to code more in Python before I dived into my Ruby project. Do you really learn a lot of learning two similar dynamic languages? Shouldn't another langauge be more far off this cluster, for instance a FPL
pen has joined #ruby
endash has joined #ruby
iliketurtles has joined #ruby
valesk has quit [Read error: Connection reset by peer]
<shevy>
notifier.watch("path/to/foo.txt", :modify) {puts "foo.txt was modified!"}
<havenwood>
shevy: At least RedMonk looking at Github and StackOverflow shows *something*. Tiobe's looking at how many times a lang shows up on a search engine is silly, especially with the large amount of false positives and negatives they seem to get.
<platzhirsch>
havenwood: well, that was a metric.. back in 200x
<MrHacks>
I'm not interested in "retry" just yet. I just want to wrap my head around "redo"
notjohn has quit [Quit: notjohn]
petey has quit [Remote host closed the connection]
<havenwood>
MrHacks: Think of `retry` as starting the loop over from the start, whereas `redo` just takes the iteration it is currently on and redoes just it.
petey has joined #ruby
jlast has joined #ruby
Zerogrifter has joined #ruby
SilverKey has joined #ruby
filipe has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
mansi has joined #ruby
DaZ has quit [Read error: Operation timed out]
troessner has quit [Quit: Leaving]
Nogbit has joined #ruby
antix_ has quit [Ping timeout: 252 seconds]
notjohn has joined #ruby
cj3kim has quit [Remote host closed the connection]
petey has quit [Read error: Connection reset by peer]
<nyuszika7h>
this takes about 1.195 seconds for me
saarinen has joined #ruby
Kneferilis has quit [Read error: Connection reset by peer]
iamjarvo has quit [Ping timeout: 245 seconds]
<Eiam>
nyuszika7h: you want to find all palindromes between 100 and 999 ?
<Eiam>
no, the largest palindrome
<nyuszika7h>
yes, the largest
tonini_ has joined #ruby
<Eiam>
I can think of a few different ways to implement the same thing
<Eiam>
but its still the same thing ;p
lyanchih has joined #ruby
Monie has joined #ruby
iamjarvo_ has quit [Ping timeout: 246 seconds]
<Eiam>
different performance characteristics though
Floydzy has quit [Quit: Floydzy]
clov3r has joined #ruby
Nuck has quit [Ping timeout: 268 seconds]
mrsolo has joined #ruby
c0rn has joined #ruby
Guest95755 has quit [Ping timeout: 256 seconds]
<platzhirsch>
That's nice, about the whole strings vs. symbols: "Conceptually, if it's a name for something in code, it should be a symbol. If it's domain data, it should be a string. If it's both, it's probably better to go with a symbol."
DaZ has joined #ruby
PLejeck has joined #ruby
einarj has joined #ruby
vishal has quit [Remote host closed the connection]
antix_ has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
clov3r has quit [Read error: Connection reset by peer]
tatsuya_o has quit [Remote host closed the connection]
devoldmx3 has joined #ruby
kaldrenon has quit [Remote host closed the connection]
notjohn has quit [Quit: notjohn]
kaldrenon has joined #ruby
catphish has quit [Quit: Leaving]
heidi has joined #ruby
_bart has quit [Remote host closed the connection]
blackratdog has quit [Quit: This computer has gone to sleep]
twoism has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
duggiefresh has joined #ruby
vishal has joined #ruby
devoldmx has quit [Ping timeout: 245 seconds]
notjohn has joined #ruby
einarj has quit [Ping timeout: 256 seconds]
brianpWins has joined #ruby
antix_ has quit [Ping timeout: 246 seconds]
staafl has joined #ruby
whunt has joined #ruby
kaldrenon has quit [Ping timeout: 246 seconds]
staafl has quit [Max SendQ exceeded]
nisstyre has quit [Quit: Leaving]
staafl has joined #ruby
jlast has quit [Remote host closed the connection]
clov3r has joined #ruby
antix_ has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
jlast has joined #ruby
klaut has quit [Remote host closed the connection]
kaldrenon has joined #ruby
petey has quit [Remote host closed the connection]
jonathanwallace has quit [Read error: Operation timed out]
petey has joined #ruby
petey has quit [Read error: Connection reset by peer]
mrsolo has quit [Quit: This computer has gone to sleep]
petey has joined #ruby
sarlalia1 has joined #ruby
sarlalian has quit [Quit: WeeChat 0.4.1]
Spami has joined #ruby
dhruvasagar has joined #ruby
devoldmx3 has quit [Ping timeout: 245 seconds]
sarlalia1 has quit [Client Quit]
carlyle has joined #ruby
sarlalian has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
jlast has quit [Read error: Operation timed out]
Macaveli has quit [Remote host closed the connection]
<Rylee>
Would anyone be willing to take a look over https://gist.github.com/anonymous/6829518 for me? I'm puzzled as to why it errors out. Preferably someone familiar with rb-inotify.
interactionjaxsn has joined #ruby
<workmad3>
Rylee: how does it error out?
antix_ has quit [Ping timeout: 260 seconds]
ejfinneran has quit [Quit: ejfinneran]
Monie has joined #ruby
jefflyne1 has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 252 seconds]
interactionjaxsn has quit [Ping timeout: 245 seconds]
<Rylee>
err, i just got it - replaced all instances of "path" and "name" with "absolute_name"
<Rylee>
sorry for the dumbness :p
Davey has quit [Quit: Computer has gone to sleep.]
pwh has quit []
<workmad3>
Rylee: :)
<workmad3>
Rylee: did you mean for your 'data' file to only ever contain the lastest event btw?
jefflyne has quit [Ping timeout: 260 seconds]
<Rylee>
workmad3, no, that's what i'm going to be working on now
<workmad3>
Rylee: File.open("data", "w") << change 'w' to 'a'
larissa has quit [Ping timeout: 245 seconds]
radic_ has quit [Ping timeout: 240 seconds]
<Rylee>
the use case is watching a number of designated files and graphing the size changes over time - the files will be log files generated by a cron job and the main thing we're looking out for is if the file size of one of them drops to zero since that means that a source of data has just been shut down for some reason
carraroj has quit [Read error: Operation timed out]
<workmad3>
Rylee: maybe you want to be using the ruby Logger class then?
<Rylee>
hmm, perhaps
<Rylee>
i didn't think of Logger, but that would work well if it has a way to parse the logs it outputs
sunya7a has joined #ruby
Squarepy has joined #ruby
kevinykchan has quit [Quit: Computer has gone to sleep.]
radic has joined #ruby
pwh has joined #ruby
antix_ has quit [Ping timeout: 264 seconds]
colonolGron has joined #ruby
<workmad3>
Rylee: nah, what you'd want to do is log out with Logger to get a more standard format (including things like timestamps) and then you can use a log watching or log alerting program to handle the other side
<workmad3>
Rylee: something like logwatch for example ;)
<sunya7a>
hi...how can I force CSV objects to raise an error when I reference a non-existent key?
<sunya7a>
I tried using fetch, but it raised a NoMethod error
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
Al____ has quit [Quit: Al____]
Xeago has joined #ruby
jlast has joined #ruby
r0bgl33s0n has quit [Quit: WeeChat 0.4.1]
r0bgleeson has joined #ruby
tonini_ has quit [Ping timeout: 252 seconds]
tvw has joined #ruby
Xeago has quit [Ping timeout: 245 seconds]
<platzhirsch>
What would you call these here? govdata.de, data.gov.uk, publicdata.eu, ... domains?
mansi has quit [Remote host closed the connection]
<platzhirsch>
popl: yeah, definitely no uris :)
mansi has joined #ruby
elaptics is now known as elaptics`away
antix_ has joined #ruby
<Rylee>
hmm, workmad3 (or anyone, really) - thoughts on this? https://gist.github.com/anonymous/6829782 is the current solution but there is ONE problem where it outputs the data twice
<platzhirsch>
maybe I just drop that concept of a separate id and generate it from the actual URI
tjbiddle has joined #ruby
lyanchih has quit [Quit: lyanchih]
shvelo has joined #ruby
sectionme has quit [Ping timeout: 245 seconds]
jonathanwallace has joined #ruby
Macaveli has joined #ruby
jbynum has quit [Quit: Computer has gone to sleep.]
Xeago has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tsykoduk is now known as zz_tsykoduk
interactionjaxsn has joined #ruby
Monie has joined #ruby
mark_locklear has quit [Ping timeout: 246 seconds]
T_T has quit [Remote host closed the connection]
_bart has joined #ruby
Macaveli has quit [Client Quit]
antix_ has quit [Ping timeout: 260 seconds]
freezey has quit [Remote host closed the connection]
petey has quit [Remote host closed the connection]
kilophoton has joined #ruby
petey has joined #ruby
zz_tsykoduk is now known as tsykoduk
arietis has joined #ruby
rezzack has joined #ruby
atno has joined #ruby
raphaelivan has joined #ruby
<havenwood>
Rylee: Do you have the files listed twice in FILES?
<Rylee>
havenwood, no
antix_ has quit [Ping timeout: 252 seconds]
kilophoton has quit [Read error: Operation timed out]
<havenwood>
Rylee: Unrelated minor suggestions: use `warn` in place of `$stderr.puts`, `puts` in place of `p`, and indent the block inside your `begin` block (lines 16-19).
<havenwood>
Rylee: I don't see why it'd be twice then, hrmm?!
<_bart>
$! is magic
sambao21 has quit [Quit: Computer has gone to sleep.]
<havenwood>
Rylee: What does `p event` look like in that loop?
workmad3 has quit [Ping timeout: 248 seconds]
leynos has joined #ruby
lukec has joined #ruby
alex__c2022 has joined #ruby
danman has quit [Quit: danman]
sambao21 has joined #ruby
jbynum has joined #ruby
<Jonah11_>
i am calling a proc which includes a return statement from within method_missing, and am getting a LocalJumpError. I thought a return in proc would return from the containing method (in this case method_missing)... why is not doing that?
leynos has quit [Client Quit]
badquanta has joined #ruby
_bart has quit [Remote host closed the connection]
mklappstuhl has quit [Remote host closed the connection]
jb41 has joined #ruby
Mars` has joined #ruby
colonolGron has quit [Ping timeout: 252 seconds]
Mars` has quit [Read error: Connection reset by peer]
swordsmanz has quit [Ping timeout: 264 seconds]
colonolGron has joined #ruby
gja has quit [Client Quit]
Guest40345 has quit [Ping timeout: 252 seconds]
<waxjar>
IO.popen if i'm not mistaken
Mars` has joined #ruby
schaerli has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
redondos has joined #ruby
_nate is now known as n88
swordsmanz has joined #ruby
<shevy>
I can never remember the syntax to IO.popen
ace_striker has joined #ruby
kindjal has joined #ruby
<^conner>
Does anyone know of an rspec formatter for icinga/nagios plugins? I think I saw one once but google is only turning up cucumber-nagios
<havenwood>
Jonah11_: Did you construct the `proc`? Can you just switch it to a `lambda`?
<redondos>
hi. what is this regex doing exactly? I've never seen backreferences in the match, is this a Ruby-only (Perl?) feature? copy.sub!(/^(.)\1*/, '')
<redondos>
what is the difference between using (.)\1* and .+ ?
kindjal has quit [Client Quit]
cj3kim has quit [Remote host closed the connection]
<redondos>
I'm sure I'm not understanding what \1 does inside of a match.
raphaelivan has quit [Quit: Leaving.]
<havenwood>
Jonah11_: Can you Gist the code that produces the LocalJumpError? I'm assuming there is an explicit `return`?
Mars` has quit [Ping timeout: 264 seconds]
<^conner>
redondos, I assume that it refers to the what was just matched being repeated 0 or more times... why don't you try it http://rubular.com/
<platzhirsch>
popl: I think it's called domain name
<^conner>
redondos, that would be inside the capture group. Maybe (.)+ would be similar. I'm much more knowledgable about perl regex and ruby does have some differences
xk_id has joined #ruby
<Hanmac>
redondos: /.{2}/ matches "ab" but /(.)\1/ does not
<redondos>
oh yes
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
<^conner>
redondos, the website I linked you is very, very handy
iamjarvo has quit [Ping timeout: 252 seconds]
jonathanwallace has quit [Quit: WeeChat 0.4.1]
Macaveli has quit [Read error: Connection reset by peer]
<shevy>
Hanmac how do you happen to find such things and how comes you even have time to do so! :P
xcv has quit [Remote host closed the connection]
<redondos>
particularly, why passing it a string such as soundex("jomnbf") makes it go through "mn" and collapse them, but then continue on to "bf"
Macaveli has joined #ruby
kindjal has joined #ruby
<platzhirsch>
I have not find my inner peace yet with where to put line spaces in my code, sigh
<^conner>
redondos, I suspect that (.)+ and (.)\1* are equivalent
<Hanmac>
shevy: maybe i steal time? ;P nah today we had a "bridge"-day ... that means if a important holiday is on a Thursday, maybe we get free on the Friday too
<Hanmac>
^conner: nah they are not
<^conner>
redondos, with the exception that the later is more greedy
<shevy>
Hanmac nah not steal time but I am reading lectures on youtube and hacking on ruby at the same time :P
<^conner>
Hanmac, oh? I can't seem to get a different result in testing strings
<redondos>
^conner: still, in this algorithm, "aabbcc" turns into "abc"
<redondos>
i don't see where that's happening
abstrusenick has quit [Quit: abstrusenick]
ghr has joined #ruby
antix_ has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
jonathanwallace has quit [Client Quit]
<^conner>
redondos, it's cutting the string down on each pass
<^conner>
redondos, so it cuts of aa and on the first pass but the first match is only a
jonathanwallace has joined #ruby
soulcake has quit [Ping timeout: 260 seconds]
<redondos>
why is it even doing more than one pass, if it's not gsub() but sub()
<volty_>
Mon_Ouie: so?
xk_id has quit [Quit:
snovak has quit [Remote host closed the connection]
soulcake has joined #ruby
snovak has joined #ruby
<Mon_Ouie>
volty_: So they don't math the same thing
kevinykchan has joined #ruby
<redondos>
^conner: oh i understand now
renanoronfle has quit [Quit: Leaving]
<redondos>
^conner: it's tr_s
<redondos>
^conner: i didn't know it removed duplicates
<volty_>
Mon_Ouie: of course. But I can't understand if you are asking or just lecturing.
<^conner>
I'll be, I didn't even know about string#tr_s... sorry, blind helping hte blind here
Davey has joined #ruby
pwh has quit []
<Mon_Ouie>
volty_: ^conner asked about the difference
<volty_>
Mon_Ouie: ops, sorry :)
freezey has quit [Remote host closed the connection]
<redondos>
^conner: thanks for the hints. incredible the all the magic happens in a method that looks so meaningless. ruby code will always be able to surprise me
Mars` has joined #ruby
Ox6abe has quit [Remote host closed the connection]
<Mon_Ouie>
Well, tr_s is not the most descriptive name ever thought of
antix_ has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
<volty_>
not much to try because it's born clever :)
<Hanmac>
Jonah11_: proc does not allow return ... use break or lambda
tsykoduk is now known as zz_tsykoduk
Tearan has joined #ruby
<platzhirsch>
Cleverness can also be absolute obscureness, making it totally unsound and hard to understand what's going on :P
<Hanmac>
Jonah11_: and even this does may not do what you want
<platzhirsch>
still clever though
<Jonah11_>
Hanmac, that's not strictly true. a proc inside a method is supposed to return from the enclosing method, as i understrand it
kdaigle has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<kaldrenon>
If I have a class nested inside a module, can I reference the module from the class? 'super' naturally doesn't do what I'm after.
failshell has quit [Remote host closed the connection]
<^conner>
Hanmac, I'm always confused about when to use next or break :(
jbynum has quit [Quit: Computer has gone to sleep.]
<platzhirsch>
gosh, what is a good name for statistical numbers about an entity? I don't want to use statistics
deens has joined #ruby
<^conner>
Hanmac, it seems like a lot of surprising semantics to avoid using named blocks
<canton7>
next/break is pretty basic. next = skip to the next item in whatever you're iterating over, break = stop iterating
failshell has joined #ruby
<canton7>
continue/break in most c-style languages
<kaldrenon>
platzhirsch: would metrics work in your context? (It's hard to say without more context, I think)
<Jonah11_>
Hanmac, nm I figured it out. It returns from the method in which it is *defined*
<platzhirsch>
kaldrenon: that's pretty cool, but what are the odds? Metrics are the domain of my application, so it would be confused ^^
<^conner>
canton7, how many languages allow next to return a value? as it's the only way to come out of a block param early without an exception
<Jonah11_>
so i can't user a separate method to build it
<kaldrenon>
platzhirsch: Hah, well that would hurt more than help. 'details' is another option
<canton7>
^conner, there is that, whici is handy but not required. and yes, just like 'break' is the only way to come out of a C for loop early
<canton7>
*which
<platzhirsch>
kaldrenon: yeah, been there, too. I hate details now :P maybe statistics is not so bad after all. I can only think of "numbers" or "quantifications"
mm__ has joined #ruby
mmm has quit [Ping timeout: 256 seconds]
antix_ has quit [Ping timeout: 241 seconds]
Kabaka has joined #ruby
KobraKao has quit [Quit: Saindo]
blackmesa has joined #ruby
<^conner>
canton7, but a block isn't always a loop... that's why it's odd to use a loop control keyword to return a value
<Mon_Ouie>
Common Lisp allows to break from a loop, etc. with a value. It doesn't make sense in languages where loops aren't expressions.
<^conner>
canton7, break can't return a value
soulcake has quit [Read error: Connection reset by peer]
antix_ has joined #ruby
<canton7>
^conner, if you're thinking of blocks returning values, you probably actually wanted a lambda
<canton7>
it sounds like you're using them like anonymous methods, which is what lambas are for
andikr has quit [Remote host closed the connection]
<^conner>
canton7, can you pass a lambda in place of block arg to most methods?
soulcake has joined #ruby
<^conner>
or does the method need to know it's getting a lambda?
alvaro_o has joined #ruby
<^conner>
I guess I don't follow as to why an anonymous block/enclosure isn't really a lambda
<w33dWizard[420]>
query = @@db.prepare("SELECT * FROM Admins WHERE username = ?")
<canton7>
^conner, blocks in ruby replace normal code in most other languages - #each + a block replaces a for loop, File.open + block replaces 'using' in C#, etc. In those languages, it's dead handy to be able to return from the method from within those constructs
<w33dWizard[420]>
is this a proper SELECT prepared statement in SQLite3?
xk_id has joined #ruby
cj3kim has joined #ruby
<canton7>
^conner, so blocks have the same semantics - return is scoped to the method. There's also the convenience of being able to omit params
<^conner>
canton7, so why aren't all closures lambdas?
<canton7>
for the reason I just gave?
antix_ has quit [Ping timeout: 245 seconds]
<^conner>
oh, I gotcha, which is back to my original observation that it's a lot of effort just to avoid named blocks
<Mon_Ouie>
For example consider this method: def find; each { |o| return o if yield o } end
randomnick_ has joined #ruby
Targen has joined #ruby
<Mon_Ouie>
You want to be able to return the value from the method and stop the loop when you find a matching element
<canton7>
^conner, from my perspective (I know ruby, not lisp), named blocks are an awfully hacky workaround to just re-scoping return :P can named blocks return from the enclosing method anyway?
<^conner>
canton7, I'm most familar with them from perl. return also applys to the enclosing sub but with you have many nested loops/etc. and use next/continue/break with the LABEL of the block you want to control
cj3kim has quit [Ping timeout: 264 seconds]
decoponio has quit [Quit: Leaving...]
<canton7>
^conner, ruby has throw/catch, but it's rare to see it in the wild. Only in extreme circumstances
<canton7>
anyway, dinner!
<^conner>
I honestly don't understand throw/catch in ruby... :)
<^conner>
canton7, nice chatting with you!
deens has quit [Quit: deens]
deens has joined #ruby
chrishough has quit [Quit: chrishough]
<Mon_Ouie>
throw/catch can be used like those break with label. If you have a block with catch(:foo) { … }, when you call throw(:foo, value) it will jump back to the matching try block and make it return the (optional) value you passed
reset has joined #ruby
<Mon_Ouie>
It's a more dangerous (or, depending on your point of view, powerful) because it's not lexically scoped (e.g. the call to throw could be moved in a completely different method)
antix_ has quit [Ping timeout: 252 seconds]
havenwood has quit [Remote host closed the connection]
nomenkun has quit [Remote host closed the connection]
tonini_ has joined #ruby
dkamioka has quit [Read error: Connection reset by peer]
antix_ has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
dkamioka has joined #ruby
soulcake has quit [Read error: Connection reset by peer]
dkamioka has quit [Read error: Connection reset by peer]
Nss has quit [Ping timeout: 246 seconds]
soulcake has joined #ruby
dkamioka has joined #ruby
headius has quit [Quit: headius]
iamjarvo has joined #ruby
mrsolo has joined #ruby
sepp2k has joined #ruby
deens has quit [Quit: deens]
senayar_ has joined #ruby
deens has joined #ruby
headius has joined #ruby
mercwithamouth has quit [Ping timeout: 240 seconds]
mansi has quit [Read error: Connection reset by peer]
Alex- has joined #ruby
alx- has quit [Read error: Connection reset by peer]
Alex- has quit [Client Quit]
platzhirsch has left #ruby [#ruby]
mansi has joined #ruby
senayar has quit [Read error: Connection reset by peer]
antix_ has quit [Ping timeout: 245 seconds]
mansi has quit [Read error: Connection reset by peer]
mansi_ has joined #ruby
gja has joined #ruby
jbynum has joined #ruby
xcfox has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
brennanMKE has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
antix_ has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
mercwithamouth has joined #ruby
soulcake has quit [Read error: Connection reset by peer]
zz_tsykoduk is now known as tsykoduk
soulcake_ has joined #ruby
krawchyk_ has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
iamjarvo has quit [Ping timeout: 245 seconds]
krawchyk_ has quit [Remote host closed the connection]
c0rn has joined #ruby
krawchyk has quit [Ping timeout: 245 seconds]
jbynum has quit [Quit: Computer has gone to sleep.]
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
antix is now known as Guest74435
ker2x_ has joined #ruby
<ker2x_>
friendly greetings \o/
ewnd9 has quit [Ping timeout: 246 seconds]
<ker2x_>
i'm using bunny to retrieve message from rabbitmq then i do body.to_json and i have this error i don't undertsand in `encode': "\xC3" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError) can someone tell me what's happening please ?
<Morrolan>
But, erm. If you have the choice, use an OS other than Windows. ;)
<Morrolan>
It's not the ideal dev environment for Ruby.
Guest74435 has quit [Ping timeout: 264 seconds]
<pixelshuck>
Morrolan, I'm usually a Linux guy. Heck, I even use Ubuntu backpack.
<pixelshuck>
But currently, am forced to use Windows. Windows 8.
cj3kim has joined #ruby
<Morrolan>
Okay then. :)
blackratdog has joined #ruby
valesk has quit [Ping timeout: 260 seconds]
<pixelshuck>
And thanks for the link
<ker2x_>
actually the message isn't generated by the json gem but by the yajl gem. perhaps i should try to use this gem on the consummer side ?
antix_ has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
Dave has joined #ruby
tsykoduk is now known as zz_tsykoduk
Dave is now known as Guest72314
<ker2x_>
meh
<pixelshuck>
I want to develop a HTTP Client and server. What libraries shall I use?
noop has quit [Ping timeout: 245 seconds]
<pixelshuck>
As in, what are the (better) options available?
chrishough has joined #ruby
<ker2x_>
ho well, i try
<ker2x_>
it's better than waiting :)
<dsferreira>
pixelshuck, Why don't you use Vagrant?
<dsferreira>
pixelshuck, If you're in windows its a nice environment to work with.
<pixelshuck>
Looks nice, I'll take a deeper look now
<dsferreira>
Or just virtual box with a ubuntu vm
cj3kim has quit [Ping timeout: 240 seconds]
<ker2x_>
Parsing documentation for yajl-ruby-1.1.0
<ker2x_>
unable to convert "\xB0" from ASCII-8BIT to UTF-8 for lib/yajl/yajl.so, skipping
<ker2x_>
again ?
<pixelshuck>
Honestly, I was thinking about getting an Crunchbang into vmware
<ker2x_>
is this problem actually related to ruby2.0 ?
<dsferreira>
Crunchbang?
<ker2x_>
even gem is generating this weird error
<pixelshuck>
Debian based distro
<dsferreira>
ok
<dsferreira>
what ever suits you better
kpshek has quit []
<dsferreira>
Vagrant gives you some flexibility though
<pixelshuck>
Thanks for the help tho
<ker2x_>
guys ?
<dsferreira>
Regarding the http client. What are you looking to achieve?
antix_ has quit [Ping timeout: 240 seconds]
<dsferreira>
And works equal right with Vmware
<ker2x_>
-_-'
banisterfiend has quit [Remote host closed the connection]
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
mansi_ has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
jonathanwallace has quit [Ping timeout: 264 seconds]
banisterfiend has joined #ruby
<ker2x_>
ok, seems to be related to ruby 2
Mars` has quit [Remote host closed the connection]
stonevil has joined #ruby
sambao21 has joined #ruby
mansi has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
Mars` has joined #ruby
* Dwarf
np: The Kaiser Chiefs - Ruby
<Dwarf>
:-)
RichardBaker has joined #ruby
nkts has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
<ker2x_>
./mq2rs.rb:39:in `encode': "\xC3" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)
<ker2x_>
nope, same problem with ruby 1.9.3
_Minos_ has quit [Quit: ChatZilla 0.9.90.1 [Firefox 24.0/20130910160258]]
antix_ has quit [Ping timeout: 264 seconds]
<pixelshuck>
dsferreira, task's quite easy to be honest, I have to write basic Client <-> Server application. I've decided for it to be a HTTP Protocol.
Mars` has quit [Ping timeout: 264 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
<pixelshuck>
Connection, GET, HEAD, POST, PUT,
mary5030 has quit [Remote host closed the connection]
Bry8Star{T2 has quit [Remote host closed the connection]
Macaveli has quit [Read error: Connection reset by peer]
<pixelshuck>
For some reason didn't think about it before.
mansi_ has quit [Remote host closed the connection]
mansi has joined #ruby
schaerli has quit [Remote host closed the connection]
antix_ has joined #ruby
<kaldrenon>
I built a gem and then 'bundle install'ed it in the project I want to use it in. After the bundle install the .gem file was gone from the gem's source folder. Is that expected behavior?
schaerli has joined #ruby
asteros has quit [Ping timeout: 256 seconds]
dbjeepn has quit [Quit: Leaving...]
g0bl1n has quit [Quit: g0bl1n]
mansi_ has joined #ruby
Xeago has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
mansi has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 246 seconds]
clov3r has quit [Read error: Connection reset by peer]
tvw has quit []
tvw has joined #ruby
n88 has quit [Changing host]
n88 has joined #ruby
<shevy>
pixelshuck you are on windows?
cescalante is now known as ce_afk
<pixelshuck>
shevy, yeah, have to.
g0bl1n has joined #ruby
ace_striker has quit [Remote host closed the connection]
<shevy>
hey I dont even know how windows looks anymore ;)
<pixelshuck>
hah :)
<shevy>
hmm or is that just firefox?
<pixelshuck>
That's chrome
<shevy>
I dont know those strange tabs on top
<shevy>
ah ok
freezey has joined #ruby
schaerli has quit [Ping timeout: 264 seconds]
antix_ has quit [Ping timeout: 240 seconds]
Xeago has quit [Ping timeout: 256 seconds]
ce_afk is now known as cescalante
kilophoton has quit [Ping timeout: 264 seconds]
sailias has quit [Ping timeout: 264 seconds]
antix_ has joined #ruby
p8952 has joined #ruby
valesk has quit [Ping timeout: 245 seconds]
interactionjaxsn has quit [Remote host closed the connection]
interactionjaxsn has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
dancardamore has quit []
jkamenik has quit [Quit: Leaving.]
dancardamore has joined #ruby
<volty_>
is it possible to know the arity of each (how many args it will pass) , in advance (without using *params -- and count them)?
reset has joined #ruby
p8952 has quit [Client Quit]
nakul has joined #ruby
dbjeepn has joined #ruby
antix_ has quit [Ping timeout: 256 seconds]
soheil has quit [Remote host closed the connection]
flipture has joined #ruby
coderhs has joined #ruby
interactionjaxsn has quit [Ping timeout: 245 seconds]
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
notjohn has quit [Quit: notjohn]
MrZYX is now known as MrZYX|off
cads has joined #ruby
soheil has joined #ruby
<banisterfiend>
volty_ of what? the each method?
<volty_>
yes
<Hanmac>
volty_: hm i dont think that is possible so easy ...
<banisterfiend>
volty_ so, obj.method(:each).arity doesn't do it for u?
mary5030 has quit [Ping timeout: 260 seconds]
<Hanmac>
banisterfiend: he means the arity of the block
<Hanmac>
volty_: because, the method could possible react on the arity of the block itself
<banisterfiend>
Hanmac: then use block.arity :P
peter_ has joined #ruby
<banisterfiend>
i don't understand his Q tbh
peter_ has quit [Remote host closed the connection]
p8952 has joined #ruby
<Hanmac>
banisterfiend: he is not inside the each method, he is outside
adeponte has quit [Remote host closed the connection]
reset has quit [Ping timeout: 245 seconds]
notjohn has joined #ruby
<banisterfiend>
Hanmac well it's not only impossible but it doesn't actually make sense to ask what the arity of the block will be before it's been passed
adeponte has joined #ruby
adeponte has quit [Remote host closed the connection]
<banisterfiend>
Hanmac did u see the most recent A.T ? 'dungeon train'
<banisterfiend>
Hanmac it's very good, the series is back on form :)
<Hanmac>
yeah, for sample i had an module where the each method reacts different, depending on how many parameters you use in the each
adeponte has joined #ruby
stonevil has quit [Ping timeout: 264 seconds]
nari has quit [Ping timeout: 264 seconds]
<volty_>
i'm inside an enumerator and would like to know, in advance, how many params it's going to pass to each
<Hanmac>
banisterfiend: i didnt see it yet, but i have it already loaded
pwh has joined #ruby
<banisterfiend>
Hanmac wanna watch it with me on hangout?
<Hanmac>
volty_: is not possible to know
<Hanmac>
banisterfiend: nope ;P
Lewix has quit [Remote host closed the connection]
kaldrenon has quit [Remote host closed the connection]
<banisterfiend>
Hanmac might as well, i promise to speak only german, and even chisel off my jaw so it appears square
<banisterfiend>
volty_ can you show some code?
arietis has joined #ruby
<banisterfiend>
volty_ cos currently i don't quite understand what u're asking, showing code will clear it up 4 me
kaldrenon has joined #ruby
kdaigle has joined #ruby
mansi_ has quit [Read error: Connection reset by peer]
antix_ has quit [Ping timeout: 246 seconds]
clov3r has joined #ruby
mansi has joined #ruby
Sammael has joined #ruby
simplyaubs has joined #ruby
colonolGron has joined #ruby
Jonah11_ has quit [Quit: Leaving]
RichardBaker has joined #ruby
antix has joined #ruby
antix has quit [Changing host]
antix has joined #ruby
mercwithamouth has quit [Ping timeout: 260 seconds]
Zeeraw has joined #ruby
<ker2x_>
`+': can't convert Float into String (TypeError) <- is it a bad joke ?
antix is now known as Guest47163
Liothen has joined #ruby
Mars` has quit [Read error: Connection reset by peer]
mansi has quit [Remote host closed the connection]
Mars` has joined #ruby
<ker2x_>
what should i do ? add .to_s ?
mansi has joined #ruby
soheil has quit [Remote host closed the connection]
RichardBaker has quit [Read error: Connection reset by peer]
RichardBaker has joined #ruby
<volty_>
-1
PLejeck is now known as Nuck
Nuck has quit [Changing host]
Nuck has joined #ruby
ldnunes has quit [Quit: Leaving]
T_T has quit [Remote host closed the connection]
mansi has quit [Ping timeout: 252 seconds]
Guest47163 has quit [Ping timeout: 264 seconds]
soheil has joined #ruby
danshultz has quit [Remote host closed the connection]
<volty_>
anyway i would like to have the one of each
endash has quit [Quit: endash]
endash has joined #ruby
antix_ has joined #ruby
Matriks has quit [Ping timeout: 240 seconds]
freezey has quit [Remote host closed the connection]
endash has quit [Client Quit]
colonolGron has quit [Quit: Lost terminal]
Matriks has joined #ruby
Squarepy has quit [Quit: Leaving]
pwh has quit []
DaZ has quit [Ping timeout: 264 seconds]
sectionme has joined #ruby
adambeynon has joined #ruby
schaerli has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
sectionme has quit [Read error: Operation timed out]
freezey has joined #ruby
antix_ has quit [Ping timeout: 260 seconds]
freezey has quit [Remote host closed the connection]
kilophoton has joined #ruby
breefield has joined #ruby
<w33dWizard[420]>
is the JSON gem automatically included in default ruby installs?
mansi has joined #ruby
VTLob has quit [Quit: VTLob]
arietis has quit [Quit: Computer has gone to sleep.]
antix_ has joined #ruby
<breefield>
does anyone know a good way to 'require' a specific fork of a gem in irb
cj3kim has joined #ruby
notjohn has quit [Quit: notjohn]
<yxhuvud>
a specific fork? You are not making sense.
nanoxd has quit [Quit: nanoxd]
DaZ has joined #ruby
arietis has joined #ruby
notjohn has joined #ruby
tonini_ has quit [Ping timeout: 240 seconds]
mgorbach has joined #ruby
dbjeepn has quit [Quit: Leaving...]
yfeldblum has joined #ruby
mansi has quit [Read error: Connection reset by peer]
Matriks has quit [Remote host closed the connection]
mansi has joined #ruby
echevemaster has quit [Quit: Leaving]
<banisterfiend>
breefield if you mean a specific version, u can do that with the 'gem' method iirc
<breefield>
but rather than a specific version of a gem from the main gem's repo, I wanna grab a fork of the gem, so specify a certain github repo basically
rhys_ has quit [Quit: Leaving]
chuck_ has quit [Ping timeout: 264 seconds]
<yxhuvud>
then I'd suggest bundler.
schaerli has quit [Ping timeout: 252 seconds]
nanoxd has joined #ruby
<Hanmac>
it also works without bundler
nanoxd has quit [Client Quit]
deens has quit [Quit: deens]
cj3kim has quit [Ping timeout: 264 seconds]
pellenation has joined #ruby
valesk has quit [Ping timeout: 252 seconds]
jibi has quit [Read error: Connection reset by peer]
rhys_ has joined #ruby
Davey has joined #ruby
arietis has quit [Client Quit]
antix_ has quit [Ping timeout: 256 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
jibi has joined #ruby
dkamioka has quit [Remote host closed the connection]
nanoxd has joined #ruby
pairup has joined #ruby
<breefield>
Hanmac, how would one do it without bundler?
dkamioka has joined #ruby
pairup has left #ruby [#ruby]
antix_ has joined #ruby
engel has joined #ruby
agjacome has joined #ruby
theRoUS has quit [Read error: Operation timed out]
DaZ has quit [Ping timeout: 260 seconds]
nanoxd has quit [Client Quit]
aspires has quit [Quit: aspires]
<Hanmac>
breefield: loook at the Kernel#gem method
Tricon has joined #ruby
duggiefresh has quit [Remote host closed the connection]
fijimunkii has joined #ruby
Lewix has joined #ruby
duggiefresh has joined #ruby
reset has joined #ruby
fijimunkii has quit [Client Quit]
nanoxd has joined #ruby
engel has quit [Client Quit]
sambao21 has joined #ruby
<breefield>
thanks Hanmac, this helps me get on the right track
s0ber has quit [Read error: Connection reset by peer]
ukd1 has quit [Ping timeout: 246 seconds]
dbjeepn has joined #ruby
<angelxmoreno>
so basically its the fastest tool for the right job, but not the fastest for every job
S0da has joined #ruby
Guest76036 has quit [Ping timeout: 240 seconds]
riceandbeans has quit [Quit: leaving]
<pixelshuck>
But for me, a newbie, who has to learn a language/write an app within a month. It's not excatly the best choice.
<Hanmac>
angelxmoreno: yeah i think you get it, (for sample i used ruby with 3D rendering, and i get similar results with ruby than with the native C++ program)
dangerousdave has quit [Quit: Leaving...]
ukd1_ has quit [Ping timeout: 256 seconds]
<ker2x_>
you think that coding a http server is a good choice ? :)
<Mon_Ouie>
Learning a functional language isn't harder than learning an imperative one — some would argue the opposite
<ker2x_>
and you'll never learn boost in a month
s0ber has joined #ruby
Soda has quit [Ping timeout: 260 seconds]
<angelxmoreno>
Hanmac: ok, i was just asking to prove to my co-worker, who never knew what irc was, that the ruby community in irc is actually helpful. he is impressed
devoldmx has joined #ruby
<Mon_Ouie>
And not many languages are harder to learn than C++
* Hanmac
had programmed once an http server in C :P
Emmanuel_Chanel has joined #ruby
antix_ has quit [Ping timeout: 264 seconds]
DaZ has quit [Ping timeout: 245 seconds]
<angelxmoreno>
thanks guys
angelxmoreno has left #ruby [#ruby]
<ker2x_>
i don't know any language harder than C++ expept those who are obfuscated on purpose :)
<Hanmac>
ker2x_: like PHP ? ;D
<volty_>
Mon_Ouie: no way, procedural languages are much more easier to learn (learning intended as as being able to write something, not only notions )
antix_ has joined #ruby
<ker2x_>
more like INTERCAL :)
joshu has quit [Ping timeout: 264 seconds]
Zerogrifter has joined #ruby
<pixelshuck>
ker2x_, I have some experience writing network apps, I've wrote IRC client with php couple years ago.
<pixelshuck>
And it's colelge assignment
pellenation has quit [Quit: Leaving.]
<ker2x_>
and the assignment is "C++/boost or ruby" ?
<pixelshuck>
No, assignment is server/client app.
<pixelshuck>
They don't care what language/protocol/libraries I'm going to use.
<ker2x_>
and Ø 40+ languages including C, C++, Java, .NET, Python.
<pixelshuck>
sweeper, why not? I don't need to get full support, just basic actions.
<Mon_Ouie>
volty_: For example, to understand/debug an imperative program you have to care about the order in which operations are run and understand the idea that things change over time
mikepack has quit [Remote host closed the connection]
ldnunes has joined #ruby
<ker2x_>
pixelshuck: because http have a very long history :)
<pixelshuck>
pardon?
<graft_>
are there any good red-black tree implementations out there?
<pixelshuck>
What kind of history?
v1n has quit [Ping timeout: 245 seconds]
<Mon_Ouie>
If you default to writing things functionally that problem disappears, and only matters when you're doing something that's intrinsically stateful (like printing, etc.)
reset has quit [Quit: Leaving...]
Xeago has joined #ruby
failshel_ has joined #ruby
kevinykchan has quit [Quit: Computer has gone to sleep.]
<sweeper>
pixelshuck: cause you don't need it and it's a PITA
<ker2x_>
pixelshuck: there is many different RFC and ... well... oddity
<sweeper>
pixelshuck: unless you don't actually need to write a SERVER but just need to write an application
mansi has quit [Remote host closed the connection]
DaZ has joined #ruby
claymore has quit [Quit: Leaving]
antix_ has quit [Ping timeout: 252 seconds]
fgo has joined #ruby
mansi has joined #ruby
dancardamore has quit []
<pixelshuck>
sweeper, I need to write both client and server, although realisation can be pretty dodgy and spotty, as well as things like multiple threads and async-io can be overlooked.
<volty_>
Mon_Ouie: it is much more difficult for our non-recursive brains to understand/simulate recursive behavior, we are without stack :)
<volty_>
whether you are used or not
kilophoton has quit [Ping timeout: 260 seconds]
clov3r has quit [Read error: Connection reset by peer]
antix_ has joined #ruby
tylersmi_ has joined #ruby
failshell has quit [Ping timeout: 264 seconds]
roseroserose has joined #ruby
<volty_>
the results prove that, much is done by imperative languages and mixing imperative and declarative (e.g. ruby)
<pixelshuck>
I need to make CONNECT, GET, HEAD and possibly POST to work, leaving everything else aside.
banisterfiend has quit [Quit: Computer has gone to sleep.]
<sweeper>
pixelshuck: sounds very vague. what part of the specification stops you from writing a sinatra REST app, and using a generic HTTP library in ruby as the client?
failshel_ has quit [Ping timeout: 240 seconds]
<r0bgleeson>
volty_: thats not true
<r0bgleeson>
recursion is pretty simple
<ker2x_>
yes and no
<r0bgleeson>
and a pattern used a ton in functional programming
<sweeper>
did they say "write an http server and client", or "write a server and a client"?
Xeago has quit [Ping timeout: 264 seconds]
<ker2x_>
simple to write, usually
<Tearan>
Help!
<sweeper>
tail recursion is its own reward
<pixelshuck>
sweeper, probably ego-boost of ability to say "I've wrote an http server"
<volty_>
yet to see the results of functional programming // the best results come from a nice mix and choice
<r0bgleeson>
volty_: but sure, a mix of all of them is nice, nothing "pure", but look at ruby, it could be a mix
<r0bgleeson>
but its not
<r0bgleeson>
its "OO" pure
<ker2x_>
but sometime i write recursive function and it "just works" but i'm not sure why :)
cj3kim has joined #ruby
<pixelshuck>
I can use http library for client, thing's go a little bit more tight on server side.
<r0bgleeson>
even scala is not one or the other
<r0bgleeson>
it leans more towards OO
mendozao has joined #ruby
mansi has quit [Ping timeout: 252 seconds]
<sweeper>
Tearan: what error are you getting?
nanoxd has joined #ruby
<ker2x_>
Tearan: then ?
<popl>
Tearan: Can you be a little more specific? e.g. "I was trying to x but I got y when I expected z."
joshu has joined #ruby
DaZ has quit [Ping timeout: 246 seconds]
<sweeper>
ker2x_: no then, then bad!
<roseroserose>
I know this has already been asked, but wondering if anyone can clarify how you'd use Kernel#gem or similar to require a specific fork of a gem in irb?
<Tearan>
I put up a gist popl
<ker2x_>
doh ?
KobraKao has joined #ruby
<Mon_Ouie>
I usually verify that the function is correct by assuming it is correct for N-1 (or whatever the simpler case it reduces to is) and verify that, given that, it provides the right result for N
<popl>
Tearan: yes, but I can't read minds.
<pixelshuck>
sweeper, I'm probably going to use Ruby/zeromq for client and C++/zeromq for servre.
<Mon_Ouie>
And then the base case is usually trivial
<popl>
Tearan: Help us help you. :)
<Tearan>
oh sorry.. hold.. I'll update with the error message
<pixelshuck>
_maybe_ some additional library on Ruby side.
<pixelshuck>
Need to look deeper into that.
<r0bgleeson>
Mon_Ouie: what are you doing these days?
<volty_>
all is fine as long as we have 2, 3, 4 functions that we checked. But, as we well know, things get exponential complexity when you put them all together.
<sweeper>
Tearan: you used the inplace modifier in an assignment
<pixelshuck>
Oh wow, does ZeroMQ take care of scheduling and asynchronous connections?
<bnagy>
what is this #zeromq?
<volty_>
Otherwise, with all that functional power, the lisper and schemers would already be superceded, in intelligence, by their own programs
<Tearan>
I'm doing a codeAcademy excercise
<ker2x_>
zeromq is superawesome
<sweeper>
downcase! modifies in place, it does not return the object
xcv_ has joined #ruby
<sweeper>
so your assignment fails
<Tearan>
It asks specifically for you to use the inlace modifyer
AndChat| has joined #ruby
<pixelshuck>
sweeper, mine?
<Mon_Ouie>
r0bgleeson: Not much, the last programming I did (besides assignments, etc.) was some computer vision stuff in Clojure (detecting edges on a picture)
<sweeper>
Tearan: then you're using it wrong :P
antix_ has joined #ruby
nanoxd has quit [Client Quit]
valesk has joined #ruby
cj3kim has quit [Ping timeout: 245 seconds]
<r0bgleeson>
volty_: dont know about that, i know a few people much smarter than me who are adamant about functional programming. they can probably scale it to anything and it'll make a ton of sense. you need to be able to apply your mind to that road of thought and be good at it
kvirani has quit [Remote host closed the connection]
TheMoonMaster has quit [Remote host closed the connection]
xcv has quit [Ping timeout: 245 seconds]
<pixelshuck>
sweeper, Worst case scenario, I'll dig out old Lua client/client(p2p) app. So I can do it anyway I want it, I'll not be screwed if I'll fail, just deciding on the tools for the job right now
petey has quit [Remote host closed the connection]
RichardBaker has quit [Ping timeout: 256 seconds]
kvirani has joined #ruby
<ker2x_>
ERROR: invalid input syntax for type timestamp: "1380922643.893" (PG::InvalidDatetimeFormat) ... meh, it's weekend, i'll see that monday ... i tought that fractional was ok. pffft.
<ker2x_>
nighty night \o/
RichardBaker has joined #ruby
workmad3 has joined #ruby
petey has joined #ruby
breakingthings has quit []
<r0bgleeson>
Mon_Ouie: ah. took a look at clojure.
petey has quit [Read error: Connection reset by peer]
KobraKao has quit [Ping timeout: 256 seconds]
<r0bgleeson>
cool language
<sweeper>
Tearan: those things you're tacking on, chomp, and downcase, are methods. many methods will return the object they're working on. that's why you can do foo = bar.downcase
<ker2x_>
yes !
<r0bgleeson>
im not a fan of the platform
pwh has joined #ruby
<r0bgleeson>
go seems more appealing :)
<sweeper>
you're assigning foo to the output of bar's downcase method
iamjarvo has quit [Remote host closed the connection]
petey has joined #ruby
<ker2x_>
r0bgleeson: clojure now support go syntax
<sweeper>
Tearan: however, downcase! does not return anything
<ker2x_>
with channel & co :)
<sweeper>
Tearan: so when you assign user_input =(output of downcase)
iamjarvo has joined #ruby
<r0bgleeson>
ker2x_: yeah, my issue with it is whether you like it or not the main platform is the JVM and some problems are solved with the JVM ecosystem/Java
baordog_ has quit [Remote host closed the connection]
<sweeper>
Tearan: you are assigning user_input to nothing, in ruby land, nil
<ker2x_>
r0bgleeson: yup
<volty_>
r0bgleeson: just probably. let them scale it , and show after
pwh has quit [Client Quit]
enebo has quit [Quit: enebo]
<ker2x_>
you can use clojurescript too
<sweeper>
Tearan: so, if you HAVE to use in-place modification, you need to do it on something that already exists, not whentrying to assign
<ker2x_>
compile to js :)
cescalante is now known as ce_afk
<AndChat|>
Volty_ functional programming is the tits
<sweeper>
Tearan: user_input = gets.chomp
<r0bgleeson>
volty_: ive seen these people scale big complex projects in functional languages
<sweeper>
Tearan: and then user_input.downcase!
<r0bgleeson>
volty_: what about riak?
xibalba has joined #ruby
<ker2x_>
erlang
mrsolo has quit [Quit: This computer has gone to sleep]
<r0bgleeson>
volty_: if anything i probably think the OO train of thought is inferior.
<Tearan>
Interesting that code academy lets you fall on your face with this
<Tearan>
they are so good about holding your hand for everything
<sweeper>
Tearan: well that's what "in place" means :P
<r0bgleeson>
its great for abstractions and mapping concepts to concrete forms
antix_ has quit [Ping timeout: 252 seconds]
<r0bgleeson>
it can be great for describing a domain
kvirani has quit [Ping timeout: 248 seconds]
lfox has quit [Quit: ZZZzzz…]
<volty_>
r0bgleeson: I don't think that OO and functional are necessarily mutually exclusive
<r0bgleeson>
same here
<AntelopeSalad>
not ruby related (sorry), but does anyone know if you can download the free ec2 instances locally to do a test run?
<r0bgleeson>
but you seem to be saying functional languages can't scale to big projects?
antix has joined #ruby
antix has quit [Changing host]
antix has joined #ruby
petey has quit [Remote host closed the connection]
iamjarvo has quit [Ping timeout: 252 seconds]
antix is now known as Guest22543
DaZ has joined #ruby
<ker2x_>
http://clojure.org/special_forms#Special%20Forms--%28fn%20name?%20%28[params*%20]%20condition-map?%20exprs*%29+%29 that's how i started to love clojure :)
petey has joined #ruby
<volty_>
I suspect they can - big - if monotone
<ker2x_>
you can define pre-condition on arg before executing the code, and post condition before returning
aagdbl has quit [Quit: Leaving.]
<Tearan>
Thanks guys
snovak has quit [Remote host closed the connection]
Zai00 has quit [Quit: Zai00]
snovak has joined #ruby
<volty_>
i'll beleive the functional superior when i see e windows system, gui, libs, whole app implemented in them
gmas has joined #ruby
pen has quit [Remote host closed the connection]
mlpinit has quit [Remote host closed the connection]
<volty_>
let them abstract the interface to hardware and write nice libs for windows, buttons, sliders etc etc
banisterfiend has joined #ruby
johnnyfuchs has quit [Quit: Leaving.]
<volty_>
it all depends on the domain of the problem
<ker2x_>
i still use fortran from time to time :)
<volty_>
of course the prolog is superior, to everything else, if you have to trace the family relationships
snovak_ has joined #ruby
richiebkr has joined #ruby
tsykoduk is now known as zz_tsykoduk
mikepack has joined #ruby
RichardBaker has quit [Ping timeout: 260 seconds]
richiebkr is now known as RichardBaker
petey has quit [Ping timeout: 240 seconds]
<workmad3>
volty_: prolog is also pretty good if you want to write a predicate logic theorem checkec
<volty_>
yes, workmad3, many years ago, i liked it
greenrose has quit [Ping timeout: 256 seconds]
digital-ghost has joined #ruby
DaZ has quit [Ping timeout: 246 seconds]
<ker2x_>
there isn't any langage that i hate more than ada
starfox21 has joined #ruby
antix_ has joined #ruby
devdazed has quit [Quit: Bye]
antix_ has quit [Changing host]
antix_ has joined #ruby
<volty_>
but (they) do not tell me the predicate logic of prolog, or lists of scheme, or other 'superior logic' of other func langs, are superior and not more difficult to learn
<volty_>
it all depends on the domain, on the data and the transformations on that data
bean has quit [Quit: Computer has gone to sleep.]
tatsuya_o has joined #ruby
kilophoton has joined #ruby
snovak_ has quit [Remote host closed the connection]
tatsuya__ has joined #ruby
snovak has joined #ruby
<workmad3>
volty_: it also depends on the programmer(s)
<workmad3>
volty_: and how they perceive the problem domain and transform it to a solution
<volty_>
workmad3: even on BASIC programmers ! :)
engel has quit [Quit: leaving]
engel has joined #ruby
<ker2x_>
if you dream math functionnal programming will probably be easier to learn as a first langage
freerobby has quit [Quit: Leaving.]
<ker2x_>
it took me years to "get it" with OO
<ker2x_>
FP was immediate
<pixelshuck>
meh, I for the sake of my life, can't do maths. No FP for me, oh well.
<volty_>
it took me a breeze to OO, though templates were more 'resistant'
banisterfiend has joined #ruby
<volty_>
i like math but i prefer langs as ruby
DaZ has joined #ruby
antix_ has quit [Ping timeout: 252 seconds]
tatsuya_o has quit [Ping timeout: 245 seconds]
carlyle has quit [Remote host closed the connection]
<ker2x_>
i was a perl monger for years, then i became a sysadmin and stopped coding on a daily basis.
reset has joined #ruby
<banisterfiend>
volty_ what kind of math do u like?
<ker2x_>
i take any langage that fit my need
louism2wash has joined #ruby
<ker2x_>
today it's ruby :)
<volty_>
to know what's behind // people are so fast when telling somebody "this is easy", "that is easy", "you should do it this (or that) way" etc etc forgetting that we all get tired and fuzy
codecop has quit [Remote host closed the connection]
snovak has quit [Ping timeout: 240 seconds]
<volty_>
banisterfiend: in a sense that i was a natural talent
<louism2wash>
Happy friday to all
antix_ has joined #ruby
<volty_>
little to do with math now
Levin_22 has quit [Quit: Levin_22]
ehaliewicz has quit [Remote host closed the connection]
<pixelshuck>
ker2x_, if I would want to get into math, I'd need to start at school level. Do I need and _want_ to bother?
<banisterfiend>
volty_ do you like spaghetti puttanesca?
bsaboia_ has quit [Ping timeout: 252 seconds]
<ker2x_>
pixelshuck: you need :)
dbjeepn has quit [Quit: Leaving...]
Xanderby has quit [Quit: Xanderby]
<pixelshuck>
ker2x_, I just feel like, I can't be arsed. Math was never too easy or too hard for me, it was something in between. But I'm not a known fuck giver so I just didn't bother.
<Eiam>
if I'm doing hash.each_with_index{(k,v),index} how can i find out the total number of index's I'll have?
<Eiam>
e.g. length
<ker2x_>
pixelshuck: you will :)
<volty_>
banisterfiend: yes // i like too the simple aglio olio peperoncino // or + pomodoro + mozzarella
<banisterfiend>
Eiam hash.size
<Eiam>
without re-calculating/referencing the value in hash (since it s the return value of another function)
<Eiam>
i guess store it before hand?
<Eiam>
was hoping there was some clever ruby way to know the length of your enumerable
<bnagy>
run it
<ker2x_>
time to sleep now. bye. have fun \o/
<pixelshuck>
ker2x_, oh well, I guess I'll start skimming through it simultaneously with FP language.
<pixelshuck>
Bye.
<banisterfiend>
volty_ puttanesca is my favourite, i'm going to cook it tomorrow
<ker2x_>
nighty night
<bnagy>
banisterfiend: with real putas?
<Eiam>
like _self_.length or something
<banisterfiend>
bnagy yeah, that's an easy ingredient to find here in holland ;)
mrsolo has joined #ruby
<Eiam>
banisterfiend: thats the easy answer, i was going for something more complicated ;p
simplyaubs has joined #ruby
<Eiam>
find ill just store the result first and enumerate through it after!
<volty_>
some other time i'll tell you the other recipe
DaZ has quit [Read error: Operation timed out]
antix_ has quit [Ping timeout: 240 seconds]
<ker2x_>
everything in programming can be seen as just math function. because, basically, the only think a cpu is capable of is doing read stuff, do math on it (or boolean logic) and write it. (and i'm gone to bed. bye)
<workmad3>
ker2x_: you can also see it as abstract symbol manipulation
jonathanwallace has quit [Ping timeout: 240 seconds]
<workmad3>
ker2x_: or just electrical signals
cj3kim has joined #ruby
<workmad3>
ker2x_: or plenty of other models ;)
<banisterfiend>
ker2x_ i think a logical function is more accurate :)
rainbyte has joined #ruby
<ker2x_>
:)
<workmad3>
church-turing hypothesis
antix_ has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
<volty_>
i think it is about state
<sweeper>
halting state
siput has joined #ruby
<volty_>
i'm convinced that computer idea comes from textile machines
<workmad3>
volty_: state machines are yet another comparable computation model
St_Marx has joined #ruby
<sweeper>
also any time people talk about turing, it makes me want to read the Atrocity Archives again
<sweeper>
(computational demonology ftw)
<workmad3>
sweeper: :)
<ker2x_>
volty_: they were one of the first computers
<volty_>
ker2x_: yap
TTilus has quit [Ping timeout: 256 seconds]
<ker2x_>
but they really were developpedto do math
<workmad3>
hey, what about the roman robots?
rainbyte has quit [Client Quit]
<workmad3>
that could be programmed with a counterweight and rope
<ker2x_>
then a clock is a computer ?
c0rn has joined #ruby
rainbyte has joined #ruby
siput has left #ruby [#ruby]
amacgregor has quit [Read error: Connection reset by peer]