adriancb has quit [Remote host closed the connection]
yeticry has joined #ruby
patrick99e99 has quit [Ping timeout: 256 seconds]
hamakn has joined #ruby
patrick99e99 has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
ta has joined #ruby
hamakn has joined #ruby
cashnguns has joined #ruby
Rayford has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
hamakn_ has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
Manj-811-Xfce2 has quit [Remote host closed the connection]
supergiel has quit [Remote host closed the connection]
kenneth has joined #ruby
hamakn has joined #ruby
hamakn_ has quit [Read error: Connection reset by peer]
ta has quit [Ping timeout: 246 seconds]
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
oleo is now known as Guest45850
oleo__ has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
Aova has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
Musashi007 has joined #ruby
avahey91 is now known as avahey_in_the_co
avahey_in_the_co is now known as avaheyInTheCorne
hamakn has quit [Read error: Connection reset by peer]
avaheyInTheCorne is now known as vaheyInTheCorner
jonesthedolphin has quit [Ping timeout: 265 seconds]
maximski has joined #ruby
hamakn has joined #ruby
cpt_yossarian has quit [Quit: And then he took off.]
cpt_yossarian has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
Guest45850 has quit [Ping timeout: 276 seconds]
FooMunki has quit [Quit: FooMunki]
yfeldblum has joined #ruby
Aova has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hamakn has quit [Ping timeout: 245 seconds]
fgo_zzZz has joined #ruby
yfeldblum has quit [Ping timeout: 245 seconds]
_maes_ has joined #ruby
postmodern has joined #ruby
tsnz has joined #ruby
fgo_zzZz has quit [Ping timeout: 256 seconds]
Musashi007 has quit [Quit: Musashi007]
tsnz has quit [Ping timeout: 245 seconds]
Sawbones has quit [Remote host closed the connection]
Channel6 has quit [Ping timeout: 264 seconds]
tus has quit []
ferr has quit [Quit: Lost terminal]
jherbst has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
frek818 has joined #ruby
blackoperat has quit [Ping timeout: 255 seconds]
icbm has quit [Quit: Leaving]
maximski has quit []
sudog has quit [Ping timeout: 245 seconds]
sudog has joined #ruby
<jonmorehouse>
within eventmachine, is there a way to queue up deferrables? IE: defer1 outputs to defer2
<jonmorehouse>
so that they run in a waterfall like manner?
tjohnson has quit [Quit: Connection closed for inactivity]
bklane has joined #ruby
radic has quit [Ping timeout: 245 seconds]
learner has quit [Ping timeout: 252 seconds]
radic has joined #ruby
learner has joined #ruby
kenneth has joined #ruby
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby
sudog has quit [Remote host closed the connection]
poguez has quit [Quit: Connection closed for inactivity]
bklane has quit [Read error: Connection reset by peer]
bklane has joined #ruby
cashnguns has quit [Remote host closed the connection]
britt_ has joined #ruby
fgo_zzZz has joined #ruby
CedroK has joined #ruby
marcdel has joined #ruby
<CedroK>
Is there a place where we could watch niggers chimp the fuck out???
kalusn has quit [Remote host closed the connection]
tyfighter has joined #ruby
CedroK has quit [K-Lined]
sudog has joined #ruby
ghr has joined #ruby
britt_ has quit [Ping timeout: 276 seconds]
yfeldblum has joined #ruby
lukeholder has joined #ruby
bklane has quit [Remote host closed the connection]
Mia has quit [Read error: Connection reset by peer]
iamninja has quit [Remote host closed the connection]
iamninja has joined #ruby
ghr has quit [Ping timeout: 256 seconds]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Lexun has joined #ruby
braincrash has quit [Quit: bye bye]
arup_r has joined #ruby
bufferloss has joined #ruby
kenneth has joined #ruby
skj3gg has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
softinio has joined #ruby
kenneth has quit [Client Quit]
<bufferloss>
hi, so I've been googling a bit, but haven't been able to find a solution for this yet:
<bufferloss>
"No source for ruby-2.0.0-p598 provided with debugger-ruby_core_source gem."
<bufferloss>
I'm on windows 8.1
braincrash has joined #ruby
<bufferloss>
I've seen this when using RVM on Mac OS X, but I solved it by just installing with --disable-binary
<bufferloss>
however, I'm not sure how to go about solving this on windows, I installed devkit, followed the instructions ala ruby dk.rb init; ruby dk.rb install;
<bufferloss>
is it possible to install the debugger on windows?
freerobby has quit [Quit: Leaving.]
psy_ has joined #ruby
softinio_ has joined #ruby
hamakn has joined #ruby
dseitz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Aova has quit [Read error: Connection reset by peer]
<chipotle>
anyone here try jetbrain's IDEs, either rubymine or intellij?
<chipotle>
what do you think, for someone new to programming and ruby?
<chipotle>
i was using sublime text 3, but the dev has been mia for over a year
Lexun has quit [Remote host closed the connection]
<bufferloss>
chipotle, sublime is just fine, a good majority of devs that I know use sublime (2 and 3)
<chipotle>
bufferloss: yeah, well who knows how much longer it'll last with the dev being unresponsive
<chipotle>
so i wanted to give rubymine or intellij was any good?
<bufferloss>
try it and see
<bufferloss>
I doubt sublime is going anywhere soon
<bufferloss>
unlikely to be entirely abandoned
<chipotle>
i don't think sublime is solely a text editor, since it has a full featured package manager. but i could be wrong
<bufferloss>
and that means... what? not much... what's your point?
<bufferloss>
sublime is fine, if you want to use something else out of fear, go ahead
ta has joined #ruby
agrinb has quit [Remote host closed the connection]
Rayford has quit [Quit: Rayford]
<chipotle>
bufferloss: i'm just saying i don't really see a clear distinction between an IDE and text editor, jeeze
<chipotle>
so hostile
swgillespie has joined #ruby
<bufferloss>
you didn't say that, you said something else entirely
<bufferloss>
that is more direct and to the point
Aova has joined #ruby
<bufferloss>
an IDE typically provides "language understanding" types of features, as in the IDE will often read the source code and "process" it in a way that the compiler/interpreter would in order to give you "extra" features like completion
<bufferloss>
it's not worth it in my opinion given the bloat you have to deal with by using an editor that's fundamentally built on top of an already bloated piece of Java software
<bufferloss>
though really only you can answer whether you like it, by trying it
<bufferloss>
so, go try it
russt has joined #ruby
<bufferloss>
a text editor is typically seen to be lightweight and mostly language and build system agnostic - it provides facilities for editing text, any text, of any language, rather than focusing on language and compiler/interpreter/environment specific features
<bufferloss>
most people who think they want an IDE just haven't ever used a good text editor, or haven't actually learned the advanced capabilities of the text editor they use
Sawbones has quit [Remote host closed the connection]
<chipotle>
i see
jpstokes has quit [Remote host closed the connection]
<chipotle>
well, it's a complicated decision, heh
ta has quit [Ping timeout: 256 seconds]
<bufferloss>
not really
<bufferloss>
just pick one, use it
<bufferloss>
you won't be impacted as much as you think you will
<bufferloss>
especially if you're new
Sawbones has joined #ruby
<chipotle>
what text editor do you use?
<chipotle>
i heard good things about atom, but it's slowww
<bufferloss>
I have a co-worker who uses atom and loves it, but yes, even he acknowleges that it is slow
<bufferloss>
chipotle, you don't want to use the editor I use, trust me
x77686d has quit [Quit: x77686d]
ta has joined #ruby
<chipotle>
vim?
<bufferloss>
chipotle, yup
<chipotle>
heh
russt has quit [Quit: russt]
<bufferloss>
chipotle, I use rubymine occasionally for the gui debugger, cuz it's nice, but even then I hardly use it much
nuck has quit [Quit: Computer has gone to sleep.]
<bufferloss>
puts and binding.pry are good enough for most of my needs
<dunpeal>
basically, I have /dir/bar.rb, from which I'm trying to `require "foo"`, but I want it to required /dir/foo.rb, NOT the gem library foo.rb
marcdel has quit []
pdoherty has quit [Ping timeout: 245 seconds]
<Senjai>
dunpeal: I dont recommend require_relative, but require_relative
<Senjai>
dunpeal: You should have a better autoload system setup. Your $LOAD_PATH should have your application at the top of it
<chipotle>
do any of you guys use vagrant to develop, or do you do it the old fashion way: VM that you share after taking screenshots?
<Senjai>
chipotle: !use
<helpa>
chipotle: Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
softinio_ has quit [Remote host closed the connection]
<Senjai>
Also, no, no reason to use vagrant
<Senjai>
only when developing on rails for rails
<dunpeal>
Senjai: amazingly, `require_relative "foo"` doesn't work
<Senjai>
dunpeal: You're probably not using it correctly
davedev24_ has quit []
<dunpeal>
require_relative 'gettc'
<dunpeal>
inside bar.rb
<Senjai>
dunpeal: I suggest reading the documentation for it.
<dunpeal>
OK, thanks
dunpeal has left #ruby [#ruby]
<chipotle>
and is railscasts something a beginner should listen to?
<Senjai>
chipotle: Do you know ruby?
iamninja has quit [Quit: ZZZzzz…]
<bufferloss>
chipotle, I've found little need for VMs lately - it was a bigger deal a few years ago
<bufferloss>
chipotle, only real reason to use a VM is if you're on a non-sane OS like windows
Sawbones has quit [Remote host closed the connection]
<Senjai>
bufferloss: WE DONT TALK ABOUT HEATHENS HERE
<Senjai>
:P
Xeago has joined #ruby
<chipotle>
Senjai: i read learn to program by chris pine
<chipotle>
now i'm on chapter one of the well grounded rubyist...
<Senjai>
chipotle: Before thinking about rails, I'd get ruby down unless you're already seasoned in another language.
<Senjai>
chipotle: I would suggest doing rubykoans before reading that book
<Senjai>
I would also suggest programming ruby 2.0 from pragprog over the well grounded rubyist should you choose a book
<chipotle>
why do you recommend rubykoans over that book? i thought it was highly regarded?
<chipotle>
why?
Xeago_ has quit [Ping timeout: 245 seconds]
<chipotle>
they came out with a new edition that supports ruby 2.x
<chipotle>
rather than the first ed that was 1.9
<Senjai>
chipotle: Because, rubykoans is interactive, you work through the examples, a book is a book. rubykoans will tell you if you want to continue with ruby or not
<Senjai>
and gives you a working knowledge faster than a book
<Senjai>
one you can go to rails with.
<bufferloss>
books are overrated these days
<chipotle>
ok
<chipotle>
how long does it take to go through it?
josephndenton has quit [Ping timeout: 256 seconds]
<Senjai>
If, at that time you want a deeper look, read programming ruby.
<bufferloss>
there's so many good tutorials out there freely available on the internet
<chipotle>
i'm looking at their site now
<Senjai>
chipotle: Our juniors take about a day and a half
metadave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
russt has joined #ruby
lkba has joined #ruby
<Senjai>
bufferloss: Eh, I like books
ta has joined #ruby
<Senjai>
bufferloss: Tutorials can teach you SO many bad habits
snath has quit [Ping timeout: 245 seconds]
<bufferloss>
so can books
<Senjai>
bufferloss: Unless you have someone you work with that can tell you the guy is an idiot
<bufferloss>
indeed, same with books
<Senjai>
bufferloss: Correct, but books are typically more peer reviewed and complete.
<vandemar>
pragprog doesn't drm-cripple their books
<chipotle>
*why not wh
<Senjai>
Because you also get the pdf, + free updates, + in any format for any reader, + pragprog is an AWESOME company headed up by dave thomas
<Senjai>
+ drm free as mentioned
<chipotle>
ah, okay
<Senjai>
and amazon rapes publishers, which in turn have to rape authors
<chipotle>
how long is it on average, that i'll be good enough with ruby to do some rails or sinatra and build a simple web app?
<chipotle>
(i have a drupal dev background, trying to learn something nicer for the future)
<Senjai>
chipotle: Avoid sinatra, really. It's good for specialized things, but you'll have to generate a lot of boilerplate
ta has quit [Ping timeout: 276 seconds]
<Senjai>
chipotle: Iuno, depends on the definition of simple.
<Senjai>
and your ability to learn
<Senjai>
I wouldnt even ask the question
<Senjai>
just do what you want to
diegoviola has quit [Quit: WeeChat 1.1]
<Senjai>
if you dont want to learn it, dont :/
<chipotle>
Senjai: oh, i thought the opposite; sinatra was well liked and rails was losing favor
<chipotle>
ok, i'll stick to rails!
<Senjai>
rails is certainly not losing favor.. Sinatra is well liked, but its lower level then I'd advise. It's pretty much just a wrapper for rack.
leonshalimov has joined #ruby
ta has joined #ruby
mikepack has joined #ruby
techietrash has quit [Quit: Bye! <(^_^<)]
<vim-shim>
I teach at a web dev boot camp, and we get our students to make a command-line app, a sinatra app, and then finally do it in rails so they can appreciate all the magic they're getting in the background for free.
<chipotle>
how do you recommend learning rails?
crueber has joined #ruby
<chipotle>
what i mean by simple, basically a forward facing marketing website for a b2b company using twitter bootstrap
<chipotle>
that's basically what i do now in drupal
<longfeet>
aw fuk i want some chipotle but they closed 2 hours ago
<chipotle>
longfeet: ilu2
<Senjai>
vim-shim: Sinatra is totally not necessary imo
<Senjai>
chipotle: write code. It's that simple.
<longfeet>
also i ran of chipotle-away
<vim-shim>
It's a nice way to make them pay attention to the request/reponse model and put their toes in the water without all of Rails.
j0n3 has quit [Read error: Connection reset by peer]
<chipotle>
what's considered a good book for learning rails once i have ruby down?
<Senjai>
vim-shim: I mean, I guess. But once you step into rails, a large amount of that is stuff you never need to think about for a very long time.
<Senjai>
Until you need custom middleware and the like
<Senjai>
chipotle: Not agile web development with rails
<vim-shim>
Anyone that ever got halfways good at Ruby or Rails has read the docs until they can recite method families in their sleep. If you want to learn it, you have to make yourself like it.
<bufferloss>
so I guess you didn't click that one then
britt_ has joined #ruby
<chipotle>
well, there is a MEAP of rails 4 in action, so i bought that. thanks all
<bufferloss>
zomg
<chipotle>
bufferloss: yes i did!
<chipotle>
if you go to that page, it asks you to sign in or sign up!!
<bufferloss>
uhh, wtf are you talking about, rails guides doesn't require sign up
britt_ is now known as p3ery
lamasnik has quit [Ping timeout: 255 seconds]
<bufferloss>
chipotle, you know what you are? you're an askhole... a person who asks questions but doesn't actually care about the answers and just does what he wants or was originally going to do anyway
bronson has joined #ruby
<bufferloss>
"hey what's your opinion on foo? ok cool I don't care I did bar anyway"
<bufferloss>
chipotle, go write some code, for serious
<vim-shim>
wax on, wax off!
ghr has quit [Ping timeout: 245 seconds]
russt has quit [Quit: russt]
<chipotle>
bufferloss: what the fuck are you talking about? i downloaded rubykoans and i bought the rails 4 book as a MEAP from manning. neither of which i heard of before coming here. before coming here i had the well grounded rubyist and planned to use that
<vim-shim>
Even retyping source code is better that agonizing over which book to read first or next.
<chipotle>
you could just chill out
<Senjai>
chipotle: !gts
<helpa>
chipotle: When you think we're not being helpful, or helpful enough.. See this: http://youtu.be/N9rJJSiUy0I
<chipotle>
and then you call me a liar because when i go to a page you linked, it asks you to sign up
<bufferloss>
chipotle, I'm talking about the fact that you obviously didn't take the 2 seconds require to go look at this page guides.rubyonrails.org/getting_started.html
<bufferloss>
chipotle, NO guides.rubyonrails.org/getting_started.html does NOT fucking require sign up you fool
Xeago has quit [Remote host closed the connection]
commmmodo has quit [Quit: commmmodo]
<vim-shim>
still better than ##javacript
<timanema>
vim-shim: I left that place because of bad questions but if there are lots of js fights maybe I will go back
<timanema>
vim-shim: War of the Frameworks
<bufferloss>
rails vs sinatra... discuss...
tyfighter has quit [Quit: tyfighter]
<timanema>
bufferloss: each are a tool to be used in specific situtaions
<timanema>
like all tools
<timanema>
you dont use a hammer on a screw
LouisRoR has quit [Ping timeout: 245 seconds]
<bufferloss>
C++ vs Zend Framework vs websockets... discuss...
<Senjai>
bufferloss: Rails is just sinatra++, When you dont need rails, sinatra is fine
<vim-shim>
When all you have is an omakase framework...
<Senjai>
bufferloss: lolwhat
<bufferloss>
:)
<bufferloss>
WebGL vs MySQL... discuss
<vim-shim>
If you make anything remotely complex you're going to wind up want most of the rails goodies anyways, that said, I like wrapping utilities in small Sinatra apps.
<Senjai>
MySQL can run without a browser, therefore better
<vim-shim>
Also, it's declarative.
<bufferloss>
but webgl is 2.0 compatible!
<Senjai>
bufferloss: But it's not webscale
<bufferloss>
damn, you got me
<bufferloss>
wait, you're wrong, it's not webscale, but it *is* webscales!
vikram_ has quit [Quit: Connection closed for inactivity]
ta has joined #ruby
zwer has quit [Remote host closed the connection]
JohnBat26 has joined #ruby
zwer has joined #ruby
leonshalimov has joined #ruby
jonmorehouse has quit [Ping timeout: 245 seconds]
krz has quit [Ping timeout: 246 seconds]
JohnBat26 has quit [Client Quit]
krz has joined #ruby
Perceptes has joined #ruby
mehp has quit [Quit: Leaving]
hvxgr has quit [Ping timeout: 245 seconds]
dcarmich has joined #ruby
ta has quit [Ping timeout: 276 seconds]
leonshalimov has quit [Ping timeout: 255 seconds]
greenbagels_ has quit [Read error: Connection reset by peer]
cjim_ has joined #ruby
hiyosi has joined #ruby
bthesorceror has quit [Quit: bthesorceror]
speaking1ode has joined #ruby
cjim has quit [Ping timeout: 245 seconds]
speakingcode has quit [Ping timeout: 276 seconds]
symbol has quit [Ping timeout: 255 seconds]
bthesorceror has joined #ruby
skj3gg has quit [Quit: ZZZzzz…]
jerematic has joined #ruby
jonmorehouse has joined #ruby
Meeh has quit [Ping timeout: 264 seconds]
Hijiri has quit [Ping timeout: 245 seconds]
Meeh has joined #ruby
ghr has joined #ruby
jerematic has quit [Ping timeout: 252 seconds]
softinio has quit [Quit: Connection closed for inactivity]
lampd1 has quit [Remote host closed the connection]
bronson has joined #ruby
ghr has quit [Ping timeout: 256 seconds]
mikepack has joined #ruby
sinkensabe has joined #ruby
ShadySQL has joined #ruby
michael_mbp has quit [Excess Flood]
ShadySQL has quit [Client Quit]
tsnz has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
michael_mbp has joined #ruby
mikepack has quit [Ping timeout: 245 seconds]
Hijiri has joined #ruby
lxsameer has joined #ruby
tsnz has quit [Ping timeout: 240 seconds]
oo_ has joined #ruby
Sawbones has joined #ruby
_matt has joined #ruby
hvxgr has joined #ruby
cjim_ has quit [Quit: (null)]
yfeldblum has joined #ruby
Aova has quit [Read error: Connection reset by peer]
Sawbones has quit [Ping timeout: 265 seconds]
ozialien has quit [Ping timeout: 246 seconds]
lkba_ has joined #ruby
lkba has quit [Read error: Connection reset by peer]
<Senjai>
plop!
rippa has joined #ruby
Areessell has joined #ruby
Aova has joined #ruby
yfeldblu_ has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
fgo_zzZz has quit [Ping timeout: 256 seconds]
swgillespie has joined #ruby
Eiam_ has quit [Quit: (╯°□°)╯︵ ǝpouǝǝɹɟ]
MasterPiece has joined #ruby
neoxquick has joined #ruby
ponga has joined #ruby
Vivex has joined #ruby
Dopagod has quit [Remote host closed the connection]
_5kg has quit [Ping timeout: 246 seconds]
chrishough has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jonr22 has joined #ruby
tyfighter has quit [Quit: tyfighter]
<chipotle>
hey Senjai !
<chipotle>
how are you?
<chipotle>
i've been coding :)
frek818 has joined #ruby
hirzu has joined #ruby
pwnz0r has joined #ruby
ponga has quit [Remote host closed the connection]
jonr22 has quit [Ping timeout: 255 seconds]
ponga has joined #ruby
xivusr has quit [Ping timeout: 264 seconds]
claptor has joined #ruby
frek818 has quit [Quit: frek818]
einarj has joined #ruby
bthesorceror has quit [Quit: bthesorceror]
ponga has quit [Ping timeout: 264 seconds]
p3ery has quit [Quit: (null)]
ptrrr has joined #ruby
fgo_zzZz has joined #ruby
einarj has quit [Ping timeout: 252 seconds]
martinium has joined #ruby
martinium has quit [Remote host closed the connection]
martinium has joined #ruby
martinium has joined #ruby
martinium has quit [Changing host]
j416 has quit [Quit: o/]
ghr has joined #ruby
fgo_zzZz has quit [Ping timeout: 255 seconds]
j416 has joined #ruby
<shevy>
in php?
<vandemar>
last line of about_symbols.rb "Why is it not a good idea to dynamically create a lot of symbols?" is that refering only to ruby pre-2.2?
<shevy>
symbols will not be garbage collected vandemar
<vandemar>
that's changed with 2.2 hasn't it?
<shevy>
hmm
ph8 has joined #ruby
<vandemar>
if that's the reason, koans must be updated!
jY has joined #ruby
bronson has joined #ruby
dc has quit [Read error: Connection reset by peer]
<jY>
pretty new to ruby.. is there a one liner to do like if i have "/path/to/foo/bar" have it become "/path/to/foo" pretty much remove the last dir in a string
<shevy>
vandemar are you sure that it has changed?
<porfa>
so, blablab.at_css(‘.lol’) has some text elements.. how can i fetch only the first text element or the second?
ta has quit [Ping timeout: 276 seconds]
borromakot has joined #ruby
bronson has quit [Ping timeout: 244 seconds]
<porfa>
name="span" children=[#<Nokogiri::XML::Text:0x155a784 "69€">]> and name="span" children=[#<Nokogiri::XML::Text:0x155a004 "90€">] if i do balbalbal.text it outputs me both.. i only want to get the first,
<porfa>
i tried .first.value but no lucky
ponga has quit [Remote host closed the connection]
ponga has joined #ruby
thumpba has joined #ruby
<borromakot>
Hey guys, say I have a hash who's keys are objects, is there a way to have them not be instantiated unless they are accessed? For instance hash = {"key1" => Thing1.new(), "key2" => Thing2.new()} I don't want :new sent to Thing1 until I say hash["key1"].
<porfa>
!!! found it, ('.productPvp span[2]') for second and ('.productPvp span[1]’) for first!
Photism has quit [Quit: Leaving]
ta has joined #ruby
aswen has quit [Ping timeout: 245 seconds]
russt has quit [Quit: russt]
sigurding has quit [Quit: sigurding]
krz has quit [Ping timeout: 265 seconds]
ponga has quit [Ping timeout: 246 seconds]
thumpba_ has joined #ruby
arup_r has quit [Ping timeout: 256 seconds]
ramfjord has joined #ruby
j416 has quit [Ping timeout: 245 seconds]
avahey has quit [Quit: Connection closed for inactivity]
ta has quit [Ping timeout: 245 seconds]
jgt2 has joined #ruby
thumpba has quit [Ping timeout: 240 seconds]
Aova has quit [Read error: Connection reset by peer]
ponga has joined #ruby
Zai00 has joined #ruby
defrang has joined #ruby
<shevy>
borromakot not from a direct hash I think; you could write a custom hash where you overrule the access-part
<shevy>
borromakot and then use a proc and run .call on it
j416 has joined #ruby
Aova has joined #ruby
bklane_ has quit [Remote host closed the connection]
bklane has joined #ruby
kenneth has joined #ruby
wallerdev has quit [Quit: wallerdev]
borromakot has quit [Ping timeout: 246 seconds]
neoxquick has joined #ruby
decoponio has joined #ruby
martinium has quit [Remote host closed the connection]
lkba has joined #ruby
bklane has quit [Read error: Connection reset by peer]
bklane has joined #ruby
ramfjord has quit [Ping timeout: 255 seconds]
lkba_ has quit [Ping timeout: 255 seconds]
patric100e99 has joined #ruby
jonr22 has joined #ruby
Cache_Money has joined #ruby
Gmind has joined #ruby
ta has joined #ruby
jgt2 has quit [Ping timeout: 245 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
Gmind has quit [Client Quit]
sigurding has joined #ruby
rbrs has joined #ruby
jonr22 has quit [Ping timeout: 256 seconds]
ta has quit [Ping timeout: 276 seconds]
shime has joined #ruby
patric100e99 has quit [Ping timeout: 264 seconds]
shashin has quit [Quit: shashin]
einarj has joined #ruby
arietis has joined #ruby
<arietis>
hey guys
doobi-sham-14807 has joined #ruby
<arietis>
i'm writing simple script in which i want to take some params from terminal input
<arietis>
how do i get input values?
<shevy>
commandline arguments are available in the array ARGV
<shevy>
it is better if you give the example how you invoke it
bklane has quit [Remote host closed the connection]
<arietis>
i do not want arguments, i want the script to ask for values via prompt
<Perceptes>
arietis: look into Kernel#gets
lkba has quit [Ping timeout: 255 seconds]
<shevy>
ah you want user input
<arietis>
yeah, thanks, gets works :)
einarj has quit [Ping timeout: 252 seconds]
jerematic has joined #ruby
RDash` has quit [Changing host]
RDash` has joined #ruby
RDash` is now known as RDash
ta has joined #ruby
vish has joined #ruby
robbyoconnor has quit [Write error: Connection reset by peer]
robbyoconnor has joined #ruby
doobi-sham-14807 has quit [K-Lined]
oleo__ has quit [Quit: Verlassend]
jerematic has quit [Ping timeout: 245 seconds]
ta has quit [Ping timeout: 276 seconds]
siggy has joined #ruby
vish has quit [Quit: vish]
kalusn has joined #ruby
fgo_zzZz has joined #ruby
ta has joined #ruby
oleo has joined #ruby
function_ has joined #ruby
LWade has quit [Ping timeout: 255 seconds]
neoxquick has quit [Ping timeout: 244 seconds]
connor_goodwolf has joined #ruby
_matt has quit [Ping timeout: 272 seconds]
jonesthedolphin has joined #ruby
function90 has quit [Ping timeout: 256 seconds]
ta has quit [Ping timeout: 276 seconds]
fgo_zzZz has quit [Ping timeout: 264 seconds]
maximski has joined #ruby
hgl has quit [Max SendQ exceeded]
ghr has joined #ruby
hgl has joined #ruby
hgl has quit [Max SendQ exceeded]
duncannz has quit [Remote host closed the connection]
hgl has joined #ruby
softinio has joined #ruby
hgl has quit [Max SendQ exceeded]
ghr has quit [Ping timeout: 245 seconds]
hgl has joined #ruby
nrsk has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hgl has quit [Max SendQ exceeded]
hgl has joined #ruby
_matt has joined #ruby
frogsy has joined #ruby
softinio has quit [Ping timeout: 245 seconds]
hgl has quit [Max SendQ exceeded]
hgl has joined #ruby
apeiros_ has quit [Remote host closed the connection]
krz has joined #ruby
apeiros_ has joined #ruby
hamakn has joined #ruby
hgl has quit [Max SendQ exceeded]
hgl has joined #ruby
bMalum has joined #ruby
LouisRoR has joined #ruby
hgl has quit [Max SendQ exceeded]
bonhoeffer has joined #ruby
hgl has joined #ruby
spider-mario has joined #ruby
Mia has joined #ruby
sinkensabe has quit [Remote host closed the connection]
<ekem>
yeah wanted to make sure google couldnt solve it before i went full irc
<jhass>
/libffi-3.2.1/.libs/libffi.a
<jhass>
that thing
wow has joined #ruby
<jhass>
you need to recompile it with that flag
<jhass>
not the thing that throws the error
<wow>
Hi guys! I want to learn how to program in Ruby. I have a basic understanding of C and Scheme. Is there some sort of de facto reference book or a tutorial?
<ekem>
maybe this is a linux question not a ruby question at this point, not sure how to do that with a package manager
Aova has joined #ruby
<ekem>
is it possible or just compile that sucker elsewhere
<ddv>
Just do a simple Google search..... wow. The Ruby Progamming Language book is pretty good
<wow>
Okay, thank you ;-)
<ekem>
check stack overflow wow, there should be one question answering that
<wow>
I usually refrain from going on stack overflow after seeing how people answer questions(in C at least)
<ddv>
wow, You should try to use Google for everything in life
shock_one has joined #ruby
<ekem>
well, dont ask a question just search
<wow>
No, I mean other questions
<ekem>
that will be a topic that gets closed real quick
<wow>
The answers to them seem strange and lenghty
<wow>
lengthy*
<ekem>
hehe, be thankful :)
<wow>
What about codecademy?
try has joined #ruby
jgt2 has joined #ruby
<ekem>
all resources are good resources man
<ddv>
pick a book, develop something all you need
ta has quit [Ping timeout: 245 seconds]
<wow>
Alright, thanks.
<ekem>
irc bots are a good place to start btw ;)
<wow>
Cool! I have already made a little TCP server in Ruby
<wow>
like a login
<ekem>
wow++
<shock_one>
Hi. I have 4 users. Now, I want to perform a hundred tasks each of which requires a user. However, it must not happen that two threads use the same user at the same time. A thread should take a user from a pool, perform its job, and return the (updated)user back. Only after that the user can be taken again. The closest thing I've found is Celluloid PoolManager, but it seems that PoolManager doesn't allow to obtain objects from the pool of fr
<shock_one>
ee ones and then release them; instead it assumes that objects in the pool are stateless, and therefore equall. Can you point me to any solution?
<wow>
shock_one: You are a fast typer?
<shock_one>
I prepared my message in VIM, because it allows me to edit quickly.
<crome>
shock_one: if you want something really simple just use a threadsafe queue, pop users from it and then put them back once a job is finished
tmtwd has quit [Remote host closed the connection]
<jhass>
shock_one: I'd just use a Queue, pop and unshift it back when done
<jhass>
ah, too slow
<crome>
nice try ;)
<shock_one>
crome: I would like the solution to incorporate handling of the situation when there is no free objects in the queue. Maybe to lock till it gets one.
chinmay_dd has quit [Quit: Connection closed for inactivity]
<jhass>
but it's also commonly used as name for a thread safe datastructure
wow has left #ruby [#ruby]
<shock_one>
Ideally, I'd like the data structure to provide random access, but FIFO is acceptable.
<jhass>
that blocks on operations that obtain an element
jeff-ooh has quit [Remote host closed the connection]
<jhass>
well, you could fairly easily code that with an array, a marker whether the user is given out and a condition variable
<jhass>
a multi-lock so to say
Flcn has quit [Quit: Be back later ...]
<shock_one>
That part is easy. But now I need to lock till an objects gets in manually, and raise after a timeout, and maybe something else unexpected. A big deal.
wow has joined #ruby
<wow>
this may not be ruby related but where can i learn the .wav format so i can write to audio files using ruby
<jhass>
raising after a timeout is inherently thread unsfafe
<jhass>
don't do it
<crome>
wow: on google
<wow>
crome: i tried searching and i couldn't find anything relevant
tsnz has joined #ruby
<shock_one>
You see, I'd have a problem already.
dc has joined #ruby
dc has quit [Remote host closed the connection]
hirzu has quit [Client Quit]
<jhass>
wow: I think there's a gem or too, the format is called PCM iirc, so try rubygems.org with those terms and read the code (or just use one)
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xivusr has joined #ruby
LWade has joined #ruby
<wow>
eam: My bot will connect without warnings or errors BUT
<wow>
my program doesn't work as expected
<wow>
if I type !8ball it won't react
lessless has joined #ruby
oleo has quit [Quit: Verlassend]
anaeem1 has joined #ruby
bklane has joined #ruby
<eam>
wow: how familiar are you with so-called printf debugging?
Alina-malina has quit [Ping timeout: 240 seconds]
Alina-malina has joined #ruby
ponga has quit [Quit: Leaving...]
_5kg has quit [Ping timeout: 240 seconds]
ta has quit [Remote host closed the connection]
ta has joined #ruby
axilla has joined #ruby
spider-mario has quit [Ping timeout: 264 seconds]
<axilla>
morning all, i'm trying to retrieve some data from an API and display images that i get back.. if i search for a single album it works just fine, but if i search for just a band i get a [] nil:nilclass error https://gist.github.com/travisdmathis/8d9f19291d3fc0bc4fa5
bklane has quit [Ping timeout: 244 seconds]
<axilla>
in the gist i put the output of the search to console and am getting the right data back
<axilla>
so why when i go to display it in my view do i get an error.
<axilla>
if i remove the image it displays the search data just fine.
spider-mario has joined #ruby
shashin has joined #ruby
bthesorceror has joined #ruby
DadoCe has joined #ruby
claptor has joined #ruby
<jhass>
axilla: maybe take a look at the full trace on the rails error page
<jhass>
it's hard to guess where exactly the error is happening from your gist
DadoCe has quit [Read error: Connection reset by peer]
speakingcode has quit [Ping timeout: 272 seconds]
oleo has joined #ruby
<axilla>
i did, i'm not understanding why its throwing an error at all
<axilla>
the data is all there
<jhass>
what's the last line of the full trace?
shashin has quit [Ping timeout: 245 seconds]
xivusr has quit [Ping timeout: 245 seconds]
<axilla>
i added the full trace to the gist
<axilla>
refresh
mitchellhenke has joined #ruby
<__chris>
does ruby support ?: ternary? for example: foo = some_nil_value ?: 10
<__chris>
im aware of || but that will return the nil value as well
<jhass>
wow: also note that @sock.close will be called at the point you define the literal, not when you access the value
<jhass>
wow: you might want to assign a lambda or a proc there instead
<axilla>
there is a nil value for the cover if it doesn't exist
<axilla>
i check for cover.blank? and set cover to a image
<axilla>
but still same issue
haroldwu has joined #ruby
kl__ has joined #ruby
kl has joined #ruby
leonshalimov has quit [Ping timeout: 255 seconds]
jonesthedolphin has joined #ruby
speakingcode has joined #ruby
swgillespie has joined #ruby
swgillespie has quit [Client Quit]
Aova has quit [Read error: Connection reset by peer]
wallerdev has joined #ruby
<jhass>
axilla: I still don't really know your real line numbers, but I guess that the error is happening on line 6 of your gist, before you even output the values
russt has joined #ruby
<jhass>
axilla: my suspicion is that mbid.first is nil because mbid is an empty array
rubytor has quit [Ping timeout: 245 seconds]
<axilla>
line 9 sorry is cover = coverart_archive
<jhass>
yes, so as I said
<axilla>
right..
<axilla>
two people say that now
kalusn has joined #ruby
<axilla>
interesting
<axilla>
not sure how that is.
<jhass>
oh fuck
<jhass>
how rude
dc has joined #ruby
<jhass>
axilla: Please do not crosspost without at least telling so. Experience shows that people don't bother to inform the other channels of provided solutions, therefore it is considered rude.
dc has quit [Remote host closed the connection]
defrang has joined #ruby
Aova has joined #ruby
tyfighter has joined #ruby
n80 has quit [Quit: Leaving]
hamakn has quit [Remote host closed the connection]
quimrstorres has joined #ruby
ellisTAA has joined #ruby
bonhoeffer has joined #ruby
rbennacer has quit [Remote host closed the connection]
tyfighter has quit [Ping timeout: 256 seconds]
bmuk has joined #ruby
rubytor has joined #ruby
<bmuk>
Hello all, trying to set up wagn, and wagn seed is complaining that it can't find jasmine. I have tried to export RUBYLIB=$(which jasmine) to no avial
<bmuk>
avail*
jonr22 has quit [Remote host closed the connection]
_5kg has joined #ruby
kenneth has joined #ruby
bonhoeffer has quit [Ping timeout: 240 seconds]
<__chris>
i dont understand the difference between arr.map and arr.collect.. could someone explain it to me?
rbennacer has joined #ruby
quimrstorres has quit [Remote host closed the connection]
<jhass>
__chris: collect is 4 chars more to type
<jhass>
they're aliases ;)
<__chris>
jhass, ah, ok. thanks.
<wow>
This gives me an error
<wow>
if user.eql? @logininfo[0] && password.eql? @logininfo[1]
<wow>
unexpected tIVAR, expecting keyword_then or ';' or '\n'
<__chris>
i must be blind or just confused by the docs. Under the "map" section it shows an example using collect. Its clear to me now. thanks
<jhass>
wow: you need parens around the method calls in this case
<axilla>
jhass: thanks tracked down the issue, you were right, when trying to get the mbid for a release the release doesn't exist in the database i'm using
Alina-malina has quit [Ping timeout: 255 seconds]
commmmodo has quit [Client Quit]
try has quit [Ping timeout: 244 seconds]
argoneus has joined #ruby
<argoneus>
hello
<argoneus>
is there a small and simple framework? I need a page with login/logout and a page to add/delete items which will be added/removed from db too
<argoneus>
rails seems too powerful for this
_5kg has quit [Ping timeout: 245 seconds]
<jhass>
many, most popular is sinatra
<epitron>
Sinatra with http basic authentication is was simpler, argoneus
<argoneus>
so instead of the pythonic all in one frameworks
ta has joined #ruby
<epitron>
Including forms
<argoneus>
I use sinatra for the web, haml for the templates, etc?
<epitron>
Kinda
<epitron>
Sinatra supports it natively
<jhass>
sinatra supports temple which supports about every templating language you know and don't know ;)
<epitron>
But you can choose
<argoneus>
oh nice
<wow>
jhass: I have a question
<wow>
I've created a TCP server
<wow>
is it possible for the client that connects to it to download files?
<epitron>
You just say, "haml :file" at the end of the method to render that file
<epitron>
Or "erb :file"
<argoneus>
and what about SQL / SQLite interfacing?
<epitron>
Or sass, etc
<argoneus>
does sinatra do that too or do I need something more
<jhass>
wow: TCP sends bytes back in forth, the contents and structure of those bytes is up to your application
<epitron>
No, that's not built in
Alina-malina has joined #ruby
<jhass>
you can easily use something like Sequel with it for that though
<epitron>
You need to use active record or sequel or something manually
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
<epitron>
What's that other one
<epitron>
It's like ar, but with different migrations
<jhass>
sequel has migrations too
<epitron>
Datamapper
<epitron>
That one makes more sense than AR or sequel I think
<epitron>
Sequel is too simple, and AR is too complex
ta has quit [Ping timeout: 264 seconds]
<jhass>
I don't find Sequel too simple
<jhass>
you can do models too
<epitron>
Oh wait
<epitron>
Yes :)
<ellisTAA>
i need to add two instance variables to a hash. i’m trying this name_of_hash [:@variable1] = @variable 2 …. but when i try that it just enters @variable1 & @variable 2
<epitron>
DM has migrations though
<epitron>
argoneus: what's your data model look like?
<jhass>
ellisTAA: without the space before the [
<argoneus>
epitron: nothing fancy, my site is basically something like
ta has joined #ruby
<argoneus>
a database of usernames which a separate script grabs info for and saves it to the db, and a website frontend that shows this list and the info, and a simple admin interface to add/remove usernames from the db
anaeem1 has quit [Remote host closed the connection]
<ellisTAA>
jhass: i acutally wrote it without the space…
<argoneus>
I'm going to the first part with python because scraping with that is really easily
<argoneus>
and I wanted to try using ruby for the website thing
tus has joined #ruby
<argoneus>
but I've never really done this before and I'm not sure what would be a good idea to start with, I worked with Flask before
<jhass>
ellisTAA: then maybe make a gist with actual code that illustrates your issue and your expected behavior
<wow>
if an index, let's say at 9 in a string does not exist
<epitron>
argoneus: It's 6 years old, so some Sinatra things may have changed, but it should give you a good idea of how to do what you want
<wow>
so jhass
_maes_ has joined #ruby
nrsk has joined #ruby
<wow>
what does test if a script is nil
<wow>
var*
<wow>
variable*
<argoneus>
oh
<argoneus>
thanks epitron
trampi has joined #ruby
<jhass>
ellisTAA: the key should be the value of @keyword, not the symbol :@keyword
arup_r has joined #ruby
<jhass>
wow: just if foo to test if it's not nil or false and if foo.nil? to test whether its value is nil
bjornar has quit [Ping timeout: 240 seconds]
<wow>
okay jhass
bthesorceror has quit [Quit: bthesorceror]
<wow>
that seemed to fix it
<wow>
but
<ellisTAA>
jhass: thanks
<wow>
Download attempt ... never gets executed
<wow>
if it isn't nil
nicolastarzia has quit [Ping timeout: 244 seconds]
<epitron>
argoneus: I mean, it still works out of the box, but there may be a couple new Sinatra things that make things look a tiny bit prettier
arup_r has quit [Client Quit]
<jhass>
wow: how to you verify that assumption?
<argoneus>
epitron: you used raw css?
<trampi>
rubocop rates this method as too complex :-/ (Assignment Branch Condition size for create is too high. 17.15) https://gist.github.com/trampi/82048ddf6d87cf07c68a any ideas how to make it simpler?
<wow>
jhass
<wow>
if I type download it will work
bthesorceror has joined #ruby
<wow>
com[9].nil? is executed because it is nil
arup_r has joined #ruby
<wow>
but if I do something such as
<wow>
download file
tyfighter has joined #ruby
<wow>
it will give me the invalid command thing that is parsed
<epitron>
argoneus: I just stole it from canonical's website :)
<epitron>
Copy paste
<argoneus>
oh
<argoneus>
I'm still confused about all these things
bjornar has joined #ruby
quimrstorres has joined #ruby
<argoneus>
like sass, coffeescript, rakefiles, sinatra
<argoneus>
how to make them work together
tiwillia has quit [Ping timeout: 255 seconds]
<argoneus>
I should probably figure that out first
<jhass>
wow: that's because com.casecmp("download") isn't a partial comparision, it wants exactly that string
<epitron>
Those are all templates
tiwillia has joined #ruby
<jhass>
wow: you may want command.downcase.start_with? "download"
<epitron>
Except rake and Sinatra
<epitron>
:)
<argoneus>
is rakefile like a makefile but for ruby?
<wow>
Thank you jhass.
<argoneus>
so I have all the source files etc
<argoneus>
and the rakefile compiles them to proper things?
<epitron>
No..
<argoneus>
I mean
<argoneus>
like I have a .sass
<epitron>
Rake is just for running scripts
<argoneus>
and I tell it "compile the sass and put it in this dir"
<argoneus>
like that?
<epitron>
It could compile your sass
<wow>
One more question
<wow>
How do I transfer raw bytes, such as maybe an mp3 file to a client?
<epitron>
But people use rake to do any admin task
<argoneus>
admin task such as..?
<epitron>
Running tests, making gems...
<argoneus>
ah
<argoneus>
hmm
<epitron>
Cleaning up databases
<argoneus>
ruby seems interesting
<epitron>
Running migrations
<argoneus>
does Sinatra give me a clear folder structure?
<jhass>
wow: bytes or buffers are in ruby represented through a string with the encoding ASCII-8bit (which is also aliased to binary)
<epitron>
Yep
<argoneus>
oki
<argoneus>
thanks I'll check it out later
<epitron>
Views, public, lib
<argoneus>
these are things I can read in a tutorial probably
enebo has quit [Quit: enebo]
<epitron>
Yep
<jhass>
wow: so File.read('foo.mp3', encoding: 'ASCII-8bit') should give you a string that you can send over the socket
<wow>
but doesn't the user require permission to send that?
<wow>
receive it*
<epitron>
Can't you just read it in binary mode?
Rayford has joined #ruby
dc has joined #ruby
dc has quit [Remote host closed the connection]
<jhass>
wow: "the user"?
<wow>
let's say someone connects to my server
<wow>
they want to download something from it
ta has quit [Ping timeout: 276 seconds]
<wow>
wouldn't they need elevated permissions for them to receive it?
<wow>
they're receiving files from an otherwise unknown host
<jhass>
again, tcp just shuffles bytes from one end to the other
<wow>
okay.
<wow>
but where is that file saved?
<jhass>
it's up to the client & server implementations when to send bytes, when to receive bytes and what to do with them
nateberkopec has joined #ruby
<wow>
D:
hamakn has joined #ruby
ARCADIVS has joined #ruby
<jhass>
it sounds like you maybe want a higher level protocol like ftp or sftp
<wow>
not really
<jhass>
or even just http
<wow>
I wanted to make my own protocol, for an ARG
tchebb has quit [Read error: Connection reset by peer]
britt_ has joined #ruby
<jhass>
so, that question you asked is exactly what you need to answer in the protocol design
<shevy>
jhass are you working on some project?
ta has joined #ruby
tchebb has joined #ruby
britt_ has quit [Client Quit]
<jhass>
shevy: toying with writing an IRC bot in crystal
<jhass>
it can already run crystal code in a sandbox :P
p3ery has joined #ruby
ghr has joined #ruby
<epitron>
Crystal? :O
bmuk has quit [Ping timeout: 244 seconds]
<__chris>
is %w() the convention or is %w{} ? In practice i usually see %w() but in the docs i see %w{}
<epitron>
Is that like a generalization of ruby?
<jhass>
epitron: no, own language we heavily ruby inspired syntax
<epitron>
__chris: my convention is %w[]
<jhass>
epitron: but statically typed and compiled to native code
<jhass>
epitron: plus type interference
<epitron>
Because it returns an array :)
<jhass>
so it feels sort of like ruby except that it's 20-50x faster :D
<shevy>
__chris I use %w() consistently
<wow>
so jhass
<wow>
how do I store the file in the current directory of the client?
<shevy>
__chris I dislike %w{} because it is syntax for hash and blocks
<shevy>
__chris %w also works :)
<__chris>
epitron, shevy - thanks. so it seems like there is no "wrong" answer here..
<jhass>
wow: you receive it into a string with encoding ASCII-8bit again, and then you can just write that string into a file with File.write
<shevy>
the ruby parser accepts a lot
<shevy>
it's a liberal thing
<wow>
okay, thank you
<shevy>
not like the python parser, this one is strict
<epitron>
jhass: that sounds neat
<epitron>
Link?
<jhass>
epitron: crystal-lang.org
<wow>
so jhass
<wow>
the client will be able to get the download by telnet or netcat?
oo_ has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 244 seconds]
<shevy>
50x faster
<shevy>
then it will destroy ruby
<jhass>
epitron: good state in case you wanted to contribute to a languages standard library btw ;)
ki0 has joined #ruby
<jhass>
epitron: still lots of holes to fill out, but the language itself starts to be usable
quimrstorres has quit [Remote host closed the connection]
<jhass>
epitron: did I mention that crystal is entirely written in crystal? ;)
<wow>
jhass: will client be able to receive it with telnet?
<jhass>
wow: that depends on how you define the protocol
<wow>
the UNIX implementation of telnet to be specific
tiwillia has quit [Ping timeout: 264 seconds]
<jhass>
not that telnet is kind of weird protocol
<epitron>
jhass: neat!
<jhass>
partially because it's very old
tiwillia has joined #ruby
arup_r has quit [Quit: Leaving.]
<jhass>
*note
<wow>
will it work regardless?
<jhass>
you can make it work, it's your protocol
arup_r has joined #ruby
ta has quit [Read error: Connection reset by peer]
<trampi>
crystal seems VERY interesting
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<trampi>
a "low-weight" compiled language
<shevy>
I used telnet to play MUDs in the old days
ta has joined #ruby
defrang has quit [Quit: defrang]
<shevy>
we had a green font on a black background
<epitron>
jhass: how long have you been making this?
johnzz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass>
epitron: I think they started about 2-3 years ago, first with a compiler written in ruby from which they bootstrapped the compiler written in crystal
nobitanobi has joined #ruby
<jhass>
they generate llvm bytecode and then just call llvm, so you can get tons of optimizations for free
<nobitanobi>
morning folks
Aova has quit [Read error: Connection reset by peer]
<nobitanobi>
given that I have an array A=[1,2,3] and a set of arrays B = [[3], [1,2], [1], [3,2,1]] - How could I order that second set so that the order is based on how many elements in each array appear in the array A?
<nobitanobi>
So the final order of B would be [[3,2,1], [1,2], [3], [1]]
<jhass>
you mean if in B there would be a 4, it would not count?
<wow>
jhass
<nobitanobi>
yep
<wow>
I understand you write it in a file
<wow>
but how do I write it in a file over a socket
quimrstorres has joined #ruby
_2_Alizay has joined #ruby
<nobitanobi>
trying to find the most similar arrays given an array
ki0 has quit [Remote host closed the connection]
<nobitanobi>
similarity being how many elements appear in the given array
<jhass>
nobitanobi: how would duplicates in B count, like [1, 1, 2 3] vs [1, 2, 3]
<nobitanobi>
no duplications allowed
ellisTAA has joined #ruby
<jhass>
.sort_by {|b| (a & b).size }.reverse I think
<wow>
jhass?
<jhass>
wow: first you receive it into a string
<jhass>
then you write the string
<nobitanobi>
jhass: thanks
<nobitanobi>
will try
jefus_ has quit [Ping timeout: 244 seconds]
<wow>
file = File.read("mpfile.mp3", encoding: 'ASCII-8bit') is what im currently doing
<wow>
i understand you write the string, but where?
<jhass>
nobitanobi: maybe b & a actually
_2_Michelle1123 has joined #ruby
Azure has quit [Max SendQ exceeded]
<nobitanobi>
thanks :)
<jhass>
wow: just like you send regular string to the socket
<_2_Michelle1123>
hi
snowpeas has joined #ruby
<nobitanobi>
it works jhass
<nobitanobi>
awesome
<jhass>
wow: it's an IO iirc, so you got .write .puts etc
Aova has joined #ruby
symbol has joined #ruby
<_2_Michelle1123>
ok
<wow>
client.puts file
<wow>
?
_2_Alizay has quit [Remote host closed the connection]
<wow>
where file is the File.read thing
ki0 has joined #ruby
Azure has joined #ruby
ta has quit [Ping timeout: 276 seconds]
<jhass>
for example
<jhass>
not that puts adds a newline
<jhass>
*note
<jhass>
can't type today :/
_2_Michelle1123 has quit [Remote host closed the connection]
tmtwd has joined #ruby
mloveless has joined #ruby
<wow>
eh
<wow>
i'll just do client.write then
<wow>
shouldn't append a newline
<ellisTAA>
can someone take a look at my gist and tell me if line 13 in spec.rb is a string or a hash? it looks like a hash bc it has => but the key isn’t using a symbol … https://gist.github.com/ellisTAA/af3ed9555ba32ed2c467
<wow>
that will work, right?
<jhass>
ellisTAA: it's a hash, any ruby object can be a hash key, not jsut symbols
<ellisTAA>
jhass: thank you
<jhass>
in this case the key is a string
ta has joined #ruby
<wow>
jhass
<wow>
client.write file
<wow>
will that casue any problems
<wow>
before i try it
<jhass>
wow: I'm not your potential problem predictor, we all learned through trial and error ;)
quimrstorres has quit [Remote host closed the connection]
EvanFreeman has joined #ruby
freerobby1 has joined #ruby
<wow>
will it wipe out my /dev/sr0
<wow>
?
<jhass>
wut?
<jhass>
what makes you think it could do that?
<wow>
I was right
<wow>
It wiped out my entire system
<jhass>
right...
<wow>
Luckily I was in a sandbox :)
adamski2600 has quit [Remote host closed the connection]
x77686d has joined #ruby
<jhass>
/dev/sr0 is your cd drive, if you troll, do it right ;)
<wow>
okay
freerobby1 has quit [Client Quit]
kostitas has joined #ruby
<wow>
will .wav files work as well?
oo_ has joined #ruby
<jhass>
are .wav files bytes?
<wow>
well every file has bytes
freerobby has quit [Ping timeout: 255 seconds]
<jhass>
and tcp does nothing but transporting a sequence of bytes from one end to the other ;)
<wow>
the beauty of TCP
giuseppesolinas has quit [Quit: This computer has gone to sleep]
<jhass>
yap, that's a bunch of bytes written to your pty
<wow>
I meant for the user to download it
<wow>
This is a download yes,
<wow>
transfering bytes
<wow>
but how do I write all this to a file on the users end?
Rayford has quit [Quit: Rayford]
ki0 has joined #ruby
<jhass>
by writing a client that supports your protocol and does that, or by implementing a protocol on the server side the user already has a client for that does that
chipotle has quit [Quit: cheerio]
dc has joined #ruby
dc has quit [Remote host closed the connection]
michael_mbp has quit [Excess Flood]
thatslifeson has quit [Quit: Leaving]
patric100e99 has quit [Ping timeout: 240 seconds]
<jhass>
you might get away with just redirecting stdout on the client side to some filee
oo_ has quit [Ping timeout: 264 seconds]
<jhass>
makes it hard to display messages to the user though
giuseppesolinas has joined #ruby
DrShoggoth has quit [Quit: Leaving]
<wow>
so telnet can't write transferred byte to files?
thatslifeson has joined #ruby
randiman has joined #ruby
<jhass>
I don't know
patric100e99 has joined #ruby
michael_mbp has joined #ruby
<jhass>
it probably can, it's a weird protocol
<jhass>
I never grasped it
TgMts has joined #ruby
<wow>
okay
pdoherty has joined #ruby
giuseppesolinas has quit [Client Quit]
<wow>
hmm
<wow>
zmodem and xmodem
ki0 has quit [Remote host closed the connection]
jpstokes has quit [Remote host closed the connection]
mikepack has joined #ruby
x77686d has quit [Quit: x77686d]
pdoherty has quit [Ping timeout: 245 seconds]
leonshalimov has joined #ruby
giuseppesolinas has joined #ruby
ta has quit [Read error: Connection timed out]
<wow>
is there also something in ruby that redirects IO
<wow>
so that it doesn't interrupt me inputting while my server is outputting things that are happening
rbennacer has quit [Remote host closed the connection]
dc has joined #ruby
dc has quit [Remote host closed the connection]
<ellisTAA>
hamster88: i’m using beginning ruby by peter cooper. rubymonk.com also helped me
<hamster88>
thank you ellisTAA , one more question, i don't like PHP much cos of its security flaws. So i can use the ruby on rails instead of it am i right?
<hamster88>
i mean i can use it ruby on rails for web development things... right?
ta has quit [Read error: Connection timed out]
<ellisTAA>
can u use RoR for web development? yeah i’m pretty sure. i’m new to all of this as well
ki0 has joined #ruby
sinkensabe has quit [Remote host closed the connection]
chipotle has joined #ruby
<hamster88>
I am developing a few new projects
ghr has joined #ruby
<hamster88>
so I am thought why not to start with ruby and give php a break
ta has joined #ruby
<ellisTAA>
good luck with it
<hamster88>
thanks to you too :)
_5kg has quit [Ping timeout: 246 seconds]
ninjazach has joined #ruby
<hamster88>
how did you find ruby as a language.. easy hard or normal?
rbennacer has joined #ruby
<jhass>
ellisTAA: merge takes a hash, you pass it a string. Your input is a hash, you handle it as if it's a string
dfinninger has joined #ruby
<jhass>
or it's a hash or a string rather
<jhass>
>> "foo" + nil
<eval-in_>
jhass => no implicit conversion of nil into String (TypeError) ... (https://eval.in/255053)
<jhass>
and that's that
Zai00 has quit [Quit: Zai00]
<ellisTAA>
jhass: i figured, hey this input could be a hash, if it is just merge it. why can’t i just write .merge(input) if input is a hash?
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
you know how this will end
<shevy>
atmosx won't understand a thing when I try to explain
<jhass>
mmh
<shevy>
do you really want to put him through this jhass
<shevy>
:-)
ta has quit [Ping timeout: 255 seconds]
* jhass
checks if he has popcorn
AlexRussia has quit [Ping timeout: 264 seconds]
<jhass>
I think so, yes
<shevy>
atmosx ok so jhass keeps track of the iteration level through the variable n, which is half the size of the array; then he compares it to 0
<shevy>
as input to slicer() he passes the Array [1, 2, 3, 4, 5, 6, 7, 8]
lessless has joined #ruby
<shevy>
and inside after the : he invokes itself, with a different array range
dfinninger has joined #ruby
<shevy>
atmosx wake up
Lucretia has left #ruby ["Leaving"]
<shevy>
aaaatmoooooosx!
nicolastarzia has quit [Ping timeout: 245 seconds]
leonshalimov has quit [Ping timeout: 252 seconds]
Zai00 has quit [Quit: Zai00]
ta has joined #ruby
codecop has joined #ruby
<shevy>
he is gone :(
<weaksauce>
shevy the base case is a little more subtle and might be confusing for a newbie. it relies on integer division vs floating point division. so size/2 is 0 when size is 1... 1/2 == 0 but 1/2.0 == 0.5
anaeem1_ has quit [Remote host closed the connection]
anaeem1_ has joined #ruby
<ddv>
hehe
Eiam_ has joined #ruby
JohnBat26 has joined #ruby
LWade has quit [Ping timeout: 252 seconds]
LWade has joined #ruby
JohnBat26 has quit [Client Quit]
duncannz has joined #ruby
frek818 has quit [Quit: frek818]
mrmargolis has joined #ruby
quimrstorres has quit [Remote host closed the connection]
perturbation has quit [Quit: Leaving]
sent1nel has quit [Remote host closed the connection]
RandyT has joined #ruby
nobitanobi has joined #ruby
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nobitanobi has quit [Client Quit]
dc_ has joined #ruby
dc_ has quit [Remote host closed the connection]
nobitanobi has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
FooMunki has quit [Quit: FooMunki]
ramblinpeck_ has joined #ruby
ta has quit [Ping timeout: 276 seconds]
parduse has quit []
JDiPierro has quit [Remote host closed the connection]
sinkensabe has joined #ruby
dotix has joined #ruby
nobitanobi has quit [Remote host closed the connection]
ghr has joined #ruby
lampd1 has joined #ruby
TgMts has quit [Quit: No Ping reply in 180 seconds.]
kalusn has quit [Remote host closed the connection]
ki0 has quit [Remote host closed the connection]
backhoe has joined #ruby
TgMts has joined #ruby
vikram_ has joined #ruby
ki0 has joined #ruby
LWade has quit [Ping timeout: 245 seconds]
nanoyak has joined #ruby
LWade has joined #ruby
jgt2 has quit [Ping timeout: 246 seconds]
gsd has joined #ruby
sinkensabe has quit [Ping timeout: 244 seconds]
ghr has quit [Ping timeout: 245 seconds]
anaeem1_ has quit [Ping timeout: 240 seconds]
ta has joined #ruby
x77686d has joined #ruby
x77686d has quit [Client Quit]
<argoneus>
hello
<argoneus>
can you use Thin along Apache?
<argoneus>
I use apache for some python stuff
<atmosx>
weaksauce: for an algorithm implementation
<argoneus>
and I read that Thin is good for ruby, but I don't want it to be too difficult, it's just a simple page
rbennacer has quit [Remote host closed the connection]
LWade_ has joined #ruby
arup_r has quit [Quit: Leaving.]
p3ery has quit [Quit: (null)]
LWade has quit [Ping timeout: 264 seconds]
<atmosx>
jhass shevy thanks I'll work on it, sorry gf is here :-P
arup_r has joined #ruby
<atmosx>
argoneus: you can.
<atmosx>
argoneus: but you're better off with nginx
<jhass>
argoneus: yes, and thin, unicorn, puma, shouldn't make a difference
Aova has quit [Read error: Connection reset by peer]
<argoneus>
so wait
<argoneus>
I have Apache running, serving some documentroots and virtual servers on port 80 etc
AlexRussia has joined #ruby
<mozzarella>
what's better, thin or puma?
<argoneus>
how do I get a simple ruby application running alongside that, then?
<argoneus>
on example.com/myrubything
<argoneus>
for example
<jhass>
imo puma though thin does stuff puma doesn't support iirc
<argoneus>
do I need to mess with apache?
skj3gg has joined #ruby
withnale_ has quit [Quit: Be back later ...]
<jhass>
argoneus: a bit, easiest is you pick one of the above mentioned application servers, let it listen on a unix socket or port > 1024 and let apache reverse proxy requests to it
ptrrr has quit [Quit: ptrrr]
ta has quit [Ping timeout: 276 seconds]
dc_ has joined #ruby
dc_ has quit [Remote host closed the connection]
DonM has joined #ruby
ptrrr has joined #ruby
troter___ has quit []
troter___ has joined #ruby
<argoneus>
jhass: won't that make the site public on the specified port too?
<Rylee>
i was going to type a response, but jhass's kicked ass
<Rylee>
argoneus: not if you make it listen on 127.0.0.1
<argoneus>
ohhh
<argoneus>
nice
<Rylee>
and *only* 127.0.0.1
<argoneus>
thanks!
<jhass>
argoneus: or a unix socket
<Rylee>
yes
<argoneus>
that makes sense
<argoneus>
so basically what will happen is
<jhass>
argoneus: or be a good sysadmin and use a paketfilter
ptrrr has quit [Client Quit]
<jhass>
that whitelists ports you want public
<argoneus>
user requests example.com, it will ask wsgi to give it some python thing
nanoyak has quit [Quit: Computer has gone to sleep.]
<argoneus>
and if it goes to example.com/rubything, apache will know that for this page it should ask localhost:1234 for response
<argoneus>
and does that?
<Rylee>
depends on your setup, but probably
<argoneus>
I see
<argoneus>
thanks!
<Rylee>
Google will be of mcuh help here
bonhoeffer has quit [Quit: bonhoeffer]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Aova has joined #ruby
jerematic has joined #ruby
BLuEGoD has quit [Remote host closed the connection]
DadoCe has quit [Remote host closed the connection]
jonesthedolphin has quit [Ping timeout: 264 seconds]
<shevy>
:D
BLuEGoD has joined #ruby
DadoCe has joined #ruby
<arup_r>
shevy: I am now writing CSS..Jquery :(
<shevy>
css is ok or?
<shevy>
jquery is... $().call() bla ?
<shevy>
arup_r you'll be a rich man with 10 kids
<arup_r>
:p
ta has joined #ruby
<arup_r>
why adding so many kids in my bucket ?
<arup_r>
Jquery is OK.. css.. is wired for me
<arup_r>
:(
arietis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
LWade_ has quit [Ping timeout: 264 seconds]
DadoCe_ has joined #ruby
DadoCe has quit [Read error: Connection reset by peer]
jerematic has quit [Ping timeout: 264 seconds]
commmmodo has quit [Quit: commmmodo]
mrmargolis has quit [Remote host closed the connection]
roshanavand has quit [Ping timeout: 246 seconds]
sent1nel has joined #ruby
ta has quit [Ping timeout: 256 seconds]
<shevy>
arup_r so you got some extra reasons to work!
<shevy>
I found CSS rather simple
<shevy>
it's all about padding, boxing, and margining
<shevy>
:D
The_Phoenix has quit [Read error: Connection reset by peer]
CrazyM4n has quit [Remote host closed the connection]
<arup_r>
Humm
<arup_r>
What's the best tutorial to learn CSS, shevy: ? I am writing CSS without knowing A B C D of it.. :p
hirzu has joined #ruby
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jonr22 has quit [Remote host closed the connection]
skj3gg has quit [Quit: ZZZzzz…]
bronson has joined #ruby
LWade has joined #ruby
bonhoeffer has joined #ruby
pdoherty has joined #ruby
blizzy has quit [Ping timeout: 255 seconds]
arup_r has quit [Ping timeout: 264 seconds]
ki0 has quit [Remote host closed the connection]
kalusn has joined #ruby
<shevy>
dunno
<shevy>
been so many years
<shevy>
oh he is gone
Skelz0r has quit [Ping timeout: 245 seconds]
dfinninger has joined #ruby
ta has joined #ruby
Skelz0r has joined #ruby
kyb3r_ has quit [Read error: Connection reset by peer]
pdoherty has quit [Ping timeout: 245 seconds]
LWade_ has joined #ruby
LWade has quit [Ping timeout: 252 seconds]
bronson has quit [Ping timeout: 252 seconds]
AdamMeghji_ has quit []
hirzu has quit [Quit: This computer has gone to sleep]
AdamMeghji_ has joined #ruby
kalusn has quit [Ping timeout: 244 seconds]
LWade_ has quit [Ping timeout: 252 seconds]
LWade has joined #ruby
longfeet has joined #ruby
speaking1ode has joined #ruby
j0n3 has joined #ruby
yvemath has joined #ruby
dc_ has joined #ruby
dc_ has quit [Remote host closed the connection]
hirzu has joined #ruby
ellisTAA has joined #ruby
DonM has left #ruby [#ruby]
<ellisTAA>
do i always have to initialize an instance variable? or can i just create the instance variable in the class?
Hobogrammer has joined #ruby
__chris has joined #ruby
doobi-sham-70265 has joined #ruby
doobi-sham-70265 has quit [Remote host closed the connection]
Darryl___ has quit [Quit: Connection closed for inactivity]
hirzu has quit [Quit: This computer has gone to sleep]
<weaksauce>
you need to initialize it to something before calling a method on it yeah.
<shevy>
ellisTAA there is a difference between
<shevy>
class Foo; @bar = 5
<shevy>
and
<shevy>
class Foo; def initialize; @bar = 5
<ellisTAA>
weaksauce: is the only way to initialize it using def initialize?
yfeldblum has joined #ruby
<ellisTAA>
shevy: what is the difference?
LWade has quit [Ping timeout: 244 seconds]
<shevy>
ellisTAA the first one defines it the class instance of Foo itself; the second if you instantiate an object of class Foo via my_object = Foo.new
LWade has joined #ruby
chu_ has joined #ruby
chu has quit [Ping timeout: 255 seconds]
mrrob has joined #ruby
claw has joined #ruby
hirzu has joined #ruby
<weaksauce>
no. you can do it in any method if you are careful but it's a good idea to do it in the initialize function while you are learning things.
commmmodo has joined #ruby
<ellisTAA>
i see
<ellisTAA>
thanks
<ellisTAA>
what is this topic called? so i can read more about it
divi_ has joined #ruby
LWade_ has joined #ruby
LWade has quit [Ping timeout: 264 seconds]
david_ has quit [Ping timeout: 245 seconds]
klmlfl has joined #ruby
adamski2600 has joined #ruby
nobitanobi has joined #ruby
Eiam_ has quit [Quit: (╯°□°)╯︵ ǝpouǝǝɹɟ]
dc_ has joined #ruby
dc_ has quit [Remote host closed the connection]
divi_ has quit [Client Quit]
<__chris>
what should I use to watch a rb file and then run it when it changes?
<weaksauce>
__chris guard should do it
atmosx_ has joined #ruby
ta has quit [Ping timeout: 276 seconds]
<__chris>
weaksauce, ok cool thanks
pwh has joined #ruby
atmosx_ has quit [Client Quit]
<weaksauce>
ellisTAA instantiation of a class, and look at constructors
ta has joined #ruby
<ellisTAA>
weaksauce: ty
adamski2600 has quit [Ping timeout: 255 seconds]
josephndenton has quit [Ping timeout: 245 seconds]
sinkensabe has joined #ruby
blizzy has joined #ruby
ghr has joined #ruby
uxp has quit [Quit: Lost terminal]
dfinninger has quit [Remote host closed the connection]
uxp has joined #ruby
uxp_ has joined #ruby
chipotle has quit [Quit: cheerio]
claw_ has joined #ruby
dfinninger has joined #ruby
dfinninger has quit [Read error: Connection reset by peer]
uxp has quit [Client Quit]
dfinninger has joined #ruby
leonshalimov has joined #ruby
ghr has quit [Ping timeout: 252 seconds]
LWade has joined #ruby
sinkensabe has quit [Ping timeout: 245 seconds]
LWade_ has quit [Ping timeout: 264 seconds]
ta has quit [Ping timeout: 264 seconds]
claw has quit [Ping timeout: 256 seconds]
rbennacer has joined #ruby
hirzu has quit [Quit: This computer has gone to sleep]
dotix has quit [Read error: Connection reset by peer]
Aova has quit [Read error: Connection reset by peer]
leonshalimov has quit [Ping timeout: 246 seconds]
xivusr has joined #ruby
withnale_ has joined #ruby
LWade has quit [Ping timeout: 264 seconds]
nobitanobi has quit [Remote host closed the connection]
dotix has joined #ruby
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rbennacer has quit [Ping timeout: 264 seconds]
quimrstorres has joined #ruby
davidhq has joined #ruby
keen__________41 has joined #ruby
hamakn has quit [Remote host closed the connection]
softinio_ has quit []
keen__________40 has quit [Ping timeout: 252 seconds]
Aova has joined #ruby
davidhq has quit [Client Quit]
<ellisTAA>
is the only reason to initialize variables because those values are given when an instance of a class is created?
raducroitoru has joined #ruby
xivusr has quit [Ping timeout: 245 seconds]
withnale_ has quit [Ping timeout: 252 seconds]
dotix has quit [Ping timeout: 265 seconds]
bthesorceror has quit [Quit: bthesorceror]
jamison_ has joined #ruby
<atmosx>
jhass: I have too many questions
davidhq has joined #ruby
<ellisTAA>
what do pipes mean if they come before an equal sign, e.g. @@neo ||= Neography::Rest.new()
<atmosx>
especially with regarding notation -> [slicer(array[0, n]), slicer(array[n, n+1])] ... From what I understand this is creating a new array at each iteration. What I don't get is how exactly the iteration happens
<atmosx>
ellisTAA: if @@neo is not defined yet, assign Neography::Rest.new() to it
bricker has joined #ruby
<ellisTAA>
thats what the pipes mean?
<atmosx>
ellisTAA: when used like this yes
davidhq has quit [Client Quit]
<ellisTAA>
ty ty ty
DadoCe_ has quit [Remote host closed the connection]
davidhq has joined #ruby
oo_ has joined #ruby
doobi-sham-69023 has quit [Remote host closed the connection]
doobi-sham-55042 has joined #ruby
nicolastarzia has joined #ruby
klmlfl has quit [Remote host closed the connection]
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nicolastarzia has quit [Ping timeout: 272 seconds]
mikepack has joined #ruby
davidhq has joined #ruby
Sirupsen has joined #ruby
mikepack has quit [Ping timeout: 245 seconds]
ki0 has joined #ruby
TgMts has quit [Remote host closed the connection]
parduse has joined #ruby
Sgeo_ has joined #ruby
mrrob has quit [Read error: Connection reset by peer]
frek818 has joined #ruby
mrrob has joined #ruby
rbrs has joined #ruby
MrBeardy has joined #ruby
rbrs has quit [Client Quit]
ki0 has quit [Ping timeout: 264 seconds]
OrbitalKitten has joined #ruby
Sgeo has quit [Ping timeout: 244 seconds]
bhaak has quit [Ping timeout: 256 seconds]
gsd has joined #ruby
learner has quit [Ping timeout: 252 seconds]
bhaak has joined #ruby
axisys has quit [Ping timeout: 265 seconds]
Sawbones has joined #ruby
bronson has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
bonhoeffer has quit [Quit: bonhoeffer]
snowpeas has quit [Read error: Connection reset by peer]
snowpeas has joined #ruby
fedexo has joined #ruby
lampd1 has quit [Remote host closed the connection]
jamison_ has quit [Ping timeout: 265 seconds]
Takle has joined #ruby
commmmodo has quit [Quit: commmmodo]
divi_ has joined #ruby
Megtastique has quit []
mrrob has quit [Quit: mrrob]
Channel6 has quit [Ping timeout: 264 seconds]
bonhoeffer has joined #ruby
Megtastique has joined #ruby
frek818 has quit [Quit: frek818]
frek818 has joined #ruby
decoponio has quit [Read error: Connection reset by peer]
bonhoeffer has quit [Client Quit]
decoponio has joined #ruby
divi_ has quit [Ping timeout: 264 seconds]
divi_ has joined #ruby
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shime has joined #ruby
frek818 has quit [Client Quit]
dfinninger has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
hamakn has joined #ruby
TinkerTyper has quit [Quit: ZNC restarting...]
hamakn has quit [Remote host closed the connection]
bthesorceror has joined #ruby
DadoCe has joined #ruby
bonhoeffer has quit [Client Quit]
mynameis has quit [Quit: Leaving]
nahtnam has joined #ruby
C1V0 has joined #ruby
maletor has joined #ruby
davedev24_ has quit [Ping timeout: 255 seconds]
<nahtnam>
I want to create a bot that goes on the steam community. The problem is that I have to simulate mouse clicks. I was wondering if you guys knew how to simulate the clicks. (A gem would be great)
<shevy>
it probably is not technically a "mouse click" - you just set to the target, then invoke .click() on it :)
sinkensabe has quit [Ping timeout: 245 seconds]
frek818 has joined #ruby
bronson has quit [Remote host closed the connection]
Majmun has joined #ruby
Aova has quit [Read error: Connection reset by peer]
bronson has joined #ruby
mrmargolis has joined #ruby
<weaksauce>
ellisTAA variable ||= "something" is shorthand for this: variable = variable || "something which means that if variable is nil it will be like this: variable = nil || "something
maletor has quit [Quit: Computer has gone to sleep.]
<weaksauce>
"
vikram_ has quit [Quit: Connection closed for inactivity]
<weaksauce>
^ explains it much better than I could
sent1nel has quit [Ping timeout: 245 seconds]
chipotle has joined #ruby
sent1nel_ is now known as sent1nel
Sawbones has quit [Remote host closed the connection]
ElderFain has joined #ruby
kalusn has joined #ruby
jeff-ooh has joined #ruby
<havenwood>
user083: Nice, that's neat. Use snake_case instead of headlessCamelCase for methods, so `h_tree` instead of `hTree`. Put spaces after commas and between mathy stuffs. Drop the Hash rocket when the key is a Symbol, so `y2: y` instead of `:y2 => y` and `target: STDOUT` instead of `:target => STDOUT`, etc.
<havenwood>
user083: That H-tree is neat looking.
bronson has quit [Remote host closed the connection]
<havenwood>
user083: `level.even?` instead of `level % 2 == 0`
klmlfl has joined #ruby
<havenwood>
user083: It'd be good to extract and DRY up the duplicate parts of the if statement.
<havenwood>
user083: It's fine to divide by a Float like you are, but you could also use #fdiv like `length.fdiv(2)`.
ta has joined #ruby
pdoherty has joined #ruby
frek818 has quit [Quit: frek818]
<weaksauce>
I'd probably make it a class and extract all the constant stuff into instance variables xml, and starting_length being the two main offenders
lkba has joined #ruby
<weaksauce>
and I prefer guard statements at the top of the method. return if level == 0 reads more intentional
Afforess has left #ruby ["I would never lie - I participated in a willful campaign of misdirection"]
doobi-sham-55042 has quit [Remote host closed the connection]
<weaksauce>
and keeps the indentation down
<havenwood>
user083: I slightly prefer `length.pred` to `length - 1`.
codeFiend has quit [Quit: codeFiend]
<havenwood>
weaksauce: agreed, but I vote `level.zero?` :P
doobi-sham-53143 has joined #ruby
codeFiend has joined #ruby
jakesyl has joined #ruby
<user083>
Are thouse methods faster?
<weaksauce>
ruby has a method for everything eh?
<user083>
than using math?
Sawbones has joined #ruby
<weaksauce>
user083 probably
<weaksauce>
level.zero? is going to be a raw c call so that's likely pretty fast.
codeFiend has quit [Client Quit]
<weaksauce>
and then it's going to be a symbol lookup
codeFiend has joined #ruby
<weaksauce>
sorry id lookup for whatever 0 is
bricker has quit [Quit: Lost terminal]
bricker has joined #ruby
pdoherty has quit [Ping timeout: 244 seconds]
<epitron>
jhass: i like how easy it is to do C bindings in crystal
<weaksauce>
turns out 0 has an object_id of 1, neat.
deric_skibotn has quit [Ping timeout: 255 seconds]
<user083>
q
doobi-sham-64064 has joined #ruby
<jhass>
epitron: yeah :)
d10n-work has joined #ruby
<jhass>
there's a #crystal-lang that could use some more population btw :P
jeff-ooh has quit [Remote host closed the connection]
nopolitica has joined #ruby
randiman has quit [Quit: (null)]
doobi-sham-64064 has quit [Read error: Connection reset by peer]
<weaksauce>
ellisTAA eloquent ruby is a really good book but I fear that it may fall into the advanced category
benlakey has joined #ruby
bklane has quit []
<ellisTAA>
weaksauce: thanks … any ideas on a book about intermediate ruby?
<weaksauce>
if you read and understand all of beginning ruby it should be a solid foundation by the looks of it.
chu_ has quit [Ping timeout: 245 seconds]
doobi-sham-93509 has joined #ruby
<weaksauce>
ellisTAA the well grounded rubyist is pretty thorough
claw_ has quit [Quit: Konversation terminated!]
mrmargolis has quit [Remote host closed the connection]
doobi-sham-93509 has quit [Remote host closed the connection]
<ellisTAA>
cool
<ellisTAA>
should i read the well grounded rubyist before eloquent Ruby?
kl__ has joined #ruby
kl has joined #ruby
<havenwood>
ellisTAA: The Ruby Programming Language and The Well-Grounded Rubyist, Second Edition are both good options.
timanema has quit [Ping timeout: 272 seconds]
chu has joined #ruby
ki0 has joined #ruby
ki0 has quit [Remote host closed the connection]
joelteon has left #ruby ["bye"]
<weaksauce>
I hear good things about the pickaxe book as well.
<ellisTAA>
cool thanks
asmodlol has joined #ruby
jeff-ooh has joined #ruby
nateberkopec has quit [Quit: Leaving...]
codeFiend has quit [Ping timeout: 252 seconds]
jeff-ooh has quit [Remote host closed the connection]
j416 has quit [Ping timeout: 245 seconds]
codecop has quit [Remote host closed the connection]
leonshalimov has joined #ruby
codeFiend has joined #ruby
jgt2 has joined #ruby
Rhainur1 has quit [Read error: Connection reset by peer]
kirun has quit [Quit: Client exiting]
frek818 has joined #ruby
josephndenton has joined #ruby
DadoCe has joined #ruby
doobi-sham-83682 has joined #ruby
j416 has joined #ruby
__chris has quit [Read error: Connection reset by peer]
Rhainur has joined #ruby
neektza has quit []
neektza has joined #ruby
leonshalimov has quit [Ping timeout: 276 seconds]
withnale_ has joined #ruby
divi_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
TheNet has joined #ruby
Sawbones has quit [Remote host closed the connection]
raducroitoru has quit [Quit: Leaving]
skj3gg has joined #ruby
DadoCe has quit [Ping timeout: 276 seconds]
ghr has joined #ruby
tmtwd has joined #ruby
longfeet has joined #ruby
gmcintire has quit []
doobi-sham-53143 has quit [K-Lined]
gmcintire has joined #ruby
withnale_ has quit [Ping timeout: 245 seconds]
C1V0 has quit [Read error: Connection reset by peer]
C1V0 has joined #ruby
riotjone_ has joined #ruby
hamakn has joined #ruby
ghr has quit [Ping timeout: 255 seconds]
pandaant has quit [Remote host closed the connection]
ecksit has joined #ruby
DadoCe has joined #ruby
doobi-sham-83682 has quit [K-Lined]
dfinninger has joined #ruby
Aova has quit [Read error: Connection reset by peer]
jschoolcraft has quit [Quit: zzzz]
riotjones has quit [Ping timeout: 265 seconds]
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Sawbones has joined #ruby
nicolastarzia has joined #ruby
nateberkopec has joined #ruby
DadoCe has quit [Ping timeout: 244 seconds]
hamakn has quit [Ping timeout: 276 seconds]
<vandemar>
does anyone use the beencode gem? It seems extremely slow. The same structure/object in yaml format takes a couple seconds to load, beencode takes over 20 minutes to load.
xivusr has joined #ruby
deric_skibotn has joined #ruby
<ellisTAA>
can i ask a big programming question?
Aova has joined #ruby
chu has quit [Ping timeout: 246 seconds]
<user083>
ellisTAA: yes
<ellisTAA>
what is the purpose of classifying data as belonging to a specific class?
<ellisTAA>
why create different classes for data like string num range etc
<ellisTAA>
not range, i meant hash
nicolastarzia has quit [Ping timeout: 264 seconds]
chu has joined #ruby
xivusr has quit [Ping timeout: 264 seconds]
antgel has quit [Ping timeout: 255 seconds]
dfinninger has quit [Remote host closed the connection]
<ellisTAA>
i guess one reason is that an operation can treat the data differently based on what kind of class it belongs to, but is there any other reason
ptrrr has joined #ruby
skj3gg_ has joined #ruby
skj3gg has quit [Quit: ZZZzzz…]
rcoulman has joined #ruby
<apeiros_>
ellisTAA: because many things are different. how the data is stored. how it is accessed. what you can do with it.
<apeiros_>
though, it's more often different how you do something with it, than what.
skj3gg has joined #ruby
hmsimha has joined #ruby
<ellisTAA>
so should i learn about the differences between how different data is stored?
<ellisTAA>
accessed etc
sambao21 has joined #ruby
Azure has quit [Ping timeout: 246 seconds]
FooMunki has joined #ruby
<apeiros_>
it's valuable knowledge. more important are the properties of the differences.
skj3gg_ has quit [Client Quit]
<apeiros_>
e.g. that looking up a key in a hash is O(1) (constant time) whereas finding a key in an array of key/value arrays is O(n) (takes more time the larger the array)
phoo1234567 has quit [Quit: Leaving]
<ellisTAA>
apeiros: what is this topic called?
<apeiros_>
datastructures & algorithms? algorithmic complexity? depends what you're looking for specifically.
tjohnson has quit [Quit: Connection closed for inactivity]
<ellisTAA>
if i want to learn about this stuff do i just read about datastructures or do i search for ruby datastructures
jgt2 has quit [Ping timeout: 245 seconds]
codeFiend has quit [Ping timeout: 252 seconds]
bronson has joined #ruby
<apeiros_>
datastructures alone is sufficient. this is valid across programming languages.
<ellisTAA>
cool
<ellisTAA>
ty for that info
<ellisTAA>
do u know any must check out sources for datastructures / algorithms?
EvanFreeman has joined #ruby
<apeiros_>
c2 & wp are generally quite good sources
<apeiros_>
kl__: hm? I thought you had put me on ignore?
<kl__>
apeiros_: restarted client,
skj3gg has quit [Quit: ZZZzzz…]
<kl__>
ellisTAA: class A < B; end; A.method # method is defined in the superclass and does some metaprogramming that involves looking at the class name (i.e. A)
<kl__>
ellisTAA: I'm essentially looking to reduce that into one statement; Class.new on the other hand *might* be useful