<havenwood>
Ninjatarq: Fedora and FreeBSD both have nice, up-to-date Ruby packages.
<Ninjatarq>
ah okay
jonr22 has joined #ruby
ethercable has quit [Read error: Connection reset by peer]
<jhass>
there's no real reason why a distribution would be good for ruby dev, some only are bad because of notoriously outdated, er, "stable" packages
drkyro has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<havenwood>
Ninjatarq: OS X is one of the BSDs, a branch off of FreeBSD.
<jhass>
FreeBSD Ruby community is smaller though, same issue as with windows, nobody really bothers to test their gems there
<havenwood>
jhass: but unlike Windows, the gems work on FreeBSD ;P
ethercable has joined #ruby
<jhass>
most of them, but not all
<Ninjatarq>
havenwood: yes i know
reinaldob has joined #ruby
<havenwood>
jhass: any particular you can think of? just because of lack of gnu tools i assume?
<Ninjatarq>
jhass: thanks :)
<havenwood>
gnu tool specific options*
<jhass>
iirc particular examples where ffi and celluloid
<jhass>
both work in their most recent version
<havenwood>
gotcha, issues
<jhass>
so it does get fixed, but it needed user reports
<rpag>
Ninjatarq, i choose fedora because it doesn't take much work to maintain, i don't want to spend my time maintaining a operating system but just using it. its no better than any other distro for ruby imo.
bezruki has joined #ruby
<havenwood>
jhass: i guess that wont change unless FreeBSD gets more popular
<jhass>
yeah
jonr22 has quit [Ping timeout: 264 seconds]
<ethercable>
can I speed up my ruby installation?
<Ninjatarq>
thanks for helping folks, i haven't done much with linux lately but free laptop, heh!
<jhass>
time they do their systemd variant :P
<rpag>
havenwood, freebsd is annoying, i couldnt get flash setup without installing an insecure port
<rpag>
flash is something i want to work on my main box
<ethercable>
my ruby is far too slow
<ethercable>
I want to make it faster
adriancb has quit [Remote host closed the connection]
<havenwood>
rpag: i just *want* it to work, but yeah fedora is really nice
<jhass>
ethercable: use crystal :P
<ethercable>
I tried jruby, even this new jruby9000 and jruby9000+graal and they were even slower on my system than normal mri ruby.
<ethercable>
jhass: is crystal a ruby implementation?
<jhass>
no
<havenwood>
rpag: i don't use it as my desktop though
<ethercable>
jhass: Can I compile ruby programs to c?
<chrisseaton>
ethercable: did you run it for a long-running application? JRuby is a bit slower to start, but runs faster after a warmup period.
<havenwood>
rpag: i'm usually on OS X for desktop
reinaldob has quit [Ping timeout: 264 seconds]
renderful has joined #ruby
<havenwood>
rpag: depends
<jhass>
ethercable: that's translating, not compiling
<havenwood>
rpag: i can never decide
<rpag>
havenwood, heh, i'm running fedora on a macbook :)
<ethercable>
chrisseaton: no, used for a tool which runs and then exits.
<havenwood>
rpag: nice
<ethercable>
chrisseaton: I took the warm-up time into account but it is much slower during execution than mri ruby.
<chrisseaton>
ethercable: unless the program is running for several seconds it won't warm up
AlexRussia has quit [Quit: WeeChat 1.1-dev]
tastycode has quit [Quit: tastycode]
AlexRussia has joined #ruby
<jhass>
ethercable: do you use any gems in your program?
<ethercable>
chrisseaton: the program in questions runs about 1 to 2 minutes until it exits
<ethercable>
jhass: yes, many gems
<ethercable>
but dependencies were all satisfied on the other implementations
<jhass>
that's why startup is slow
jbueza has joined #ruby
commmmodo has joined #ruby
<benzrf>
chriss eaton
<ethercable>
jhass: those gems are needed, can I flatten them or speed up their import?
<jhass>
why do you need that program to be fast?
<chrisseaton>
ethercable: it still might not warm up even after a minute depending on what it does - this is the definition of warmed up that I use https://github.com/jruby/bench9000#warmup
renderful has quit [Ping timeout: 264 seconds]
<bezruki>
hey guys, is there still a channel for rails? tried #rails & #rubyonrails - no luck
jimbach has quit [Remote host closed the connection]
<rpag>
#rubyonrails is the channel, you need a registered and identified nick though
<ethercable>
jhass: it is some kind of compiler/transpiler, it is 3rd party.
<jhass>
bezruki: #rubyonrails is right, you need to be identified with NickServ, /msg NickServ help
<jhass>
oh, too slow
<bezruki>
ahh! thank you :)
commmmodo has quit [Remote host closed the connection]
<bezruki>
they don't want some random bozos - that's good
commmmodo has joined #ruby
<ethercable>
chrisseaton: so I have to re-run the program until there is no speed increase relative to its previous runs?
<ethercable>
chrisseaton: hm, this warm up cycling would take quite time
nkumari has quit [Remote host closed the connection]
commmmodo has quit [Client Quit]
<jhass>
ethercable: you could look at integrating an application preloader like spork
<chrisseaton>
ethercable: well this only applies to benchmarks - doing it on full applications is more tricky - I just say it so that if you really want to see if JRuby or Rubinius or something are faster than MRI, this is the way to do it
commmmodo has joined #ruby
<ethercable>
jhass: so spork would hold it in memory until next run?
<jhass>
basically, yeah
<jhass>
it most likely will require some code modifications though
thsig has joined #ruby
kiyote23 has quit [Remote host closed the connection]
<ethercable>
jhass: oh
<ethercable>
jhass: as it is 3rd party I would try to avoid modifications on it
sdwrage has quit [Quit: This computer has gone to sleep]
commmmodo has quit [Remote host closed the connection]
commmmodo has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
<jhass>
spork is meant for rspec/cucumber suites, I'm actually more talking about the concept
kiyote23 has joined #ruby
soulcake has quit [Ping timeout: 260 seconds]
Rydekull has quit [Ping timeout: 258 seconds]
commmmodo has quit [Client Quit]
commmmodo has joined #ruby
startupality has joined #ruby
kiyote23 has quit [Remote host closed the connection]
klmlfl has quit [Remote host closed the connection]
Rydekull has joined #ruby
Takle has quit [Remote host closed the connection]
<ethercable>
oh
<ethercable>
jhass: So I would like a way speeding it up which does its magic on ruby level while not changing code
<jhass>
I think you stated that multiple times by now
jbueza has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
if anybody knew anything, they would've responded
siwica1 has quit [Ping timeout: 240 seconds]
Photism has quit [Quit: Leaving]
<jhass>
what's your ruby version btw?
monsieurp has quit [Quit: Lost terminal]
<ethercable>
jhass: 2.1.2
<ethercable>
jhass: hm, can I profile it to find out where the bottleneck is?
<jhass>
5 seconds is not a huge factor if your call takes several minutes as you say
Spleeze has quit [Ping timeout: 244 seconds]
toretore has quit [Quit: This computer has gone to sleep]
<ethercable>
without profiling it takes now about 78.544s
<shevy>
5 seconds is like falling asleep just briefly in the bathroom
<shevy>
you made your code faster by profiling?
ghr has quit [Ping timeout: 272 seconds]
adriancb has joined #ruby
Spleeze has joined #ruby
<ethercable>
hm, I rerun the profile right now
bracky has joined #ruby
<despai>
hello. I have a ListItem model which has a parent_id which refers to another ListItem. I need to find the list_id but this list_id lives on the first ListItems of a list. anyone know how can I build this query using activerecord?
<despai>
so List > ListItem > ListItem > ListItem
<despai>
from the last listitem I should be able to retrieve the list_id
<shevy>
sounds like rails
<bracky>
ask on #RubyOnRails
<despai>
im not using rails
<commmmodo>
ActiveRecord is covered on #RubyOnRails
<waxjar>
that was a very confusing sentence
<shevy>
:)
<ethercable>
so with rprof it takes hell of a time
<ethercable>
ahh, tick tock
sailias has quit [Quit: Leaving.]
<ethercable>
oh crystal ruby is cool
<ethercable>
could I simply let it run over the bundle (vendor) directory and it will make a nice executable from it?
<rpag>
crystal isn't ruby
<ethercable>
but it can use ruby code?
<rpag>
nah, its just implemented to be very like ruby but its a different language
sski has joined #ruby
sdwrage has joined #ruby
<ethercable>
oh
<ethercable>
ok, one thing I could try is to put the whole ruby installation into a ram fs
centrx has quit [Read error: Connection reset by peer]
nfk has quit [Quit: yawn]
centrx has joined #ruby
startupality has quit [Quit: startupality]
jottr_ has quit [Ping timeout: 265 seconds]
<waxjar>
what is your program doing that it's taking so long?
<ethercable>
the sass dsl is quite nice, the implementation of it slow
apoorvparijat has joined #ruby
Takle has joined #ruby
<ethercable>
they are reimplementing it in c (libsass), but it doesn't support everything for a migration to it.
mary5030 has joined #ruby
<zenspider>
@tenderlove and I were talking about how crazy the impl of haml and sass were. there's some lightweight alternative but I don't remember the name
<zenspider>
I think the haml side was slim
<zenspider>
dunno about sass
mloveless has joined #ruby
<ethercable>
there is no alternative with the same features
<zenspider>
better make one then, because that profile dump is _bullshit_
kireevco has quit [Quit: Leaving.]
pen has joined #ruby
<jhass>
zenspider: Class#new, not Class.new
jimbach has joined #ruby
Takle has quit [Ping timeout: 250 seconds]
apoorvparijat has quit [Ping timeout: 272 seconds]
<jhass>
that's creating instances, not new anonymous classes
thsig has quit [Ping timeout: 240 seconds]
mkaesz has joined #ruby
<zenspider>
huh. that's different from what it used to be
nerdy has quit [Quit: Computer has gone to sleep.]
<zenspider>
so now you can't easily tell the diff between: ruby -rprofile -e '10_000.times do Class.new end' and ruby -rprofile -e '10_000.times do Object.new end'
<zenspider>
that seems wrong imo. 1.8 had better output iirc
<jhass>
yeah, thanks tracepoint
<zenspider>
that shouldn't be on tracepoint, that should be on profiler not looking at self
<jhass>
well, you can track Class#initialize I guess
<zenspider>
yeah, but that's still prolly gonna be at the impl level, not the instance's class level
<jhass>
run your own example
<zenspider>
luckily we have better object creation profiling now
<jhass>
pretty obvious
<zenspider>
yes, unless you have many subclasses htat don't override initialize
<jhass>
mh, right
<zenspider>
anyhow, I still posit that sass needs lightweight competition
<jhass>
let's do one in crystal! :P
Guest1882 has quit [K-Lined]
mkaesz has quit [Ping timeout: 264 seconds]
kiyote23 has joined #ruby
beef-wellington has quit [Ping timeout: 272 seconds]
kiyote23 has quit [Ping timeout: 256 seconds]
arescorpio has joined #ruby
<jhass>
wait, actually if you don't define your own initialize you get BasicObject#initialize, not Class#initialize
ghr has joined #ruby
pen has quit [Read error: Connection timed out]
<apeiros>
zenspider: sass was probably less
pen has joined #ruby
dcunit3d has joined #ruby
thsig has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
tatsuo has quit [Remote host closed the connection]
freerobby has joined #ruby
thsig_ has quit [Ping timeout: 272 seconds]
pen has quit [Ping timeout: 255 seconds]
n1lo_ has joined #ruby
pen has joined #ruby
n1lo has quit [Ping timeout: 250 seconds]
linojon_ has joined #ruby
KC9YDN-2 has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
KC9YDN-2 has quit [Client Quit]
linojon has quit [Ping timeout: 256 seconds]
linojon_ is now known as linojon
patrick99e99 has quit [Ping timeout: 265 seconds]
pencilcheck has joined #ruby
pen has quit [Ping timeout: 245 seconds]
rockdon has quit [Ping timeout: 258 seconds]
KC9YDN has quit [Ping timeout: 258 seconds]
mary5030 has joined #ruby
pen has joined #ruby
Avahey has quit [Quit: Connection closed for inactivity]
jottr_ has joined #ruby
<ethercable>
less? you mean the other preprocessor?
<mexiwithacan>
The error is: NoMethodError (undefined method `new' for Nori:Module)
chabier has quit [Remote host closed the connection]
davedev24_ has joined #ruby
<felltir>
Nori.new works in IRB, you say?
Akagi201 has quit [Ping timeout: 255 seconds]
n1lo_ has joined #ruby
pencilcheck has quit []
patrick99e99 has quit [Ping timeout: 258 seconds]
<felltir>
mexiwithacan: could you tell me what Nori.class is in IRB?
<mexiwithacan>
felltir, yes, please 1 moment
Joufflu has quit [Quit: Leaving]
_aeris_ has quit [Ping timeout: 250 seconds]
<Areessell>
It "fails". How?
<mexiwithacan>
felltir, I executed `Nori.class` in irb and the output came back just "Class"
_aeris_ has joined #ruby
<felltir>
Yep, okay
<mexiwithacan>
Areessell, the error I get is: NoMethodError (undefined method `new' for Nori:Module)
boombadaroomba has joined #ruby
jonr22 has quit [Remote host closed the connection]
<felltir>
mexiwithacan: that other gem library: what version of Nori is it using?
Joufflu has joined #ruby
<felltir>
because in IRB you have it as a Class, but in there it's a Module
<mexiwithacan>
felltir, I'm not sure, actually, because Nori is implicitly included through another dependency, Savon
<felltir>
and the changelog has: Refactoring: Changed the Nori module to a class. This might cause problems if you included the Nori module somewhere in your application. This use case was removed for overall simplicity.
<mexiwithacan>
I can check the Savon gem to see what version it's calling for
jonr22 has joined #ruby
<felltir>
So what I think is likely is that you're using a Nori version < 2 in your other gem library, but irb is using ~> 2.0
<felltir>
does that make sense?
jonr2219 has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
<mexiwithacan>
felltir, thank you for the tip! Yes, it makes sense
<mexiwithacan>
I guess does that mean I need to specify the same version of nori in my own gem?
boombadaroomba has quit [Ping timeout: 272 seconds]
<felltir>
Your gem needs to specify that it needs Nori at 2.0.0 or up
jottr_ has joined #ruby
__future__1 has joined #ruby
jonr2219 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
__future__ has quit [Read error: Connection reset by peer]
<felltir>
(as that's what it seems to need)
josephndenton has quit [Ping timeout: 240 seconds]
<felltir>
hope that helps, mexiwithacan!
<mexiwithacan>
Thanks, felltir, yes that probably helps a lot. I'm going to do some more digging. I assume I can't specify one version for my gem and let Savon keep using the older version?
yeticry has quit [Ping timeout: 245 seconds]
yeticry has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
<felltir>
Not if they're operating in the same place, no. But you may be able to update Savon. The latest version relies on nori ~> 2.4 anyhow :)
sski has quit [Remote host closed the connection]
sski has joined #ruby
jonr2219 has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
jottr_ has quit [Ping timeout: 256 seconds]
agjacome has quit [Quit: leaving]
dain has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Tranquility has joined #ruby
dain has left #ruby [#ruby]
dain has joined #ruby
Insti has quit [Max SendQ exceeded]
arrubin has quit []
<mexiwithacan>
felltir, thank you again for the insightful tip! I dug into the older version of the Nori gem, and I ended up figuring out how to invoke the desired method in that version
jonr2219 has quit [Remote host closed the connection]
<felltir>
Not a problem :)
<mexiwithacan>
Code is working right now, and I'm trying to modify this custom gem (I'm just tweaking someone else's work) as little as possible
jonr22 has joined #ruby
sski has quit [Ping timeout: 256 seconds]
<felltir>
Ahh I understand :)
<felltir>
well, good luck!
apoorvparijat has joined #ruby
mkaesz has joined #ruby
mkaesz has quit [Remote host closed the connection]
mkaesz has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
jonr2219 has joined #ruby
dain has left #ruby [#ruby]
jonr2219 has quit [Remote host closed the connection]
klmlfl has quit [Remote host closed the connection]
jonr22 has joined #ruby
rippa has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
mkaesz has quit [Ping timeout: 272 seconds]
dts has quit [Ping timeout: 272 seconds]
dain has joined #ruby
jonr2219 has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
timonv_ has joined #ruby
sevvie has quit [Quit: leaving]
jonr2219 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
robertt_dex has quit [Remote host closed the connection]
ghr has joined #ruby
sevenseacat has quit [Remote host closed the connection]
posixpascal has joined #ruby
jonr2219 has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
kiyote23 has joined #ruby
gmas has joined #ruby
jdj_dk has quit [Remote host closed the connection]
uber_hulk has joined #ruby
The has quit [Quit: Leaving]
jonr2219 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
RyanV has joined #ruby
ghr has quit [Ping timeout: 256 seconds]
jonr22 has quit [Read error: Connection reset by peer]
jonr2219 has joined #ruby
fedexo has quit [Ping timeout: 245 seconds]
<RyanV>
does anyone know if any libraries that will do the reverse of optparse? ie take a hash of options and convert them to usable command line options.
Akagi201 has joined #ruby
commmmodo has quit [Quit: commmmodo]
<zenspider>
map & join?
jonr2219 has quit [Remote host closed the connection]
<felltir>
RyanV: so you mean specify the options available, and it will handle turning --option into them?
kiyote23 has quit [Ping timeout: 255 seconds]
<RyanV>
yes
jonr22 has joined #ruby
<felltir>
I'm afraid I don't, but it's an interesting idea
jonr22 has quit [Read error: Connection reset by peer]
ndrei has quit [Quit: Lost terminal]
ndrei has joined #ruby
ndrei has quit [Client Quit]
ndrei has joined #ruby
jonr2219 has quit [Read error: Connection reset by peer]
ndrei has quit [Client Quit]
jonr22 has joined #ruby
kiyote23 has quit [Ping timeout: 264 seconds]
adamski2600 has joined #ruby
<lxsameer>
hey guys, when I use "return" inside a block which use a yielded value, the code after yield won't run, is there any solution to make sure that that code run ?
mwsb has joined #ruby
adriancb has joined #ruby
<felltir>
Can you use a lambda?
codecop has joined #ruby
<felltir>
(lambda's return like you want, procs return the way you are currently experiencing)
ferr has joined #ruby
kyoshero has quit [Read error: Connection reset by peer]
marcdel_ has quit []
<lxsameer>
felltir: no :( , but is there any finally block or something like that?
adriancb has quit [Ping timeout: 264 seconds]
<felltir>
you can perhaps use break, or next then :) I think next is what you want
jonr22 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
oleo__ has quit [Quit: Verlassend]
<lxsameer>
felltir: thanks
<felltir>
did that do what you needed? :)
mwsb has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
sevenseacat has joined #ruby
chu has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
camilasan has quit [Quit: No Ping reply in 180 seconds.]
<lxsameer>
felltir: unfortunately no
camilasan has joined #ruby
<felltir>
That's a shame. Anything else I can do to help?
timonv_ has quit [Remote host closed the connection]
jottr_ has joined #ruby
spider-mario has joined #ruby
<lxsameer>
felltir: I'm gonna use "ensure" with my method
sj has quit [Ping timeout: 245 seconds]
<felltir>
Fair enough! :)
jdj_dk has quit [Read error: Connection reset by peer]
RyanV has quit [Quit: (null)]
uber_hulk has quit [Ping timeout: 240 seconds]
Takle_ has quit [Read error: No route to host]
jottr_ has quit [Ping timeout: 250 seconds]
Takle has joined #ruby
goodenough has joined #ruby
Areessell has quit [Ping timeout: 240 seconds]
quazimodo has quit [Quit: leaving]
bluOxigen has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
timonv_ has joined #ruby
max96at|off is now known as max96at
Areessell has joined #ruby
timonv_ has quit [Remote host closed the connection]
jonr22 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
gmas has quit [Ping timeout: 264 seconds]
oleo has joined #ruby
swartwulf has quit [Remote host closed the connection]
<catphish>
i'm running a multithreaded rack app and it seems to be leaking memory horribly, i haven't done anything manually with garbage collection, the only unusual thing about the app(afaik) is that it's using gdbm, is there anywhere obvious i can start with tracking it down?
josephndenton has joined #ruby
<apeiros>
stub gdbm out and see whether it still leaks
bigmac has joined #ruby
Takle has quit [Remote host closed the connection]
anaeem1_ has joined #ruby
jimbach has joined #ruby
<catphish>
apeiros: thanks, i was considering replacing gdbm with memcache anyway, so will try that first
uber_hulk has joined #ruby
josephndenton has quit [Ping timeout: 245 seconds]
Jake232 has joined #ruby
DLSteve has quit [Quit: Leaving]
Soda has joined #ruby
Takle has joined #ruby
jimbach has quit [Ping timeout: 272 seconds]
goodenough has quit [Remote host closed the connection]
terlar has quit [Ping timeout: 264 seconds]
timonv_ has quit [Remote host closed the connection]
patrick99e99 has joined #ruby
iaj has quit [Quit: leaving]
gccostabr has quit [Quit: ZZZzzz…]
Alina-malina has quit [Ping timeout: 244 seconds]
AlexRussia has joined #ruby
AlexRussia has quit [Ping timeout: 272 seconds]
timonv_ has joined #ruby
nastri has quit [Read error: Connection reset by peer]
tgandrews has quit [Quit: This computer has gone to sleep]
iaj has joined #ruby
Alina-malina has joined #ruby
ghr has joined #ruby
ptrrr has quit [Quit: ptrrr]
anaeem1_ has quit [Remote host closed the connection]
anaeem1 has joined #ruby
timonv_ has quit [Remote host closed the connection]
kaspertidemann has joined #ruby
jdj_dk has quit [Ping timeout: 258 seconds]
wsmoak has quit [Quit: wsmoak]
wsmoak has joined #ruby
ghr has quit [Ping timeout: 264 seconds]
felltir has quit []
DLSteve has joined #ruby
iamninja has joined #ruby
anaeem1 has quit [Ping timeout: 272 seconds]
kiyote23 has joined #ruby
Nahra has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
charliesome has quit [Ping timeout: 240 seconds]
Mia has quit [Read error: Connection reset by peer]
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
Axy has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
timonv_ has joined #ruby
jottr_ has joined #ruby
timonv_ has quit [Remote host closed the connection]
kiyote23 has quit [Ping timeout: 250 seconds]
Abhijit has quit [Read error: Connection reset by peer]
Abhijit has joined #ruby
Abhijit has quit [Max SendQ exceeded]
Abhijit has joined #ruby
<apeiros>
oh dear, why do I still wear my wizard hat?
AlexRussia has joined #ruby
jottr_ has quit [Ping timeout: 252 seconds]
m8 has joined #ruby
timonv_ has joined #ruby
Abhijit has quit [Max SendQ exceeded]
dts has quit [Ping timeout: 255 seconds]
Abhijit has joined #ruby
timonv_ has quit [Remote host closed the connection]
tgandrews has joined #ruby
AlexRussia has quit [Ping timeout: 240 seconds]
_ixti_ has quit [Ping timeout: 245 seconds]
AlexRussia has joined #ruby
JCii8__ has joined #ruby
AlexRussia has quit [Ping timeout: 240 seconds]
iaj has quit [Ping timeout: 240 seconds]
jdj_dk has joined #ruby
jonr22 has joined #ruby
iaj has joined #ruby
AlexRussia has joined #ruby
apoorvparijat has left #ruby [#ruby]
apoorvparijat has joined #ruby
uber_hulk has quit [Quit: leaving]
jonr22 has quit [Ping timeout: 258 seconds]
BlackGear has joined #ruby
ikaros has quit [Quit: Ex-Chat]
AlexRussia has quit [Ping timeout: 264 seconds]
Seich has quit [Ping timeout: 258 seconds]
TDJACR has quit [Ping timeout: 258 seconds]
_ixti_ has joined #ruby
snath has quit [Ping timeout: 256 seconds]
commmmodo has joined #ruby
Seich has joined #ruby
antgel has joined #ruby
lemur_ has quit [Remote host closed the connection]
lemur has joined #ruby
pibanz has joined #ruby
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Takle has quit [Remote host closed the connection]
`ph8 has quit [Changing host]
`ph8 has joined #ruby
pibanz1 has joined #ruby
uber_hulk has joined #ruby
pibanz1 has left #ruby [#ruby]
reinaldob has joined #ruby
commmmodo has quit [Ping timeout: 245 seconds]
jottr_ has joined #ruby
terlar has joined #ruby
cajone has quit [Remote host closed the connection]
TDJACR has joined #ruby
lemur has quit [Ping timeout: 258 seconds]
pibanz has quit [Ping timeout: 255 seconds]
kaspertidemann has quit []
AlexRussia has joined #ruby
cajone has joined #ruby
Joufflu has quit [Read error: Connection reset by peer]
Takle has joined #ruby
chipotle has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
camilasann has joined #ruby
lkba has joined #ruby
TDJACR has quit [Excess Flood]
reinaldob has quit [Remote host closed the connection]
rocknrollmarc has joined #ruby
jottr_ has quit [Ping timeout: 240 seconds]
SCHAAP137 has joined #ruby
dcunit3d has joined #ruby
TDJACR has joined #ruby
AlexRussia has quit [Ping timeout: 245 seconds]
ptrrr has joined #ruby
AlexRussia has joined #ruby
tatsuo has joined #ruby
ghr has joined #ruby
DLSteve has quit [Read error: Connection reset by peer]
uber_hulk has quit [Ping timeout: 256 seconds]
cajone has quit [Remote host closed the connection]
dcunit3d has quit [Ping timeout: 245 seconds]
cajone has joined #ruby
cajone has quit [Remote host closed the connection]
NoNMaDDeN has joined #ruby
ghr has quit [Ping timeout: 244 seconds]
cajone has joined #ruby
AlexRussia has quit [Ping timeout: 265 seconds]
DLSteve has joined #ruby
fabrice31 has joined #ruby
vyorkin has quit [Ping timeout: 264 seconds]
fabrice31 has quit [Ping timeout: 244 seconds]
AlexRussia has joined #ruby
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rocknrollmarc has quit [Ping timeout: 255 seconds]
Takle has quit [Remote host closed the connection]
WormDr1nk has quit [Ping timeout: 258 seconds]
AlexRussia has quit [Ping timeout: 244 seconds]
uber_hulk has joined #ruby
jimbach has joined #ruby
tgandrews has quit [Quit: This computer has gone to sleep]
antgel has quit [Ping timeout: 258 seconds]
timonv_ has joined #ruby
inkblots has joined #ruby
jimbach has quit [Ping timeout: 258 seconds]
moritzs has joined #ruby
iaj has quit [Ping timeout: 264 seconds]
AlexRussia has joined #ruby
atmosx has joined #ruby
JCii8 has joined #ruby
nrsk has joined #ruby
arup_r1 has joined #ruby
JCii8__ has quit [Ping timeout: 240 seconds]
tgandrews has joined #ruby
AlexRussia has quit [Ping timeout: 264 seconds]
Takle has joined #ruby
timonv_ has quit [Remote host closed the connection]
timonv^ has quit [Remote host closed the connection]
xjiujiu has joined #ruby
jheg has joined #ruby
davidhq has quit [Read error: Connection reset by peer]
davidhq_ has joined #ruby
patrick99e99 has quit [Ping timeout: 240 seconds]
emmesswhy has quit [Quit: This computer has gone to sleep]
reinaldob has joined #ruby
ptrrr has quit [Quit: ptrrr]
yfeldblu_ has quit [Remote host closed the connection]
Narzew has joined #ruby
Narzew_ has joined #ruby
kirun has joined #ruby
timonv_ has joined #ruby
Narzew_ has quit [Remote host closed the connection]
Narzew has quit [Remote host closed the connection]
tgandrews has quit [Quit: Leaving]
Narzew has joined #ruby
timonv_ has quit [Remote host closed the connection]
reinaldob has quit [Ping timeout: 245 seconds]
ghr has joined #ruby
Takle has quit [Read error: Connection reset by peer]
Takle has joined #ruby
BlackGear has quit [Quit: ZZZzzz…]
ghr has quit [Ping timeout: 256 seconds]
banister has joined #ruby
<scottymeuk>
Hey, does anyone know why "require" would not work for a gem specified in Gemfile with git: "blah"
<scottymeuk>
Or it could be requiring an older version
<apeiros>
"would not work" is not descriptive.
<apoorvparijat>
Is it wise to build a distributed web crawler on top of selenium? Will it be scalable?
<apeiros>
apoorvparijat: yes. no. maybe. depends on your specifics. scalability depends on how you build the crawler, not what library you use.
<apeiros>
also remember: scalability != performance.
chu has joined #ruby
<apoorvparijat>
apeiros: Okay. I already have an implementation in production. It repeatedly crawls search engines for millions of keywords. It's primary function is to open a search engine page, fill in the keyword and press return. Then go page by page parsing the results.
<apoorvparijat>
Well, it is supposed to do millions but I haven't tested it yet. The problem I'm facing is this - selenium takes loooong to get elements sometime.
<apeiros>
"selenium takes loooong" this is performance. not scalability.
<apoorvparijat>
Okay. Yes. My bad.
<apeiros>
scalability means: "can I throw more hardware at the problem to process more per time"
<apoorvparijat>
So yes, considering performance, is it wise?
<apeiros>
and since crawling is *usually* highly parallelizable, it's almost always scalable.
<apeiros>
again, depends on your specifics.
<apeiros>
do you need something which only selenium can give you?
<scottymeuk>
Hey apeiros, sorry. So basically I am using https://github.com/ekosz/Plex-Ruby. They have not tagged a released in a little while, and I need stuff that is in master. I have "require 'plex-ruby'" at the top of my file, and am using "Plex.configure". However, i am getting undefined method configure, unless i use "ruby -Ilib" when calling it
<apoorvparijat>
Yes. My crawler needs to 'Google Search' for a keyword imitating a human. This needs to render JS and make AJAX calls.
<scottymeuk>
i have ./bin/something, which inturn calls a method in ./lib/something.rb
<apeiros>
scottymeuk: then you're either not running it bundled or do something else wrong. the symptom means that the gem is not in the load path.
leitz has joined #ruby
chabier has joined #ruby
<scottymeuk>
apeiros: thank you, I am sure i will work it out :) thanks for your help
shazaum has joined #ruby
<apeiros>
apoorvparijat: then I guess you've got your answer. the only subsequent question now is: is selenium the only one which can give you that, or are there more performant solutions?
<apeiros>
afaik poltergeist is relatively fast.
jonr22 has joined #ruby
<apeiros>
scottymeuk: you say using `ruby -Ilib` works, you also say you have a Gemfile. this information is conflicting. former implies you're in the Plex-Ruby project directory. later implies you have a separate project. what now?
<scottymeuk>
Yeah sorry, that was me just experimenting with different stuff. Got it worked out. If i run "bundle exec ./bin/something" it works
<scottymeuk>
i was running "./bin/something" before
<apeiros>
scottymeuk: look, if you want help, it is detrimental if you're providing inconsistent information.
apeiros_ has quit [Read error: Connection reset by peer]
<apeiros>
also really annoying, because we have to work out what the differences are between what you say and what you actually do.
<scottymeuk>
And I would not provide inconsistent information if i was fully aware of how that worked
apeiros_ has joined #ruby
<apeiros>
scottymeuk: talking once about stuff you run from your project and once from within ruby-plex - NOT consistent. and doesn't need awareness to figure that.
<apoorvparijat>
Yep. I need something that makes HTTP request, parses the HTML, executes the required JS (and manipulates the DOM as required) and makes XHR requests. Is there anything other than a web driver controlling a browser do that?
<apoorvparijat>
apeiros: ^^
chabier has quit [Remote host closed the connection]
<scottymeuk>
I never said i ran anything from within ruby-plex project
<apeiros>
apoorvparijat: as said, I think poltergeist is quite fast. but I don't know which is the fastest.
rkalfane has joined #ruby
<apeiros>
scottymeuk: ruby -Ilib working implies you did.
insulator has joined #ruby
<scottymeuk>
That was on my own project. That was why i was confused why it worked. I ran "ruby -Ilib ./bin/something"
<apeiros>
…
matt_d has quit [Quit: C'ya]
chabier has joined #ruby
jonr22 has quit [Ping timeout: 255 seconds]
<apeiros>
ok, not willing to go down that rabbit hole.
<apoorvparijat>
Okay apeiros, will look into it. Thank you.
ChoiKyuSang has joined #ruby
yfeldblum has joined #ruby
yfeldblum has quit [Ping timeout: 264 seconds]
Akuma has quit [Ping timeout: 245 seconds]
sailias has joined #ruby
<catphish>
can anyone recommend a way to identity memory leaks?
pandaant has joined #ruby
<catphish>
specifically i'm using rack, so it was my hope that everything would be unreferenced after every request, but that is clearly not quite working
chabier has quit [Remote host closed the connection]
DLSteve has quit [Read error: Connection reset by peer]
anaeem1 has joined #ruby
supersym has joined #ruby
Darryl_ has quit [Quit: Connection closed for inactivity]
uber_hulk has joined #ruby
shazaum has quit [Quit: This computer has gone to sleep]
insulator has quit [Quit: insulator]
jottr_ has joined #ruby
dangerousdave has joined #ruby
amarraja has joined #ruby
Megtastique has joined #ruby
charliesome has quit [Quit: zzz]
commmmodo has joined #ruby
raja has joined #ruby
dangerousdave has quit [Ping timeout: 252 seconds]
commmmodo has quit [Ping timeout: 250 seconds]
Rampages has joined #ruby
anaeem1 has quit [Remote host closed the connection]
shazaum has joined #ruby
anaeem1 has joined #ruby
NoNMaDDeN has quit [Remote host closed the connection]
User458764 has quit [Ping timeout: 258 seconds]
<leitz>
How do you reference a SQLite3::ReultSet if there's just one entry? I'm trying to avoig an result.each type of thing.
<leitz>
ResultSet
posixpascal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 265 seconds]
<jhass>
leitz: doesn't it include Enumerable? try .first
DLSteve has joined #ruby
dcunit3d has joined #ruby
<leitz>
jhass, as usual, you are THE MAN.
<leitz>
Assuming, of course...
fabrice31 has joined #ruby
AlexRussia has quit [Ping timeout: 250 seconds]
AlexRussia has joined #ruby
kedare has quit [Read error: Connection reset by peer]
ghr has joined #ruby
dcunit3d has quit [Ping timeout: 256 seconds]
kiyote23 has joined #ruby
fabrice31 has quit [Ping timeout: 252 seconds]
ghr has quit [Ping timeout: 272 seconds]
freerobby has joined #ruby
kiyote23 has quit [Ping timeout: 252 seconds]
jimbach has joined #ruby
<catphish>
well thats interesting, core dumped my ruby, all the memory i can find is empty, guess i'm doing it wrong
chabier has quit [Remote host closed the connection]
<shevy>
ewww bundler
arup_r has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
Darryl_ has joined #ruby
commmmodo has joined #ruby
<user_02>
shadeslayer: meaning? :)
jerius has quit []
<shadeslayer>
user_02: the error seems fairly obvious btw
<shadeslayer>
ruby_21 is not a valid symbol
shazaum has quit [Quit: This computer has gone to sleep]
<user_02>
is this inside Gemfile file?
DLSteve has joined #ruby
<user_02>
shadeslayer: i am trying to install openproject.org
<user_02>
shevy: ?
chabier has joined #ruby
<shadeslayer>
*shrug* not a clue about bundler
<shadeslayer>
but just from reading the error I can tell that it's using a non existent symbol
<shadeslayer>
so it seems like there's a mismatch between what openproject.org is using and what you have installed
DLSteve has quit [Read error: Connection reset by peer]
<user_02>
i have already installed ruby stuff while installing redmine.
<user_02>
cc shadeslayer
despai has quit [Quit: This computer has gone to sleep]
<shadeslayer>
I really can't advise more, I've never used bundler
cephalostrum has quit [Ping timeout: 250 seconds]
ekinmur has joined #ruby
<shadeslayer>
user_02: quick google says your bundler is out of date
sdwrage has quit [Quit: This computer has gone to sleep]
antgel has joined #ruby
fabrice31 has joined #ruby
doki-wor` has quit [Ping timeout: 258 seconds]
sdwrage has joined #ruby
<user_02>
shadeslayer: i am doing bundler update now. this is my apache conf file. http://pastie.org/9750640
<shadeslayer>
what does apache conf have to do anything with the error
<shadeslayer>
makes no sense at all :p
emmesswhy has quit [Quit: This computer has gone to sleep]
<user_02>
shadeslayer: hmm :/ i thought because openproject auto install installs openproject on the / dir and i want on the manual install to set http://IP/openproject as the home of the project.
* Areessell
really starts to wonder about some developers out there
supersym has quit [Ping timeout: 272 seconds]
<shadeslayer>
user_02: so ... that's a apache question, not a ruby one
chabier has quit [Remote host closed the connection]
<shadeslayer>
I usually use nginx, and just google whenever I have to modify nginx configs
ekinmur has quit [Ping timeout: 244 seconds]
<shadeslayer>
and then promptly forget about it ^_^
* Areessell
no longer has to wonder
chabier has joined #ruby
chabier has quit [Remote host closed the connection]
fabrice31 has quit [Ping timeout: 240 seconds]
cephalostrum has joined #ruby
kobain has joined #ruby
kobain has quit [Max SendQ exceeded]
chabier has joined #ruby
uber_hulk has joined #ruby
<shadeslayer>
Areessell: pft, modifyng nginx configurations is not really exciting work
rbrs has joined #ruby
<shadeslayer>
Areessell: so I usually tend to put a minimal amount of effort into it
Xeago has quit [Remote host closed the connection]
<shadeslayer>
once it works, I don't particularly care until it breaks
<Areessell>
Right well, his problem was solved by jhass as soon as he asked it. Try not giving out advice on stuff you clearly have no idea about.
<shadeslayer>
whose reply was over ~2 hours ago and was not visible to me in the backlog
dcunit3d has joined #ruby
oleo__ has joined #ruby
jimbach has joined #ruby
ptrrr has quit [Quit: ptrrr]
claudiuinberlin has joined #ruby
oleo is now known as Guest99591
Guest99591 has quit [Ping timeout: 250 seconds]
ghr has joined #ruby
adriancb has joined #ruby
dcunit3d has quit [Ping timeout: 264 seconds]
kiyote23 has quit [Remote host closed the connection]
jimbach has quit [Ping timeout: 264 seconds]
freerobby has quit [Quit: Leaving.]
njs126 has quit [Quit: Leaving]
chabier has quit [Remote host closed the connection]
despai has joined #ruby
commmmodo has quit [Quit: commmmodo]
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
beef-wellington has joined #ruby
ghr has quit [Ping timeout: 265 seconds]
commmmodo has joined #ruby
yfeldblum has joined #ruby
ChoiKyuSang has quit [Quit: Going offline, see ya! (www.adiirc.com]
kapil__ has quit [Quit: Connection closed for inactivity]
adriancb has quit [Remote host closed the connection]
adriancb has joined #ruby
yfeldblum has quit [Ping timeout: 244 seconds]
Azure has quit [Read error: Connection reset by peer]
rocknrollmarc has joined #ruby
Azure has joined #ruby
ChoiKyuSang has joined #ruby
apoorvparijat has joined #ruby
adriancb has quit [Ping timeout: 256 seconds]
apoorvparijat has left #ruby [#ruby]
oleo__ has quit [Quit: Verlassend]
enrico_gec has joined #ruby
thsig has joined #ruby
apoorvparijat has joined #ruby
Arnie25 has joined #ruby
thsig has quit [Remote host closed the connection]
Takle has quit [Remote host closed the connection]
<user_02>
somehow i managed to stop the server serving redmine and lists all files on the http://IP/redmine anyone knwos why?
Akuma has joined #ruby
<quazimodo>
so
Arnie26 has quit [Ping timeout: 256 seconds]
<quazimodo>
I'm spawning a process using PTY which only returns a pid
Xeago has joined #ruby
<quazimodo>
and I need to check up on that process's status once in a while
<quazimodo>
what gives?
phutchins has joined #ruby
<quazimodo>
portable way?
Xeago has quit [Remote host closed the connection]
<commmmodo>
what do you mean ‘check up on that process’s status”
<IceDragon>
o___O It just that I have no idea what the original post looks like, and I don't feel like editing 2000 lines of bbcode
tastycode has joined #ruby
<shevy>
lol
<shevy>
well
<shevy>
this is an example why code should be small and module whenever possible
<shevy>
erm, *modular
<Areessell>
Yeah but people used to PHP forums will have alot of users that are used to BBCode and not Markdown. And if I'm updating my forums to a newer platform, I would want to keep that functionality and not scare away my userbase ,wouldn't I?
<shevy>
you won't really need methods with 18 _ would you?
phutchins has joined #ruby
<shevy>
sounds like addicted to php :(
<Areessell>
Ugh, again... It's a protected method that doesn't need documentation and is probably only used /once/. It's proper abstraction.
<Areessell>
It's smart, trust me.
<shevy>
lol
<shevy>
so smart
<shevy>
the worship continues
<shevy>
we need this guy on IRC
<shevy>
hmm from his projects he is more of a rails guy :(
<Areessell>
Dude, If I have to do 5 operations in a single method, I break those ops out into separate protected/private methods. I would much rather see `scrape_html_data; parse_html_into_ast; convert_ast_to_objects` than `scrape; parse; convert;`
<shevy>
ok so you have a method with 2 _
<shevy>
3 _
<shevy>
and 3 _
<shevy>
that is a grand total of 8
<shevy>
that's still a bit short of 18!
timonv_ has joined #ruby
<IceDragon>
well, flock this I think I'd be better off editing it
<shevy>
hahaha
<sdwrage>
anyone here use twilio a lot?
<Areessell>
I fucking said earlier 18 was a bit much
despai has quit [Quit: This computer has gone to sleep]
Tricon has joined #ruby
<shevy>
ok I haven't skimmed over much yet but jhass is not a notorious _ user at all
<shevy>
def special_value_or_string
<shevy>
that's not much at all :(
josephndenton has joined #ruby
<IceDragon>
shevy: I gave up and the bbcode, I'll just have to skim over this and extract the data I need and rewrite the post and then email it to my comrade
fedexo has joined #ruby
<IceDragon>
s/and/on/
<Areessell>
Jokes on you, all jhass' long method names are inLowerCamelCaseToThrowYouOff
<shevy>
nah, jhass really has rather short method names from what I found so far. He also hates () in method definitions
<IceDragon>
shevy: looks like we should write a underscore profiler script :P
<shevy>
IceDragon I was thinking of doing that! but I think the dataset won't be huge
fabrice31 has quit [Ping timeout: 245 seconds]
<IceDragon>
shevy: run it against all your gems
<shevy>
jhass is not alone there, havenwood codes pretty much the same... I'm gonna look at chris2 code
<Areessell>
Wait a minute. Doesn't reek already do this?
<shevy>
wow... chris2 is even more minimalistic than jhass
<Areessell>
Gotta make the code shorter than the method name or it's pointless
m8 has quit [Quit: Sto andando via]
soulcake has quit [Quit: Quack.]
<shevy>
hmm
beilabs____ has joined #ruby
<shevy>
IceDragon does he pass arguments to his legendary 18 _ method?
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
m8 has joined #ruby
soulcake has joined #ruby
triple_b has joined #ruby
Scripore has joined #ruby
jimbach has joined #ruby
jerius has joined #ruby
jottr_ has joined #ruby
snath has joined #ruby
<havenwood>
shevy: 18 of them
<shevy>
lol
timonv_ has quit [Remote host closed the connection]
jottr_ has quit [Read error: Connection reset by peer]
jdj_dk has quit [Read error: Connection reset by peer]
<shevy>
now that would be a cool requirement ... how many _ you use determines how many arguments you must use
jottr_ has joined #ruby
jdj_dk has joined #ruby
jimbach has quit [Ping timeout: 255 seconds]
adriancb has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<IceDragon>
shevy: nope, thank god he doesn't pass any arguments :x
<arietis>
is rubinius faster than ruby 2.1 in term of requests per second?
adriancb has joined #ruby
kiyote23 has joined #ruby
<brixen>
arietis: depends on a lot of factors, like what your workload is, whether the JIT handles it well, what app server you're using, what data structures are involved
<shevy>
arietis I'd hope so! they use C++ for a reason right?
<brixen>
arietis: using Puma with threads can get you significantly higher throughput per process instance
<brixen>
arietis: but you'd have to test your app to know
<arietis>
my colleagues said ruby sucks because it's slow :)
<arietis>
they are using php +erlang
<IceDragon>
o_o;
<brixen>
arietis: you listen to everything your colleagues say? :p
<IceDragon>
says ruby sucks > uses php
* IceDragon
holds head and cries on shevy's shoulder
goodenough has joined #ruby
<brixen>
shevy: slight correction, rubinius uses machine code for a reason ;)
<shevy>
that makes it even faster then!
<brixen>
it can, if you can get the ruby crap out of the way :)
<brixen>
which is what the JIT tries to do
JCii8 has quit [Read error: Connection reset by peer]
adriancb has quit [Remote host closed the connection]
<IceDragon>
last time I used rubinius, the JIT fell flat on its face during execution
<centrx>
I thought Rubinius was written in Ruby was written in Ruby was written in Ruby
<Areessell>
Yeh, C++ is a bit slower than C =p
yfeldblum has quit [Ping timeout: 240 seconds]
<Areessell>
Most of it is
<brixen>
IceDragon: last time was when?
<IceDragon>
1 year ago
<IceDragon>
:3
<brixen>
IceDragon: uh :p
dcunit3d has joined #ruby
<brixen>
rubinius changes more in a month than MRI in a year
<brixen>
so, please do try again
<brixen>
plus, you have keyword args now
<Areessell>
So indie
<IceDragon>
hai!
* IceDragon
waddles off
toretore has joined #ruby
kiyote23 has quit [Ping timeout: 252 seconds]
psy has joined #ruby
rkalfane has quit [Read error: Connection reset by peer]
ghr has joined #ruby
rkalfane has joined #ruby
ctp has quit [Quit: I've got an 8 hour ticket to dream land. ZZZzzz…]
jonr22 has quit [Remote host closed the connection]
anaeem1 has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
<rpag>
"ruby is slow" is picked up from the 1.8 days i'm pretty sure
banister has joined #ruby
banister has quit [Max SendQ exceeded]
despai has joined #ruby
snath has quit [Ping timeout: 240 seconds]
user_02 has quit [Quit: user_02]
banister has joined #ruby
agjacome has joined #ruby
<benzrf>
its still hella slowq
<IceDragon>
rpag: I wish people would stop saying the language is slow, and say that the interpreter (at the time) was slow ;_;
jheg has joined #ruby
<shevy>
IceDragon do dragons ... waddle?!
<canton7>
some languages are never going to be fast. and indeed, their intention isn't to be fast. they aim jto be dynamic, or easy to use, or...
anaeem1 has quit [Ping timeout: 264 seconds]
<shevy>
I accept that ruby is slow because I don't need to calculate the world!
<IceDragon>
shevy: just for today :3
<havenwood>
Ruby's a lot faster at running programs than I am.
<canton7>
ruby's slow, and that's fine. I don't need to eek every last cycle out of my cpu when doing the things I use ruby for
<canton7>
when I need higher performance, I use a language that's more suited
<canton7>
right tool for the job, etc etc
<rpag>
canton7, slow compared to.. C? sure, otherwise i don't see it as slow at all
<canton7>
most other languages tbh. certainly anything compiled
<IceDragon>
ruby is slow! > WHAT ARE YOU DOING WITH IT > I'm trying to calculate the possibility that a meteor will collide with my house, given that my kitchen is out of food and my bed wasn't made > dafuq
<canton7>
but like I say - that isn't the point of ruby
<shevy>
ruby is so slow
<rpag>
performance was the point of 1.9
<shevy>
it keeps on losing against C
<IceDragon>
but, its written in C :P
<shevy>
well actually I don't entirely understand the speed argument
<shevy>
because you need to compare it with like-minded languages or? php ... perl... python ... ok and LUA!!!
<canton7>
I did make the mistake of doing some brute-forcing coursework in ruby to start with, way back when. finally gave up and re-wrote it in C# for a 1000x+ performance boost :P
jdj_dk has quit [Remote host closed the connection]
jdj_dk has joined #ruby
wookiehangover has quit [Ping timeout: 255 seconds]
rkalfane has quit [Read error: Connection reset by peer]
nkumari has joined #ruby
rkalfane has joined #ruby
adriancb has joined #ruby
<tejas-manohar>
hey what do you do when you want a ruby symbol that's a number
<tejas-manohar>
like is erb :"#{401}" equal to erb :401 or really looking at 401.html in the case of sinatra?
adriancb has quit [Remote host closed the connection]
<pontiki>
you're using a ternary operation already...
<tejas-manohar>
pontiki: yeah so the : false is simplest way to do that right?
<pontiki>
did you mean without using the ternary operator?
<quazimodo>
yeah ok
<quazimodo>
seems simple enough
klap has quit [Ping timeout: 256 seconds]
hfp_work has joined #ruby
<ericwood>
as it stands you're fine
<tejas-manohar>
pontiki: additionally, if i put Dir['lib'].each {|file| require file } in app.rb -- will that require all files in lib/* if lib folder is in the root directory of my project where app.rb is?
klap has joined #ruby
codehotter has quit [Ping timeout: 256 seconds]
ptierno has quit [Ping timeout: 256 seconds]
<havenwood>
quazimodo: session[:admin] if env['omniauth.auth']
<ericwood>
oooh that's better
adriancb has quit [Remote host closed the connection]
<tejas-manohar>
ohh thats much better havenwood
<tejas-manohar>
i was like this seems overkill lol
ptierno has joined #ruby
commmmodo has left #ruby [#ruby]
commmmodo has joined #ruby
<pontiki>
or env['omniauth.auth'] && session[:admin]
<tejas-manohar>
the if is more explicit
<pontiki>
no it's not
<tejas-manohar>
uh
<tejas-manohar>
how
<pontiki>
how is it?
beilabs________ has joined #ruby
<tejas-manohar>
it's saying return this IF this is true
<pontiki>
and?
<tejas-manohar>
easier for a noncoder to read
<ericwood>
the only thing I'm iffy on is the fact that the "if" solution relies on an implicit "nil" being returned rather than false
dcunit3d has joined #ruby
giuseppesolinas has joined #ruby
<tejas-manohar>
oh
<pontiki>
^
<tejas-manohar>
well idk what omniauth does so if your method is safer pontiki then ill go with that
<tejas-manohar>
we started to get a simpler method then we just decided to combine 3 of them
<tejas-manohar>
lololol
<tejas-manohar>
havenwood: Dir['lib'].each {|file| require_relative file } or Dir['lib/'].each {|file| require_relative file } or Dir['lib'].each {|file| require file }
<tejas-manohar>
havenwood: pretty sure the require without relative one is wrong
<tejas-manohar>
havenwood: but not sure about passing lib/ or lib like how Dir works in that regard
Akuma has joined #ruby
<havenwood>
tejas-manohar: i explicitly require each file
<apeiros>
:(
<apeiros>
this code makes me sad
<tejas-manohar>
apeiros: why?
<tejas-manohar>
i have like 5 rb files there that i needa require in the sinatra server
<toretore>
require 'whatever/filename'
giuseppesolinas has quit [Quit: This computer has gone to sleep]
<toretore>
end of discussion.
<apeiros>
Dir['lib'] -- your code should not know, nor need to know, where other code is physically located
timonv_ has quit [Remote host closed the connection]
<apeiros>
require_relative -- essentially the same as above
<ericwood>
apeiros: if you delete it the code can't hurt you anymore
wald0 has quit [Ping timeout: 245 seconds]
<tejas-manohar>
lol
<tejas-manohar>
um
<tejas-manohar>
apeiros: can you rephrase that? Dir['lib'].each {|file| require_relative file } -- which part of this will cause it to fail or which can be made simpler
<apeiros>
IMO if you have to do anything beyond `require 'identifier'` in your library code, then you failed.
<toretore>
^ +1
centrx has quit [Quit: Did gyre and gymble in ye wabe]
<toretore>
i don't remember who invented load i think it was dhh
<ericwood>
not long after, _why invented DHH and suddenly ruby was cool
ringarin has quit [Ping timeout: 256 seconds]
K999 has quit []
Pupeno has quit [Remote host closed the connection]
boombadaroomba has joined #ruby
<ericwood>
thanks, _why
jimbach has joined #ruby
<jhass>
tejas-manohar: did you read the message
arup_r has quit [Quit: Leaving.]
<tejas-manohar>
jhass: yeah but my gemfile doesnt require any rack(s)
<tejas-manohar>
jhass: idk how to deactive a rack version
<jhass>
I don't believe you
<jhass>
read it again then
Asher2 is now known as Asher
<jhass>
the solution is in it
<Areessell>
Why is Ruby 1.6.8 FILLED with require statements with no RubyGems to be found?
<rpag>
why are you using ruby 1.6.8?
<jhass>
how did you compile 1.6.8?
<Areessell>
I'm looking through the source, proving people make shit up
<havenwood>
rpag: time traveler!
<toretore>
u should be using ruby 2.1.5 Areessell
beilabs_________ has quit [Ping timeout: 250 seconds]
<tejas-manohar>
jhass:prepending bundle exec to what?
<toretore>
it's much bettar
<jhass>
tejas-manohar: what options can you think of
<tejas-manohar>
rack?
<tejas-manohar>
idk honestly
<jhass>
"to your command"
<jhass>
do you even read
beilabs_________ has joined #ruby
<Areessell>
Wed Aug 20 17:28:50 1997 Yukihiro Matsumoto <matz@netlab.co.jp> * ruby.c (ruby_process_options): require() all modules after processing all options
<Areessell>
Hmm 1997 with a reference to the require statement. Weird, considering _why invented it and all
<tejas-manohar>
yes
mikepack has joined #ruby
ohaibbq has joined #ruby
<jhass>
okay
<toretore>
y are u useing ruby 1.6.8 Areessell ???
<tejas-manohar>
its havin trouble w/ rack
<jhass>
what do you think a command is
<tejas-manohar>
terminal cmomand
<toretore>
it's a sucirity risk
<jhass>
tejas-manohar: and that's right
<jhass>
now read it again
boombadaroomba has quit [Ping timeout: 256 seconds]
<Areessell>
toretore: I literally just explained but thanks for the tip! I'll greatly consider it
<toretore>
ruby 1.6.8 doesn't even have blocks
Crazy_Atheist has joined #ruby
<Areessell>
I think I'll just stick to what I know. I don't want to upgrate to 1.8
beilabs_________ has quit [Ping timeout: 264 seconds]
beilabs_________ has joined #ruby
<jhass>
I don't think adding type restrictions can solve all its inconsistencies
chabier has quit [Remote host closed the connection]
<apeiros>
*sob*, trying to translate english to german. but the english was translated from thai first. teh hororr :-S
<jhass>
adding proper collections is an improvement I guess
supersym has joined #ruby
<apeiros>
php is beyond salvage
despai has quit [Quit: This computer has gone to sleep]
<apeiros>
if you'd fix its broken parts, you'd end up with a new language.
<apeiros>
moar power
<apeiros>
aaand, that happens when you chat with too many parties :D
bronak has joined #ruby
quimrstorres has quit [Remote host closed the connection]
Tricon has joined #ruby
marcdel has joined #ruby
despai has joined #ruby
marcdel has quit [Max SendQ exceeded]
jerius has quit []
mkaesz has joined #ruby
marcdel has joined #ruby
Jake232 has joined #ruby
Tricon has quit [Remote host closed the connection]
<ton31337>
jhass: yeah, it works, thank you
Jake232 has quit [Client Quit]
starless has joined #ruby
quimrstorres has joined #ruby
ckrailo_ is now known as ckrailo
Dr3amc0d3r|away has quit [Changing host]
Dr3amc0d3r|away has joined #ruby
Dr3amc0d3r|away is now known as Dr3amc0d3r
freerobby has quit [Quit: Leaving.]
starless has quit [Client Quit]
beilabs_________ has quit [Ping timeout: 265 seconds]
beilabs_________ has joined #ruby
ptrrr has joined #ruby
freerobby has joined #ruby
o0oo0o has quit [Ping timeout: 250 seconds]
o0oo0o has joined #ruby
beilabs_________ has quit [Ping timeout: 244 seconds]
anaeem1_ has quit [Remote host closed the connection]
beilabs_________ has joined #ruby
anaeem1_ has joined #ruby
Megtastique has quit []
Takle has joined #ruby
jeanlinux has joined #ruby
havenwood has quit [Remote host closed the connection]
Darryl_ has quit [Quit: Connection closed for inactivity]
cjohn has quit [Read error: Connection reset by peer]
<tejas-manohar>
apeiros: so exactly how to change load path to allow require 'auth' for lib/auth.rb
<apeiros>
tejas-manohar: either as toretore told you, using -I arg on ruby - e.g. ruby -Ilib app.rb. Or by adding a bit of code to the main executable.
lukevinc has quit [Quit: ChatZilla 0.9.91 [Firefox 24.8.0/20000101000000]]
<tejas-manohar>
apeiros: bit of code to main app.rb i like that method -- what does it entail
<apeiros>
that bit of code can e.g. be: $LOAD_PATH << File.expand_path('../lib', __FILE__). since this is a relative operation, it requires the structure of your project to stay intact when e.g. deploying.
cjohn has joined #ruby
<apeiros>
tejas-manohar: I'm a quick typer, but not that quick ;-)
jdj_dk has joined #ruby
beilabs_________ has quit [Ping timeout: 252 seconds]
beilabs_________ has joined #ruby
<apeiros>
but I'm a bit surprised - I was quite certain that sinatra adds lib to $LOAD_PATH already.
<tejas-manohar>
yea hmmm
<tejas-manohar>
i thought havenwood said the same thing
Spami has quit [Quit: This computer has gone to sleep]
mloveless has joined #ruby
chabier has joined #ruby
BTRE has quit [Read error: Connection reset by peer]
sdwrage has quit [Read error: Connection reset by peer]
triple_b has joined #ruby
sdwrage has joined #ruby
ptrrr has quit [Quit: ptrrr]
Megtastique has joined #ruby
reinaldob has quit [Ping timeout: 258 seconds]
dts has joined #ruby
shazaum has quit [Quit: This computer has gone to sleep]
Xeago has joined #ruby
sdwrage has quit [Ping timeout: 244 seconds]
ghr has joined #ruby
chabier has quit [Remote host closed the connection]
uber_hulk has quit [Quit: leaving]
beilabs_________ has joined #ruby
it0a has quit [Ping timeout: 264 seconds]
nkumari has joined #ruby
lemur has joined #ruby
ghr has quit [Ping timeout: 244 seconds]
nkumari has quit [Remote host closed the connection]
dcunit3d has joined #ruby
it0a has joined #ruby
Jake232 has joined #ruby
max96at is now known as max96at|off
beilabs_________ has quit [Ping timeout: 258 seconds]
beilabs_________ has joined #ruby
thsig has joined #ruby
dcunit3d has quit [Ping timeout: 245 seconds]
anaeem1__ has quit [Remote host closed the connection]
kyoshero has quit [Ping timeout: 264 seconds]
codehotter has joined #ruby
anaeem1 has joined #ruby
thsig has quit [Ping timeout: 252 seconds]
nkumari has joined #ruby
yfeldblum has joined #ruby
banister is now known as banisterfiend
thsig has joined #ruby
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
beilabs_________ has quit [Ping timeout: 240 seconds]
kaspertidemann has quit []
nkumari has quit [Remote host closed the connection]
beilabs_________ has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
anaeem1 has quit [Ping timeout: 264 seconds]
mikepack has quit [Remote host closed the connection]
beilabs_________ has quit [Ping timeout: 256 seconds]
beilabs_________ has joined #ruby
mary5030 has quit [Ping timeout: 252 seconds]
kiyote23 has joined #ruby
tatsuo has joined #ruby
s00pcan has joined #ruby
quimrstorres has quit [Remote host closed the connection]
Dr3amc0d3r is now known as Dr3amc0d3r|away
BTRE has joined #ruby
ekinmur has joined #ruby
nkumari has joined #ruby
jonr22 has joined #ruby
kiyote23 has quit [Ping timeout: 240 seconds]
SCHAAP137 has quit [Quit: Leaving]
chipotle has joined #ruby
beilabs_________ has quit [Ping timeout: 258 seconds]
fabrice31 has joined #ruby
despai has quit [Quit: This computer has gone to sleep]
SCHAAP137 has joined #ruby
sinequanon has quit []
kish has quit [Read error: Connection reset by peer]
shazaum has joined #ruby
beilabs_________ has joined #ruby
shazaum has left #ruby [#ruby]
kish has joined #ruby
kish has quit [Changing host]
kish has joined #ruby
jhc76 has joined #ruby
fabrice31 has quit [Ping timeout: 265 seconds]
giuseppesolinas has quit [Quit: This computer has gone to sleep]
thsig_ has joined #ruby
beilabs_________ has quit [Ping timeout: 264 seconds]
thsig has quit [Ping timeout: 265 seconds]
Joufflu has joined #ruby
beilabs_________ has joined #ruby
shiru has joined #ruby
beef-wellington has quit [Ping timeout: 265 seconds]
mikepack has joined #ruby
charlenopires has joined #ruby
snath has joined #ruby
thsig_ has quit [Remote host closed the connection]
thsig has joined #ruby
<Areessell>
I love coming back after a half hour and seeing the same answers being said
Dopagod has joined #ruby
startupality has quit [Quit: startupality]
startupality has joined #ruby
startupality has quit [Client Quit]
mikepack has quit [Ping timeout: 258 seconds]
phutchins has joined #ruby
despai has joined #ruby
Pupeno has joined #ruby
Hobogrammer has quit [Read error: Connection reset by peer]
rocknrollmarc has quit [Ping timeout: 264 seconds]
x1337807x has joined #ruby
x1337807x has quit [Max SendQ exceeded]
Hobogrammer has joined #ruby
cajone has quit [Ping timeout: 264 seconds]
razieliyo has quit [Remote host closed the connection]
x1337807x has joined #ruby
mkaesz has quit [Remote host closed the connection]
Pupeno has quit [Ping timeout: 265 seconds]
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
thsig has quit [Remote host closed the connection]
thsig has joined #ruby
shiru has quit [Ping timeout: 264 seconds]
crazydiamond has quit [Ping timeout: 255 seconds]
thsig has quit [Ping timeout: 256 seconds]
lucyinthesky has joined #ruby
parabolize has joined #ruby
Cache_Money has joined #ruby
josephndenton has joined #ruby
lxsameer has quit [Quit: Leaving]
ghr has joined #ruby
claymore has quit [Quit: Leaving]
claymore has joined #ruby
beef-wellington has joined #ruby
lampd1 has quit [Ping timeout: 240 seconds]
cajone has joined #ruby
beilabs_________ has quit [Ping timeout: 264 seconds]
Cache_Money has quit [Quit: Cache_Money]
beilabs_________ has joined #ruby
ghr has quit [Ping timeout: 256 seconds]
claymore has quit [Client Quit]
SolarSailor has joined #ruby
dcunit3d has joined #ruby
claymore has joined #ruby
claymore has quit [Client Quit]
<pontiki>
aint it fun?
claymore has joined #ruby
dcunit3d has quit [Ping timeout: 264 seconds]
jonr22 has quit [Remote host closed the connection]
havenwood has joined #ruby
nicoulaj has quit [Ping timeout: 264 seconds]
lbrf has joined #ruby
adriancb has joined #ruby
jimmyy has quit [Ping timeout: 240 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
beilabs_________ has quit [Ping timeout: 255 seconds]
beilabs_________ has joined #ruby
sailias has quit [Quit: Leaving.]
adriancb has quit [Ping timeout: 258 seconds]
thsig has joined #ruby
__future__1 has quit [Read error: Connection reset by peer]
__future__ has joined #ruby
phutchins has quit [Ping timeout: 244 seconds]
ekinmur has quit [Quit: no longer available]
kiyote23 has joined #ruby
nkumari has quit [Remote host closed the connection]
klmlfl has joined #ruby
n1lo_ has quit [Ping timeout: 258 seconds]
thsig_ has joined #ruby
Takle has joined #ruby
thsig has quit [Ping timeout: 255 seconds]
mary5030 has joined #ruby
goodenough has quit [Remote host closed the connection]
davedev24_ has quit [Read error: Connection reset by peer]
kiyote23 has quit [Ping timeout: 264 seconds]
tatsuo has quit [Remote host closed the connection]
davedev24_ has joined #ruby
nkumari has joined #ruby
Takle has quit [Ping timeout: 258 seconds]
sailias has joined #ruby
mary5030 has quit [Ping timeout: 258 seconds]
ohaibbq has quit [Remote host closed the connection]
mikepack has joined #ruby
it0a has quit [Ping timeout: 245 seconds]
lampd1 has joined #ruby
MattB2 has joined #ruby
beilabs_________ has quit [Ping timeout: 272 seconds]
beilabs_________ has joined #ruby
<shevy>
hey I was not here the last half hour
jonr22 has joined #ruby
nkumari has quit [Remote host closed the connection]
<apeiros>
all good times end…
<apeiros>
;-p
it0a has joined #ruby
chu has joined #ruby
Arnie25 has quit [Remote host closed the connection]
mahlon_ has joined #ruby
Arnie25 has joined #ruby
ohaibbq has joined #ruby
renderful has joined #ruby
it0a has quit [Client Quit]
jonr22 has quit [Ping timeout: 240 seconds]
beilabs_________ has quit [Ping timeout: 258 seconds]
beilabs_________ has joined #ruby
cnj_ has joined #ruby
danoo_ has joined #ruby
peckermanzzz has quit [Ping timeout: 260 seconds]
sjohnsen has quit [Ping timeout: 260 seconds]
mahlon has quit [Ping timeout: 260 seconds]
cnj has quit [Ping timeout: 260 seconds]
cnj_ is now known as cnj
clauswitt has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
claymore has quit [Quit: Leaving]
renderful has quit [Ping timeout: 258 seconds]
crazydiamond has joined #ruby
patrick99e99 has quit [Quit: Lost terminal]
soulcake has quit [*.net *.split]
Caius has quit [*.net *.split]
Deele has quit [*.net *.split]
danoo has quit [*.net *.split]
beilabs_________ has quit [Ping timeout: 244 seconds]
klmlfl has quit [Remote host closed the connection]
beilabs_________ has joined #ruby
charlenopires has quit [Quit: Be back later ...]
benzrf|offline is now known as benzrf
charlenopires has joined #ruby
tejas-manohar has quit [Quit: Page closed]
jimbach has quit [Remote host closed the connection]
cek has joined #ruby
<cek>
redis-rb, pipelined Future's. Can somebody explain?
jdj_dk has quit [Ping timeout: 272 seconds]
timonv_ has joined #ruby
beilabs_________ has quit [Ping timeout: 272 seconds]
duncannz has joined #ruby
beilabs_________ has joined #ruby
duncannz has quit [Max SendQ exceeded]
duncannz has joined #ruby
davedev2_ has joined #ruby
davedev24_ has quit [Ping timeout: 240 seconds]
ghr has joined #ruby
rkalfane has joined #ruby
NoNMaDDe_ has joined #ruby
NoNMaDDe_ has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 240 seconds]
soulcake has joined #ruby
Deele has joined #ruby
soulcake has quit [Changing host]
soulcake has joined #ruby
charlenopires has quit [Quit: Be back later ...]
jonr22 has joined #ruby
jottr_ has quit [Quit: WeeChat 1.0.1]
sailias has quit [Quit: Leaving.]
Caius has joined #ruby
Caius has joined #ruby
peckermanzzz has joined #ruby
NoNMaDDeN has quit [Quit: Leaving...]
goodenough has joined #ruby
pandaant has quit [Remote host closed the connection]
beilabs_________ has quit [Ping timeout: 240 seconds]
beilabs_________ has joined #ruby
zorak8 has joined #ruby
sdwrage has joined #ruby
ekinmur has joined #ruby
turtlejim has quit [Read error: Connection reset by peer]
moritzs has quit [Ping timeout: 256 seconds]
fabrice31 has joined #ruby
josephndenton has quit [Ping timeout: 265 seconds]
sailias has joined #ruby
arescorpio has joined #ruby
goshdarnyou has quit [Quit: Connection closed for inactivity]
timonv_ has quit [Remote host closed the connection]
fabrice31 has quit [Ping timeout: 265 seconds]
beilabs_________ has quit [Ping timeout: 256 seconds]
beilabs_________ has joined #ruby
timonv_ has joined #ruby
cjohn has quit [Quit: ChatZilla 0.9.91-rdmsoft [XULRunner 32.0.3/20140923175406]]
sailias has quit [Quit: Leaving.]
dcunit3d has joined #ruby
timonv_ has quit [Ping timeout: 245 seconds]
beilabs_________ has quit [Ping timeout: 250 seconds]
antgel has quit [Ping timeout: 255 seconds]
sjohnsen has joined #ruby
phild has joined #ruby
beilabs_________ has joined #ruby
davedev2_ has quit [Ping timeout: 244 seconds]
phild has left #ruby [#ruby]
<havenwood>
cek: usually a future will block and wait for the value, but it looks like they raise a FutureNotReady error
<cek>
yeah, that's already solved. #value is just waiting for future to become avail
<havenwood>
cek: the idea is to set a bunch of things but not wait for them to actually set, just move on
<havenwood>
cek: aye
despai has quit [Quit: This computer has gone to sleep]
<jhass>
well, it's also common to attach a callback to a future
philpd has joined #ruby
<cek>
were ruby not some shitty javascript
davedev24_ has joined #ruby
<havenwood>
jhass: wouldn't that be more a promise based on a future? oh well, nomenclature doesn't agree
<havenwood>
there're more than one way to name things
<havenwood>
*ways
<jhass>
I'd say a promise is similar to a pipe
<havenwood>
like a pipe that chains futures together
<jhass>
that's a common use, yes
despai has joined #ruby
robertt_dex has joined #ruby
rbrs has quit [Quit: Leaving]
<jhass>
a promise is a future that you can hand out to somewhere else and then later provide a value for that future by calling a method on the promise
klmlfl has joined #ruby
<apeiros>
I don't think people are consistent in the use of those terms :-/
<havenwood>
jhass: ahh, rereading what you said, i misread it. attach to, not part of.
despai has quit [Client Quit]
jottr has joined #ruby
Scripore has quit [Ping timeout: 264 seconds]
beilabs_________ has quit [Ping timeout: 272 seconds]
beilabs_________ has joined #ruby
philpd has left #ruby [#ruby]
MattB2 has quit [Remote host closed the connection]
SolarSailor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
quimrstorres has joined #ruby
codecop has quit [Remote host closed the connection]
marr has joined #ruby
despai has joined #ruby
MattB2 has joined #ruby
boombadaroomba has joined #ruby
<shevy>
a promise to be made in the future
<shevy>
this is so poetic
Pupeno has joined #ruby
<shevy>
flush the promise down a pipe
moritzs has joined #ruby
<shevy>
that's Shakespeare worthy!
sdwrage has quit [Quit: This computer has gone to sleep]
cleopatra has joined #ruby
beilabs_________ has quit [Ping timeout: 252 seconds]
WillAmes has joined #ruby
beilabs_________ has joined #ruby
boombadaroomba has quit [Ping timeout: 258 seconds]
inkblots has quit [Quit: WeeChat 0.4.2]
Pupeno has quit [Ping timeout: 264 seconds]
jimmyy has joined #ruby
ekinmur has quit [Quit: no longer available]
<banisterfiend>
jhass i always thought it was the other way round, that a promise is the more fundamental concept and that a future was just a promise that was fulfilled by running the associated immediately on a background thread
kiyote23 has joined #ruby
<jhass>
as apeiros noted probably just not well defined terms
chabier has joined #ruby
beilabs_________ has quit [Ping timeout: 256 seconds]
<jhass>
I learned the scala terminology
<banisterfiend>
i think they're well-defined for people in the know, it's just as filthy casuals who use the terms incorrectly ;)
<banisterfiend>
us*
<havenwood>
banisterfiend: how's a Thread now a Future?
<havenwood>
banisterfiend: ;P
<havenwood>
not'8
<havenwood>
gah
beilabs_________ has joined #ruby
<havenwood>
not*
<havenwood>
my fingers aren't working
<apeiros>
IMO ask c2 & wp
<banisterfiend>
havenwood because it doesn't have the associated done/fail callbacks which are invoked when the action succeeds or fails ;)
<havenwood>
banisterfiend: is that part of a future?
<apeiros>
I knew future only as "value tied to execution of code, blocking only when value is actually needed"
Photism has quit [Quit: Leaving]
<apeiros>
which conceptionally could propagate
<havenwood>
apeiros: that's my unerstanding
kiyote23 has quit [Ping timeout: 252 seconds]
<havenwood>
it just runs a thing, and if you ask for the value early it blocks
<shevy>
hmm unerstanding
<havenwood>
till ready
<apeiros>
i.e. x = future_fib(40); y = future_fib(50); z = x*y # still not blocking
<banisterfiend>
havenwood i think so, a promise to me is just a simple datastructure (based on my messing around with jquery promises) that has: resolve/reject methods for determining whether the promise has been fufiflled and rejected, and associated fail/done/then callbacks that are invoked whenever the promise is resolved/rejected
<havenwood>
banisterfiend: that to me seems more complex than a future
<banisterfiend>
havenwood and a future is just a promise that is immediately run on a background thread and resolved/rejected there
<havenwood>
banisterfiend: hmm
ghr has joined #ruby
<havenwood>
banisterfiend: i think it's a nomenclature issue, by lang
<apeiros>
if a language has proper query/command separation, it could automatically convert all queries into futures
<havenwood>
Alice ML or something else
beilabs_________ has quit [Ping timeout: 256 seconds]
thsig has joined #ruby
beilabs_________ has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
<havenwood>
banisterfiend: or maybe you're right and some mythical folk do know, i'd prefer that
<banisterfiend>
havenwood so it would look like this: promise = MyPromise.new; promise.done ->(state) { when it's successfully resolved }, promise.fail ->(state) { when it fails } ....... and then, if you wanted to make that a future, you'd go: Thread.new { do..operation; if operation.success?; promise.resolve(state); else; promise.reject(state); end }
<havenwood>
banisterfiend: mm
<banisterfiend>
but since it's a 'future' you'd wrap up that complexity a bit further and hide the explicit promise resolving/rejecting in the api and the explicit threading
chabier has quit [Remote host closed the connection]