<sparr>
nofxxx: both are getting turned into ":foo: bar" in the yaml
<sparr>
I found a workaround... if I use => instead of : when defining my hashes, the yaml ends up the way I want
padi_ has quit [Remote host closed the connection]
milardovich has joined #ruby
<nofxxx>
sparr, because it's a string... "foo" => . Colon will always get you symbol
<sparr>
good to know
mostlybadfly has quit [Quit: Connection closed for inactivity]
<sparr>
I thought foo: would get me :foo and "foo": would get me foo
exagerado has quit [Remote host closed the connection]
padi_ has joined #ruby
<nofxxx>
sparr, but the yaml looks way better with symbols imho
zacts has quit [Ping timeout: 240 seconds]
<sparr>
none of my strings have spaces in them, so it's :foo vs foo and I don't like the symbol there
<sparr>
more importantly, the files I'm trying to mimic don't have symbols for keys in the yaml
biberu has quit []
padi_ has quit [Ping timeout: 240 seconds]
im314ous has joined #ruby
<nofxxx>
sparr, ops sorry I did the confusion.. yeah, string looks better... :foo: vs foo:
milardovich has quit [Remote host closed the connection]
justicefries has quit [Quit: WeeChat 1.7]
milardovich has joined #ruby
mwlang has quit [Quit: mwlang]
justicefries has joined #ruby
bruce_lee has quit [Ping timeout: 260 seconds]
bigtawm has joined #ruby
<bigtawm>
I just finished reading the well grounded rubyist. Should I move on and read eloquent ruby or should I hop into the ruby on rails tutorial and come back to eloquent ruby?
<nofxxx>
bigtawm, build something pure ruby... create/help some gem
<bigtawm>
nofxxx, any good project ideas for the level of knowledge well grounded rubyist leaves you at? I would just create a console app right?
<nofxxx>
bigtawm, yeah... nothing beats a console puts and gets app to learn =D
<bigtawm>
I just created a command line chess game in ruby, and Im having trouble thinking of a new fun project lol
<nofxxx>
that's cool!, as in Qe3 ... and it replies CHECK?
<nofxxx>
totally forgot the notation... yrs don't play a game... sad
<elomatreb>
The best practice programs are the ones you actually use yourself, any tool you wish you had?
<nofxxx>
yeah ^
gloscombe_ has quit [Quit: gloscombe_]
justicefries has quit [Quit: WeeChat 1.7]
<bigtawm>
Yeah you pick the position you want to move and where you want to move to and it will reply with check, checkmate or stalemate its pretty cool and it was fun to program. I also play it from time to time in class haha
mwlang has joined #ruby
tau has quit [Read error: Connection reset by peer]
d5sx43 has joined #ruby
<nofxxx>
bigtawm, very cool man. If you want to keep on that app you might add some curses board hehe, or maybe a sinatra app if you are looking for webdev
tau has joined #ruby
<nofxxx>
sinatra app and websockets... truth is that this will include a lot of JS in this ruby talk
tau has quit [Remote host closed the connection]
hutch34 has joined #ruby
<nofxxx>
but there's some js ready board iirc
d5sx43 has quit [Client Quit]
cahoots has quit [Ping timeout: 258 seconds]
<bigtawm>
elomatreb: none that I can think of off the top of my head. I feel like I know how to program but cant think of any useful projects that dont have a gui or web component.
enterprisey has quit [Remote host closed the connection]
cahoots has joined #ruby
<nofxxx>
Gui and ruby are unfortunely not friends... we had shoes but they ruined it with java
<elomatreb>
Nothing wrong with apps having a web component, it doesn't necessarily mean you have to learn a big framework stack like rails or complicated frontend stuff
<nofxxx>
now prob better some gtk/qt thing
<cahoots>
{/quit
cahoots has quit [Client Quit]
<elomatreb>
E.g. try a small Sinatra app maybe
<bigtawm>
nofxxx: I was thinking about trying out sinatra and linking it to my chess app or this tic tac toe game I wrote. I was also thinking about building an AI for my tic tac toe game
tau has joined #ruby
<nofxxx>
now web ruby is full of nice stuff bigtawm ... sinatra/padrino/rails..
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<bigtawm>
Yeah I want to learn rails so I can make web apps and then maybe learn ios and use rails as the API to drive the ios apps
<nofxxx>
bigtawm, you can use cordova too and use JS. Vue.js ftw!
sepp2k has quit [Ping timeout: 268 seconds]
<nofxxx>
bigtawm, it's a good path to follow... sinatra/padrino then rails. Will make things very clear
brent__ has quit [Remote host closed the connection]
tau has quit [Remote host closed the connection]
<elomatreb>
Frontend Javascript is a whole other rabbit hole though, easily just as complex as the Ruby stuff you're also learning
<nofxxx>
if it's just API and singepage you'll might end up keeping in padrino or sinatra... maybe just include activesupport hehe
<bigtawm>
Okay cool I'll look into sinatra then. Yeah I want to learn some front end js after I get some backend exposure.
<nofxxx>
elomatreb, 10x more for me. but that's me... js hates me, I hate him
<nofxxx>
elomatreb, coffee and vue.js makes it bearable
<elomatreb>
Yeah JS is not my favorite language either, I avoid it where possible and just do static pages most of the time
brent__ has joined #ruby
<nofxxx>
hehe coffee and coffeescript
<bigtawm>
There are tons of things I want to learn lol one step at a time though. I almost switched to learning MEAN recently because it seemed like it was getting bigger than rails but Im sticking to ruby for now until I learn haha
Guest64882 is now known as CrazEd
<elomatreb>
I'm one of those strange people that really enjoy writing CSS though
CrazEd is now known as Guest9651
<elomatreb>
Once you learned one programming language, learning another becomes much easier. Same goes for web frameworks and things like databases, they're all similar in the end
<elomatreb>
*you have
<bigtawm>
I'm a CS student and ruby comes easier than JS to me so I figured learning MVC on rails would be best to start out with.
<nofxxx>
elomatreb, but despite it kinda spoiling you, ruby is the best to learn. Makes it clear... so when the others add tons of lines it does scare you...
fuinho_saliente has joined #ruby
<nofxxx>
doesn't*
<bigtawm>
I'm trying to learn rails so I can make some web apps and put them on my portfolio
<bigtawm>
Yeah I figured ruby would be easiest to grasp the overall concept with
fuinho_saliente has quit [Remote host closed the connection]
<elomatreb>
The thing Ruby spoils you most with is the comprehensive, user-friendly standard library. You have to pull in tons of npm packages all the time to get utility functions just readily available in Ruby
<elomatreb>
See also: That whole left-pad disaster
<nofxxx>
bigtawm, yup, hence my advice for your path: sinatra -> rails... also, forget SQL... go redis and mongodb
brent__ has quit [Ping timeout: 260 seconds]
<nofxxx>
you can even use redis as pubsub for your chess games bigtawm
bkxd has joined #ruby
<elomatreb>
I have to disagree, SQL is the way to start imo. Loosening restrictions can come after you understand why SQL places them on you in the first place
<nofxxx>
nopolling websocket
<nofxxx>
elomatreb, dunno, life's too short for sql
yfeldblum has joined #ruby
<elomatreb>
Life's too short to spend time searching a database without indexes
fuinho_saliente has joined #ruby
fuinho_saliente has quit [Remote host closed the connection]
<bigtawm>
I need to work with databases too I need a project with that on my portfolio since Im kinda weak in that area
<nofxxx>
elomatreb, nah... will only be noticeable with > 10k rows.. til there you'll know to "index :that"
fuinhooo has joined #ruby
fuinhooo has quit [Remote host closed the connection]
certainty has joined #ruby
<bigtawm>
After I build a project should I go eloquent ruby or the ruby on rails tutorial though?
ofiuaosi has joined #ruby
<elomatreb>
Uh? Linear search in <10 rows without indexes is potentially 10000 operations, whereas with indexes it 14.
djbkd_ has joined #ruby
<elomatreb>
In 10k rows, I mean
<nofxxx>
elomatreb, but it's all in ram... check it out and you'll see... actually I would bet <50k
<marchelzo>
bigtawm: just do what your heart tells u
<nofxxx>
well, I always discover this stuff after 100k =P
wilbert_ has quit [Ping timeout: 264 seconds]
marr has quit [Remote host closed the connection]
<elomatreb>
nofxxx: IO is only part of the problem, your SQL database is often in RAM too
<bigtawm>
marchelzo, good advice Im sure Ill find the answer to my question after I see how this project goes lol
<nofxxx>
elomatreb, but I was refuting your point on not start with nosql because of it
yfeldblum has quit [Ping timeout: 246 seconds]
<marchelzo>
bigtawm: exactly
<bigtawm>
Okay I have to head to class thanks for all the advice everyone!
<marchelzo>
bigtawm: God bless u take care
<allisio>
nofxxx: Did you just assume JavaScript's gender?
<Aeyris>
how did nosql come up when giving advice to someone who wants to learn rails web app development
<allisio>
"Joke's on them; I was only pretending to be retarded."
<Aeyris>
Pretty much.
<marchelzo>
lmao it was pretty obvious bait
<Aeyris>
Great! Bye now.
padi_ has joined #ruby
bigtawm has quit [Ping timeout: 260 seconds]
<marchelzo>
elomatreb: that's not true though
justicefries has joined #ruby
<marchelzo>
memcached and redis have been popular for longer than the javascript bubble has been promoting NoSQL
tyang has joined #ruby
justicefries has quit [Client Quit]
<allisio>
"Bubble"?
<elomatreb>
Sure, as the name suggests for caching
padi_ has quit [Remote host closed the connection]
justicefries has joined #ruby
<marchelzo>
yes
<marchelzo>
they're still databases, regardless of what you use them for. so to say that everything outside the javascript bubble is in a relational db is not accurate.
tyang_ has joined #ruby
foooooobar has quit [Remote host closed the connection]
padi_ has joined #ruby
bruce_lee has quit [Read error: Connection reset by peer]
<elomatreb>
Personally, if you put a non-relational caching layer in front of a traditional relational db, I'd still count the data as being on a relational db, since it is the persistent layer
aoisud has joined #ruby
<Aeyris>
reddit does this
aoisud has quit [Remote host closed the connection]
saneax is now known as saneax-_-|AFK
tyang has quit [Ping timeout: 246 seconds]
oaisud has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jscheel>
have an update on my ssl issue
<jscheel>
the friggin third party was displaying a different CA cert than they were actually service when I pressed the download button below the cert. I kid you not.
<jscheel>
friggin caching issue
pifon has joined #ruby
milardovich has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
oaisud has quit [Remote host closed the connection]
aoisud has joined #ruby
aoisud has quit [Remote host closed the connection]
aoisdu has joined #ruby
kristofferR has joined #ruby
kristofferR has quit [Client Quit]
aoisdu has quit [Remote host closed the connection]
jdm has joined #ruby
oiausodi has joined #ruby
__Yiota has joined #ruby
sid_fules has quit [Remote host closed the connection]
byte512 has quit [Ping timeout: 259 seconds]
__Yiota has quit [Client Quit]
certainty has quit [Ping timeout: 240 seconds]
cibs has quit [Ping timeout: 260 seconds]
nowhereman has joined #ruby
kristofferR has joined #ruby
cibs has joined #ruby
zeroDi has quit [Quit: WeeChat 1.7]
Azure has quit [Read error: Connection reset by peer]
hooper has quit [Quit: Leaving.]
im314ous has quit [Ping timeout: 260 seconds]
Azure has joined #ruby
cschneid_ has joined #ruby
cschnei__ has joined #ruby
jenrzzz has quit [Ping timeout: 259 seconds]
ruid has quit [Ping timeout: 240 seconds]
benlieb has joined #ruby
cschneid_ has quit [Ping timeout: 260 seconds]
cschnei__ has quit [Ping timeout: 246 seconds]
dionysus69 has quit [Remote host closed the connection]
jose_leeto has joined #ruby
Volsus has joined #ruby
Guest9651 is now known as CrazEd
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
CrazEd is now known as Guest19207
__Yiota has joined #ruby
jokester has quit [Quit: sigfpe]
ElDoggo has quit [Remote host closed the connection]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Channel6 has joined #ruby
dar123 has joined #ruby
Volsus has quit [Quit: Leaving...]
<sparr>
I want to set a variable to foo['bar']['baz'] if that exists, or blah if not
resin has joined #ruby
<sparr>
can I do that without a chain of .key? conditions?
jameser has joined #ruby
j2k has quit [Quit: Connection closed for inactivity]
mtkd has quit [Ping timeout: 268 seconds]
<elomatreb>
sparr: Check out Hash#dig
<allisio>
sparr: You can use the "safe navigation operator", but it's super-ugly with Hash#[]: https://eval.in/749308
cschneid_ has joined #ruby
mtkd has joined #ruby
<sparr>
dig seems prettier than the safe navigation operator
<allisio>
Just felt like a suitable time to bring the operator to your attention; #dig is certainly better in this particular case.
<elomatreb>
It is, it was designed by the rails people to replace the ugly &. hack
benlieb has quit [Quit: benlieb]
<SeepingN>
you guys and your up-to-date ruby
<SeepingN>
:(
<allisio>
2.3?
<SeepingN>
well ok; More up to date
<SeepingN>
far-less-ancient
<SeepingN>
our newest embedded devices are only 2.1.2
<elomatreb>
Embedded Ruby? That seems like a strange choice
cschneid_ has quit [Ping timeout: 246 seconds]
<allisio>
mruby, though.
<sparr>
is there a way to distinguish between a missing parameter and a parameter supplied with its default value?
<sparr>
def foo(x=10) ... foo() vs foo(10)
<sparr>
x:10 that is
hahuang65 has joined #ruby
<allisio>
sparr: You have to do something slightly gruesome like `Default = Object.new; def foo(arg = Default)`.
<SeepingN>
yeah it seems a bit... heavy. But I'm glad they're using the same thing on both sides.
<sparr>
allisio: if I do that, how can I differentiate between foo() and foo(Object.new) ?
<allisio>
sparr: Object identity.
<lupine>
"I identify as a Class"
<sparr>
ahh, so I can check if arg === Default within foo?
oiausodi has quit [Remote host closed the connection]
jschoolcraft has quit [Quit: peace]
<allisio>
sparr: Not quite; Ruby's `===` isn't JavaScript's.
<SeepingN>
=== ain't =
<sparr>
oh, drat. I read about that
hutch34 has quit [Ping timeout: 240 seconds]
<allisio>
#=== (the "case equality" operator) is specially defined on several builtin classes.
tau has joined #ruby
<sparr>
my parameters are floats. can I make a Float object and then check its identity later to see if it's the same one?
<elomatreb>
=== is usually LESS strict than ==, which may be confusing if you're coming from JS. You can almost ignore it, you very rarely use it yourself
<elomatreb>
If you really want to check an objects class, use #is_a?(klass)
<sparr>
elomatreb: that's not what I want
<sparr>
elomatreb: I'm trying to check if a parameter was passed to a method, or not and there was a default value for it
<sparr>
I have `def foo(a=1)` and I want to be able to differentiate between foo() and foo(1)
<elomatreb>
If a can only be a number, you can just assign nil as a default and check for it
SeepingN has quit [Quit: The system is going down for reboot NOW!]
tau has quit [Remote host closed the connection]
<sparr>
allisio: that example has lost the actual value I want for the default
<sparr>
elomatreb: I'm hoping for some solution where the "default" value is still in a location other devs will think to look for it, as it is now in the method definition
<allisio>
sparr: Use the `||=` operator at the very beginning of the method.
<elomatreb>
I'm not quite sure why you want this though, this is the exact same behaviour as defining the default in the signature afaict
duderonomy has quit [Ping timeout: 246 seconds]
ElDoggo has joined #ruby
jtoyy has quit [Remote host closed the connection]
kshitij has joined #ruby
pifon has quit []
tau has joined #ruby
yfeldblum has joined #ruby
KicStart has left #ruby [#ruby]
bot-3 has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
shinnya has quit [Ping timeout: 264 seconds]
yfeldblum has quit [Ping timeout: 246 seconds]
tau has quit [Remote host closed the connection]
tau has joined #ruby
jose_leeto has quit [Quit: Leaving.]
ruid has joined #ruby
ruid has joined #ruby
ruid has quit [Changing host]
ElDoggo has quit [Remote host closed the connection]
tau has quit [Remote host closed the connection]
tvw has quit [Ping timeout: 264 seconds]
tau has joined #ruby
montanonic has quit [Ping timeout: 260 seconds]
tau has quit [Remote host closed the connection]
enterprisey has joined #ruby
tau has joined #ruby
hotpancakes has joined #ruby
hotpancakes has quit [Remote host closed the connection]
mwlang has joined #ruby
d^sh has quit [Ping timeout: 240 seconds]
d^sh has joined #ruby
marxarelli is now known as marxarelli|afk
BackEndCoder has quit [Excess Flood]
BackEndCoder has joined #ruby
EV3RYDAYPR0GRESS has quit [Read error: Connection reset by peer]
EV3RYDAYPR0GRESS has joined #ruby
griffindy has joined #ruby
jenrzzz has joined #ruby
bkxd has quit [Ping timeout: 256 seconds]
Guest19207 is now known as CrazEd
yqt has quit [Ping timeout: 240 seconds]
CrazEd is now known as Guest57336
djbkd has joined #ruby
hotpanca_ has joined #ruby
duderonomy has joined #ruby
bigtawm has joined #ruby
nettoweb has joined #ruby
jdm has quit [Remote host closed the connection]
djbkd has quit [Ping timeout: 240 seconds]
username_ has joined #ruby
jdm has joined #ruby
oetjenj has joined #ruby
duderonomy has quit [Ping timeout: 264 seconds]
duderonomy has joined #ruby
BackEndCoder has quit [Excess Flood]
bigtawm has quit [Quit: Page closed]
im314ous has joined #ruby
BackEndCoder has joined #ruby
milardovich has quit []
libastral has quit [Ping timeout: 256 seconds]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
frbk has joined #ruby
Rodya_ has quit [Quit: Leaving...]
libastral has joined #ruby
nettoweb has joined #ruby
bmurt has joined #ruby
<frbk>
Hey guys. Can anyone help me compile ruby2.4.0 on fedora 25? I keep getting No such file or directory for openssl.so. Also I already installed openssl-devel.
<elomatreb>
frbk: I can't really answer your question, but I always used https://github.com/postmodern/ruby-install to build my rubies and it seemed to take care of such things
certainty has joined #ruby
yfeldblum has joined #ruby
<frbk>
elomatreb: I am using it but I am having issues on my laptop. Desktop compiled without any issues.
itsautomatisch has quit [Ping timeout: 240 seconds]
jameser_ has joined #ruby
_aeris_ has quit [Ping timeout: 240 seconds]
<frbk>
elomatreb: Also it does tell me that all prerequisites installed.
<frbk>
I get this message
<frbk>
Package gcc-6.3.1-1.fc25.x86_64 is already installed, skipping.
<frbk>
Package zlib-devel-1.2.8-10.fc24.i686 is already installed, skipping.
<frbk>
Package zlib-devel-1.2.8-10.fc24.x86_64 is already installed, skipping.
<frbk>
Package bison-3.0.4-4.fc24.x86_64 is already installed, skipping.
<frbk>
Package automake-1.15-7.fc25.noarch is already installed, skipping.
<frbk>
Package libyaml-devel-0.1.6-8.fc24.x86_64 is already installed, skipping.
<frbk>
Package openssl-devel-1:1.0.2k-1.fc25.i686 is already installed, skipping.
<frbk>
Package openssl-devel-1:1.0.2k-1.fc25.x86_64 is already installed, skipping.
<frbk>
Package gdbm-devel-1.12-1.fc25.x86_64 is already installed, skipping.
<frbk>
Package readline-devel-6.3-8.fc24.x86_64 is already installed, skipping.
<frbk>
Package ncurses-devel-6.0-6.20160709.fc25.x86_64 is already installed, skipping.
<frbk>
Package libffi-devel-3.1-9.fc24.x86_64 is already installed, skipping.
<frbk>
Dependencies resolved.
hotpanca_ has quit [Remote host closed the connection]
ruid has quit [Quit: Leaving]
jdm has quit [Remote host closed the connection]
jameser has quit [Ping timeout: 258 seconds]
cdg has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
bot-3 has quit [Quit: Page closed]
_aeris_ has joined #ruby
minimalism has joined #ruby
jokester has joined #ruby
frbk has quit [Quit: Leaving]
elifoster has joined #ruby
cschneid_ has joined #ruby
Derperperd has quit [Ping timeout: 246 seconds]
ElDoggo has joined #ruby
Ruby_Rocks_007 has quit [Quit: Ruby_Rocks_007]
hotpancakes has joined #ruby
jdm has joined #ruby
ElDoggo has quit [Ping timeout: 258 seconds]
Volsus has joined #ruby
Volsus has quit [Client Quit]
Suslov has joined #ruby
bweston92 has quit [Quit: Connection closed for inactivity]
jameser_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg has quit [Read error: Connection reset by peer]
cdg_ has joined #ruby
tyang_ has quit [Read error: Connection reset by peer]
hotpancakes has quit [Remote host closed the connection]
cdg_ has quit [Read error: Connection reset by peer]
astrobunny has joined #ruby
cdg has joined #ruby
BackEndCoder has quit [Excess Flood]
cdg has quit [Read error: Connection reset by peer]
cdg has joined #ruby
Guest57336 is now known as CrazEd
BackEndCoder has joined #ruby
CrazEd is now known as Guest70630
certainty has quit [Ping timeout: 240 seconds]
jdm has quit [Remote host closed the connection]
jdm has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
Ruby_Rocks_007 has joined #ruby
wald0 has joined #ruby
postmodern has joined #ruby
Derperperd has joined #ruby
ElDoggo has quit [Remote host closed the connection]
wilbert_ has joined #ruby
wilbert_ has quit [Client Quit]
mwlang has quit [Ping timeout: 240 seconds]
pilne has quit [Quit: Quitting!]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mwlang has joined #ruby
hotpanca_ has joined #ruby
brn_ has joined #ruby
hotpanca_ has quit [Read error: Connection reset by peer]
hotpancakes has joined #ruby
username_ has quit [Ping timeout: 260 seconds]
d^sh has quit [Ping timeout: 260 seconds]
yfeldblum has joined #ruby
brn_ has quit [Quit: WeeChat 1.7]
xall_ has joined #ruby
d^sh has joined #ruby
<sparr>
elomatreb: using ||= first is the same as putting the default in the signature. what I want is something as close as possible *visually* to putting the default in the signature, but retaining the ability to tell the difference
haraoka has joined #ruby
ElDoggo has joined #ruby
<elomatreb>
sparr: I don't I've understood why you can't just put the default in the signature
kshitij has quit [Quit: Connection closed for inactivity]
hotpancakes has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 246 seconds]
hotpancakes has joined #ruby
astrobunny has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
pawnbox has joined #ruby
hotpancakes has quit [Read error: Connection reset by peer]
ElDoggo has quit [Remote host closed the connection]
zacts has joined #ruby
Derperperd has quit [Max SendQ exceeded]
Derperperd has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Derperperd has quit [Max SendQ exceeded]
Channel6 has quit [Quit: Leaving]
Derperperd has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gix has quit [Ping timeout: 240 seconds]
danielpclark has joined #ruby
d0nn1e has quit [Ping timeout: 246 seconds]
gix has joined #ruby
d0nn1e has joined #ruby
Guest70630 is now known as CrazEd
CrazEd is now known as Guest58575
jnoob22 has joined #ruby
djbkd has joined #ruby
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg has quit [Remote host closed the connection]
brent__ has joined #ruby
jdm has quit [Remote host closed the connection]
jdm has joined #ruby
padi_ has quit []
djbkd has quit [Ping timeout: 258 seconds]
Derperperd has quit [Quit: WeeChat 1.5]
patarr has joined #ruby
marchelzo has quit [Quit: :*]
hutch34 has joined #ruby
skolman has quit [Remote host closed the connection]
<sparr>
I want to know, within the method, whether it was called without the parameter, or with the parameter set to its default
<sparr>
for `def foo(x=1)` I want to be able to tell the difference in foo() and foo(1)
<sparr>
x is still going to default to 1, I just want to be able to answer the question mid-method "did the user provide an x value for this call?)
brent__ has quit [Remote host closed the connection]
<sparr>
"waaaay" being about ten lines, but also buried in a long expression
reverberations has joined #ruby
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dar123 has joined #ruby
enterprisey has quit [Remote host closed the connection]
dar123 has quit [Client Quit]
sneakerhax has joined #ruby
Anonymoose2 has quit [Ping timeout: 256 seconds]
<elomatreb>
sparr: One unrelated thing: In your initialise method, you have the explicit block parameter. You're not actually using the block as an object anywhere, you you can replace the entire if .. end starting in line 77 with `yield if block_given?` and remove the block parameter.
<elomatreb>
It's idiomatic and actually faster, since Ruby doesn't needlessly create a Proc object (which is what the & does)
aupadhye has joined #ruby
astrobunny has joined #ruby
astrobunny has quit [Remote host closed the connection]
astrobunny has joined #ruby
username_ has joined #ruby
<elomatreb>
Uh, ignore that, I misread your code
grant has joined #ruby
nithinbekal has joined #ruby
username_ has quit [Ping timeout: 258 seconds]
pawnbox has quit [Ping timeout: 240 seconds]
enterprisey has joined #ruby
certainty has joined #ruby
SteenJobs has joined #ruby
cschneid_ has quit [Read error: Connection reset by peer]
cschneid_ has joined #ruby
renchan has joined #ruby
cibs has quit [Ping timeout: 256 seconds]
Guest58575 is now known as CrazEd
CrazEd is now known as Guest49110
cibs has joined #ruby
djbkd has joined #ruby
el_ocho[m] has quit [Ping timeout: 255 seconds]
el_ocho[m] has joined #ruby
GeorgeTorwell has quit [Ping timeout: 255 seconds]
pawnbox has quit [Remote host closed the connection]
Guest96018 is now known as olspookishmagus
pawnbox has joined #ruby
cschneid_ has quit [Ping timeout: 246 seconds]
nithinbekal has quit [Ping timeout: 260 seconds]
cfec0b8d has quit [Ping timeout: 240 seconds]
ta_ has joined #ruby
Arpanet69 has joined #ruby
biberu has joined #ruby
pawnbox_ has joined #ruby
teclator has quit [Remote host closed the connection]
xall_ has quit [Ping timeout: 258 seconds]
pawnbox has quit [Ping timeout: 268 seconds]
Jrz has joined #ruby
pawnbox has joined #ruby
pawnbox_ has quit [Read error: Connection reset by peer]
dn` has quit [Quit: dn`]
hotpancakes has joined #ruby
mikecmpbll has joined #ruby
bkxd has joined #ruby
antgel has joined #ruby
xall_ has joined #ruby
pulkit4tech has joined #ruby
Guest22310 is now known as CrazEd
DrCode has quit [Ping timeout: 268 seconds]
CrazEd is now known as Guest25273
flying has joined #ruby
sdwrage has quit [Quit: Leaving]
armin_ is now known as armin
hotpancakes has quit [Read error: Connection reset by peer]
Burgestrand has joined #ruby
patarr has joined #ruby
doublemalt_ has quit [Ping timeout: 246 seconds]
Mortomes|Work has joined #ruby
patarr has quit [Ping timeout: 246 seconds]
bigkevmcd has joined #ruby
Robtop__ has joined #ruby
jsrn_ has joined #ruby
hutch34 has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
CloCkWeRX has joined #ruby
TomyWork has quit [Remote host closed the connection]
aklrcv has joined #ruby
jgnagy has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 246 seconds]
TomyWork has joined #ruby
nithinbekal has joined #ruby
yeticry_ has quit [Quit: leaving]
hutch34 has quit [Ping timeout: 240 seconds]
yeticry has joined #ruby
certainty has quit [Ping timeout: 260 seconds]
tau has joined #ruby
hotpancakes has joined #ruby
hotpanca_ has joined #ruby
tomphp has joined #ruby
harfangk has quit [Remote host closed the connection]
certainty has joined #ruby
hotpancakes has quit [Ping timeout: 246 seconds]
hotpanca_ has quit [Ping timeout: 260 seconds]
mark_66 has joined #ruby
igniting has joined #ruby
Bish has quit [Ping timeout: 240 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bocaneri has quit [Ping timeout: 240 seconds]
Bish has joined #ruby
hinbody has quit [Ping timeout: 260 seconds]
lel- has quit [Ping timeout: 240 seconds]
neuraload has joined #ruby
mhunt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ferr1 has joined #ruby
bigkevmcd has quit [Ping timeout: 240 seconds]
Arpanet69 has quit [Ping timeout: 258 seconds]
LambdaSix has quit [Ping timeout: 268 seconds]
josealobato has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
Beams has joined #ruby
LambdaSix has joined #ruby
bigkevmcd has joined #ruby
bigkevmcd has quit [Max SendQ exceeded]
workmad3 has joined #ruby
bigkevmcd has joined #ruby
bocaneri has joined #ruby
teclator has joined #ruby
_2easy has quit [Quit: Lost terminal]
_2easy has joined #ruby
_2easy has joined #ruby
_2easy has quit [Changing host]
lel has joined #ruby
toretore has joined #ruby
Guest25273 is now known as CrazEd
tvw has joined #ruby
CrazEd is now known as Guest61493
workmad3 has quit [Ping timeout: 260 seconds]
hinbody has joined #ruby
bigkevmcd has quit [Ping timeout: 264 seconds]
LambdaSix has quit [Ping timeout: 264 seconds]
LambdaSix has joined #ruby
bigkevmcd has joined #ruby
workmad3 has joined #ruby
lxsameer has joined #ruby
jenrzzz has joined #ruby
__Yiota has joined #ruby
haraoka has quit [Ping timeout: 256 seconds]
jameser has quit [Ping timeout: 260 seconds]
hutch34 has joined #ruby
__Yiota has quit [Client Quit]
jenrzzz has quit [Ping timeout: 240 seconds]
sid_fules has joined #ruby
saneax is now known as saneax-_-|AFK
sid_fules has quit [Remote host closed the connection]
sid_fules has joined #ruby
hutch34 has quit [Ping timeout: 256 seconds]
doublemalt_ has joined #ruby
Silthias1 has quit [Read error: Connection reset by peer]
Silthias has joined #ruby
cibs has quit [Ping timeout: 240 seconds]
cibs has joined #ruby
hotpancakes has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
Bounga has joined #ruby
jose_leeto has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tvw has quit [Read error: Connection reset by peer]
tvw has joined #ruby
__Yiota has joined #ruby
__Yiota has quit [Client Quit]
catphish has joined #ruby
<catphish>
is there a way to prematurely end a sleep call? or are the only options to use a series of short sleeps or a select() with a self pipe and a timeout?
certainty has quit [Ping timeout: 256 seconds]
Guest90403 is now known as alamar
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
tau has quit [Quit: HAUE]
tvw has quit [Ping timeout: 260 seconds]
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
maattdd_ has joined #ruby
hotpancakes has quit [Ping timeout: 240 seconds]
xen0fon has quit [Quit: xen0fon]
<dminuoso>
catphish: interrupt it.
<dminuoso>
&ri Thread#interrupt
<`derpy>
No results
<dminuoso>
oh.
<dminuoso>
catphish: &ri Thread#wakeup
helpa has quit [Remote host closed the connection]
<allisio>
Does #prepend constitute monkey-patching?
brent__ has joined #ruby
DARPA has quit [Ping timeout: 260 seconds]
<apeiros>
any modification of an existing class is monkey patching
<allisio>
Bish: For reference, you can just say `super` to have all of the arguments passed through untouched.
<apeiros>
so include, extend, prepend all qualify as monkey patching
jameser has quit [Client Quit]
<Bish>
allisio: well, but how does it know how many arguments i expect?
<allisio>
Bish: Computer magicks.
<Bish>
so, will that method expect any amount of arguments?
<apeiros>
password= only ever accepts 1 argument anyway
<Bish>
yeh but what if not.. just curious
<Bish>
to my understanding.. if i left *args out and had "super" instead of "super *args", the method would expect 0 parameters
<apeiros>
then `super` as allisio said, alternatively splat/unsplat (def foo(*args); super(*args))
<allisio>
Bish: Wrong.
<workmad3>
Bish: `super` passes along all arguments given to the existing method... if the superclass method expects more or fewer args than provided, you get an error
<apeiros>
`super` and `super()` behave differently
<Bish>
so.. the answer to my original question is
<apeiros>
sad but true
<Bish>
"just use super"
<Bish>
and you're set.
<allisio>
Of course the arities have to match, but `super` followed by a repetition of the method's signature is always bad.
Guest2813 is now known as CrazEd
CrazEd is now known as Guest98309
bkxd has joined #ruby
<workmad3>
`super` will also pick up if you've reassigned any of the arguments... unless it's a block argument (weird edge-case)
marchelzo has quit [Remote host closed the connection]
<allisio>
How do you assign a block?
<apeiros>
and `super()` will still pass on blocks
<Bish>
ArgumentError: wrong number of arguments (given 1, expected 0
<apeiros>
super and split are some of the most surprising things in ruby
<allisio>
workmad3: `blk` is now a Proc.
conta has quit [Ping timeout: 256 seconds]
synthroid has quit []
hotpancakes has joined #ruby
<workmad3>
allisio: conceptually it's always a block... and `super` doesn't pick up that reassignment
<workmad3>
*proc
<allisio>
That's not true.
<Bish>
that's confusing
<apeiros>
while it can be argued to be an implementation detail - blocks != procs
<workmad3>
allisio: any time you look at a 'block', you see a Proc... there isn't a way to see it as a 'block' unless you go monkeying around in the internals... and if you look at the object ID it also stays the same... so as a conceptual/mental model of ruby, 'blocks' can be said to not exist
<apeiros>
but I guess super's behavior exposes that detail
<allisio>
workmad3: I don't see how obscurantism does anyone any good here.
hotpanca_ has joined #ruby
<allisio>
When you `yield`, it's to a block, not a Proc.
<workmad3>
allisio: what about if you do `def foo(&blk); yield; end`
synthroid has joined #ruby
<workmad3>
allisio: is it really useful at that point to think of the block and the proc as separate entities?
Arpanet69 has joined #ruby
<allisio>
workmad3: Insofar as knowing the difference can prevent a Proc being created, sure.
<apeiros>
the only point of thinking of them as being different is related to performance differences
<workmad3>
^ that's about the only useful criterion IMO...
<allisio>
But it is one.
<workmad3>
and that doesn't really impact the conceptual model of ruby, it's just an implementation-specific performance hack essentially
<allisio>
In any case, we're supposed to be detail-oriented people.
xall_ has quit [Ping timeout: 240 seconds]
hotpancakes has quit [Ping timeout: 264 seconds]
<workmad3>
i.e. ruby could be reimplemented without the performance improvement around 'blocks' not creating an actual Proc object unless necessary, and apart from some performance impacts there would be no observable difference
<allisio>
You can't pass more than one block.
<matthewd>
It both is and isn't. One doesn't think of "x" as being a fundamentally different concept from "x"*50.
Guest38728 has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<workmad3>
allisio: that again doesn't alter the conceptual model... again, if you capture that arg explicitly, it always looks like a Proc, it's just a special calling convention for convenience if you want to get into the weeds ;)
<matthewd>
"obscurantism" might be over-cooking it a bit, but eliding details not relevant to the immediate explanation is a key component of almost all educational approaches
Derperperd has joined #ruby
jscheel has joined #ruby
<workmad3>
matthewd: it's also a key component of abstraction :)
ddrmanxbxfr has joined #ruby
gigetoo has quit [Ping timeout: 260 seconds]
falconer has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
gigetoo has joined #ruby
Derperperd has quit [Quit: WeeChat 1.5]
Derperperd has joined #ruby
chouhoulis has joined #ruby
Snickers has joined #ruby
certainty has quit [Ping timeout: 240 seconds]
LazyLama has joined #ruby
Derperperd has quit [Client Quit]
Derperperd has joined #ruby
Derperperd has quit [Client Quit]
Derperperd has joined #ruby
hotpanca_ has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
ta_ has quit [Remote host closed the connection]
aupadhye has quit [Ping timeout: 240 seconds]
ta_ has joined #ruby
teclator has quit [Remote host closed the connection]
kristofferR has joined #ruby
hotpancakes has joined #ruby
vondruch has quit [Quit: vondruch]
conta has joined #ruby
vondruch has joined #ruby
ta_ has quit [Ping timeout: 240 seconds]
krazedkrish has joined #ruby
lenwood has quit [Ping timeout: 240 seconds]
bmurt has joined #ruby
conta has quit [Ping timeout: 260 seconds]
patarr has joined #ruby
lamicka has joined #ruby
dkdwtq has joined #ruby
agent_white has joined #ruby
LazyLama has quit [Ping timeout: 260 seconds]
<agent_white>
Mornin' folks
<bmurt>
morning
<krazedkrish>
Good Evening @agent_white
blackwind_123 has joined #ruby
ych has joined #ruby
mikkel- has joined #ruby
neuraload has quit [Quit: Leaving]
mikkel- is now known as mjuhl
mikecmpbll has quit [Quit: inabit. zz.]
esObe has joined #ruby
mikecmpbll has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
blackwind_123 has quit [Ping timeout: 260 seconds]
jscheel has quit [Quit: jscheel]
saneax is now known as saneax-_-|AFK
Qchmqs has quit [Ping timeout: 240 seconds]
tenderlove has quit [Read error: Connection reset by peer]
tenderlove has joined #ruby
yeticry has quit [Ping timeout: 240 seconds]
GK___1wm____SU has joined #ruby
krazedkrish has quit [Ping timeout: 246 seconds]
yeticry has joined #ruby
GodFather has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
cdg_ has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
cdg has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
BackEndCoder has quit [Excess Flood]
GK___1wm____SU has quit [K-Lined]
Derperperd has quit [Ping timeout: 260 seconds]
BackEndCoder has joined #ruby
GK___1wm____SU has joined #ruby
GK___1wm____SU has left #ruby [#ruby]
GK___1wm____SU has joined #ruby
fuzzyhorns has quit [Quit: Leaving.]
GK___1wm____SU has quit [K-Lined]
fuzzyhorns has joined #ruby
GK___1wm____SU has joined #ruby
Fernando-Basso has joined #ruby
teclator has joined #ruby
Arpanet69 has quit [Quit: Leaving]
GK___1wm____SU has quit [K-Lined]
SteenJobs has joined #ruby
GK___1wm____SU has joined #ruby
SteenJobs has quit [Client Quit]
GK___1wm____SU has quit [K-Lined]
kristofferR has quit [Read error: Connection reset by peer]
skweek has joined #ruby
kristofferR has joined #ruby
Guest98309 is now known as CrazEd
CrazEd is now known as Guest47863
hotpancakes has quit [Remote host closed the connection]
Silthias has quit [Quit: Leaving.]
sid_fule_ has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
sid_fules has joined #ruby
<bmurt>
is it possible to use the rest-client gem and configure it to always use/pass authentication?
Derperperd has joined #ruby
<bmurt>
meaning, i'm finding myself adding http://<user>:<pass>@ to each RestClient.get
Ruby_Rocks_007 has joined #ruby
Ruby_Rocks_007 has quit [Remote host closed the connection]
djbkd has joined #ruby
cschneid_ has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
ych has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 246 seconds]
solocshaw has joined #ruby
ElDoggo has joined #ruby
GodFather has quit [Quit: Ex-Chat]
ElDoggo has quit [Remote host closed the connection]
vuoto has joined #ruby
ElDoggo has joined #ruby
GK___1wm____SU has joined #ruby
aganov has quit [Remote host closed the connection]
GK___1wm____SU has quit [K-Lined]
pawnbox_ has quit [Remote host closed the connection]
pawnbox has joined #ruby
GK___1wm____SU has joined #ruby
GK___1wm____SU has left #ruby [#ruby]
wald0 has joined #ruby
j2k has joined #ruby
cibs has quit [Ping timeout: 260 seconds]
mwlang has joined #ruby
hahuang61 has joined #ruby
wald0 has quit [Client Quit]
<mwlang>
is it possible to install ruby 1.8.7 on OSX Sierra? I just upgraded from Mavericks and it’s proving quite a challenge to get all my ruby versions working again.
ta_ has joined #ruby
<mwlang>
using rvm for what it’s worth...
* dminuoso
refuses to assist
<dminuoso>
Topic says 2.2.6 is the oldest we should indulge.
<mwlang>
dminuoso: haha. I look forward to the day!
pawnbox has quit [Ping timeout: 264 seconds]
cibs has joined #ruby
<dminuoso>
also
<mwlang>
I’m a Rails 1.x => Rails 4+ specialist. ;-)
<dminuoso>
OSX Sierra?
<dminuoso>
What is OSX Sierra?
* dminuoso
is now making fun of mwlang
<mwlang>
well, hell, they renamed the OS, too! macOS 10.12.3
solocshaw has quit [Ping timeout: 246 seconds]
shinnya has quit [Ping timeout: 260 seconds]
<matthewd>
mwlang: I imagine the answer to "is it possible" is yes.
<mustmodify>
Rack::Session::Cookie is used like a ...
<mustmodify>
oh
vuoto has joined #ruby
<mustmodify>
sorry I had forgotten how rack worked for a second.
hotpanca_ has joined #ruby
ferr1 has quit [Quit: WeeChat 1.7]
amclain has joined #ruby
nowhereman has quit [Ping timeout: 258 seconds]
norbertka has quit [Ping timeout: 260 seconds]
Silthias1 has joined #ruby
hahuang65 has joined #ruby
<mwlang>
dminuoso: haha — you say it all the time. ;-) Haven’t had an issue with rvm on servers in years, so no points gained there…however, definitely having a problem with rvm on my dev box now. :-p
<dminuoso>
that is what a malbolge quine looks like.
<Bish>
what a beauty
_djbkd has quit [Remote host closed the connection]
<dminuoso>
Bish: Yeah. A big bitch about malbolge is that once an instruction is executed, it gets replaced and it's extremely difficult to control what instruction it gets replaced with.
_djbkd has joined #ruby
synthroid has quit [Remote host closed the connection]
sagax has quit [Ping timeout: 240 seconds]
<Bish>
mastering the most stupid language doesn't bring me closer to a holy grail
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
CrazEd is now known as Guest36577
mwlang has joined #ruby
Anonymoose2 has quit [Read error: Connection reset by peer]
skweek has quit [Ping timeout: 240 seconds]
nfk has joined #ruby
tildes_ has joined #ruby
tildes has quit [Ping timeout: 240 seconds]
<sparr>
I've got a ruby library. Users of the library install ruby, do `gem install foo`, then write a script that requires foo, then run their script. Is there an existing framework to package ruby, the library, and a gui editor/IDE with a "run script" button, all into one download?
tildes_ has quit [Ping timeout: 258 seconds]
pawnbox_ has quit [Remote host closed the connection]
jaruga__________ has quit [Quit: jaruga__________]
ldnunes has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 260 seconds]
anisha has quit [Quit: This computer has gone to sleep]
montanonic has joined #ruby
postmodern has joined #ruby
synthroid has joined #ruby
pwnd_nsfw` has joined #ruby
tildes has joined #ruby
itsautomatisch has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
pwnd_nsfw has quit [Ping timeout: 240 seconds]
GinoManWorks has quit [Quit: Leaving]
last_staff has joined #ruby
benlieb has quit [Quit: benlieb]
tildes has quit [Ping timeout: 246 seconds]
alxgsv has quit [Remote host closed the connection]
Guest30061 has quit [Remote host closed the connection]
flopsec has quit [Remote host closed the connection]
Satyajit has quit [Remote host closed the connection]
jamesaxl has quit [Quit: Leaving]
<cschneid_>
testing a sinatra api - doing the full path tests - what is a good name for that test/*** directory? "acceptance" "integration" "...."?
tyang_ has joined #ruby
mtkd has quit []
doublemalt_ has quit [Quit: Leaving]
tildes has joined #ruby
tau has quit [Remote host closed the connection]
<chrisseaton>
Hi is there a Ruby metaprogramming method to get and set global variables?
tau has joined #ruby
skolman has quit [Remote host closed the connection]
tau has quit [Remote host closed the connection]
tyang has quit [Ping timeout: 256 seconds]
tyang__ has joined #ruby
skolman_ has joined #ruby
JeanCarloMachado has joined #ruby
tau has joined #ruby
tyang__ has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 268 seconds]
szulak has joined #ruby
tau has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
millerti has joined #ruby
tau has joined #ruby
tildes has quit [Ping timeout: 264 seconds]
duderonomy has joined #ruby
tyang_ has quit [Ping timeout: 256 seconds]
skolman_ has quit [Ping timeout: 246 seconds]
hotpanca_ has quit [Remote host closed the connection]
<havenwood>
chrisseaton: Nope. There are a few gems that implement Kernel#global_variable_{get,set} but they either eval or don't use real globals.
* baweaver
thinks this smells like a horrible idea
synthroid has quit []
<chrisseaton>
baweaver: I'm implementing Ruby C extensions using Ruby, so I need to do something to implement rb_gv_get and rb_gv_set, there's not really any other way around
Azure|dc has joined #ruby
<chrisseaton>
baweaver: I'm not recklessly using metaprogramming for the sake of it
Azure has quit [Read error: Connection reset by peer]
<chrisseaton>
baweaver: plus I have a fast version of eval, so it shouldn't be slower than having the code literally in the source file, and I'll use a binding for the value for gv_set, so it should be hygienic too
sid_fules has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 240 seconds]
lxsameer has quit [Quit: WeeChat 1.6]
nowhereman has joined #ruby
chopin has joined #ruby
<dminuoso>
chrisseaton: I have a solution, do you care whether you rely on objdump as an external tool?
dionysus69 has quit [Ping timeout: 268 seconds]
<chrisseaton>
dminuoso: objdump as in the command line binary tool? I'm running on my own Ruby VM so it won't be binary compatible like that, but go on...
<dminuoso>
chrisseaton: Ah, I was thinking of using Fiddle::Function.
<chrisseaton>
dminuoso: to call rb_gv_get and _set? I don't have those functions - they're the ones I'm trying to implement in the first place
<dminuoso>
chrisseaton: That is highly intriguing, as I was thinking about a composing a similar gem -> but I was going to expose it through raw force using the might of Fiddle.
tomphp has joined #ruby
<chrisseaton>
dminuoso: that would be useful for writing specs for the cext API - at the moment ruby/spec sort of does that manually, and it's horrible
blackwind_123 has quit [Ping timeout: 246 seconds]
Guest36577 is now known as CrazEd
CrazEd is now known as Guest79143
<patarr>
Hello. Let's say I have some app code like some_obj.get(option[:path]) do |chunk, _remaining_bytes, _total_bytes| .... end. How do I mock this?
blackwind_123 has joined #ruby
Disavowed has joined #ruby
benlieb has joined #ruby
qakqed has joined #ruby
cdg_ has joined #ruby
last_staff has quit [Quit: last_staff]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
jenrzzz has quit [Ping timeout: 240 seconds]
cdg has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
montanonic has quit [Ping timeout: 260 seconds]
patarr has quit [Ping timeout: 260 seconds]
shinnya has joined #ruby
tyang has joined #ruby
renchan has quit [Remote host closed the connection]
reverberations has joined #ruby
uranellus has quit [Ping timeout: 256 seconds]
tau has quit [Remote host closed the connection]
patarr has joined #ruby
uranellus has joined #ruby
uranellus has joined #ruby
uranellus has quit [Changing host]
<guidos>
Can anyone tell me how to install json on windows, I tried devkit and it still not happy
moei has joined #ruby
moei has quit [Client Quit]
moei has joined #ruby
<guidos>
gem install json --platform=ruby does not seem to work for me and I am at a loss
<havenwood>
guidos: An aside, but Windows 10 ships with a beta Linux subsystem for Windows that lets you get bash through the Ubuntu kernel without virtualizing.
JeanCarloMachado has quit [Ping timeout: 240 seconds]
<manveru>
or try getting the file for the method using method(:name).source_location
<manveru>
there's also Method#arity, but that doesn't help much
<manveru>
oh
<Disavowed>
manveru: I love Ripper! I'm surprised this isn't a built in though, particularly with how well Ruby lends itself to Metaprogramming. Thank you for your assistance :)
<Disavowed>
manveru: I hate to sound like an idiot but I'm struggling to call it for a function that I'm not defining in line - am I missing something obvious?
<manveru>
well, how's your method called, and where is it defined?
Guest79143 is now known as CrazEd
<Disavowed>
I just keep getting 'wrong number of arguments' errors, which is fair enough, because I guess I'm sort of calling it when I wrap it in method()
CrazEd is now known as Guest15688
<manveru>
yeah
<Disavowed>
I'm probably just better off looking at the original source right?
<manveru>
well, you have to ask the class/module for the method
<Disavowed>
manveru: I'm not following - how do you mean?