apeiros_ changed the topic of #ruby to: Ruby 2.1.2; 2.0.0-p481; 1.9.3-p545: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
crudson has joined #ruby
Wolland has joined #ruby
s2013 has quit [Remote host closed the connection]
j_mcnally_ has quit [Ping timeout: 240 seconds]
nanoyak has quit [Quit: Computer has gone to sleep.]
jimms has quit []
dawkirst has quit [Remote host closed the connection]
jmeeuwen_ has joined #ruby
phoo1234567 has quit [Quit: Leaving]
hakunin has quit [Read error: Connection reset by peer]
heyimwill has quit [Ping timeout: 256 seconds]
sepp2k has quit [Ping timeout: 260 seconds]
felixjet has quit [Read error: Connection reset by peer]
mercwithamouth has quit [Ping timeout: 264 seconds]
bpgoldsb has quit [Ping timeout: 256 seconds]
felixjet has joined #ruby
hakunin has joined #ruby
jmeeuwen has quit [Ping timeout: 256 seconds]
jmeeuwen_ is now known as jmeeuwen
wallerdev has joined #ruby
Bira has joined #ruby
ffranz has quit [Quit: Leaving]
jamto11 has joined #ruby
Hobogrammer has quit [Ping timeout: 256 seconds]
Photism_ has joined #ruby
Bira_ has joined #ruby
lanox has joined #ruby
heyimwill has joined #ruby
sunya7a has quit [Ping timeout: 245 seconds]
bpgoldsb has joined #ruby
einarj has joined #ruby
JoshGlzBrk has joined #ruby
kevind has quit [Quit: kevind]
Photism has quit [Ping timeout: 255 seconds]
jamto11 has quit [Remote host closed the connection]
WormDrink has joined #ruby
Bira has quit [Ping timeout: 260 seconds]
musl has quit [Quit: WeeChat 0.4.3]
musl has joined #ruby
skysploit has joined #ruby
dbasch has quit [Read error: Connection reset by peer]
JoshGlzB_ has joined #ruby
melik_ has quit [Quit: Computer has gone to sleep.]
JoshGlzBrk has quit [Read error: No route to host]
dbasch has joined #ruby
melik_ has joined #ruby
<dopiee> apeiros, can you send me the code again for arr.select{|value| value == "A"}.count.times do
<dopiee> total -= 10 if total > 21
<dopiee> end
<kavinder_> hi everyone, is it normal behavior for a command line script without any arguments to wait for use input before doing anything?
kmels has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
einarj has quit [Ping timeout: 245 seconds]
s2013 has joined #ruby
j_mcnally_ has joined #ruby
dbasch has quit [Read error: Connection reset by peer]
jottr_ has quit [Ping timeout: 245 seconds]
lanox has quit []
dbasch has joined #ruby
blaines has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<benzrf> kavinder_: depends on the script
Lingo is now known as payjo
melik_ has quit [Ping timeout: 255 seconds]
<shevy> kavinder_ perhaps it was written that way, like using ARGF
<shevy> kavinder_ do you have the code to that script?
Hobogrammer has joined #ruby
<shevy> dopiee
<shevy> <apeiros> `10*arr.count("A")` is executed in this order: `10*(arr.count("A"))`
<shevy> <apeiros> arr.count("A") returns how many times "A" occurs in arr
<shevy> <dopiee> so its multiplying by 10 how ever many times A occurs?
dbasch has quit [Client Quit]
wjimenez_5271_ has joined #ruby
ddv has quit [Ping timeout: 260 seconds]
<kavinder_> it's an example from the highline gem, I'm just getting familiar with the gem
<shevy> yeah, that is a gem specifically for getting user input
<shevy> apparently it starts a loop, then sends all that user input into the ask() method
banister has joined #ruby
ddv has joined #ruby
omenks has joined #ruby
banjara has quit [Quit: Leaving.]
<kavinder_> locally when I run it, it doesn't start the loop until I type something in and hit return
<shevy> and the array at %w{save sample load reset quit} will lead to end of execution
<shevy> when the user provides a match to that array
<shevy> no, the loop must be started kavinder_
crudson has quit [Ping timeout: 264 seconds]
<shevy> this is normal ruby behaviour
<shevy> loop { puts '5'; sleep 1 }
<shevy> just try that in irb
payjo has quit [Quit: Lingo - http://www.lingoirc.com]
<shevy> I mean, it's the same as if you were fetching user input in standard ruby like this:
<shevy> loop { puts $stdin.gets.chomp }
wjimenez5271 has quit [Ping timeout: 255 seconds]
<kavinder_> I see, so is there a way for that prompt to show up immediately when the script is started?
codeurge has joined #ruby
omenks has quit [Client Quit]
<shevy> well
<shevy> when I run that script
<shevy> I get this prompt at once:
<shevy> "Enter command: "
awc737 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
thams has quit [Quit: thams]
<kavinder_> hmmm, are you running this as a ruby file or a bash script?
<shevy> I run this as a .rb file
DaniG2k has joined #ruby
Deele has quit [Ping timeout: 240 seconds]
Bira_ has quit [Remote host closed the connection]
duncannz has quit [Quit: Leaving]
freerobby has quit [Quit: Leaving.]
Bira has joined #ruby
renier_ has quit [Quit: Textual IRC Client: www.textualapp.com]
tvw has quit []
bricker`work has quit [Ping timeout: 250 seconds]
thumpba has joined #ruby
thams has joined #ruby
arq_ has joined #ruby
virtualize has joined #ruby
nateberkopec has quit [Quit: Leaving...]
Bira has quit [Ping timeout: 260 seconds]
zybi1 has quit [Quit: Leaving]
<rVb_ntrl> do i need to know shell to learn ruby?
Wolland has quit [Remote host closed the connection]
<kavinder_> whoops, my shebang had a -n option at the end
<kavinder_> I removed that and it worked
<kavinder_> what does the -n do again?
renier has joined #ruby
thumpba has quit [Ping timeout: 255 seconds]
thams has quit [Client Quit]
Mon_Ouie has quit [Ping timeout: 256 seconds]
Zebroid has joined #ruby
CorpusCallosum has quit [Ping timeout: 255 seconds]
Sgeo has quit [Ping timeout: 255 seconds]
geggam has quit [Ping timeout: 250 seconds]
peret has quit []
hectorrr has joined #ruby
linojon has joined #ruby
nateberkopec has joined #ruby
<shevy> rVb_ntrl not really, you can do everything in ruby really
freerobby has joined #ruby
<shevy> -n assume 'while gets(); ... end' loop around your script
<shevy> kavinder_, from ruby --help
<shevy> obviously it wraps a loop over your code automatically
<rVb_ntrl> what do you mean 'everything'?
<shevy> so you should have had two loops I assume
<rVb_ntrl> shevy,
<kavinder_> shevy, thanks a ton!
<shevy> kavinder_ \o/
<shevy> rVb_ntrl well
<rVb_ntrl> what are some basic things that ruby is used for today?
<shevy> hey
<rVb_ntrl> ?
<shevy> now that is two questions
<shevy> I am not so fast at typing!
<rVb_ntrl> oh. ;)
<rVb_ntrl> ok
<shevy> so let's first look at what a shell script may be used
brandonshowers has joined #ruby
larissa has joined #ruby
JoshGlzBrk has joined #ruby
JoshGlzB_ has quit [Read error: Connection reset by peer]
<shevy> in essence, for instance, let's say you have a shell script that invokes some commands
<shevy> to bring up your WLAN interface of your laptop
<rVb_ntrl> ok
<shevy> in ruby you can do the same, although of course with a different syntax
Zebroid has quit [Ping timeout: 250 seconds]
Rainicorn has joined #ruby
<shevy> you can invoke system programs via system() or via Kernel backticks ``
<rVb_ntrl> do you do ith through the termial or a ruby gui shevy ?
<shevy> so pretty much you have the same functionality
<shevy> initially always through commandline first
<shevy> once that works, I may add a GUI
<shevy> though to be honest with you
fgo has joined #ruby
<shevy> usually I just finish a commandline script and am done with it
niklasb has quit [Ping timeout: 245 seconds]
<rVb_ntrl> ah, so it is better to know shell first before learning any kind of programing?
<rVb_ntrl> ok
<shevy> it is written in a way that would allow me to lateron, should I ever need to, add a GUI, but the commandline is so much faster
<shevy> dunno
<shevy> I always found shell absolutely ugly
<shevy> rVb_ntrl I think it would be better to pick any of the scripting languages
siwica has joined #ruby
<shevy> they are rather closely related to one another ... ruby python php perl ...
<shevy> I'd even add javascript to that family too
LadyRainicorn has quit [Ping timeout: 245 seconds]
<siwica> can I iterate through an array selecting blocks of three elements at a time?
<shevy> rVb_ntrl what sets ruby apart from the other is that it is super adaptable
<benzrf> shevy: ughhhhhhhhhh php
<benzrf> shevy: perl is just as adaptable
evansbee has quit [Remote host closed the connection]
<benzrf> maybe more
<shevy> benzrf there is wordpress!
<benzrf> and python aint bad
<benzrf> shevy: oh, you're helping explain why php is bad?
<shevy> python enforces ()
Amerj has joined #ruby
<shevy> python enforces indent
<shevy> well
<shevy> php can be a learning resource
rlazoti has joined #ruby
jottr_ has joined #ruby
<benzrf> ewww
<benzrf> 08:45 < shevy> python enforces indent
sputnik13 has joined #ruby
kavinder_ has quit [Remote host closed the connection]
<benzrf> yes, thats a good thin
JoshGlzBrk has quit [Read error: Connection reset by peer]
goshdarnyou has joined #ruby
<shevy> it is so good that guido once stated to do away with it if he could do the language anew
nfk has quit [Quit: yawn]
fgo has quit [Ping timeout: 245 seconds]
j_mcnally_ has quit [Ping timeout: 260 seconds]
<benzrf> i dont believe u
awc737 has joined #ruby
rails_flix has quit [Quit: This computer has gone to sleep]
<shevy> hmm
xMopxShell has joined #ruby
DaniG2k has quit [Quit: leaving]
<shevy> I can't find a resource for backing up my claim :(
<benzrf> ( ͡° ͜ʖ ͡°)
rp__ has quit [Ping timeout: 240 seconds]
jottr_ has quit [Ping timeout: 272 seconds]
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
robscormack has joined #ruby
Bira has joined #ruby
MatthewsFace has quit [Ping timeout: 260 seconds]
MatthewsFace has joined #ruby
chipotle has quit [Quit: cya]
thams has joined #ruby
thams has quit [Client Quit]
SCHAAP137 has quit [Remote host closed the connection]
MatthewsFace has quit [Client Quit]
magic has quit [Quit: WeeChat 1.0-dev]
jamto11 has joined #ruby
awc737 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Bira has quit [Ping timeout: 264 seconds]
dvb_ua has quit [Ping timeout: 260 seconds]
wallerdev has quit [Quit: wallerdev]
Amerj has left #ruby ["Leaving"]
MCDev has quit [Quit: HydraIRC -> http://www.hydrairc.com <- In tests, 0x09 out of 0x0A l33t h4x0rz prefer it :)]
kennym1 has joined #ruby
mary5030 has joined #ruby
kennym1 has quit [Client Quit]
magic_ has joined #ruby
MatthewsFace has joined #ruby
shawnjgoff has joined #ruby
geggam has joined #ruby
tokik has joined #ruby
mary5030 has quit [Ping timeout: 256 seconds]
pothibo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
wjimenez_5271_ has quit [Remote host closed the connection]
wjimenez5271 has joined #ruby
Lewix has quit [Remote host closed the connection]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
roolo has quit [Quit: Leaving...]
MatthewsFace has quit [Ping timeout: 240 seconds]
Affix has quit [Ping timeout: 256 seconds]
ziprar has quit [Quit: Leaving]
Ulrike_Rayne has quit [Excess Flood]
zipace has joined #ruby
Ulrike has joined #ruby
wjimenez5271 has quit [Ping timeout: 250 seconds]
sputnik13 has joined #ruby
zly has quit [Ping timeout: 256 seconds]
Affix has joined #ruby
ohcibi_ has joined #ruby
zly has joined #ruby
ohcibi has quit [Ping timeout: 256 seconds]
Ulrike has quit [Client Quit]
Bira has joined #ruby
magic_ is now known as magic
Ulrike_Rayne has joined #ruby
moted has quit []
lw has joined #ruby
Lewix has joined #ruby
Lewix has joined #ruby
Lewix has quit [Changing host]
arya_ has joined #ruby
mr_snowf1ake has joined #ruby
davedev24_ has quit []
brandonshowers has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MatthewsFace has joined #ruby
wald0 has joined #ruby
jottr_ has joined #ruby
mr_snowf1ake has quit [Remote host closed the connection]
wallerdev has joined #ruby
wallerdev has quit [Client Quit]
rubyonrailed has quit []
MatthewsFace has quit [Client Quit]
Sgeo has joined #ruby
robustus has quit [Ping timeout: 255 seconds]
robustus has joined #ruby
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
jottr_ has quit [Ping timeout: 260 seconds]
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
arya_ has quit [Quit: sayonara^_^]
thumpba has joined #ruby
sailias has quit [Ping timeout: 256 seconds]
tylerkern has joined #ruby
yfeldblum has quit [Ping timeout: 255 seconds]
saarinen has quit [Quit: saarinen]
GriffinHeart has joined #ruby
yfeldblum has joined #ruby
Zebroid has joined #ruby
GriffinHeart has quit [Ping timeout: 240 seconds]
Spami has quit [Quit: This computer has gone to sleep]
nateberkopec has quit [Quit: Leaving...]
Zebroid has quit [Ping timeout: 272 seconds]
jack_rabbit has joined #ruby
lw has quit [Quit: s]
MCDev has joined #ruby
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
Sawbones has joined #ruby
j_mcnally_ has joined #ruby
Sawbones has quit [Remote host closed the connection]
Emmanuel_Chanel has quit [Quit: Leaving]
Sawbones has joined #ruby
Tricon has quit [Quit: Leaving...]
freerobby has quit [Quit: Leaving.]
Lewix has quit [Remote host closed the connection]
Bira has quit [Remote host closed the connection]
rlazoti has quit [Quit: Computer has gone to sleep.]
ndrei has joined #ruby
braincra- has joined #ruby
Photism_ has quit [Quit: Leaving]
iamjarvo has joined #ruby
amacou has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 260 seconds]
braincrash has quit [Ping timeout: 240 seconds]
Kricir has joined #ruby
rezzack has quit [Quit: Leaving.]
nateberkopec has joined #ruby
Sawbones has quit []
wald0 has quit [Quit: Lost terminal]
djbkd has joined #ruby
milky has quit [Max SendQ exceeded]
milky has joined #ruby
jtPretzel80 has quit [Quit: Leaving]
zarul has quit [Ping timeout: 256 seconds]
milky is now known as Guest50762
Guest50762 has quit [Remote host closed the connection]
amclain has joined #ruby
nateberkope has joined #ruby
nateberkopec has quit [Read error: Connection reset by peer]
geggam has quit [Ping timeout: 255 seconds]
diegoviola has joined #ruby
Lewix has joined #ruby
hectorrr has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
hectorrr has joined #ruby
doesntseemright has joined #ruby
einarj has joined #ruby
fgo has joined #ruby
Lewix has joined #ruby
hectorrr has quit [Ping timeout: 255 seconds]
doesntseemright has left #ruby [#ruby]
Lewix has quit [Remote host closed the connection]
einarj has quit [Ping timeout: 240 seconds]
Emmanuel_Chanel has joined #ruby
jaimef has quit [Excess Flood]
geggam has joined #ruby
spastorino has quit [Quit: Connection closed for inactivity]
Rainicorn has quit [Read error: Connection reset by peer]
LadyRainicorn has joined #ruby
bricker`LA has quit [Quit: leaving]
northfurr has joined #ruby
siwica has quit [Read error: Connection reset by peer]
jaimef has joined #ruby
riddled has joined #ruby
northfurr has quit [Client Quit]
amacou has joined #ruby
agjacome_ has joined #ruby
tokik has quit [Ping timeout: 250 seconds]
Photism has joined #ruby
agjacome has quit [Ping timeout: 255 seconds]
agjacome has joined #ruby
jrhe has quit [Quit: Connection closed for inactivity]
Kricir has quit [Remote host closed the connection]
Fire-Dragon-DoL has quit [Quit: Leaving.]
agjacome_ has quit [Ping timeout: 245 seconds]
GinoMan has joined #ruby
robscormack has quit [Quit: Leaving]
agjacome_ has joined #ruby
Kricir has joined #ruby
havenwood has joined #ruby
agjacome has quit [Ping timeout: 255 seconds]
wallerdev has joined #ruby
geggam has quit [Ping timeout: 255 seconds]
ixti has quit [Quit: WeeChat 0.4.3]
LadyRainicorn has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
LadyRainicorn has joined #ruby
brandonshowers has joined #ruby
davedev24_ has joined #ruby
bogeyd6 has joined #ruby
agjacome has joined #ruby
phutchins has quit [Ping timeout: 255 seconds]
agjacome_ has quit [Ping timeout: 264 seconds]
davispuh has quit [Ping timeout: 255 seconds]
nonnatus has joined #ruby
codeurge has quit [Quit: Quit.]
awc737 has joined #ruby
awc737 has quit [Max SendQ exceeded]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nonnatus has quit [Ping timeout: 240 seconds]
rails_flix has joined #ruby
Rainicorn has joined #ruby
j_mcnally_ has quit [Ping timeout: 272 seconds]
LadyRainicorn has quit [Read error: Connection reset by peer]
braincra- has quit [Quit: bye bye]
niklasb has joined #ruby
timonv_ has joined #ruby
j_mcnally_ has joined #ruby
braincrash has joined #ruby
codabrink has quit [Quit: Textual IRC Client: www.textualapp.com]
jamto11 has quit [Remote host closed the connection]
dbasch has joined #ruby
tylerkern has quit [Quit: Textual IRC Client: www.textualapp.com]
Rainicorn has quit [Read error: Connection reset by peer]
timonv_ has quit [Ping timeout: 250 seconds]
LadyRainicorn has joined #ruby
sixxy has joined #ruby
ramfjord has quit [Ping timeout: 256 seconds]
einarj has joined #ruby
baweaver has joined #ruby
amystephe has quit [Quit: amystephe]
einarj has quit [Ping timeout: 250 seconds]
dbasch has quit [Quit: dbasch]
sarkis has quit [Ping timeout: 245 seconds]
GriffinHeart has joined #ruby
fgo has quit [Remote host closed the connection]
deric_skibotn has quit [Ping timeout: 256 seconds]
nonnatus has joined #ruby
narcan has joined #ruby
jimmyhoughjr has joined #ruby
yetanotherdave has quit [Ping timeout: 250 seconds]
GriffinHeart has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby
mehlah has quit [Quit: Leaving...]
mikepack has quit [Remote host closed the connection]
arup_r has joined #ruby
<jimmyhoughjr> anyone ever got rails running on a pi?
melik_ has joined #ruby
havenwood has quit [Remote host closed the connection]
lethjakman has joined #ruby
tokik has joined #ruby
NinoScript_ has joined #ruby
ninegrid has quit [Ping timeout: 250 seconds]
iamjarvo has joined #ruby
Kricir has quit [Remote host closed the connection]
bunnicula has quit []
ninegrid has joined #ruby
LadyRainicorn has quit [Read error: Connection reset by peer]
thams has joined #ruby
LadyRainicorn has joined #ruby
dvb_ua has joined #ruby
havenwood has joined #ruby
frankle has quit [Quit: Connection closed for inactivity]
mostlybadfly has quit [Quit: Connection closed for inactivity]
sarkis has joined #ruby
<havenwood> kinda nifty struct with the equalizer gem: https://gist.github.com/havenwood/80f2724eccd35a65257c
Kricir has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thams has quit [Client Quit]
LadyRainicorn has quit [Ping timeout: 255 seconds]
sarkis has quit [Ping timeout: 255 seconds]
roodee has quit [Ping timeout: 245 seconds]
roodee has joined #ruby
nateberkope has quit [Quit: Leaving...]
roodee is now known as Guest56459
codeFiend has joined #ruby
fgo has joined #ruby
codeFiend has left #ruby [#ruby]
renderful has joined #ruby
lethjakman has quit [Ping timeout: 255 seconds]
renderful has quit [Remote host closed the connection]
Aryasam has quit [Ping timeout: 240 seconds]
thams has joined #ruby
LadyRainicorn has joined #ruby
ari-_-e has quit [Ping timeout: 250 seconds]
Shidash has joined #ruby
Akagi201 has joined #ruby
Akagi201 has quit [Remote host closed the connection]
s2013 has quit [Ping timeout: 264 seconds]
niklasb has quit [Ping timeout: 245 seconds]
ascarter has quit [Ping timeout: 255 seconds]
melik_ has quit [Quit: Computer has gone to sleep.]
Akagi201 has joined #ruby
Akagi201 has quit [Remote host closed the connection]
LadyRainicorn has quit [Read error: Connection reset by peer]
Duckily has quit [Quit: Duckily]
rails_flix has quit [Quit: This computer has gone to sleep]
LadyRainicorn has joined #ruby
Starless has joined #ruby
bricker`work has joined #ruby
einarj has joined #ruby
Kricir has quit [Remote host closed the connection]
b00stfr3ak has joined #ruby
LadyRainicorn has quit [Read error: Connection reset by peer]
Rainicorn has joined #ruby
einarj has quit [Ping timeout: 260 seconds]
rails_flix has joined #ruby
havenwood has quit [Remote host closed the connection]
fgo has quit [Remote host closed the connection]
moritzs has joined #ruby
skysploit has quit [Remote host closed the connection]
Kricir has joined #ruby
larissa has quit [Quit: Leaving]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
LadyRainicorn has joined #ruby
<sam113101> have you guys ever tried cardinal?
saarinen has joined #ruby
<LadyRainicorn> No, is it similar to duck?
<LadyRainicorn> Duck is delicious.
sixxy has quit [Remote host closed the connection]
Rainicorn has quit [Ping timeout: 260 seconds]
Kricir has quit [Remote host closed the connection]
Starless has quit [Quit: Leaving]
moritzs has quit [Ping timeout: 240 seconds]
mikepack has joined #ruby
Takle has joined #ruby
wjimenez5271 has joined #ruby
sarkis has joined #ruby
wjimenez5271 has quit [Remote host closed the connection]
dopiee has left #ruby ["Leaving"]
dopie has joined #ruby
dopie has left #ruby ["Leaving"]
dopie has joined #ruby
tylersmi_ has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
Takle has quit [Ping timeout: 255 seconds]
tjr9898 has joined #ruby
sarkis has quit [Ping timeout: 255 seconds]
Lewix has joined #ruby
benzrf is now known as benzrf|offline
tylersmith has quit [Ping timeout: 250 seconds]
Akagi201 has joined #ruby
Photism has quit [Quit: Leaving]
chipotle has joined #ruby
fgo has joined #ruby
j_mcnally_ has quit [Ping timeout: 250 seconds]
EvanR_ has quit [Read error: Connection reset by peer]
ridget has joined #ruby
Ouyang has joined #ruby
tylersmi_ has quit [Remote host closed the connection]
bricker`work has quit [Ping timeout: 264 seconds]
tylersmith has joined #ruby
rippa has joined #ruby
fgo has quit [Ping timeout: 240 seconds]
lethjakman has joined #ruby
mikepack has quit [Remote host closed the connection]
sailias has joined #ruby
decoponio has joined #ruby
saarinen has quit [Quit: saarinen]
mikepack has joined #ruby
tylersmith has quit [Ping timeout: 260 seconds]
saarinen has joined #ruby
Duckily has joined #ruby
djbkd has quit [Remote host closed the connection]
<arup_r> Can anyone tell me, to introduce me briefly, what *side effect* is in computing ? I read wikipedia..don't know things went above my head.
<Ouyang> side effect in computing?
timonv_ has joined #ruby
Bira has joined #ruby
<sam113101> arup_r: when something modifies the state of the program
sputnik13 has joined #ruby
caveat- has quit [Ping timeout: 250 seconds]
fgo has joined #ruby
<arup_r> sam113101: You mean state of instance variables ?
thams has quit [Quit: thams]
GriffinHeart has joined #ruby
caveat- has joined #ruby
<sam113101> arup_r: no, more like global state
<sam113101> if a function modifies stuff outside of itself, it has side effects
fmendez has quit [Remote host closed the connection]
timonv_ has quit [Ping timeout: 240 seconds]
<arup_r> sam113101: Umm.. any example please..?
Bira has quit [Ping timeout: 264 seconds]
fgo has quit [Ping timeout: 240 seconds]
<sam113101> >> $test = 0; def func(x); $test += 1; x + $test; end; puts "#{func(10)} and #{func(10)}"
GriffinHeart has quit [Ping timeout: 255 seconds]
<sam113101> yeah, looks like the bot is gone
ridget has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sam113101> arup_r: anyway, try that in irb
<arup_r> sam113101: Ohh! you meant global variables.
sailias has quit [Ping timeout: 260 seconds]
<sam113101> it's not limited to that
<arup_r> In Ruby, block are also capable to modify the outside variables,,, even if it is a local var.. Can I consider then block has side effects /
<sam113101> class methods most often modify the state of their instance, so you could call that side effects
<sam113101> well, a capturing lambda/proc could have side effects
jesusmaldonado has joined #ruby
<arup_r> Nice! "class methods most often modify the state of their instance" -- Any example? It looks interesting..
brandonshowers has quit [Quit: Textual IRC Client: www.textualapp.com]
<sam113101> >> class Test; def func(x); @a ||= 0; @a += 1; @a + x; end; end; t = Test.new; "#{t.func(10)} and #{t.func(10)}"
caveat- has quit [Ping timeout: 250 seconds]
<sam113101> now there would probably be multiple methods accessing the @a variable, in areal scenario
<sam113101> which means that the order in which you call those methods could have an importance
caveat- has joined #ruby
<arup_r> Ahh! you meant instance methods... I thought class methods modifying the state of its instances instance variables...
agjacome has quit [Ping timeout: 250 seconds]
ndrei has joined #ruby
<sam113101> yeah… sorry
Ouyang has left #ruby ["Leaving"]
mostlybadfly has joined #ruby
ndrei has quit [Client Quit]
amacou has quit [Remote host closed the connection]
caveat- has quit [Remote host closed the connection]
Arkaniad has joined #ruby
j_mcnally_ has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
caveat- has joined #ruby
Photism has joined #ruby
kmels has quit [Ping timeout: 264 seconds]
diegoviola has quit [Quit: WeeChat 0.4.3]
ndrei has joined #ruby
comma8 is now known as BieberHole69
BieberHole69 is now known as Guest19021
Guest19021 is now known as comma8
fgo has joined #ruby
mikepack has quit [Remote host closed the connection]
alem0lars has joined #ruby
agjacome has joined #ruby
dbasch has joined #ruby
ari-_-e has joined #ruby
fgo has quit [Ping timeout: 240 seconds]
yeticry has quit [Ping timeout: 255 seconds]
fgo has joined #ruby
shawnjgoff has quit [Read error: Connection reset by peer]
amclain has quit [Quit: Leaving]
yeticry has joined #ruby
NinoScript_ has quit [Quit: Textual IRC Client: www.textualapp.com]
IceDragon has quit [Quit: Space~~~]
lkba has quit [Ping timeout: 240 seconds]
JBreit has joined #ruby
sarkis has joined #ruby
mikepack has joined #ruby
agjacome has quit [Ping timeout: 264 seconds]
mikepack has quit [Remote host closed the connection]
jesusmaldonado has left #ruby [#ruby]
tvw has joined #ruby
sarkis has quit [Ping timeout: 240 seconds]
mikepack has joined #ruby
agjacome has joined #ruby
<sam113101> guys
JBreit has left #ruby ["Leaving"]
ridget has joined #ruby
chipotle_ has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
ndrei has quit [Ping timeout: 255 seconds]
agjacome_ has joined #ruby
ndrei has joined #ruby
tokik has quit [Ping timeout: 255 seconds]
oo_ has joined #ruby
saarinen has quit [Read error: Connection reset by peer]
saarinen has joined #ruby
agjacome has quit [Ping timeout: 245 seconds]
parduse has quit [Ping timeout: 264 seconds]
agjacome has joined #ruby
rVb_ntrl has quit [Quit: Leaving]
agjacome_ has quit [Ping timeout: 256 seconds]
amacou has joined #ruby
fgo has quit [Read error: Connection reset by peer]
fgo has joined #ruby
PaulePan1er is now known as PaulePanter
Takle has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
Bira has joined #ruby
arup_r has joined #ruby
Takle has quit [Remote host closed the connection]
Channel6 has quit [Quit: Leaving]
Takle has joined #ruby
Shidash has quit [Ping timeout: 256 seconds]
robscormack has joined #ruby
Bira has quit [Ping timeout: 240 seconds]
robscormack has quit [Client Quit]
Duckily has quit [Quit: Duckily]
robscormack has joined #ruby
Takle has quit [Ping timeout: 256 seconds]
saarinen has quit [Quit: saarinen]
jshultz has quit [Quit: Connection closed for inactivity]
agjacome_ has joined #ruby
tjr9898 has quit [Remote host closed the connection]
tjr9898 has joined #ruby
chihhsin has quit [Quit: leaving]
manishjain has joined #ruby
agjacome has quit [Ping timeout: 240 seconds]
craigbowen3 has joined #ruby
cantonic has quit [Quit: cantonic]
rkj has joined #ruby
agjacome has joined #ruby
<manishjain> please figure out the error.
Sgeo_ has joined #ruby
agjacome_ has quit [Ping timeout: 250 seconds]
dingus_khan has joined #ruby
<robscormack> sudo?
Sgeo has quit [Ping timeout: 255 seconds]
caveat- has quit [Ping timeout: 250 seconds]
Sgeo has joined #ruby
caveat- has joined #ruby
jds has joined #ruby
agjacome_ has joined #ruby
agjacome has quit [Ping timeout: 256 seconds]
Sgeo_ has quit [Ping timeout: 255 seconds]
rkj has quit [Read error: Connection reset by peer]
manishjain has quit [Quit: Leaving]
rails_flix has quit [Quit: This computer has gone to sleep]
agjacome has joined #ruby
Ilyas has joined #ruby
tyfighter has joined #ruby
agjacome_ has quit [Ping timeout: 245 seconds]
oo_ has quit [Ping timeout: 250 seconds]
agjacome_ has joined #ruby
mikepack has quit [Remote host closed the connection]
techsethi has joined #ruby
oo_ has joined #ruby
agjacome has quit [Ping timeout: 264 seconds]
sarkis has joined #ruby
heftig has quit [Ping timeout: 272 seconds]
charliesome has quit [Read error: Connection reset by peer]
Photism has quit [Quit: Leaving]
dbasch has quit [Read error: Connection reset by peer]
sarkis has quit [Ping timeout: 245 seconds]
charliesome has joined #ruby
dbasch has joined #ruby
lethjakman has quit [Ping timeout: 240 seconds]
duper has quit [Ping timeout: 256 seconds]
agjacome has joined #ruby
Photism has joined #ruby
agjacome_ has quit [Ping timeout: 260 seconds]
ridget has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sarkis has joined #ruby
duper has joined #ruby
lkba has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
CaptainJet has quit []
heftig has joined #ruby
oo_ has quit [Remote host closed the connection]
techsethi has quit [Quit: techsethi]
iamjarvo has joined #ruby
Bira has joined #ruby
oo_ has joined #ruby
ylluminarious has quit [Quit: Leaving...]
alem0lars has quit [Quit: Going AFK...]
Bira has quit [Ping timeout: 256 seconds]
Arkaniad has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
banjara has joined #ruby
diegoviola has joined #ruby
ji0n has joined #ruby
psmolen has joined #ruby
20WAAU4X7 has joined #ruby
zarul has joined #ruby
sepp2k has joined #ruby
jobewan has joined #ruby
20WAAU07R has joined #ruby
verto has joined #ruby
mr_rich101 has joined #ruby
Lulzon has joined #ruby
cuqa has joined #ruby
Lulzon has quit [Max SendQ exceeded]
zarul has quit [Max SendQ exceeded]
cuqa has quit [K-Lined]
mr_rich101 has quit [K-Lined]
zarul has joined #ruby
DrCode has joined #ruby
kmels has joined #ruby
chipotle_ has quit [Quit: cya]
dvb_ua has quit [Ping timeout: 250 seconds]
Takle has joined #ruby
Kricir has joined #ruby
jackneill has joined #ruby
Avahey_ has quit [Changing host]
Avahey_ has joined #ruby
goshdarnyou has quit [Changing host]
goshdarnyou has joined #ruby
alem0lars has joined #ruby
mostlybadfly has quit [Changing host]
mostlybadfly has joined #ruby
jds has joined #ruby
jds has quit [Changing host]
carraroj has joined #ruby
end_guy has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tjr9898_ has joined #ruby
Takle has quit [Ping timeout: 264 seconds]
tjr9898 has quit [Ping timeout: 260 seconds]
fgo has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
agjacome_ has joined #ruby
memph1s has joined #ruby
jack_rabbit has quit [Ping timeout: 250 seconds]
Poky has joined #ruby
carraroj has quit [Ping timeout: 240 seconds]
Kricir has quit [Remote host closed the connection]
agjacome has quit [Ping timeout: 255 seconds]
oo_ has joined #ruby
rylev has joined #ruby
pygospa has quit [Ping timeout: 240 seconds]
fgo has joined #ruby
oo__ has joined #ruby
linojon has quit [Quit: linojon]
oo_ has quit [Ping timeout: 240 seconds]
tyfighter has quit [Quit: tyfighter]
b00stfr3ak has quit [Ping timeout: 250 seconds]
neonpinkcrayon has joined #ruby
magic has quit [Quit: Resizing Pi]
<neonpinkcrayon> Possibly a FAQ, but is there a kind of gem that allows me to implement a webserver, so I can handle posts, gets, etc?
mr-foobar has quit [Quit: Leaving...]
magic_ has joined #ruby
dbasch has quit [Quit: dbasch]
agjacome has joined #ruby
magic_ is now known as magic
agjacome_ has quit [Ping timeout: 245 seconds]
grump has joined #ruby
agjacome_ has joined #ruby
agjacome has quit [Ping timeout: 245 seconds]
relix has joined #ruby
agjacome has joined #ruby
Kricir has joined #ruby
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
agjacome_ has quit [Ping timeout: 256 seconds]
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
sarkis has quit [Quit: WeeChat 0.4.3]
kiri has quit [Remote host closed the connection]
lxsameer has joined #ruby
asmodlol has joined #ruby
codezomb has joined #ruby
andrewlio has joined #ruby
arq_ is now known as CorpusCallosum
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
oo__ has quit [Remote host closed the connection]
oo_ has joined #ruby
Daiyousei has joined #ruby
Kricir has quit [Remote host closed the connection]
dangerousdave has quit [Read error: No route to host]
Kricir has joined #ruby
dangerousdave has joined #ruby
wallerdev has quit [Ping timeout: 260 seconds]
Kricir has quit [Ping timeout: 255 seconds]
robbyoconnor has joined #ruby
keen__ has joined #ruby
keen_ has quit [Read error: Connection reset by peer]
mostlybadfly has quit [Quit: Connection closed for inactivity]
wallerdev has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
namxam has joined #ruby
Atttwww has quit [Ping timeout: 260 seconds]
goshdarnyou has quit [Quit: Connection closed for inactivity]
timonv_ has joined #ruby
caveat- has quit [Ping timeout: 272 seconds]
lxsameer has joined #ruby
oo_ has quit [Remote host closed the connection]
grump has quit [Remote host closed the connection]
banjara has quit [Quit: Leaving.]
atmosx has joined #ruby
bradleyprice has quit [Remote host closed the connection]
caveat- has joined #ruby
bradleyprice has joined #ruby
oo_ has joined #ruby
mike32 has joined #ruby
consti has joined #ruby
nobodyzzz has joined #ruby
FarLight has joined #ruby
amacou has quit [Remote host closed the connection]
grump has joined #ruby
amacou has joined #ruby
<FarLight> serialized_values = ''
<FarLight> array_to_serialize { |value| serialized_values += value }
tvw has quit []
bradleyprice has quit [Ping timeout: 240 seconds]
tvw has joined #ruby
<FarLight> Is there anyway I can access a variable outside of the block scope?
<FarLight> to achieve that serialization?
<FarLight> Or is there a better way to achieve the same thing?
Photism_ has joined #ruby
jack_rabbit has joined #ruby
amacou has quit [Ping timeout: 255 seconds]
Photism has quit [Ping timeout: 264 seconds]
sixxy has joined #ruby
ddv has quit [Changing host]
ddv has joined #ruby
Photism_ has quit [Client Quit]
noop has joined #ruby
pygospa has joined #ruby
j416_ is now known as j416
oo_ has quit [Remote host closed the connection]
timonv_ has quit [Remote host closed the connection]
<FarLight> Oh it already works
oo_ has joined #ruby
kirun has joined #ruby
namxam_ has joined #ruby
GriffinHeart has joined #ruby
ramfjord has quit [Ping timeout: 250 seconds]
DaniG2k has joined #ruby
SCHAAP137 has joined #ruby
ramfjord has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rylev has quit [Remote host closed the connection]
DaniG2k_ has joined #ruby
namxam has quit [Ping timeout: 272 seconds]
lkba has quit [Ping timeout: 272 seconds]
GriffinHeart has quit [Ping timeout: 260 seconds]
DaniG2k has quit [Ping timeout: 250 seconds]
DaniG2k has joined #ruby
cgj has quit [Quit: moving]
roolo has joined #ruby
dseitz has joined #ruby
jeaye has joined #ruby
DaniG2k_ has quit [Ping timeout: 240 seconds]
<jeaye> What is the 'self' param of a global function defined via rb_define_global_function supposed to be?
dangerousdave has quit [Read error: No route to host]
dangerousdave has joined #ruby
timonv_ has joined #ruby
asmodlol has quit [Ping timeout: 255 seconds]
mike32 has quit [Quit: Leaving]
craigbowen3 has quit [Ping timeout: 260 seconds]
arup_r has quit [Ping timeout: 272 seconds]
jeaye was kicked from #ruby by apeiros [if you cross post, at least tell every channel that you are cross posting. you're not banned. consider this a warning.]
tjr9898_ has quit [Remote host closed the connection]
mr-foobar has joined #ruby
ramfjord has quit [Ping timeout: 256 seconds]
arup_r has joined #ruby
marr has joined #ruby
Bira has joined #ruby
Guest56459 has quit [Ping timeout: 250 seconds]
roodee has joined #ruby
roodee is now known as Guest24182
FarLight has quit [Quit: Leaving]
Bira has quit [Ping timeout: 240 seconds]
caveat- has quit [Ping timeout: 260 seconds]
Umang has joined #ruby
ninegrid has quit [Quit: leaving]
ninegrid has joined #ruby
ninegrid has quit [Client Quit]
sixxy has quit [Remote host closed the connection]
ninegrid has joined #ruby
amacou has joined #ruby
caveat- has joined #ruby
jack_rabbit has quit [Ping timeout: 260 seconds]
thumpba_ has joined #ruby
nonnatus has quit [Ping timeout: 240 seconds]
thumpba has quit [Read error: Connection reset by peer]
kmels has quit [Ping timeout: 240 seconds]
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
nateberkopec has joined #ruby
thumpba_ has quit [Read error: Connection reset by peer]
diegoviola has quit [Quit: WeeChat 0.4.3]
asmodlol has joined #ruby
amystephen has joined #ruby
caveat- has quit [Ping timeout: 250 seconds]
lsmola has joined #ruby
wallerdev has quit [Quit: wallerdev]
sepp2k has quit [Quit: Leaving.]
Martxel has joined #ruby
DaniG2k_ has joined #ruby
DaniG2k has quit [Read error: Connection reset by peer]
spider-mario has joined #ruby
jeaye has joined #ruby
rylev has joined #ruby
mike32 has joined #ruby
caveat- has joined #ruby
parduse has joined #ruby
fgo has quit [Remote host closed the connection]
techsethi has joined #ruby
Lewix has quit [Remote host closed the connection]
<jeaye> What is the 'self' param of a global function defined via rb_define_global_function supposed to be? http://ruby-doc.com/docs/ProgrammingRuby/html/ext_ruby.html doesn't say
<jeaye> I'm looking to be able to determine what function Ruby thinks its in (from C).
fly2web has joined #ruby
<fly2web> hello
<fly2web> introduce me good book of ruby.
Wolland has joined #ruby
<fly2web> I want study ruby.
<shevy> jeaye it should always point to the current object
<jeaye> shevy: Hmm, if I call from outside of any visible object, what should the object be?
<jeaye> Ohh, Kernel?
jottr_ has joined #ruby
<jeaye> "Defines a global function (a private method of Kernel) with the given name, implemented by the C function func and taking argc arguments"
<jeaye> I wasn't quite sure how to interpret that.
<shevy> hmmm
<jeaye> I was hoping it might carry some info about what function I'm in, since I don't see anything in the C api for asking such a question.
noop has quit [Ping timeout: 245 seconds]
<fly2web> i want study ruby, i don’t know about ruby book.
DaniG2k_ has quit [Quit: leaving]
<neonpinkcrayon> Is there a bot in here that evaluates ruby?
<shevy> neonpinkcrayon yeah
<shevy> you can trigger it via >>
<shevy> >> puts 'hello neonpinkcrayon'
<neonpinkcrayon> >> puts "omg"
<shevy> damn
<shevy> the bot is offline :(
<neonpinkcrayon> shevy: You broke it.
<shevy> The name was Mon_bot
nateberkopec has quit [Quit: Leaving...]
m8 has joined #ruby
<shevy> <havenwood> >> {first: 'coffee'}
<shevy> <Mon_Robot> havenwood: => {:first=>"coffee"} (https://eval.in/171806)
<shevy> this is how it worked some hours ago
<neonpinkcrayon> >> { moo: "omg" }
<neonpinkcrayon> No, you really broke it man.
jds has quit [Quit: Connection closed for inactivity]
banisterfiend has joined #ruby
<shevy> was it here?
neonpinkcrayon has quit [Quit: leaving]
<shevy> I think it was already offline
thomasfedb has quit [Ping timeout: 260 seconds]
<jeaye> It was already offline.
<fly2web> hello
agjacome has quit [Quit: leaving]
<fly2web> who give me good ruby book?
thomasfedb has joined #ruby
neonpinkcrayon has joined #ruby
<shevy> fly2web pickaxe
jottr has joined #ruby
<fly2web> pickaxe?
<fly2web> what mean?
<fly2web> shevy
<shevy> that is a book man
jottr_ has quit [Ping timeout: 255 seconds]
<fly2web> i want web book
<fly2web> i have no money.
<shevy> fly2web you know the name, go and google for torrents
<fly2web> oh
<fly2web> torrent download
<fly2web> good
techsethi has quit [Quit: techsethi]
<shevy> anyone has an idea how I can remember #assoc on Array
<fly2web> shevy: it is too many page.
<fly2web> i want just 300 page.
<shevy> fly2web god man why are you trolling
<jeaye> Only read the first 300.
<shevy> fly2web read 300 pages, then stop
<shevy> fly2web stop being such a baby
<fly2web> :(
<fly2web> thanks
<shevy> the only real way to learn ruby is to write ruby code on your own anyway
tvw has quit []
<shevy> class Cat
<shevy> end
<fly2web> i see :(
<shevy> that is the basis of all
<shevy> you transform the outside world into the ruby world
<arup_r> I have a problem in understanding one OOP logic :-0(
<shevy> which one
techsethi has joined #ruby
<arup_r> I am reading a book, where author is saying "duplication increases the dependency" -- But I am not able to guess or think, how so.. Any help from you guys on this regard ?
<atmosx> Can anyone think of a more efficient way to write this table? https://gist.github.com/atmosx/9cd340c9738419aaba57 (it has another 23 or so values)
Bira has joined #ruby
<atmosx> like making 1 loop and note 15?
<shevy> arup_r that is a weird statement
<shevy> arup_r I mean, objects can have no dependency
<shevy> so I am not sure how duplication can increase any dependency for such an object
<arup_r> I am reading the book TDD by example, shevy
Bira_ has joined #ruby
<arup_r> Where Kent Beck used this line..
dawkirst has joined #ruby
<arup_r> The book is good very very good.. But it is me, who don't able to connect this line... :(
techsethi has quit [Client Quit]
Bira has quit [Ping timeout: 240 seconds]
oo_ has quit [Remote host closed the connection]
fgo has joined #ruby
<arup_r> shevy: How many years are you programming ?
<shevy> arup_r hmm dunno, I started with ruby about 10 years ago
<arup_r> shevy: Cool.
sepp2k has joined #ruby
<arup_r> Here in India,,, Getting a Ruby jobs too hard... All are c# or Java or .Net
<atmosx> arup_r: then learn C# and Java
fgo has quit [Read error: No route to host]
<atmosx> if you want a job you do what you need to get it.
<atmosx> use ruby for your personal projects
<arup_r> atmosx: I don't like..
<arup_r> I like Ruby
fgo has joined #ruby
<atmosx> we rarely get what we like :-) especially for a job (which means offering a service to a third party)
<atmosx> even if you use ruby, you'll probably have to do things that you don't like
<arup_r> I have a job right now on Rails.. I am telling probability is much less..
<arup_r> atmosx: Correct!!
<arup_r> Look Shevy he is doing 10 years Ruby.. I wish if I could do so..
zly has quit [Changing host]
zly has joined #ruby
CorpusCallosum has quit [Ping timeout: 240 seconds]
<neonpinkcrayon> The trick is just to enjoy everything and broaden one's horizons...
<neonpinkcrayon> Wait, that sounded terrible.
j_mcnally_ has quit [Ping timeout: 255 seconds]
<neonpinkcrayon> If you can't do a ruby only job, threaten suicide.
alem0lars has quit [Quit: Going AFK...]
<fly2web> what is ruby’s newest version?
<atmosx> arup_r: shevy is a scientist. For him ruby is not a profession
<atmosx> arup_r: you get paid to write code, it's different.
<jeaye> shevy: Solution was __callee__ or __method__, defined in Kernel.
nopolitica has joined #ruby
<atmosx> neonpinkcrayon: lol, like if they would give a sh*t in India if one more suicide happens (no hard feelings arup_r )
apeiros has joined #ruby
MartinCleaver has joined #ruby
fold has quit [Ping timeout: 256 seconds]
<neonpinkcrayon> atmosx: Sometimes I really wonder if my sarcasm really is that inconspicious.
DrCode has quit [Ping timeout: 264 seconds]
<neonpinkcrayon> I once made the epic statement that software development is "Just moving things around".
<fly2web> what is ruby’s version?
DrCode has joined #ruby
<neonpinkcrayon> Which amused\annoyed a co-worker...
<arup_r> fly2web: Check from the official site
<shevy> atmosx I now have to try and make sense of electron microscopic datasets :(
<fly2web> oh :(
anonymous1137653 has joined #ruby
<shevy> some .tif images, some .mrc and .mrcs images, and a bunch of weird text files that specify format rules and stuff...
<fly2web> other site is very kind But……
<fly2web> :(
<neonpinkcrayon> fly2web: http://bit.ly/1nrLHkK
<shevy> fly2web ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
<shevy> fly2web do you have ruby installed man? :P
<fly2web> i have mac
<shevy> sorry
<shevy> mac users are noobs
<shevy> enter linux man
<fly2web> ruby 2.1.1p76
<shevy> wget ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.bz2
<shevy> ohhh
<shevy> so you do have ruby already
<shevy> GOOD
<fly2web> ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin12.0]
<shevy> did you write hello world example yet?
<fly2web> not yet
<shevy> puts 'hello world'
<shevy> put this in a .rb file
<fly2web> is it newest version?
<shevy> invoke it via ruby name_here.rb
<shevy> <fly2web> ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin12.0]
<shevy> <shevy> fly2web ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
<shevy> :P
bridge has joined #ruby
<shevy> do you notice the difference
<shevy> 2.1.1p76 vs. 2.1.2p95
<shevy> is this the same to you
apeiros has quit [Ping timeout: 255 seconds]
<fly2web> ok
consti has quit [Quit: sawadee khrap]
anonymous1137653 has left #ruby [#ruby]
duncannz has joined #ruby
<arup_r> shevy: You are a scientist .. WooWW :-)
<shevy> it's not me who does the wet work really, I just get datasets from others and have to try and make sense of these
<shevy> I am not allowed to handle the morgagni electron microscope on my own :(
<shevy> because it cost like 150k Euros
professor_soap has joined #ruby
<shevy> but it's cool, you get a massive amount of small virions (the outer structure of a virus)
<neonpinkcrayon> shevy: Hey, that might not be worth much one day ;-)
<fly2web> i install it with rvm in Feburary.
<shevy> they look like little planets
<shevy> fly2web noob
<shevy> use the source man
<shevy> oh wait
<shevy> you use mac
<arup_r> atmosx: 'suicide' matter I didn't get... What did you mean ? my English skill is kind of LOL.
<shevy> btw fly2web do you know homebrew?
<fly2web> yes
<fly2web> brew
<shevy> good http://brew.sh/
<shevy> now you can install everything
chipotle has joined #ruby
neonpinkcrayon has quit [Quit: Blessed are the meek. For they shall die quickly when the bombs fall.]
chipotle has quit [Client Quit]
chipotle has joined #ruby
fgo has quit [Remote host closed the connection]
kachi8 has quit [Ping timeout: 256 seconds]
caveat- has quit [Ping timeout: 260 seconds]
<fly2web> but i don’t know the concise book of buby.
chipotle has quit [Client Quit]
Hobogrammer has quit [Ping timeout: 245 seconds]
<fly2web> i want thin book to read.
chipotle has joined #ruby
<shevy> lol
<fly2web> just 300~400 page
<shevy> come on man
<shevy> here is another book http://therubyway.org/
<shevy> Paperback: 888 pages
<shevy> ACK
GriffinHeart has joined #ruby
<shevy> TOO MANY PAGES
<shevy> fly2web download the ruby docu from the web and make a 400 page book from that ;)
chipotle has quit [Client Quit]
<fly2web> ok thanks shevy
<arup_r> fly2web: Read and know the concept of Ruby from here - http://www.amazon.in/The-Well-Grounded-Rubyist-David-Black/dp/1933988657
<fly2web> 888 page.
<fly2web> oh my god
chipotle has joined #ruby
<wasamasa> that guide with foxes is short
<wasamasa> and rather amusing than helpful
<shevy> lol
<shevy> that's not nice to say
<fly2web> arup_r: there is no customer reviews.
<shevy> you are saying "it is fun but useless" essentially
<shevy> arup_r he always wants more :(
<shevy> arup_r login and write one comment "It is good book." :)
<wasamasa> no, I rather wanted to say that I couldn't understand what the heck the author tried to convey
<arup_r> fly2web: Avdi Grimm bought the book...
chipotle has quit [Client Quit]
<shevy> yeah same here wasamasa
<shevy> but some people loved it
<arup_r> shevy: which one.?
<wasamasa> his other work about shoes was more understandable
<fly2web> i just want see ruby in the web for freee
chipotle has joined #ruby
<shevy> arup_r I meant in regards to when he wants a customer review haha
<shevy> "It is perfect book."
caveat- has joined #ruby
<shevy> there you go fly2web
<shevy> actually, the pickaxe is better
<shevy> but you only want tiny books
<shevy> which you can then read on the toilet
MartinCleaver has quit [Ping timeout: 250 seconds]
kachi8 has joined #ruby
chipotle has quit [Client Quit]
<wasamasa> hmm, I've read a 200 page one
GriffinHeart has quit [Ping timeout: 255 seconds]
<wasamasa> can't remember its name though
<shevy> haha
<shevy> it was too small to remember
MartinCleaver has joined #ruby
<wasamasa> exactly
chipotle has joined #ruby
<wasamasa> the only thing I remember is that I might adapt that writing style if I shall ever release something longer than your average rant on a forum
<arup_r> "which you can then read on the toilet" LOLzzzzzzzzzzz
<arup_r> fly2web: Here is a free book - http://phrogz.net/programmingruby/
pandaant has quit [Remote host closed the connection]
<shevy> so it was that good wasamasa hmm
<shevy> to make a creative rant
<fly2web> letter is too small.
chipotle has quit [Client Quit]
<arup_r> there are also ways when you don't have money to purchase a book. Learn that... :-) Don't ask me how.. If I do sin, I wouldn't teach you how to do *sin*.. :-)
namxam_ has quit [Remote host closed the connection]
chipotle has joined #ruby
<wasamasa> that one
<wasamasa> there's a web version IIRC
rylev has quit [Remote host closed the connection]
chipotle has quit [Client Quit]
<shevy> <fly2web> letter is too small.
<shevy> lol
<shevy> I told you before that he is trolling
<fly2web> no
<shevy> you find all sort of excuses man
<fly2web> i just a question.
chipotle has joined #ruby
<arup_r> fly2web: Yes
<shevy> it's either this problem or that problem
<wasamasa> me just a answer
<fly2web> ok may i have a question?
dingus_khan has quit [Remote host closed the connection]
<wasamasa> no
<shevy> fly2web did you work through https://pine.fm/LearnToProgram yet?
<wasamasa> ask a question
<wasamasa> just do it
<shevy> just one?
<wasamasa> nike-style
<shevy> he might have more than one question
<fly2web> i can do python, then i can’t learn ruby? or i must learn ruby?
chipotle has quit [Client Quit]
<fly2web> then i don’t need learn ruby? or i must learn ruby?
<wasamasa> wat
kachi8 has quit [Ping timeout: 245 seconds]
sepp2k has quit [Quit: Leaving.]
chipotle has joined #ruby
<wasamasa> your question makes no sense
<wasamasa> it's based on invalid assumptions
<shevy> lol
<shevy> he is trolling us man
<wasamasa> go away
namxam has joined #ruby
<shevy> fly2web can't you just pick one and learn it?
namxam has quit [Remote host closed the connection]
<fly2web> just one
<fly2web> i need ruby for metasploit.
<wasamasa> get out
chipotle has quit [Client Quit]
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
chipotle has joined #ruby
<shevy> lol
<shevy> this is too much fun
<shevy> stay in!
chipotle has quit [Client Quit]
chipotle has joined #ruby
<fly2web> i learned c, c++, java, javascript, python, perl, objective-c, php, android, etc
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shevy> no please
<shevy> don't kill us now
<shevy> and what is "android" exactly there
<shevy> is that a programming language
<fly2web> then i want hacking, but metasploit is made of ruby. so i think that i must study ruby.
<shevy> no you don't want that
<shevy> you wanna go to python
chipotle has quit [Client Quit]
chipotle has joined #ruby
chipotle has quit [Client Quit]
<fly2web> shevy: you do webscraping by ruby?
stoned5inch has joined #ruby
chipotle has joined #ruby
rylev has joined #ruby
<wasamasa> if someone isn't smart enough to use metasploit and extend it with ruby, that person shall better not use it at all
stoned5inch has left #ruby [#ruby]
ylluminarious has joined #ruby
rylev has quit [Remote host closed the connection]
chipotle has quit [Client Quit]
<shevy> fly2web please do not use ruby
banister has joined #ruby
<fly2web> why?
chipotle has joined #ruby
<arup_r> shevy: Be aware from him.. Proper TROLL.
<fly2web> i m not troll
<fly2web> :(
<fly2web> BYE
fly2web has left #ruby [#ruby]
chipotle has quit [Client Quit]
<wasamasa> korean, huh
<wasamasa> he could have whooped our butts
chipotle has joined #ruby
rylev has joined #ruby
<shevy> nah
<shevy> they have become sissies as well
<shevy> just look at the spread of placement in taekwondo
Ilyas has quit [Ping timeout: 255 seconds]
<wasamasa> I rather thought of starcraft
<shevy> yeah that is true
<shevy> in gaming they compensated what they lost in the physical race elsewhere
chipotle has quit [Client Quit]
chipotle has joined #ruby
fly2web has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
<fly2web> hello
<fly2web> where is ruby’s module?
<fly2web> give me sites
* wasamasa sighs
<arup_r> GOOGLE it
<fly2web> :(
<fly2web> google thanks
LadyRainicorn has quit [Quit: Bye]
chipotle has quit [Client Quit]
Rahul_Roy has joined #ruby
chipotle has joined #ruby
<shevy> fly2web please learn python
<fly2web> i knew python already
moritzs has joined #ruby
chipotle has quit [Client Quit]
moritzs has quit [Max SendQ exceeded]
chipotle has joined #ruby
<shevy> no you don't
<shevy> show me your python collection of modules
jarto has joined #ruby
techsethi has joined #ruby
<fly2web> there is many web sites of python module.
<Hanmac> fly2web: http://www.ruby-doc.org/core-2.1.1/Module.html here ... "ruby’s module" ;P
alem0lars has joined #ruby
chipotle has quit [Client Quit]
<fly2web> thanks Hanmac
chipotle has joined #ruby
<fly2web> python have many data of learning, but i think that ruby have short data.
nopolitica has quit [Ping timeout: 240 seconds]
<Wolland> fml
fgo has joined #ruby
chipotle has quit [Client Quit]
MartinCleaver has quit [Quit: MartinCleaver]
<wasamasa> care to elaborate?
<Wolland> unless you have some specific ruby questions, I think you should hit google and start learning it just you have done with other 12 languages that you know.
chipotle has joined #ruby
banisterfiend has quit [Ping timeout: 250 seconds]
<arup_r> lol
consti has joined #ruby
<AntelopeSalad> if i gem install with --deployment, is it safe to just copy that dir over to a different machine and have it all work as long as the OS/architecture is the same?
<AntelopeSalad> i'm not sure how the compiled gems are handled in that sense
<AntelopeSalad> *bundle install
chipotle has quit [Client Quit]
chipotle has joined #ruby
banister has quit [Ping timeout: 256 seconds]
spider-mario has quit [Read error: Connection reset by peer]
MartinCleaver has joined #ruby
chipotle has quit [Client Quit]
banister has joined #ruby
chipotle has joined #ruby
fgo has quit [Ping timeout: 256 seconds]
gattuso has quit [Read error: Connection reset by peer]
chipotle has quit [Client Quit]
shadolis has joined #ruby
chipotle has joined #ruby
chipotle has quit [Client Quit]
DaniG2k has joined #ruby
chipotle has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Dreamer3 has quit [Quit: Computer has gone to sleep.]
mike32 has quit [Quit: Leaving]
<fly2web> this two pdf is good and newest?
sepp2k has joined #ruby
chipotle has quit [Client Quit]
shadolis has quit [Quit: Leaving]
chipotle has joined #ruby
<Wolland> "This tutorial assumes that you are using Ruby version 1.9.2." "January 21, 2012"
nonnatus has joined #ruby
chipotle has quit [Client Quit]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
namxam has joined #ruby
phoo1234567 has joined #ruby
chipotle has joined #ruby
namxam has quit [Read error: Connection reset by peer]
chipotle has quit [Client Quit]
lsmola has quit [Ping timeout: 260 seconds]
namxam has joined #ruby
chipotle has joined #ruby
chipotle has quit [Client Quit]
swatts has joined #ruby
chipotle has joined #ruby
chipotle has quit [Client Quit]
chipotle has joined #ruby
namxam has quit [Ping timeout: 260 seconds]
<fly2web> Wolland: i use ruby 2.1
arup_r has quit [Quit: Leaving.]
<Wolland> you are missing the point
<fly2web> 2.1.1
<Wolland> not that point
chipotle has quit [Client Quit]
yfeldblum has joined #ruby
duncannz has quit [Quit: Leaving]
chipotle has joined #ruby
fly2web has left #ruby [#ruby]
nuck has quit [Ping timeout: 260 seconds]
yfeldblu_ has joined #ruby
chipotle has quit [Client Quit]
<wasamasa> let's hope he won't rejoin
timonv_ has quit [Remote host closed the connection]
chipotle has joined #ruby
<shevy> haha
nuck has joined #ruby
<wasamasa> or we won't survive this
<Wolland> :(
<wasamasa> I mean, he's learned 12 programming languages already, yet can't speak english properly
<wasamasa> clearly a very scary person
chipotle has quit [Client Quit]
elaptics`away is now known as elaptics
chipotle has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
<Wolland> I can only guess how many people suffered as he was "learning"
chipotle has quit [Client Quit]
chipotle has joined #ruby
yfeldblu_ has quit [Ping timeout: 260 seconds]
caveat- has quit [Ping timeout: 250 seconds]
chipotle has quit [Client Quit]
<shevy> many
chipotle has joined #ruby
CorpusCallosum has joined #ruby
chipotle has quit [Client Quit]
chipotle has joined #ruby
abuzze has joined #ruby
jamto11 has joined #ruby
chipotle has quit [Client Quit]
chipotle has joined #ruby
caveat- has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
britneywright has joined #ruby
chipotle has quit [Client Quit]
mr-foobar has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
mr-foobar has joined #ruby
pontiki has joined #ruby
chipotle has quit [Client Quit]
banisterfiend has joined #ruby
chipotle has joined #ruby
ph8 has joined #ruby
chipotle has quit [Client Quit]
jrhe has joined #ruby
chipotle has joined #ruby
chipotle has quit [Client Quit]
sepp2k has quit [Quit: Leaving.]
jamto11 has quit [Remote host closed the connection]
chipotle has joined #ruby
CorpusCallosum has quit [Remote host closed the connection]
chipotle has quit [Client Quit]
chipotle has joined #ruby
yfeldblum has joined #ruby
phutchins has joined #ruby
chipotle has quit [Client Quit]
apeiros has joined #ruby
chipotle has joined #ruby
chipotle has quit [Client Quit]
BadQuanta has quit [Remote host closed the connection]
chipotle has joined #ruby
j416 has quit [Quit: o/]
yfeldblum has quit [Ping timeout: 255 seconds]
chipotle has quit [Client Quit]
chipotle has joined #ruby
caveat- has quit [Ping timeout: 240 seconds]
mehlah has joined #ruby
SCHAAP137 has joined #ruby
chipotle has quit [Client Quit]
j416 has joined #ruby
banister has joined #ruby
lkb has joined #ruby
lxsameer has quit [Quit: Leaving]
timonv_ has joined #ruby
banister has quit [Read error: Connection reset by peer]
MartinCleaver has quit [Quit: MartinCleaver]
caveat- has joined #ruby
banister has joined #ruby
banisterfiend has quit [Quit: Computer has gone to sleep.]
CorpusCallosum has joined #ruby
abuzze has quit [Remote host closed the connection]
fgo has joined #ruby
Poky has quit [Remote host closed the connection]
Atrumx has joined #ruby
lkba has joined #ruby
fgo has quit [Ping timeout: 256 seconds]
timonv_ has quit [Ping timeout: 272 seconds]
spastorino has joined #ruby
Vivekananda_y510 has quit [Read error: Connection reset by peer]
sepp2k has joined #ruby
Vivekananda_y510 has joined #ruby
namxam has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lele has quit [Ping timeout: 256 seconds]
GriffinHeart has joined #ruby
lele has joined #ruby
namxam has quit [Ping timeout: 240 seconds]
Umang has quit [Ping timeout: 272 seconds]
Umang has joined #ruby
Zebroid has joined #ruby
Bira_ has quit [Remote host closed the connection]
timonv_ has joined #ruby
GriffinHeart has quit [Ping timeout: 240 seconds]
rylev has quit [Remote host closed the connection]
Deele has joined #ruby
Bira has joined #ruby
yfeldblum has joined #ruby
banister has joined #ruby
mostlybadfly has joined #ruby
rylev has joined #ruby
timfoo has quit [Ping timeout: 244 seconds]
DaniG2k has quit [Ping timeout: 255 seconds]
professor_soap has quit []
yfeldblum has quit [Ping timeout: 255 seconds]
timfoo has joined #ruby
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rylev has quit [Remote host closed the connection]
bridge has quit [Ping timeout: 240 seconds]
bogeyd6 has quit [Ping timeout: 240 seconds]
alem0lars has quit [Quit: alem0lars]
bogeyd6 has joined #ruby
postmodern has quit [Quit: Leaving]
j_mcnally_ has joined #ruby
rylev has joined #ruby
<shevy> are there any simple ways to reshuffle namespaces?
DaniG2k has joined #ruby
sputnik13 has joined #ruby
Daiyousei has quit [Quit: tropicraft.net]
rylev has quit [Remote host closed the connection]
dingus_khan has joined #ruby
sepp2k has quit [Quit: Leaving.]
<shevy> like I have one class in file foo.rb
<shevy> but it is not namespaced right now, so it might potentially clash
DaniG2k has quit [Ping timeout: 245 seconds]
maroloccio has joined #ruby
DaniG2k has joined #ruby
sputnik13 has quit [Ping timeout: 240 seconds]
dingus_khan has quit [Ping timeout: 264 seconds]
matrixdevuk has joined #ruby
DaniG2k has quit [Client Quit]
yacks has quit [Ping timeout: 260 seconds]
peret has joined #ruby
banister has quit [Read error: Connection reset by peer]
banister has joined #ruby
j_mcnally_ has quit [Ping timeout: 240 seconds]
lsmola has joined #ruby
maroloccio has quit [Quit: WeeChat 0.4.3]
fly2web has joined #ruby
<fly2web> hello
fgo has joined #ruby
Zebroid has quit [Remote host closed the connection]
fgo has quit [Ping timeout: 256 seconds]
yacks has joined #ruby
Pharaoh2 has joined #ruby
mehlah has quit [Quit: Leaving...]
noop has joined #ruby
Wolland has quit [Remote host closed the connection]
sepp2k has joined #ruby
freerobby has joined #ruby
namxam has joined #ruby
basiclaser has joined #ruby
einarj has joined #ruby
<basiclaser> what is the gem syntax for installing a specific version? I'd like to install bourbon 3.2.1
linojon has joined #ruby
pothibo has joined #ruby
britneywright has joined #ruby
dingus_khan has joined #ruby
Mon_Ouie has quit [Ping timeout: 272 seconds]
yfeldblum has joined #ruby
namxam has quit [Ping timeout: 260 seconds]
einarj has quit [Ping timeout: 256 seconds]
oo_ has joined #ruby
cantonic has joined #ruby
<basiclaser> anybody? I'd really appreciate the help i have to get started with my work
<heftig> basiclaser: precede the name with -v version
dingus_khan has quit [Ping timeout: 245 seconds]
yfeldblum has quit [Ping timeout: 260 seconds]
<shevy> gem install facets --version=1.8.54
<shevy> gem install bourbon --version=3.2.1
Rahul_Roy has quit [Quit: Connection closed for inactivity]
timonv_ has quit [Remote host closed the connection]
<basiclaser> heftig: :D thanks gem install bourbon -v 3.2.x worked
<basiclaser> thanks shevy
<shevy> hmm
<shevy> the -v variant is shorter
jmbrown412 has joined #ruby
<basiclaser> yeh a little cleaner
cantonic_ has joined #ruby
cantonic has quit [Ping timeout: 240 seconds]
cantonic_ is now known as cantonic
tjr9898 has joined #ruby
artmann has quit [Read error: Connection reset by peer]
artmann has joined #ruby
fgo has joined #ruby
o0oo0o has joined #ruby
thams has joined #ruby
centrx has joined #ruby
fgo has quit [Ping timeout: 255 seconds]
tjr9898 has quit [Remote host closed the connection]
tjr9898 has joined #ruby
mr_snowf1ake has joined #ruby
yacks has quit [Ping timeout: 255 seconds]
nonnatus has quit [Ping timeout: 260 seconds]
cantonic has quit [Read error: Connection reset by peer]
bradleyprice has joined #ruby
sepp2k has quit [Quit: Leaving.]
yacks has joined #ruby
liquidAnger has joined #ruby
<liquidAnger> hi all
liquidAnger has left #ruby [#ruby]
soulcake has quit [Read error: Connection reset by peer]
cantonic has joined #ruby
soulcake has joined #ruby
<fly2web> if i saw it, then i can master ruby?
SergioAtHome has joined #ruby
<centrx> fly2web, Looks okay, a little old, but it looks like it covers all the important points
<fly2web> a little old?
<fly2web> then give me new.
<fly2web> plz
<SergioAtHome> hi guys... I have a question. Why debugger2 gem start from the beginning (rails) showing **every** line instead of run to defined breakpoint?
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
<fly2web> centrx: what are yo doing?
apeiros has quit [Remote host closed the connection]
<centrx> fly2web, But that other book might be better oriented to learning to program from scratch if you have not done any programming for
<centrx> *before
Koshian is now known as Koshian
apeiros has joined #ruby
<fly2web> i know python and perl
Pumukel has joined #ruby
apeiros has quit [Ping timeout: 264 seconds]
<fly2web> centrx: you have torrent’s that book?
wookiehangover has quit [Ping timeout: 250 seconds]
<shevy> fly2web stop wanting to learn ruby
<shevy> fly2web master python
<shevy> fly2web write everything in it
<fly2web> :(
<shevy> remember
<fly2web> how about this?
<shevy> you wrote that it must be a thin book
<shevy> no, too long
<shevy> we need a smaller book
<shevy> 10 pages
<shevy> fly2web, read this here: http://www.artima.com/intv/rubyP.html
<fly2web> i read thin book like 300~400 page
consti has quit [Quit: sawadee khrap]
<fly2web> thanks
<fly2web> https://rubymonk.com <—— isn’t it good?
Sirupsen has joined #ruby
<shevy> it is awful
<shevy> you won't learn ruby that way
<fly2web> oh
<fly2web> :(
Bira has quit [Remote host closed the connection]
<fly2web> i master python easily. but i don’t know the way of learning python
b00stfr3ak has joined #ruby
shevy has quit [Quit: ""]
shevy has joined #ruby
GriffinHeart has joined #ruby
vt102 has quit [Ping timeout: 245 seconds]
<fly2web> shevy: i must give up ruby?
<shevy> fly2web YES
<shevy> because you want to learn it for the wrong reasons
<fly2web> :(
<fly2web> :(
<shevy> fix your reasons
<fly2web> i will be white hacker
<fly2web> white hacker is good reason.
fmendez has joined #ruby
<shevy> no that is an awful reason
<fly2web> why?
timonv_ has joined #ruby
<fly2web> i will be securiy agency.
GriffinHeart has quit [Ping timeout: 245 seconds]
<shevy> yes that is a problem
<shevy> you hate snowden
yfeldblum has joined #ruby
<fly2web> https://rubymonk.com <— i will study ruby with it.
<fly2web> because i don’t have no money.
mr_foobar_baz has joined #ruby
namxam has joined #ruby
<fly2web> shevy: you are good ruby programmar?
<shevy> fly2web YES
namxam_ has joined #ruby
namxam has quit [Read error: Connection reset by peer]
<fly2web> then why you say that i must stop studying ruby to me?
yfeldblum has quit [Ping timeout: 255 seconds]
Dreamer3 has joined #ruby
<shevy> because you want to learn it for filthy reasons
dingus_khan has joined #ruby
CircleDot has joined #ruby
mehlah has joined #ruby
Bira has joined #ruby
<pontiki> fly2web: you'd be best to stop talking to shevy about learning ruby and go learn ruby :)
<basiclaser> hey guys you know anything about compatibility with bourbon? :(
namxam_ has quit [Ping timeout: 264 seconds]
jshultz has joined #ruby
<basiclaser> I had to install an older version because the newer bourbon didnt work with my sass, and now the older version won't seem to accept neat, bourbon's grid system
<pontiki> compatibility of *what* with bourbon?
CircleDot has quit [Client Quit]
dingus_khan has quit [Ping timeout: 245 seconds]
timonv_ has quit [Ping timeout: 255 seconds]
thumpba has joined #ruby
apeiros has joined #ruby
carraroj has joined #ruby
ohcibi_ is now known as ohcibi
<fly2web> pontiki: give me good free tutorial?
<pontiki> thought you just found one
mr_foobar_baz has quit [Quit: WeeChat 0.4.3]
<pontiki> why am i on the hook for giving you stuff?
oo_ has quit [Remote host closed the connection]
<pontiki> online version of programming ruby, "the pickaxe book": http://ruby-doc.com/docs/ProgrammingRuby/
<pontiki> codeacademy is free
<fly2web> thanks
<pontiki> what's _why's old site?
<fly2web> pontiki: you are good ruby programmar.
<pontiki> adequate
<fly2web> http://ruby-doc.com/docs/ProgrammingRuby/ <— this site is good and newest?
frankle has joined #ruby
fgo has joined #ruby
<fly2web> pontiki:
<pontiki> no, it's old and adequate
<fly2web> old?
<elaptics> pontiki: _why's old site is now someone elses blog
<fly2web> pontiki: i want newest site.
<pontiki> then you pay
thumpba has quit [Read error: Connection reset by peer]
<pontiki> and i think you're just wasting time, fly2web
iamjarvo has joined #ruby
<pontiki> go. learn.
<pontiki> then learn more.
<fly2web> i must but this book? http://pragprog.com/book/ruby4/programming-ruby
<pontiki> as opposed to what?
fgo_ has joined #ruby
fgo has quit [Read error: No route to host]
oo_ has joined #ruby
<pontiki> reading the older version for free?
<fly2web> i must buy this book?
<pontiki> i'm not telling you to
<elaptics> you don't need to buy anything
<fly2web> but i don’t want same work twice.
<pontiki> i'm telling you to read the free online version
fantazo has quit [Ping timeout: 240 seconds]
<pontiki> what??
<shevy> pontiki
<shevy> he is a troll
<pontiki> ah
<pontiki> ignored
consti has joined #ruby
consti has quit [Max SendQ exceeded]
<fly2web> if i have read old one, then i must read new one again.
<shevy> he first asked which book, then we told him some book
<shevy> *books
<shevy> then he said "no, I need book with only 300 pages "
<pontiki> sometimes i forget this is the internet, and not someplace people can be taken at face value
<shevy> he is continually adapting all his use cases
<shevy> hehehehe
<pontiki> welcome to the internet http://www.fenixdev.net/
<shevy> fly2web can't you stick with python?
dvb_ua has joined #ruby
<fly2web> but metasploit is written by ruby.
<shevy> and?
<fly2web> so i must learn ruby.
<shevy> write it in python
<shevy> no please
<shevy> don't punish us
<riddled> hello
<pontiki> it really hurts when someone seems like they want to learn something, i get enthusiastic about new learners. they turn out to be trolls and i just want to say screw this place
dnhwgx has joined #ruby
<riddled> I am a new learner
thumpba_ has joined #ruby
<pontiki> really?
<pontiki> i've just been burned
<riddled> I am looking for advice
<elaptics> riddled: ask away
<shevy> hehehe
fgo_ has quit [Ping timeout: 255 seconds]
<shevy> riddled, we just had to fight against a troll here, fly2web is his nick
<riddled> best book to start with
<pontiki> fuck me
<riddled> i am no troll
<shevy> ohhhh now you ask the same questions that fly2web asked
<shevy> nonono that is too obvious
<riddled> I want to learn
<shevy> lol
<pontiki> riddled: google
<shevy> fly2web can't you get a job?
Petru has joined #ruby
<elaptics> riddled: what's your current level of programming knowledge?
<fly2web> :(
<riddled> i know a little bit of C but nothing too advanced
<riddled> I have been working on Learn Ruby the Hard Way for a few days and was wondering where to go from there
<fly2web> https://rubymonk.com/ pontiki : i will study ruby with that site.
<fly2web> ok
<riddled> and I wanted to introduce myself to the room, maybe was a bad time to do that with the troll and all
<shevy> you two sound 100% the same
<riddled> no not the same
<shevy> yeah precisely the same
<riddled> i have volunteered to help with an open source site that uses ruby and rails to help learn too
<shevy> riddled, go speak to fly2web
<riddled> dont wanna talk to the troll
<fly2web> you too, riddled
<shevy> you mean you dont wanna talk to yourself there
<riddled> I am no troll
<fly2web> me too
<riddled> i am an honest newbie who wants to learn
<shevy> lol
<fly2web> me too
<shevy> that you use the word "honest"
<shevy> is a dead give away
elikem has joined #ruby
<riddled> for real
<shevy> no newbie normally has to confirm his honesty
<Petru> better call the ruby police
<riddled> well most newbies dont start talking when people just dealt with a troll either
<shevy> not true
<shevy> people happily ask away questions here regardless of trolls
dawkirst has quit [Remote host closed the connection]
<apeiros> pontiki: what a sad page :(
cantonic has quit [Read error: Connection reset by peer]
<fly2web> this room is strange a little
noop has quit [Ping timeout: 250 seconds]
cantonic has joined #ruby
<fly2web> python room member help always, but this room isn’t
Kricir has joined #ruby
mehlah has quit [Ping timeout: 240 seconds]
<shevy> fly2web we are smarter and see through your trolling
<riddled> ok nevermind
<apeiros> riddled: ##new2ruby is dedicated to people new to ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<riddled> thank you apeiros
<apeiros> riddled: I didn't read your backlog, but if you've got a question about code, just ask
<riddled> I dont understand objects and methods
SCHAAP137 has quit [Ping timeout: 250 seconds]
<riddled> They dont have them in C
<apeiros> you know what a struct is?
centrx has quit [Quit: Mead error: Connection reset by beer]
<riddled> yes
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lw has joined #ruby
banister has joined #ruby
<apeiros> an object is like a struct. it stores data at places with names. in rubys case, instance variables. additionally to structs, it also stores to which class it belongs.
mgorbach has quit [Quit: ZNC - http://znc.in]
<apeiros> the class stores methods. when you call a method on an object, the method knows on which object it was called. that is, self is the object itself, and all its instance variables are accessible to it.
jmbrown412 has quit [Remote host closed the connection]
<apeiros> there is a bit more to it. but this covers ~80% of the use-cases of objects and methods.
mgorbach has joined #ruby
jmbrown412 has joined #ruby
<apeiros> in other words: an object is data + methods (through its class). and methods are functions which are aware on what object they've been called.
<riddled> Thanks apeiros that is helping a lot
mehlah has joined #ruby
<fly2web> what is comment in ruby?
mr_foobar_baz has joined #ruby
<apeiros> fly2web: #
<fly2web> thanks apeiros
<fly2web> :)
<fly2web> there exist kind ruby programmar.
jmbrown4_ has joined #ruby
Zebroid has joined #ruby
pskosinski has joined #ruby
<riddled> what do you mean fly2web
<riddled> a comment is a line of code that begins with a "#"
<fly2web> you are good ruby programmar.
<fly2web> multi line?
Slavox is now known as Slavox|AFK
oo_ has quit [Remote host closed the connection]
<riddled> I think you can use C comment style too /*.....*/
<Petru> nope
<Mon_Ouie> No you can't
<Mon_Ouie> Just have several lines that begin with #
jmbrown412 has quit [Ping timeout: 260 seconds]
<riddled> oh my mistake
<apeiros> there's =begin/=end, but nobody uses it
<elaptics> unless you like ugly code :)
Fire-Dragon-DoL has joined #ruby
<shevy> haha
<shevy> you guys are funny
<riddled> yeah i can see where =begin/=end would make for some ugly code
<shevy> riddled you could use it!
oo_ has joined #ruby
<riddled> use what
jmbrown4_ has quit [Ping timeout: 272 seconds]
mehlah has quit [Ping timeout: 245 seconds]
<shevy> =begin
<shevy> This is my
<shevy> super long
<shevy> comment
<shevy> =end
skysploit has joined #ruby
<matrixdevuk> that's you make a comment?!
<matrixdevuk> I use #'s
<Mon_Ouie> As mentioned, no one uses that syntax ever, but it is valid
<shevy> oh I don't use =begin
<shevy> apeiros is absolutely right, nobody uses it
<matrixdevuk> That is the ugliest thing in the world
<shevy> it's also kinda unnecessary
<shevy> adding some # goes quickly
<shevy> disable code can often happen via:
<shevy> if false
* apeiros ponders # for comment, #> for start comment and #< for end comment in his language
<Mon_Ouie> Also the =begin and =end have to be at the very beginning of a line, you can't indent them
IceDragon has joined #ruby
<matrixdevuk> o.e
<Petru> yay, more languages :P
<fly2web> "I am a Rubyist".index 'R' <— why nothing happened?
mehlah has joined #ruby
<Mon_Ouie> >> "I am a Rubyist".index 'R'
<Mon_Ouie> Oh
b00stfr3ak has quit [Ping timeout: 245 seconds]
<banister> >> 'alut
<riddled> well it is nice to know more than one way to do something
<apeiros> Mon_Ouie: bot dead again?
Mon_Robot has joined #ruby
<Mon_Ouie> Odd coincidence, he was just reconnecting
<Mon_Ouie> >> "I am a Rubyist".index 'R'
<Mon_Robot> Mon_Ouie: => 7 (https://eval.in/172130)
<apeiros> Mon_Ouie: btw., charliesome talked to/with you?
<Mon_Ouie> Nope, haven't seen him
<fly2web> very strange
thumpba_ has quit [Ping timeout: 260 seconds]
ctp has joined #ruby
<apeiros> ok. he offered to run eval-in on his infrastructure (I think)
<apeiros> I said I don't mind either and he'd best talk to you :)
Zebroid has quit [Remote host closed the connection]
arya_ has joined #ruby
<Mon_Ouie> Well since it's setup here already there's no need to change it
<pontiki> apeiros: sad page = welcome to the internet?
<pontiki> ( i hope not my learning resources page... )
tjr9898 has quit [Remote host closed the connection]
<banister> Mon_Robot hae u got the source for mon_bot anywerhe?
Kricir has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<banister> Mon_Ouie you're breaking all of sandi metz's rules! methods only 5 lines long!!
<banister> Mon_Ouie you need to refactor the whole thing according to the hexagonal pattern, and ensure you delegate, delegate, delegate, and inject all your dependencies!
namxam has joined #ruby
<fly2web> who use eclipse of ruby?
<Mon_Ouie> Sorry, the style used in https://github.com/pry/pry corrupted me :(
<banister> Mon_Ouie heh heh
<banister> Mon_Ouie it was perfect before i start handing out random commit bits :(
<Mon_Ouie> So, almost immediately?
<fly2web> i think eclipse is good for ruby.
davispuh has joined #ruby
<fly2web> i use eclipse instead of vim
<banister> Mon_Ouie pretty much :(
<apeiros> pontiki: yes, that one
yfeldblum has quit [Ping timeout: 240 seconds]
doev has joined #ruby
<fly2web> 'Fear is the path to the dark side' <— how can i use split method?
jottr has quit [Ping timeout: 240 seconds]
mr_rich101 has joined #ruby
<fly2web> 'Fear is the path to the dark side' <— how can i use split method for space?
Lulzon has joined #ruby
emerson__ has joined #ruby
matrixdevuk is now known as teabag
<fly2web> 'Fear is the path to the dark side'.split(' ') <—— is it wrong?
tjr9898 has joined #ruby
emerson__ has quit [Client Quit]
einarj has joined #ruby
emerson_ has joined #ruby
iamjarvo has joined #ruby
<fly2web> no one is here?
dingus_khan has joined #ruby
foobarbaz_ has joined #ruby
<fly2web> shevy:
<fly2web> what are you doing?
hectorrr has joined #ruby
<foobarbaz_> Hi guys, is there a way to convert an array of arguments, and call a block?
<fly2web> yes
einarj has quit [Ping timeout: 264 seconds]
<foobarbaz_> like, yield [1,2,3].as_arguments
fmendez has quit []
<elaptics> foobarbaz_: what do you mean?
Martxel has quit [Read error: Connection reset by peer]
<foobarbaz_> So something like... foo([1, 2, 3]) { |x, y, z| x + y + z }
<foobarbaz_> def foo(array) yield array.as_arguments end
mr_foobar_baz has quit [Quit: WeeChat 0.4.3]
hectorrr has quit [Remote host closed the connection]
<Mon_Ouie> s/.as_arguments// works
<foobarbaz_> o.O
hectorrr has joined #ruby
<foobarbaz_> really?
mehlah has quit [Read error: Connection reset by peer]
<elaptics> try it
<Mon_Ouie> You may want to use a splat but it makes no difference in that particular example
<foobarbaz_> that would be weird behaviour surel?
<foobarbaz_> surely*
emerson_ has quit [Remote host closed the connection]
<foobarbaz_> How would ruby know hwen you want to yield to a single argument, vs all of the arguments?
<Mon_Ouie> It is sort of weird how Ruby deals with this.
dingus_khan has quit [Ping timeout: 240 seconds]
<Mon_Ouie> yield array in your example does something like x, y, z = array
CaptainAnime has joined #ruby
<Mon_Ouie> And when the rhs of "=" is an array it automatically deconstructs it
CaptainAnime has quit [Client Quit]
<foobarbaz_> so it does...
<foobarbaz_> that's... interesting
<Mon_Ouie> You can also try "x, = array and "x = array" for comparison
fgo has joined #ruby
<foobarbaz_> what would happen if you actually just wanted an identity yield?
CaptainJet has joined #ruby
<foobarbaz_> foo([1,2,3]) { |x| puts x }
<foobarbaz_> to get [1,2,3]
fantazo has joined #ruby
<Mon_Ouie> yield *x
<Mon_Ouie> I mean yield *array
b00stfr3ak has joined #ruby
lw has quit [Quit: s]
hectorrr has quit [Ping timeout: 264 seconds]
goshdarnyou has joined #ruby
<foobarbaz_> Are there docs for this behaviour Mon_Ouie ?
<foobarbaz_> Not sure what to google! :P
cantonic has quit [Quit: cantonic]
Rahul_Roy has joined #ruby
cantonic has joined #ruby
phinfonet has joined #ruby
lsmola has quit [Ping timeout: 240 seconds]
<foobarbaz_> hmm
gattuso has joined #ruby
freerobby has quit [Quit: Leaving.]
Kricir has joined #ruby
Lewix has joined #ruby
<fly2web> if i know rubymonk.com then i m skilled ruby programmar?
<shevy> fly2web die
cantonic has quit [Read error: Connection reset by peer]
<fly2web> OMG
<fly2web> why are you give sorrow?
cantonic has joined #ruby
<fly2web> to me?
<fly2web> i m kind.
<shevy> fly2web you are trolling and you know it
<fly2web> no
<shevy> yes
<fly2web> i m studying ruby now.
<fly2web> i m stuying ruby till there.
<foobarbaz_> What's the best way to pass a function without invoking it in ruby?
<foobarbaz_> I understand functions aren't first class citizens...
Kricir has quit [Ping timeout: 260 seconds]
Kricir has joined #ruby
<foobarbaz_> decided to pass a symbol in, then call method(symbol).call
<foobarbaz_> D:
namxam has quit [Remote host closed the connection]
mostlybadfly has quit [Quit: Connection closed for inactivity]
pandaant has joined #ruby
<wasamasa> <fly2web> if i know rubymonk.com then i m skilled ruby programmar?
<wasamasa> rofl
<wasamasa> also, the answer is "No, now get out"
sepp2k has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
<fly2web> :(
<wasamasa> this just has to be an elaborate troll
<fly2web> :(
<wasamasa> inb4 how do I shot web
<fly2web> i m very sorrowful
danijoo has joined #ruby
<wasamasa> close your irc client and learn without any distractions
<wasamasa> if you're actually learning that is
grump has quit [Remote host closed the connection]
razum2um has quit [Quit: Leaving.]
<fly2web> but i want have question to ruby programmar.
IceDragon has quit [Ping timeout: 240 seconds]
IceDragon has joined #ruby
<Mon_Ouie> foobarbaz_: proc { … } are first class citizens (and there's the block as well)
<foobarbaz_> Yeah, really verbose though
<foobarbaz_> symbol turned out really nice
<foobarbaz_> Will post up later, so i can get feedback from anyone that's free to check it out :)
<Mon_Ouie> Also passing a symbol :foo and passing { foo } aren't the same thing, because with a symbol, each object can decide to implement that method differently
Hanmac has left #ruby [#ruby]
tjr9898 has quit [Remote host closed the connection]
<Mon_Ouie> While the behavior of the proc is determined by the context in which it was created
Kricir has quit [Ping timeout: 250 seconds]
<foobarbaz_> :o
GriffinHeart has joined #ruby
<foobarbaz_> The semantic differences shouldn't matter too much in this context, i think
fold has joined #ruby
<foobarbaz_> it's just a basic class atm
seitensei has quit [Read error: Connection reset by peer]
<foobarbaz_> thanks btw :)
helpa has quit [Read error: Connection reset by peer]
CorpusCallosum has quit [Ping timeout: 264 seconds]
seitensei has joined #ruby
mostlybadfly has joined #ruby
thumpba_ has joined #ruby
Bira has quit [Remote host closed the connection]
GriffinHeart has quit [Ping timeout: 255 seconds]
fgo has quit [Remote host closed the connection]
yfeldblum has joined #ruby
hectorrr has joined #ruby
<foobarbaz_> is there a way to get ruby formatting of or blocks to be on two lines?
<foobarbaz_> predicate1
<foobarbaz_> || predicate2
<foobarbaz_> rather than the alternative of predicate1 || (new line) predicate2
<Mon_Ouie> No, new-line are significant in Ruby. You could escape it if you're really intent on having them on the next line.
fly2web has left #ruby [#ruby]
<Mon_Ouie> (foo \(new line)|| bar)
yfeldblum has quit [Ping timeout: 260 seconds]
maroloccio has joined #ruby
virtualize has quit [Ping timeout: 260 seconds]
seph429 has quit [Quit: ZNC - http://znc.in]
Bira has joined #ruby
freerobby has joined #ruby
gophermike has joined #ruby
<gophermike> hi, can anyone tell me how I can switch to another room? I had to register to join python, but now I don't know how to get into that room
carraroj has quit [Ping timeout: 245 seconds]
thumpba_ has quit [Read error: Connection reset by peer]
<Mon_Ouie> Probably /join #python
<basiclaser> mike /j #whateversubjectyou
<basiclaser> want*
Hanmac has joined #ruby
ramfjord has joined #ruby
* Petru wonders how he got here
Shidash has joined #ruby
benzrf|offline is now known as benzrf
<foobarbaz_> Mon_Ouie: cool, didn't know you could do that. thanks :)
SCHAAP137 has joined #ruby
zarul has quit [Ping timeout: 272 seconds]
kirun has quit [Ping timeout: 255 seconds]
havenwood has joined #ruby
Spleeze has quit [Quit: QUIT]
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jay__ has joined #ruby
enebo has joined #ruby
jay__ is now known as rubyonrailed
charliesome has joined #ruby
Hanmac has quit [Quit: Leaving.]
Hanmac has joined #ruby
pothibo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Spleeze has joined #ruby
dingus_khan has joined #ruby
dingus_khan has quit [Read error: Connection reset by peer]
amacou has quit [Remote host closed the connection]
dingus_khan has joined #ruby
amacou has joined #ruby
<jeaye> << __callee__()
<jeaye> >> __callee__()
<Mon_Robot> jeaye: => nil (https://eval.in/172161)
Hanmac has quit [Client Quit]
<jeaye> >> nil
<Mon_Robot> jeaye: => nil (https://eval.in/172162)
Hanmac has joined #ruby
j416_ has joined #ruby
tyfighter has joined #ruby
j416 has quit [Read error: Connection reset by peer]
tyfighter has quit [Client Quit]
amacou has quit [Ping timeout: 256 seconds]
dingus_khan has quit [Ping timeout: 256 seconds]
<foobarbaz_> What'st he deal with require_relative ?
<foobarbaz_> Why's it so brittle, am i supposed to use it?
<foobarbaz_> And can I do require_relative 'models/*' or something
zarul has joined #ruby
banisterfiend has joined #ruby
o0oo0o has quit [Quit: WeeChat 0.4.3]
hectorrr has quit [Read error: Connection timed out]
maroloccio has quit [Quit: WeeChat 0.4.3]
freerobby has quit [Quit: Leaving.]
macclearich has joined #ruby
o0oo0o has joined #ruby
DrCode has quit [Remote host closed the connection]
pskosinski has quit [Remote host closed the connection]
o0oo0o has quit [Client Quit]
freerobby has joined #ruby
freerobby has quit [Client Quit]
DrCode has joined #ruby
sjouke has joined #ruby
<sjouke> in java you can access private methos through reflection, how can you access private methods in ruby?
o0oo0o has joined #ruby
<benzrf> sjouke:
TheAtomicGoose has joined #ruby
<benzrf> >> class Foo; private; def bar; 3; end; end; Foo.new.send :bar
<Mon_Robot> benzrf: => 3 (https://eval.in/172164)
centrx has joined #ruby
<benzrf> sjouke: why do you want to?
<sjouke> i didn't know it was possible until just now
TheAtomicGoose has left #ruby ["WeeChat 0.4.3"]
<sjouke> i'm a young programmer, i've always though private methods were there as a security feature
<sjouke> what's the point of hiding methods if not for security reasons?
<benzrf> ummmmmmmmm
<benzrf> why would it be a security feature
<sjouke> i just figured you could hide implementation details from an attacker or something, how the attacker already has access to calling methods on your project, i do not know
<benzrf> dude
<Mon_Ouie> It's not about "security" (it doesn't stop attackers from finding any flaws in your program), it's about communicating to the programmers who are using your code which methods they should use and which ones are implementation details
foobarbaz_ has quit [Ping timeout: 246 seconds]
<benzrf> if an attacker has access
kmels has joined #ruby
<benzrf> then they can do whatever the hell they want
<benzrf> it doesnt matter if they can call private methods
<Hanmac> in ruby you can do VERYthing!!
<sjouke> Mon_Ouie: I like that explanation
<Hanmac> EVERYTING
<sjouke> i like VERYTHING better :)
enebo has quit [Quit: enebo]
oo_ has quit [Remote host closed the connection]
techsethi has quit [Quit: techsethi]
oo_ has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
bosworth has joined #ruby
mikepack has joined #ruby
Shidash has quit [Quit: Leaving.]
danijoo has joined #ruby
macclearich has quit [Quit: Computer has gone to sleep.]
teabag has quit [Quit: Lingo - http://www.lingoirc.com]
macclearich has joined #ruby
pandaant has quit [Remote host closed the connection]
rubyonrailed has quit []
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ctp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Panicky has joined #ruby
macclearich has quit [Ping timeout: 272 seconds]
iamjarvo has joined #ruby
iamjarvo has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
craigbowen3 has joined #ruby
Zebroid has joined #ruby
swatts has quit [Remote host closed the connection]
Kricir has joined #ruby
_JokerDoom has quit [Quit: Leaving]
jdoles has left #ruby [#ruby]
TrueJet has joined #ruby
CaptainJet has quit [Ping timeout: 245 seconds]
cobakobodob has quit [Ping timeout: 240 seconds]
fgo has joined #ruby
Dreamer3 has quit [Quit: Computer has gone to sleep.]
centrx has quit [Quit: Mead error: Connection reset by beer]
Kricir has quit [Ping timeout: 256 seconds]
binaryhat has quit [Remote host closed the connection]
nonnatus has joined #ruby
binaryhat has joined #ruby
maximski has joined #ruby
<shevy> man
nload has joined #ruby
fgo has quit [Ping timeout: 255 seconds]
nload has left #ruby [#ruby]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cout_ is now known as cout
hectorrr has joined #ruby
kirun has joined #ruby
pskosinski has joined #ruby
ascarter has joined #ruby
ylluminarious has quit [Quit: Leaving...]
thumpba_ has joined #ruby
chipotle has joined #ruby
oo_ has quit [Remote host closed the connection]
Vivekananda_y510 has quit [Read error: Connection reset by peer]
Vivekananda_y510 has joined #ruby
mary5030 has joined #ruby
dbasch has joined #ruby
oo_ has joined #ruby
rubytor has joined #ruby
gophermike has quit [Ping timeout: 246 seconds]
thumpba_ has quit [Ping timeout: 255 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
LadyRainicorn has joined #ruby
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
relix has joined #ruby
oo_ has quit [Ping timeout: 240 seconds]
centrx has joined #ruby
ixti has joined #ruby
<shevy> guys, I have a noob question now
iamjarvo has joined #ruby
<seitensei> Hmm?
<craigbowen3> shevy, whats up?
<shevy> if I were to have a conditional require, inside of a class, where the library might not be installed on a user's computer
<shevy> like this one:
<shevy> this constant would then reside within class Test namespace, as in Test::LIBRARY_IS_AVAILABLE right?
<Mon_Ouie> Yes
thomasfedb has quit [Quit: ZNC - http://znc.sourceforge.net]
<Mon_Ouie> You do realize it sets it to true in both cases, btw? :p
<shevy> I am wondering where to put it... if I put it outside the class, I seem to have a conflict with another constant right now, which has the same name but is defined from another project
<shevy> okies, thanks!
<shevy> that was a slipup :P
einarj has joined #ruby
<basiclaser> hey, are there any drawbacks to building websites with ruby?
<benzrf> basiclaser: yes
<benzrf> basiclaser: depending on what youre comparing it to
<shevy> basiclaser you would be faster if you write it in C probably
<havenwood> basiclaser: deployment is often pointed to as one of the pains, though these days there are more nice options
LadyRainicorn has quit [Read error: Connection reset by peer]
<shevy> I mean, faster at execution time
LadyRainicorn has joined #ruby
LadyRainicorn has quit [Read error: Connection reset by peer]
<benzrf> basiclaser: everything has drawbacks
<havenwood> ^
LadyRainicorn has joined #ruby
<benzrf> your question is too unqualified to get much more specific
mercwithamouth has joined #ruby
hectorrr has quit [Read error: Connection timed out]
timonv_ has joined #ruby
jay__ has joined #ruby
einarj has quit [Ping timeout: 250 seconds]
jay__ is now known as rubyonrailed
JohnFord has joined #ruby
kirun has quit [Quit: Client exiting]
cobakobodob has joined #ruby
except has joined #ruby
baweaver has joined #ruby
timonv_ has quit [Ping timeout: 245 seconds]
poguez_ has quit [Quit: Connection closed for inactivity]
tylerkern has joined #ruby
charliesome has joined #ruby
Zebroid has quit [Remote host closed the connection]
davedev2_ has joined #ruby
LadyRainicorn has quit [Quit: Bye]
mechanicalduck has joined #ruby
<mechanicalduck> hi
<mechanicalduck> gem 'guard-sass', :require => false
<mechanicalduck> Why require => false
<mechanicalduck> What is its purpose
Hanmac has quit [Ping timeout: 260 seconds]
hectorrr has joined #ruby
<shevy> if I have a large project, is there a way to profile it easily? something is semi-hanging ...
fgo has joined #ruby
davedev24_ has quit [Ping timeout: 245 seconds]
root3d has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Hanmac has joined #ruby
lkb has quit [Quit: Wychodzi]
fgo has quit [Ping timeout: 240 seconds]
baweaver has quit [Ping timeout: 240 seconds]
CorySimmons has joined #ruby
t0rc has joined #ruby
bosworth has quit []
claymore has joined #ruby
bosworth has joined #ruby
davedev2_ has quit []
theo has joined #ruby
chamblin has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davedev24_ has joined #ruby
jimms has joined #ruby
rubytor has quit [Quit: No Ping reply in 180 seconds.]
<havenwood> shevy: ruby -rprofile
rubytor has joined #ruby
noop has joined #ruby
<shevy> ok
<havenwood> mechanicalduck: i'd suspect `Bundler.require` is being used in the app, and that gem isn't used by the app
jottr has joined #ruby
iamjarvo has joined #ruby
jrhe has quit [Quit: Connection closed for inactivity]
lkba has quit [Ping timeout: 260 seconds]
<shevy> hmm
<shevy> oh wow
<shevy> I just hit control interrupt
<shevy> I'm gonna paste 4 lines
<shevy> no, 5
<shevy> time seconds seconds calls ms/call ms/call name
<shevy> 24.23 33.76 33.76 1878702 0.02 0.06 Gem::Dependency#matching_specs
<shevy> 19.20 60.51 26.75 848754 0.03 1.08 Array#each
<shevy> 16.39 83.34 22.83 1321178 0.02 0.04 Gem::Specification#runtime_dependencies
<shevy> 10.28 97.66 14.32 1307558 0.01 0.10 Gem::Specification#conflicts
<shevy> hmm still too much I guess :\
GriffinHeart has joined #ruby
Kricir has joined #ruby
<shevy> why are there so many calls to Gem?
sjouke has quit [Quit: leaving]
<shevy> 1345.00 Kernel#gem_original_require
<shevy> 5412.40 Array#reverse_each
<shevy> what the...
<shevy> I don't even think I ever used #reverse_each in my code
<shevy> why is that showing up
mary5030 has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mary5030 has joined #ruby
ndrei has joined #ruby
mgberlin has joined #ruby
mary5030 has quit [Remote host closed the connection]
yfeldblum has joined #ruby
GriffinHeart has quit [Ping timeout: 255 seconds]
xmad has joined #ruby
Kricir has quit [Ping timeout: 256 seconds]
rubytor has quit [Quit: No Ping reply in 180 seconds.]
oo_ has joined #ruby
yfeldblum has quit [Ping timeout: 255 seconds]
mgberlin has quit [Remote host closed the connection]
fold has quit [Quit: WeeChat 0.4.3]
tjr9898 has joined #ruby
maximski has quit [Read error: Connection reset by peer]
techsethi has joined #ruby
b00stfr3ak has quit [Ping timeout: 260 seconds]
oo_ has quit [Ping timeout: 240 seconds]
except has quit [Quit: derpity derp]
jwang has quit [Quit: Leaving]
banisterfiend has quit [Ping timeout: 240 seconds]
tectonic has joined #ruby
dingus_khan has joined #ruby
Zebroid has joined #ruby
hashsmokermike has joined #ruby
try has joined #ruby
elikem has quit [Quit: Textual IRC Client: www.textualapp.com]
banisterfiend has joined #ruby
dbasch has quit [Quit: dbasch]
Zebroid has quit [Ping timeout: 240 seconds]
techsethi has quit [Quit: techsethi]
Lucky_Red has quit [Ping timeout: 255 seconds]
arup_r has joined #ruby
Rafalski has joined #ruby
rebelshrug has joined #ruby
<Rafalski> What/where is the best way to store API keys in a rails app?
<apeiros> I'd ask in #rubyonrails
spastorino has quit [Quit: Connection closed for inactivity]
<apeiros> ENV probably
<theo> Rafalski: Env vars
nanoyak has joined #ruby
maximski has joined #ruby
maximski has quit [Max SendQ exceeded]
<Rafalski> thx guys
Rafalski has left #ruby [#ruby]
<theo> depending on what server you use, you might be able to add to the config file
chrishough has quit [Quit: chrishough]
maximski has joined #ruby
<havenwood> Rafal, oh was going to say config/secrets.yml
Bira has quit [Remote host closed the connection]
b00stfr3ak has joined #ruby
zkay11 has joined #ruby
<theo> or that.. but i wouldn't be surprised if (specially if you work on a team) someone committed the file to vcs sooner or later
xmad has quit [Ping timeout: 272 seconds]
Starless has joined #ruby
Atrumx has quit [Quit: exit]
sam113101 has quit [Ping timeout: 260 seconds]
Aryasam has joined #ruby
Slavox|AFK is now known as Slavox
cashnguns has joined #ruby
krainboltgreene has joined #ruby
tylerkern has quit [Quit: Textual IRC Client: www.textualapp.com]
chrishough has joined #ruby
CorySimmons has quit [Quit: Bye!]
havenwood has quit []
havenwood has joined #ruby
danijoo_ has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
<apeiros> krainboltgreene: the newline
<apeiros> echo -n
<krainboltgreene> Hmm.
<apeiros> or append it in the ruby version
mercwithamouth has quit [Ping timeout: 240 seconds]
xmad has joined #ruby
<krainboltgreene> I wonder if Heroku got their documentation wrong then.
<krainboltgreene> Or if they want the newline?
Dreamer3 has joined #ruby
<havenwood> >> require 'base64'; Base64.encode64 ":e0373389-154c-49ce-b38e-664793520400\n"
<Mon_Robot> havenwood: => "OmUwMzczMzg5LTE1NGMtNDljZS1iMzhlLTY2NDc5MzUyMDQwMAo=\n" (https://eval.in/172215)
<apeiros> krainboltgreene: since I don't read herokus docs, I can't tell :)
Channel6 has joined #ruby
oo_ has joined #ruby
jonr22 has joined #ruby
<krainboltgreene> I'm assuming since their example worked and it's the same as havenwood's with the new line...I'm assuming it's what they want.
<krainboltgreene> Ho hum.
Pharaoh2 has quit [Remote host closed the connection]
tectonic has quit []
hsps_ has quit [Ping timeout: 245 seconds]
arya_ has quit [Ping timeout: 260 seconds]
oo_ has quit [Ping timeout: 255 seconds]
ramfjord has quit [Ping timeout: 245 seconds]
hectorrr has quit [Read error: Connection timed out]
theo has quit []
fgo has joined #ruby
rylev has joined #ruby
banisterfiend has quit [Quit: Computer has gone to sleep.]
b00stfr3ak has quit [Ping timeout: 240 seconds]
popo has joined #ruby
tectonic has joined #ruby
<popo> hi, i want to install forem (https://github.com/radar/forem/), but the instlaation instructions are not clear enough for someone new to rails like me, any help?
<popo> or is there a rails channel i should ask in?
<havenwood> popo: the rails channel is #rubyonrails
<popo> thanks
<havenwood> popo: nick reg required
<popo> ok
tjr9898 has quit [Remote host closed the connection]
fgo has quit [Ping timeout: 256 seconds]
JohnFord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fold has joined #ruby
rylev has quit [Remote host closed the connection]
banisterfiend has joined #ruby
phutchins has quit [Ping timeout: 264 seconds]
rylev has joined #ruby
sam113101 has joined #ruby
jimms has quit [Remote host closed the connection]
Gadgetoid has quit [Ping timeout: 250 seconds]
bosworth has quit [Ping timeout: 240 seconds]
Kricir has joined #ruby
wallerdev has joined #ruby
TrueJet has quit [Ping timeout: 260 seconds]
nateberkopec has joined #ruby
jonr22 has quit [Quit: leaving]
<mechanicalduck> hi
<mechanicalduck> So some ruby gems have to be compiled during gem install.
<mechanicalduck> Can I do this compiling on a build server and deploy the compiled artifacts?
<mechanicalduck> Or would this be too complicated?
rylev has quit [Remote host closed the connection]
jonr22 has joined #ruby
hectorrr_ has joined #ruby
rylev has joined #ruby
<AntelopeSalad> mechanicalduck, i asked that same question earlier and never got a reply
riddled has quit [Quit: Leaving]
xiq has joined #ruby
andrewjanssen has joined #ruby
<AntelopeSalad> i'm not sure if the necessary compiled files end up vendor/bundle
<AntelopeSalad> *in
Gadgetoid has joined #ruby
chipotle has quit [Quit: cya]
oo_ has joined #ruby
jonr22 has quit [Client Quit]
CaptainJet has joined #ruby
lsmola has joined #ruby
jonr22 has joined #ruby
Kricir has quit [Ping timeout: 264 seconds]
tectonic has quit []
Pharaoh2 has joined #ruby
fwaokda has quit [Ping timeout: 272 seconds]
rylev has quit [Ping timeout: 240 seconds]
<apeiros> mechanicalduck: it's possible. I've never done it, though
<Hanmac> AntelopeSalad & mechanicalduck only if the build server and the client are 10000% identical in the software ... specially if the gem bould bind against an external lib
hashsmokermike has quit [Ping timeout: 246 seconds]
<apeiros> Hanmac: well, you can cross-compile
chipotle has joined #ruby
<apeiros> Hanmac: and there are even precompiled gems for different platforms. rare, though.
Lewix has quit [Remote host closed the connection]
<AntelopeSalad> so everything that's necessary for it to work would end up in vendor/bundle if you bundle instal --deployment ?
arup_r has quit [Ping timeout: 264 seconds]
arup_r1 has joined #ruby
<Hanmac> yes thats possible but then you might hit the spot that some libs have a different version .. or a different compiler and everything does not work ...
centrx has quit [Quit: Mead error: Connection reset by beer]
kotk_ has joined #ruby
oo_ has quit [Ping timeout: 250 seconds]
<AntelopeSalad> how about for example
<AntelopeSalad> if you were using the pg gem, would the build server need libpg-dev?
Photism has joined #ruby
kotk has quit [Ping timeout: 255 seconds]
Zebroid has joined #ruby
Pharaoh2 has quit [Ping timeout: 260 seconds]
jottr has quit [Ping timeout: 260 seconds]
lkba has joined #ruby
<shevy> if you must compile it there, then yes
tjr9898 has joined #ruby
hjlsteffens has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dbasch has joined #ruby
lsmola has quit [Ping timeout: 250 seconds]
Zebroid has quit [Ping timeout: 272 seconds]
fwaokda has joined #ruby
cashnguns has quit [Ping timeout: 240 seconds]
Advocation has joined #ruby
dnhwgx has quit [Remote host closed the connection]
pskosinski has quit [Quit: Til rivido Idisti! | http://www.ido.li]
cashnguns has joined #ruby
hjlsteffens has quit [Quit: Dump Chat IRC - http://dumpchat.com]
relix has joined #ruby
sam113101 has quit [Quit: WeeChat 0.4.3]
lkb has joined #ruby
mozzarella has joined #ruby
cantonic has quit [Read error: Connection reset by peer]
cantonic has joined #ruby
CorpusCallosum has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
gerep has joined #ruby
s2013 has joined #ruby
<gerep> The minitest gem is the one responsible for unit tests?
fwaokda has quit [Ping timeout: 264 seconds]
maddog31643 has joined #ruby
<maddog31643> hello
jimms has joined #ruby
<gerep> hello
rubyonrailed has quit []
<mechanicalduck> Do you want to hear something funny?
<mechanicalduck> About 2 years I tried to get Zend Framework 2 (PHP) to bend to my mind.
<mechanicalduck> And then I see that it is much easier with ruby or node.
andrewjanssen has quit [Quit: Leaving...]
<gerep> mechanicalduck, no surprise in those words hahaha
gerep has quit [Quit: Leaving]
andrewjanssen has joined #ruby
kireevco has joined #ruby
<mechanicalduck> gerep: And that framework is so freakin slow, I had to 'minify' the php files, and every time some new feature was used.
<mechanicalduck> gerep: Oh and not all files adhered to the ZF2 (irony) standard, so I wasn't able to bundle them all.
xmad has quit [Ping timeout: 240 seconds]
tectonic has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ctp has joined #ruby
havenwood has quit [Remote host closed the connection]
MatthewsFace has joined #ruby
zerosNones has joined #ruby
gerep has joined #ruby
<gerep> Is there a way to color my unit tests without using extra gems?!
gerep has quit [Client Quit]
cantonic has quit [Read error: Connection reset by peer]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cantonic has joined #ruby
armyriad has quit [Ping timeout: 255 seconds]
jonr22 has quit [Quit: leaving]
jonr22 has joined #ruby
fantazo has quit [Ping timeout: 255 seconds]
carraroj has joined #ruby
jonr22 has quit [Client Quit]
jonr22 has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
mikecmpbll has joined #ruby
CorpusCallosum has quit [Ping timeout: 255 seconds]
jonr22 has quit [Client Quit]
Petru has quit [Ping timeout: 240 seconds]
s2013 has quit [Ping timeout: 256 seconds]
fgo has joined #ruby
jonr22 has joined #ruby
jonr22 has quit [Client Quit]
pandaant has joined #ruby
kireevco has quit [Quit: Leaving.]
GriffinHeart has joined #ruby
tjr9898 has quit [Remote host closed the connection]
fgo has quit [Ping timeout: 256 seconds]
tjr9898 has joined #ruby
ctp has quit [Quit: Textual IRC Client: www.textualapp.com]
xmad has joined #ruby
ctp has joined #ruby
dscrd has joined #ruby
mostlybadfly has joined #ruby
yfeldblum has joined #ruby
GriffinHeart has quit [Ping timeout: 255 seconds]
amargherio has joined #ruby
pzula has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GlenK has joined #ruby
tjr9898 has quit [Ping timeout: 256 seconds]
hectorrr_ has quit []
t0rc has quit [Quit: WeeChat 0.4.3]
arup_r1 has quit [Ping timeout: 264 seconds]
yfeldblum has quit [Ping timeout: 255 seconds]
SergioAtHome has quit [Ping timeout: 240 seconds]
jottr has joined #ruby
popo has quit [Ping timeout: 260 seconds]
CorpusCallosum has joined #ruby
kotk has joined #ruby
s2013 has joined #ruby
zkay11 has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
kireevco has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
kotk_ has quit [Ping timeout: 272 seconds]
pzula has quit [Ping timeout: 240 seconds]
Kricir has joined #ruby
dscrd has quit []
nonnatus has quit [Read error: Connection reset by peer]
nonnatus has joined #ruby
nobodyzzz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
havenwood has joined #ruby
haroldwu has quit [Ping timeout: 245 seconds]
oo_ has joined #ruby
gophermike has joined #ruby
root3d has quit [Ping timeout: 264 seconds]
Pharaoh2 has joined #ruby
Kricir has quit [Ping timeout: 240 seconds]
SergioAtHome has joined #ruby
Sirupsen has joined #ruby
oo_ has quit [Ping timeout: 240 seconds]
Dreamer3 has quit [Quit: Computer has gone to sleep.]
jonr22 has joined #ruby
havenwood has quit [Ping timeout: 264 seconds]
Pharaoh2 has quit [Ping timeout: 250 seconds]
maddog31643 has quit [Ping timeout: 240 seconds]
Zebroid has joined #ruby
MatthewsFace has quit [Quit: This computer has gone to sleep]
timonv_ has joined #ruby
havenwood has joined #ruby
hjlsteffens has joined #ruby
phutchins has joined #ruby
melik_ has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
zkay11 has joined #ruby
haroldwu has joined #ruby
Zebroid has quit [Ping timeout: 245 seconds]
hjlsteffens has quit [Client Quit]
basiclaser has quit [Excess Flood]
skysploit has quit [Remote host closed the connection]
mehlah has joined #ruby
skysploit has joined #ruby
skysploit has joined #ruby
skysploit has quit [Changing host]
ctp has quit [Quit: Textual IRC Client: www.textualapp.com]
jottr has quit [Ping timeout: 250 seconds]
fantazo has joined #ruby
memph1s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kireevco has quit [Quit: Leaving.]
havenwood has quit [Remote host closed the connection]
phutchins has quit [Ping timeout: 240 seconds]
basiclaser has joined #ruby
tylersmith has joined #ruby
baroquebobcat_ has joined #ruby
skysploit has quit [Ping timeout: 272 seconds]
JStoker has quit [K-Lined]
_whitelogger has quit [K-Lined]
_whitelogger has joined #ruby
reprazent has joined #ruby
drPoggs has joined #ruby
leslie has joined #ruby
elektronaut has joined #ruby
canton7 has joined #ruby
Umang__ has joined #ruby
fly2web has joined #ruby
Umang has quit [Ping timeout: 256 seconds]
tylersmith has quit [Remote host closed the connection]
m8 has quit [Ping timeout: 245 seconds]
m8 has joined #ruby
lolmaus has joined #ruby
andrewjanssen has quit [Quit: Leaving...]
xiq has quit [Read error: Connection reset by peer]
<lolmaus> I would like to create an utility that should display certain information in the console. Not simply appending lines, but rather drawing a table with data and updating individual values in that table. Is there a gem for that?
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
m8 has quit [Max SendQ exceeded]
Dreamer3 has joined #ruby
einarj has joined #ruby
<lolmaus> Similar to how `top` Unix utility works.
m8 has joined #ruby
yfeldblum has joined #ruby
<tectonic> you'll need to use VT100 or VT220 terminal emulation
<tectonic> there's probably a gem that makes that easy
tenseiten has joined #ruby
dvb_ua has quit [Ping timeout: 240 seconds]
seitensei has quit [Ping timeout: 240 seconds]
<pipework> lolmaus: You actually need to use ncurses.
m8 has quit [Max SendQ exceeded]
einarj has quit [Ping timeout: 245 seconds]
m8 has joined #ruby
phutchins has joined #ruby
Takle has joined #ruby
Umang__ has quit [Ping timeout: 264 seconds]
fwaokda has joined #ruby
kirillov has joined #ruby
<shevy> damn it
<shevy> he did it
<shevy> he did suggest to use ncurses
tenseiten has quit [Remote host closed the connection]
<shevy> did you forget about the documentation to ncurses pipework
<pipework> shevy: There is no such thing.
<shevy> indeed
mehlah has quit [Ping timeout: 244 seconds]
<shevy> I can't find a link to the ncurses API docu there hmm
xmad has quit [Ping timeout: 250 seconds]
<mozzarella> speaking of ncurses
<lolmaus> pipework: i don't need pseudographical interface. Just raw text that outputs data without any interaction with user. It's just that appending data doesn't suit me, i need to display the data in a `top` manner.
seitensei has joined #ruby
<mozzarella> does anyone have a tutorial on using ncurses with ruby?
<Hanmac> banisterfiend: you are still the pry developer ne? found this: http://rubygems.org/gems/pry-full but cant install it because "debugger" does not like my ruby version ;P
<mozzarella> I can find tutorials for C, but…
<mozzarella> the API is not exactly the same
<shevy> mozzarella it is awful
<pipework> lolmaus: You could make it with some pretty lame clearing of the screen and redrawing the whole page, but you still need to either have a defined size or dynamically get it from somewhere for the size of the terminal.
<mozzarella> shevy: what is?
<pipework> But you can't just redraw lines in a terminal arbitrarily. You can redraw the current line with readline, but a one-line table seems... pointless?
Martxel has joined #ruby
dscrd has joined #ruby
fgo has joined #ruby
Hobogrammer has joined #ruby
<mozzarella> lolmaus: what does your app do?
<pipework> mozzarella: Not much yet
<shevy> mozzarella the ncurses docu
tyfighter has joined #ruby
<shevy> Ncurses.endwin
<shevy> Ncurses.noecho
<pontiki> err, um, err
<shevy> when Ncurses::KEY_UP
<shevy> Ncurses::Form.form_driver()
<shevy> look at that mozzarella
mehlah has joined #ruby
<shevy> you may want to stab your eyes out after using ncurses
<pontiki> top uses *curses
kirillov has quit [Quit: Leaving]
<apeiros> lolmaus: if you don't want to use ncurses, you can use ansi escape sequences
<mozzarella> shevy: why? is it that bad?
<apeiros> you can do about everything necessary with it. hide the cursor & position the cursor would probably be the most important
<mozzarella> apeiros: but it's not portable
<lolmaus> mozzarella: i would like to create a ping utility that displays a line of statistical information and a list of pending pings. Once a ping is complete or timed out, it should disappear from the list.
<shevy> do you find it beautiful mozzarella?
<apeiros> mozzarella: I don't think ncurses is more portable
<apeiros> actually probably even less.
<apeiros> ansi escape sequences work on most terminals
cashnguns has quit [Ping timeout: 245 seconds]
<lolmaus> The reason to do such a tool is that i'm using a wireless broadband connection that has unstable latency: from 20ms to 15s to downtime. When i use the normal ping tool and it outputs no data, i can't tell whether it's downtime or just a very long latency.
fgo has quit [Ping timeout: 255 seconds]
<pontiki> you can always set a time limit on the ping command
claymore has quit [Quit: Leaving]
j_mcnally_ has joined #ruby
<mozzarella> lolmaus: maybe you could have a client-server architecture, have the client talk to the server, print whatever the server sends, and you could run the client with "watch"
<lolmaus> mozzarella: ain't that an unnecessary complication?
<mozzarella> it is
<lolmaus> Actually, the clear screen idea looks like an obvious answer that i was missing.
baroquebobcat_ has quit [Quit: baroquebobcat_]
phutchins has quit [Ping timeout: 245 seconds]
<fly2web> there is no append method? just << and push?
<apeiros> clear screen and redraw? depending on how you clear the screen, that'll give a nice history :)
havenwood has joined #ruby
<apeiros> don't forget to trap SIGWINCH (change of window size)
<apeiros> unless you use (n)curses. that does that for you I think
a46_ is now known as a46
iamjarvo has joined #ruby
mehlah has quit [Ping timeout: 260 seconds]
noop has quit [Ping timeout: 264 seconds]
Rahul_Roy has quit [Quit: Connection closed for inactivity]
thams has quit [Quit: thams]
noop has joined #ruby
St_Marx has joined #ruby
jimms_ has joined #ruby
doev has quit [Ping timeout: 264 seconds]
jimms has quit [Ping timeout: 245 seconds]
<toretore> anyone else having problems connecting to https://github.com ?
thams has joined #ruby
mr-foobar has quit [Quit: Leaving...]
gondalier has joined #ruby
<mozzarella> the obvious problem with the clear screen solution is the scrolling…
andrewjanssen has joined #ruby
andrewjanssen has quit [Client Quit]
andrewjanssen has joined #ruby
tjr9898 has joined #ruby
tjr9898 has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 264 seconds]
tjr9898 has joined #ruby
`mrspock has joined #ruby
<toretore> bummer
gondalier has quit [Client Quit]
Kricir has joined #ruby
jackneill has quit [Remote host closed the connection]
tjr9898 has quit [Ping timeout: 260 seconds]
oo_ has joined #ruby
Wolland has joined #ruby
einarj has joined #ruby
Pharaoh2 has joined #ruby
<mozzarella> shevy: what's in the standard library, curses or ncurses?
<shevy> mozzarella all has been removed
end_guy has quit [Ping timeout: 264 seconds]
jimms_ has quit [Remote host closed the connection]
oo_ has quit [Ping timeout: 264 seconds]
Kricir has quit [Ping timeout: 240 seconds]
end_guy has joined #ruby
<mozzarella> shevy: wat
Pharaoh2 has quit [Ping timeout: 260 seconds]
<shevy> yeah
Zebroid has joined #ruby
Ilyas has joined #ruby
qw3rtman has joined #ruby
Doppp has quit [Quit: leaving]
Atttwww has joined #ruby
dseitz has joined #ruby
Doppp has joined #ruby
melik_ has quit [Quit: Computer has gone to sleep.]
havenwood has joined #ruby
melik_ has joined #ruby
nectarys has joined #ruby
Zebroid has quit [Ping timeout: 260 seconds]
chrishough has quit [Quit: chrishough]
melik_ has quit [Ping timeout: 255 seconds]
a46 has left #ruby [#ruby]
<lolmaus> I'm kinda used to the asynchronous coding style of JS. But when i try thinking in Ruby, i can only come up with synchronous code. I tried googling this but all results involve either threads or starting a server with an IP and port. Am i missing something obvious?
<pipework> lolmaus: Probably how nodejs implements their asynchronous architecture.
<lolmaus> pipework: wut?
<lolmaus> I'm asking about Ruby, not Node.
<havenwood> lolmaus: forking, threading, evented, actor model, you name it
<pipework> lolmaus: I'm telling you that if you don't know why you're writing synchronous code in ruby, you probably don't understand node's async architecture.
rkj has joined #ruby
<havenwood> lolmaus: Check out Celluloid: http://celluloid.io
<lolmaus> pipework: i indeed don't understand Node async architecture. But i can write JS code with events and callbacks that runs in browsers.
<lolmaus> And AFAIK browsers JS implementation is single-threaded.
<havenwood> lolmaus: If you want to play with various concurrency primatives the concurrent gem has a bunch of nice implementations: https://github.com/ruby-concurrency/concurrent-ruby#readme
elaptics is now known as elaptics`away
<lolmaus> What i'm asking about is whether i can do something like `$(document).ready( callback );` in Ruby without having the trouble of learning threads or starting servers.
<havenwood> lolmaus: EventMachine is still pretty popular for the evented model, but Celluloid has nice options using nio4r.
andrewlio has quit [Remote host closed the connection]
<pipework> lolmaus: You can pass around callbacks in ruby just fine, but that doesn't make it async.
tylersmith has joined #ruby
<lolmaus> pipework: so what's the simplest way of going async with Ruby, without multithreading or starting servers?
<lolmaus> Reading about `concurrent-ruby` now.
<pipework> lolmaus: Probably using eventmachine.
<pipework> I don't know a lot about concurrent-ruby
Bumptious has joined #ruby
<pipework> lolmaus: Personally, I prefer jruby and using the JVM.
<lolmaus> pipework: event machine requires me to start a server with an IP and port.
<havenwood> lolmaus: Celluloid and Celluloid::IO are quite nice.
noop has quit [Ping timeout: 240 seconds]
OffTheRails has joined #ruby
Advocation has quit [Quit: Advocation]
chrishough has joined #ruby
<pipework> lolmaus: Mmm, if you require to not start a server, even if you bind to localhost only, then I'd say celluloid like havenwood suggested. But again, I haven't used concurrent-ruby, and I prefer jruby.
<apeiros> 23:26 pipework: lolmaus: You can pass around callbacks in ruby just fine, but that doesn't make it async.
<apeiros> that's how JS does it, though. lolmaus is correct. JS in browsers is single threaded.
<apeiros> you don't need concurrency for async
<apeiros> /2c
<pipework> apeiros: I know how browsers typically are single-threaded, but he was asking about async and then talking about callbacks.
<pipework> You don't need any library for callbacks in ruby.
tylersmith has quit [Ping timeout: 255 seconds]
<lolmaus> So what's the simplest way to code in this `$(document).ready( callback );` async manner with Ruby?
ra4king has quit [Remote host closed the connection]
<apeiros> correct. neither for async. but the core libs don't provide a convenient async interface.
<pipework> lolmaus: document_object.ready(some_proc)
ra4king has joined #ruby
<apeiros> obj.ready do … end
<apeiros> store the block in obj. invoke it when ready state is reached
<apeiros> see irc bots like cinch. they do stuff line bot.on message do …
namxam has joined #ruby
Aryasam has quit [Read error: No route to host]
<pipework> lolmaus: It's just an argument to a method. You could pass a block, or something like a proc.
Duckily has joined #ruby
<pipework> A block, proc, lambda, or a method object, perhaps.
<fly2web> [1,3,5,4,6,7] <—— how can i delete 5?
<apeiros> or method instances. or symbols.
<apeiros> fly2web: see Array#delete and #delete_at
<pipework> fly2web: documentation.
GriffinHeart has joined #ruby
<apeiros> fly2web: also see Array#reject
namxam has quit [Read error: Connection reset by peer]
namxam has joined #ruby
<fly2web> [1,3,5,4,6,7].delete(5)
<fly2web> right?
<apeiros> fire up pry or irb and try
xiq has joined #ruby
<wasamasa> >> [1,3,4,5,6,7].delete(5)
<Mon_Robot> wasamasa: => 5 (https://eval.in/172232)
<lolmaus> pipework: apeiros: but wouldn't this pause execution of the script until the proc is complete? E. g. in `my_object.work { sleep 10; puts 'bar' }; puts 'foo'` i want 'foo' to be printed before 'bar'.
asmodlol has quit [Quit: Leaving]
<apeiros> lolmaus: no
<apeiros> lolmaus: I said "store it", not "run it right away"
Ilyas has quit [Quit: Leaving]
<pipework> lolmaus: Only when it's called/ran
jshultz has quit [Quit: Connection closed for inactivity]
<fly2web> array = [1, 2, 3, 4, 5]
<fly2web> for i in array
<apeiros> you can choose to execute a block at whatever time you want
<fly2web> puts i
<fly2web> end
<fly2web> == puts array
<pipework> fly2web: no.
St_Marx has quit [Remote host closed the connection]
<fly2web> no?
<havenwood> fly2web: that's a negative, alpha niner
<apeiros> fly2web: use gist.github.com for > 3 lines of code
<pipework> Don't paste to the channel. Go read Array's documentation.
<havenwood> fly2web: #puts already iterates and prints each line
<havenwood> fly2web: puts [1, 2, 3]
<havenwood> fly2web: try it
<havenwood> fly2web: never use `for`, iterate
<Mon_Ouie> I think he was asking if the two were the same
<havenwood> oh
<havenwood> oops
<fly2web> Mon_Ouie: yes
<fly2web> two is same?
postmodern has joined #ruby
GriffinHeart has quit [Ping timeout: 260 seconds]
<Mon_Ouie> Yes, that's how puts handles arrays
<lolmaus> apeiros: pipework: i don't understand how to write the `work` method so that it branches off asynchrounously. In JS, it's intuitive for me, but with Ruby i seem to be missing something.
tyfighter has quit [Quit: tyfighter]
<pipework> lolmaus: It's not async, it's handling a callback.
<pipework> There's a very large difference.
<havenwood> lolmaus: what are you actually trying to do.
Pumukel has quit [Quit: ChatZilla 0.9.90.1 [Firefox 31.0/20140716183446]]
xmad has joined #ruby
gondalier has joined #ruby
<apeiros> pipework: def work(&stuff); @work = stuff; end
gondalier has quit [Client Quit]
<apeiros> do @work.call whenever work should be done
<pipework> apeiros: Thanks, I had absolutely no clue how to do that.
<apeiros> in js too, when the callback is executed, it will block the rest of the script (at least in the browser, but as far as I understood it, it's the same in node too)
fgo has joined #ruby
<lolmaus> havenwood: i have a `work` method that takes a long time to finish and accepts a callback that is expecuted once the method is complete. I want to run this method multiple times so that instances of that method work in parrallel (asynchonously? concurrently? i'm not familiar with terminology) and without blocking main script execution.
<apeiros> fly2web: yes, they'll generate the same output
<fly2web> thanks apeiros
<fly2web> i will give up ruby. there is no proper free book
<pipework> lolmaus: Then you need concurrency and callbacks.
<shevy> fly2web GOOD
<havenwood> fly2web: there are many proper free books ;)
maximski has quit [Ping timeout: 272 seconds]
<fly2web> https://rubymonk.com is strange
<pipework> lolmaus: But a lot of us just use more than one process to do work that should be backgrounded.
<fly2web> havenwood: introduce good one
<Wolland> fly is back eh
xiq has quit [Read error: Connection reset by peer]
<shevy> sadly yes
<shevy> he will never abandon us now
<miah> dude, thepiratebay.se, its not hard
<havenwood> fly2web: If you're not familiar with programming, Learn to Program by Chris Pine.
<miah> just download all the books if you find it too difficult
<lolmaus> pipework: so is there a way to do it in Ruby as simple as it's done with JS, i. e. without involving complicated libraries like Celluloid or EventMachine? They look like it will take me weeks to learn them.
<shevy> he will find it too difficult
<Wolland> or pay for a "proper" book like a normal person
<miah> right
<shevy> you will trigger this reply
<miah> i mean, thats clearly the best option
<shevy> "I am poor"
<pipework> lolmaus: In ruby? Not particularly.
<fly2web> havenwood: i m good at programming. i know c, c++, java and python , and perl.
<pipework> I mean, you could use Thread, but there's the GVL.
<miah> but if you are too poor, torrent all the things
<Wolland> i wonder how all these people learned ruby without "proper" resources
xiq has joined #ruby
<shevy> not this again ... we have been through this before fly2web ...
<miah> lets all just /ignore
<apeiros> lolmaus: Thread.new do …do your work… end
<apeiros> does not block the rest of the script
<lolmaus> pipework: using threads would require me to take care of synchronizing them, which is a difficult thing to do.
<miah> i am juggling ruby projects
fgo has quit [Ping timeout: 240 seconds]
<miah> trying to clean up some internals codes
<pipework> lolmaus: Egh, not particularly.
<Wolland> fly2web: do you have a trolling schedule of some sort? Like Ruby at 2-3pm, 3:30-4pm C++, etc
<lolmaus> pipework: race condition or something.
<apeiros> lolmaus: as far as I can see, node does not have threads
maximski has joined #ruby
<apeiros> lolmaus: a node process blocks once you do stuff. whether asynchronously or not
<pipework> apeiros: but he has some large units of work to complete.
<fly2web> no Wolland i m good person
maximski has quit [Max SendQ exceeded]
<pipework> He wants to process that unit of work multiple times concurrently.
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<fly2web> i just find good one, but now i study it in the rubymonk site
<apeiros> lolmaus: node does not magically make synchronization issues go away
<Wolland> good people don't schedule I guess
maximski has joined #ruby
<apeiros> you either have no threads and don't need to sync, or you have threads and need to sync
<miah> node doesn't have threads natively
<pipework> That's the third person to mention that.
<shevy> node doesn't have threads natively
<apeiros> (of course, unless you don't have state to actually synchronize, that is)
<miah> well, some people said they "dont think"
<pipework> That's the third person and a shevy to say that.
<miah> i just looked, and can say conclusively
wald0 has joined #ruby
<apeiros> miah: thanks for clarifying
<pipework> miah: Not without linking proofs.
<shevy> pics!!!
<pipework> not sure that's proofs.
<pipework> [[citation needed]]
<apeiros> pipework: stop trolling or provide proof node *has* threads.
<lolmaus> apeiros: i don't need threads. I don't need the instances of my method to run on different CPU cores. I just want to pass a proc to a method and say: here, take this callback and run it when you're ready, but now please go away and don't block my script.
<pipework> apeiros: Nobruv, I was in the 'no threads' group.
<pipework> lolmaus: Do you know how "Don't block my script" is implemented?
<miah> "This is in contrast to today's more common concurrency model where OS threads are employed. Thread-based networking is relatively inefficient and very difficult to use."
<havenwood> who is arguing node has threads?
<havenwood> hehe
<pipework> havenwood: No one at all.
<apeiros> lolmaus: that's done the way I showed you
<havenwood> oh node..
<pipework> miah: I'm very skeptical of the drivel they put on their website.
<apeiros> lolmaus: by storing it and calling it whenever
<pipework> It used to be really funny.
<miah> as we all should be, but they are basically saying they dont think threads are a good idea
<apeiros> lolmaus: but it seems to me you're changing your requirement…
Pharaoh2 has joined #ruby
fold has quit [Quit: WeeChat 0.4.3]
<miah> lolmaus: sounds like you want a pub-sub system, with a sub taking a job and processing it.
<lolmaus> apeiros: i think i should rather write a sample in JS, show it to you and ask how to do the same with Ruby.
<pipework> lolmaus: Look, you have a large unit of work and a callback. If you have that unit of work run, it will block your main program. Javascript and Ruby behave the same way.
<fly2web> do i must but this book?
<apeiros> lolmaus: if it's reasonably simple, that's a good approach
asmodlol has joined #ruby
<havenwood> lolmaus: or Resque
<fly2web> Wolland:
<havenwood> but it is starting to sound like a worker queue ;)
<miah> right
<miah> yup
amacou has joined #ruby
<Wolland> what
<havenwood> lolmaus: resque, sidekiq (uses Celluloid), delayed job or beanstalkd
St_Marx has joined #ruby
<pipework> It's funny how this was all already covered at the beginning, but it's just getting repeated now.
<miah> principles of service oriented architecture 101
<havenwood> loop {}
<pipework> miah: That has nothing to do with it.
<miah> eh, i disagree
<apeiros> pipework: which is why I wait for lolmaus' example. IMO they kept changing the requirements.
<pipework> Though you surely can use a queue and workers in an SOA.
<pipework> apeiros: It was pretty simple at the start.
<havenwood> apeiros: blind guessing is getting us so far though :)
<havenwood> pipework: seemingly simple :O
<pipework> miah: Then you'd be wrong. There's nothing in SOA that requires workers, queues, or backgrounds.
<miah> oh, im not saying it requires it at all
<apeiros> havenwood: blind guessing is what happens when people ask questions on irc 99.7% of the time
<pipework> havenwood: I'd be impressed if you could complicate it in a reasonable way.
iamjarvo has joined #ruby
Pharaoh2 has quit [Ping timeout: 245 seconds]
<miah> just that, designing applications with those principles in mind helps you avoid this whole series of questions
namxam has quit [Remote host closed the connection]
<miah> but i work mostly in the cesspool of configuration management software =)
<miah> where people don't understand programming at all
<Wolland> fly2web: http://mislav.uniqpath.com/poignant-guide/book/ and it comes with Cartoon Foxes!
<pipework> Most people don't understand anything at all.
<miah> true
<miah> i understand programming, but little else about the world
<pipework> I understand how to put the lime in the coconut.
<miah> especially people.. they're so wtf
<fly2web> thanks Wolland
<fly2web> i will study ruby with this site.
<pipework> I'm actually illiterate.
<miah> AND THEN YOU DRINK IT ALL UP
<fly2web> :)
<miah> and amazingly on irc
<miah> text -> speech & vice versa?
<miah> you use dragon dictate to irc?
<pipework> Naw, I just wail on the keyboard and this comes out.
<miah> nice, you must be the work of infinite series of monkeys
<apeiros> pipework's cat is typing
<miah> my cat is presumably dreaming about eating tuna
xiq has quit [Read error: Connection reset by peer]
<Wolland> every time someone mentions dictation > computer, this is what I think about
<fly2web> Wolland: is it child bood?
<fly2web> book?
decoponio has quit [Read error: Connection reset by peer]
xiq has joined #ruby
<Wolland> because it has cartoon foxes?
wald0 has quit [Read error: Connection reset by peer]
GlenK has quit []
tyfighter has joined #ruby
<Wolland> it IS the book I read to my 3yo at night, but not sure it's sticking
<shevy> pipework are you a keyboard abuser
<Wolland> he does like foxes though
decoponio has joined #ruby
<shevy> or a cat abuser
<fly2web> thanks Wolland
<miah> lulz
<miah> good one Wolland
<shevy> and how do you know your cat is dreaming about tuna miah
mgberlin has joined #ruby
<Wolland> fly2web: no, it's not a children's book
<miah> because he was asking me for tuna a bunch this morning and now he's sleeping
<fly2web> ok thanks Wolland. rubymonk sites takes too much time
<miah> fly2web: go read http://learnyousomeerlang.com/ or http://learnyouahaskell.com/ and enjoy ;)
andrewjanssen has quit [Quit: Leaving...]
<shevy> yeah fly2web go learn haskell
<miah> i got my daughters that book on Sketch
<miah> it has lots of comic style stuff in it
<fly2web> miah: it is haskell?
<miah> they've read it over and over, and written a bit of scratch
basiclaser has quit [Excess Flood]
<Wolland> also /join #haskell
<miah> the Racket book is also good for that, but i think its not really written for children
<havenwood> fly2web: focus on monads
<pipework> there's a lisp book that uses funny pictures and games to teach you lisp
wald0 has joined #ruby
andrewjanssen has joined #ruby
<fly2web> http://learnyousomeerlang.com <— is it haskell?
<miah> ya
basiclaser has joined #ruby
<shevy> lol miah
<fly2web> oh i want need ruby.
Kricir has joined #ruby
chamblin has joined #ruby
<havenwood> fly2web: the newest version of Ruby is called Swift, the channel is #swift-lang
<shevy> fly2web go away
<fly2web> #swift-lang? really?
<fly2web> i think that havenwood lie to me?
<shevy> lol
<robscormack> lol
<miah> Land of Lisp is good, but theres also; The Little Schemer
drakciR has joined #ruby
<fly2web> i want study ruby for hacking
<miah> there is a whole series of 'the little schemer' like books
<havenwood> fly2web: do you own roller blades?
<robscormack> lol today I woke up and wanted to write some C#
<fly2web> roller blades?
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> Hack the Planet!
<miah> The Seasoned Schemer, and The Reasoned Schemer
<robscormack> felt bad for myself and came here to see what happens... and you're making parentheses.
<fly2web> metasploit
mr_snowf1ake has quit [Quit: Leaving]
thams has quit [Quit: thams]
<robscormack> I'm off, want to create my own version of Rails in lolcode
gophermike has quit [Ping timeout: 246 seconds]
<miah> the last time i tried to do development on a windows platform, my computer was running WindowsME
<robscormack> miah, how was it?
<apeiros> lolmaus: I thought you said *javascript*, not coffee :-p
<miah> robscormack: as awful as you can imagine =)
<fly2web> Wolland: i just study ruby according to that site.
<shevy> man
<apeiros> lolmaus: did you already get an answer?
<miah> i thinkk most of my problems were due to the netware client being installed ;)
<fly2web> i know haskell, but i don’t need to functional language.
Starless has quit [Quit: Leaving]
<robscormack> miah, I may be the only man in the World who has never touched a computer with Windows.
* Wolland adds another language to the long list of languages known by fly2web
Zebroid has joined #ruby
<pipework> robscormack: You probably touched one.
Kricir has quit [Ping timeout: 264 seconds]
<miah> robscormack: ever use an ATM?
<lolmaus> apeiros: no. Do you want me to rewrite that in JS?
<pipework> Ever use NFC anywhere?
<miah> if so; congratulations. you've used windows.
<shevy> new fried chickens?
thams has joined #ruby
Deele has quit [Ping timeout: 240 seconds]
<miah> national federation of coders?
<pipework> Nearly Fucked Cucumbers.
<apeiros> that's a 1:1 translation of your code
<apeiros> ugh, an `end` didn't make it into the clipboard. poor thing. it's all alone now.
<havenwood> apeiros: looks like python :O
<miah> its wishing for a beginning
melik_ has joined #ruby
<apeiros> havenwood: coffee?
<apeiros> lolmaus: note that canonical ruby will look different
<lolmaus> apeiros: if i append `puts 'foo'` to your gist, will "foo" appear in the output before or after "All requests have finished"?
<apeiros> or should I say, idiomatic
* havenwood goes in search of coffee.
<apeiros> lolmaus: that'd depend on the magical and unexplained `get`
andrewjanssen has quit [Remote host closed the connection]
<apeiros> lolmaus: you can't just leave out a crucial part. show me the implementation of get and I'll show you the ruby equivalent.
<pipework> lolmaus: Ruby has a GVL, which puts some limitations on concurrency within the c ruby implementation.
<lolmaus> apeiros: in my example, it's a jQuery Ajax request.
<apeiros> lolmaus: as in: browser code?
Zebroid has quit [Ping timeout: 260 seconds]
<miah> web programming is so confusing to me
<pipework> lolmaus: I think a crash course in concurrency would be highly valuable to you.
timonv_ has quit [Remote host closed the connection]
<lolmaus> pipework: i understand how it works in JS, i want to understand how it can be done in Ruby.
<pipework> You already understand how callbacks work, but don't seem to grasp the concurrency part.
<pipework> I don't think you do actually.
riotjones has quit [Ping timeout: 250 seconds]
<lolmaus> apeiros: i will update my example without any magical code.
ra4king has quit [Remote host closed the connection]
andrewjanssen has joined #ruby
lw has joined #ruby
<robscormack> def cryss_angel
<robscormack> end
einarj has quit [Remote host closed the connection]
ra4king has joined #ruby
<lolmaus> pipework: i understand it enough to use it to write code that works as i expect and want it to.
<pipework> lolmaus: then you don't understand it.
<apeiros> lolmaus: would be wise. leaving away the actually crucial part makes the example pointless.
<lolmaus> pipework: i may not understand how a car engine works, this wouldn't stop me from being a good driver.
<apeiros> lolmaus: https://gist.github.com/apeiros/95fd085ab65cd47be2ce a really ugly way to have a non-blocking get
<miah> rather than arguing what is known or unknown. i find it generally better to review the material at hand to ensure i do understand things the way i think i do
<pipework> lolmaus: well, good luck
<pipework> have fun
riotjones has joined #ruby
<apeiros> lolmaus: but you're omitting that the browser provides a run-loop for the javascript engine. you have to do that yourself in ruby (because you're not in a browser, you're in a green field)
<pipework> apeiros: I'm pretty sure that the bikeshed is brown.
<apeiros> pipework: that only matters if it comes with a razor
<pipework> apeiros: But is the razor a safety razor?
<apeiros> it is a yak optimized razor
s2013 has quit [Ping timeout: 240 seconds]
<apeiros> and it comes in different colors
lxsameer has quit [Ping timeout: 245 seconds]
tectonic has quit []
<apeiros> havenwood: def future(&work); worker = Thead.new(&work); proc { value }; end
<apeiros> yay! future implementation in 1 line of ruby! awwsumm!
<apeiros> whoops
<apeiros> havenwood: def future(&work); worker = Thead.new(&work); proc { worker.value }; end
<pipework> what's value?
<pipework> There we go
tylersmith has joined #ruby
<apeiros> copy & paste omission :)
<havenwood> class Promise < Thread; end
<havenwood> apeiros: ^ there, promises in one line too
<havenwood> :P
<apeiros> havenwood: pfff, I want a Fibur!
<pipework> Fibore.
<apeiros> also, Promise = Thread # shorter
ziprar has joined #ruby
<havenwood> ah, better
<pipework> Egh, not really.
<havenwood> lol
dscrd has quit []
<apeiros> <3 tenderlove
<apeiros> the coders of metal gear rising have an interesting idea about how physics work…
<apeiros> lolmaus: you replaced magical get with magical setTimeout
tectonic has joined #ruby
<lolmaus> apeiros: setTimeout is built-in JS feature.
<apeiros> lolmaus: yes. which is enabled by the run-loop around your code. already written about that.
<lolmaus> apeiros: it is THE way to branch off a callback so that it runs concurrently, non-blockingly
xiq has quit [Remote host closed the connection]
tylersmith has quit [Ping timeout: 240 seconds]
spastorino has joined #ruby
<apeiros> lolmaus: you do realize that your timeout code is only ever run after all the code in your script tags in the head, right?
dbasch has quit [Quit: dbasch]
zipace has quit [Ping timeout: 256 seconds]
<apeiros> i.e. if you have an infinite loop there, it doesn't matter what value you set for the timeout. it'll wait.
<lolmaus> apeiros: yes, why?
drakciR has quit [Read error: Connection reset by peer]
xmad has quit [Ping timeout: 245 seconds]
tectonic has quit [Client Quit]
<apeiros> lolmaus: see run-loop
<apeiros> lolmaus: either you reimplement it. or you use threads.
<apeiros> the difference with threads will be that you have to ensure that all threads are run before your program terminates.
mikepack has quit [Remote host closed the connection]
<apeiros> the other difference is that it can be run concurrently
vsoftoiletpaper has joined #ruby
<apeiros> (if you don't want that, you're back at: reimplement the browsers run-loop)
<apeiros> which isn't hard, btw.
mikepack has joined #ruby
<apeiros> it'd probably be some ~20 LoC
tectonic has joined #ruby
mgberlin has quit [Remote host closed the connection]
zerosNones has quit [Ping timeout: 250 seconds]
mgberlin has joined #ruby
tectonic has quit [Client Quit]
<dmarr> whats status of ruby sass lately. any speedup plans
linojon has quit [Quit: linojon]
namxam has joined #ruby
lxsameer has joined #ruby
melik_ has quit [Quit: Computer has gone to sleep.]
<lolmaus> apeiros: tried to google `run-loop` and `ruby "run-loop"`, didn't find anything that i can understand. :(
j_mcnally_ has quit [Ping timeout: 255 seconds]
thams has quit [Quit: thams]
<pipework> lolmaus: Do you know what an infinite loop is?
gr33n7007h has joined #ruby
<lolmaus> pipework: sure.
melik_ has joined #ruby
tylersmith has joined #ruby
<pipework> Do you know that you can run things in a loop?
<pipework> That's a run loop.
<pipework> Often they have 'tickers' that get called every n of some measure of time.
<pipework> Or ticks.
<apeiros> it's the outermost loop around your program
<pipework> apeiros: Not necessarily.
<apeiros> it handles inputs, outputs
<lolmaus> pipework: it's synchronous. Just using `loop { ... }` will not magically branch iterations like JS setTimeout does.
<pipework> It's often the outermost loop though.
<apeiros> pipework: show me a run-loop which is not the outermost and I show you a loop which is not a run-loop :-p
<pipework> apeiros: Any program which uses multiple run-loops.
<apeiros> pipework: yes. but in sequence.
lxsameer has quit [Client Quit]
<apeiros> if nested, the outermost is your run-loop
<apeiros> the inner is just a loop
<pipework> lolmaus: In ruby, set timeout might use a thread to start the timeout, thus letting main execution continue until the timeout ends, which then calls whatever it must.
jmbrown412 has joined #ruby
Pharaoh2 has joined #ruby
<lolmaus> In JS, it is common to use setTimeout with zero as time argument, so that it just branches off your callback without waiting
fgo has joined #ruby
melik_ has quit [Ping timeout: 255 seconds]
namxam has quit [Remote host closed the connection]
<pipework> lolmaus: I'm pretty sure your function still gets called within the main thread.
<lolmaus> pipework: so?
<pipework> lolmaus: Then what's the point of mentioning it?
<apeiros> lolmaus: yeah, poor man's "do this after my code"
DrCode has quit [Ping timeout: 264 seconds]
<apeiros> utterly pointless
<apeiros> and in most cases it is simply misapplied
<lolmaus> apeiros: all JS is a poor man's programming language.
<apeiros> glad you see that
Panicky has quit [Remote host closed the connection]
jmbrown412 has quit [Ping timeout: 260 seconds]
<lolmaus> apeiros: but the JS approach of running callbacks concurrently is very convenient.
Bumptious has quit []
tyfighter has quit [Quit: tyfighter]
j_mcnally_ has joined #ruby
<pipework> It doesnt' run them concurrently though.
<pipework> I think you're continually refusing to understand that deferred evaluation is not concurrency.
fgo has quit [Ping timeout: 256 seconds]
<robscormack> it's not concurrent, it's a single thread deferring the execution
<apeiros> lolmaus: as the others just said - that's not what it does
<apeiros> lolmaus: can you relink your setTimeout example?
<havenwood> apeiros: def Future &work; ->{ Thread.new(&work).value } end
melik_ has joined #ruby
<apeiros> havenwood: nope
tjr9898 has joined #ruby
<havenwood> apeiros: haha
<pipework> havenwood: cute.
<robscormack> isn't it just Sidekiq? <-!
<apeiros> havenwood: you have to split it how I did. otherwise it doesn't start working.
<havenwood> oh, the worker
parduse has quit [Ping timeout: 240 seconds]
<havenwood> apeiros: erm, seems to work
<apeiros> btw., the code I gave is almost 1:1 my Fork.future's implementation. just that that uses a fork instead of a thread
<pipework> lolmaus: In javascript, setTimeout uses 'ticks' to determine when to run a function. It's not concurrent.
<apeiros> havenwood: for a damaged value of "work" :-p
<lolmaus> apeiros: i think i destroyed it. :( Didn't realize that it updates the existing URL.
DrCode has joined #ruby
<havenwood> apeiros: mm
<pipework> apeiros: Psh, I'd prefer the thread.
parduse has joined #ruby
<apeiros> havenwood: f = Future do sleep(5) end; sleep 5; f.call # will take 10s
<pipework> But ruby 2.1.x is CoW, right?
<benzrf> apeiros: the work doesnt start until you call, though
<havenwood> apeiros: ah, yup
<apeiros> havenwood: which is defeating the purpose of future. it should take 5s in total, not 10. as it starts to work immediately and only blocks when you want the value.
<apeiros> havenwood: hence: split up starting the thread and getting the value from it. you'll end up with my code ;-)
SergioAtHome has quit [Quit: WeeChat 0.4.3]
<havenwood> apeiros: require 'ifuture'; IFuture.unix(Marshal) { sleep 5; 42 }
<Mon_Ouie> havenwood: You might as well have Future = Thread now though :p
<apeiros> benzrf: yes, which is why I said it's not a future.
<benzrf> ah
<benzrf> i like monadic/functorial promises as in Promises/A+
<havenwood> Mon_Ouie: pretty much, or just alias
try has quit [Quit: errrrk]
<apeiros> 00:26 apeiros: havenwood: def future(&work); worker = Thead.new(&work); proc { value }; end
<apeiros> benzrf: ^
<apeiros> me ~20min ago
<mozzarella> >> 1.respond_to?(:=~)
<benzrf> right
<Mon_Robot> mozzarella: => true (https://eval.in/172251)
<havenwood> benzrf: yeah, i just fail
<mozzarella> ^ where is it defined?
<benzrf> 1 sec let me write up a jist
<benzrf> er, gist
<robscormack> jist a sec *
<apeiros> >> 1.method(:=~).owner
<Mon_Robot> apeiros: => Kernel (https://eval.in/172252)
<havenwood> apeiros: ifuture is my futures over processes thingy
<apeiros> lolwhat?
<apeiros> should be Object…
<havenwood> IPC
<Mon_Ouie> No, that's how it's implemented
<Mon_Ouie> Nearly all methods are in Kernel
<Mon_Ouie> (all methods that are documented as being in Object, that is)
<apeiros> havenwood: take a look at the fork gem
<havenwood> looking now
<apeiros> Fork.future do sleep 5; 43 end
<lolmaus> pipework: i don't care if it's truly concurrent, multi-threaded or whatever. I know it's singe-threaded. Practically, it results in parallel execution and i don't care that it runs sequentially under the hood. When i launch multiple GET requests with callbacks, i know that each of them will fire a callback when it's ready, no sooner no later. It is not multithreading but it is a powerful instrument to organize my code.
<apeiros> works via processes to (via forking, as said)
timonv_ has joined #ruby
jonr22 has quit [Quit: Lost terminal]
<pipework> lolmaus: It's not parallel though.
<pipework> It's just deffered evaluation.
<Mon_Ouie> If it runs sequeentially under the hood it doesn't result in parallel execution, the two are mutually exclusive
<pipework> That's all, and that's trivial in ruby.
<apeiros> lolmaus: found your link. btw., you can leave the ; away in JS in almost all cases.
subtwo has joined #ruby
subtwo has quit [Quit: Computer has gone to sleep.]
<pipework> apeiros: Good JS developers don't.
<robscormack> yaye, I learned I'm a good JS developer
<apeiros> pipework: you and I have varying definitions for "good JS developer" then
<lolmaus> apeiros: you should never leave the semicolon because JS is a shitty language and will mess your code one day.
<lolmaus> apeiros: my link was in CoffeeScript. I started rewriting it to JS but didn't finish.
<apeiros> the second seems to be JS
<lolmaus> apeiros: JSBin overwritten my initial example with unfinished one. :(
<pipework> apeiros: Clearly.
<pipework> The semicolons are good things in javascript, given that javascript can be a bit of a shit.
<havenwood> apeiros: ah, nice, Fork is fancy ;)
<apeiros> oh, yes, I see
j_mcnally_ has quit [Quit: ZNC - http://znc.in]
<apeiros> havenwood: yeah. sadly we stopped using it. our VMs have single cores by policy :(
<pipework> havenwood: Should have used druby.
<pipework> drb
<apeiros> lolmaus: well, can you repaste your coffee version then?
<havenwood> pipework: i need to get a book on drb, the docs aren't enough for me to divine what the heck is going on half the time
<lolmaus> apeiros: there's nowhere to copy it from. :(
<pipework> It's a good book, but I didn't 'get' it until I started playing with it and rinda.
dangerou_ has joined #ruby
dangerou_ has quit [Read error: Connection reset by peer]
dangerou_ has joined #ruby
<lolmaus> apeiros: here, rewrote it: http://jsbin.com/razox/4/edit?js
<apeiros> lolmaus: because I'm utterly bored: https://gist.github.com/apeiros/500d3188a81f133f1df9
<lolmaus> apeiros: that's quite a lot of scaffolding to implement what pipework claims to be trivial with Ruby
<apeiros> lolmaus: that scaffolding is your browsers code
dangerousdave has quit [Ping timeout: 245 seconds]
<apeiros> that's what "built-in" means. it means "somebody wrote this for you already".
<lolmaus> apeiros: what browser code? The JS runtime?
Panicky has joined #ruby
<apeiros> yes
<havenwood> pipework: my stab at doing something with Rinda::TupleSpace without understanding what the heck is going on :) https://gist.github.com/havenwood/c67d47cb131976107080
baweaver has joined #ruby
<apeiros> and 40 LoC IS trivial
chamblin has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timonv_ has quit [Ping timeout: 240 seconds]
<apeiros> unless you're still stuck at "hello world"
`mrspock has quit [Quit: Textual IRC Client: www.textualapp.com]
qw3rtman has quit [Quit: Computer has gone to sleep.]
thams has joined #ruby
Kricir has joined #ruby
linojon has joined #ruby
andrewjanssen has quit [Quit: Leaving...]
<mozzarella> why isn't "puts" atomic?
<lolmaus> apeiros: this "deferred evaluation" feature of JS, as pipework has called it (dunno if that's the official term for how `setTimeout` and Ajax do pseudo-concurrency in JS), it has become an essential feature for me. Once i got used to it, i can't imagine coding stuff without it. And the fact that this functionality is lacking in Ruby stdlib kinda causes raised eyebrows.
<havenwood> apeiros: nice, i like that
<mozzarella> if I puts two things in two different threads they can end up on the same line
<apeiros> lolmaus: really, you should learn how that stuff works. it is trivial.
ridget has joined #ruby
<apeiros> also updated https://gist.github.com/apeiros/500d3188a81f133f1df9 to match your example code
sailias has joined #ruby
<apeiros> gah. what's comment in coffee?
<apeiros> obv. not //
<mozzarella> isn't deferred evaluation basically what blocks do?
<robscormack> mozzarella: no.
<apeiros> mozzarella: can be used for that
<mozzarella> or is that lazy evalution?
Panicky has quit [Remote host closed the connection]
<apeiros> mozzarella: but setTimeout also includes scheduling
Zebroid has joined #ruby
Panicky has joined #ruby
<apeiros> mozzarella: it's not atomic because they chose not to make it atomic. which is good.
<apeiros> an IO might be slow, blocking all your threads.
lkb has quit [Quit: Wychodzi]
tjr9898 has quit [Read error: Connection reset by peer]
<apeiros> havenwood: thanks :)
Kricir has quit [Ping timeout: 245 seconds]
tjr9898 has joined #ruby
St_Marx has quit [Quit: Ex-Chat]
Zebroid_ has joined #ruby
<lolmaus> apeiros: looking at your code, i've understood that my example was a bad one. Thinking of a better one.
dangerou_ has quit [Ping timeout: 260 seconds]
* apeiros senses reimplementation of browsers IO handling upcoming
baweaver has quit [Ping timeout: 255 seconds]
motto has joined #ruby
robscormack has quit [Quit: Leaving]
Zebroid has quit [Ping timeout: 240 seconds]
parduse has quit [Killed (hobana.freenode.net (Nickname regained by services))]
Maitiu has quit [Ping timeout: 240 seconds]
Wayneoween has quit [Ping timeout: 240 seconds]
parduse has joined #ruby
Maitiu has joined #ruby
lw has quit [Ping timeout: 240 seconds]
Kruppe has quit [Ping timeout: 240 seconds]
certainty has quit [Ping timeout: 240 seconds]
parduse is now known as Guest70805
<Jamo> hey, Im looking for easy string templating solution - i think ruby has it built in but I cant remember how to do it. Not just "%s" % ["foo"] but something where I could define the order of these bu names et smthing
armyriad has joined #ruby
vlad_starkov has quit [Ping timeout: 240 seconds]
mhenrixon has quit [Ping timeout: 240 seconds]
GeekOnCoffee has quit [Ping timeout: 240 seconds]
<Jamo> like I have a "param2: %param2% and param1: %param1%" % {param1: "foo", param2: "bar"}
qw3rtman has joined #ruby
<Jamo> that doesnt work but as an example what I would like to do
m8 has quit [Ping timeout: 240 seconds]
<havenwood> mozzarella: you mean why isn't the newline synchronized?
<apeiros> >> "%{greeting} %{entity}!" % {greeting: "Hello", entity: "World"}
Zebroid_ has quit [Ping timeout: 260 seconds]
<Mon_Robot> apeiros: => "Hello World!" (https://eval.in/172253)
<apeiros> Jamo: ^ that?
<Jamo> apeiros: yep. thanks! - feeling stupid...
mhenrixon has joined #ruby
vlad_starkov has joined #ruby
Wayneoween has joined #ruby
certainty has joined #ruby
<apeiros> Jamo: btw., if you know the method, you can look it up in the docs
<apeiros> ri String#%
lw has joined #ruby
<lolmaus> apeiros: here's what i meant it to be like: https://gist.github.com/lolmaus/51cb7aeb654d728c13f7
<Jamo> it seems that I cannot read
andrewjanssen has joined #ruby
Kruppe has joined #ruby
<Jamo> I had that particular part open on my screen... :D
<apeiros> lolmaus: add a sleep to my example then. still the same.
GeekOnCoffee has joined #ruby
<dopie> hey all
<Jamo> maybe its just time to go to ped, it 2am here...
<dopie> is there a program like http://ditchnet.org/httpclient/ for ubuntu?
<machty> question about the GIL in MRI and thread stuff in general: does the presence of the GIL prevent ruby threads from executing on different cores? or just that the mutexes around the interpreter would thwart actual parallelism?
OffTheRails has quit [Ping timeout: 255 seconds]
<toretore> lolmaus: what you're looking for is an event loop. eventmachine is an event loop implementation for ruby
<apeiros> lolmaus: you may want to read and understand the Runner class. that's almost precisely what your browser does.
<apeiros> toretore: he doesn't want concurrency
<toretore> what does he want then?
neruda has joined #ruby
<apeiros> toretore: that said - what they want seems to change from time to time
St_Marx has joined #ruby
<apeiros> toretore: just ordered/deferred execution
<apeiros> i.e. what JS in a browser does
<toretore> which means concurrent execution ;)
<apeiros> toretore: nope
<toretore> sure it does
<apeiros> no
<toretore> explain
<apeiros> no concurrency
<apeiros> JS in a browser doesn't have concurrency either
<toretore> of course that's concurrent
<apeiros> you're mistaken. but please, show me where.
<toretore> concurrent != parallel
<apeiros> correct
<apeiros> but none of this is concurrent.
<drizz> concurrent = !parallel
<apeiros> drizz: um, no
<drizz> shadap
<apeiros> concurrent can be parallel
<apeiros> drizz: manners.
x1337807x has joined #ruby
<drizz> but I said it in a less serious way :<
<toretore> you have a "thread" of code that suspends its execution, then yields to another "thread". that's concurrency
<apeiros> toretore: I have no threads
<toretore> "thread" not thread
<benzrf> fyi here is a (probably super flawed) simple impl of functorial (but not monadic) promises https://gist.github.com/4e00ff2ab57f2a67609c
<apeiros> and no, that's not concurrency
<toretore> i don't mean an actual preempted thread
<apeiros> that's deferring
<toretore> so, define concurrency for me
AlSquire has quit [Quit: This computer has gone to sleep]
<apeiros> "Occurring at the same time"
dseitz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> fits
<apeiros> that this is achieved through e.g. slicing like in ruby is what makes it != parallel
<toretore> the definition says "happening at the same time" which is parallel
<apeiros> s/is achieved/can be achieved/
<apeiros> but neither in JS nor in the given example does anything happen at the same time.
<apeiros> once the deferred code is executed, it blocks
banisterfiend has quit [Quit: Computer has gone to sleep.]
<toretore> so that definition is not right in this context
<apeiros> a setTimeout will not be executed at the time it should if something is still running
<apeiros> since JS does not have concurrency. only deferrence (is that a word?)
<toretore> that's not a requirement for concurrency
<apeiros> *shrug* if you decide to go with your very own definition of the term
<toretore> so if i make 10 requests that run interleaved in js, that's not concurrent?
<apeiros> no point in arguing. you're misusing it, though.
<apeiros> you *can't* interleave in JS
tyfighter has joined #ruby
<apeiros> as said, JS does not have concurrency.
<toretore> sure you can. otherwise they would run in serial, but they don't.
<apeiros> they do
<apeiros> show me code which you think runs concurrently
banisterfiend has joined #ruby
<toretore> EM.run{ 5.times{ puts http_get('www.example.com') } }
<apeiros> that's not JS
<toretore> but it's the same
<havenwood> machty: There's a timer thread that sets an interrupt flag on whatever Thread is holding the GVL every 100 ms.
<toretore> js uses an event loop
<apeiros> that's the point: it's NOT
dseitz has joined #ruby
<apeiros> again, show me JS code you think runs concurrently.
<machty> havenwood: cool i'll give that a ready
<havenwood> machty: part 2 explains in some detail
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<machty> havenwood: i guess i'm asking: does the OS actually prevent the ruby interpreter code from multiple cores, or is it just that the interpreter, which might be running on multiple cores, is prevented from being truly parallel due to a mutex b/w cores ?
<machty> i think the answer is the latter
<toretore> apeiros: ok, here's some using jquery: $.each([1,2,3,4,5], function(){ $.ajax('www.example.com').then(function(res){ console.log(res); }) })
kaspergrubbe_ has quit [Read error: Connection reset by peer]
kaspergr_ has joined #ruby
tjr9898 has quit [Remote host closed the connection]
<toretore> that's not real code, but it would be
<toretore> could*
<apeiros> toretore: and now tell me which part runs concurrent to what other part
<toretore> the requests
<havenwood> machty: The answer is a bit tricky because not all threads need to hold the GVL to run.
<apeiros> $.ajax('www.example.com') # this?
tjr9898 has joined #ruby
<toretore> the 5 of them, yes
<havenwood> machty: C-exts, IO, etc.
n_blownapart has joined #ruby
<toretore> $.ajax() will return immediately, allowing the next request to start
<apeiros> I can tell you what will run concurrently there - the browser performing the request. the javascript code itself - none of it.
<toretore> haha
tjr9898_ has joined #ruby
<toretore> this is a waste of time
<havenwood> machty: Concurrency is always available, parallelism isn't when both threads happen to need to acquire the GVL at the same time.
<apeiros> toretore: the `function(res){ console.log(res); }` will only run after *all* of your code in that script has run
<apeiros> no concurrency
centrx has joined #ruby
<havenwood> machty: The timer thread allows concurrency in any case.
<apeiros> i.e. only parts outside of jS are concurrent. and even then it depends on the browser. e.g. some browsers even stop taking user input while JS runs.
<havenwood> Two concurrency discussions at once. :P
<machty> havenwood: lol
<machty> havenwood: right, but it's totally possible/likely that two threads, each on a separate core, are trying to run interpreter code, only that one will be blocked by a mutex
<toretore> oh, but the browser code isn't concurrent either, only the cpu can issue interrupts
<machty> havenwood: in other words, mutexes can be use cross-core
<machty> havenwood: sorry for all the noise, i think something just clicked for me, but i think i shall read that article first to verify
<apeiros> toretore: you're confusing deferred code and concurrent code. really, look up the difference. JS has no concurrency.
<toretore> and this so-called "concurrency" that the kernel implements is just a loop
<apeiros> I wish terminology courses were mandatory for programmers…
<apeiros> along with courses about encodings, how date/time works, and what representation is.
<toretore> ok, so show me some real concurrent code
<havenwood> machty: i think you're on the right track
CaptainJet has quit [Ping timeout: 245 seconds]
<apeiros> 01:32 toretore: EM.run{ 5.times{ puts http_get('www.example.com') } }
<apeiros> that one is
<toretore> lol
tjr9898 has quit [Ping timeout: 240 seconds]
<havenwood> machty: article explains in good detail
<machty> havenwood: thanks, reading
robscormack has joined #ruby
<lolmaus> Thank you, apeiros. I appreciate your patience and effort.
<toretore> it's not concurrent, those calls are all happening serially and EM just defers them until some condition becomes true
<toretore> it is *exactly* the same
SCHAAP137 has quit [Read error: Connection reset by peer]
tjr9898_ has quit [Remote host closed the connection]
<apeiros> toretore: no. and that you don't understand the difference is precisely the same problem as you not understanding the difference between deferred and concurrent code.
<toretore> the truth is, concurrency is not something that can be defined precisely
tjr9898 has joined #ruby
CaptainJet has joined #ruby
<apeiros> but it's almost 0200 and I'm tired of trying to give CS lessons to people who don't even try.
<havenwood> toretore: serially would be one completing before the next is run
fgo has joined #ruby
<lolmaus> toretore: eventmachine requires starting some server with an ip address and a port. To me it looks like either an overkill or an inappropriate instrument for the task.
<toretore> havenwood: tell that to apeiros
<toretore> lolmaus: no it doesn't
<havenwood> Interleavings!
matrixdevuk has joined #ruby
<toretore> lolmaus: EM.run{ EM.add_timer(0){ puts 'hello' } }
<lolmaus> toretore: i'll look into it, thank you.
<toretore> lolmaus: anything inside EM.run{ ... } behaves like js would in a browser
<apeiros> toretore: btw., depending on your browser, even the non-JS part of performing the request is done sequentially.
<robscormack> still on deferred v/s concurrent?
<havenwood> truth or interleavings, pick one. ;P
<toretore> god are you still on about this
<apeiros> no, I'm done.
Guest70805 has quit []
matrixdevuk is now known as momma
parduse has joined #ruby
<mozzarella> I think you guys are thinking of "parallel" ( ͡° ͜ʖ ͡°)
parduse is now known as Guest29593
<robscormack> I'm thinking women right now but nice try
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<toretore> all concurrency is done sequentially. the part that makes it concurrent is the interleaving of different "threads" of code
x1337807x has joined #ruby
Guest_ has joined #ruby
<toretore> (not including parallelism here for the sake of argument)
<machty> concurrency is about code structure, parallelism is about execution. programming in a concurrent style/model enables but doesn't guarantee parallelism.
<machty> (thanks for that, machty)
* havenwood flees
fgo has quit [Ping timeout: 250 seconds]
Guest29593 has quit [Client Quit]
<apeiros> toretore: the deciding part is whether you have a say in what is interleaved
<apeiros> if you have a say in it, it's just deferring code. if you don't, it's concurrent.
parduse has joined #ruby
parduse is now known as Guest41672
<toretore> you're just describing preemted threads
<toretore> preempted*
<apeiros> really, just read the Runner class in the gist. it's *precisely* what the browser does. and that's *not* concurrent.
Guest41672 has quit [Client Quit]
<toretore> so anything that's not a preempted thread is not concurrent?
<robscormack> where's the gist, again?
<apeiros> toretore: no. you can't yield mid-term in JS. you can't directly access the scheduler.
<toretore> so? you can make your own
motto has quit [Quit: Sto andando via]
<toretore> apeiros: how is the js scheduler/loop any different from EM's?
<apeiros> toretore: in that it executes a given code block at one piece
CaptainJet has quit [Ping timeout: 250 seconds]
<toretore> just like em
x1337807x has quit [Ping timeout: 260 seconds]
<apeiros> because - as said - JS doesn't have concurrency
<apeiros> no
<apeiros> in EM, the code blocks can actually run at the same time
<apeiros> in JS, they can't
<toretore> what
parduse has joined #ruby
thams has quit [Quit: thams]
Wolland has quit [Remote host closed the connection]
<toretore> give me an example
parduse is now known as Guest37564
<apeiros> setTimeout(0, function() { while true {}); setTimeout(0, function() { "never runs" })
<apeiros> the first one will run forever, prohibiting the scheduler from ever scheduling the second timeout
<czaks> apeiros: em is mostly single threaded
<czaks> so with EM you will have the same effect
<apeiros> czaks: oh…
<apeiros> ah right, EM is a reactor
j_mcnally has quit [Remote host closed the connection]
<benzrf> its a nuclear reactor !
<czaks> unless you use em::synchrony and use em::s.sleep in the loop
<apeiros> toretore: ok. remove all things I said with regards to EM.
<czaks> you may want to look at celluloid, which is a different design, but allows you to do the sort of code you described
<apeiros> so when you asked for a concurrent example and I repasted your "EM.run{ 5.times{ puts http_get('www.example.com') } }", make that "5.times do Thread.new do puts http_get('www.example.com') end; end"
<czaks> apeiros: nope reactor runs in a single thread
Guest37564 has quit [Client Quit]
<czaks> and you can't use multiple ones to schedule things
tjr9898 has quit []
<czaks> "EM.run{ 5.times{ puts http_get('www.example.com') } }
<czaks> this one is perfectly OK
<machty> lolmaus: your username makes me think that everyone is sarcastically talking to you whenever they direct a message to you
<havenwood> Celluloid::IO > EM
chamblin has joined #ruby
parduse has joined #ruby
parduse is now known as Guest20977
Guest20977 is now known as parduse
CaptainJet has joined #ruby
<benzrf> seen DCell?
parduse has quit [Changing host]
parduse has joined #ruby
<havenwood> benzrf: the webpage status screen thingy is neato
parduse has quit [Client Quit]
<czaks> EM is more performant than C::IO, but has a worse design IMO
<benzrf> ?
<benzrf> havenwood: wuts that
<apeiros> toretore: re JS example of timeouts - would you have expected the second timeout to get scheduled?
parduse has joined #ruby
armyriad has quit [Ping timeout: 255 seconds]
<havenwood> benzrf: when you get it up and running it launches a localhost webserver that has a fancy list of the dcell actors
<toretore> distributed objects, what a great idea!
<toretore> apeiros: no
chamblin has quit [Client Quit]
<apeiros> toretore: then you actually know the difference between concurrency and deferring
ridget has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros> with concurrency it wouldn't be determined *when* the second timeout is scheduled. but it would be possible that it is.
<apeiros> with deffering, it is impossible.
<toretore> lol
<apeiros> *deferring
spacemud has quit [Ping timeout: 240 seconds]
<benzrf> havenwood: ooooh thats pretty sweet
<benzrf> havenwood: have you ever looked into ØMQ itself
<havenwood> benzrf: yeah, a little