bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rodya_ has quit [Remote host closed the connection]
gigetoo has quit [Ping timeout: 276 seconds]
gigetoo has joined #ruby
TomyLobo has quit [Ping timeout: 255 seconds]
jackjackdripper has quit [Ping timeout: 264 seconds]
armyriad has joined #ruby
bmurt has joined #ruby
Rodya_ has joined #ruby
CloCkWeRX has joined #ruby
jameser has quit [Ping timeout: 245 seconds]
ecuanaso has joined #ruby
gigetoo has quit [Ping timeout: 240 seconds]
elena has quit [Ping timeout: 240 seconds]
ur5us has quit [Remote host closed the connection]
Azure has quit [Ping timeout: 252 seconds]
gigetoo has joined #ruby
ur5us has joined #ruby
_geoff has joined #ruby
csk has quit [Quit: ZZZzzz…]
<ecuanaso>
Hey guys i'm having difficulty installing certain sass projects into a ruby environment
ur5us has quit [Ping timeout: 264 seconds]
_sfiguser has quit [Quit: Leaving]
nankyokusei has joined #ruby
gigetoo has quit [Read error: Connection reset by peer]
gigetoo has joined #ruby
PaulCape_ has joined #ruby
Azure has joined #ruby
Azure has quit [Client Quit]
nankyokusei has quit [Ping timeout: 240 seconds]
PaulCapestany has quit [Ping timeout: 255 seconds]
gajus has quit [Quit: Connection closed for inactivity]
<blackbombay>
ecuanaso: go ahead.
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
<ecuanaso>
So I found a project called bootstrap-sass. I install it in the gemfile and I also import it in my app.scss file but when I run the project I receive errors saying that the file is unreadable
<ecuanaso>
@blackbombay
<gizmore>
why do you wanna manage your css versions by a gem?
<gizmore>
isn't it easier to just include the version you want like hardcode somehow?
<gizmore>
with a bootstrap.min.css ?
gigetoo has quit [Ping timeout: 240 seconds]
alexar has joined #ruby
alexar has quit [Remote host closed the connection]
alexar has joined #ruby
alexar has quit [Remote host closed the connection]
<gizmore>
seriously.... i don't see a point having gems like bootstrap or jquery
gigetoo has joined #ruby
Derperperd has joined #ruby
milardovich has quit []
Azure has joined #ruby
_geoff has quit [Ping timeout: 252 seconds]
<adam12>
In fact, from prior experience I'd suggest not using gems for CSS/JS.
<ecuanaso>
@gizmore i have a code exercise and their css structure is in sass
<gizmore>
same here
<gizmore>
it adds only hassle
<gizmore>
CSS => CASCADING
<gizmore>
add more precise css to overvrwite bootstrap etc
Derperperd has quit [Ping timeout: 256 seconds]
<ecuanaso>
they want me to create a responsive site , so I figured using a ruby based bootstrap library
Dragonai has joined #ruby
<gizmore>
ecuanaso: so just include bootstrap
<gizmore>
wget bootstrap.min.css
<gizmore>
<link rel="stylesheet" ........
<gizmore>
it is just client fancy
jameser has joined #ruby
<gizmore>
no real deps.. no hurt... why gem it?
Bounga has joined #ruby
<gizmore>
someone should add requirement to config and specify active record or bla in those gems... until someone makes a post how ridicule it is to version a versioned js lib in gem wrapper?
<gizmore>
most libs even offer cdn... but i dont like
gigetoo has quit [Ping timeout: 258 seconds]
marr has quit [Ping timeout: 255 seconds]
<ecuanaso>
@gizmore ..Ok i'll try that. I'm still wondering why i'm receiving errors when i include breakpoint in a gemfile
<ecuanaso>
just in case the company doesn't want me to use bootstrap
gigetoo has joined #ruby
Bounga has quit [Ping timeout: 252 seconds]
<blackbombay>
gizmore: bootstrap is more than just css, it's also fonts and javascripts.
<blackbombay>
gizmore: one reason to use the gem is for it to go via the asset pipeline.
<gizmore>
because its better to compute an asset pipeline for every request than just have min
elena has joined #ruby
leitz has quit [Quit: Nappy time]
<gizmore>
some things better keep blob :)
Guest67313 is now known as ged
ged is now known as Guest48612
<gizmore>
one point against gems for css/js is that you code against a certain version of a client lib.... not wanting a change
<gizmore>
versus a server lib (ruby lib) the changes are mostly more as you expect
<gizmore>
but mostly i think the hassle / workload to add a js gem is just not needed
duckpupp1 has joined #ruby
<gizmore>
the asset pipeline is not really nice in rails... also i think rails and gems feel bloated like java
<gizmore>
but ruby is the most awe syntax ever
<gizmore>
my prediction is that ruby and Typescript merge into world domination
kht has joined #ruby
gigetoo has quit [Ping timeout: 240 seconds]
cibs_ has quit [Ping timeout: 255 seconds]
gigetoo has joined #ruby
cibs has joined #ruby
duckpupp1 has quit [Ping timeout: 245 seconds]
elena has quit [Ping timeout: 255 seconds]
jshjsh has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JoshS has quit [Ping timeout: 276 seconds]
gizmore is now known as ninechat
Fernando-Basso has quit [Quit: WeeChat 1.7]
marcdel has quit [Ping timeout: 240 seconds]
gigetoo has quit [Ping timeout: 248 seconds]
marcdel has joined #ruby
gigetoo has joined #ruby
ecuanaso has joined #ruby
phreakocious has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
jameser has quit [Read error: Connection reset by peer]
gigetoo has quit [Read error: Connection reset by peer]
gigetoo has joined #ruby
jameser has quit [Ping timeout: 240 seconds]
montanonic has joined #ruby
TheWhip has quit [Ping timeout: 260 seconds]
alexar_ has quit [Remote host closed the connection]
alibby has quit [Quit: Leaving.]
NeverTired has joined #ruby
alibby has joined #ruby
montanonic has quit [Ping timeout: 264 seconds]
hanmac has quit [Ping timeout: 258 seconds]
gigetoo has quit [Ping timeout: 240 seconds]
gigetoo has joined #ruby
d^sh has quit [Ping timeout: 252 seconds]
d^sh has joined #ruby
Technodrome has joined #ruby
hanmac has joined #ruby
workmad3_ has joined #ruby
Kug3lis is now known as Kug3lis_off
Kug3lis_off is now known as Kug3lis
gigetoo has quit [Ping timeout: 258 seconds]
alibby has quit [Quit: Leaving.]
gigetoo has joined #ruby
jameser has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
triangles2 has quit [Quit: Leaving]
Kug3lis is now known as Kug3lis_off
workmad3_ has quit [Ping timeout: 255 seconds]
`tim` has joined #ruby
Derperperd has joined #ruby
benlieb has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gigetoo has quit [Ping timeout: 240 seconds]
matrix9180 has joined #ruby
ARCADIVS has joined #ruby
gigetoo has joined #ruby
Bounga has joined #ruby
alibby has joined #ruby
Derperperd has quit [Ping timeout: 264 seconds]
tristanp has quit [Remote host closed the connection]
alibby has quit [Read error: Connection reset by peer]
alibby1 has joined #ruby
Bounga has quit [Ping timeout: 252 seconds]
optiz0r has quit [Ping timeout: 276 seconds]
`tim` is now known as justbleed
benlieb has quit [Quit: benlieb]
gigetoo has quit [Ping timeout: 248 seconds]
matp has quit [Remote host closed the connection]
matp has joined #ruby
gigetoo has joined #ruby
duckpupp1 has joined #ruby
nankyokusei has joined #ruby
fredolinhares has quit [Quit: WeeChat 1.6]
benlieb has joined #ruby
duckpupp1 has quit [Ping timeout: 258 seconds]
jameser has quit [Read error: Connection reset by peer]
jameser has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
PaulCape_ has quit [Quit: .]
gigetoo has quit [Ping timeout: 256 seconds]
gigetoo has joined #ruby
jrafanie has joined #ruby
enterprisey has quit [Remote host closed the connection]
lel has quit [Quit: waow]
Guest56081 is now known as ged
Rodya_ has quit [Remote host closed the connection]
montanonic has joined #ruby
ged is now known as Guest29890
triangles has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
gigetoo has quit [Ping timeout: 256 seconds]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jshjsh has quit [Quit: Leaving]
gigetoo_ has joined #ruby
hightower2 has joined #ruby
elena has joined #ruby
hightower3 has quit [Ping timeout: 240 seconds]
zeroDi has quit [Quit: WeeChat 1.6]
elena has quit [Ping timeout: 240 seconds]
hightower3 has joined #ruby
hightower2 has quit [Ping timeout: 240 seconds]
TheWhip has joined #ruby
gigetoo_ is now known as gigetoo
Derperperd has joined #ruby
hightower2 has joined #ruby
arescorpio has quit [Remote host closed the connection]
hightower3 has quit [Ping timeout: 260 seconds]
elena has joined #ruby
Derperperd has quit [Ping timeout: 248 seconds]
hightower3 has joined #ruby
hightower2 has quit [Ping timeout: 255 seconds]
elena has quit [Ping timeout: 240 seconds]
r3bbit has joined #ruby
jameser has quit [Ping timeout: 258 seconds]
blackbombay has quit [Ping timeout: 255 seconds]
alibby1 has quit [Quit: Leaving.]
Symbiosisz has joined #ruby
dc4 has joined #ruby
hightower2 has joined #ruby
hightower3 has quit [Ping timeout: 240 seconds]
gix has quit [Ping timeout: 252 seconds]
kht has joined #ruby
montanonic has quit [Ping timeout: 245 seconds]
optiz0r has joined #ruby
Nilium has quit [Remote host closed the connection]
gix has joined #ruby
Nilium has joined #ruby
nankyokusei has joined #ruby
LoneHermit has joined #ruby
enterprisey has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
LoneHermit has quit [Remote host closed the connection]
Guest29890 is now known as ged
ged is now known as Guest52646
LoneHermit has joined #ruby
montanonic has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
LoneHermit has quit [Remote host closed the connection]
kht has quit [Ping timeout: 240 seconds]
jameser has joined #ruby
Technodrome has joined #ruby
roflmyeggo has joined #ruby
Derperperd has joined #ruby
Bounga has joined #ruby
Derperperd has quit [Ping timeout: 248 seconds]
ARCADIVS has quit [Ping timeout: 245 seconds]
Bounga has quit [Ping timeout: 252 seconds]
ruurd has quit [Remote host closed the connection]
tk___ has joined #ruby
tobiasvl has quit [Ping timeout: 276 seconds]
ARCADIVS has joined #ruby
duckpupp1 has joined #ruby
Puffball has quit [Remote host closed the connection]
saneax-_-|AFK is now known as saneax
TheWhip has quit [Remote host closed the connection]
TheWhip has joined #ruby
Puffball has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
duckpupp1 has quit [Ping timeout: 248 seconds]
TheWhip has quit [Ping timeout: 255 seconds]
justbleed has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ruurd has joined #ruby
ruurd is now known as Guest73986
JoshS has joined #ruby
valeth1 has joined #ruby
alexar has joined #ruby
valeth has quit [Ping timeout: 240 seconds]
alexar has quit [Ping timeout: 255 seconds]
chussenot has quit [Quit: chussenot]
rajat has joined #ruby
hightower3 has joined #ruby
Nilium has quit [Quit: <kristin> Cower is like... I dunno. sometimes he seems senile and other times he seems like a middle schooler.]
hightower2 has quit [Ping timeout: 255 seconds]
enterprisey has quit [Ping timeout: 255 seconds]
Nilium has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alexar has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nankyokusei has joined #ruby
alexar has quit [Ping timeout: 258 seconds]
Guest52646 is now known as ged
ged is now known as Guest44707
nankyokusei has quit [Ping timeout: 240 seconds]
hightower2 has joined #ruby
hightower3 has quit [Ping timeout: 255 seconds]
TheWhip has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duckpupp1 has joined #ruby
jameser has quit [Ping timeout: 260 seconds]
Derperperd has joined #ruby
ecuanaso has joined #ruby
tpendragon has joined #ruby
Derperperd has quit [Ping timeout: 264 seconds]
<zacts>
is Functional Programming a la Clojure possible in Ruby?
<zacts>
note: I'm still learning exactly what 'Functional Programming' means in the context of Clojure.
<zacts>
but as a paradigm(?) is it possible to program in a functional "paradigm" in pure Ruby?
<zacts>
I guess Ruby is heavily OOP by default?
<zacts>
now I don't mean interop with Clojure via jruby, I mean functional programming in pure Ruby
<roflmyeggo>
zacts: no
<zacts>
and how un-natural would it be to do this (all assuming, I'm citing the terminology of a 'functional paradigm' correctly)
jameser has joined #ruby
<zacts>
roflmyeggo: please explain a bit? :-D
<roflmyeggo>
zacts: functional programming is all about first class functions and no mutable state
<roflmyeggo>
ruby has plenty of mutable state, its a classic OOP language
Immune has joined #ruby
<zacts>
yeah but isn't it possible to have anonymous first class functions in Ruby, and to treat state as immutable?
<zacts>
even if unnatural?
<zacts>
like say a class that accepts objects as input, and then returns objects as output
<zacts>
those objects could "behave" like pure functions
<zacts>
and then they could work on other objects that "behave" like immutable state?
<zacts>
like perhaps you would have to implement some sort of interpreter in Ruby to do this?
x00r__ has joined #ruby
<roflmyeggo>
zacts: how would you make the state immutable?
<zacts>
roflmyeggo: you mean protection mechanisms?
<roflmyeggo>
zacts: yeah
<zacts>
roflmyeggo: I mean functionally you could make it immutable in a lame way by just not mutating the state
<zacts>
like perhaps the 'function-like objects' are not allowed to mutate 'immutable objects' by design?
<roflmyeggo>
zacts: so you're programming either a) by yourself or b) hoping everyone else never breaks the rule
<zacts>
ok
<roflmyeggo>
^_^
<zacts>
if I solve that issue in a sane way, then perhaps it would be possible?
<zacts>
like hypothetically
<zacts>
and then back to #ruby
<zacts>
I'm just curious, as I may want to try some experimental programming with ruby for some personal creative projects
<roflmyeggo>
zacts: what if you are using mutable objects?
<roflmyeggo>
you would copy them before passing them as args?
<roflmyeggo>
deep copy them?
<zacts>
ok
<zacts>
and then compare somehow?
<zacts>
that they haven't changed?
<roflmyeggo>
zacts: im asking you :)
<zacts>
oh, I have no idea
<roflmyeggo>
heh
<zacts>
sorry, I'm still learning all of this
<zacts>
roflmyeggo: another idea i have is to implement a lisp-like language within ruby as a DSL
<zacts>
and utilize that to functional program somehow
<zacts>
but I need to learn how DSL work
<roflmyeggo>
zacts: why do you want to use ruby?
<roflmyeggo>
why not just use lisp?
<roflmyeggo>
or clojure
<zacts>
roflmyeggo: it's fun and easy, and I already know a little. I'm also wanting to use it for web devel a bit
<zacts>
roflmyeggo: but my curiousity was spurred with the idea that perhaps OOP can do Functional somehow
<zacts>
I've heard that Java 8 added lambdas and some functionalish ideas were possible there
<zacts>
don't know
<zacts>
lambdas I guess being anonymous functions or something
<zacts>
so I wondered if Ruby could do something like this
<zacts>
more a curious thing, but also perhaps some experimental ideas just to play and tinker
<zacts>
anyway, I'm sticking with pure OOP for now
<zacts>
this would have been down the road for me
lxsameer has joined #ruby
TheWhip_ has joined #ruby
TheWhip_ has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
TheWhip has quit [Ping timeout: 240 seconds]
saneax is now known as saneax-_-|AFK
jameser has quit [Ping timeout: 240 seconds]
roflmyeggo has quit [Ping timeout: 252 seconds]
matrix9180 is now known as matrix9180[away]
govg has quit [Ping timeout: 276 seconds]
TheWhip has joined #ruby
matrix9180[away] is now known as matrix9180
jameser has joined #ruby
matrix9180 is now known as matrix9180[away]
facest has joined #ruby
faces has quit [Ping timeout: 260 seconds]
skweek has joined #ruby
vali_ has joined #ruby
renchan has joined #ruby
matrix9180[away] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vali_ has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
nofxx has joined #ruby
koldbrutality has joined #ruby
nankyokusei has joined #ruby
silk8192 has joined #ruby
Guest44707 is now known as ged
Derperperd has joined #ruby
Cohedrin_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ged is now known as Guest88355
govg has joined #ruby
aryaching has joined #ruby
raul782 has joined #ruby
dc4 has quit [Ping timeout: 248 seconds]
nankyokusei has quit [Ping timeout: 245 seconds]
pwnd_nsfw` has joined #ruby
pwnd_nsfw has quit [Ping timeout: 240 seconds]
Dragonai has joined #ruby
Derperperd has quit [Ping timeout: 276 seconds]
raul782 has quit [Ping timeout: 240 seconds]
haylon_ has joined #ruby
haylon has quit [Remote host closed the connection]
<nofxx>
building a small UI for a device, it's a rpi/odroid with touch lcd. UI runs on sinatra/kiosk chromium and the server that turns some bits needs to be run as root. Any ideas how to make those 2 talk?
<nofxx>
they're on the same device*
tk___ has quit [Quit: ばいばい]
Ax has joined #ruby
Cohedrin_ has joined #ruby
vali_ has joined #ruby
Channel6 has quit [Quit: Leaving]
TomyLobo has joined #ruby
duckpupp1 has quit [Ping timeout: 240 seconds]
Derperperd has joined #ruby
silk8192 has quit [Read error: Connection reset by peer]
<baweaver>
roflmyeggo / zacts: You can do functionally oriented programming in Ruby. Just because the language doesn't enforce immutability does not make it impossible.
<zacts>
baweaver: ah interesting, cool
<baweaver>
Ruby uses anonymous functions a lot
<baweaver>
Have you seen each yet?
<zacts>
obj.each <-- this?
elena has quit [Ping timeout: 276 seconds]
<baweaver>
>> [1,2,3].each { |x| x } # < - that's an anonymous function
<baweaver>
Now if you want to go full on lambda calculus you can
<zacts>
oh this is really neat
<baweaver>
you only really need lambdas
ifctj has quit [Ping timeout: 260 seconds]
Dragonai has quit [Read error: Connection reset by peer]
<baweaver>
Now more pure functional languages have a lot more features to them that are geared towards FP, but to say that Ruby has no ability to do FP is naive.
ifctj has joined #ruby
Dragonai has joined #ruby
<baweaver>
The big features you get in full FP languages are things like: Pattern matching, composition, currying, partial application, tail call optimized recursion, and other features.
<zacts>
very cool
<zacts>
so how do DSL's work in a nutshell?
<zacts>
in regards to Ruby
<zacts>
regard
Ax has quit [Ping timeout: 256 seconds]
<zacts>
the grammar on regard is odd
<zacts>
I just read a grammar girl article on it
<zacts>
oh well, English. You know what I mean
<baweaver>
how to describe them.... hrm
<baweaver>
RSpec
<baweaver>
it uses blocks to create a DSL for testing
<zacts>
_what_ is a DSL exactly. Is it an extension to the Ruby language? or just a string that contains another programming language within it?
<baweaver>
describe 'my function' do it 'returns 5' do expect(function(5)).to return(5)) end end
<baweaver>
A DSL is literally just a library that allows you to code in the context of something
silk8192 has quit [Read error: Connection reset by peer]
silk8192 has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Dragonai has quit [Quit: zzz]
montanonic has quit [Ping timeout: 255 seconds]
a_le_x has joined #ruby
arquebus has joined #ruby
Guest88355 is now known as ged
nankyokusei has joined #ruby
ged is now known as Guest39104
milardovich has quit [Remote host closed the connection]
rt has quit [Excess Flood]
sebastiansier has joined #ruby
sebastia_ has quit [Read error: Connection reset by peer]
djbkd has quit [Quit: Leaving...]
rt has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
naprimer_2 has joined #ruby
tdy has quit [Quit: WeeChat 1.7]
vali_ has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
naprimer_3 has quit [Ping timeout: 248 seconds]
elena has joined #ruby
duderonomy has quit [Ping timeout: 255 seconds]
jameser has quit [Ping timeout: 252 seconds]
camr has joined #ruby
renchan has quit [Remote host closed the connection]
<camr>
Hello.
tdy has joined #ruby
<camr>
I'm new af to Ruby, but I've basically got a JSON request to a URL, which is parsed into a hash table. I have variables set as "fetch.("match")" etc. but I want to refresh these variables every 15 seconds.
elena has quit [Ping timeout: 252 seconds]
<camr>
Using a "while true do" doesn't seem to work.
Nilium has quit [Quit: <kristin> Cower is like... I dunno. sometimes he seems senile and other times he seems like a middle schooler.]
tdy has joined #ruby
cibs has joined #ruby
antgel has joined #ruby
vuoto has joined #ruby
tdy has quit [Client Quit]
Guest37296 has joined #ruby
silk81922 has joined #ruby
silk8192 has quit [Read error: Connection reset by peer]
LuckyABA has quit [Ping timeout: 240 seconds]
tdy has joined #ruby
arquebus has quit [Quit: Leaving]
elena has joined #ruby
elena has quit [Ping timeout: 260 seconds]
matp has quit [Remote host closed the connection]
djbkd has joined #ruby
govg has joined #ruby
shinnya has joined #ruby
matp has joined #ruby
Nilium_ has joined #ruby
saneax is now known as saneax-_-|AFK
tdy has quit [Quit: WeeChat 1.7]
jameser has quit [Read error: Connection reset by peer]
camr_ has joined #ruby
<camr_>
I'm new af to Ruby, but I've basically got a JSON request to a URL, which is parsed into a hash table. I have variables set as "fetch.("match")" etc. but I want to refresh these variables every 15 seconds.
<camr_>
Using a "while true do" doesn't seem to work.
chouhoulis has quit [Remote host closed the connection]
connor_goodwolf has joined #ruby
<elomatreb>
I still don't see how you would reach the code below the loop. It doesn't terminate anywhere
<camr_>
while true do
<camr_>
and then end?
<elomatreb>
Yes, that will repeat forever. The condition "true" will always be true, no matter what
<camr_>
Oh right.
<camr_>
So what's an alternative? That url is updated with JSON data every 15 seconds or so.
elementaru has joined #ruby
<elomatreb>
I'm not sure I fully understand the usecase, but can't you basically do all the code you currently have in your loop in the "score" command?
johnny56_ has quit [Ping timeout: 264 seconds]
<camr_>
getscore()? i tried using a function but that didn't work
<camr_>
can i do it so I only have one variable "sum" at the end?
<camr_>
that would be perfect
<elomatreb>
one sec
<camr_>
sure
Kug3lis_off is now known as Kug3lis
johnny56_ has joined #ruby
_main_ has joined #ruby
_main_ has quit [Read error: Connection reset by peer]
__main__ has quit [Read error: Connection reset by peer]
<dionysus69>
I guess it is in C, and I want to describe it in my paper with about 50-100 word description, so I would appreciate if anyone could paraphrase what it does?
renchan has quit [Remote host closed the connection]
teclator_ has quit [Read error: Connection reset by peer]
pilne has quit [Quit: Quitting!]
blackmesa has joined #ruby
djbkd has quit [Remote host closed the connection]
jameser has quit [Ping timeout: 258 seconds]
djbkd has joined #ruby
xen0fon has joined #ruby
<ytti_>
dionysus69, what is your paper on?
<ytti_>
dionysus69, i believe it generates random number between 0 and 1 (double x = rb_random_real(randgen);
<ytti_>
dionysus69, multiplies the random number by size of the array i = (long)(x * len);
<ytti_>
dionysus69, then returns the nth element of the array return RARRAY_PTR(ary)[i];
tomphp has joined #ruby
silk81922 has quit [Read error: Connection reset by peer]
<dionysus69>
well I am building some application and I am using this function at an important place so
<ytti_>
dionysus69, this piece of code won't tell you how the random is generated
<dionysus69>
I might get asked what's the random picking algorithm
djbkd has quit [Ping timeout: 255 seconds]
<ytti_>
dionysus69, you need to look at rb_random_real implementation
<dionysus69>
ok will do thanks :)
cibs has quit [Ping timeout: 260 seconds]
TheWhip has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest37296 has quit [Remote host closed the connection]
<warrshrike>
got it
<warrshrike>
so it turns out i have multiple versions of ruby..theres the 2.4.0 through rbenv that i use
<warrshrike>
and there is a 2.3.1 i usr/
<warrshrike>
how can i remove the second one?
benlieb has quit [Quit: benlieb]
mikeXsh has quit [Quit: Connection closed for inactivity]
mjuszczak has joined #ruby
triangles has quit [Quit: Leaving]
dionysus69 has quit [Quit: dionysus69]
conta has quit [Ping timeout: 255 seconds]
duckpupp1 has joined #ruby
ponga has joined #ruby
<warrshrike>
nvm firgured it out
duckpupp1 has quit [Ping timeout: 240 seconds]
dn` has quit [Remote host closed the connection]
dn` has joined #ruby
mjuszczak has quit []
willdrew has quit [Ping timeout: 240 seconds]
_sfiguser has joined #ruby
rajat has quit [Ping timeout: 255 seconds]
gSlack has left #ruby [#ruby]
ninechat is now known as gizmore
Fernando-Basso has quit [Ping timeout: 256 seconds]
tildes has quit [Ping timeout: 255 seconds]
yardenbar has quit [Ping timeout: 240 seconds]
blackwind_123 has quit [Ping timeout: 255 seconds]
Fernando-Basso has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nankyokusei has joined #ruby
nullfxn has joined #ruby
blackwind_123 has joined #ruby
Derperperd has joined #ruby
camr_ has quit [Quit: Page closed]
nullfxn has left #ruby [#ruby]
acalycine has joined #ruby
<acalycine>
Hey.
nankyokusei has quit [Ping timeout: 240 seconds]
Ishido has quit [Remote host closed the connection]
<acalycine>
I've got a bunch of JSON that's formatted like this https://puu.sh/tvRdu/66a58cddba.png. I want to ask the user what "match" they want and access that one (by the ID). I don't know how I would parse the JSON.
awer has quit [Quit: Lost terminal]
Derperperd has quit [Ping timeout: 255 seconds]
psychicist__ has quit [Ping timeout: 240 seconds]
benlieb has joined #ruby
fredolinhares has joined #ruby
Rodya_ has quit [Remote host closed the connection]
dionysus69 has joined #ruby
pilne has joined #ruby
_main_ has joined #ruby
_main_ has quit [Read error: Connection reset by peer]
_main_ has joined #ruby
_main_ has quit [Read error: Connection reset by peer]
__main__ has quit [Ping timeout: 240 seconds]
willdrew has joined #ruby
_main_ has joined #ruby
davezd has quit [Quit: Leaving]
ifctj has joined #ruby
L0tDFog has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_main_ is now known as __main__
ecuanaso has joined #ruby
flying has quit []
moeSeth has quit [Quit: Connection closed for inactivity]
VladGh has quit [Remote host closed the connection]
VladGh has joined #ruby
aryaching has joined #ruby
Guest5425 is now known as ged
ged is now known as Guest22026
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
al2o3-cr has quit [Read error: Connection reset by peer]
hotpancakes has joined #ruby
hotpanca_ has joined #ruby
__Yiota has joined #ruby
al2o3-cr has joined #ruby
hotpancakes has quit [Ping timeout: 260 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rutix has quit []
vali_ has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
nankyokusei has joined #ruby
milardovich has joined #ruby
willdrew has quit [Ping timeout: 240 seconds]
Derperperd has joined #ruby
Fernando-Basso has quit [Ping timeout: 240 seconds]
nankyokusei has quit [Ping timeout: 276 seconds]
hotpanca_ has quit [Remote host closed the connection]
Technodrome has joined #ruby
hotpancakes has joined #ruby
Derperperd has quit [Ping timeout: 240 seconds]
Fernando-Basso has joined #ruby
tomphp has joined #ruby
petrichorx_ has quit [Quit: Connection closed for inactivity]
blackmesa has joined #ruby
kloeri has joined #ruby
xall_ has joined #ruby
montanonic has joined #ruby
yqt has quit [Read error: Connection reset by peer]
Kug3lis has joined #ruby
yqt has joined #ruby
kriskhaira has quit [Quit: Connection closed for inactivity]
noon has joined #ruby
<noon>
Why is Ruby called "programmers' best friend"?
xall_ has quit [Ping timeout: 240 seconds]
JeanCarloMachado has quit [Remote host closed the connection]
duckpupp1 has joined #ruby
_sfiguser has quit [Ping timeout: 240 seconds]
JeanCarloMachado has joined #ruby
hotpancakes has quit [Remote host closed the connection]
nofxx has quit []
roflmyeggo has joined #ruby
hotpancakes has joined #ruby
duckpupp1 has quit [Ping timeout: 255 seconds]
ifctj has quit [Ping timeout: 276 seconds]
LoneHerm_ has joined #ruby
tildes has joined #ruby
xall_ has joined #ruby
hotpancakes has quit [Remote host closed the connection]
vali_ has joined #ruby
_sfiguser has joined #ruby
vali_ has quit [Client Quit]
JeanCarloMachado has quit [Remote host closed the connection]
haylon has quit [Remote host closed the connection]
Robtop__ has joined #ruby
haylon has joined #ruby
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest22026 is now known as ged
ged is now known as Guest44726
pwnd_nsfw` has quit [Ping timeout: 248 seconds]
zacts has quit [Ping timeout: 256 seconds]
<noon>
HELLO?
<noon>
Why is Ruby called "programmer's best friend"?
JeanCarloMachado has joined #ruby
blackbombay has joined #ruby
Nicmavr has joined #ruby
Nicmavr is now known as Guest68376
haylon_ has joined #ruby
haylon has quit [Remote host closed the connection]
Xentil has joined #ruby
<elomatreb>
noon: Calm down? One of the design philosophies of Ruby is that it is nice to the programmer, rather than to the machine. Look up "Principle of Least Surprise"
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rajat has quit [Ping timeout: 260 seconds]
minimalism has joined #ruby
Derperperd has quit [Ping timeout: 245 seconds]
<acalycine>
Doesn't that only return the array if both values are "India"?
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<acalycine>
I get "false".
armyriad has quit [Ping timeout: 240 seconds]
elena has joined #ruby
unshadow has quit [Ping timeout: 260 seconds]
ecuanaso has joined #ruby
<djellemah>
I need to parse some yaml with tags, eg !ruby/object:PhusionPassenger::Utils::TeeInput. I've had a go at telling Psych (alternatively Syck) to ignore tags that it can't resolve to classes, and just treat them as hashes. Seems the only way to do that is to override various things in Psych (alternatively Syck). Am I missing the obvious way to do this easily?
mjuszczak has quit []
rajat has joined #ruby
conta has quit [Read error: Connection reset by peer]
unshadow has joined #ruby
mostlybadfly has joined #ruby
<havenwood>
acalycine: No, #include? will check if either is "India"
armyriad has joined #ruby
<havenwood>
acalycine: "Returns true if the given object is present in self (that is, if any element == object), otherwise returns false."
<ruby[bot]>
havenwood: # => "[{\"name\":\"Diabolik\",\"price\":1},{\"name\":\"eggs\",\"price\":1},{\"name\":\"rice\",\"price\":1 ...check link for more (https://eval.in/721753)
<ruby[bot]>
al2o3-cr: # => wrong number of arguments (given 2, expected 1) (ArgumentError) ...check link for more (https://eval.in/721760)
James123 has joined #ruby
<havenwood>
acalycine: Shouldn't that be more like?: %w[team-1 team2].find { |team| match_list_hash['matches'][team] == 'India' }
Ishido has joined #ruby
brent__ has joined #ruby
<havenwood>
acalycine: Use your REPL, irb or pry, to look at what `match_list_hash`, `match_list_hash['matches']`, etc.
<Diabolik>
thanks havenwood
<havenwood>
Diabolik: you're welcome
<Diabolik>
<3
<Diabolik>
now onto category trees :(
<acalycine>
I get a typeerror if I use that: "no implicit conversion of String into Integer (TypeError)"
<James123>
Hello! I created a class Foo, def initialize(bar); baz = bar; @baz2 = bar; end; end. Then, foo = Foo.new(123). But foo.baz / foo.baz2 throw error... (I want to access the value) Any ideas?
<havenwood>
acalycine: Did you look at the intermediate values in your REPL? Check what values you're working with.
alibby has quit [Read error: No route to host]
alibby1 has joined #ruby
<havenwood>
James123: `baz` is a local variable. It's local to the ::initialize method and isn't accessible even from other methods internally in the Class.
<acalycine>
Looking at the values
dc4 has quit [Ping timeout: 240 seconds]
<havenwood>
James123: `@baz` is an instance variable and is accessible from any method in that instance of the Class.
<acalycine>
Found one problem: team2 should be team-2
cdg has quit [Remote host closed the connection]
acalycine has quit [Quit: bye]
<James123>
havenwood: Thank you. So I need something def baz; return @baz; end, right?
<havenwood>
James123: But there's no automatically-created method exposing an instance variable to the outside interface of an instance of a Class.
<havenwood>
James123: Yup. Or there're helpers for getters and setters like a getter `attr_reader :baz2` or both getter and setter `attr_accessor :baz2`.
acalycine has joined #ruby
<James123>
havenwood: Very complete answer :) Thank you very much!
roflmyeggo has joined #ruby
<havenwood>
James123: You're welcome!
psychicist__ has quit [Ping timeout: 240 seconds]
chussenot has quit [Quit: chussenot]
xen0fon has joined #ruby
xen0fon has quit [Client Quit]
nettoweb has joined #ruby
duckpupp1 has joined #ruby
alibby1 has quit [Read error: No route to host]
tomphp has joined #ruby
psychicist__ has joined #ruby
<acalycine>
I can't find any other errors.
<acalycine>
I tried the old code and it works perfectly.
sebastiansier has quit [Read error: Connection reset by peer]
duckpupp1 has quit [Ping timeout: 255 seconds]
sebastiansier has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<acalycine>
[team] isn't defined is it?
<havenwood>
acalycine: Maybe gist a little example where you show the data for a small `match_list_hash` with your current code, what its output is and what you'd like the output to be.
last_staff1 has joined #ruby
<havenwood>
acalycine: see the |team| between pipes?
<acalycine>
Yep.
last_staff has quit [Ping timeout: 248 seconds]
last_staff1 is now known as last_staff
<acalycine>
Doing it now
<havenwood>
acalycine: That's a block argument, and in this case it'll set the local variable to the value `"team-1"` on the first iteration and `"team-2"` on the second iteration.
csk has quit [Quit: ZZZzzz…]
<acalycine>
Ah right.
charliesome has joined #ruby
houhoulis has joined #ruby
roflmyeggo has quit [Remote host closed the connection]