<baweaver>
and besides, you won't need globals for that program at all anyways.
<baweaver>
drocsid: ^^^
icarus has quit [Ping timeout: 256 seconds]
blt has quit [Ping timeout: 252 seconds]
<drocsid>
ruby ./pastie-10119233.rb
<drocsid>
/usr/lib/ruby/gems/1.8/gems/mail-2.6.3/lib/mail/check_delivery_params.rb:5:in `check_delivery_params': An SMTP From address is required to send a message. Set the message smtp_envelope_from, return_path, sender, or from address. (ArgumentError)
<drocsid>
from /usr/lib/ruby/gems/1.8/gems/mail-2.6.3/lib/mail/network/delivery_methods/smtp.rb:98:in `deliver!'
<drocsid>
from /usr/lib/ruby/gems/1.8/gems/mail-2.6.3/lib/mail/message.rb:2141:in `do_delivery'
<drocsid>
from /usr/lib/ruby/gems/1.8/gems/mail-2.6.3/lib/mail/message.rb:238:in `deliver'
<drocsid>
from /usr/lib/ruby/gems/1.8/gems/mail-2.6.3/lib/mail/mail.rb:140:in `deliver'
<baweaver>
you're using globals which are not equal to vars
<baweaver>
it's a simple change, just remove the $ from the vars in your block at the bottom
<baweaver>
done
<baweaver>
drocsid: ^^^
<baweaver>
that's your fix
chrisja has quit [Quit: leaving]
nettoweb has joined #ruby
failshell has quit [Ping timeout: 256 seconds]
<sevenseacat>
how did that take half an hour to get ti
<sevenseacat>
to
riskish has joined #ruby
nii236 has joined #ruby
juanpablo___ has joined #ruby
quazimodo has joined #ruby
* baweaver
is pretty sure he still ignored that
<drocsid>
no
<drocsid>
it works
<drocsid>
thanks
freerobby has joined #ruby
<drocsid>
so why can't I use $
<drocsid>
?
<Radar>
lol
<baweaver>
look above
<drocsid>
not supposed to use globals
<drocsid>
scope
<drocsid>
?
<Radar>
Global variables
<Radar>
LOL
<drocsid>
because of the do block?
<baweaver>
assume that globals are off limits, period
zachrab has joined #ruby
<baweaver>
>> $var = 1; var
<ruboto>
baweaver # => undefined local variable or method `var' for main:Object (NameError) ...check link for more (https://eval.in/320143)
<baweaver>
not the same
<baweaver>
as mentioned above
<drocsid>
sorry some people come from shell scripting
nb_bez___ has joined #ruby
<baweaver>
That may be the case, but I was referring to the fact that I'd already said this a bit back.
doodlehaus has quit [Remote host closed the connection]
bricker has quit [Quit: leaving]
<Radar>
drocsid: I would recommend you learn some basic Ruby before attempting this any further.
<baweaver>
It's a bad idea to treat any language like another, it's good for a headache.
<Radar>
Knowing the difference between variable types in Ruby will save you a lot of time :)
Joufflu has joined #ruby
mister2 has joined #ruby
juanpablo___ has quit [Ping timeout: 240 seconds]
<mister2>
is ruby 1.9 inherently incompatible with 2.2?
<drocsid>
I'll look up variable types again. Wish I got a NameError when I ran the script.
<drocsid>
Then I might have thought to look that up myself
<drocsid>
thanks
paulcsmith has joined #ruby
<baweaver>
mister2: Mostly you won't have forward compatibility issues
<baweaver>
backwards though, yes, there are a few.
mistermocha has joined #ruby
<baweaver>
read through changes from 1.9.3 to 2.0.0
gccostabr has quit [Quit: ZZZzzz…]
<mister2>
well forwards is what i was thinking... i have a weechat script written for 1.9, but it doesn't seem to be compatible with the 2.2 i have installed.
delinquentme has quit [Ping timeout: 250 seconds]
<baweaver>
specific error?
ebernhardson has quit [Read error: Connection reset by peer]
<mister2>
no, it just doesn't return anything when called in weechat
bmurt has quit [Ping timeout: 245 seconds]
<mister2>
i haven't invested much energy into investigating it yet though
<mister2>
haven't tried it outside of weechat, for instance
blt has joined #ruby
<mister2>
i thought i'd see first if it was simply "broken" or if ruby was typically good at these sorts of things
<mister2>
(i don't actually know any ruby :D)
<baweaver>
go for that, because for the most part there aren't going to be forward breaks
<ElderFain>
I need a bunch of data to show in a view, which I don't think i can change
<ElderFain>
but it feels kind of silly to populate all these variables just to pass to view. not sure how else to really do that though
zz_Outlastsheep has quit [Ping timeout: 256 seconds]
blackmesa has joined #ruby
<ElderFain>
technically the initial query is a big query to get all the data, and the rest are just mutations/different views on the same data set
tvw has joined #ruby
quazimodo has quit [Read error: Connection reset by peer]
quazimodo has joined #ruby
alex88 has quit [Ping timeout: 276 seconds]
sinkensabe has joined #ruby
thatslifeson has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
nszceta has joined #ruby
vire has joined #ruby
psy_ has quit [Ping timeout: 264 seconds]
gagrio has joined #ruby
andikr has joined #ruby
pwnz0r has quit [Remote host closed the connection]
pwnz0r has joined #ruby
<hanmac>
ElderFain: you want to use that { |_, b| !b } for the select right? ... if its a normal Array you might try: data.reject(&:last)
<ElderFain>
its a &proc passed into a method
Brozo has joined #ruby
sandstrom has joined #ruby
<ElderFain>
that ultimately yes is doing a select, but its doing it on an asinine data structure that I'd like to protect clients from having to know or understand
zz_Outlastsheep has joined #ruby
<ElderFain>
so I navigate into the data structure, pull out the attribute you were after, then pass it to your block so you can select on the underlying datastructure based on your proc
<ElderFain>
(did that make sense?)
vire has quit [Ping timeout: 256 seconds]
pwnz0r has quit [Ping timeout: 250 seconds]
rdark has joined #ruby
Rickmasta has joined #ruby
duderonomy has joined #ruby
charliesome has joined #ruby
vire has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
ta has joined #ruby
edwinvdgraaf has joined #ruby
mrmargolis has joined #ruby
TheHodge has joined #ruby
lxsameer has joined #ruby
kyrylo has joined #ruby
Oka has quit [Quit: さようなら]
aryaching has joined #ruby
sent1nel has quit [Remote host closed the connection]
Sawbones_ has joined #ruby
Sawbones_ has quit [Remote host closed the connection]
<flughafen>
sup certainty sevenseacat shevy
ta has quit [Remote host closed the connection]
<sevenseacat>
guten Morgen
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
<flughafen>
g'day mate
_djbkd has quit [Remote host closed the connection]
wolflee________ has quit [Read error: Connection reset by peer]
terlar has joined #ruby
alex88 has quit [Read error: Connection reset by peer]
felixjet_ has joined #ruby
wolflee________ has joined #ruby
alex88_ has joined #ruby
hewenhon_ has quit [Remote host closed the connection]
Obfuscate has quit [Quit: Expecting a prolonged power outage.]
alex88_ has quit [Read error: Connection reset by peer]
hewenhong has joined #ruby
nii236 has quit [Read error: No route to host]
felixjet has quit [Ping timeout: 265 seconds]
alex88_ has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
wolflee_________ has joined #ruby
workmad3 has joined #ruby
wolflee_________ has quit [Read error: Connection reset by peer]
wolflee_________ has joined #ruby
alex88 has joined #ruby
ponga has quit [Remote host closed the connection]
hewenhon_ has joined #ruby
ta has joined #ruby
wolflee________ has quit [Read error: Connection reset by peer]
alex88_ has joined #ruby
krz has quit [Ping timeout: 248 seconds]
alex88_ has quit [Read error: Connection reset by peer]
Renich has quit [Quit: leaving]
amundj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Xoro has quit [Read error: Connection reset by peer]
Dopagod has quit [Ping timeout: 244 seconds]
Xoro has joined #ruby
hewenhong has quit [Ping timeout: 276 seconds]
SouL_|_ has quit [Ping timeout: 248 seconds]
alex88_ has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
krz has joined #ruby
edwinvdgraaf has quit []
RegulationD has joined #ruby
krz has quit [Client Quit]
alex88_ has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
edwinvdgraaf has joined #ruby
<flughafen>
___
alex88_ has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
mikecmpb_ has joined #ruby
gdd229 has joined #ruby
RegulationD has quit [Ping timeout: 265 seconds]
wolflee_________ has quit [Ping timeout: 256 seconds]
wolflee_________ has joined #ruby
alex88_ has joined #ruby
joonty has quit [Quit: joonty]
alex88_ has quit [Read error: Connection reset by peer]
mengu has quit [Remote host closed the connection]
gauke has joined #ruby
mikecmpbll has quit [Ping timeout: 256 seconds]
alex88_ has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
mahtennek has joined #ruby
Cust0sL1men has joined #ruby
<mahtennek>
hi quick question. i am using smarter_csv to parse a csv file. it returns me a hash of json. i tried to parse individual values, but i can't seem to get it. any help?
<adaedra>
your array.to_json is useless, as you don't use the return
<adaedra>
and it looks like an array to me
alex88_ has quit [Read error: Connection reset by peer]
<adaedra>
you should be able ton confirm that by using p instead of puts
<mahtennek>
{:faculty_value=>"ARTS", :cv=>"CH2141", :titlev=>"GENERAL HISTORY OF CHINA", :datev=>"28/04/2015 (Tue)", :timev=>"5:00 PM", :durationv=>"2 h", :durationvn=>2, :vv=>"MPSH2-A"}
<mahtennek>
it returned this
<adaedra>
This is a ruby hash
<mahtennek>
i tried to parse individual values
<mahtennek>
array[:faculty_value]
<mahtennek>
i had an error
aryaching has quit [Ping timeout: 252 seconds]
<adaedra>
which error?
<mahtennek>
csv.rb:6:in `[]': no implicit conversion of Symbol into Integer (TypeError)
nii236 has joined #ruby
<mahtennek>
do i need to .to_s it? or something like that?
<adaedra>
no
alex88_ has joined #ruby
platzhirsch has joined #ruby
<adaedra>
it says that because you are interrogating an array
alex88_ has quit [Read error: Connection reset by peer]
<adaedra>
if your CSV lib is well made, process should return an array of hashes
joonty has joined #ruby
<mahtennek>
okay.
<mahtennek>
yup it did return an array of hashes
<mahtennek>
should i use that instead to extract the values?
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra>
well with that, you don't have to extract any data, the hash has it
<adaedra>
you can iterate over your array with things like #each, #map, ...
<mahtennek>
okay. i'll try that out.
havenwood has quit [Remote host closed the connection]
Stalkr_ has joined #ruby
<jhass>
?pry mahtennek
<ruboto>
mahtennek, Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting ’binding.pry’ directy in your source code. Visit https://pryrepl.org/ or get it now with gem install pry pry-doc
<jhass>
use it to play around
<mahtennek>
jhass: right i remember you were sharing with me back then.
<mahtennek>
yup i will pry it
<mahtennek>
thanks guys
alex88_ has joined #ruby
DaniG2k has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
<mahtennek>
i am processing using these lines of codes on my csv
moeabdol has joined #ruby
serivich has joined #ruby
<mahtennek>
i am trying to get the individual record out after parsing it
<mahtennek>
which smarter_csv has returned an array hash
oo_ has joined #ruby
wolflee_________ has quit [Read error: Connection reset by peer]
alex88_ has joined #ruby
wolflee_________ has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
<jhass>
mahtennek: first step to unconfuse yourself: do not ever name variables array or hash or whatever you assume their datastructure is, name them semantically, like in this case rows = ...; rows.each do |row|
DerisiveLogic has joined #ruby
Stalkr_ has quit [Quit: Leaving...]
<mahtennek>
jhass: roger that.
<jhass>
second, use p not puts for debug prints
alienaut has quit [Ping timeout: 252 seconds]
<jhass>
p calls .inspect which gives you better to understand output and returns the object and not nil like puts does
SOLDIERz has joined #ruby
<mahtennek>
okay. i p it, it returns exactly the hash in this json format
decoponio has joined #ruby
<mahtennek>
i am not sure what i am missing, but i can't call individual values
<jhass>
nononono
krz has joined #ruby
<jhass>
it's not json
<jhass>
it's not json at all
gdd229 has quit [Quit: Page closed]
<mahtennek>
doesn't it have a key => value structure?
<jhass>
yes, the datastructure is called map, the ruby implementation of it is called Hash
<jhass>
and in the JSON specification it's called object
<jhass>
but you're not using json so what json calls it is irrelevant
<mahtennek>
i see
<mahtennek>
that explains. okay
OnBrokenWings has joined #ruby
juanpablo___ has joined #ruby
<mahtennek>
so in this case correct me if i am wrong. what i should do is to traverse this entire array of hash. then, map the values to get individual values accordingly
alex88_ has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
moeSeth_ has joined #ruby
nii236 has quit [Read error: No route to host]
alex88_ has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
<mahtennek>
right. i got that. it works now. thanks so much jhass for guiding me.
<mahtennek>
really appreciate the help here!
antgel has quit [Ping timeout: 265 seconds]
MissionCritical has quit [Ping timeout: 245 seconds]
juanpablo___ has quit [Ping timeout: 250 seconds]
alex88_ has joined #ruby
Flowrhent has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
alex88_ has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
antgel has joined #ruby
reinaldob has joined #ruby
oo_ has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 264 seconds]
alex88_ has joined #ruby
ki0 has quit [Read error: Connection reset by peer]
alex88_ has quit [Read error: Connection reset by peer]
ki0 has joined #ruby
SouL_|_ has joined #ruby
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
alex88_ has joined #ruby
piotrj has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
alex88_ has joined #ruby
alex88_ has quit [Remote host closed the connection]
reinaldob has quit [Ping timeout: 245 seconds]
cassianoleal has joined #ruby
joonty has quit [Quit: joonty]
timonv has joined #ruby
joonty has joined #ruby
MissionCritical has joined #ruby
ItSANgo_ has quit [Quit: Leaving...]
chipotle has quit [Read error: Connection reset by peer]
kotk has quit [Read error: Connection reset by peer]
alex88_ has joined #ruby
chipotle has joined #ruby
kotk has joined #ruby
blackmesa has quit [Ping timeout: 255 seconds]
alex88_ has quit [Read error: Connection reset by peer]
dc__ has joined #ruby
mahtennek has quit []
sevensea_ has joined #ruby
sevenseacat has quit [Ping timeout: 240 seconds]
SOLDIERz has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
ixti has quit [Ping timeout: 272 seconds]
alex88_ has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
alex88_ has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
sent1nel has joined #ruby
zotherstupidguy has joined #ruby
Sawbones_ has joined #ruby
alex88_ has joined #ruby
mdw has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
Musashi007 has joined #ruby
zz_Outlastsheep is now known as Outlastsheep
ItSANgo has joined #ruby
SouL_|__ has joined #ruby
leafybasil has quit [Remote host closed the connection]
DerisiveLogic has quit [Ping timeout: 256 seconds]
hewenhon_ has quit [Remote host closed the connection]
SouL_|_ has quit [Ping timeout: 256 seconds]
sent1nel has quit [Ping timeout: 264 seconds]
Sawbones_ has quit [Ping timeout: 250 seconds]
<agent_white>
iPhooey: /wc
<agent_white>
eep, mt :P
agent_white has left #ruby [#ruby]
alex88_ has joined #ruby
Guest62930 has quit [Remote host closed the connection]
alex88_ has quit [Read error: Connection reset by peer]
alex88_ has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
Flowrhent has quit [Ping timeout: 265 seconds]
<DaniG2k>
wow
<DaniG2k>
just took a look at the Mechanize gem
alex88_ has joined #ruby
<DaniG2k>
much more complicated than i thought
alex88_ has quit [Read error: Connection reset by peer]
<DaniG2k>
(the source, I mean)
<DaniG2k>
tons of things to think of -_-
Timba-as has quit [Quit: Be back later ...]
<sevensea_>
well, yeah.
<DaniG2k>
cookies, iframes, xml pages, etc
<DaniG2k>
jeeeez
Timba-as has joined #ruby
sevensea_ is now known as sevenseacat
bim has joined #ruby
Flowrhent has joined #ruby
bim is now known as Guest60026
ponga has joined #ruby
sdothum has joined #ruby
alex88_ has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
Guest60026 has quit [Remote host closed the connection]
alex88_ has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
alex88_ has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
ArchRogem has joined #ruby
FF_ has joined #ruby
nii236 has joined #ruby
alex88_ has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
Musashi007 has quit [Quit: Musashi007]
Flowrhent has quit [Ping timeout: 272 seconds]
oo_ has joined #ruby
Musashi007 has joined #ruby
mengu has joined #ruby
leafybasil has joined #ruby
Rickmasta has joined #ruby
alex88_ has joined #ruby
lessless has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DylanJ has quit [Quit: ggwp]
Zai00 has quit [Quit: Zai00]
joonty has quit [Quit: joonty]
nii236 has quit [Ping timeout: 244 seconds]
ponga has quit [Remote host closed the connection]
rodfersou has joined #ruby
alex88_ has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
einarj has joined #ruby
ismaelga has joined #ruby
FF_ has quit [Ping timeout: 256 seconds]
Flowrhent has joined #ruby
Juanchito has joined #ruby
joonty has joined #ruby
lintix_ has joined #ruby
alex88_ has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
doodlehaus has joined #ruby
nii236 has joined #ruby
alex88_ has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
mrmargolis has joined #ruby
sameerynho has joined #ruby
Atomicalloy has joined #ruby
<Atomicalloy>
Hi.
banister has joined #ruby
alex88_ has joined #ruby
alex88_ has quit [Remote host closed the connection]
lintix_ has quit [Quit: Ex-Chat]
<Atomicalloy>
So guys. Give me a good kick to start with Ruby and later going on with RoR. I have previous experience in statically typed languages and some low level experience (assembly).
oo_ has quit [Remote host closed the connection]
lxsameer_ has quit [Ping timeout: 255 seconds]
dopie has joined #ruby
tkuchiki has joined #ruby
alex88_ has joined #ruby
<Atomicalloy>
I also did some PHP long time ago but I ended up eating it, since I wrote spaghetti code.
alex88_ has quit [Read error: Connection reset by peer]
fabrice31 has quit [Remote host closed the connection]
<Atomicalloy>
Also, if you could tell some advantages and disadvantages over using Ruby and RoR for web development would be nice.
lordkryss has quit [Quit: Connection closed for inactivity]
chipotles has joined #ruby
chipotles has left #ruby [#ruby]
mrmargolis has quit [Ping timeout: 264 seconds]
<Atomicalloy>
harly, Thanks. What's rubykoans?
<sevenseacat>
click the link?
<Atomicalloy>
I did and downloaded the files.
<Atomicalloy>
That's not what I meant.
<harly>
once you're installed ruby, you run the koans and they break. you learn ruby by fixing the bits that are broken.
joonty has quit [Quit: joonty]
<harly>
it has an ability to give a hint. that's it.
<Atomicalloy>
harly, Oh ok. I was waiting a more "buy this book" response.
antgel has quit [Ping timeout: 250 seconds]
<harly>
that's b)
<harly>
great book.
pwnz0r has joined #ruby
<Atomicalloy>
harly, It doesn't seem to be for beginners to Ruby,
<sevenseacat>
the well-grounded rubyist is a good book for ruby.
<sevenseacat>
rails 4 in action is a good book for learning rails.
alex88_ has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
<harly>
if you have previous experience it's perfectly pitched, if that experience is career level.
alex88_ has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
<harly>
if you want your hand held creating a sample ruby on rails app, with exposure to a bunch of different tools, https://www.railstutorial.org/ is great, well structured, easy to follow, and is kept up to date. you can whack it out in a week, depending on your free time.
gfawcettpq has joined #ruby
chinmay_dd has joined #ruby
<harly>
rails 4 in action fills a similar goal. take your pick.
joonty has joined #ruby
chipotle has quit [Quit: cheerio]
Azure has quit [Read error: Connection reset by peer]
reinaldob has joined #ruby
chipotle has joined #ruby
pwnz0r has quit [Ping timeout: 256 seconds]
<Atomicalloy>
harly, Well, firstly, it's hard to say from ones perspective what they mean by "experience at career level". I have seen people working in the industry #$#@ code. I can tell you I'm pretty familiar with the C-languages and some PHP.
<Atomicalloy>
writing #$#@ code*
<harly>
if you know how to program in an OO language, eloquent ruby is a great introduction to ruby.
<sevenseacat>
typically, it means 'have you been paid to write it'
<harly>
if you don't know how to write "complex" code, then you might want a more beginners guide.
antgel has joined #ruby
piotrj has quit [Remote host closed the connection]
<Atomicalloy>
harly, Would you like to give an example?
piotrj has joined #ruby
piotrj has quit [Read error: Connection reset by peer]
fabrice31 has joined #ruby
<harly>
if you understand libraries, functions, objects, polymorphism, inheritance, classes, instances, abstraction, etc etc etc, it's a good book. it doesn't hold your hand on programming fundamentals. it just showcases ruby and the ruby way.
anisha has joined #ruby
piotrj has joined #ruby
chinmay_dd has quit [Ping timeout: 256 seconds]
<harly>
if you don't read that and go "blah blah yeah yeah", then maybe you need to find something more basic.
<Atomicalloy>
harly, Ah great then I think this book will work then.
<Atomicalloy>
I like the fact that it says, "Camels for Classes, Snakes Everywhere Else" :)
jottr has joined #ruby
reinaldob has quit [Ping timeout: 272 seconds]
<Atomicalloy>
I had a journey with the std convention in C++, fully snake_case.
comodo_dragon has joined #ruby
<comodo_dragon>
is RUBY ON rails RUBY ?
<comodo_dragon>
niggers
<sevenseacat>
comodo_dragon: hello again.
<comodo_dragon>
niggers
<comodo_dragon>
.i.
comodo_dragon was kicked from #ruby by sevenseacat [Your behavior is not conducive to the desired environment.]
<hectortrope>
comodo_dragon: no its a framework
<hectortrope>
based on ruby
<adaedra>
hectortrope: no it's a troll
<adaedra>
based on hate
FF_ has joined #ruby
Azure has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<hectortrope>
adaedra: I didnot understand what ur saying
alex88_ has joined #ruby
ndrei has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
<Atomicalloy>
I also have this book I can get from my local library, don't know if it's good tho. It's called "Programming Ruby 1.9 & 2.0 : the pragmatic programmers' guide".
alienaut has joined #ruby
Guest64608 has joined #ruby
vikaton has joined #ruby
<sevenseacat>
it's thick, i'll give it that.
Flowrhent has quit [Ping timeout: 256 seconds]
bim has joined #ruby
bim is now known as Guest36492
ixti has joined #ruby
Outlastsheep is now known as zz_Outlastsheep
ponga has joined #ruby
RegulationD has joined #ruby
<Atomicalloy>
I see, I will go and check it out soon. Anyway, I have another question that will bother me. For example in C and C++, the flow of the program goes like this, you include your headers, <iostream>, "myheader.hpp" etc. You have separated files for each task, example cpu.cpp, cpu.hpp where you declare/define your classes/functions and such. Then you have the main() function, it's a function needed in every C/C++ progr
<Atomicalloy>
am where the main code executes from. How is the program "structure" in Ruby?
alex88_ has joined #ruby
nii236 has quit [Ping timeout: 240 seconds]
alex88_ has quit [Read error: Connection reset by peer]
<sevenseacat>
check out some open source ruby projects and have a look
doodlehaus has quit [Remote host closed the connection]
<Atomicalloy>
sevenseacat, I see, I will. But it doesn't seem to follow any rules right? You can just open a file.rb and start typing.
<sevenseacat>
you sure can. same as in C.
RegulationD has quit [Ping timeout: 256 seconds]
<Atomicalloy>
In C, you have however to follow the rules like, "You need a main function, you can't use printf() if not include the stdio.h etc"
failshell has joined #ruby
alex88_ has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sevenseacat>
well ruby does have a large core and stdlib.
alex88_ has quit [Read error: Connection reset by peer]
nfk|laptop has joined #ruby
knikolov has quit [Read error: Connection reset by peer]
<adaedra>
hectortrope: comodo_dragon was just a troll
<sevenseacat>
thats valid ruby code, yes.
DerisiveLogic has joined #ruby
chishiki has quit [Read error: Connection reset by peer]
knikolov has joined #ruby
<Atomicalloy>
sevenseacat, Ah great I see :)
<Atomicalloy>
I like how everything is objects it makes everything so easy, or almost everything
<Atomicalloy>
harly, I will check
Guest36492 has quit [Remote host closed the connection]
<hanmac>
in ruby if something is not an object it does either return an object or can be turned/wrapped into an object
phutchins has joined #ruby
SOLDIERz has joined #ruby
failshell has quit [Ping timeout: 264 seconds]
<Atomicalloy>
10.* 5
<Atomicalloy>
I didn't expect you could do that.
moeabdol has quit [Quit: WeeChat 1.1.1]
alex88_ has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
banister has joined #ruby
duncannz has quit [Remote host closed the connection]
alex88_ has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
<adaedra>
well, operators are methods, it's just another way of writing the calls
<harly>
everything is an object. operators are just methods. so if you look up the docs for basic objects, like http://ruby-doc.org/core-2.2.0/Object.html or http://ruby-doc.org/core-2.2.0/Numeric.html, you'll recognize operators as methods. and if you want to get creative with your own objects, you ccan extend/override them to create your own.
antgel has quit [Ping timeout: 256 seconds]
<Atomicalloy>
So, #{var_here} is the method to access a variable within a string?
alex88_ has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
<adaedra>
It's called interpolation
<adaedra>
It's a way of building a string
<harly>
well. i'ts the syntactic sugar to tell a string to interpolate that by looking up the variable.
<Atomicalloy>
Ah I see.
<harly>
like the % stuff in c's printf. %c tells it to replace that with the next argument, interpreted as a character.
<Atomicalloy>
Yea I see :)
<Atomicalloy>
Btw, do you think the jump will be big from my previous experience in C-languages?
iotouch has quit [Quit: This computer has gone to sleep]
<Atomicalloy>
hanmac, Yea I have checked that.
alex88_ has quit [Read error: Connection reset by peer]
OnBrokenWings has quit [Quit: Leaving]
<adaedra>
Ah, the % syntax
<Atomicalloy>
Well, I will go get that book from the library and order the Eloquent book :) Cya later.
<hanmac>
Atomicalloy: your C(++) exp can also help you because Ruby does have a C-Api where you can build stuff against it (like binding C(++) libs like wxwidgets or others to ruby)
<harly>
cya have fun. do those koans. it's easy. and informative. :)
CloCkWeRX has quit [Ping timeout: 256 seconds]
sandstrom has joined #ruby
selu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
alex88_ has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
doodlehaus has joined #ruby
bogeyd6 has joined #ruby
rsavage has joined #ruby
rsavage is now known as NinjaOps
ismaelga has quit [Remote host closed the connection]
ki0_ has joined #ruby
alex88_ has joined #ruby
ascarter has joined #ruby
alex88_ has quit [Read error: Connection reset by peer]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ismaelga has joined #ruby
alex88 has quit []
alex88 has joined #ruby
ki0 has quit [Ping timeout: 244 seconds]
alex88 has quit [Read error: Connection reset by peer]
griffindy has joined #ruby
juanpablo___ has joined #ruby
ascarter has quit [Client Quit]
charliesome has quit [Quit: zzz]
lxsameer_ has joined #ruby
alex88 has joined #ruby
jimms has joined #ruby
alex88 has quit [Read error: Connection reset by peer]
juanpablo___ has quit [Ping timeout: 256 seconds]
alex88 has joined #ruby
fumduq has quit [Ping timeout: 252 seconds]
Atomicalloy has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 245 seconds]
alex88 has quit [Read error: Connection reset by peer]
fumduq has joined #ruby
sameerynho has quit [Ping timeout: 240 seconds]
bogeyd6 has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby
antgel has joined #ruby
reinaldob has joined #ruby
charliesome has joined #ruby
SouL_|__ has quit [Ping timeout: 256 seconds]
alienaut has quit [Ping timeout: 252 seconds]
alex88 has joined #ruby
alex88 has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
AlphaAtom has joined #ruby
piotrj has quit [Remote host closed the connection]
scripore has joined #ruby
alex88 has joined #ruby
alex88 has quit [Read error: Connection reset by peer]
qwertme has joined #ruby
jcromartie has joined #ruby
rodfersou has quit [Remote host closed the connection]
alex88 has joined #ruby
alex88 has quit [Read error: Connection reset by peer]
nfk has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
alex88 has joined #ruby
arta82 has joined #ruby
bruno- has quit [Ping timeout: 265 seconds]
alex88 has quit [Read error: Connection reset by peer]
moeabdol has joined #ruby
Mon_Ouie has joined #ruby
alex88 has joined #ruby
alex88 has quit [Read error: Connection reset by peer]
JDiPierro has joined #ruby
inavele has joined #ruby
DylanJ has joined #ruby
alex88 has joined #ruby
alex88 has quit [Read error: Connection reset by peer]
alienaut has joined #ruby
alex88 has joined #ruby
ki0_ has quit [Remote host closed the connection]
inavele has quit [Ping timeout: 255 seconds]
ki0 has joined #ruby
CloCkWeRX has joined #ruby
fgo has joined #ruby
ndrei has quit [Ping timeout: 248 seconds]
moeSeth_ has quit [Quit: Connection closed for inactivity]
failshell has joined #ruby
doodlehaus has quit [Remote host closed the connection]
turtil has joined #ruby
chinmay_dd has joined #ruby
CloCkWeRX has left #ruby [#ruby]
Mon_Ouie has quit [Ping timeout: 252 seconds]
vdamewood has joined #ruby
piotrj has joined #ruby
colorados has joined #ruby
but3k4 has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
ndrei has joined #ruby
failshell has quit [Remote host closed the connection]
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dopie has joined #ruby
Zai00 has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
Killerkeksdose has quit [Remote host closed the connection]
Killerkeksdose has joined #ruby
mengu has quit [Remote host closed the connection]
mary5030 has joined #ruby
timeout has joined #ruby
timeout is now known as Guest16685
nii236 has joined #ruby
toretore has joined #ruby
mostlybadfly has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Killerkeksdose has quit [Remote host closed the connection]
Killerkeksdose has joined #ruby
livathinos has quit []
nii236 has quit [Ping timeout: 250 seconds]
mengu has joined #ruby
djbkd has joined #ruby
nfk|laptop has quit [Ping timeout: 244 seconds]
lidenskap has joined #ruby
jcromartie has quit [Ping timeout: 264 seconds]
rodfersou has joined #ruby
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JDiPierro has quit [Remote host closed the connection]
ponga has quit [Remote host closed the connection]
allcentury has joined #ruby
jcromartie has joined #ruby
blackmesa has joined #ruby
djbkd has quit [Ping timeout: 264 seconds]
lkba has joined #ruby
sandstrom has joined #ruby
lidenskap has quit [Ping timeout: 265 seconds]
mrmargolis has joined #ruby
yfeldblum has quit [Ping timeout: 256 seconds]
badhatter has quit [Quit: Leaving]
rodfersou has quit [Remote host closed the connection]
badhatter has joined #ruby
ponga has joined #ruby
RegulationD has joined #ruby
mrmargolis has quit [Ping timeout: 264 seconds]
Matachines has joined #ruby
mary5030 has quit [Remote host closed the connection]
ponga has quit [Remote host closed the connection]
krz has quit [Ping timeout: 265 seconds]
failshell has joined #ruby
Soda has joined #ruby
piotrj has quit [Remote host closed the connection]
livathinos has joined #ruby
RegulationD has quit [Ping timeout: 250 seconds]
piotrj has joined #ruby
bim has joined #ruby
bim is now known as Guest45121
rbennacer has joined #ruby
fgo has quit [Ping timeout: 244 seconds]
colorisco has joined #ruby
colorados has quit [Read error: Connection reset by peer]
tesuji has quit [Ping timeout: 256 seconds]
Guest64608 has quit [Quit: Leaving]
DaniG2k has quit [Quit: leaving]
ismaelga has quit [Remote host closed the connection]
colorisco has quit [Read error: Connection reset by peer]
colorados has joined #ruby
MyMind has joined #ruby
fryguy9 has joined #ruby
nii236 has joined #ruby
wottam has joined #ruby
krz has joined #ruby
cefkamcau has quit [Ping timeout: 276 seconds]
livathinos has quit []
segfalt has quit [Quit: segfalt]
chipotles has joined #ruby
Sembei has quit [Ping timeout: 250 seconds]
blackmesa has quit [Ping timeout: 256 seconds]
surs1 has quit [Quit: WeeChat 0.3.7]
surs has joined #ruby
surs has quit [Changing host]
surs has joined #ruby
nii236 has quit [Ping timeout: 264 seconds]
last_staff has joined #ruby
charliesome has quit [Quit: zzz]
urma has joined #ruby
pdfpkw has joined #ruby
fryguy9 has quit [Quit: Leaving.]
jtdowney_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sankaber has joined #ruby
iotouch has joined #ruby
mengu has quit [Remote host closed the connection]
livathinos has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
hewenhong has joined #ruby
hewenhong has quit [Remote host closed the connection]
hewenhong has joined #ruby
hewenhong has quit [Client Quit]
kyrylo has quit [Read error: Connection reset by peer]
Guest58635 has quit [Ping timeout: 256 seconds]
kyrylo has joined #ruby
SOLDIERz has joined #ruby
pontiki has joined #ruby
<pontiki>
hi, all o/
dopie has quit [Quit: This computer has gone to sleep]
last_staff has quit [Quit: last_staff]
Rapier- has joined #ruby
nii236 has joined #ruby
Mohan_ has joined #ruby
juanpablo___ has joined #ruby
arta82 has quit [Read error: Connection reset by peer]
mtakkman has joined #ruby
JDiPierro has joined #ruby
bmurt has joined #ruby
cefkamcau has joined #ruby
JDiPierro has quit [Remote host closed the connection]
quimrstorres has quit [Remote host closed the connection]
<shevy>
pontiki!
<shevy>
my favourite tiki
qwertme has joined #ruby
JDiPierro has joined #ruby
juanpablo___ has quit [Ping timeout: 256 seconds]
ndrei has quit [Ping timeout: 256 seconds]
rejerson69_ has quit [Ping timeout: 245 seconds]
endash has quit [Quit: endash]
endash has joined #ruby
scripore has joined #ruby
ndrei has joined #ruby
<pontiki>
shevy: you need to visit more tiki bars then!
dorei has joined #ruby
emilkarl has joined #ruby
allcentury has quit [Ping timeout: 256 seconds]
<emilkarl>
Is there a nice way to iterate a list of objects, run a method that checks true/false, and return true if any method returns true, otherwise return false?
xxneolithicxx has quit [Ping timeout: 255 seconds]
<hanmac>
imo its a whiny little bitch and i need to test the source of rubocop itself i believe it does break its own rules ;P
Mohan is now known as Guest91258
kenndel_ has quit [Ping timeout: 240 seconds]
simplon has quit [Remote host closed the connection]
<failshell>
hanmac: some rules i dont even understand. wtf is cyclomatic complexity?
<failshell>
or perceived complexity?
Guest45121 has quit [Remote host closed the connection]
<failshell>
anyway, with some rules disabled, its nice to use in a team. as it enforces some type of coding standard
<failshell>
catching things that will be deprecated eventually, like File.exists?(foo)
freerobby has joined #ruby
<hanmac>
failshell: i more have a problem with: "not more than 10 lines per method" and "not more than 10 methods per class" ... imo you cant write big classes with that
<failshell>
hanmac: that's part of what i disable
chinmay_dd has quit [Ping timeout: 250 seconds]
<hanmac>
failshell: for one of my scripts i need to overwrite the "is_a?" method ... and it does thinks i should name it "a?" because it does like to rename "is_active?" to "active?" ... did you get my problem? ;P
[k- has joined #ruby
<failshell>
yeah some of those rules are a bit silly. but we see some improvement in our code overall as a team with its use
<adaedra>
rubocop is not always right
<[k->
it is the discretion of the programmer to follow rubocop
<adaedra>
there should be some flags to disable warnings for some cases saying "I know and don't want to be notified about that", like rust's #[allow()]
<[k->
i usually don't
dfinninger has joined #ruby
freerobby has quit [Client Quit]
mtakkman has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
dfinninger has quit [Read error: Connection reset by peer]
<failshell>
adaedra: you can. either inline in your code. or with a .rubocop.yml file
<hanmac>
[k-: like (most of) the followers of apple? ;P
<adaedra>
failshell: ah?
jottr has quit [Ping timeout: 276 seconds]
<adaedra>
I know for the rubocop.yml, not for the in code
<hanmac>
i once wrote a script there you can have a function that does rescue in all other methods of a class using a delegator
jottr has joined #ruby
fgo has joined #ruby
<emilkarl>
thanks didnt know that failshell
catphish has joined #ruby
ki0 has quit [Read error: Connection reset by peer]
<catphish>
is it possible to extract the netmask from an IPAddr?
<adaedra>
What do you mean?
<adaedra>
Nowadays, netmasks are an additionnal information to IP Addresses, and are usally given with (like 192.168.0.0/16)
rejerson69_ has joined #ruby
mistermocha has joined #ruby
<[k->
p ipaddr1.to_s #=> "3ffe:505:2::1"
<urma>
IPv6
lavros has joined #ruby
ki0 has joined #ruby
<tobiasvl>
you can't calculate a netmask from just an IP address
<hanmac>
catphish: hm you normally cant get a netmask from an IPAddr as far as i know ... but you can ask ruby to calculate a net mask between two addresses
<catphish>
adaedra: the IPAddr class stores netmask, but doesn't appear to have an accessor for it
<adaedra>
(Actually, you can't anymore)
<[k->
sorry then
Guest81349 has quit [Remote host closed the connection]
<adaedra>
catphish: IP classes are not used anymore. Anyway, classes are determined by bits on the address
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra>
the first 0 gives the class. At first position it's A, second position it's B, third it's C
<adaedra>
which were respectively /8, /16 and /24
jottr has quit [Ping timeout: 256 seconds]
fgo has quit [Ping timeout: 265 seconds]
<adaedra>
But as said above, with class-less addressing, this is not correct anymore
dfinninger has quit [Read error: Connection reset by peer]
<adaedra>
ohhh
<adaedra>
misread
dfinninger has joined #ruby
Peetooshock has quit [Read error: Connection reset by peer]
<urma>
catphish: AFAICT IPAddr has a mask method which allows you to determine the network address associated with an IP address if you provide the mask value
Peetooshock has joined #ruby
<urma>
catphish: So it doesn’t really store the netmask
<dreinull75>
In irb I have method autocompletion via tab. In vim I have autocomplete only for strings that are available through open buffers. Any way of getting the same irb-like behaviour?
AlphaAtom has quit [Ping timeout: 276 seconds]
<adaedra>
dreinull75: multiple, look at autocompletion plugins for vim
dfinninger has joined #ruby
<dorei>
catphish: it's the same solution
<[k->
irb has a tab complete?!
mengu has quit [Remote host closed the connection]
sanguisdex has joined #ruby
<dreinull75>
[k- mine has, maybe that's been enable through irb-tools though.
jtdowney has joined #ruby
<[k->
you lie ;-;
<dreinull75>
adaedra does this kind of ac have a name to look for?
anisha has quit [Ping timeout: 272 seconds]
<catphish>
dorei: you're right, both based on @mask_addr, one does a lot more checking though
nii236 has quit [Ping timeout: 245 seconds]
<dreinull75>
[k- no.
mistermocha has quit [Read error: Connection reset by peer]
Channel6 has quit [Quit: Leaving]
<adaedra>
dreinull75: I don't like autocompletion personally, so I don't know
paulcsmith has joined #ruby
<catphish>
we should just go back to classful addressing, then it'd be easy :)
<adaedra>
urk.
odin22 has joined #ruby
colorados has quit [Read error: Connection reset by peer]
<dreinull75>
adaedra: ok, will continue looking
erikm has joined #ruby
dfinninger has quit [Read error: Connection reset by peer]
m4farrel has joined #ruby
SouL_|_ has joined #ruby
dfinninger has joined #ruby
<mwlang>
catphish: on SO, the first answer uses Ruby’s #to_s(2) to convert to binary and then counts the 1’s to make the prefix. The 2nd solution used the Math module to do the math, probably because the author wasn’t aware that you could convert Fixnum to different bases with the #to_s function.
<A124>
Hey there. What is the fastest way to run interpreted code? Tried RBX though on another machine. There is minor speedup. Is there something faster?
<wasamasa>
jruby?
<catphish>
mwlang: many would argue that base 2 math is a better solution that string handling
<adaedra>
For long running programs, jruby may be a solution, A124
<catphish>
(i am one such person)
<A124>
wasamasa :O You! :D
mary5030_ has quit [Remote host closed the connection]
<A124>
wasamasa, adaedra : Could you .. point out any factor or percentage of usual speedup?
serivichi has joined #ruby
<catphish>
mwlang: the mathematical solution looks complicated, but its actually very simple bitwise math and likely much faster than the string based solution
<adaedra>
in the case of IP class deduction, binary calculation is indeed a netter solution
<wasamasa>
the jvm/clr seem to have solved the problem of making interpreted dynamic language fast
<wasamasa>
at the cost of startup time and ugliness!
mary5030 has joined #ruby
<wasamasa>
A124: there's such a website
<mwlang>
catphish: it probably is, plus it takes into account IP4 vs. IP6 so I’d likely go for that one myself.
<adaedra>
A124: no, because it depends on many things. Ask google, it may have that, though.
<catphish>
i understand now anyway, @mask_addr is a bitmask
fabrice31 has quit [Remote host closed the connection]
fabrice31 has joined #ruby
<A124>
Hmm.. thanks.. what is CLR? Will try jruby.
<mwlang>
catphish: old school does teach that you should keep the data always in the data type it’s supposed to be rather than needlessly bouncing it around. If I were still doing C or Pascal development, I’d live by this rule…but in interpreted languages, that line gets really blurry really fast.
Guest15 has joined #ruby
<A124>
If that fails I will try to probably make c++ program.. or Ruby extension when I figure how.
<adaedra>
Problems with JRuby is JVM startup and memory usage
juanpablo___ has joined #ruby
<wasamasa>
A124: the thing C# runs on
<catphish>
mwlang: i switch between C and ruby, i always have types in the back of my mind
<wasamasa>
A124: microsofts answer to the jvm
serivich has quit [Ping timeout: 244 seconds]
colorisco has joined #ruby
<A124>
Hmm.. yeah thought of that.. was super confused. Not for me then.
jottr has joined #ruby
iamjarvo has joined #ruby
<wasamasa>
then, scheme and CL implementations also manage being faster than ruby/python
michael_mbp has quit [Excess Flood]
freerobby has joined #ruby
<wasamasa>
probably because they weren't made by a single amateur in their bedroom
<wasamasa>
and have a spec and whatnot
iamjarvo has quit [Max SendQ exceeded]
dreinull75 has quit [Remote host closed the connection]
dreinull75 has joined #ruby
michael_mbp has joined #ruby
Guest15 has quit [Client Quit]
iamjarvo has joined #ruby
lxsameer_ has quit [Quit: Leaving]
iamjarvo has quit [Max SendQ exceeded]
ujjain- is now known as ujjain
<mwlang>
long live the amateurs that bring us these crazy languages. :-)
<A124>
I think I will then default to C/C++. Are there any tips about extenstion? Aka is calling it many times with two strings as fast as calling it in batches?
fabrice31_ has joined #ruby
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
PhantomSpank has joined #ruby
<wasamasa>
A124: keep care of algorithms, data structures and processor caches
<A124>
Ugh,, alright. Not sure how to do that. But ok.
<mwlang>
A124: what are you buliding?
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
juanpablo___ has quit [Ping timeout: 256 seconds]
<A124>
Computational processing function run many times (billions), on set of strings.
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
<A124>
Which is where the batch / feeding it array and let the C do the combinations instead making the combinations in Ruby would speed it up significantly.
<mwlang>
A124: look at a gem like ox or nokogiri. They’re largely written in C
iamjarvo has joined #ruby
dfinninger has quit [Read error: Connection reset by peer]
dfinninger has joined #ruby
<A124>
But since the Ruby runtime takes 100s for 100k, and just doing the combinations is 0.03/0.1 then I guess does not matter.
<wasamasa>
this is required if you want to do something as crazy as building a fast message queue
fabrice31 has quit [Ping timeout: 240 seconds]
Rickmasta has joined #ruby
<A124>
Unless there is performance hit when handling the data over and back.
piotrj has quit [Remote host closed the connection]
<wasamasa>
this guy knows about the topic
<A124>
I dont get what is that Aeron.
zorak8 has joined #ruby
<wasamasa>
it's a message queue
<A124>
Multicast for network? For Ruby? For Java?
colorisco has quit [Quit: colorisco]
piotrj has joined #ruby
ndrei has joined #ruby
livathinos has joined #ruby
antgel has quit [Ping timeout: 256 seconds]
quimrstorres has joined #ruby
<wasamasa>
the code looks like C :D
badhatter has quit [Quit: Leaving]
<wasamasa>
and its author has held a talk about the topic of writing performant code
badhatter has joined #ruby
<wasamasa>
which explains these points I've mentioned a bit
antgel has joined #ruby
nii236 has joined #ruby
kobain has joined #ruby
thatslifeson has joined #ruby
badhatter has quit [Client Quit]
badhatter has joined #ruby
kobain has quit [Max SendQ exceeded]
<A124>
That article is excellent, thank you.
dfinninger has quit [Read error: Connection reset by peer]
kobain has joined #ruby
badhatter has quit [Client Quit]
enebo has joined #ruby
badhatter has joined #ruby
bruno- has joined #ruby
slash_nick has joined #ruby
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
juanpablo___ has joined #ruby
msgodf has quit [Remote host closed the connection]
<A124>
Gonna be a longer run to get down to the perf from thousand years to minutes or hours.
<wasamasa>
you mean, blog
havenwood has joined #ruby
dfinninger has joined #ruby
<A124>
Yeah.
AlphaAtom has joined #ruby
WajidKagzi has joined #ruby
McRae has joined #ruby
yagooar has joined #ruby
Spami has joined #ruby
dfinninger has quit [Read error: Connection reset by peer]
JDiPierro has quit [Remote host closed the connection]
<A124>
I guess the first step will be rewriting O(n*m) into O(n+m) and while I am at it, to C++. Then trying to use that as IO pipe, then Ruby extension, then the rest. Thanks for heading me the right direction.
JDiPierro has joined #ruby
yagooar has quit [Client Quit]
dfinninger has joined #ruby
iotouch has quit [Quit: 离开]
fabrice31_ has quit [Remote host closed the connection]
fabrice31 has joined #ruby
<PhantomSpank>
hey people, i worked through the codeacademy ruby course. Any advice where to go from here?
dfinninger has quit [Read error: Connection reset by peer]
kp666 has quit [Remote host closed the connection]
<dudedudeman>
Build a project!
rodfersou has joined #ruby
<dudedudeman>
i've learned so much that I never would have thought about just by thinking of something, and then trying t ocreate it.
dfinninger has joined #ruby
riotjones has quit [Remote host closed the connection]
<PhantomSpank>
i wanted to create a blackjack game in ruby
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<cek>
guys, 0MQ says I should not use socket from another thread context. But under thin, even if its threaded, it's still ruby non-native thread. Does this mean I can use socket from another thread?
Pumukel has joined #ruby
fabrice31_ has joined #ruby
FF_ has quit [Quit: Remote host closed the connection.]
<PhantomSpank>
dude
<PhantomSpank>
thanks man
<dudedudeman>
that whole site is stellar and there's a lot of great things on there to build upon
<dudedudeman>
of course, it's not meant to be all inclusive, so don't be afraid to go off searching for a better explanation if you don't understand something
chrissonar has quit [Remote host closed the connection]
<apeiros>
I guess you omitted the block which was associated with it and belongs to the expression.
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
seitensei has joined #ruby
seitensei has joined #ruby
m0crack has joined #ruby
<crowell>
[k-: i hate fp, but i get folds
tagrudev has quit [Remote host closed the connection]
moeabdol has joined #ruby
nettoweb has joined #ruby
<bMalum>
thank you
kblake has joined #ruby
chipotles has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
antgel has quit [Ping timeout: 244 seconds]
<m0crack>
i've got fairly simple question i think. i'm using ipaddr class, specifically ipaddr.reverse, but i need to strip the surrounding ""'s off of the returned value. any quick ideas?
<apeiros>
m0crack: are you sure you're not misunderstanding the returned value?
mostlybadfly has quit [Quit: Connection closed for inactivity]
<m0crack>
apeiros: i don't think so?
<apeiros>
DaniG2k: yes. send bypasses visibility.
harly has quit [Quit: Leaving]
<DaniG2k>
cool
<apeiros>
m0crack: yupp, you are misunderstanding it.
zeroXten has joined #ruby
<apeiros>
m0crack: you're looking at inspects.
<apeiros>
m0crack: use puts instead of p and the " are gone. they are not part of the string.
<m0crack>
i'm a complete ruby n00b, so it's possible
<m0crack>
ahh
<zeroXten>
hi. if you've got a 128 bit integer, what is the "correct" way of turning that into a 16 byte string? cheers
terlar has joined #ruby
<m0crack>
apeiros: thanks man!
cpt_yossarian has quit [Quit: And then he took off.]
<jhass>
zeroXten: split it into two 64 bit ones and use Array#pack
<zeroXten>
jhass: ok thanks
Filete has joined #ruby
shellfu is now known as shellfu_C8H10N4O
dfinninger has quit [Remote host closed the connection]
mtakkman has joined #ruby
chipotles has joined #ruby
pdoherty has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zorak8 has quit [Ping timeout: 255 seconds]
urma has quit [Quit: urma]
thatslifeson has quit [Remote host closed the connection]
rodfersou has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
diegoaguilar has joined #ruby
tkuchiki has joined #ruby
neohunter has joined #ruby
<neohunter>
ru y 1.87 suport regex named groups?
mtakkman has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<[k->
iirc there is private_send too
lessless has joined #ruby
<[k->
or is send private and there is public_send
piotrj has quit [Remote host closed the connection]
<[k->
ah its public_send
piotrj has joined #ruby
tkuchiki has quit [Ping timeout: 265 seconds]
alienaut has joined #ruby
<[k->
Mon_Ouie: \o/ eval.in wall of fame
<[k->
oh its a hall
<adaedra>
wall of shame
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tkuchiki has joined #ruby
segfalt has joined #ruby
<Mon_Ouie>
?
moeSeth_ has joined #ruby
Musashi007 has joined #ruby
arturaz has quit [Ping timeout: 255 seconds]
ItSAN____ has joined #ruby
SouL_|_ has quit [Ping timeout: 245 seconds]
<jhass>
neohunter: who cares? 1.8 is dead
AlphaAtom has quit [Ping timeout: 264 seconds]
ItSANgo has quit [Ping timeout: 244 seconds]
wottam_ has joined #ruby
wottam has quit [Read error: Connection reset by peer]
<adaedra>
burn 1.8 with fire
dumdedum has joined #ruby
<[k->
hall of fame? eval.in? !
zotherstupidguy has quit [Ping timeout: 245 seconds]
<platzhirsch>
What's state of the art for CI in Ruby? I only know Jenkins
_blizzy_ has joined #ruby
ki0_ has joined #ruby
<jhass>
self hosted? probably still Jenkins
<[k->
>> class Channel;def clap (user);puts "#ruby is clapping for #{user.to_s}!";end;end;Channel.new.clap("Mon_Ouie")
<ruboto>
[k- # => #ruby is clapping for Mon_Ouie! ...check link for more (https://eval.in/321283)
<platzhirsch>
jhass: oh my
<[k->
hehe
<[k->
there are a lot of CI
ismaelga has joined #ruby
sinkensabe has quit [Remote host closed the connection]
satanic_spectre has joined #ruby
snockerton has joined #ruby
satanic_spectre has left #ruby [#ruby]
<[k->
CircleCI, TravisCI, ...
<jhass>
platzhirsch: I think most people moved to a SaaS one
alienaut has quit [Ping timeout: 264 seconds]
<platzhirsch>
jhass: like Travis?
<jhass>
yeah
tjohnson has joined #ruby
ki0 has quit [Ping timeout: 250 seconds]
<Matachines>
I Love Ruby
Lewix has joined #ruby
<adaedra>
We all do
shellfu_C8H10N4O is now known as shellfu
Matachines has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
terlar has quit [Quit: WeeChat 1.1.1]
antgel has quit [Ping timeout: 276 seconds]
simplon1 has joined #ruby
<jhass>
platzhirsch: ugh, why do you crosspost without telling so
aganov has quit [Quit: Leaving]
<platzhirsch>
jhass: Forgot about that IRC decency rule
<platzhirsch>
sorry
serivichi has quit [Ping timeout: 256 seconds]
antgel has joined #ruby
<skakri>
Hey, can someone help me figure this one out (Rails)? I have placed an svg file in assets and want to get full url of it (I'm using asset pipeline) in template.
<jhass>
skakri: but it's a quick answer: use the image_path or asset_path helper
Brozo has quit [Quit: Leaving...]
<workmad3>
or image_url/asset_url if you want the domain and protocol on them too
mistermocha has joined #ruby
<jhass>
oh, path_to_asset is actually an alias
Filete has quit [Read error: Connection reset by peer]
gagrio has quit [Ping timeout: 264 seconds]
freezey has quit [Remote host closed the connection]
emilkarl has quit [Quit: emilkarl]
fabrice31_ has joined #ruby
zotherstupidguy has joined #ruby
basiclaser has joined #ruby
aufi has quit [Quit: Konversation terminated!]
Matachines has joined #ruby
riotjones has joined #ruby
thatslifeson has joined #ruby
Matachines has quit [Max SendQ exceeded]
shellfu has quit [Remote host closed the connection]
Matachines has joined #ruby
nettoweb has joined #ruby
sohrab has joined #ruby
Soda has quit [Remote host closed the connection]
fabrice31 has quit [Ping timeout: 256 seconds]
fabrice31_ has quit [Remote host closed the connection]
terlar has joined #ruby
fabrice31 has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
dfinninger has joined #ruby
PhantomSpank has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
sagittarian has joined #ruby
Rickmasta has joined #ruby
PhantomSpank has joined #ruby
JDiPierro has joined #ruby
riotjones has quit [Ping timeout: 276 seconds]
jimms has joined #ruby
Igorshp has quit [Remote host closed the connection]
gauke has quit [Quit: gauke]
baroquebobcat has joined #ruby
bMalum_ has joined #ruby
icebourg has joined #ruby
bMalum has quit [Ping timeout: 240 seconds]
bMalum_ is now known as bMalum
iamninja has joined #ruby
serivichi has joined #ruby
mostlybadfly has joined #ruby
m0crack has quit [Quit: Page closed]
idealexit has joined #ruby
livathinos has quit []
fabrice31 has quit [Ping timeout: 256 seconds]
bluOxigen has joined #ruby
tomphp has joined #ruby
jottr has joined #ruby
pontiki has quit [Ping timeout: 276 seconds]
baroquebobcat has quit [Ping timeout: 250 seconds]
blueOxigen has joined #ruby
<finisherr>
So, i’m trying to get into TDD. Unit tests on methods that manipulate primitive data types makes sense using TestCase. However, what happens when you need an actual data set? Files? External resources. How can you test that the application does what you expect from a higher level?
RegulationD has quit [Remote host closed the connection]
<[k->
does this channel often get such large spam of join/part messages?
<dudedudeman>
[k-: depending on your irc client, you can turn that off
<adaedra>
There's a lot of people, and sometimes large periods of idle, so it looks fine to me
<adaedra>
And yes, you may be able to hide it if it disturbs you
<[k->
I don't TDD :(
<adaedra>
TDD?
<dudedudeman>
i know you can do it on the freenode site itself
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rom1504>
adaedra: Test Driven Dev
bluOxigen has quit [Ping timeout: 255 seconds]
<adaedra>
rom1504: yeah, I'd have said that, but it doesn't fit in the context
jottr has quit [Read error: Connection reset by peer]
<[k->
it does because of the previously written sentence by finisherr
kobain has quit [Ping timeout: 276 seconds]
<rom1504>
maybe Transcendental Deficit Disorder then :P
<jhass>
neohunter: I hope it's not fetching untrusted user data then
<adaedra>
Good evening Senjai
<Senjai>
finisherr: dudedudeman I also like yard :P
mistermocha has quit [Remote host closed the connection]
<apeiros>
neohunter: better get started then?
mistermocha has joined #ruby
<apeiros>
IME upgrading ruby version was not that hard. 1.8 to 1.9 was the hardest though. most issues were encoding related and if you got your stuff together shouldn't cause much problems.
<apeiros>
(and yes, we upgraded massive codebases)
<[k->
such vast improvements over 1.8.7 will outweigh the time wasted
PhantomSpank has quit [Read error: Connection reset by peer]
pdoherty has joined #ruby
mrmargol_ has joined #ruby
jottr has joined #ruby
PhantomSpank has joined #ruby
bricker has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
allenn has quit [Remote host closed the connection]
joonty has quit [Quit: joonty]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
almostworking has joined #ruby
<noodcoder>
Hey, I can code ruby and javascript, But I'm not fluent in both. I have two internship opportunities, one in ruby and other in JavaScript, What will make me a better programmer?
tkuchiki has quit [Ping timeout: 245 seconds]
Timba-as has quit [Quit: Be back later ...]
<adaedra>
Taking one of these jobs
TheNet has quit [Client Quit]
sohrab has quit [Ping timeout: 256 seconds]
<dudedudeman>
noodcoder: i guess that would almost entirely depend on what you wanted to do in teh future
<adaedra>
This is just another way of asking "Which one is better"
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
McRae has quit [Ping timeout: 250 seconds]
thiagovsk has joined #ruby
Guest44958 has quit [Remote host closed the connection]
WajidKagzi has quit [Ping timeout: 245 seconds]
<noodcoder>
@dudedudeman I know both have pros and cons, But I'm more interested learning programing concepts and design pattern, I want to be a better programmer, not a better ruby or JS developer
<jhass>
noodcoder: anyway, that question is moot, programming is a skill, a programming language is a tool, it's like asking whether the saw or the hammer will make you a better carpenter
<[k->
oop + fp + kp + lp + dp
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
<jhass>
if you master the skill, you easily master the tools it uses
tomphp has joined #ruby
<[k->
javascript is none :O
<dudedudeman>
noodcoder: then it might be worth digging a little deeper to see what they're offering in the internship and if they're goign to be teaching as well as expecting you to do work, or if their idea of an internship is just you being a body in an office
rbennacer has quit [Remote host closed the connection]
<[k->
^
<dudedudeman>
what jhass said is absolutely right, and i'd say you're on the right track in your thinking. but i don't think we have enough information on what the internships are offering to tell you waht might be better or not when it comes to the foundation
<adaedra>
Yeah, the choice of internship is more important
<[k->
i would think ruby is easier to grasp than javascript
<[k->
so you would have a less hard time
f3lp has joined #ruby
chipotles has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<noodcoder>
ruby internship is working with rails app for a startup, rails and regular stuff, while the JS is working on a realtime application and they are writting lot of raw javascript
<dudedudeman>
the way you phrase that makes it sound like you're a little more interested in the javascript option
djbkd has joined #ruby
timonv has quit [Ping timeout: 264 seconds]
Mohan has joined #ruby
<noodcoder>
and both company have excelent programmers with open source contribution to the languages like rust, elixer etc
<dudedudeman>
ah! that's good info.
Mohan is now known as Guest61448
<dudedudeman>
(while i have not had a programming internship, i have had 4 other ones, hence why i'm contributing to this discussion)
<adaedra>
noodcoder: pay, opportunities after the internship, location?
lkba_ has joined #ruby
<dudedudeman>
^
<neohunter>
I have this
<neohunter>
Time.now.strftime("%v")
<neohunter>
on my machine works
<neohunter>
but server ourput %v
<adaedra>
neohunter: same version of ruby on both?
pdfpkw has quit [Remote host closed the connection]
iceden has quit [Read error: Connection reset by peer]
iceden has joined #ruby
thumpba has quit [Ping timeout: 244 seconds]
almostworking has joined #ruby
almostworking has left #ruby [#ruby]
rrichardsr3 has joined #ruby
dopie has joined #ruby
rrichardsr3 has quit [Client Quit]
WajidKagzi has quit [Ping timeout: 276 seconds]
yaw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
paulcsmith has joined #ruby
WajidKagzi has joined #ruby
Matachines has joined #ruby
ldnunes has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
qwertme has joined #ruby
diego_ is now known as diegoviola
scripore has joined #ruby
cpruitt has joined #ruby
cpruitt has quit [Client Quit]
pontiki has joined #ruby
ascarter has joined #ruby
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
serivichi has quit [Ping timeout: 244 seconds]
Guest16685 has quit [Ping timeout: 246 seconds]
<fibre>
I hope I am not on the ignore lists: Can I use the gem command to install a ruby gem into a directory so I can use it with require_relative?
ascarter has quit [Max SendQ exceeded]
idealexit has quit [Remote host closed the connection]
sohrab has quit [Ping timeout: 244 seconds]
ascarter has joined #ruby
tcrypt has joined #ruby
mtakkman has quit [Ping timeout: 250 seconds]
<jhass>
fibre: you could gem unpack it, but there might be a much better way to achieve your true goal
sohrab has joined #ruby
colorados has quit [Read error: Connection reset by peer]
rbennacer has quit [Remote host closed the connection]
colorados2 has joined #ruby
pontiki has quit [Ping timeout: 250 seconds]
allcentury has joined #ruby
towski_ has joined #ruby
<fibre>
jhass: ok, so the issue is the following: A custom function (in ruby) for puppet scm (which is ruby based, hurra) needs an external/official rubygem to function correctly.
<fibre>
1) the ruby gem that is needed by the function is not needed in the system, it is only needed by that function
<jhass>
sounds like something you should ask #puppet then
<fibre>
I did
<jhass>
with how much patience?
<fibre>
much, but I will tell you what they said to me
Guest61448 has quit [Ping timeout: 248 seconds]
<fibre>
They also recommended that I should put the ruby gems into a separate directory, isolated.
<fibre>
And then require_relative them.
<fibre>
So I try to use gem command now to install that ruby gem (simpleidn) to the module directory, so require_relative can just use it.
RegulationD has joined #ruby
<jhass>
I don't know anything about puppet, but could you use bundler? it ships battle tested functions to do that
chipotle has quit [Quit: cheerio]
lidenskap has joined #ruby
gaganjyot has joined #ruby
<eam>
seems like odd advice, why wouldn't you want to just install the gem alongside the others puppet uses?
<eam>
I see no reason not to do that
Mohan has joined #ruby
RegulationD has quit [Remote host closed the connection]
<jhass>
yeah, actually why not install it to the system/where puppet is installed
<fibre>
jhass: bundler would be ok - I can do that before deploying it
Mohan is now known as Guest41360
lidenskap has quit [Read error: Connection reset by peer]
<neohunter>
ruby has somethign to increase value by one? like php $i++ ?
<fibre>
jhass: right, that would have to be added to the bootstrapping script then - and this I want to avoid - because this function - and the ruby gem to be installed for it - is not needed by all systems.
<havenwood>
neohunter: i += 1
<neohunter>
i = i + 1
<neohunter>
thanks
lidenskap has joined #ruby
<jhass>
fibre: well, the bundler approach will it install on all systems too, it's just easy to use a local site dir with it
<havenwood>
fibre: `gem install GEM_NAME --install-dir /path/to/GEM_NAME` is an easy way to install gems where you like. What's wrong with just installing the gem and requiring it?
<fibre>
can I use bundler for that - using a separate directory as intended?
Spami has joined #ruby
lidenskap has joined #ruby
vickleton has joined #ruby
<fibre>
bundler shims the require method?
rbennacer has joined #ruby
Spami has quit [Client Quit]
Jonah11_ has joined #ruby
<jhass>
bundler manages $LOAD_PATH
<jhass>
and it restricts it to gems listed in your Gemfile
Spami has joined #ruby
psy_ has joined #ruby
Zai00 has quit [Quit: Zai00]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
it just makes it easy to install those gems into a sitedir (bundle install --path vendor/bundle) and load them from there or ship them with your app so they don't need to be downloaded (bundle package)
ramfjord has quit [Ping timeout: 255 seconds]
scripore has quit [Quit: This computer has gone to sleep]
<havenwood>
fibre: if it's not Rails you can even ditch Bundler and just do that ^ with RubyGems directly. set `RUBYGEMS_GEMDEPS="/location/of/Gemfile"` and `gem install -g /location/of/Gemfile`
lidenskap has quit [Remote host closed the connection]
lidenskap has joined #ruby
<eam>
puppet is rails, yeah?
<havenwood>
eam: is it? i don't even know.
<sweeper>
no it's not :P
<fibre>
eam: no, but ruby
<fibre>
eam: it is based on ruby
<eam>
pretty sure puppet server uses rails
<fibre>
it is a scm with a dsl
<eam>
yeah I'm familiar with puppet
<havenwood>
i'm not
<fibre>
eam: webrick for free version and some unicorn thing for production
<havenwood>
fibre: pay for unicorn? :O
<fibre>
ok, so I use ruby bundler now? or rake?
<fibre>
havenwood: well, community vs enterprise edition
<fibre>
puppet master though
WajidKagzi has quit [Ping timeout: 245 seconds]
lordkryss has joined #ruby
<fibre>
without paying one can still use it - but ii requires some tinkering with dashboard and master servers (when master-mode is used)
jobewan has joined #ruby
Igorshp has quit [Remote host closed the connection]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
WajidKagzi has joined #ruby
<jhass>
fibre: the issue is that you're asking ##c how to do something with the linux kernel, to draw an analogy, you encounter people who can understand the code of the kernel or may happen to use linux too, but it's just a programming language and software written in it, knowledge of the former doesn't imply knowledge of the latter
scripore has joined #ruby
iamjarvo has joined #ruby
mdw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass>
that's why you get such mixed advice, few here really understands your issue, I don't tbh
iamjarvo has quit [Max SendQ exceeded]
Sawbones_ has joined #ruby
<Jonah11_>
is it possible to make instance variable private to a module, but inaccessible to objects that include those modules? clarification here: http://pastie.org/10120709
<jhass>
Jonah11_: depends, should the variable be unique to each instance of each class the module is included in?
<jhass>
or shared among all of them
Sawbones_ has quit [Remote host closed the connection]
iamjarvo has joined #ruby
bmurt has quit [Ping timeout: 264 seconds]
<havenwood>
Jonah11_: oh, that's not `self.test`, never mind me
<Jonah11_>
@jhass, unique to each instance. basically, i want the object iself to "host" the data storage of @x, as it were, but not to have access to @x other than through the module methods. indeed, i want it to be able to have its own instance variable named @x if it wants, with no collission
basiclaser has left #ruby [#ruby]
<jhass>
that's not possible then
<weaksauce>
fibre why not use bundler? if you want to keep things separate you can specify a path like bundle install --path=./vendor or some such
<Jonah11_>
jhass: what would be a viable alternative?
<jhass>
depends heavily on your usecase/design
fryguy9 has quit [Quit: Leaving.]
pontiki has joined #ruby
einarj has quit [Remote host closed the connection]
PhantomSpank has quit [Read error: Connection reset by peer]
<Jonah11_>
jhass, use case is i want to create a sinatra extension that, when added and configured, stores some data. but if i use an instance variable to store that data, i have to worry about name collisions with any apps that include the extension...
PhantomS_ has joined #ruby
avahey has quit [Quit: Connection closed for inactivity]
wallerdev has quit [Quit: wallerdev]
cablanchard has joined #ruby
wallerdev has joined #ruby
Guest41360 has quit [Ping timeout: 256 seconds]
<Jonah11_>
ie, the app itself may create and reference an instance variable, oblivious to the fact that the extension it included is messing with an instance variable of the same name
cablanchard has left #ruby [#ruby]
shellfu has joined #ruby
<jhass>
still kinda vague, depending on what the extension does you could avoid including it altogether or let the caller specify storage, that is expect methods like get_x, set_x to be defined by the user
Mohan_ has joined #ruby
Igorshp has quit [Remote host closed the connection]
<jhass>
or provide a rack app that can be mounted or...
<Jonah11_>
jhass, you'll get a parse error if you omit them on single line methods
baweaver has joined #ruby
PhantomS_ has quit [Read error: Connection reset by peer]
<jhass>
I don't do single line methods, people that do use ; instead
sohrab has quit [Ping timeout: 245 seconds]
PhantomSpank has joined #ruby
gustav has joined #ruby
<yxhuvud>
You need them for cases like Integer vs Integer(), but that is about it
<Jonah11_>
jhass, ah i wasn't aware i could do ; instead of () in that case, good ot know
RegulationD has quit [Remote host closed the connection]
last_staff has joined #ruby
<Jonah11_>
jhass, let me give a stupid example to illustrate. a NameProvider extension, which sets your name and makes it avail via a helper method. at the top of the app, you do `set_my_name "Jonah"`, and now you can call a helper method called "my_name" anywhere. under the hood the extension stores your name in @name, say. hence the possible collision issue...
WajidKagzi has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
juanpablo___ has quit [Ping timeout: 250 seconds]
<jhass>
I'd be fully okay with the extension occupying @my_name, after all I use it to not do that work on my own
djbkd has joined #ruby
mdw has joined #ruby
<jhass>
that said, the collision free design for this is: @name = NameProvider.new("Jonah"); @name.get; @name.set("Alex")
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
RegulationD has joined #ruby
<Jonah11_>
jhass, that's just avoiding the issue tho :) it forces you to explicitly do work that you want DSL'd away by a nicely designed extension.
banister has joined #ruby
Guest75175 has quit [Remote host closed the connection]
banister has quit [Max SendQ exceeded]
<Jonah11_>
and i should not have to worry about knowing internal details of my extensions to avoid problems
<jhass>
define_name :name, default: "Jonah"
evanjs has quit [Quit: Leaving...]
<jhass>
name, name=
<jhass>
or name.get, name.set
slash_nick has joined #ruby
<jhass>
and using composition over inheritance is very much a proper solution to the issue you mention
<jhass>
not "avoiding it" in the negative sense
<fibre>
weaksauce: and I require then using require_relative? Or do I have to require bundler first?
hrendalf has joined #ruby
<weaksauce>
run your things using `bundle exec` fibre
<weaksauce>
bundle exec ruby_script.rb
jottr has joined #ruby
djbkd_ has joined #ruby
<fibre>
weaksauce: hm, that would be possible - but I have to run puppet using its cli
<weaksauce>
fibre and use require as bundler handles setting up all your paths correctly
<fibre>
hm
<Jonah11_>
jhass, no. there is no inheritance in what i'm trynig to do. and all the solutions you propose make me expicitly know about a name variable. i just want to configure my extension and then have methods avail. i should be oblivious of the storage mechanism
<weaksauce>
bundle exec puppetthing arg1 arg2
bMalum has quit [Quit: bMalum]
<jhass>
Jonah11_: include and extend are inheritance
DerisiveLogic has joined #ruby
<fibre>
I could try that, yes
iamjarvo has joined #ruby
<jhass>
Jonah11_: anyway, the deal is make the caller aware of the variable, either through letting him define it or through documentation, or live with the potential conflict and minimize it by using an uncommon variable name like @__mygem__name
iamjarvo has quit [Max SendQ exceeded]
zorak8 has joined #ruby
diegovio1a has joined #ruby
iamjarvo has joined #ruby
pandaant has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
gustav has quit [Remote host closed the connection]
PhantomSpank has quit [Read error: Connection reset by peer]
maletor has joined #ruby
scripore has joined #ruby
PhantomSpank has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
<Jonah11_>
jhass, yeah i thought of the uncommon name, but again don't love it as it's still avoiding the theoritical question even if it solves the practical problem. letting the caller define the name is interesting though. i didn't get that you were suggesting that earlier...
jottr has quit [Ping timeout: 276 seconds]
djbkd_ has quit [Ping timeout: 256 seconds]
bMalum has joined #ruby
PhantomSpank has joined #ruby
tvw has quit [Remote host closed the connection]
thatslifeson has quit [Remote host closed the connection]
shellfu has quit [Ping timeout: 250 seconds]
jottr has joined #ruby
postmodern has joined #ruby
Hijiri has joined #ruby
McRae has quit [Ping timeout: 250 seconds]
claw has quit [Ping timeout: 245 seconds]
blahwoop has quit [Remote host closed the connection]
claw has joined #ruby
diegovio1a has quit [Quit: WeeChat 1.1.1]
segfalt_ has joined #ruby
WajidKagzi has quit [Ping timeout: 265 seconds]
philip1 has joined #ruby
segfalt has quit [Ping timeout: 250 seconds]
segfalt_ is now known as segfalt
gustav has joined #ruby
juanpablo___ has joined #ruby
pdoherty has quit [Remote host closed the connection]
mistermocha has quit [Read error: Connection reset by peer]
juanpablo___ has quit [Read error: Connection reset by peer]
phutchins has quit [Ping timeout: 252 seconds]
juanpablo___ has joined #ruby
mistermocha has joined #ruby
fryguy9 has joined #ruby
<allcentury>
is there any special nomenclature in ruby for the variable passed into a block. ie array.each do |element| --- is |element| called anything other than a variable?
mdw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<pipework>
block variable
<havenwood>
^
gazay has quit [Ping timeout: 244 seconds]
gazay_ has joined #ruby
dc__ has quit [Remote host closed the connection]
quimrstorres has quit [Remote host closed the connection]
juanpablo___ has quit [Ping timeout: 276 seconds]
ismaelga has quit [Remote host closed the connection]
leafybasil has quit [Read error: Connection reset by peer]
leafybasil has joined #ruby
juanpablo___ has joined #ruby
sohrab has joined #ruby
pengin has joined #ruby
<jhass>
I've also heard block argument and block parameter
PhantomSpank has quit [Read error: Connection reset by peer]
<jhass>
allcentury: symbolhound.com provides a great way to search for syntax you don't know the name of
momomomomo has joined #ruby
PhantomSpank has joined #ruby
WajidKagzi has joined #ruby
PhantomS_ has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
yottabyte has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
withnale_ has quit [Ping timeout: 276 seconds]
mary5030 has quit [Remote host closed the connection]
sandstrom has quit [Quit: My computer has gone to sleep.]
hiyosi has joined #ruby
Rickmasta has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
DerisiveLogic has quit [Ping timeout: 255 seconds]
moeSeth_ has quit [Quit: Connection closed for inactivity]
Timba-as has joined #ruby
shazaum has quit [Ping timeout: 256 seconds]
konsolebox has quit [Remote host closed the connection]
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
kadoppe has quit [Ping timeout: 272 seconds]
konsolebox has joined #ruby
jottr has quit [Read error: Connection reset by peer]
segfalt has joined #ruby
<shevy>
this world needs more ruby
blackmesa has quit [Ping timeout: 256 seconds]
<shevy>
and love
<shevy>
but primarily ruby
mleung has joined #ruby
Matthews_ has joined #ruby
kadoppe has joined #ruby
<baweaver>
ruby has tenderlove
<baweaver>
that counts right?
Hijiri has joined #ruby
Oka has joined #ruby
deric_skibotn has joined #ruby
<mleung>
Hi, we upgraded from 2.1.1 to 2.2.2 yesterday and we occassionally see [BUG] object allocation during garbage collection phase when we compile asset during deploy
Matthews_ has quit [Remote host closed the connection]
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mleung>
I have googled a bit that there is some changes in gc in 2.2, can someone point me to where to get more info regarding this error msg?
<deric_skibotn>
Is there a way to pull the ruby stacktrace from within gdb? If I gdb-attach to an existing process can I get the stack in terms of Ruby code? This is possible in JS when debugging firefox
NinjaOps has quit [Quit: Konversation terminated!]
mistermocha has joined #ruby
Matthews_ has joined #ruby
nb_bez___ has joined #ruby
jottr has joined #ruby
MatthewsFace has quit [Ping timeout: 250 seconds]
wallerdev has quit [Quit: wallerdev]
dc__ has joined #ruby
<shevy>
baweaver haha yeah
qwertme has joined #ruby
bim has joined #ruby
bim is now known as Guest53295
jordanm has joined #ruby
last_staff has quit [Quit: last_staff]
<eam>
deric_skibotn: sure, you can p rb_eval_string("puts caller.inspect")
chinmay_dd has joined #ruby
<deric_skibotn>
eam: thx!
loechel has joined #ruby
<deric_skibotn>
Much easier than getting the JS stack out of firefox internals
failshell has quit [Remote host closed the connection]
<eam>
there are some projects that wrap this kind of thing up in easier to use macros
<eam>
there's probably a safer way to do that too
faddai_ has joined #ruby
faddai has quit [Ping timeout: 256 seconds]
faddai_ is now known as faddai
MatthewsFace has joined #ruby
failshell has joined #ruby
chinmay_dd has quit [Quit: Leaving]
chinmay_dd has joined #ruby
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chinmay_dd_ has joined #ruby
chinmay_dd_ has quit [Remote host closed the connection]
chinmay_dd_ has joined #ruby
chinmay_dd_ has quit [Remote host closed the connection]
mrsolo has joined #ruby
chinmay_dd_ has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
maletor has joined #ruby
chinmay_dd_ has quit [Client Quit]
Matthews_ has quit [Ping timeout: 252 seconds]
<ducklobster>
is there a particular reason to use #unshift on the load path instead of #push, i.e. prepending vs appending to the load path?
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
<eam>
ducklobster: sure, one prefers the new path over other paths
cek has left #ruby [#ruby]
freerobby has quit [Quit: Leaving.]
<ducklobster>
is it considered bad practice to override (somewhat) the existing load path?
<eam>
nope
djbkd has quit [Remote host closed the connection]
Brozo has joined #ruby
dopie has joined #ruby
<eam>
you should put the path first if you want its contents to be preferred, put it last if you want to prefer the other paths
chinmay_dd has quit [Ping timeout: 256 seconds]
Guest53295 has quit [Remote host closed the connection]
<ducklobster>
great, thanks for the help :()
<ducklobster>
:)*
edwinvdgraaf has joined #ruby
robustus has quit [Ping timeout: 264 seconds]
<ducklobster>
eam: one more question regarding load paths (in context with gems)
<ducklobster>
if I have an executable in bin/ and lets say my .gemspec in the root
<ducklobster>
should I modify the load paths relative to each file?
<ducklobster>
with the added path being the lib/ dir
lele is now known as Guest24
<eam>
if you're dealing with gems (vs just modules) you probably want GEM_PATH
baweaver has quit [Remote host closed the connection]
<eam>
the gem loading mechanism is more or less totally distinct from the module loading mechanism
<deric_skibotn>
eam: I don't see the puts side effects. All I get is somthing like $2 = 41062320
<eam>
deric_skibotn: oh, it will puts to the stdout of the process being debugged
robustus has joined #ruby
jordanm has quit [Ping timeout: 265 seconds]
<eam>
perhaps check a logfile
frem has joined #ruby
<deric_skibotn>
right
<eam>
deric_skibotn: not stdout of gdb
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sandstrom has joined #ruby
gaganjyot has quit [Quit: Leaving]
gustav has joined #ruby
hippyphysicist has joined #ruby
hippyphysicist has quit [Read error: Connection reset by peer]
qwertme has joined #ruby
deol has joined #ruby
iamninja has quit [Read error: Connection reset by peer]
leafybasil has quit [Remote host closed the connection]
DerisiveLogic has joined #ruby
colorados2 has quit [Ping timeout: 240 seconds]
nettoweb has joined #ruby
dseitz has joined #ruby
djbkd has joined #ruby
Zai00 has joined #ruby
sent1nel has quit [Remote host closed the connection]
<xxneolithicxx1>
ok guys, you have a class and it has an attribute A. The class dynmically adds a getter method that accepts a parameter to "refresh" the value of attribute A from a remote source and then just return A.
<xxneolithicxx1>
in documentation, would you doc this (the dynamic method) as an attribute still or as a method
<xxneolithicxx1>
given that technically attr_* is just a method returning the instance variable A
<jhass>
method
blueOxigen has quit [Ping timeout: 264 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
n3b has quit [Ping timeout: 246 seconds]
<shevy>
xxneolithicxx1 why do you upcase a :)
rtl_ is now known as rtl
<shevy>
do you really have @A ?
<xxneolithicxx1>
no
<xxneolithicxx1>
should have chosen a better var name lol
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
x1337807x has joined #ruby
rbennacer has joined #ruby
ixti has joined #ruby
n3b has joined #ruby
rbennacer has quit [Ping timeout: 255 seconds]
sinkensabe has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
pontiki has joined #ruby
alex88 has quit [Ping timeout: 256 seconds]
rbennacer has joined #ruby
pontiki has quit [Ping timeout: 245 seconds]
horsecowdog has joined #ruby
horsecowdog has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
wottam has joined #ruby
serivichi has joined #ruby
wallerdev has joined #ruby
codecop has quit [Remote host closed the connection]
sent1nel has joined #ruby
aclapinpepin has joined #ruby
timeout has joined #ruby
sumark has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
sumark has joined #ruby
mahlon has joined #ruby
bim has joined #ruby
bim is now known as Guest10578
workmad3 has quit [Ping timeout: 256 seconds]
Zamyatin has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
<Eiam_>
okay, final one maybe! If I have a view that has code like this; https://gist.github.com/anonymous/63e9924ea53ec4ddc3de where I'm just getting a bunch of data that I need to pass to a view (view is rendering report type stuff) is there some way to make that.. cleaner? it feels like a code smell but im not sure exactly why it does
longfeet has quit [Ping timeout: 256 seconds]
bruno- has quit [Ping timeout: 250 seconds]
<Eiam_>
adaedra: thats what google gave me when i searched. im using 2.2.2
<Eiam_>
adaedra: I think I searched for "ruby datetime" or something
f3lp has joined #ruby
<adaedra>
thanks, google :/
<adaedra>
>> DateTime
<ruboto>
adaedra # => uninitialized constant DateTime (NameError) ...check link for more (https://eval.in/321422)
<adaedra>
Ah, this explains
konsolebox has quit [Remote host closed the connection]
piotrj has quit [Remote host closed the connection]
alex88 has quit [Ping timeout: 264 seconds]
nettoweb has joined #ruby
<xxneolithicxx1>
why dont you send what it needs as more structured data as opposed to a bunch of different values so it scales better
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<xxneolithicxx1>
hash/json etc
<Eiam_>
xxneolithicxx1: sure thats one option. but something somewhere is still gonna have a giant hash to "geT" all that data
<Eiam_>
so its a minor encapsulation change (which i will likely end up doing anyway)
fryguy9 has left #ruby [#ruby]
<adaedra>
There's no DateTime in Ruby 2.0 õ_o
<Eiam_>
wat?
<Eiam_>
> RUBY_VERSION
<Eiam_>
=> "2.2.2"
<adaedra>
Wait, what is happening
doodlehaus has quit [Remote host closed the connection]
<Eiam_>
xxneolithicxx1: I'll have to do that part anyway, because the view is re-used for ever increasing or decreasing scopes of data, so as you navigate up or down its just broader or more narrow queries being passed in, so that next level will definitely be necessary
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<xxneolithicxx1>
IMO, a view shouldnt be getting data, it should be given data but thats just me and i dont use MVC/web frameworks often
<adaedra>
IMO, you should not assign variables in a view.
<Eiam_>
thats effectively the controller
<Eiam_>
but yes
<Eiam_>
haml index is the call to the view
piotrj has joined #ruby
jenrzzz has quit [Quit: Lost terminal]
riskish has joined #ruby
jenrzzz has joined #ruby
Dopagod has joined #ruby
Sawbones_ has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
doodlehaus has quit [Ping timeout: 250 seconds]
mrmargolis has quit [Remote host closed the connection]
allcentury has quit [Ping timeout: 240 seconds]
OnBrokenWings has quit [Quit: Leaving]
<Eiam_>
thanks guys
<Eiam_>
very helpful
<adaedra>
@val{1..5} are not really good variables names
iamninja has quit [Read error: Connection reset by peer]
<adaedra>
and you should use @var only for variables you need to keep in your view
foobar34 has joined #ruby
bMalum has quit [Quit: bMalum]
iamninja has joined #ruby
mengu__ has joined #ruby
<Eiam_>
contrived example in that case, thats not their real names
<adaedra>
I hope so.
ta has quit [Remote host closed the connection]
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jimms has quit [Remote host closed the connection]
foobar34 has quit [Remote host closed the connection]
casadei_ has joined #ruby
cek has joined #ruby
<cek>
# Because MRI never runs code in parallel, the existing
<cek>
# non-thread-safe structures should usually work fine.
<Sou|cutter>
that's a pretty unconfident comment. Why not just make it # TODO - make threadsafe
baweaver has joined #ruby
<Sou|cutter>
oh, I see. Out of context, got it
ismaelga has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
kenndel has quit [Ping timeout: 255 seconds]
lidenska_ has joined #ruby
diegoviola has quit [Ping timeout: 264 seconds]
blackmesa has joined #ruby
ta has joined #ruby
<Sou|cutter>
A race condition can still happen in the GIL in higher-level code, but it's not going to happen because of those data structures because only a single thread is able to access them at a time
timeout has quit [Ping timeout: 248 seconds]
<Sou|cutter>
when a data structure is visible to multiple threads at the same time you have to synchronize access otherwise weird things will happen
<GaryOak_>
is it just what the doc writer's decided on ?
<adaedra>
Seems so
<shevy>
I don't think '#' is used in a code token
<shevy>
whereas . will denote a method invocation right?
<dorei>
it's just a convention when refering to class instance methods
sinkensabe has quit [Remote host closed the connection]
McRae has quit [Ping timeout: 250 seconds]
<jhass>
cek: simple example why the GIL doesn't protect you from all race conditions at all: h = {a: 1}; Thread.new { h[:a] += 1 if h.has_key? :a }; Thread.new { h.delete(:a) }
haxrbyte has quit [Ping timeout: 265 seconds]
zorak8 has quit [Quit: Leaving]
edwinvdg_ has joined #ruby
<dorei>
isnt GIL there to make unsafe C code thread safe?
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<cek>
jhass: yes, now tell me why that popular gem stating that Array is thread safe and doens't wrap it?
<cek>
what if I #push to it, will that be thread-safe? i guess not.
<jhass>
what they mean is that they won't corrupt the datastructure
<jhass>
due to the GIL
<cek>
okay, so you're telling #push is trhead -safe?
<jhass>
in the sense that it won't corrupt the data structure
allcentury has joined #ruby
<cek>
what is a datastructere?
<jhass>
that's only one class of thread safety issues
djbkd_ has joined #ruby
cjim_ has quit [Quit: (null)]
Pupeno_ has quit [Read error: Connection reset by peer]
Pupeno has joined #ruby
<cek>
push is using index, and replacing an existing value with #push is a corruption for me
<jhass>
an array for example is a chunk of memory and a counter how many items are stored (basically, we simplify here a bit)
<jhass>
so push is write to buffer, increment counter
<jhass>
if the GIL wouldn't exist other operations could happen between those two operations
badhatter has quit [Read error: Connection reset by peer]
<jhass>
which makes the state inconsistent -> corrupted
odin23 has quit [Read error: Connection reset by peer]
<cek>
i've seen cases when people wrap # push inside mutex
badhatter has joined #ruby
badhatter has quit [Changing host]
badhatter has joined #ruby
Sawbones_ has quit [Remote host closed the connection]
wldcordeiro has joined #ruby
jerius has quit [Quit: /quit]
<jhass>
if it's literally just the push, that's unnecessary in MRI
<al2o3-cr>
Is the GIL going to be remove in ruby 3.0?
mdarby has joined #ruby
<jhass>
that might not even hold true for alternate implementations like JRuby, I didn't look into that yet
juanpablo____ has joined #ruby
<cek>
Actually using MRI (Matz's Ruby implementation) the GIL (Global Interpreter Lock) makes any pure C-function atomic.
<cek>
Since Array#<< is implemented as pure C-code in MRI, this operation will be atomic. But note this only applies to MRI. On JRuby this is not the case.
<cek>
This answers my question now.
<pipework>
adaedra: GVL, you mean?
djbkd_ has quit [Ping timeout: 264 seconds]
piotrj has quit [Remote host closed the connection]
slash_nick has quit [Ping timeout: 265 seconds]
<jhass>
yeah it's GVL now because Ruby is a VM now and no interpreter, but it's still the same thing
<adaedra>
pipework: what?
<pipework>
jhass: It behaves differently than the GIL though.
<jhass>
adaedra: technically GIL is now called GVL
dc__ has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
<jhass>
pipework: how so?
<pipework>
Technically it wasn't just a rename, the behaviour is different.
<adaedra>
I think you two are talking to the wrong guy, jhass and pipework
juanpablo___ has quit [Ping timeout: 244 seconds]
<pipework>
adaedra: Oh lul.
failshell has joined #ruby
nobitanobi has quit []
<Hum-mus>
"It was Pushpa Das, a landslide on to swirl all around May and USGS Could be 492 fires are due to the drought down central Kathmandu, as well as the past week, the worst earthquake hit on the Lamont Doherty Earthquakes in centuries-old then the base camp at an explosive rate.
<Hum-mus>
And closely populated explosive 7.8-magnifies in the quakes in central Kathmandu, just next 30 year, the fires are encouraged to put a drought in California has fed in the state has for Saturday night at Tudikhel, a rugged area.
<pipework>
cek: don't get pushy, we don't owe you anything.
<Hum-mus>
We don't know what tectonic forces for California Earthquake during guide, Ang Tshering of the Southwest, there's zero moisture multi-fault lines, the new earthquake, and air, leaving ... I am waiting large
<Hum-mus>
At least 1,130 people. Many came cracks opened up in California are encouraged by landslide on Mount Everest after a massive rate.
<Hum-mus>
Another example of Kathmandu, just next three days later, there's been almost wildland Fire Protection especially trekking temperatures rise, the San Diego Union-Tribune.
nobitanobi has joined #ruby
<Hum-mus>
"We saw about 60,000 meters can even get explosive first quakes in ruins.
<jhass>
!kick Hum-mus
Hum-mus was kicked from #ruby by ruboto [Hum-mus]
Hum-mus has joined #ruby
<Hum-mus>
"Our tactics remain hours following the Southwest, the soil and thunderstand that the house while most of water a massive speed because the rain on tourism, principally rupture, producing a quake Authority.
<jhass>
!mute Hum-mus
Hum-mus has left #ruby [#ruby]
<jhass>
!unmute Hum-mus
<shevy>
this bot is a killer
<al2o3-cr>
go ruboto 8)
<shevy>
and already built a fanbase
<al2o3-cr>
hehe
Galeido^ has joined #ruby
<cek>
directly from thailand!
Stalkr_ has quit [Quit: Leaving...]
roolo has quit [Remote host closed the connection]
<pipework>
jhass: The difference is that the lock is moved from interpreter to the actual VM, so only ruby vm operations are blocking.
<pipework>
Whereas with the gil, it was interpreter level locking.
<pipework>
iirc. I was at a conference listening to a talk, and I'm trying to find that or an article that goes into detail and verifies what I believe to be true.
pontiki has joined #ruby
<dorei>
cek: if u want synchronized access, use Queue instead of Array
ta has quit [Remote host closed the connection]
yaw has joined #ruby
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
failshell has quit [Ping timeout: 265 seconds]
yaw has quit [Client Quit]
<cek>
queue doesn't have an #include? method ;)
maletor has joined #ruby
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
scripore has quit [Quit: This computer has gone to sleep]
snockerton has quit [Quit: Leaving.]
snockerton has joined #ruby
inavele has quit [Ping timeout: 256 seconds]
<dorei>
cek: i think Queue is just an array wrapped in a mutex
<cek>
guys, can I use this between ruby threads? -- # Also, Sockets should *only* be accessed from the thread where they # were first created. Do *not* pass sockets between threads; pass # in the context and allocate a new socket per thread. If you must # use threads, then make sure to execute a full memory barrier (e.g. # mutex) as you pass a socket
<cek>
from one thread to the next.
workmad3 has joined #ruby
shellfu is now known as shellfu_afk
<dorei>
hmm, Queue changed from 1.9.x to >2.1.x
tomphp has joined #ruby
tcrypt has joined #ruby
Pupeno has quit [Remote host closed the connection]
Sawbones_ has joined #ruby
Pupeno has joined #ruby
workmad3 has quit [Ping timeout: 250 seconds]
OtterCoder has joined #ruby
quimrstorres has joined #ruby
Sawbones_ has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 272 seconds]
baweaver has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
redlegion has joined #ruby
Zai00 has quit [Quit: Zai00]
qwertme has joined #ruby
bruno- has joined #ruby
quimrstorres has quit [Remote host closed the connection]
hyperjuice has joined #ruby
failshell has joined #ruby
TinkerTyper has quit [Quit: ZNC restarting...]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hyperjuice has quit [Client Quit]
dfinninger has quit [Remote host closed the connection]
jenrzzz has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
dopie has joined #ruby
kaleido has joined #ruby
Zamyatin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Musashi007 has joined #ruby
bruno- has joined #ruby
blahwoop has quit [Remote host closed the connection]
TinkerTyper has joined #ruby
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
doodlehaus has joined #ruby
nettoweb has joined #ruby
sohrab has quit [Quit: leaving]
bruno- has quit [Ping timeout: 248 seconds]
quimrstorres has joined #ruby
bruno- has joined #ruby
scripore has joined #ruby
TinkerTyper has quit [Quit: ZNC restarting...]
Tuxified has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Lewix has joined #ruby
allcentury has quit [Ping timeout: 240 seconds]
failshell has quit []
doodlehaus has quit []
JDiPierro has joined #ruby
TinkerTyper has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
dseitz has joined #ruby
doodlehaus has joined #ruby
pandaant has quit [Remote host closed the connection]
Deele has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
WajidKagzi has joined #ruby
JDiPierro has quit [Remote host closed the connection]
mary5030_ has joined #ruby
shellfu_afk has quit [Ping timeout: 248 seconds]
tvw has quit [Remote host closed the connection]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dopie has quit [Quit: This computer has gone to sleep]
<WajidKagzi>
what upppppppppppp
mary5030 has quit [Ping timeout: 256 seconds]
TinkerTyper has quit [Quit: ZNC restarting...]
<havenwood>
squeeze 'p'
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
spider-mario has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 250 seconds]
allcentury has joined #ruby
sevvie has joined #ruby
TinkerTyper has joined #ruby
dkphenom has joined #ruby
qwertme has joined #ruby
Dwarf has quit [Ping timeout: 265 seconds]
RegulationD has quit [Remote host closed the connection]
enebo has quit [Quit: enebo]
Spami_ has joined #ruby
Spami has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
<WajidKagzi>
join #javascript
allcentury has quit [Ping timeout: 250 seconds]
TinkerTyper has quit [Quit: ZNC restarting...]
quimrstorres has quit [Remote host closed the connection]
dumdedum_ has joined #ruby
<al2o3-cr>
wut
TinkerTyper has joined #ruby
thatslifeson has quit [Remote host closed the connection]
loechel has quit [Ping timeout: 276 seconds]
<redlegion>
lol
jenrzzz has quit [Ping timeout: 252 seconds]
<redlegion>
js sucks, dammit
dumdedum_ has quit [Client Quit]
noname1 has joined #ruby
harlen has joined #ruby
moeabdol has quit [Ping timeout: 256 seconds]
Brozo has joined #ruby
JaTochNietDan has quit [Ping timeout: 256 seconds]
Brozo has quit [Remote host closed the connection]
hollywood has quit [Ping timeout: 252 seconds]
Brozo has joined #ruby
doodlehaus has quit [Remote host closed the connection]
Darkwater has quit [Ping timeout: 240 seconds]
mjuszczak has joined #ruby
mrsolo has quit [Quit: Leaving]
argoneus has quit [Ping timeout: 244 seconds]
dodobrain has joined #ruby
Diabolik has quit [Ping timeout: 272 seconds]
Darkwater has joined #ruby
Darkwater has quit [Changing host]
Darkwater has joined #ruby
hollywood has joined #ruby
jobewan has quit [Quit: Leaving]
sandstrom has quit [Quit: My computer has gone to sleep.]
mary5030_ has quit [Remote host closed the connection]
thumpba_ has quit [Ping timeout: 264 seconds]
blt has joined #ruby
JimmyNeutron has quit [Read error: Connection reset by peer]
JaTochNietDan has joined #ruby
Diabolik has joined #ruby
thiagovsk has quit [Quit: Connection closed for inactivity]
danzilio has quit [Quit: Baiii!]
djbkd_ has joined #ruby
allcentury has joined #ruby
icebourg has quit []
Dwarf has joined #ruby
baweaver has quit [Remote host closed the connection]
argoneus has joined #ruby
swgillespie has joined #ruby
bmurt has joined #ruby
Brozo has quit [Quit: Leaving...]
djbkd_ has quit [Ping timeout: 250 seconds]
badhatter has quit [Remote host closed the connection]
wallerdev has quit [Ping timeout: 276 seconds]
Rapier- has joined #ruby
doodlehaus has joined #ruby
TinkerTyper has quit [Quit: ZNC restarting...]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
FernandoBasso has joined #ruby
charliesome has joined #ruby
Pupeno has quit [Remote host closed the connection]
shazaum has quit [Quit: This computer has gone to sleep]
TinkerTyper has joined #ruby
vickleton has quit [Ping timeout: 245 seconds]
Lewix has quit [Remote host closed the connection]