<eam>
so rather than use $\ it makes a copy of the default value and only ever uses that
shosti has joined #ruby
luckyruby has joined #ruby
<arrubin>
eam: Not only is $/ not undef by default in Perl, but it changes for each platform.
dreamfighter has joined #ruby
livingstn has quit [Ping timeout: 256 seconds]
<eam>
$\, not $/
<eam>
we're talking about the output record separator
<arrubin>
$\ rather.
<eam>
and it is
fabrice31 has joined #ruby
dreamfighter has quit [Changing host]
dreamfighter has joined #ruby
<shevy>
haha
<eam>
$ perl -we'print $\'
<eam>
Use of uninitialized value $\ in print at -e line 1.
<eam>
I assure you
<shevy>
see what happens when you use short variables like that
<shevy>
people confuse them!
<eam>
IFS is set, OFS is not
<arrubin>
Sorry, I am thinking about the fact that \n changes for each platform.
<eam>
arrubin: yeah, agree
<eam>
however in ruby it does not!
<eam>
it's hardcoded '\n' all over io.c
<arrubin>
eam: It is actually a pain that it does.
<arrubin>
In Perl.
<eam>
no?
<eam>
it's really important that it changes
dreamfighter has left #ruby [#ruby]
<eam>
that's how you write portable code
<eam>
IFS changes in ruby too
nonks has quit [Ping timeout: 272 seconds]
<shevy>
but if you use puts in ruby, it works on windows too
<eam>
it looks like just OFS that's busted
<arrubin>
eam: Not when you are dealing with things like network protocols that do not change between platforms and people use \n which works on some platforms but not others.
<eam>
when you're dealing with network protocols you use \r\n because the network protocol is often different than what your platform uses
<arrubin>
eam: No, you cannot.
<eam>
(\r\n or whatever the spec is)
<arrubin>
Because \n changes.
mary5030 has quit [Remote host closed the connection]
<eam>
arrubin: no
<eam>
\n never changes
<arrubin>
In Perl it does.
<eam>
wrong
<arrubin>
It is CRLF on Windows.
<eam>
no, $\ and $/ change
<arrubin>
And LF on UNIX-like OSes.
<eam>
\n and \r never change
emmesswhy has quit [Quit: Leaving]
<eam>
they always represent a single byte
shosti has quit [Ping timeout: 250 seconds]
<eam>
it's the same in ruby, the only difference appears to be there's some unix brain damage in io.c and $\ is assumed to be \n in a few areas
<eam>
and that's the C \n btw
gusblan has quit [Read error: Connection reset by peer]
<vic>
I'm stuck on figuring out how to make an algorithm to figure out what ingredients to combine/create to maximize the number of potions
lolmaus has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
fabrice31 has quit [Ping timeout: 258 seconds]
<vic>
And i've assumed so far that I should just make as many potions as possible with the initial ingredients, but that might not be the case at all now that I think about it
mpistone has quit [Client Quit]
lolmaus has joined #ruby
nonks has joined #ruby
boombadaroomba has joined #ruby
<vic>
hmm so now I see EON and WOB are useless as they're not used in the potion, so those can all be converted at any point to AF and TOW
a_ has quit [Ping timeout: 245 seconds]
SilkFox_ has quit [Ping timeout: 260 seconds]
lxsameer has joined #ruby
abuzze_ has quit [Ping timeout: 265 seconds]
<pontiki>
vic, it's not actually a #ruby problem; it's a maths problem
tokik has joined #ruby
boombadaroomba has quit [Ping timeout: 272 seconds]
nonks has quit [Ping timeout: 272 seconds]
<waxjar>
doesnt the book give any clue as to what type of problem it is?
alem0lars has joined #ruby
<pontiki>
and, frankly, i'm with Nilium on this; i'm not interested in wrapping my head around figuring that out
<vic>
@waxjar, it's under the chapter on arrays and hashes, which I am using to solve it
<vic>
hashes mostly
<vic>
and no problem, appreciate you taking the time to look at it
<vic>
seems like the end of every chapter in this book likes to challenge using newly learned concepts to solve/create algorithms
crazed has quit [Ping timeout: 240 seconds]
htmldrum has quit [Ping timeout: 272 seconds]
decoponio has joined #ruby
emmesswhy has joined #ruby
ferr has quit [Ping timeout: 260 seconds]
mmochan_ has joined #ruby
htmldrum has joined #ruby
crazed has joined #ruby
threesixes has joined #ruby
<waxjar>
maybe try stack overflow, they're usually good with those type of questions
<pontiki>
vic: in general, thought, approaching this, first i'd write a set of tests that test the conversion formulae, then write the methods that do the conversion formulae
alem0lars_ has joined #ruby
alem0lars_ has quit [Client Quit]
Rahul_Roy has joined #ruby
<pontiki>
then i'd write some tests that test a class that deals with changing inventories based on the conversion forumlae
<pontiki>
and write the class that deals with that
<vic>
hmmm thanks, I just started doing the tests/conversions
<pontiki>
then i'd write an integration test that combines those two
<pontiki>
and so on
<pontiki>
the idea being: break everything down into minute, testable and implementable bits
<pontiki>
and, also, frankly, i wouldn't do any sort of user i/o at all
jY has joined #ruby
<vic>
hmm ok!
<vic>
was just trying to make it feel more like an actual program lol
<pontiki>
everything i just described is actual programming
<jY>
is there like a one liner to do like one item in an array is in a string like if ['foo','baz'] in 'foobar'
<vic>
ok, thanks a ton pontiki, i will start hacking at it further
<pontiki>
jY: absolutely only one, or at least one?
<vic>
hanmac: actually it was a couple of lines later.. oops
mercwithamouth has quit [Ping timeout: 240 seconds]
<vic>
there was no else break condition for an if statement inside of a while loop, so the code was looping infinitely
oo_ has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 260 seconds]
Deejay_ has joined #ruby
yfeldblum has joined #ruby
vic has quit [Ping timeout: 246 seconds]
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
sigurding has joined #ruby
keen______ has joined #ruby
keen_____ has quit [Ping timeout: 250 seconds]
siwica has joined #ruby
ferr has quit [Ping timeout: 272 seconds]
<Emmanuel_Chanel>
Is there a library to make a ruby IRC bot have multiple server connections?
mercwithamouth has joined #ruby
bMalum has joined #ruby
ndrei_ has quit [Quit: Lost terminal]
emmesswhy has quit [Quit: Leaving]
CodeGnome has quit [Remote host closed the connection]
goshdarnyou has quit [Quit: Connection closed for inactivity]
c107 has quit [Remote host closed the connection]
fandi has joined #ruby
c107 has joined #ruby
Jackneill has joined #ruby
fandi has quit [Max SendQ exceeded]
lolmaus has quit [Ping timeout: 240 seconds]
fandi has joined #ruby
rbrs has joined #ruby
Deejay_ has quit [Quit: Computer has gone to sleep.]
fandi has quit [Max SendQ exceeded]
fandi has joined #ruby
ta has joined #ruby
rshetty has joined #ruby
bMalum has quit [Quit: bMalum]
<pontiki>
.
<pontiki>
oops
mercwithamouth has quit [Ping timeout: 240 seconds]
ndrei has joined #ruby
ndrei has quit [Client Quit]
drawingthesun has quit [Ping timeout: 272 seconds]
ndrei has joined #ruby
fandi has quit [Max SendQ exceeded]
fandi has joined #ruby
fandi has quit [Max SendQ exceeded]
jlast has joined #ruby
fandi has joined #ruby
<hmsimha>
alright, I'm stumped here... data = JSON.parse("[{\"id\": 0}, {\"id\":1}]") gives me the right decoded array... but then I can't do each on that array such as data.each {|x| puts x['id']}
timonv_ has joined #ruby
i_s has joined #ruby
Deejay_ has joined #ruby
fandi has quit [Max SendQ exceeded]
kaspertidemann has joined #ruby
fandi has joined #ruby
<apeiros>
hmsimha: and you can't do that because…?
<hmsimha>
I'm using a toy example.. and it actually does work on that example, but for some reason it's not working with the large dataset I have
<hmsimha>
hold on, I'm paste-binning
jlast has quit [Ping timeout: 260 seconds]
amundj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rahul_Roy has quit [Quit: Connection closed for inactivity]
spyderman4g63 has quit [Ping timeout: 258 seconds]
mmochan_ has quit [Quit: Connection closed for inactivity]
hiyosi has quit [Quit: WeeChat 1.0]
kenneth has joined #ruby
hiyosi has joined #ruby
govg has joined #ruby
renderful has joined #ruby
zeroNone_ has joined #ruby
robustus is now known as robustus|Off
OffTheRails has quit [Ping timeout: 245 seconds]
kaspergrubbe has joined #ruby
kenneth has quit [Ping timeout: 246 seconds]
renderful has quit [Ping timeout: 246 seconds]
mikecmpbll has joined #ruby
OffTheRails has joined #ruby
otakbeku has joined #ruby
jlast has joined #ruby
panini has quit [Quit: Leaving]
<tmoore>
sigurding: what do you mean?
<sigurding>
I have a local gem, which is a specifc fix for a public gem
<sigurding>
and when running bundle install, I want bundler to use a gem which comes a long with my gem
evlute has joined #ruby
<evlute>
hallo
<sigurding>
instead of pulling it from the public repository
adac has joined #ruby
<rpag>
sigurding, add the gem as a runtime dependency? there's no way to "reference another gem" unless you add it as a dependency or just bundle the source into your gem
OffTheRails has quit [Ping timeout: 250 seconds]
jlast has quit [Ping timeout: 260 seconds]
<sigurding>
rpag: is it possible to bundle it as dependency by saying I put it into lib/patch/
rshetty has quit [Remote host closed the connection]
startupality has quit [Client Quit]
<rpag>
'minitest' not 'Minitest'
x77686d has joined #ruby
rshetty has joined #ruby
<TwinkleHood>
ah, whoops
ghr has joined #ruby
<TwinkleHood>
thanks
<TwinkleHood>
fixd
<apeiros>
wait, what? how could I not know that Dir[]/glob accepts multiple arguments (or an array respectively)? darn!
<apeiros>
TIL
<apeiros>
thanks TwinkleHood :D
<TwinkleHood>
Haha, no problem :D
adac has quit [Ping timeout: 260 seconds]
Tony_rub` has quit [Ping timeout: 255 seconds]
lukevinc has joined #ruby
klmlfl has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
<multi_io_>
is there a gem or something for writing unix filters that use stdin/out by default and may be retargeted to a file and possible in-place modification?
<apeiros>
multi_io_: see ARGF
<multi_io_>
kinda like perl -i -e '<code>' file
bMalum has quit [Quit: bMalum]
<multi_io_>
apeiros: yeah I've seen that, but it only handles input, not output afaics
x77686d has quit [Ping timeout: 260 seconds]
<apeiros>
ruby -i -e exists too
<multi_io_>
oh
luckyruby has quit [Quit: Leaving...]
KC9YDN has quit [Read error: Connection reset by peer]
<apeiros>
TwinkleHood: re your question - afair drbrain (maintainer of rubygems) once said on irc not to set spec.date manually. just leave it away.
WormDrink has quit [Ping timeout: 260 seconds]
<apeiros>
other than that, I see nothing wrong with it
<multi_io_>
ok thanks, I didn't know that. Now it would still be nice if there was a gem that did the same thing, so you could provide this functionality in your own scripts
jacobat has quit [Ping timeout: 240 seconds]
robustus|Off is now known as robustus
<TwinkleHood>
apeiros: alright, sounds like a good idea.
SilkFox_ has joined #ruby
<multi_io_>
maybe I'm going to write one, then.
rshetty has quit [Remote host closed the connection]
fabrice31 has joined #ruby
<multi_io_>
or something
carraroj has joined #ruby
Deejay_ has quit [Quit: Computer has gone to sleep.]
rshetty_ has joined #ruby
KC9YDN has joined #ruby
SilkFox_ has quit [Ping timeout: 250 seconds]
fabrice31 has quit [Ping timeout: 250 seconds]
lukevinc has quit [Quit: ChatZilla 0.9.91 [Firefox 24.8.0/20000101000000]]
rshetty_ has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
Stalkr_ has joined #ruby
Stalkr_ has joined #ruby
ferr has joined #ruby
spyderman4g63 has joined #ruby
Stalkr_ has quit [Read error: Connection reset by peer]
Stalkr^ has joined #ruby
KC9YDN has quit [Quit: "Let a hundred flowers bloom: let a hundred schools of thought contend." - Mao Zedong]
IceDragon has joined #ruby
KC9YDN has joined #ruby
jnollette has joined #ruby
spyderman4g63 has quit [Ping timeout: 260 seconds]
claw_ has joined #ruby
klmlfl has quit [Remote host closed the connection]
ndrei has quit [Remote host closed the connection]
jnollette has quit [Ping timeout: 244 seconds]
IceDragon has quit [Ping timeout: 260 seconds]
IceDragon has joined #ruby
ndrei has joined #ruby
ndrei has quit [Client Quit]
ndrei has joined #ruby
robustus is now known as robustus|Off
rshetty has joined #ruby
SouL_ has joined #ruby
chorkpop has joined #ruby
chorkpop has quit [Client Quit]
bMalum has joined #ruby
_bruno has joined #ruby
jlast has joined #ruby
klmlfl has joined #ruby
_bruno has quit []
_bruno has joined #ruby
jonr22 has joined #ruby
pyreal has joined #ruby
Drakevr has quit [Quit: demons to some, angels to others]
rshetty has quit [Remote host closed the connection]
<mrbrdo>
I’m guessing it’s supposed to be a consequence of class hierarchy I just don’t get how exactly it comes to be :)
spyderman4g63 has joined #ruby
ndrei has joined #ruby
<Hanmac>
mrbrdo: each class is a instance of Class with inherits from Module and this does from Object
Channel6 has joined #ruby
<jhass>
mrbrdo: that's because Object.class #=> Class and Class.ancestors.include? Object
gheegh has joined #ruby
<Hanmac>
so each class is an instance of Object, means what you define in the class Object is available in (nearly) each other Object
linojon has joined #ruby
jottr has quit [Ping timeout: 260 seconds]
<mrbrdo>
Hanmac: that last line explains it perfectly :)
<mrbrdo>
thanks.. I guess I knew that before just wasn’t able to connect things together in my head
jnollette has joined #ruby
moritzs has joined #ruby
spyderman4g63 has quit [Ping timeout: 250 seconds]
weemsledeux has joined #ruby
<mrbrdo>
so when you call Object.test1 it actually searches like this right: Class, Module, Object <- aha it’s defined in Object
<mrbrdo>
rather than immediately finding it in Object
<jhass>
yes
<mrbrdo>
cool
<jhass>
SomeClass.test1 will work too in your example
<jhass>
in exactly the same way
<mrbrdo>
yeah just wanted to illustrate that Object’s instance methods are class methods too in contrast to that :)
<jhass>
well, while we're at it, Ruby has no class methods :P
<mrbrdo>
yeah just conceptually
<mrbrdo>
but yeah, it’s clear now what is going on
jnollette has quit [Ping timeout: 240 seconds]
Stuffness has joined #ruby
<Stuffness>
hi. is there any reason each_with_index isn't implemented for Array in ruby?
hellangel7 has joined #ruby
<Stuffness>
it seems like it should be
<Stuffness>
er
<Stuffness>
sorry, each_with_object
hellangel7 has quit [Max SendQ exceeded]
<Stuffness>
as it stands you have to do array.each.each_with_object which looks silly
ndrei has quit [Ping timeout: 245 seconds]
anaeem1_ has joined #ruby
carraroj has joined #ruby
<Mon_Ouie>
It is implemented
<Mon_Ouie>
it is implemented for anything that includes Enumerable, actually
ndrei has joined #ruby
mercwithamouth has quit [Ping timeout: 255 seconds]
anaeem1_ has quit [Remote host closed the connection]
<mrbrdo>
I usually use each.with_index
poulet_a has joined #ruby
mrbrdo has quit [Quit: mrbrdo]
rippa has joined #ruby
anaeem1 has joined #ruby
jottr has joined #ruby
jlast has joined #ruby
jacobat has joined #ruby
ptrrr has quit [Quit: ptrrr]
ptrrr has joined #ruby
nateberkopec has joined #ruby
threesixes has joined #ruby
carraroj has quit [Ping timeout: 240 seconds]
MasterPiece has quit [Quit: Leaving]
fandi has joined #ruby
jlast has quit [Ping timeout: 255 seconds]
charliesome has joined #ruby
sevvie has joined #ruby
lkba has joined #ruby
Roa has joined #ruby
ndrei has quit [Ping timeout: 258 seconds]
danijoo has quit [Read error: Connection reset by peer]
danijoo_ has joined #ruby
<Stuffness>
Mon_Ouie, [5,4,4,2,2,2,2].each_with_object(Hash.new 0) { |n, h| h[n] += 1 } returns NoMethodError but if I insert a ".each" in there, it works
<Hanmac>
Ha! i now i know why yard does not like my code ... it cant life with namespaces ;P
nrsk has joined #ruby
Alx08-ru has joined #ruby
AlexRussia_ has quit [Ping timeout: 244 seconds]
zeroNones has quit [Ping timeout: 240 seconds]
zeroNones has joined #ruby
thsig has quit [Ping timeout: 260 seconds]
tyll_ has quit [Ping timeout: 250 seconds]
pandaant has quit [Remote host closed the connection]
thsig_ has quit [Ping timeout: 260 seconds]
yfeldblum has quit [Ping timeout: 255 seconds]
tyll has joined #ruby
anaeem1 has quit [Remote host closed the connection]
rkalfane has joined #ruby
freerobby has joined #ruby
HelloFred has joined #ruby
schaerli has joined #ruby
<havenwood>
ahh, tryruby.org's RUBY_VERSION is "1.9.3" but its RUBY_PLATFORM is "java"
ghr has joined #ruby
earfin_ has joined #ruby
imz has joined #ruby
andrewlio has quit [Quit: Leaving.]
<havenwood>
they just need to update their JRuby
imz has quit [Max SendQ exceeded]
earfin__ has joined #ruby
imz has joined #ruby
imz has quit [Max SendQ exceeded]
sepp2k has quit [Read error: Connection reset by peer]
imz has joined #ruby
imz has quit [Changing host]
imz has joined #ruby
imz has quit [Max SendQ exceeded]
imz has joined #ruby
imz has quit [Max SendQ exceeded]
earfin has quit [Ping timeout: 255 seconds]
imz has joined #ruby
imz has quit [Changing host]
imz has joined #ruby
klmlfl has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 265 seconds]
earfin_ has quit [Ping timeout: 246 seconds]
HelloFred has left #ruby ["Saliendo"]
multi_io has joined #ruby
andrewlio has joined #ruby
Soda has joined #ruby
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
x77686d has joined #ruby
ege6a has joined #ruby
multi_io_ has quit [Ping timeout: 260 seconds]
dawkirst has quit [Remote host closed the connection]
ktun has joined #ruby
imz has quit [Quit: Leaving]
ktun is now known as davidhq
schaerli has quit [Remote host closed the connection]
bluOxigen has joined #ruby
abuzze has quit []
thsig has joined #ruby
rocknrollmarc has quit [Ping timeout: 260 seconds]
melik has joined #ruby
ghr has joined #ruby
abuzze has joined #ruby
ndrei has joined #ruby
Channel6 has quit [Quit: Leaving]
obs has joined #ruby
thsig has quit [Ping timeout: 260 seconds]
agjacome has joined #ruby
az7ar has joined #ruby
BadQuanta1 has quit [Ping timeout: 245 seconds]
charliesome has quit [Quit: zzz]
ValicekB has joined #ruby
IcyDragon has joined #ruby
IceDragon has quit [Ping timeout: 260 seconds]
thsig has joined #ruby
kayloos has quit []
HelloFred has joined #ruby
_lexjm has joined #ruby
thsig has quit [Ping timeout: 260 seconds]
linojon has quit [Quit: linojon]
HelloFred has quit [Changing host]
HelloFred has joined #ruby
sigurding has joined #ruby
Xeago has quit [Remote host closed the connection]
tylersmith has joined #ruby
Iniesta8 has joined #ruby
Iniesta8 has quit [Max SendQ exceeded]
elaptics`away is now known as elaptics
jlast has joined #ruby
ptrrr has quit [Quit: ptrrr]
Xeago has joined #ruby
az7ar has quit [Disconnected by services]
nobitanobi has joined #ruby
elaptics is now known as elaptics`away
jlast has quit [Ping timeout: 272 seconds]
_lexjm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
siwica has joined #ruby
siwica1 has quit [Ping timeout: 260 seconds]
az7ar has joined #ruby
billy_ran_away has quit [Ping timeout: 240 seconds]
matthewhill has joined #ruby
thsig has joined #ruby
bsegovia has joined #ruby
siwica1 has joined #ruby
ege6a has quit [Remote host closed the connection]
koi has joined #ruby
siwica has quit [Ping timeout: 272 seconds]
<bsegovia>
hi everyone. I’m using ransack’s “sort_link” method to sort search results and it seems to add a glyph arrow (down or up). Is there a way to edit that glyph. I cant seem to find anything about it.
<bsegovia>
The glyph is on the table header label btw
elaptics`away is now known as elaptics
i_s has joined #ruby
<bsegovia>
just trying to edit the resulting html. Currently it appears as “HEADER NAME ▼”
Azure has quit [Quit: Blue Sky Fish]
<bsegovia>
trying to make it “HEADER NAME<span>▼</span>” instead
bsegovia has left #ruby [#ruby]
zeroNone_ has joined #ruby
Axy has joined #ruby
Axy has joined #ruby
zeroNones has quit [Ping timeout: 258 seconds]
Mia has quit [Read error: Connection reset by peer]
pu22l3r has joined #ruby
<havenwood>
>> ?▼.next
bsegovia has joined #ruby
i_s has quit [Ping timeout: 240 seconds]
maestrojed has joined #ruby
<bsegovia>
anyone around?
<bsegovia>
i feel like this should be simple but im not sure how to configure this in ransack
<havenwood>
bsegovia: I've never heard of ransack. Maybe try: #rubyonrails
<bsegovia>
thanks!
<bsegovia>
havenwood: it’s a search gem btw
<bsegovia>
aparently fairly popular
<bsegovia>
im just following tutorials at this point so certainly no master of it
_lexjm has joined #ruby
rockdon_ has joined #ruby
Snowstormer is now known as LikeGecko
thsig_ has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kaspergrubbe has quit [Read error: Connection reset by peer]
<Hanmac>
Naeblis: rvm is you want the full suite with different ruby versions and gemsets
<havenwood>
Naeblis: I install Rubies with ruby-install and switch with chruby. Another popular option that does a lot more that just that is RVM: http://rvm.io
kaspergrubbe has joined #ruby
spyderman4g63 has joined #ruby
<havenwood>
I avoid gemsets.
<havenwood>
Too much overlap with Bundler's domain for my taste.
<rpag>
gemsets were cool before bundler arrived, yeah
schaerli has joined #ruby
<havenwood>
rpag: No doubt they served a purpose pre-bundler, and i'm guessing were something of an inspiration.
<Naeblis>
[22:34:59] <rpag> tbh i'd recommend learning something else, python and ruby aren't that far apart
<linguini>
http://ix.io/eOV # a more complete example of the constructs for which I'm seeking idioms
<Naeblis>
yeah I know, which is why I've avoided it so far
SilkFox_ has quit [Ping timeout: 245 seconds]
<Naeblis>
but eeh, I tried out Go, which was a bit boring. I wanna try Rust, which is still too immature. Haskell, which I just don't get. :(
KC9YDN has quit [Quit: "Let a hundred flowers bloom: let a hundred schools of thought contend." - Mao Zedong]
Guest5374 has quit [Remote host closed the connection]
<havenwood>
Naeblis: The usual suspects... You forgot Clojure and Elixir. :P
<Naeblis>
I do know some Racket though
<havenwood>
Naeblis: Learn Ruby, Clojure and Elixir. :)
MinasMazar has joined #ruby
<Naeblis>
just need something to get me excited about languages again...
schaerli has quit [Remote host closed the connection]
<rpag>
and JavaScript
<havenwood>
noooo :P
Channel6 has joined #ruby
<Naeblis>
doing python/node as my day job is slowly killing me
<Naeblis>
;_;
<rpag>
how come?
<havenwood>
Opal and ClojureScript please save us!
<rpag>
opal does look great
weaksauce has joined #ruby
<havenwood>
rpag: practically probably a really good suggestion to learn javascript, just makes me cringe a little
spyderman4g63 has quit [Ping timeout: 244 seconds]
jnollette has joined #ruby
<Naeblis>
oh yeah
<Naeblis>
had to finally bite the bullet
<Naeblis>
and learn js
<rpag>
thats alright, JVM languages usually do the same for me :P
<havenwood>
rpag: hehehe
<havenwood>
<3 JRuby!
jxf has quit [Ping timeout: 265 seconds]
az7ar has joined #ruby
tylersmith has quit [Read error: Connection reset by peer]
<rpag>
i just use cruby nowadays, don't really play with alternative implementations anymore
<rpag>
if ruby -v prints 2.X.X, then yeah 'gem' should be available too
payne has joined #ruby
az7ar has quit [Remote host closed the connection]
jlast has joined #ruby
<Naeblis>
cool
az7ar has joined #ruby
<Hanmac>
jhass: for sample i have a WX::FileCtrl#filter_index= which does more than just call the C++ function wxFileCtrl#SetFilterIndex, it also does check if the setting index is in a specific range
yxhuvud has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<jhass>
Hanmac: you would write a wrapper class around the C function in crystal anyway
<jhass>
there's not that performance gap in writing a crystal wrapper class that you know from writing a Ruby wrapper class
az7ar has quit [Read error: Connection reset by peer]
<rpag>
crystal is a compiled language? neat
<jhass>
yep
<jhass>
with a very powerful macro language
skolman_ has quit [Remote host closed the connection]
<rpag>
mhm
<Hanmac>
hm maybe i will look later on it when my rwx is finish ...
<rpag>
just got even more interested
<jhass>
Hanmac: I know that's your way to say "never" :P
skolman_ has joined #ruby
<Hanmac>
hey! i also did say that i will once publish rwx as gem and it did happen last weekend ... even its version 0.0.1.dec
<Hanmac>
dev
jlast has quit [Ping timeout: 272 seconds]
max96at|off is now known as max96at
yfeldblum has quit [Ping timeout: 250 seconds]
payne has quit [Remote host closed the connection]
<Hanmac>
maybe this weekend i will push the next version like 0.0.1.1.dev ;P
codezomb has joined #ruby
<havenwood>
and you can do stuff like: [1, 20, 300].map &.to_s(2).length #=> [1, 5, 9]
sinkensabe has joined #ruby
<Hanmac>
havenwood: where?
<havenwood>
Hanmac: Crystal
skolman_ has quit [Ping timeout: 265 seconds]
<jhass>
yeah, & is just a compile time syntax rewrite to {|x| x<code> }
payne has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gaganjyot has joined #ruby
ghr has quit [Ping timeout: 272 seconds]
IcyDragon is now known as IceDragon
<Hanmac>
jhass: i have a ruby gist with i can do that nearly too
Cache_Money has quit [Quit: Cache_Money]
<Hanmac>
for me it would look like that: [1, 20, 300].map &:to_s.(2).length
<michele>
so if i wanted to use !, I should have written: && !(__FILE__ == $PROGRAM_NAME)
<michele>
correct?
<jhass>
correct
<jhass>
but just use != instead
<michele>
yep, done it and works
<michele>
thanks.
<jhass>
or depending on <some condition> unless instead of if
spicerack has joined #ruby
<rpag>
jhass, crystal really does seem awesome, thanks for linking it
<rpag>
i just downloaded it
<jhass>
yeah, I want it to succeed, gotta build a community :P
<jhass>
I think it's a great extension to ruby for performance critical stuff
<rpag>
i'm looking for an emacs mode for it but so far nothing :(
mistermocha has joined #ruby
<jhass>
I can imagine a nice ruby c-api binding ;)
<jhass>
well, it's a very young language ;)
<Naeblis>
Hmm. Why two channels? #ruby and #ruby-lang
<jhass>
because reasons
<Naeblis>
:p
michele has left #ruby [#ruby]
<jhass>
rpag: not an emacs user but so far the ruby modes of stuff worked quite well for me
rshetty has quit [Remote host closed the connection]
Cache_Money has joined #ruby
rockdon_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rpag>
indeed, ruby-mode should work
lw has joined #ruby
justin_pdx has joined #ruby
<Hanmac>
Naeblis: you need registered name for #ruby-lang and its also a bit more about developing ruby itself (or was that a third channel?)
<Naeblis>
ah
<havenwood>
Hanmac: #ruby-core
<havenwood>
Hanmac: and they dropped the nick reg req
<Hanmac>
ah ok
Cache_Money has quit [Quit: Cache_Money]
<Nilium>
I hang out in here because it got tedious having two ruby channels open
payne has quit [Read error: Connection reset by peer]
32NAAM3U1 has joined #ruby
<wasamasa>
rpag: are there any syntax and indentation changes over ruby?
<Hanmac>
jhass: rwx now got the first rspec spec in addition to test-unit TestCase ;P
agjacome_ has joined #ruby
<jhass>
wasamasa: indentation and base syntax is the same but they're not afraid to change stuff
32NAAM3U1 has quit [Client Quit]
<wasamasa>
jhass: yeah, this is what I've got out from reading a few blog posts by their team
<jhass>
wasamasa: it's compiled and with Ruby like syntax type interference can only so far, so there's (mostly optional) type annotations for starters
agjacome has quit [Ping timeout: 240 seconds]
<wasamasa>
jhass: hmk
payne has joined #ruby
bw_ has joined #ruby
boombadaroomba has joined #ruby
<rpag>
there also seems to be attribute syntax that's unique to crystal
coderhs has quit [Read error: Connection reset by peer]
<agent_white>
Afternoon folks
tomgavin has quit [Ping timeout: 240 seconds]
manzo has quit [Ping timeout: 260 seconds]
aspires has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
volk_ has joined #ruby
<volk_>
hey guys, anybody here use omniauth for facebook? all of a sudden my app is getting SSL3 handshake failures. i have no idea whats going on, i accidentally stumbled upon a tweet that said it might have to do with the poodle vulnerability or something.
benzrf|offline is now known as benzrf
t0rc has joined #ruby
t0rc has left #ruby [#ruby]
maletor has joined #ruby
banister has joined #ruby
coderhs has joined #ruby
naw_ has joined #ruby
CodeBunny has quit [Quit: CodeBunny needs a carrot. Be back later.]
m8 has joined #ruby
i_s has joined #ruby
fabrice31 has joined #ruby
jlast has joined #ruby
kobain has joined #ruby
<arrubin>
volk_: Many companies have disabled SSL3.
rockdon_ has quit [Ping timeout: 240 seconds]
melik has quit [Quit: (null)]
atomi has joined #ruby
i_s has quit [Ping timeout: 246 seconds]
mistermocha has quit [Remote host closed the connection]
<zlude_>
jhass, i'm using ruby 2.1.3, i'm newbie yet. I see peoples using things like i do using Hashes, so i try to pass the values as hashes but don't works
ringaroses2 has joined #ruby
<jhass>
you can use required named arguments in 2.1: def initialize(name:, age:)
<zlude_>
jhass,just works if i do me = Adult.new('Filipe', '19').say_hi but i want to use lilke it me = Adult.new(:age => '19', :name => 'Filipe').say_hi (don't work)
<volk_>
so i did that command without sslv3 and i got “New, TLSv1/SSLv3, Cipher is RC4-SHA” havenwood if that helps you help at all
<havenwood>
volk_: Just curious but what's your Ruby's OpenSSL version?: require 'openssl'; OpenSSL::OPENSSL_VERSION
eshy has joined #ruby
<jhass>
zlude_: if you want to pass a hash you need to accept a hash
<havenwood>
volk_: well, in general they do silly things, like add ./bin to the PATH, but specifically here they install their own OpenSSL package instead of linking to the system package.
mistermocha has joined #ruby
<volk_>
oh great
<volk_>
i think im going to attempt a different solution
<Fire-Dragon-DoL>
are there any gem/very-easy-way to have Struct class initialize method use a hash instead of simple positional arguments?
<volk_>
not use omniauth
<volk_>
and just use Koala gem for facebook
<jhass>
Hanmac: one of your examples doesn't contain an expectation
<havenwood>
volk_: i don't know if they've included updated packages in latest ruby-build
<havenwood>
volk_: i'd suggest switching to chruby/ruby-install or RVM
<havenwood>
volk_: ruby-install uses your package manager for dependencies
<volk_>
ah
<havenwood>
volk_: it will dynamically link Ruby against your Brew openssl
<havenwood>
or for example if you used Macports, against Macport's openssl
livathin_ has quit []
anaeem1 has joined #ruby
<jhass>
Hanmac: and ideally the examples expecting the app not to be yet started could also be run after a context for the examples that expect the app to be started, so ideally you would have something to reset to a clean state
<Hanmac>
jhass: reset zo a clean state does not work that way
yfeldblum has quit [Ping timeout: 272 seconds]
<volk_>
havenwood: okay i’ll look into it. thanks a ton for your help man
<havenwood>
volk_: no prob, good luck!
jnollette has quit [Ping timeout: 246 seconds]
<jhass>
Hanmac: I guess the question is it important that the constants are not there prior bootup, or do you actually just care they're there after it
<jhass>
*is it
<Hanmac>
yes i tihkn it is
<jhass>
why?
carraroj has joined #ruby
<Hanmac>
for you see WX::Color::RED do you think its available every time? directly after require? as you can see it isnt ... and so that i do describe it
yfeldblum has joined #ruby
<jhass>
but why is that an important aspect of your library, what feature does that behavior give me that you need to ensure it stays that way
DarthGandalf has quit [Ping timeout: 260 seconds]
HelloFred has quit [Read error: Connection reset by peer]
HelloFred has joined #ruby
<Hanmac>
its because the constants i bind from wx like wxRED are not available before so i cant just do rb_define_const
<jhass>
you didn't answer my question
<jhass>
as a user I don't care much that they're not defined when I require them, I only care that they are defined after I booted the app
<jhass>
whether they were defined prior to booting the app or not is not important at all
jlast has joined #ruby
ringaring has joined #ruby
<jhass>
nor is it really important for the behavior of library
jordsmi has joined #ruby
jordsmi has left #ruby [#ruby]
byte48 has quit [Ping timeout: 258 seconds]
cleopatra has joined #ruby
mistermocha has quit [Remote host closed the connection]
<Fire-Dragon-DoL>
Hanmac: thanks, creating a lib and eventually a gem, lol
russt has joined #ruby
russt has quit [Client Quit]
tlarevo has joined #ruby
mistermocha has quit [Ping timeout: 240 seconds]
scruple has quit [Ping timeout: 255 seconds]
lw has quit [Read error: Connection reset by peer]
lw has joined #ruby
lw has quit [Max SendQ exceeded]
lw has joined #ruby
jacobat has quit [Ping timeout: 260 seconds]
Jackneill has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 246 seconds]
mercwithamouth has joined #ruby
wald0 has joined #ruby
lagweezle has joined #ruby
whatasunnyday has quit [Quit: whatasunnyday]
ringaring has quit [Ping timeout: 265 seconds]
lagweezle is now known as Guest51014
Guest51014 has quit [Changing host]
Guest51014 has joined #ruby
moritzs has quit [Remote host closed the connection]
Guest51014 is now known as lagweezle
wald0 has quit [Client Quit]
nobitanobi has quit [Remote host closed the connection]
nobitanobi has joined #ruby
banister is now known as banisterfiend
HelloFred has quit [Quit: Saliendo]
<mchelen>
can i creat a .ruby-version file with wildcards, for example 2.1.* ?
<apeiros>
mchelen: no. and iirc the .ruby-version file is interpreted differently by the different ruby version managers.
<banisterfiend>
apeiros wassup
<banisterfiend>
apeiros have you ever done autocomplete/typeahead stuff?
thsig has joined #ruby
<mchelen>
apeiros: hmm ok, so should i just remove it completely? if someone wants to run this project with 2.1.2 or 2.1.1 it doesn't really matter
Azure has joined #ruby
obs has quit [Remote host closed the connection]
obs has joined #ruby
obs_ has joined #ruby
lagweezle has quit [Quit: leaving]
obs_ has quit [Client Quit]
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lagweezle has joined #ruby
lagweezle is now known as Guest57974
Guest57974 has quit [Changing host]
Guest57974 has joined #ruby
Guest57974 is now known as lagweezle
<apeiros>
banisterfiend: sure
rkalfane has joined #ruby
codecop has joined #ruby
<apeiros>
banisterfiend: nowadays I just use a plain controller which only returns json
<banisterfiend>
apeiros do you do anything fancy to make it fast? cos the standard way is just to have the javascript query the server for every single key press
lw has quit [Quit: s]
<apeiros>
mchelen: if someone wants to run your project with another ruby, they can. no need to remove the .ruby-version
<banisterfiend>
apeiros i thought about caching + a rack app forced into the start of the rack chain but was curious if you have any 31337 techniques
<apeiros>
banisterfiend: only when necessary
x77686d has joined #ruby
<apeiros>
banisterfiend: in earlier rails' I used metalcontrollers. but since 3.2 I just use a plain controller. I get 5ms responses
<banisterfiend>
apeiros but it depends on how large the autocompletion is right
<banisterfiend>
i have 1000s of elements
<apeiros>
banisterfiend: more than ~20 items in autocomplete don't make sense
<mchelen>
apeiros: the "bundle install" is failing
<apeiros>
I always limit
NoNMaDDeN has joined #ruby
<apeiros>
banisterfiend: remember, you autocomplete to make the user faster. if the user has to choose from a list of 1000 items, they are not faster.
Hobogrammer has joined #ruby
<apeiros>
mchelen: and?
<mchelen>
apeiros: the .ruby-version says "2.1.2" while user has "2.1.3" and i don't want "bundle install" to fail. remove .ruby-version?
<apeiros>
mchelen: why do you think that's related?
<banisterfiend>
apeiros do u have epxerience with twitter's typeahead.js ?
<apeiros>
banisterfiend: nope
<zlude_>
Guys, can i write a email validation using just Ruby? i search in web about it but i see a lot of things related to Rails, But i'm not using Rails, i'm just kidding a little bit with Ruby, and i'm curious how to validade a email using a if for example, someone can help me?
<apeiros>
banisterfiend: I find autocomplete trivial enough to roll my own
<gizmore>
zlude: i have a snippet if you like
<mchelen>
apeiros: because its an rbenv error, and changing that file stops the error
klmlfl has joined #ruby
<Xeago>
zlude_: don't validate e-mails by format
<Xeago>
send an e-mail instead
<apeiros>
zlude_: proper email validation is quite difficult
<banisterfiend>
apeiros can i pm u
<apeiros>
banisterfiend: yupp. no longer in ibiza on hotel wifi :-p
<jhass>
mchelen: if you leave of the last digit RVM and chruby will happily pick the latest version available. Rbenv will fail
<Xeago>
banisterfiend: if it's related to autocomplete, please continue in here :>
<banisterfiend>
wow ibiza
<banisterfiend>
Xeago haha y lol
<apeiros>
zlude_: we test whether the domain has an MX entry, and a minimal sanity check on the format
<Xeago>
ibiza, shit
<Xeago>
looks fancy
<jhass>
mchelen: however there's a rbenv plugin to support it
<mchelen>
jhass: ah well, i guess either .ruby-version or rbenv have to go then
<Xeago>
apeiros: but MX is optional
<apeiros>
Xeago: even more fancy when you're there with 11 pole dancers :-p
<mchelen>
jhass: hmm ok i might try that, thanks
ghr has quit []
ghr_ has joined #ruby
<Xeago>
apeiros: emailing to a domain that lacks a MX record should be delivered to the A record instead
mary5030 has quit [Remote host closed the connection]
rbrs has quit [Remote host closed the connection]
tlarevo has quit [Remote host closed the connection]
drjfreeze has quit [Remote host closed the connection]
last_staff has quit [Read error: Connection reset by peer]
rocknrollmarc has quit [Ping timeout: 272 seconds]
codecop has quit [Ping timeout: 260 seconds]
pandaant has quit [Remote host closed the connection]
arescorpio has quit [Excess Flood]
mercwithamouth has joined #ruby
JoshGlzBrk has joined #ruby
zwischenzug2 has quit [Remote host closed the connection]
zwischenzug2 has joined #ruby
boombadaroomba has joined #ruby
postmodern has joined #ruby
HelloFred has quit [Remote host closed the connection]
i_s has joined #ruby
HelloFred has joined #ruby
HelloFred has quit [Remote host closed the connection]
decoponio has quit [Read error: Connection reset by peer]
pu22l3r has joined #ruby
pu22l3r has quit [Remote host closed the connection]
decoponio has joined #ruby
boombadaroomba has quit [Ping timeout: 245 seconds]
anaeem1_ has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 250 seconds]
jeanlinux has quit [Ping timeout: 258 seconds]
F1skr has joined #ruby
OffTheRails has joined #ruby
fabrice31 has joined #ruby
i_s has quit [Ping timeout: 255 seconds]
Juanchito has quit [Quit: Connection closed for inactivity]
<VBlizzard>
hello. everytime I try to install eventmachine or websocket, I get this error. http://pastebin.com/srd2cxDx
weeb1e has quit [Ping timeout: 246 seconds]
it0a has joined #ruby
Lewix has quit [Remote host closed the connection]
fabrice31 has quit [Ping timeout: 272 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
yfeldblum has quit [Ping timeout: 260 seconds]
bluOxigen has quit [Ping timeout: 240 seconds]
larissa has quit [Quit: Leaving]
OffTheRails has quit [Ping timeout: 250 seconds]
mercwithamouth has joined #ruby
olivier_bK has quit [Ping timeout: 260 seconds]
siwica1 has quit [Ping timeout: 272 seconds]
Lewix has joined #ruby
cleopatra has quit [Ping timeout: 255 seconds]
Timgauthier is now known as timgauthier_away
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Nieralyte has quit [Quit: Nieralyte]
thedonvaughn has joined #ruby
<havenwood>
VBlizzard: For quite a few gems you'll need to be able to build native extensions. The usual build tool package Win folk install is called Ruby DevKit. On Chocolatey: choco install ruby.devkit
<havenwood>
volty: Now they're mapped to real live native threads.
<AlexRussia>
havenwood: it was something around 30209 when i killed process cause was hell lags.it eat something around 20% of ~ 3800 MiB RAM
<AlexRussia>
havenwood: red divide is 61644
<volty>
havenwood: nice to hear, nice to know. So my 2.2.0 should have them already, right away?
govg has joined #ruby
a___ has quit [Ping timeout: 240 seconds]
<havenwood>
volty: yup, good to go
<havenwood>
volty: 1.9+
<AlexRussia>
what is a green threads
<AlexRussia>
?
<VBlizzard>
*^* this is getting stupid. I can install many gems.
<VBlizzard>
however, I can't install eventmachine.
NoNMaDDeN has quit [Remote host closed the connection]
<havenwood>
VBlizzard: EventMachine has native extensions.
freezey has quit [Ping timeout: 240 seconds]
<VBlizzard>
so, what do I do then?
agjacome has joined #ruby
<AlexRussia>
hm
<havenwood>
AlexRussia: scheduled by the Ruby vm rather than by the system
<AlexRussia>
havenwood: hm, then i should let vm management the system threads?
<havenwood>
AlexRussia: don't use threads unless you must
<AlexRussia>
havenwood: and if vm unsupport it enough, i could get little fail in usage hardware?
<VBlizzard>
havenwood: what do I do then?
jlast has joined #ruby
Inoperable has joined #ruby
<VBlizzard>
wait, does eventmachine work on Ruby 2?
<VBlizzard>
and up?
M3M0CooL has joined #ruby
<AlexRussia>
VBlizzard: did you check information from their sources before write? i guess they could write something about supported version ruby etc
a____ has joined #ruby
NullEntity has quit [Read error: Connection reset by peer]
agjacome has quit [Ping timeout: 260 seconds]
<havenwood>
AlexRussia: Rules for Threading: 1) Don't do it; 2) If you must do it, don't share data between Threads; 3) If you must share data between Threads, don't share mutable data; and 4) If you must share mutable data between Threads, synchronize access to that data.
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<AlexRussia>
havenwood: fun.not one word about prefomance :D
mercwithamouth has quit [Ping timeout: 245 seconds]
jlast has quit [Ping timeout: 265 seconds]
<havenwood>
AlexRussia: The current rough plan is for Ruby in the future to give a warning if you directly use a Thread, once there's a more advanced concurrency primitive in place as an alternative.
mgberlin has quit [Remote host closed the connection]