astrobunny has quit [Remote host closed the connection]
hanmac has quit [Ping timeout: 258 seconds]
diego_k has joined #ruby
turingbombe has quit [Quit: This computer has gone to sleep]
blackbombay has quit [Ping timeout: 250 seconds]
iMadper|` has quit [Remote host closed the connection]
freemac56 has quit [Ping timeout: 260 seconds]
ResidentBiscuit has joined #ruby
freemac56 has joined #ruby
xall has joined #ruby
hanmac has joined #ruby
blackbombay has joined #ruby
ResidentBiscuit has quit [Ping timeout: 245 seconds]
brianpWins has quit [Ping timeout: 265 seconds]
mikeiniowa has quit [Remote host closed the connection]
cdg has joined #ruby
mikeiniowa has joined #ruby
tubuliferous_ has joined #ruby
n008f4g_ has quit [Ping timeout: 240 seconds]
LoneHerm_ has joined #ruby
cibs has quit [Quit: leaving]
cibs has joined #ruby
howdoi has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freemac56 has quit [Ping timeout: 260 seconds]
tmtwd has joined #ruby
nankyokusei has joined #ruby
houhoulis has quit [Remote host closed the connection]
nankyokusei has quit [Ping timeout: 250 seconds]
vikaton has quit [Quit: Connection closed for inactivity]
charliesome has joined #ruby
PaschalsWager has joined #ruby
optiz0r has joined #ruby
Robtop__ has quit [Ping timeout: 250 seconds]
Desh has joined #ruby
yeticry_ has quit [Ping timeout: 256 seconds]
<Desh>
Hey! I am a beginner in ruby language, and I would like to know exactly what is the usage of the symbol " $ " respect to variables
jaguarmagenta has quit [Read error: Connection reset by peer]
yeticry has joined #ruby
tubuliferous_ has quit [Ping timeout: 265 seconds]
jaguarmagenta has joined #ruby
<llua>
like $var ?
<Desh>
exactly
<Desh>
Is it a global variable?
<llua>
yep
<Desh>
Thank you!
LoneHerm_ has quit [Remote host closed the connection]
LoneHermit has joined #ruby
<Desh>
and could be declared wherever I want, unlike other programming languages that is necessary to declare in the beginning of the code.
<Desh>
?
ruby-lang684 has joined #ruby
<ruby-lang684>
programming is about memorizing code or understanding the code or both?
AnoHito has quit [Ping timeout: 258 seconds]
yeticry has quit [Ping timeout: 256 seconds]
LoneHermit has quit [Ping timeout: 245 seconds]
<Desh>
Programming is about understanding the code, but sometimes is necessary to memorize functions in the language
yeticry has joined #ruby
<ruby-lang684>
oh i see
<ruby-lang684>
if you unsure you can just refer
<Desh>
Yes, It is impossible remember everything when you are programming
<ruby-lang684>
kk i agree
<ruby-lang684>
as long you understand the concept can already right
AnoHito has joined #ruby
AliG1000 has quit []
symm has quit [Quit: Leaving...]
kiwiheretic has joined #ruby
Desh has quit [Quit: Page closed]
rippa has joined #ruby
ruby-lang684 has quit [Ping timeout: 260 seconds]
<kiwiheretic>
What web frameworks other than rails is ruby used in?
<rjungemann>
Sinatra
<kiwiheretic>
Oh ok
<kiwiheretic>
Is it good?
cdg_ has joined #ruby
parsnip has joined #ruby
<rjungemann>
It's very small. I like it for small projects. You get basic routing, hosting of files, and view templates (erb, haml, or whatever) out of the box
<kiwiheretic>
Ahh, like the python equivalent of flask
<rjungemann>
Definitely
<kiwiheretic>
Basically make it smaller by not including the ORM
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<parsnip>
hmm, wanted to install jekyll after not using it for a while, but trying to be mindful of how install things this time around. like, i shouldn't need any passwords or sudo at any point, right?
cdg has quit [Ping timeout: 245 seconds]
<rjungemann>
How did you install Ruby?
<parsnip>
so i should use an updated ruby from say, homebrew? but just how much other stuff do i need to do from ground zero to jekyll.
<rjungemann>
If you used rbenv or rvm, you should not use sudo. If you use system Ruby, you need to use sudo. Generally speaking
<rjungemann>
I haven't installed ruby through homebrew directly (I use rbenv), but I don't think you need to use sudo
<rjungemann>
Generally with homebrew-installed stuff you don't use sudo
hahuang61 has joined #ruby
<parsnip>
`gem install --user-install jekyll bundler' works fine, but `jekyll new ./' asks for password.
<rjungemann>
What's the result of `which jekyll`?
<parsnip>
good point
<parsnip>
jekyll is /Users/iam/.gem/ruby/2.0.0/bin/jekyll
<parsnip>
`gem uninstall jekyll'?
<rjungemann>
What is the result of `ls /Users/iam/.gem/ruby/2.0.0`?
<rjungemann>
`ls -l` will show the permissions for the listed files
<parsnip>
-rwxr-xr-x 1 iam staff 508 Dec 18 20:24 /Users/iam/.gem/ruby/2.0.0/bin/jekyll
<rjungemann>
I feel like you may need to change the permissions on this directory
<parsnip>
oh, sorry one sec
<rjungemann>
Hm that looks okay actually
<parsnip>
maybe i should pastebin output of jekyll new .
<rjungemann>
Did you try `jekyll new some-blog-name`? Perhaps you were trying to create it in a directory your user does not own?
SteenJobs_ has joined #ruby
<rjungemann>
Calling `jekyll new some-blog-name` should create a new directory called `some-blog-name` in the current directory
brent__ has quit [Quit: Connection closed for inactivity]
SteenJobs has quit [Ping timeout: 252 seconds]
SteenJobs_ is now known as SteenJobs
hahuang61 has quit [Ping timeout: 260 seconds]
crazy_vine has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
<rjungemann>
This worked for me: `cd ~/Desktop; mkdir some-blog-name; cd some-blog-name; jekyll new .`
<rjungemann>
I feel like it's probably a directory permission issue for the directory you are trying to install in
<rjungemann>
Oh yeah @kiwiheretic I forgot to mention that most Ruby web frameworks are built on Rack (sort of the Ruby equivalent of WSGI. The Rack README has a non-comprehensive list of web frameworks using Rack: https://github.com/rack/rack)
<parsnip>
so i need to start using rvm? i ran into some issues with that as well
rgiscard has joined #ruby
<rjungemann>
It is strange that it is trying to install gems in `./vendor`. I just tried running `jekyll new` as above, and it installed gems in the usual place, rather than a vendor directory
<rjungemann>
What is the output of `echo $GEM_HOME`?
braincrash has joined #ruby
<parsnip>
rjungemann: no value
<rjungemann>
Also `echo $GEM_PATH`
<parsnip>
also no value
jenrzzz has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
gix has quit [Ping timeout: 258 seconds]
<rjungemann>
is `$HOME/.gem/ruby/2.0.0/bin` in your $PATH?
jaguarmagenta has quit [Read error: Connection reset by peer]
<parsnip>
yes
<parsnip>
should i learn rvm?
Pachonk has joined #ruby
jaguarmagenta has joined #ruby
<rjungemann>
I would say it should make things easier, yes
<rjungemann>
You should not need to invoke `jekyll` from its full path
gix has joined #ruby
<parsnip>
oh could you tell i did that? i just did that to be explicit, cuz i wasn't sure if i had competing versions
<rjungemann>
Yeah the first line of the gist
<rjungemann>
You might be able to get it to work like this perhaps:
<rjungemann>
`export GEM_HOME=$HOME/.gem; jekyll new my-jekyll`
<rjungemann>
I think that's the missing piece. The problem was, bundler wasn't sure where to install the gems to
<rjungemann>
Rvm would handle the gem management (and Ruby management) for you
<rjungemann>
Oh neat, I didn't know this: `gem env` will tell you all sorts of useful info
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tubuliferous_ has joined #ruby
bocaneri has quit [Quit: Leaving]
charliesome has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
Anonymoose2 has joined #ruby
SteenJobs_ has joined #ruby
SteenJobs has quit [Ping timeout: 248 seconds]
SteenJobs_ is now known as SteenJobs
vayan has joined #ruby
<parsnip>
okay, so using rvm and installing things again seems to allow `jekyll new' to work
reverberations has quit [Ping timeout: 250 seconds]
<parsnip>
but all the environment variables, i feel like i'm not seeing a canonical advice to set these online, like at ruby's page, or rvm's page. rvm still seems to complain about RUBY_VERSION not being set.
reverberations has joined #ruby
<parsnip>
i think i just went with `rvm install ruby'
astrobunny has joined #ruby
dviola has quit [Quit: WeeChat 1.6]
Anonymoose2 has quit [Ping timeout: 250 seconds]
astrobun_ has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
astrobunny has quit [Ping timeout: 264 seconds]
LoneHermit has joined #ruby
sparch has joined #ruby
grenierm has joined #ruby
balazs__ has quit [Remote host closed the connection]
LoneHermit has quit [Ping timeout: 248 seconds]
aidalgol has joined #ruby
Channel6 has quit [Quit: Leaving]
brendan- has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
hahuang61 has joined #ruby
pragmaticus has joined #ruby
Anonymoose2 has joined #ruby
arescorpio has quit [Quit: Leaving.]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
PaschalsWager has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
PaschalsWager has joined #ruby
reverberations has quit [Ping timeout: 250 seconds]
symm has joined #ruby
tubuliferous_ has quit [Ping timeout: 248 seconds]
PaschalsWager has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
antoniobeyah has quit [Quit: antoniobeyah]
jenrzzz has joined #ruby
kuSuSE has quit [Quit: Konversation terminated!]
dionysus69 has joined #ruby
pawnbox has joined #ruby
charliesome has joined #ruby
crazy_vine has quit [Ping timeout: 260 seconds]
<rjungemann>
I don't use RVM so I can only help so far with it, but I think RUBY_VERSION not being set means that you need to choose the version you're using. So in your .bashrc file or whatever, under your rbenv setup, you'll need to set up your version. So `rvm 2.3.0` or whatever
<rjungemann>
Actually I think calling `rvm use 2.3.0` once should suffice
<rjungemann>
The reason why it's hard to find documentation about it is because most people use a ruby version manager of some sort these days, whether rvm or rbenv or whatever
nankyokusei has joined #ruby
<rjungemann>
If you install system Ruby, everything should "just work" but you will need to `sudo gem install` your gems. If you build from scratch, because you set the `PREFIX` environment variable, everything should just work. I've not seen anyone `brew install ruby` before in any of the instructions so I cannot recommend that approach
yardenbar has joined #ruby
<rjungemann>
I've also not used `gem install --user-install`, but if you do this approach, you WILL need to remind Ruby where to find your gems. So you will in all likelyhood need to set at a minimum, GEM_HOME, and maybe GEM_PAH
<rjungemann>
s/GEM_PAH/GEM_PATH
anisha has joined #ruby
nankyokusei has quit [Ping timeout: 245 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
jaguarmagenta has quit [Read error: Connection reset by peer]
anisha_ has joined #ruby
jaguarmagenta has joined #ruby
anisha has quit [Ping timeout: 256 seconds]
rgiscard has quit [Quit: Gone fishing]
Axy has joined #ruby
hotpanca_ has quit [Remote host closed the connection]
<ruby[bot]>
saveroo: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<chrisseaton>
saveroo: I only see one ternary there
tubuliferous_ has joined #ruby
<chrisseaton>
saveroo: but anyway, would you like me to help you show you how to break this down?
cdg_ has quit [Remote host closed the connection]
hotpancakes has joined #ruby
<saveroo>
yes,, since im new with ruby, its pretty hard to reach the code syntax
xall has joined #ruby
kies has quit [Read error: Connection reset by peer]
cdg has joined #ruby
cdg has quit [Remote host closed the connection]
hahuang61 has quit [Ping timeout: 246 seconds]
cdg has joined #ruby
Dimik has quit [Ping timeout: 248 seconds]
kies has joined #ruby
<saveroo>
the code are hard to read for me, i have task to implement rubocop and then, rubocop gives an error about multilineternary i just cant guess how to do it, for the other cops are just fine
pawnbox has quit [Read error: Connection reset by peer]
<chrisseaton>
saveroo: I've commented on the gist
<chrisseaton>
saveroo: Does that help enough?
hotpancakes has quit [Ping timeout: 258 seconds]
maattdd has joined #ruby
xall has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
<saveroo>
oke let me check sorry, i just read it...
maattdd has quit [Ping timeout: 258 seconds]
pawnbox_ has joined #ruby
<saveroo>
chrisseaton: Thanks alot chris!!, i dunno how to repay the favor you gave
<saveroo>
may the force be with you chris...
codfection has joined #ruby
faces has joined #ruby
pawnbox has quit [Ping timeout: 268 seconds]
conta has joined #ruby
raiti has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
pawnbox_ has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
<koldbrutality>
is it possible to have variable length arguments for ruby block |x, y| ?
xall has joined #ruby
tubuliferous_ has quit [Ping timeout: 258 seconds]
yardenbar has joined #ruby
<herwin>
|*args|
nowz has joined #ruby
montanonic has quit [Ping timeout: 250 seconds]
quazimodo has quit [Ping timeout: 258 seconds]
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
Anonymoose2 has quit [Ping timeout: 240 seconds]
quazimodo has joined #ruby
maattdd has joined #ruby
pawnbox has quit [Remote host closed the connection]
<koldbrutality>
how about default value for a optional ruby block argument?
Derderderd has quit [Ping timeout: 256 seconds]
nankyokusei has quit [Ping timeout: 246 seconds]
ponga has quit []
mooe has joined #ruby
Derderderd has joined #ruby
Jackneill has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
muelleme has joined #ruby
haxrbyte_ has joined #ruby
montanonic has joined #ruby
wugy has joined #ruby
haxrbyte has quit [Ping timeout: 260 seconds]
<chrisseaton>
koldbrutality: I don't think so
<chrisseaton>
koldbrutality: def foo(&block=nil); end is a syntax error
blaxter has joined #ruby
<herwin>
chrisseaton: I think he means something like { |x, y=1| ... }
uu has joined #ruby
<dminuoso>
Mmmm, could any of you folks see usage in something like: my_proc = &block (procifying a block outside the arglist)
jz has joined #ruby
<dminuoso>
Maybe to conditionally wrap it inside a proc, so it does not have to be done everytime
jz is now known as Guest45138
<chrisseaton>
dminuoso: you mean with `block` there as a new keyword?
hotpancakes has joined #ruby
hahuang61 has joined #ruby
<dminuoso>
chrisseaton: Yeah.
<chrisseaton>
dminuoso: can you already do `my_proc = proc { yield }`? I think the yield might be to the captured's method block in that case.
<dminuoso>
Or maybe something done directly as a method in Kernel.
<dminuoso>
Mmm
<dminuoso>
Yeah it should.
<dminuoso>
Though that will introduce an extra stack trace
<dminuoso>
*stack frame
johnzorn has quit [Ping timeout: 258 seconds]
<dminuoso>
chrisseaton: From what I can see, it should be easy to implement this, but so far I don't really have many use cases for it.
haxrbyte_ has quit [Quit: Leaving...]
<chrisseaton>
It's annoying to put the block in the args list if it's only needed on some branches, and that would help implementations that don't optimise such as MRI, as they wouldn't have to allocate the Proc object until it reached that branch.
hahuang61 has quit [Ping timeout: 245 seconds]
mark_66 has joined #ruby
<dminuoso>
chrisseaton: Yeah that was my motivation. I think I'll actually just implement it, and make it a feature request and see what the powers that be think.
<dminuoso>
My feeling tells me it should be a method on kernel rather than syntax.
<dminuoso>
It would also simplify things if I didn't have to touch that monstreous LR(1) parser.
dionysus69 has quit [Ping timeout: 246 seconds]
dionysus70 has joined #ruby
<chrisseaton>
dminuoso: `block` as a keyword is probably not possible - too many name conflicts, so a method on Kernel would be better, yes.
jaguarmagenta has quit [Remote host closed the connection]
cdg has quit [Remote host closed the connection]
<matthewd>
?vagrant walterheck
<ruby[bot]>
walterheck: please join #vagrant for help with it.
cdg has joined #ruby
mikecmpbll has joined #ruby
nofxxx has quit [Ping timeout: 256 seconds]
aidalgol is now known as DingDong
tubuliferous_ has quit [Ping timeout: 250 seconds]
ishe_ua has joined #ruby
the_drow has joined #ruby
haxrbyte has joined #ruby
haxrbyte has quit [Client Quit]
cdg has quit [Remote host closed the connection]
<walterheck>
matthewd, well I think the problem is a ruby one. It appears that my $LOAD_PATH is not seeign all gems
DingDong is now known as aidalgol
mochiyoda has quit [Ping timeout: 245 seconds]
<matthewd>
If ruby isn't looking at all the things in the load path, that's a ruby bug. If the load path doesn't contain what you expect it to, that seems to be a matter for whoever set up the runtime environment (read: vagrant).
SpiffTR has joined #ruby
vondruch has quit [Ping timeout: 268 seconds]
bastilian has joined #ruby
beilabs has joined #ruby
Guest54 has joined #ruby
vasilakisfil has joined #ruby
<vasilakisfil>
is there any guide somewhere on how to add tests to a gem (using rspec preferrably) that has to do with ActiveRecord? I am a bit confused how to create the database from the spec helper
BrianJ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JeanCarloMachado has joined #ruby
jsrn_ has joined #ruby
n008f4g_ has joined #ruby
tmtwd has quit [Ping timeout: 250 seconds]
SpiffTR has quit [Quit: Leaving.]
raiti has quit [Remote host closed the connection]
<Burgestrand>
vasilakisfil it's a rails-specific test file in a gem which is not rails-specific, so I think we put all the railsy things in that one, such as setting up the (in-memory) database, creating the tables, surrounding the tests in transactions and then declaring the tests :)
<Beams>
Is anyone able to explain to me why gem is able to find a gem with 'gem search' but not with 'gem install' ? (http://hastebin.com/upadiyaxag.rb)
<matthewd>
saveroo: I'm not sure I understand your question. It seems very easy to answer by just trying it.
<matthewd>
Beams: My first guess would be that you're not using jruby, so while it knows the gem exists, it can't find an actual installable version
<Beams>
matthewd, oh ok. i'll have a look into that. thanks
<matthewd>
Beams: `gem env` will confirm which ruby it's using, if you think it should be jruby
mikecmpb_ has joined #ruby
yasm has joined #ruby
jaguarmagenta has joined #ruby
mikecmpbll has quit [Ping timeout: 264 seconds]
<Beams>
matthewd, i had never heard of jruby before tbh. looks like that was it though, thanks.
leftpad has joined #ruby
lenwood has joined #ruby
yasm has quit [Client Quit]
jaguarmagenta has quit [Ping timeout: 252 seconds]
aryaching has quit [Ping timeout: 250 seconds]
_snarf_ has joined #ruby
hahuang61 has joined #ruby
milardovich has joined #ruby
n008f4g_ has quit [Ping timeout: 264 seconds]
byte512 has joined #ruby
hahuang61 has quit [Ping timeout: 240 seconds]
symm_ has joined #ruby
symm has quit [Ping timeout: 258 seconds]
ropeney has quit [Ping timeout: 260 seconds]
Derderderd has quit [Ping timeout: 260 seconds]
GodFather has joined #ruby
leftpad has quit [Ping timeout: 260 seconds]
blaxter has quit [Quit: foo]
fedruantine has joined #ruby
quazimodo has joined #ruby
d0nn1e has quit [Ping timeout: 250 seconds]
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<givemeurhats>
anyone here using guard with unit test?
<Bish>
actually i don't but i will keep my mouth shut :p
<Bish>
i just typed it into my REPL and it didn't seem to work
<marchelzo>
whats the best ruby ide
<apeiros>
?dontwork
<ruby[bot]>
we charge $120/h to figure out what you mean by "does not work". alternatively you can give us a proper explanation of what you expected to happen, and what happened instead, including the full exception if one occurred.
<apeiros>
Bish: ^
jaguarmagenta has joined #ruby
<Bish>
i've never seen that before :D
<marchelzo>
how to eval code in this chan
<apeiros>
>> "registration with nickserv required"
<apeiros>
and: don't use it to spam, we will kick you, not the bot if you do (some people have the weird idea that "it's the bot which spams! not me!")
givemeurhats has left #ruby [#ruby]
Hello123 has quit [Ping timeout: 260 seconds]
<Bish>
lol, never seen that before either
nankyokusei has quit [Ping timeout: 265 seconds]
<apeiros>
yeah, thankfully it's been a while
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<marchelzo>
whats the fastest ruby implementation
Derderderd has quit [Ping timeout: 258 seconds]
<Burgestrand>
no ruby implementation is the fastest ruby implementation
<Bish>
whats the best question to troll #ruby :3
<Burgestrand>
just as no code is faster than no code
houhoulis has quit [Remote host closed the connection]
<Burgestrand>
:D
nettoweb has joined #ruby
<marchelzo>
not trolling
<marchelzo>
whats the fastest implementation
GodFather has joined #ruby
<Bish>
jruby might be fastest, because jvm.. in terms of instructions / sec
<Burgestrand>
marchelzo I'm afraid your question is invalid!
<marchelzo>
seems like there hasn't been a lot of effort to produce a fast ruby implementation
<Bish>
but Burgestrand is right, that question doesn't work
<marchelzo>
why doesn't the question work
<Burgestrand>
marchelzo you need a better definition of fastest
<Bish>
marchelzo: ruby is complex, hard work to do it fast
<Burgestrand>
marchelzo fastest *where*
<marchelzo>
most optimized
<Burgestrand>
marchelzo where?
<Gravious>
i read that jruby had better performance on average at some point, but that's no longer the case i believe
<marchelzo>
what do you mean where?
<Burgestrand>
marchelzo what do you mean fastest?
<marchelzo>
given a program, an implementation that executes that program in less time than other implementations is faster
<Burgestrand>
marchelzo now we're getting somewhere, now the question becomes which program?
<marchelzo>
the answer will be the same for most programs
<Burgestrand>
no!
thelacce has joined #ruby
<marchelzo>
you're being way too pedantic
<Gravious>
i think so as well
<marchelzo>
look at something like v8
<marchelzo>
it's evidently been worked on and optimized by a lot of great engineers
<marchelzo>
and it's incredibly fast
<Gravious>
imo, you can reason about performance based on averages
harfangk has joined #ruby
torQue_ has joined #ruby
<marchelzo>
if you wrote a non-JIT javascript VM with no optimizations, v8 would beat it in almost literally every single benchmark
<Burgestrand>
what's the purpose of said reasoning if the actual real-world results disagree with your guesstimation?
jhack has joined #ruby
<marchelzo>
what real-world results?
<Burgestrand>
your particular project running faster in the average-faster implementation
<Burgestrand>
or not
jhack has quit [Client Quit]
<Gravious>
Burgestrand, because there's generally always going to be some contrived input you can craft that will show one implementation to be superior to another, we're not interested in that, what we're interested in is which implementation runs programs quicker in general
CloCkWeRX has quit [Quit: Leaving.]
<Burgestrand>
Gravious but to what end is the answer of this question useful?
mim1k|work has quit [Ping timeout: 248 seconds]
<chrisseaton>
marchelzo: there are Ruby implementations just as far as V8, like mine, JRuby+Truffle
<marchelzo>
because using the fastest, most optimized ruby implementation will let you do more work with less power
mim1k|work has joined #ruby
<chrisseaton>
just as fast as, I mean
<Burgestrand>
(for the record, chrisseaton has qualified answers :))
ramortegui has joined #ruby
<Burgestrand>
marchelzo except that's not true
<Bish>
machty: i fucked around enough with ruby implementations to know MRI is best, maybe not because of speed but happiness
jaguarmagenta has quit [Remote host closed the connection]
<marchelzo>
chridal: JRuby is the one that runs on the JVM?
<marchelzo>
oops
<marchelzo>
sorry chridal
<marchelzo>
chrisseaton: ^
<marchelzo>
what's Truffle?
<chrisseaton>
It's a new JIT for Ruby basically
<Burgestrand>
marchelzo I've chosen to use jruby and mri in different projects over the years, there's tradeoffs in both that are more or less suitable for different situations and sometimes the execution also varies
<Gravious>
Burgestrand, you may as well ask what the purpose of asymptotic analysis is
walterheck has quit [Ping timeout: 264 seconds]
<marchelzo>
chrisseaton: that's cool
<Gravious>
Burgestrand, to what end do we choose to ignore the real world time required to read from memory? and instead say it's O(n), so that we can reason about programs in such a way that allows us to see that a binary search will generally be faster than a linear search
thelacce has quit []
<marchelzo>
i don't like the JVM dependency though
<Burgestrand>
Gravious but there's also so many other things that come into play when deciding which VM to run
<marchelzo>
it would be cool if there were a small, complete, portable, embeddable, and fast ruby implementation
<marchelzo>
written in C or something
<marchelzo>
or C++
<Burgestrand>
Gravious performance in a particular scenario, even if that happens to cover the majority of your code, is but one variable which is not always relevant
<herwin>
you mean mruby?
<Gravious>
Burgestrand, sure, but i reject your argument that you can't reason about the general case performance of a ruby implementation
<Gravious>
Burgestrand, but that's fine, we can disagree, i have no idea what i'm on about most of the time :)
rodfersou is now known as rodfersou|lunch
mikeXsh has joined #ruby
<chrisseaton>
marchelzo: Truffle doesn't need a JVM to run even so it's perfect for what you want!
mim1k|work has quit [Ping timeout: 265 seconds]
mim1k|work has joined #ruby
<chrisseaton>
It's written in Java but we statically compile it to machine code so may as well be written in C
<Burgestrand>
Gravious I agree with you, but at the same time I also disagree that the reasoning is useful, I would even go as far as to say that the reasoning could be harmful and lead to bad conclusions
eightbitraptor has joined #ruby
<marchelzo>
that's cool. i'll check it out.
eightbitraptor has quit [Client Quit]
rgiscard has joined #ruby
brendan- has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<marchelzo>
what do ruby people think about crystal? it claims to be a sort of faster ruby
<chrisseaton>
We know people have reservations like you do so we're working to address them all (JVM dependency, footprint, startup time, performance)
<Yxhuvud>
marchelzo: a relevant question is if you value startup time or throughput highest.
Ishido has joined #ruby
<Yxhuvud>
because the answer will be different depending on that.
<marchelzo>
right
<Gravious>
Burgestrand, fair enough :)
<marchelzo>
Yxhuvud: but you can reach a pretty decent balance
<marchelzo>
v8 has good throughput but nowhere near the startup overhead of the jvm
<marchelzo>
at least in my experience
<marchelzo>
not that you can /really/ compare them, but
despai has quit [Quit: This computer has gone to sleep]
eightbitraptor has joined #ruby
<marchelzo>
Gravious: wow, that's extremely weird
boggle has joined #ruby
<marchelzo>
instead of doing all of that static analysis to figure out whether something might return nil or not, why not just have it return a different type, like Option<String>
<marchelzo>
still fascinating though
jhack has joined #ruby
lolmaus has quit [Quit: Connection closed for inactivity]
<Gravious>
you mean like the kind of thing haskell has with Maybe<a>? disclaimer: i don't know haskell at all
<marchelzo>
yes
<Gravious>
hrm, yeah, i don't know
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
araujo has quit [Quit: Leaving]
<Burgestrand>
marchelzo I guess my answer to your original question would be that JRuby typically executes things faster than CRuby (MRI), e.g. I did some high-throughput XML processing which required JRuby to get enough data through per second. However in general I would go with CRuby (MRI) because the JRuby ecosystem is not as smooth to work with, some gems are not compatible, and even those gems who are have vaguely different behaviour on JRuby which is not
<Burgestrand>
always documentet.
<marchelzo>
that's what i was afraid of
oded has joined #ruby
<marchelzo>
same problem as pypy i guess
blackbombay has quit [Ping timeout: 260 seconds]
SuperLag has quit [Quit: leaving]
<Burgestrand>
marchelzo mind you, last time I used JRuby in as heavy fashion was about a year and a half ago, so times may have changed for the better.
sdothum has joined #ruby
<oded>
Hello! How do I iterate super classes (the route 'super' would go through)? That's including modules, in the order they were included/inherited
andrzeju_ has quit [Read error: Connection reset by peer]
<marchelzo>
javascript is lucky in that the super optimized implementation is the one that virtually everyone uses, both in the browser and with node.
Sirithcam has joined #ruby
cdg has joined #ruby
<oded>
I have instance variables attached to certain classes, and I want to iterate the 'super flow' in the correct order and see those variables
<oded>
I tried defining a method on Object and calling super, which works, but I can't tell from the method which class I'm currently 'at'
shinnya has joined #ruby
blackbombay has joined #ruby
<Burgestrand>
oded frankly I'm not sure it's the whole picture (because I don't typically need to do this), but Module#ancestors is probably quite helpful.
lxsameer has joined #ruby
SteenJobs has joined #ruby
workmad3 has joined #ruby
<Burgestrand>
oded also pry (a gem, similar to IRB) has some quite powerful inspection capabilities that help a lot with this kind of debugging (I assume that's what this is?)
<oded>
Burgestrand: Ah! That's what I was looking for. Isn't it Rails only though?
<Burgestrand>
>> (module M; end).ancestors
<ruby[bot]>
Burgestrand: # => undefined method `ancestors' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/700719)
<oded>
Burgestrand: not debugging, will post it here soon for your comments
<Burgestrand>
oded Keep in mind that the module hierarchy is not the only place Ruby looks for methods. Singleton-class defined methods can also hop in there.
<oded>
Burgestrand: hmm that would be a huge mess though :x
<Burgestrand>
oded I'm very much for interfaces :)
<oded>
How do you mean?
tubuliferous_ has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
hahuang61 has joined #ruby
<Burgestrand>
oded uh, like I typically begin by writing out how I want to call things before I do the implementation, and then I fill the innards, e.g. in your case I'd begin by using my API in a style similar to contracts (because I find the aestethics/interface of it pleasing) and then I'd make it work as close as possbile
ferr1 has quit [Quit: WeeChat 1.6]
Snickers has quit [Ping timeout: 248 seconds]
<Burgestrand>
oded code interface design I guess :P
<Burgestrand>
human computer interaction, those hippie stuff thingies
xall has joined #ruby
SpiffTR has joined #ruby
jhack has joined #ruby
montanonic has joined #ruby
tubuliferous_ has quit [Ping timeout: 260 seconds]
<oded>
Burgestrand: right, I do that too but I then include the complexity of needed implementation and if I believe it outweigh the benefit I look for the next possible syntax
houhoulis has quit [Remote host closed the connection]
hahuang61 has quit [Ping timeout: 260 seconds]
<xall>
in terms of the scope of the return
<Burgestrand>
oded then we either have different approaches to the implementation, or different thresholds of how much compromise we allow in the API design :)
<Burgestrand>
oded either way you asked my opinion and there it is!
SpiffTR1 has joined #ruby
SpiffTR has quit [Ping timeout: 252 seconds]
iNs has quit [Ping timeout: 258 seconds]
AndyBotwin has joined #ruby
anisha_ has quit [Quit: Leaving]
<oded>
Burgestrand: I'm glad to have it :) (your opinion) on another matter, what do you think generally about overloading methods? It seems many times case/when is needed which I hate
Snowy has joined #ruby
Snowy is now known as SteveWright
bronson has joined #ruby
govg has joined #ruby
<Burgestrand>
oded I don't feel like I need overloading when I do development in Ruby, funnily enough I do think it's a tool I use when I do work in other languages where it's available, but I've never felt like I missed it
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
evie_hammond has quit [Quit: WeeChat 1.6]
xen0fon_ has quit [Quit: Leaving]
jhack has quit [Quit: jhack]
<Burgestrand>
oded no telling if it's due to how I code in Ruby, or simply because I've gotten used to it not being available, or a combination thereof
<oded>
Burgestrand: I get what you mean
ropeney has joined #ruby
<Burgestrand>
oded it would make sense that I don't miss it in Ruby because there's no static typing in Ruby
bronson has quit [Ping timeout: 250 seconds]
<oded>
Burgestrand: yes, you try to avoid thinking about the types (I could also have the syntax do duck-typing with symbols)
jhack has joined #ruby
cajone has quit [Remote host closed the connection]
nettoweb has joined #ruby
grenierm has quit [Quit: grenierm]
evie_hammond has joined #ruby
grenierm has joined #ruby
SpiffTR1 has quit [Read error: Connection reset by peer]
rodfersou|lunch is now known as rodfersou
SpiffTR has joined #ruby
milardovich has quit []
<xall>
what terms should i google to find out how to make it work?
montanonic has quit [Ping timeout: 268 seconds]
Burgestrand has quit [Ping timeout: 260 seconds]
cdg has quit [Remote host closed the connection]
TomyLobo has quit [Disconnected by services]
kjbrjwqsevveohhm has joined #ruby
kjbrjwqsevveohhm is now known as dbenxwlwgigdhtyn
dbenxwlwgigdhtyn is now known as TomyLobo
cdg has joined #ruby
nankyokusei has joined #ruby
Burgestrand has joined #ruby
PaschalsWager has joined #ruby
Snickers has joined #ruby
<xall>
nevermind, i'm an idiot. i thought it was an issue with block scope but it's because of detect truthiness
Derderderd has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
<xall>
but how can i use detect to get the first truthy method call while also returning the hash value?
Derderderd has quit [Ping timeout: 256 seconds]
ResidentBiscuit has joined #ruby
ResidentBiscuit has quit [Max SendQ exceeded]
<Burgestrand>
xall I was away for a second, do you have a minimal example code piece?
<Burgestrand>
(I was away hence I'm not sure if you already posted one)
<dminuoso>
in block/proc a return breaks out of the current stack frame (i.e. method), break will break out of the block and stop enumerators, while next will break out of the block but still invoke the next enuemrator.
<Burgestrand>
I got ruby'd
<dminuoso>
lambdas differ just that a return is treated like a next
LuckyABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hotpancakes has joined #ruby
<arup_r>
matthewd: Why the last `,` is needed? I mean that Hash will work without it. Just trying to understand what is the reason. I understood by now it is a valid syntax. :)
despai has quit [Quit: This computer has gone to sleep]
<matthewd>
Right: it's obviously not *needed* -- it's optional. But consider what advantages there might be, for someone editing the list, to include it.
<Gravious>
arup_r, it's also pretty handy for patches, you can have a smaller diff when you append a new element to the hash than you would if trailing comms wasn't allowed
lmc has quit [Remote host closed the connection]
lmc has joined #ruby
<arup_r>
nice analogies,, very cool!
<arup_r>
thanks to both of you.
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Derderderd has joined #ruby
SpiffTR has quit [Ping timeout: 264 seconds]
conta has joined #ruby
pwnd_nsfw has joined #ruby
arup_r has quit []
chouhoulis has joined #ruby
Derderderd has quit [Ping timeout: 246 seconds]
fullofcaffeine has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 258 seconds]
lenwood has quit [Quit: Konversation terminated!]
lenwood has joined #ruby
SpiffTR has joined #ruby
LuckyABA has joined #ruby
synthroid has joined #ruby
tvw has quit [Read error: Connection reset by peer]
tvw has joined #ruby
duderonomy has quit [Ping timeout: 245 seconds]
Devalo has quit [Remote host closed the connection]
tvw has quit [Remote host closed the connection]
Devalo has joined #ruby
vasilakisfil has quit [Quit: Konversation terminated!]
fullofcaffeine has joined #ruby
PaschalsWager has quit [Read error: Connection reset by peer]
Devalo has quit [Ping timeout: 246 seconds]
hutch34 has joined #ruby
FastJack has quit [Remote host closed the connection]
j3r0 has joined #ruby
brendan- has joined #ruby
amclain has joined #ruby
SpiffTR has quit [Quit: Leaving.]
tubuliferous_ has joined #ruby
synthroi_ has joined #ruby
braincrash has quit [Ping timeout: 250 seconds]
agent_white has joined #ruby
<agent_white>
Mornin' folks
braincrash has joined #ruby
tubuliferous_ has quit [Ping timeout: 246 seconds]
synthroid has quit [Ping timeout: 258 seconds]
gbgdev has quit [Remote host closed the connection]
n008f4g_ has quit [Ping timeout: 252 seconds]
aganov has quit [Remote host closed the connection]
Derderderd has joined #ruby
bronson has joined #ruby
gbgdev has joined #ruby
SteveWright has quit [Read error: Connection reset by peer]
braincrash has quit [Ping timeout: 250 seconds]
yardenbar has quit [Ping timeout: 252 seconds]
bronson has quit [Remote host closed the connection]
SteveWright has joined #ruby
lenwood has quit [Ping timeout: 248 seconds]
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
hahuang61 has joined #ruby
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
quazimodo has quit [Ping timeout: 252 seconds]
demoo has joined #ruby
<demoo>
hey all, coming from python to ruby
aryaching has joined #ruby
Chair has quit [Ping timeout: 258 seconds]
<demoo>
I am a bit confused about the usage of << in some contexts
bradleyprice has quit [Remote host closed the connection]
<demoo>
I know it is used for appending like on lists
hotpancakes has quit [Remote host closed the connection]
TTilus has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
symm has joined #ruby
symm- has quit [Ping timeout: 258 seconds]
demoo has joined #ruby
hotpancakes has joined #ruby
fullofca_ has joined #ruby
bocaneri has quit [Read error: Connection reset by peer]
dnicole has quit [Remote host closed the connection]
dnicole has joined #ruby
AgentVenom has joined #ruby
AgentVenom has quit [Client Quit]
bradleyprice has joined #ruby
AgentVenom has joined #ruby
jaguarmagenta has joined #ruby
TTilus has quit [Ping timeout: 258 seconds]
sparch has quit [Ping timeout: 265 seconds]
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dnicole has quit [Remote host closed the connection]
Derderderd has joined #ruby
whathappens has joined #ruby
AgentVenom has quit [Ping timeout: 240 seconds]
fullofca_ has quit [Remote host closed the connection]
jaguarmagenta has quit [Ping timeout: 248 seconds]
fullofcaffeine has joined #ruby
Devalo has quit [Remote host closed the connection]
despai has quit [Quit: This computer has gone to sleep]
fullofcaffeine has quit [Read error: Connection reset by peer]
fullofca_ has joined #ruby
SteveWright has joined #ruby
duderonomy has joined #ruby
Lord_of_Life has quit [Excess Flood]
Devalo has joined #ruby
AgentVenom has joined #ruby
Lord_of_Life has joined #ruby
milardovich has quit []
pilne has joined #ruby
nankyokusei has joined #ruby
Didac has quit [Quit: LayerBNC - https://LayerBNC.org/ (Account terminated by LayerBNC Staff Team (Account unused for over 57 days, termination for inactivity.))]
enterprisey has joined #ruby
Devalo has quit [Ping timeout: 246 seconds]
csk has quit [Ping timeout: 248 seconds]
nankyokusei has quit [Ping timeout: 260 seconds]
mikecmpbll has joined #ruby
oded has quit [Remote host closed the connection]
_djbkd has joined #ruby
BrianJ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
BrianJ has joined #ruby
BrianJ has quit [Client Quit]
BrianJ has joined #ruby
BrianJ has quit [Client Quit]
ogn has joined #ruby
BrianJ has joined #ruby
BrianJ has quit [Client Quit]
chouhoulis has quit [Remote host closed the connection]
BrianJ has joined #ruby
BrianJ has quit [Client Quit]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
BrianJ has joined #ruby
BrianJ has quit [Client Quit]
BrianJ has joined #ruby
BrianJ has quit [Client Quit]
BrianJ has joined #ruby
BrianJ has quit [Client Quit]
BrianJ has joined #ruby
nettoweb has quit [Ping timeout: 248 seconds]
fullofca_ has quit [Remote host closed the connection]
BrianJ has quit [Client Quit]
fullofcaffeine has joined #ruby
nettoweb has joined #ruby
SteveWright has quit [Remote host closed the connection]
SteveWright has joined #ruby
jhack has quit [Ping timeout: 258 seconds]
weaksauce has joined #ruby
fullofcaffeine has quit [Ping timeout: 260 seconds]
SteveWright has quit [Ping timeout: 240 seconds]
tubuliferous has joined #ruby
Derderderd has quit [Ping timeout: 264 seconds]
byte512 has quit [Ping timeout: 246 seconds]
walterheck has joined #ruby
walterheck has quit [Remote host closed the connection]
Devalo has joined #ruby
milardovich has joined #ruby
tubuliferous has quit [Ping timeout: 245 seconds]
AndyBotwin has quit [Quit: Leaving]
synthroid has joined #ruby
antoniobeyah has quit [Quit: antoniobeyah]
d^sh has quit [Ping timeout: 252 seconds]
synthro__ has joined #ruby
troulouliou_div2 has joined #ruby
synthroi_ has quit [Read error: Connection reset by peer]
mikecmpbll has quit [Quit: inabit. zz.]
d^sh has joined #ruby
gheegh has joined #ruby
antoniobeyah has joined #ruby
JakFrist[WVU] has joined #ruby
marxarelli is now known as marxarelli|afk
harai_ has joined #ruby
AndyBotwin has joined #ruby
jschoolcraft has joined #ruby
synthroid has quit [Ping timeout: 258 seconds]
vuoto has quit [Read error: Connection reset by peer]
raul782 has quit [Remote host closed the connection]
tubuliferous has joined #ruby
<zenspider>
rawr
darix has quit [Quit: may the packets be with you...]
whathappens has joined #ruby
tubuliferous has quit [Ping timeout: 265 seconds]
codfection has joined #ruby
trajing has quit [Ping timeout: 250 seconds]
tubuliferous has joined #ruby
xrlk has quit [Ping timeout: 246 seconds]
StoneCypher has joined #ruby
<StoneCypher>
some communities allow questions about common libraries in language channels; others dont'
<StoneCypher>
s/t'/'t/
<StoneCypher>
would questions about sidekiq be welcome here?
radic has joined #ruby
<antoniobeyah>
i’ve answered questions about other libraries, not sure why that one would be excluded
<antoniobeyah>
just don’t try to sell it, thats annoying
_djbkd has quit [Remote host closed the connection]
<antoniobeyah>
would have to ask one of the ops dudes here for an official answer
<apeiros>
StoneCypher: the common rule is to look whether there's a dedicated channel and ask there. if it's inactive it's sensible to ask here. just remember to inform that you've asked a question elsewhere before.
<nofxx>
actually apart from talking about rails you can talk about weather np =P
<apeiros>
+ remember to leave a note in the dedicated channel that you carry on to another channel
<zenspider>
nofxx: please refrain from talking about the weather too much ... we DO try to keep the signal:noise good around here... :P
Sou|cutter has quit [Quit: WeeChat 0.4.2]
<StoneCypher>
apeiros: found a small one; trying there first. thanks
enterprisey has quit [Remote host closed the connection]
despai has quit [Quit: This computer has gone to sleep]
|RicharD| has quit [Quit: Sto andando via]
bradleyprice has joined #ruby
<apeiros>
camouflage the weather talk as weather service API talk
csk has quit [Quit: ZZZzzz…]
rwb has joined #ruby
ropeney has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
antoniobeyah has quit [Quit: antoniobeyah]
<zenspider>
exactly
fullofcaffeine has joined #ruby
nowhere_man has quit [Ping timeout: 268 seconds]
_djbkd has joined #ruby
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
ramfjord_ has quit [Ping timeout: 240 seconds]
sepp2k has quit [Read error: Connection reset by peer]
tercenya has quit [Remote host closed the connection]
Jayson_Virissimo has quit []
pgib has joined #ruby
tercenya has joined #ruby
hahuang65 has joined #ruby
<pgib>
Let's say I have a constant array FOO `FOO = [:some, :stuff].freeze`, and I want to make another constant, BAR, which appends an element to FOO, is there a better way to write this than `BAR = (FOO + [:extra]).freeze` ?
<zenspider>
pgib: better?
whathappens has quit [Ping timeout: 264 seconds]
<zenspider>
based on what objective measure?
<StoneCypher>
it seems like a question like that may be fairly open-ended if he's looking for consequences of which he is unaware
<pgib>
well, conciseness. Basically, am I missing a method that can take a frozen array and either objects or another array and return a frozen array
<pgib>
in particular, the Array + Array bothers me, I wish I could do FOO.concat(something) and return a new array
<pgib>
I'm only adding one item, so the temporary 1-item array bothers me
lmc has quit [Quit: Leaving...]
<ytti>
a3 = a1.+(a2)
<ytti>
i don't think i understood the question
<zenspider>
haha
<pgib>
right, but in my scenario, a1 is an array and a2 is a sym, so it can't implicitly convert
<zenspider>
I think the code is just fine the way it stands
<pilne>
so with some googling today, i think that i am capable of "starting off" a browser-based game/ai thingy using sinatra and a few other gems, and a lot easier than i thought.
ramfjord has joined #ruby
<pilne>
almost easier than trying to make a deployable binary >.<
<zenspider>
we don't have many functional (non-mutative) methods to create new arrays
<ytti>
pgib, you want #push which does not modify?
<pilne>
needless to say i'm massively stoked regardless :)
<zenspider>
pilne: cool
<pgib>
well, push and << seem to modify it... at least as far as frozen arrays' impl is concerned