<canton7>
"# Ugly mess of a program, I'll admit it" <-- yeah, I'm not touching that, and I don't suspect anyone else will
eroc has joined #ruby
<jsilver>
oh that was a joke
<jsilver>
i've recently removed that comment. i don't really consider it one
<jsilver>
you can mess with it and don't be worried
<jsilver>
it won't bite :)
waxjar has joined #ruby
<canton7>
also, using ::!!:: as a delimeter? ouch
<jsilver>
pushing new version
<jsilver>
what's your scientific argument against that?
<jsilver>
:)
PetePorty has joined #ruby
PetePorty has joined #ruby
<canton7>
it's horrible. using random strings as delimeters is never good. either have a single delimeter with an escape character, or put a structure around the information (instead of encoding the structire in the information), like json
<canton7>
*structure
<ddd>
its a shitload of text to have to type for ever delimitation you make, random crap doesn't follow any known structure
<ddd>
shall i go on?
<ddd>
oh canton7 already did
<jsilver>
canton7: why? would ::!!:: ever show up in a stream?
<jsilver>
have you tried googling for it
<canton7>
plus, you're not escaping your delimeter in the text you're sticking between the delimeters
<canton7>
I've seen a lot of people go through the "I'll just make up a delimeter" phase, and they invariably move onto better things
<jsilver>
it's. 4 bytes.
<jsilver>
it's not a shitload
<canton7>
and that's for a good reason
<ddd>
hmm, not done math on how much that means over time have you
<jsilver>
yes, because then someone can type ::!!:: if they need to
<jsilver>
which is never
Dario_ has joined #ruby
<jsilver>
same as how much 1 vs 2 bytes for text encoding would have meant
<ddd>
:shrug: you obviously don't want to hear it, so, off to drinking a beer and watching tv
<canton7>
seriously, it's bad design. If you're defending it so strongly, I'm afraid that's another few points against you
cj3kim has joined #ruby
<canton7>
yeah, I've heard enough. Beer is a good idea!
<jsilver>
same
slainer68 has joined #ruby
<canton7>
hmm, also something centralised is never going to take on IRC, precisely because of that
themagiczebra has joined #ruby
jandritsch has left #ruby [#ruby]
jandritsch has joined #ruby
jandritsch has left #ruby [#ruby]
kil0byte_ has joined #ruby
alejandro_ has joined #ruby
friskd has joined #ruby
jfl0wers has joined #ruby
DarkFoxDK has joined #ruby
love_color_text has joined #ruby
felipe_Brz has joined #ruby
ryanlecompte has joined #ruby
<felipe_Brz>
hi is there a way to add a module's methods to the global namespace so I don't neet to do FileUtils.foo and FileUtils.bar all the time?
<felipe_Brz>
i mean, I want to be able to call the methods in a module without providing the module name
freeayu has joined #ruby
<xybre>
felipe_Brz: Adding stuff to the "global" namespace is Bad (tm), but if you have a module or class you can easily include methods using include.
<xybre>
felipe_Brz: ex: class Foo; include FileUtils; def whatever; bar # from FileUtils; end; end
<xybre>
Extend will work instead if you're doing everything in a class/module definition (class << self) context.
<felipe_Brz>
hmm I see
<felipe_Brz>
i'm just coding small shell scripts so I'm outside of classes but I guess the effort will probably pay itself in a few minutes hehe
<felipe_Brz>
thanks xybre
love_color_text has joined #ruby
<xybre>
felipe_Brz: A simple class can really help when writing a script too, you don't need 500 files or anything, it can all be in one small file.
<canton7>
you can 'include FileUtils' even if you're not explicitely using classes
<felipe_Brz>
k that'll do for the moment although i know I'll fallback to classes in a few more lines' time =) canton7 xybre
UdontKnow has joined #ruby
moshee has joined #ruby
moshee has joined #ruby
edenc has joined #ruby
nuba has joined #ruby
statarb3 has joined #ruby
statarb3 has joined #ruby
<canton7>
felipe_Brz, in fact it's no different really. Without classes, you're writing code/methods/etc in the context of a special "global" class; so you're including FileUtils into that
Dario_ has joined #ruby
whitedawg has joined #ruby
<canton7>
If what you're writing is complex, it's probably worth structuring it using classes. But for a simple single-file procedural shell script? nah
seanyo has joined #ruby
yosafbridge has joined #ruby
yosafbridge has joined #ruby
<felipe_Brz>
canton7 i see. thank you for helping
<xybre>
The "main" object is the object context scripts execute in, so does IRb/Pry. The thing is, it really is global, so it'll be available in any objects you define too, which can lead to unexpected behaviour.
<xybre>
banisterfiend: I meant Wat.new.bar, oops. Your code still runs without error in irb.
<xybre>
Oh yeah thats what you meant. :D
robbyoconnor has joined #ruby
<banisterfiend>
xybre: hehe my point was you can extend on main instead of include, and u don't pollute global namespace, u just add the methods to main
<banisterfiend>
:P
<xybre>
banisterfiend: You are correct! Because include runs on Object, which includes it on everything, and extend only works on that one instance of the "main" Object. Good call. :D
<banisterfiend>
xybre: ya, you can also just go: def self.foo; puts "hi"; end
<banisterfiend>
xybre: instead, that'll put it on main singleton class as well
<xybre>
Makes sense
<tomoyuki28jp>
'rvmsudo bundle' returns me 'sudo: bundle: command not found'. How can I fix it?
jmpf has joined #ruby
<xybre>
tomoyuki28jp: install bundler?
<tomoyuki28jp>
xybre: bundler is already installed.
murz has joined #ruby
hotovson has joined #ruby
tpe11etier_ has joined #ruby
<xybre>
tomoyuki28jp: `which gem`
<tomoyuki28jp>
xybre: rvmsudo with gem => sudo: with: command not found
<tomoyuki28jp>
ah
<tomoyuki28jp>
sorry
<tomoyuki28jp>
wait a min plz
<tomoyuki28jp>
typo
<tomoyuki28jp>
xybre: rvmsudo which gem => /home/user/.rvm/rubies/ruby-1.9.3-p327/bin/gem
<banisterfiend>
xybre: doesn't make that much sense :P check this out for example
<banisterfiend>
xybre: they both define singleton methods on C
<banisterfiend>
xybre: C = Class.new; C.instance_eval { def xybre; "xybre"; end } and this: C.instance_eval { def self.banister; "banister"; end }
Iszak has joined #ruby
<xybre>
banisterfiend: Yeah I was wondering about that.. I think Ruby is "helping".
<xybre>
tomoyuki28jp: and without rvmsudo?
<tomoyuki28jp>
xybre: the same output.
<xybre>
tomoyuki28jp: did yoy install bundler with sudo? If so, your user might not have execution permissions.
<xybre>
s/yoy/you
medik has joined #ruby
medik has joined #ruby
Dario_ has joined #ruby
<tomoyuki28jp>
xybre: the wired thing:
<tomoyuki28jp>
rvmsudo which rvm => /home/ubuntu/.rvm/bin/rvm
<tomoyuki28jp>
rvmsudo rvm => sudo: rvm: command not found
nick_h has joined #ruby
<tomoyuki28jp>
xybre: I don't think I installed bundler with sudo.
<xybre>
tomoyuki28jp: O_o seppakku and reinstall
jphpsf has joined #ruby
<tomoyuki28jp>
seppakku?
<tomoyuki28jp>
xybre: reinstall what?
<xybre>
`rvm seppuku` uninstalls rvm
<xybre>
(I just apparently couldn't spell seppuku)
nouh has joined #ruby
<tomoyuki28jp>
xybre: I didn't know there is such command..
pen has joined #ruby
<tomoyuki28jp>
xybre: thanks, I'll try.
bigmac has joined #ruby
<xybre>
tomoyuki28jp: its also called "implode"
<xybre>
And when you reinstall make sure rvm is loaded as a function.
havenn has joined #ruby
<tomoyuki28jp>
xybre: How can I make sure this? > rvm is loaded as a function
banisterfiend has joined #ruby
tjasko__ has joined #ruby
<xybre>
tomoyuki28jp: it tels you how in the install doc, there's a line you put in your bash start script.
<reppard>
sorry, thats how i see if i am connected after the ol macbook has been closed all day =)
<apeiros_>
reppard: you could also just do something which does not show up in a public channel…
<reppard>
apeiros_: didn't think one period in the midst of a bunch of network noise was to much of a intrusion
neurotech has joined #ruby
Hanmac1 has joined #ruby
Dario_ has joined #ruby
shamo has joined #ruby
yfeldblum has joined #ruby
love_color_text has joined #ruby
rakl has joined #ruby
gmci has joined #ruby
ryanlecompte has joined #ruby
kevin_ has joined #ruby
Remaps has joined #ruby
<kevin_>
i'm trying to install a gem. the first step worked "gem install typhoeus" The second step is giving me an error and I haven't been able to figure out why. The error is
<kevin_>
ERROR: While executing gem ... (RuntimeError)
the_jeebster has joined #ruby
<kevin_>
Unknown command typhoeus
<kevin_>
anyone know why that might be?
AngeloChang has joined #ruby
<kevin_>
I got the same result with " gem typhoeus" (no sudo) and "gem 'typhoeus'"
tjasko__ has joined #ruby
Remaps has left #ruby [#ruby]
kevin_ has joined #ruby
phelps has joined #ruby
nanothief has joined #ruby
stkowski has joined #ruby
cj3kim has joined #ruby
dsdeiz has joined #ruby
fir_ed has joined #ruby
dsdeiz has joined #ruby
The_8472 has joined #ruby
Dario_ has joined #ruby
<shevy>
kevin_ did you install typhoeus
<havenn>
kevin_: Did you install the gem, I'm confused?: gem install typhoeus
<shevy>
kevin_ usually the binary would be called "typhoeus"
keyvan has joined #ruby
<shevy>
I dont know anyone doing: "gem typhoeus"
xpen has joined #ruby
<havenn>
kevin_: Ohhh, are you looking at Installation section of README.md? The `gem "typhoeus"` is how you include it in a Gemfile. (They mean an alternative way to install from `gem install typhoeus`.)
cableray has joined #ruby
<havenn>
kevin_: In irb just: require 'typhoeus'
v0n has joined #ruby
mercwithamouth has joined #ruby
johnmilton has joined #ruby
<shevy>
what is better... @right_margin or @rMargin
UdontKnow has joined #ruby
UdontKnow has joined #ruby
havenn has joined #ruby
jmpf has joined #ruby
alexspeller has joined #ruby
<ryanf>
shevy: is that a rhetorical question?
<shevy>
ryanf no, I look at code written by someone else who is using all sorts of instance variable like @rMargin
<shevy>
@rMargin is not that bad, there is also
<eka>
shevy: maybe an ex java dev or .net or something
<shevy>
@fwPt @fhPt @fw and @fh
<ryanf>
ew
<eka>
camelcase all over
<shevy>
I can figure what he means, format with point, format height point, format width and format height, but it annoys me
<shevy>
yeah eka, he also used def FooBla()
<shevy>
for ALL the methods
<shevy>
*width, not with
<eka>
yeah … you can tell, sad
<shevy>
ah well, lots of stuff to change, as long as I have beer, I am happy
<shevy>
@k
<shevy>
:\
<shevy>
no idea what this is yet ...
<shevy>
aha... a scale factor variable
<eka>
shevy: try RubyMine … has refactoring… and you can use it for free for 30 days… :)
<Quadlex>
<3 RubyMine
<shevy>
hmm ok
<Quadlex>
If you can go back in time until last Friday you can get it for 75% off
<speakingcode-wor>
vim ftw
Goles has joined #ruby
<shevy>
I found that vim gets into the head a lot
<shevy>
like you hack into the keyboard a lot machine-like
<shevy>
5dd,p,:15,yy;q!
<shevy>
hmm these are fun
<shevy>
but the functions, I hate
<speakingcode-wor>
never really favored vim until a few months ago
<shevy>
function sort() :%!sort endfunction
<shevy>
let Tag = ' HR '
<shevy>
endif " check on filetype
sayan has joined #ruby
tomoyuki28jp has joined #ruby
Dario_ has joined #ruby
<tomoyuki28jp>
xybre: I've re-install rvm and it's rubies, but the problem hasn't solved yet.
freakazoid0223 has joined #ruby
pen has joined #ruby
generalissimo has joined #ruby
ryanlecompte has joined #ruby
charliesome has joined #ruby
iamjarvo has joined #ruby
jenrzzz has joined #ruby
pen has joined #ruby
aedorn has joined #ruby
v0n has joined #ruby
ryanlecompte has left #ruby [#ruby]
havenn has joined #ruby
theRoUS has joined #ruby
thufir_ has joined #ruby
Takehiro has joined #ruby
slash_nick has joined #ruby
dsdeiz has joined #ruby
cakehero has joined #ruby
pcarrier has joined #ruby
Dario_ has joined #ruby
Tabrenus has joined #ruby
radic has joined #ruby
dsdeiz has joined #ruby
matip_ has joined #ruby
alexspeller has joined #ruby
stkowski has joined #ruby
dsdeiz has joined #ruby
yacks has joined #ruby
pen has joined #ruby
pen has joined #ruby
jonathanwallace has joined #ruby
Dario_ has joined #ruby
x42 has joined #ruby
elico has joined #ruby
Spaceghostc2c has joined #ruby
tjasko__ has joined #ruby
My_Hearing has joined #ruby
My_Hearing has joined #ruby
love_color_text has joined #ruby
cableray has joined #ruby
jxriddle has joined #ruby
thams has joined #ruby
havenn has joined #ruby
codezombie has joined #ruby
luckyrub_ has joined #ruby
havenn has joined #ruby
x82_nicole has joined #ruby
Dario_ has joined #ruby
mercwithamouth has joined #ruby
felipe_Brz_ has joined #ruby
sjhuang has joined #ruby
pen has joined #ruby
Shrink has joined #ruby
Shrink has joined #ruby
GreenPlastik has joined #ruby
<GreenPlastik>
anyone around for a quick question?
icole has joined #ruby
Shrink has joined #ruby
Shrink has joined #ruby
x82_nicole has joined #ruby
adeponte has joined #ruby
SirRamonGabriel has joined #ruby
Shrink has joined #ruby
Shrink has joined #ruby
<GreenPlastik>
anyone around for a quick question about case statements?
<GreenPlastik>
interesting. so how would i check for x being less than 1 or greater than or equal to 30?
<havenn>
GreenPlastik: What follows 'when' needs to be threequal to x. You prolly need to use an if statement instead of case for what you're wanting to do.
<GreenPlastik>
ah ok
<GreenPlastik>
so a long chain of if, elsif, else, end?
kil0byte_ has joined #ruby
cj3kim has joined #ruby
<havenn>
GreenPlastik: Or you could: if x < 1; "400"; elsif x >= 30; "60"; else; case x...
<havenn>
GreenPlastik: The < and >= just can't be a case.
<GreenPlastik>
oh yeah
staafl has joined #ruby
<GreenPlastik>
worked perfectly
Dario_ has joined #ruby
dsdeiz has joined #ruby
<GreenPlastik>
havenn: thank you
<havenn>
GreenPlastik: No prob, happy hacking!
dkannan_ has joined #ruby
kil0byte has joined #ruby
akam-it has joined #ruby
<akam-it>
hello
ananthakumaran has joined #ruby
<akam-it>
can I store data in hash like this?
<akam-it>
connect = {}
<akam-it>
connect['user1'][0] = ['10:00','11:00']
<akam-it>
connect['user1'][1] = ['15:00','17:30']
<akam-it>
etc..?
<akam-it>
Or may be there is another way?)
sjhuang has joined #ruby
<havenn>
akam-it: Would work if you put a `connect['user1'] = {}` after the `connect = {}`.
<akam-it>
havenn, thank you
cj3kim has joined #ruby
dsdeiz has joined #ruby
adeponte has joined #ruby
thams has joined #ruby
arietis has joined #ruby
pen has joined #ruby
sjhuang has joined #ruby
Dario_ has joined #ruby
wookiehangover has joined #ruby
icole has joined #ruby
sayan has joined #ruby
cableray has joined #ruby
beneggett has joined #ruby
Solnse has joined #ruby
nomenkun has joined #ruby
dkannan_ has left #ruby [#ruby]
cj3kim has joined #ruby
Goles_ has joined #ruby
thams has joined #ruby
Dario_ has joined #ruby
dkannan has joined #ruby
dkannan has left #ruby [#ruby]
mafolz has joined #ruby
adeponte has joined #ruby
postmodern has joined #ruby
love_color_text has joined #ruby
Gooder has joined #ruby
emmanuelux has joined #ruby
toekutr has joined #ruby
sayan has joined #ruby
cj3kim has joined #ruby
JohnBat26 has joined #ruby
samuel02 has joined #ruby
Dario_ has joined #ruby
yacks has joined #ruby
robustus has joined #ruby
mrdtt has joined #ruby
elsifaka has joined #ruby
tjasko__ has joined #ruby
maesbn has joined #ruby
jeskola303 has joined #ruby
Gooder has joined #ruby
xorigin has joined #ruby
mrdtt has left #ruby [#ruby]
Dario_ has joined #ruby
solidresolve has joined #ruby
dsdeiz has joined #ruby
<dsdeiz>
hi all, is there a way to replace specific characters inside a match when using gsub?
<Paradox>
it was something i coded up in 30 minutes
<Paradox>
just to learn sinatra
<slash_nick>
"Time limit exceeded wall clock"
<slash_nick>
Had to try something stupid in there
<Paradox>
?
<Paradox>
what
Jasko has joined #ruby
<slash_nick>
Just wanted to see how it would handle a script that took a while to run...
<Paradox>
oh
<Paradox>
pastefart just dumps whatever into the DB
<Paradox>
after escaping it
lemonsparrow has joined #ruby
<lemonsparrow>
I installed rvm using curl -L get.rvm.io | bash -s stable and then when I do rvm in the termilnal I get bash: rvm: command not found
pen has joined #ruby
berserkr has joined #ruby
emocakes has joined #ruby
Gooder has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
ikaros has joined #ruby
<slash_nick>
win 1
<slash_nick>
lemonsparrow: did you get sorted out?
Goles has joined #ruby
<lemonsparrow>
slash_nick: yes I ran To start using RVM you need to run `source /etc/profile.d/rvm.sh` in all your open shell windows, in rare cases you need to reopen all shell windows.
<lemonsparrow>
rvm install 1.9.3 No binary rubies available for: downloads/ruby-1.9.3-p327. Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies. Fetching yaml-0.1.4.tar.gz to /usr/local/rvm/archives % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 460k 100 460k 0 0 110k 0 0:0
<lemonsparrow>
I get o/p like this
<slash_nick>
Hanmac: you crazy :)
<lemonsparrow>
getting tee: standard output: Broken pipe tee: write error in b/w the o/p
hamed_r has joined #ruby
<slash_nick>
b/w the o/p?... black and white, output?
<Paradox>
should switch to rbenf ¬_¬
lolmaus has joined #ruby
<slash_nick>
Paradox: that's the first I've heard of it... rbenv you mean, right?
<banisterfiend>
slash_nick: how does pry break on jruby?
<csmrfx>
perhaps JNI might work, too
<Hanmac>
postmodern and what if not?
<charliesome>
banisterfiend: woah
<charliesome>
banisterfiend: that was like how headius appears whenever someone mentions jruby
<postmodern>
Hanmac, you submit a feature request
<postmodern>
Hanmac, just like if the library doesn't provide a *version* variable/function
<banisterfiend>
hehe
malte_ has joined #ruby
<slash_nick>
banisterfiend: I just described it :) ... when console/server stops at "binding.pry", Ctrl+C ceases to work... therefore I have to kill the server/console with Ctrl+Z, which leaves the process running
Goles has joined #ruby
<Hanmac>
postmodern i think you dont understand ... some things of C++ cant be ported into C for FFI
<slash_nick>
So I then need to find and kill the process manually
<banisterfiend>
slash_nick: ah yeah, i remember
<banisterfiend>
slash_nick: that's only recent versions of jruby though right?
<postmodern>
Hanmac, no, but they can provide an "extern C { ... }" API which FFI can use
<slash_nick>
banisterfiend: that's right... Last I tried was 1.7.1 and the problem was still there
<slash_nick>
haven't tried jruby-head lately
<postmodern>
Hanmac, all C++ libraries should expose a C API
<postmodern>
Hanmac, and most library maintainers will add it if you request it
Jasko has joined #ruby
<postmodern>
Hanmac, this is the nature of open source, if someone is missing, you request it, and usually it gets fixed/added
Goles_ has joined #ruby
<postmodern>
Hanmac, s/someone/something/g
<charliesome>
holy crap, OS X comes with a rails app called device manager in /usr/share/devicemgr
<charliesome>
i wonder what it does
<slash_nick>
manages devices, i hope
<Hanmac>
you still dont get it right? there are stuff that CANT be ported into C like templates
<Aqua>
eh, I have to manage people with windows all day
<Aqua>
and windows servers
<Aqua>
and vmware
<slash_nick>
Aqua: that macbook still runs well... can still develop with it, though there's no reason too with the other machines around
<Paradox>
its something to do with OS X server edition
<Paradox>
and profile manager
<postmodern>
Hanmac, MRI forces you to define everything in C, so might as well just embrace C
<charliesome>
Paradox: this reinforces my opinion that the system ruby is there for the system, and the fact users can use it is a side effect
<Aqua>
postmodern: i just started ruby so i'm messing with it on my macbook
<Aqua>
and I have several openindiana boxes when that time comes
matchaw_ has joined #ruby
dpn` has joined #ruby
jonathanwallace has joined #ruby
<Hanmac>
postmodern you didnt read my last sentence right? ... i have a macro that turns class A { B get() }; into namespace Ruby__ { namespace A { VALUE _get(VALUE self); }}
x82_nicole has joined #ruby
Goles has joined #ruby
<ddd>
charliesome: then that would also be equally applicable to apache that OSX (desktop *and* server) comes with. what value does a desktop/laptop _system_ gain from having apache installed? i don't think its a side effect for users
zommi has joined #ruby
<Aqua>
slash_nick: I get a new macbook every year with work
<postmodern>
Hanmac, in order to define a method in Ruby via C-ext requires you define a C function and reference it
Goles has joined #ruby
<slash_nick>
Aqua: jealous.
<postmodern>
Hanmac, how many C-extensions have you written btw?
<postmodern>
Hanmac, and how many FFI bindings?
<Hanmac>
4
<Hanmac>
0
<Aqua>
slash_nick: this year is the first year i didn't because I have a 17 and i don't want a retina
<slash_nick>
next time you're in that situation... remember, slash_nick loves the retina displays
<Paradox>
i wonder how angry stallman gets when he thinks about the fact that the FSF spent years trying to get an OS to run on a microkernel
<Paradox>
then apple up and did it with OS X
<Aqua>
you know, i like the bigger displays over the resolution
<Paradox>
thats what she said
Goles_ has joined #ruby
<Aqua>
Paradox: she also likes my thunerbolt port.
<Hanmac>
postmodern and as i said, i have macros that does the job for me, somethimes with errorhandling inclusive
<Paradox>
its tiny
<postmodern>
Hanmac, well those macros wont work against JRuby
<Aqua>
its not the size, its how you use it
<Aqua>
n-e-ways
<csmrfx>
postmodern: I thought OSX kernel is not a microkernel
Goles__ has joined #ruby
<postmodern>
csmrfx, if i remember right, it's a hybrid between microkernel and modules
<csmrfx>
so Stallman is probably just sneering at the silly capitalist and the sheeple that pay premium for crappy hardware design
<Paradox>
mach
<Hanmac>
postmodern and unless someone shows to me how it works with FFI "IN THE SAME SPEED" jruby will not be supported
<Paradox>
stallman also seems to think that baths are a capitalist plot
<Paradox>
alongside shaving and being polite
<csmrfx>
What do you mean "planned obsolescence"? Why did my CrapBook Air die after 24 months?
<postmodern>
Hanmac, FFI in JRuby drops right down to JFFI, and can unlock the GVL on MRI
<csmrfx>
Paradox: you should see what George Carlin said!
<postmodern>
Hanmac, the idea with extensions and FFI is not to call into C all the time, but do the expensive work in C
Goles has joined #ruby
<postmodern>
Hanmac, that way the penalty for transitioning from Ruby->C is minimal, since the majority of the CPU time is spent in C
<Hanmac>
the GVL has nothing todo with that, some extentsions are reverse the calling order ... (so the main loop is in the ext and ruby is called from callbacks)
<postmodern>
Hanmac, the GVL has everything to do if your using Threads
<postmodern>
Hanmac, but it sounds like you have your mind set, and you really shouldn't be asking anyone about alternatives to C-extensions
slainer68 has joined #ruby
hinmh has joined #ruby
<Hanmac>
did i said that? NO i did not! (because the libs are bind are 50% not threadsafe or has its own thread system)
<postmodern>
Hanmac, you implied it, you are clearly anti-FFI
<Hanmac>
postmodern, my mind is not set, but 1.) the libs does NOT have an C-API and currently its not planed to get one
<ddd>
hehe even i got that from the commentary
<Hanmac>
2.) my bindings are more ruby-like than FFI could ever be
<postmodern>
Hanmac, ok, then we have nothing to talk about :)
<Hanmac>
3.) my bindings have object protection, so it does not create alltime an new ruby object
<Hanmac>
4.) the objects need to be informed when they get destroyed because they get deleted from the C(++) side, and the GC need to be informed about that
Goles has joined #ruby
<slash_nick>
Goodnight everyone... happy holidays
<Hanmac>
and with my 3Dengine i get ~300FPS ... i dont think that i can get it with FFI too
Goles_ has joined #ruby
keyvan has joined #ruby
<ddd>
ok what does ffi actually stand for? i know what its used for, but whats the letters for? don't see description of it on its wiki
zigomir has joined #ruby
<csmrfx>
foreign function interface?
Aqua has joined #ruby
<ddd>
you say it like you're questioning as well :)
<apeiros_>
bubuz: probably because you did something wrong.
Goles_ has joined #ruby
nick_h has joined #ruby
<bubuz>
yeah well that much is obvious apeiros_
<bubuz>
im nre to ruby and was hoping that someone maybe able to help me out
<apeiros_>
I did. it seems to me that "something" is an adequate amount of information to you.
<bubuz>
huh? that doesnt even make sense
<bubuz>
no need to be a douche.
<csmrfx>
help people to help you
<apeiros_>
bubuz: you fail at explaining your problem
<apeiros_>
you don't even try
<csmrfx>
provide error message and other debugging info
<bubuz>
i'd have thought the code would do the talking
<apeiros_>
no dude
<apeiros_>
not even close
<csmrfx>
maybe #ruby needs something like ##javascript's !help
<apeiros_>
if you'd pay for our time, sure. makes lots of billable hours if you don't bother to invest any time in elaborating your issue.
<csmrfx>
in ##javascript, saying !help on the channel returns:
<csmrfx>
13:33 < ecmabot> csmrfx: For help, ask your question. Be patient. Code samples should be pasted in a paste service (see !paste). Tell us 1) what you want to happen, 2) what is actually happening, and 3) any error messages you find (see !debug).
<bubuz>
its for a chef recipe, am getting a syntax error line 23, unexepected ',' expected '}'
<apeiros_>
bubuz: and re douche, in my book, you're the douche. "hey look, I've got a problem, get up your lazy arses and figure out for me what I mean"
<apeiros_>
bubuz: oh wow, a *syntax error*, why didn't you tell. that's already so much better than *something*.
<apeiros_>
anyway, I'm off, since obviously I'm a douche about it.
<bubuz>
sweet
Goles has joined #ruby
<csmrfx>
yeah
<csmrfx>
I hate it when you have to pick peoples brains to sort out *their* problem
<bubuz>
sorry, am very new to ruby
<bubuz>
was just looking for some constructive help
<ejnahc>
이브에 아무 이유 없이 마인크 땅굴 파실분
<bubuz>
obv the wrong place to find it in my case
<apeiros_>
bubuz: providing a usable problem description isn't ruby related.
<apeiros_>
it's just common sense.
Goles has joined #ruby
<apeiros_>
it's the same when you go to the mechanic because of problems with your car (of course, he's happy if you don't properly describe your issue -> billable hours…)
<maetthew>
apeiros_, yes but i can't understand what's wrong
<maetthew>
tried to "yum install sqlite-devel"
<apeiros_>
did you try what it suggests?
<maetthew>
but that package does not exist
<maetthew>
apeiros_, no i don't understand what it suggests other than sqlite-devel :P
<apeiros_>
ok, that'd be important information, you know?
<maetthew>
yeah :P
<apeiros_>
what's wrong is that it can't find the sqlite libraries
<maetthew>
yeah something with this?
<maetthew>
"check your shared library search path (the
<maetthew>
location where your sqlite3 shared library is located)."
<apeiros_>
the header files of it, to be precise
<apeiros_>
it means that either you haven't installed them (which is why it suggests `yum install sqlite-devel`)
<apeiros_>
or that you installed them somewhere where it can't find them (because your shared library search path does not contain them)
Banistergalaxy has joined #ruby
<maetthew>
apeiros_, i think perhaps i'm missing libsqlite3-dev
<maetthew>
this is ubuntu 12.04 btw
<apeiros_>
I don't know yum, I'd suggest you search for an sqlite developer lib
<apeiros_>
that sounds like it could be the missing lib, yes.
<maetthew>
it was
<maetthew>
thanks for trying apeiros_
razibog has joined #ruby
Aqua has joined #ruby
Goles has joined #ruby
vlad_starkov has joined #ruby
matchaw__ has joined #ruby
<csmrfx>
>> help
<eval-in>
csmrfx: Output: "/tmp/execpad-0078b28c52de/source-0078b28c52de:1:in `<main>': undefined local variable or method `help' for main:Object (NameError)\n" (http://eval.in/5255)
<whitequark>
and IIRC chrome, but not sure about that
mercwithamouth has joined #ruby
kil0byte has quit [Ping timeout: 245 seconds]
<postmodern>
Hanmac, everyone knows FFI can't handle C++, which is why developers are encourage to use extern C APIs
<postmodern>
Hanmac, why do you keep messaging me about C extensions>
nomenkun has quit [Remote host closed the connection]
<whitequark>
the problem with using C++ to do external interfaces is that C++ doesn't have a well-defined ABI, unlike C
<postmodern>
ie namespace mangling
<whitequark>
so you either have to keep all of your codebase open-source, use C++ to bind to a C interface (silly), or provide binaries for all existing compilers (not future-proof)
<whitequark>
so it simply doesn't make sense to write a C++ FFI library
sayan has quit [Read error: Connection reset by peer]
kil0byte has joined #ruby
Dario_ has joined #ruby
gyre007 has joined #ruby
<Hanmac>
you are guys are allways saying that FFI is better, i only want to point to you that it isnt
breakingthings has joined #ruby
dross has quit [Quit: leaving]
Takehiro has quit [Remote host closed the connection]
dross has joined #ruby
Dario_ has quit [Ping timeout: 246 seconds]
Virunga has quit [Remote host closed the connection]
Virunga has joined #ruby
<im0b>
Hi! does anyone here has a running app with pusher and webhooks, it seems like its down can anyone confirm :( ?
gyre007 has quit [Ping timeout: 252 seconds]
Guest25886 has quit [Read error: Connection reset by peer]
<Quadlex>
puts "Merry Christmas World"
* breakingthings
puts "Ho "*3
<whitequark>
Quadlex: not "world", at least not yet.
<ChrisBolton>
I spoke with the creator of the gem and she commented it was a pretty hacked together solution for trying to access this API. I am brand new to SOAP and therefore haven't taken the time to do anything beyond trying to get it to work.
gyre007 has quit [Read error: Connection reset by peer]
<rking>
Aha, k.
<rking>
ChrisBolton: The tests aren't passing. =\
karakhul has joined #ruby
<karakhul>
HI. Is there a cython for ruby?
<rking>
798 failures, 78 passes.
cakehero has joined #ruby
<karakhul>
Like cuby or something haha
<rking>
karakhul: You realize that probably most of us don't know what cython is, right?
<karakhul>
rking: well at least some of you should be acquainted with it, just like how i am with ruby
<ChrisBolton>
rking: Well isn't that fantastic.
<rking>
Yeah, I just mean it's a courtesy to save us from having to search the web.
mercwithamouth has quit [Ping timeout: 265 seconds]
<rking>
ChrisBolton: I don't really know what to say on this one. It has a rather convoluted way of passing around that wsdl value. I'd probably suggest debugging this at a higher level; like start by finding a version of the repo that has tests that pass, then configure that.
<karakhul>
rking: well there aren't really many finds on the web
slainer68 has joined #ruby
<ChrisBolton>
rking: I appreciate you taking the time. I'll keep digging. I might need to scrap it and write my own gem.
joshman_ has joined #ruby
thone has joined #ruby
<rking>
ChrisBolton: Yeah. You could use this as a reference point, but writing a Savon Client is not hard.
<ChrisBolton>
rking: Having not handled a SOAP API before I hesitated writing my own gem but the amount of work it would take to get this one working seems like writing my own is probably the way to go.
<karakhul>
rking: thank you, ill take a look at it
<jonahR>
666 people on this room
thone_ has quit [Ping timeout: 250 seconds]
<jonahR>
not anymore :(
gyre008 has quit [Remote host closed the connection]
<rking>
ChrisBolton: Reading this code, I don't trust its author to write code that is simple and works. Frankly looks like a Java programmer's first week in Ruby.
nomenkun has quit [Remote host closed the connection]
Siphonblast has quit [Read error: Connection reset by peer]
eldariof has quit [Ping timeout: 255 seconds]
Siphonblast has joined #ruby
pmros has joined #ruby
Siphonblast has quit [Read error: Connection reset by peer]
<pmros>
hi!
Siphonblast has joined #ruby
cantonic has quit [Ping timeout: 246 seconds]
sayan has joined #ruby
<katherinem13>
pmros: What's the deal with you randomly pming me all the time? I don't know you, it's generally not considered polite to PM strangers without asking first.
<pmros>
sorry
cantonic has joined #ruby
karakhul has quit [Remote host closed the connection]
v0n has joined #ruby
cousine has joined #ruby
sepp2k has joined #ruby
Cyclohexane has left #ruby [#ruby]
cantonic has quit [Client Quit]
slainer68 has joined #ruby
razibog has quit [Quit: Leaving.]
razibog has joined #ruby
ewag has joined #ruby
cantonic has joined #ruby
Siphonblast has quit [Read error: Operation timed out]
Siphonblast has joined #ruby
matip__ has joined #ruby
sayan has quit [Ping timeout: 252 seconds]
soulcake has joined #ruby
cantonic has quit [Ping timeout: 246 seconds]
blaxter has joined #ruby
alexspeller has joined #ruby
matip_ has quit [Ping timeout: 260 seconds]
katherinem13 has quit [Remote host closed the connection]
katherinem13 has joined #ruby
ananthakumaran has quit [Ping timeout: 252 seconds]
ippif has joined #ruby
rondale_sc has joined #ruby
matrixise has joined #ruby
iamjarvo has quit [Quit: Leaving.]
slainer68 has quit [Remote host closed the connection]
<apeiros_>
rking: yes, and the right way to deal with it is NOT to blame the victim
foohey has quit [Remote host closed the connection]
<apeiros_>
indeed, pointing out the perpetrator IS the right thing.
foohey has joined #ruby
<rking>
A "victim"? Of a /privmsg? Did we file a police report yet? I sure hope so.
<apeiros_>
rking: so why so sensitive about outing it in public if it isn't that bad?
<apeiros_>
it's just a public message after all…
<apeiros_>
(following your own logic…)
<Tabrenus>
this is why I use python more
tenmilestereo has joined #ruby
jonathanwallace has quit [Ping timeout: 252 seconds]
<rking>
Trying to trash someone's reputation in public, for anything, without first offering them a gentle correction privately, is something I don't think is cool.
<apeiros_>
rking: and you know that she didn't do exactly that how?
<apeiros_>
(or he)
<katherinem13>
Asking someone why they are doing something != trashing their reputation.
<apeiros_>
also that
Virunga has quit [Remote host closed the connection]
<diegoviola>
i'm trying to pass some ruby object to a rake task, could i pass it directly as an argument or i have to json encode the object to pass it?
<apeiros_>
diegoviola: what do you mean "pass it to a rake task"?
Jasko has quit [Read error: Connection reset by peer]
<Banistergalaxy>
Hehe
<rking>
apeiros_: I read between the lines, and since katherinem13 didn't deny it, that's more confirmation.
<apeiros_>
rking: anyway, suggesting not to use a female name is outright chauvinism and you should be ashamed for that.
<diegoviola>
apeiros_: i have an object, an instance variable that contains a hash, i want to be able to use that variable in the rake task
Jasko has joined #ruby
<rking>
diegoviola: You might like JSONY. It's sort of designed as a stripped-down JSON suitable for CLI
<apeiros_>
diegoviola: then how do you invoke the rake task?
<apeiros_>
diegoviola: ok, via the shell then - yes, use a serialization, like json, marshal or yaml
<katherinem13>
rking: What didn't I deny?
<apeiros_>
I wonder whether calling a rake task like that is a good idea, though
<diegoviola>
apeiros_: thanks
<apeiros_>
diegoviola: you may want to refactor that task to a library method, which you can call directly
nomenkun has joined #ruby
<apeiros_>
(and call the same lib method from the rake task)
terrorpup has joined #ruby
<rking>
apeiros_: If it wasn't such an incredibly consistent cause:effect, I'd agree. But find me one single example of a perosn on IRC, a web forum, etc., where a female nick gets equal attention as the others.
<diegoviola>
apeiros_: right, thanks
<rking>
katherinem13: That you said anything to him privately before calling him out, here.
<apeiros_>
rking: you're creating a self-reinforcing system that way. that's stupid, sorry.
cantonic has joined #ruby
<apeiros_>
rking, katherinem13: anyway, if you/we want to continue this discussion, then lets please move it on to a different venue.
jonathanwallace has joined #ruby
<terrorpup>
Hi, can I ask rails question here do I need to go if there is a #rails channel?
<rking>
terrorpup: #RubyOnRails
<apeiros_>
terrorpup: #rails is not the rails channel, mind you
<apeiros_>
#ror/#rubyonrails is
<apeiros_>
(#ror forwards to #rubyonrails)
<katherinem13>
apeiros_: Meh, no need to continue it really, I just wanted to ask him why he was doing it, which was accomplished.
cantonic has quit [Client Quit]
<terrorpup>
thanks
cantonic has joined #ruby
terrorpup has quit [Quit: Leaving]
jgrevich has joined #ruby
mahmoudi_ has joined #ruby
ippif has quit [Quit: Computer has gone to sleep.]
jonathanwallace has quit [Ping timeout: 265 seconds]
cantonic_ has joined #ruby
pmros has quit [Ping timeout: 265 seconds]
slainer68 has joined #ruby
cantonic has quit [Ping timeout: 265 seconds]
cantonic_ is now known as cantonic
slainer68 has quit [Remote host closed the connection]
nomenkun has quit [Remote host closed the connection]
jgrevich_ has joined #ruby
jgrevich has quit [Ping timeout: 265 seconds]
jgrevich_ is now known as jgrevich
awestroke has joined #ruby
dsdeiz has joined #ruby
adeponte has joined #ruby
mahmoudi_ has quit [Quit: Computer has gone to sleep.]
kil0byte has quit [Remote host closed the connection]
adeponte has quit [Remote host closed the connection]
johnmilton has joined #ruby
eldariof has joined #ruby
emmanuelux has joined #ruby
alexspeller has quit [Remote host closed the connection]
Chryson has joined #ruby
lenovodroid has joined #ruby
tenmilestereo has quit [Quit: Leaving]
cantonic_ has joined #ruby
sayan has joined #ruby
pmros has joined #ruby
adeponte has joined #ruby
cantonic has quit [Ping timeout: 255 seconds]
cantonic_ is now known as cantonic
timonv has quit [Remote host closed the connection]
ananthakumaran1 has joined #ruby
s1n4 has joined #ruby
ananthakumaran has quit [Ping timeout: 252 seconds]
cantonic_ has joined #ruby
lorn has quit [Ping timeout: 265 seconds]
Banistergalaxy has quit [Ping timeout: 244 seconds]
nyuszika7h has quit [Quit: Here we are, going far to save all that we love - If we give all we've got, we will make it through - Here we are, like a star shining bright on your world - Today, make evil go away!]
<slash_nick>
My little brother realized today that he can't burn a movie onto a CD... family intended to give away videos of some Christmas program to friends
<savant>
yeah i'd try kinkos
dsdeiz has joined #ruby
<slash_nick>
members where group is "control": 5001... members where group is "experimental": 5001.... I think my gem works
<apeiros_>
savant: um, yeah, the inflector gem *is* rails
<apeiros_>
or rather, part of
<apeiros_>
so… what havenn said :-p
<havenn>
you can burn a video on a cd, a lot of DVD players support VCD playback.
<savant>
apeiros_: haha
<savant>
w/e
<slash_nick>
havenn: size is the problem
<havenn>
slash_nick: Ahh, kk.
<savant>
php works well for me when I don't use wordpress or whatever
<savant>
use a framework like an ADULT
<apeiros_>
meh
<apeiros_>
adults build their own toys
<savant>
nah
<savant>
adults use well-tested toys
<savant>
i would never build my own framework. seems duplicative.
<slash_nick>
I'm pretty psyched that ran well.... perfect balance of control and experimental... but I'm concerned because I expect a rand(0..7) offset...
<apeiros_>
well-tested is for business. you wouldn't use toys in business, would you?
* slash_nick
dumps db and runs again
<savant>
apeiros_: what would you classify as a toy? the framework you use?
<apeiros_>
no, the things I build myself
<apeiros_>
I build them to have fun
<apeiros_>
thus toy
<savant>
true I guess
<savant>
at the moment, I have a small sinatra app built on top of capistrano and a log tailing tool built in python
<savant>
I guess both would be "toys" except they are both in use in production
<apeiros_>
you reimplemented `tail -f` in python? o0
<savant>
to be honest its mostly a learning experience
crackfu has quit [Remote host closed the connection]
<savant>
lots of our work infrastructure is python
<savant>
and my day is spent writing ruby for capistrano and chef
<savant>
so I figured i should branch back into python
<savant>
instead of stuff in php
<slash_nick>
awesome... 49 experimental, 51 control... looks a little more trustworthy
<slash_nick>
How would I test the "human unpredictability" of this algorithm
<savant>
slainer68: what are you writing?
<slash_nick>
create 1000... each time, guess the outcome based on which group has more... record the number of wrong guesses
<savant>
so a neural net?
<slash_nick>
savant: I think that was directed at me... when I create a patient, I need it randomly assigned to either 'experimental' or 'control' group... Pure random has too much variance between groups... Round robin is too predictable
<slash_nick>
It's tested... it works... I just want to put some number/rating on how unpredictable the algorithm is
Solnse has joined #ruby
<savant>
so then why dont you compare it to both round robin and pure random?
<slash_nick>
savant: that wouldn't provide useful information..
<apeiros_>
"Pure random has too much variance between groups" <-- hu?
<apeiros_>
you're using Kernel#rand, yes?
<apeiros_>
because Kernel#rand uses a mersenne twister, which is very evenly distributed
<slash_nick>
here's a few "imbalances" for 10000... 8, 144, 52, 194, 190, 12, 6
cakehero has joined #ruby
<apeiros_>
slash_nick: and what's that in percentage?
<alexspeller>
I'm no mathematician but isn't the idea if it's truly random (or even reasonable pseudorandom) you could at any time get a result that's not what you what, even though the probability of that is small
* apeiros_
bets that chances to mess up increase with more complex schemes
arturaz has quit [Remote host closed the connection]
<slash_nick>
I'm excited to test the "predictability" of the algorithm
<apeiros_>
rand < 0.5 - and in the very very rare case that you're off too far, bypass rand and fill up the smaller basket
<slash_nick>
the prediction will always be made for the group with less entrants
<slash_nick>
apeiros_: that's essentially what I'm doing
<slash_nick>
@groups.sample ... if there's too many in this group, it goes in the other
<apeiros_>
you should only do that at the end of assigning people
<slash_nick>
too many is defined as "x > y + rand(7)"... so "too many" has a random definition
<apeiros_>
i.e. if you know that 10k people will be assigned, start doing it at e.g. 9.9k people
<apeiros_>
otherwise you kill the randomness
<slash_nick>
apeiros_: the problem is I don't know how many
<oqa>
fuck.. my idea just broke itself when I autoupdated some plugins
<apeiros_>
then you can't test anyway
<slash_nick>
it could be 100000, 1million, half a million...
<apeiros_>
well, you can ensure it to stick within certain bounds
<slash_nick>
that's what I want... I don't want it falling out of bounds on the last entry
<apeiros_>
but the narrower those are, the worse the randomness
<oqa>
no editor windows open and there's no way to access preferences to disable the plugins
<slash_nick>
apeiros_: I'm honestly happy with the pure rand approach
banisterfiend has joined #ruby
* slash_nick
shrugs
Solnse has quit []
<slash_nick>
I could make that rand(7) bit grow with the population
<slash_nick>
I'm going to take a break from the discussion and write another module to return some "predictability" info
benlieb has quit [Quit: benlieb]
<slash_nick>
round_robin should be the most predictable
<apeiros_>
I'd just define a threshold and bypass rand entirely if the threshold is crossed
<apeiros_>
I'd probably also log how many such cases you actually have
<apeiros_>
(and the threshold should not kick in before N patients have been assigned - law of the large numbers…)
dr_neek has quit [Quit: dr_neek]
<apeiros_>
(because as said, at patient 2, you have a 50% chance to end up with 100/0)
cableray has joined #ruby
banisterfiend has quit [Ping timeout: 265 seconds]
<slash_nick>
at patient 1 you have 100% chance to end up with 100/0 (being captain obvious :))
ewag has quit [Ping timeout: 250 seconds]
<apeiros_>
right
<apeiros_>
teh horror!
<apeiros_>
what shell we do?!
matchaw_ has joined #ruby
<slash_nick>
apeiros_: that proves it's impossible...we've wasted too much time already
lenodroid has joined #ruby
<slash_nick>
can't even create one record evenly distributed between two groups... how are we going to create billions?
lenovodroid has quit [Read error: Connection reset by peer]
iamjarvo has quit [Quit: Leaving.]
jonahR has quit [Quit: jonahR]
<apeiros_>
ze fail
Marius has joined #ruby
<waxjar>
didn't read everything, but isn't the idea that the experimental group and the control group are of equal size?
Y3K has joined #ruby
nomenkun has joined #ruby
<Y3K>
Hi all. I've just installes Ruby 1.9.3, it's required from another software I need. I want to know if it's safe to remove all the gems that come with it by default.
moshee has quit [Ping timeout: 245 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
breakingthings has quit [Ping timeout: 255 seconds]
<slash_nick>
ew, 100 runs of my preferred algo had 64 correct predictions...
breakingthings has joined #ruby
<waxjar>
if that's true, then i'd just make an array with a load of group numbers (say 500 1, 500 2) and take one randomly from the array
<waxjar>
and delete it from the array of course
<slash_nick>
waxjar... assuming the study stops with 1000 members, that'd be perfect...
<slash_nick>
it may stop at 500... it may go on to 100000
<waxjar>
well that's not a problem, is it?
ddd1 has joined #ruby
<slash_nick>
how many group numbers do I put in my array?
<slash_nick>
i guess, when it empties, generate some more...
<waxjar>
based on the number of participants and the number of groups?
<slash_nick>
this experimentation is leading me to pure rand
ddd1 is now known as ddd
tommyvyo has joined #ruby
<Y3K>
Anyone? Is it safe to remove ALL the gems?
<slash_nick>
waxjar: the number of participants is unknown
<slash_nick>
Y3K: depends on the gemspec/Gemfile
<slash_nick>
are the gem versions locked down? will your project break if you reinstall the gems and they get different versions?
Jasko has quit [Read error: Connection reset by peer]
<Y3K>
slash_nick: I just need ruby for the heroku cli, it looks like it only need the standalone version of it (no gems)
Jasko has joined #ruby
<Y3K>
How ever, a fresh install of ruby contains about 5-6 gems with it.
Guest29851 has quit [Ping timeout: 245 seconds]
emmanuelux has quit [Quit: emmanuelux]
<Y3K>
slash_nick: They doesn't "hurt" of course, just wanna know if could be secure remove them.
<waxjar>
did you already install the heroku tool belt? it might be dependencies of that
<Y3K>
waxjar: Hmmm yes, it's installed now. Also, it's pretty undocumented (so I don't know what are its deps)
<Y3K>
Well, I'll leave them just like that, thanks for your help though ;-)
Y3K has left #ruby [#ruby]
emmanuelux has joined #ruby
<slash_nick>
We barely survived the end of the world... already we're worrying about y3k
<waxjar>
you can check with gem dependency [gemname] if they're dependencies of heroku or not
<waxjar>
i think they are, i get about 5 for them, too
<slash_nick>
he left
<waxjar>
ah
<waxjar>
anyway, how can you not know your n slash_nick?
whitedawg has joined #ruby
g_bleezy has joined #ruby
<slash_nick>
waxjar: I don't know how many patients this facility will recieve during the course of the study
<waxjar>
ah, i see
<slash_nick>
1..infinity
<slash_nick>
surely not infinity, but ya know
<slash_nick>
infinity - 1
<slash_nick>
lol
breakingthings has quit [Quit: mer chrimmus]
<waxjar>
do you need a random thingy for it though, wouldn't one to group 1, one to group 2, one to group 1, one to group 2, etc work?
<slash_nick>
waxjar: if I want doctors fudging the experiments results
<slash_nick>
"You look like you would respond to incentives... I'll just enter this other patient before you"
<slash_nick>
Round robin is definitely too predictable... the question is, is random too random?... it's looking like random is sufficient, but I might need to provide some boundaries
Xeago has joined #ruby
joshman_ has quit [Quit: Computer has gone to sleep.]
<slash_nick>
anyway, it's a bunch of fun
<waxjar>
if you go truly random you might end up with a very small group and a very big group and if you're gonna do something about that afterward, you're no longer random
<slash_nick>
not random is okay, so long as the doctors don't know the rhythm
<slash_nick>
I could do it alphabetically if I knew patients last names were evenly distributed A-Z
<waxjar>
if you say in advance, this person no matter what is going in this group you're not basing your decision on any attributes of the person or anything, still pretty random id say. dunno if that's allowed tho
mahmoudi_ has quit [Quit: Computer has gone to sleep.]
<slash_nick>
Right now I pick a random group... if that group appears to be too full ('too full' itself has a random definition), then the patient falls in the other group
<waxjar>
you won't know what too full is tho, if you don't know your n, right?
PragCypher has quit [Quit: Leaving]
<slash_nick>
waxjar: I don't know the eventual n... I will always know the current n
<waxjar>
isn't there a standard procedure? i can imagine more people having this problem
<slash_nick>
waxjar: yeah, they're are papers written on this
vjt has joined #ruby
<slash_nick>
waxjar: it's not a roadblock... it's a discussion :)
autumn has quit [Remote host closed the connection]
Nahra has joined #ruby
cantonic has joined #ruby
zastern has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
alanp_ has joined #ruby
Aqua has quit [Ping timeout: 265 seconds]
nomenkun has joined #ruby
nari_ has joined #ruby
zigomir has joined #ruby
Aqua has joined #ruby
alanp has quit [Read error: Operation timed out]
timur has joined #ruby
seich has joined #ruby
<kalleth>
i fixed it
<kalleth>
i was using .tap wrong fsr
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
Marius has quit []
samuel02 has quit [Remote host closed the connection]
stopbit has quit [Quit: Leaving]
<ddd>
i like the spare-cycles sharing. i let my computer do World Community Grid all day. love this MBP. Doesn't slow me down at all, quad-core i7, 16GB of RAM, I let it take 50% of the CPU at all times. (actually thought that would screw with me, but this system is pretty nice. Can even play Portal 2 on high settings while its working the projects.
<ddd>
gah, sorry folks. hit the wrong chan win
Jasko has quit [Read error: Connection reset by peer]
c0rn has joined #ruby
Jasko has joined #ruby
<timur>
hey guys, i'm trying to use the rubytree gem in rails and it looks like there is a conflict between hirb/lib/tree.rb and rubytree/lib/tree.rb. Hirb gets loaded with the application and subsequent require 'tree' just returns false. what's the workaround for this?
mahmoudi_ has joined #ruby
whitedawg has quit [Quit: Leaving.]
v0n has quit [Ping timeout: 250 seconds]
<canton7>
timur, off-topic, but to be it doesn't look like hirb/lib/tree.rb exists :P
johnmilton has quit [Remote host closed the connection]
<timur>
canton7: it was an approximation. here's the full path: hirb-0.6.2/lib/hirb/helpers/tree.rb :P
<timur>
i guess one solution is not to include hirb. but is there no way to have both hirb and rubytree loaded?
<canton7>
and how are you requiring hirb/.../tree.rb? I would imagine you're doing a 'require "hirb/helpers/tree"'? In which case it shouldn't ignore another 'require "tree"'....
<canton7>
ah, realised I'd missed a bit of info
<timur>
canton7: I'm not doing it explicitly, actually. I realized Rails manages to load it when it does require File.expand_path('../../config/environment', __FILE__) (in spec_helper.rb)
<timur>
speaking of which, are Rails questions fair game here or is there a better channel for it?
<canton7>
we're not well versed in rails here at all. #rubyonrails is normally where we direct people
cantonic has quit [Quit: cantonic]
<atmosx>
blah too tired to write any code
<atmosx>
I'm gonna grab stephenson and get to bed
<atmosx>
night all
<timur>
canton7: got it, makes sense. this is definitely a rails specific mess :(
<canton7>
timur, it does sound rather weird, that require's getting so confused
c0rn has quit [Quit: Computer has gone to sleep.]
<timur>
canton7: agreed. i tossed the hirb gem from the gemfile, which then led to the same issue, except it now collided with the netaddr gem. There's gotta be some way to avoid these collisions
atmosx has quit [Quit: And so the story goes…]
<canton7>
is your LOAD_PATH getting fecked anywhere? The docs say require refuses the load the *same* file twice, which implies that require's trying to include the same file multiple times
<canton7>
(as opposed to different files being included, and require getting confused and only including one)
<canton7>
The solution to all that is of course namespacing. gems' sub-files are stored in gemdir/lib/gemname/file.rb, $LOAD_PATH is set to include gemdir/lib, and you require gemname/file
<canton7>
that way, so long as 'gemname' is unique, you don't get this problem
perun_ has quit [Ping timeout: 252 seconds]
Virunga has joined #ruby
apeiros_ has quit [Remote host closed the connection]
hoelzro|away is now known as hoelzro
apeiros_ has joined #ruby
alexspeller has quit [Remote host closed the connection]
Nahra has quit [Quit: leaving]
joofsh has quit [Read error: Operation timed out]
Jasko has quit [Read error: Connection reset by peer]
lenovodroid has joined #ruby
Jasko has joined #ruby
<timur>
canton7: i'm fairly certain Rails messes with the LOAD_PATH. you are correct that it will refuse to load the same file twice
mahmoudi_ has quit [Quit: Computer has gone to sleep.]
<timur>
canton7: is the "gemdir/lib/gemname/file.rb" standard practice? i have seen in a number of gems "gemdir/lib/gemname.rb" or in the case of rubytree, it's even worse
cableray has quit [Quit: cableray]
<canton7>
gemdir/lib/gemname.rb is fine - you include it with 'require "gemname"'. Any other gem files should go in gemdir/lib/gemname/ though, and are included with 'require "gemname/file"'
baroquebobcat has joined #ruby
<canton7>
and I believe it is no more than convention - you can't get around the gemdir/lib bit, as rubygems sets the LOAD_PATH up to point to there. But you could bung a load of stuff straight into gemdir/lib/ if you wanted to be mean
nomenkun has quit [Remote host closed the connection]
jfl0wers has quit [Quit: jfl0wers]
zigomir has quit [Quit: zigomir]
malte_ has joined #ruby
baroquebobcat has quit [Client Quit]
statarb3 has quit [Ping timeout: 264 seconds]
statarb3 has joined #ruby
joofsh has joined #ruby
<timur>
canton7: hmm ok. i'm confused about one othe thing. it looks like the herb gem does the right thing by doing a require 'hirb/helpers/tree', but then require 'tree' resolves to that file as well. can you give some insight into why that happens or point me where to read about it?
nari_ has quit [Ping timeout: 252 seconds]
havenn has quit [Ping timeout: 265 seconds]
<canton7>
that means your LOAD_PATH includes hirb/helpers, I would have thought
io_syl has quit [Quit: Computer has gone to sleep.]
<timur>
canton7: i dumped the LOAD_PATH and it's not in there
<canton7>
which is why I was asking whether rails had screwed around with it
<canton7>
hmm, then I have no idea what on earth is going on
<canton7>
are you absolutely, 100% sure 'require"tree"' is resolving to hirb/helpers/tree?
<timur>
hang on, let me put this in pastebin, so it's easier to talk about it