64MAAG1WT has quit [Quit: ChatZilla 0.9.92 [Firefox 49.0.2/20161019084923]]
SteenJobs has quit [Quit: SteenJobs]
optiz0r has quit [Ping timeout: 260 seconds]
optiz0r has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<adam12>
Phrohdoh: Has to be PATH related. Maybe you have bash-specific PATH mangling (rbenv, rvm, etc), which is ignored in the `sh` subshell started by the setup script.
<Phrohdoh>
I thought so too so I changed it to use `bash` and still the issue persists.
infernix has quit [Ping timeout: 250 seconds]
<adam12>
can you setup an `echo $PATH` inside the script and see if it compares to what you see when running it manually?
<Phrohdoh>
Sure.
Channel6 has joined #ruby
<Phrohdoh>
adam12: They are equal
banisterfiend has joined #ruby
<adam12>
OK - humour me once more, and run `ruby --version` in the setup script.
<adam12>
Yeah - so question is, did you `gem install bundler` with system ruby
<adam12>
Because that will do it.
<adam12>
gem supports an `env` shebang - no idea if it's default or not.
<adam12>
Which would of solved your problem before it started.
<Phrohdoh>
Great suggestion. I uninstalled the system-ruby installed bundle and reinstalled with the brew one and that fixed the issue, I believe.
<adam12>
Yep. That should work.
splud has quit [Quit: splud]
<Phrohdoh>
Interesting. Now I am being told that a local gulp doesn't exist, which is true, but why would something look for a local gulp instead of the one I installed via `npm install -g gulp`?
<Phrohdoh>
Eh actually that's not a ruby question.
<adam12>
Hah
<adam12>
Some people hard code node_modules/.bin/gulp for a path.
<adam12>
I'm not saying it's right, but I won't open that Javascript pandora box in here.
mixdev23 has quit [Read error: Connection reset by peer]
<adam12>
PATH all the things!
mixdev23 has joined #ruby
<Phrohdoh>
Haha certainly. Thanks for your help. :-)
jackjackdripper1 has quit [Quit: Leaving.]
nankyokusei has joined #ruby
dminuoso_ has joined #ruby
polysics has joined #ruby
hanmac has joined #ruby
nankyokusei has quit [Ping timeout: 244 seconds]
dminuoso_ has quit [Ping timeout: 260 seconds]
polysics has quit [Ping timeout: 245 seconds]
infernix has joined #ruby
hahuang61 has joined #ruby
Kero has quit [Ping timeout: 256 seconds]
sarbs has joined #ruby
hahuang61 has quit [Ping timeout: 260 seconds]
bluOxigen has joined #ruby
bluOxigen has quit [Changing host]
bluOxigen has joined #ruby
SteenJobs has joined #ruby
zacts has joined #ruby
aegis3121 has quit [Ping timeout: 260 seconds]
sarbs has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
quazimodo has quit [Ping timeout: 260 seconds]
sarbs has joined #ruby
quazimodo has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
pawnbox has quit [Remote host closed the connection]
yardenbar has joined #ruby
TheMainFrame has joined #ruby
amclain has quit [Quit: Leaving]
dminuoso_ has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
polysics has joined #ruby
saneax-_-|AFK is now known as saneax
orangey has joined #ruby
anisha has joined #ruby
hahuang61 has joined #ruby
cpruitt has joined #ruby
dionysus69 has joined #ruby
d3d1rty has quit [Ping timeout: 244 seconds]
evidex has joined #ruby
Ropeney has joined #ruby
Ropeney has quit [Client Quit]
hahuang61 has quit [Ping timeout: 260 seconds]
evidex has quit [Ping timeout: 252 seconds]
arup_r has quit []
cpruitt has quit [Quit: cpruitt]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
evidex has joined #ruby
ramfjord has joined #ruby
muelleme has joined #ruby
masterasia has quit [Read error: Connection reset by peer]
masterasia has joined #ruby
Salve has joined #ruby
conta has joined #ruby
xall_ has quit [Ping timeout: 260 seconds]
palms has quit [Ping timeout: 260 seconds]
spiette has joined #ruby
pawnbox has joined #ruby
Salve has quit [Ping timeout: 245 seconds]
bocaneri has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
Cohedrin has joined #ruby
dminuoso_ has quit [Ping timeout: 250 seconds]
r3vDev has joined #ruby
JeanCarloMachado has joined #ruby
dminuoso_ has joined #ruby
nankyokusei has joined #ruby
troulouliou_div2 has joined #ruby
firstdayonthejob has joined #ruby
kimegede has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
nankyokusei has quit [Ping timeout: 260 seconds]
xall_ has joined #ruby
firstdayonthejob has quit [Ping timeout: 256 seconds]
blackbombay has quit [Ping timeout: 240 seconds]
quazimodo has quit [Ping timeout: 260 seconds]
Alina-malina has quit [Ping timeout: 260 seconds]
doublemalt__ has joined #ruby
hs366 has joined #ruby
polysics has quit []
govg has quit [Ping timeout: 256 seconds]
tomphp has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jgt has joined #ruby
dminuoso_ has quit [Remote host closed the connection]
muelleme has quit [Ping timeout: 265 seconds]
pawnbox has joined #ruby
lacour has quit [Quit: Leaving]
evidex has quit [Ping timeout: 248 seconds]
ramfjord has quit [Ping timeout: 252 seconds]
aganov has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
ur5us has joined #ruby
pawnbox has quit [Ping timeout: 244 seconds]
symm- has quit [Ping timeout: 240 seconds]
Salve has joined #ruby
djbkd has quit [Ping timeout: 260 seconds]
mark_66 has joined #ruby
flashpoint9 has joined #ruby
dminuoso_ has joined #ruby
hahuang61 has joined #ruby
Salve has quit [Ping timeout: 248 seconds]
toretore has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
nadir has quit [Quit: Connection closed for inactivity]
govg has joined #ruby
dionysus69 has joined #ruby
flashpoint9 has quit [Ping timeout: 256 seconds]
hahuang61 has quit [Ping timeout: 240 seconds]
tris has quit [Ping timeout: 256 seconds]
andikr has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
last_staff has joined #ruby
Salve has joined #ruby
LoneHerm_ has joined #ruby
claudiuinberlin has joined #ruby
IsoLinCHiP has quit [Quit: WeeChat 1.5]
Salve has quit [Ping timeout: 258 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox_ has joined #ruby
antgel has joined #ruby
pawnbox has quit [Ping timeout: 256 seconds]
pawnbox_ has quit [Ping timeout: 256 seconds]
gingray has joined #ruby
pawnbox has joined #ruby
agit0 has joined #ruby
aufi has joined #ruby
flying has joined #ruby
pawnbox_ has joined #ruby
edwinvdgraaf has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
edwinvdgraaf has quit [Read error: Connection reset by peer]
tris has joined #ruby
edwinvdgraaf has joined #ruby
govg has quit [Ping timeout: 260 seconds]
Salve has joined #ruby
blaxter has joined #ruby
charliesome has joined #ruby
zacts has quit [Ping timeout: 240 seconds]
Salve has quit [Ping timeout: 260 seconds]
biberu has joined #ruby
SesMan has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
lenwood has joined #ruby
ferr has joined #ruby
dionysus69 has quit [Quit: dionysus69]
dionysus69 has joined #ruby
nettoweb has joined #ruby
Silthias has joined #ruby
marr has joined #ruby
knutmithut has quit [Ping timeout: 260 seconds]
Silthias1 has joined #ruby
zacts has joined #ruby
Silthias has quit [Ping timeout: 268 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
minimalism has quit [Quit: minimalism]
flashpoint9 has joined #ruby
pawnbox has joined #ruby
Burgestrand has joined #ruby
nettoweb has quit [Read error: Connection timed out]
Ewelina has joined #ruby
hahuang61 has joined #ruby
nettoweb has joined #ruby
r3vDev has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby
blaxter has quit [Quit: foo]
flashpoint9 has quit [Ping timeout: 260 seconds]
mikecmpbll has joined #ruby
blackwind_123 has quit [Ping timeout: 244 seconds]
Chair has joined #ruby
hahuang61 has quit [Ping timeout: 245 seconds]
teclator_ is now known as teclator
nettoweb1 has joined #ruby
polysics has joined #ruby
jsrn_ has joined #ruby
livcd has joined #ruby
nettoweb has quit [Ping timeout: 260 seconds]
<livcd>
what are some used alternative runtimes for Ruby ?
SesMan has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SesMan has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
charliesome has joined #ruby
dezull has quit [Quit: Leaving]
zukin has joined #ruby
c0mrad3 has joined #ruby
astrobunny has quit [Remote host closed the connection]
Salve has joined #ruby
kies has quit [Ping timeout: 260 seconds]
charliesome has quit [Client Quit]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
Salve has quit [Ping timeout: 240 seconds]
kies has joined #ruby
<Bish>
Papierkorb: hi, you once suggested me using shrine, can you tell me why my Model.file= always wants to send files to :cache ?
<Bish>
livcd: alternative runtimes?
xall_ has quit [Ping timeout: 265 seconds]
elifoster has quit [Quit: sleep]
LoneHerm_ has quit [Remote host closed the connection]
nankyokusei has joined #ruby
<leftpad>
livcd : jruby ?
Rumbles has joined #ruby
<Bish>
i am not sure if he is talking about other vms, rails-competitors, rack adapters
<Bish>
now that's a unspecific question
Filiphe has joined #ruby
Beams has joined #ruby
<livcd>
vms
<Bish>
yeah there is about 3 big ones.
<Bish>
YARV, jruby, rbx
kies has quit [Ping timeout: 258 seconds]
Ewelina has quit [Remote host closed the connection]
<livcd>
but are they big ? I am not so surea bout their popularity
<Bish>
jruby is basicially faster, but you have issues having c-extensions, so you're missing alot of gems
<Bish>
rbx tries to be jruby but fails(imho), it's great but doesn't perform as well
nankyokusei has quit [Ping timeout: 246 seconds]
<livcd>
rbx is rubinius ?
<Bish>
right
leftpad has quit [Read error: Connection reset by peer]
<livcd>
what about this GraalVM ?
ziarkaen has joined #ruby
<Bish>
well, there have been alot of multi-language vms already, one was called like a bird that also supported ruby
<Bish>
don't remember the name
<Bish>
i think if they were better than yarv/jruby people would be using it
tomphp has joined #ruby
<Bish>
also: you will fail at using c-extensions there again
jaruga___ has joined #ruby
JeanCarloMachado has joined #ruby
<chrisseaton>
Bish: we're adding support for C extensions back in JRuby+Truffle - I have a talk later this week at RubyConf on how this works
<Bish>
chrisseaton: so you're a graalguy?
<chrisseaton>
Yeah
<Bish>
cool, this stuff is really interesting!
<hanmac>
JRuby with C-ext support? thats interesting to hear ... if that happens i might increase my travis cases for my binding
<Bish>
i never got jruby to work, its always hurting me too much
<Bish>
:D
<Bish>
and i guess if i had to configure it to use c extensions again uff, that will hurt even more
<livcd>
i wonder why RubyMotion never really took off
<Bish>
but if it's worth it
<livcd>
I mean I know it's used here and there but it is not that popular :-|
Ewelina has joined #ruby
<livcd>
makes me sad a bit
<Bish>
livcd: jesus christ u sure know the weird projects!
<livcd>
:-|
<chrisseaton>
The idea would be it's more of a drop-in for MRI
<chrisseaton>
There's a version where you don't need a JVM, for example
<Bish>
im experimenting with reactrb right now, which would let you write React(Native?) apps in nearly 100% ruby
<Bish>
which would then allow you to ship apps, certainly interesting
<Bish>
so you have another weird project in your pocket :D
kies has joined #ruby
<Bish>
opal is really good
<livcd>
oracle has an amazing projects and people but with their reputation I do not see many businesses so keen on using their stuff
<Bish>
yeah, i feel the same way
bhaak has quit [Ping timeout: 260 seconds]
<livcd>
it's about marketing, longevity, support, hype
<livcd>
technical superiority does not matter these days
aidalgol has quit [Remote host closed the connection]
<livcd>
Bish: You do not like rubymotion ?
<Bish>
i've never seen those compile to native mobile platforms thing work
<Bish>
they always navigate you in a corner where you cannot get out
<Bish>
also you're absolutely dependant on them, those will never work( a guess )
dchapman has quit [Quit: leaving]
<Bish>
and code will be big, imperformant, battery-draining
kies has quit [Ping timeout: 246 seconds]
<livcd>
Bish: I think it's the opposite for rubymotion
<Bish>
well then they found the holy grail
<Bish>
because if the ruby code will be fast and not battery-draining, there is some interpreter that works better than yarv
<Bish>
or jruby
bhaak has joined #ruby
ur5us has quit [Remote host closed the connection]
<livcd>
there's no interpreter
<Bish>
there is always an interpreter
<Burgestrand>
RubyMotion compiles, just like ObjC or Swift
edwinvdgraaf has quit [Ping timeout: 256 seconds]
<Burgestrand>
afaik
<Bish>
yeah that's why i added "some" before interpreter
<Bish>
a cpu is also an interpreter
josealobato has joined #ruby
<Burgestrand>
You're an interpreter
<livcd>
But we were talking about something else :-)
<Burgestrand>
I used RubyMotion for a while, but there were too many nuances with memory leaks and blocks which made me abandon it
<livcd>
When did you use it ?
<Burgestrand>
A rather long while ago, 1.5 years or so
Ewelina has quit [Remote host closed the connection]
<livcd>
that's a while
<Burgestrand>
It was a nice experience though, and the ecosystem around it was not too bad either
<Burgestrand>
I really did enjoy the compilation toolchain, very well done
<Burgestrand>
(i.e. letting you escape XCode)
Ewelina has joined #ruby
<Bish>
i just said, if the code is fast, there is an interpreter interpreting ruby code(in some form) better than anything else
zukin has quit [Ping timeout: 258 seconds]
<Bish>
that is not the case
bluOxigen has quit [Read error: Connection reset by peer]
tvw has joined #ruby
kies has joined #ruby
<Burgestrand>
it is
<Bish>
enlighten me
<Bish>
why is not everyone using it?
MrSamuel has joined #ruby
emilkarl has joined #ruby
<Burgestrand>
💡
<livcd>
Bish: actually that was kinda my question at the beginning of our discussion
<Bish>
yeah but i dobut that someone wrote a toolchain that makes ruby perform at native speed without disadvanteges
elaptics has joined #ruby
<Burgestrand>
The problem is not performance or code bloat, which are no different from using the Apple languages
<livcd>
Bish: but the answer is simple i guess ...rm reimplements ruby and does not have an access to the vast ecosusytem of gems
<Burgestrand>
There are several problems, but the big one I see is that you can't get away with not learning the native APIs for the platform
Salve has joined #ruby
<Burgestrand>
Which means to do RubyMotion you either need to be a mobile developer already and have the experience in ObjC/Swift, or you're learning both the language and the platform for the first time
<Bish>
i thought rm also does android
<Burgestrand>
It does, but I'm not touching that so I can't speak for that
<Bish>
so it's not platform-independant?
<Burgestrand>
It is
<Bish>
you're confusing me
<Burgestrand>
The language is, the APIs you have access too aren't necessarily the same
<Bish>
but it's blazingly fast?
d0nn1e has quit [Ping timeout: 256 seconds]
<Burgestrand>
It's no slower than Swift
<Burgestrand>
or ObjC
<Burgestrand>
or rather, performance is not really a concern
d0nn1e has joined #ruby
Ewelina has quit []
LoneHermit has joined #ruby
<Burgestrand>
It's kind of a bootstrapping problem too, the risk of doing a language nobody uses is enough to make few people use it
Salve has quit [Ping timeout: 256 seconds]
<Bish>
i thought we're talking about ruby
<Burgestrand>
Syntax is not a problem, experienced developers pick up new syntax very quickly
<Bish>
what syntax i thought we're talking ruby
<Burgestrand>
I think you might be trolling, so I'll leave you here
<livcd>
I am not sure if it's 1:1 re-implementation
<livcd>
is it ? Burgestrand ?
<Burgestrand>
Oh, yeah it's not
<Bish>
yeah, so mystery solved
<Bish>
it's not ruby
<Bish>
i am not trolling
frozengeek has joined #ruby
<Burgestrand>
livcd it is however extremely similar
<Bish>
crystal is also faster than ruby, and native, but it's not ruby
<livcd>
Bish: Is Dalvik Java ? :-|
<Burgestrand>
Keyword arguments brought me the most annoyance :)
<Bish>
does that ruby that is not ruby have metaprogramming?
LoneHermit has quit [Ping timeout: 245 seconds]
<Bish>
can i have monkey patches in there?
<Bish>
livcd: i have a feeling that dalvik is closer to the usual jvm
dionysus69 has quit [Ping timeout: 252 seconds]
<livcd>
Bish: well rm is more ruby than crystal is
<Bish>
than what you are talking about, simply because it's a very hard problem, what you are talking about cannot be, unless you have the best vm designers of the world designing it
edwinvdgraaf has joined #ruby
<livcd>
But I have no experience with it I am just interested in using it in the future
<livcd>
so I leave the details and explanations to Burgestrand
nettoweb1 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Bish>
how can you say such thing without giving it a try?
<Bish>
if your magic rm lacks of metaprogramming, it's not even close to being ruby, and that is what i expect it to be
<livcd>
Bish: because I have seen Crystal and I have seen RM. I have read the docs
<livcd>
afaik you can do some metaprogramming in RM it's just not first class part of the implementation
bluOxigen has joined #ruby
<Bish>
well i am having my answer why it "didn't take off"
<livcd>
that's not the answer
<Bish>
for me it is
Alina-malina has joined #ruby
<Burgestrand>
You can metaprogram and monkeypatch in ObjC, Swift, and RM
<Bish>
and android, because that's what rm can do also
<Burgestrand>
You're looking for a naive answer where there isn't one
<Bish>
well, i found it, as i said
<livcd>
Burgestrand: I think I have read that you could not meta strings and bindings
<livcd>
or did they do something about it already ?
nettoweb has joined #ruby
<livcd>
Bish: well a lot of people moved towards react,xamarin etc.
<Burgestrand>
livcd MRI is definitely more expressive than RubyMotion in what you can do runtime
<livcd>
I think competition was / is fierce
<Bish>
ruby is very carefully designed and matz is putting a lot of effort into it not to break it
jphase has quit [Read error: No route to host]
<Bish>
if you're not 99% compatible, it's not what ruby is, i don't want to destroy your dreams, but i played alot with these magic things
camilasan has quit [Read error: Connection reset by peer]
tristanp_ has joined #ruby
<Burgestrand>
livcd it was not uncommon for me to write something that works in MRI, but not in RM
<livcd>
Burgestrand: I thought so. I am looking forward to use RM for some toy projects
jphase has joined #ruby
<Bish>
the best thing i saw in time was opal, it really doesn't break anywhere (but maybe js-eventloop)
<Burgestrand>
livcd I might've gone RM for my current iOS project, but I completely forgot that it was an option so I just went with Swift :)
<livcd>
Bish: but opal is a different beast from what RM does
JeanCarloMachado has quit [Ping timeout: 265 seconds]
Darmani has quit [Ping timeout: 260 seconds]
<Bish>
yeah because rm does not do ruby ^^
wlanboy has quit [Ping timeout: 244 seconds]
KramerC has quit [Ping timeout: 252 seconds]
<livcd>
Burgestrand: well I guess it also depends on how serious your project is. For me it would not make any difference as I would have to learn Swift from scratch
Guest46738 has quit [Ping timeout: 256 seconds]
tristanp has quit [Ping timeout: 260 seconds]
KramerC has joined #ruby
<Bish>
anyone familiar with the shrine gem, that can tell me why everything gets uploaded into the cache?
<Burgestrand>
livcd Yeah, I'm doing this commercially, I'm not sure I could justify the risk of using RubyMotion for it yet
Salve has joined #ruby
wlanboy has joined #ruby
<Burgestrand>
livcd (but I'm not sure I couldn't, either :))
JeanCarloMachado has joined #ruby
mixdev23 has quit [Read error: Connection reset by peer]
emilkarl has quit [Read error: Connection reset by peer]
<Bish>
nevermind, i found out!
pawnbox has quit [Ping timeout: 244 seconds]
emilkarl_ has joined #ruby
<livcd>
Burgestrand: sigh I think this is why RM never really took off (too risky, no backing from mega corp, steep pricing (back then), low marketshare)
mixdev23 has joined #ruby
<livcd>
basically a chicken egg problem
<Burgestrand>
livcd I agree
<Burgestrand>
livcd I mean, coming from the outside, unless you're already a ruby developer (or a ruby shop), what reason would there be to pick RM over Swift or ObjC? I personally can't see one
futabachannel has quit [Read error: Connection reset by peer]
agit0 has quit [Ping timeout: 268 seconds]
<livcd>
You do not want to use xcode :-D
<Burgestrand>
I can get behind that :P
yardenbar has quit [Ping timeout: 256 seconds]
Salve has quit [Ping timeout: 260 seconds]
futabachannel has joined #ruby
<Bish>
if someone lends me 10 million dollars i could earn some interest and never have to work to earn money
<Bish>
basicially a chicken egg problem
<Bish>
(i am trolling now)
yardenbar has joined #ruby
<livcd>
I can tell
<Bish>
because that's the problem with every project, it's not specific to your holy grail
jaruga___ has quit [Quit: jaruga___]
<Burgestrand>
I guess the reason would have to be that it's faster to develop in RM than the alternatives, which isn't unlikely
<livcd>
I think they missed the train with the steep pricing back then
Guest22943 has joined #ruby
<livcd>
but from what I know people were abusing the licenses and submitted to apple store and did not pay a dime
<Burgestrand>
When I used RM the pricing was roughly the same as the Apple Developer program pricing
<Burgestrand>
livcd Do you know if it was ever more expensive than that? I have a vague memory of it but can't trust it
<Burgestrand>
Oh, cool, they've changed their pricing a lot
ohcibi_ is now known as ohcibi
TomyWork has joined #ruby
<livcd>
Yes
<livcd>
back at the time when I was interested in learning iOS apis using RM it was 200$ paid annually + 99$ for major upgrades
<livcd>
that's very steep when you are interested in just learning / prototyping
<Burgestrand>
Yes, for sure
camilasan has joined #ruby
edwinvdgraaf has quit [Read error: Connection reset by peer]
edwinvdgraaf has joined #ruby
lenwood has quit [Ping timeout: 246 seconds]
jgt has quit [Quit: WeeChat 1.4]
<Burgestrand>
Their current pricing makes much more sense, more likely to give them ambassadors to weasel themselves in to bigger projects :)
emilkarl_ is now known as emilkarl
<livcd>
maybe they have solved the issues with publishing to app store with the free license
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<rapha>
is there a way to 'disable' Ruby's negative array indices somehow?
flashpoi_ has joined #ruby
<rapha>
(i'd like to get nil if an index does't exist)
phaza has quit [Ping timeout: 260 seconds]
lenwood has quit [Ping timeout: 256 seconds]
<vktec>
rapha: So... you want nil for a negative index?
flashpo__ has quit [Ping timeout: 258 seconds]
<vktec>
Why not just use an if statement?
<rapha>
hmm
<vktec>
if i < 0 then nil else l[i] end
<rapha>
okay i could change i first
<rapha>
yeah, that'll do ofc
flashpo__ has joined #ruby
emilkarl_ has quit [Read error: Connection reset by peer]
<oddmunds>
rapha: you can extend Array
<hanmac>
patchiey: as you see, your ruby is installed under rvm for local user, but your current one has no access to install gems
<Burgestrand>
oddmunds :DS
roamingdog has quit [Remote host closed the connection]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<patchiey>
hanmac: but this worked right before the restart.
<patchiey>
hanmac: how could this be? and how do i fix it? please :)
josealobato has joined #ruby
johnmilton has joined #ruby
<rapha>
oddmunds: i guess that's a trouble i'd only go to if i could really monkeypatch it, i.e. if i could overwrite Array#[]
<hanmac>
patchiey: maybe its not loaded correctly
flashpoint9 has quit [Ping timeout: 258 seconds]
flashpoint9 has joined #ruby
emilkarl has joined #ruby
xall_ has joined #ruby
<patchiey>
hanmac: any idea how to fix it?
flashpoi_ has quit [Ping timeout: 244 seconds]
flashpoi_ has joined #ruby
<oddmunds>
rapha: i was thinking more along the lines of making a class called RaphArray that extends Array
flashpo__ has quit [Ping timeout: 244 seconds]
<hanmac>
patchiey: hm it seems RUBY EXECUTABLE is the problem there ... but you should try to ask in #rvm how to fix that
<rapha>
oddmunds: yeah, that's not cool enough to do just for the heck of it and i only need this in one single line so i'll stay with vktec's suggestion :)
Madplatypus has quit [Quit: Connection closed for inactivity]
flashpo__ has joined #ruby
<Burgestrand>
extending core classes is riddled with traps, they're not really built with being extended in mind
tyang has quit [Ping timeout: 268 seconds]
flashpoint9 has quit [Ping timeout: 258 seconds]
<rapha>
all the more reason for it to be cool to do so
flashpoi_ has quit [Ping timeout: 258 seconds]
flashpoint9 has joined #ruby
lxsameer has quit [Quit: WeeChat 1.5]
flashpoi_ has joined #ruby
flashpo__ has quit [Ping timeout: 248 seconds]
flashpo__ has joined #ruby
synthroid has joined #ruby
flashpoint9 has quit [Ping timeout: 258 seconds]
govg has quit [Ping timeout: 258 seconds]
koooge has quit [Quit: Leaving...]
dn`_ has joined #ruby
dn` has quit [Ping timeout: 258 seconds]
dn`_ is now known as dn`
dn` has quit [Client Quit]
flashpoint9 has joined #ruby
senayar has joined #ruby
CloCkWeRX has quit [Ping timeout: 250 seconds]
dn` has joined #ruby
flashpoi_ has quit [Ping timeout: 258 seconds]
flashpoi_ has joined #ruby
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
allcentury has joined #ruby
flashpo__ has quit [Ping timeout: 258 seconds]
Salve has joined #ruby
flashpo__ has joined #ruby
creat has joined #ruby
cloud has joined #ruby
flashpoint9 has quit [Ping timeout: 258 seconds]
flashpoint9 has joined #ruby
govg has joined #ruby
flashpoi_ has quit [Ping timeout: 258 seconds]
flashpoi_ has joined #ruby
<patchiey>
hanmac: thanks.
Salve has quit [Ping timeout: 260 seconds]
flashpo__ has quit [Ping timeout: 258 seconds]
GinoManWorks has joined #ruby
binaryplease has joined #ruby
flashpo__ has joined #ruby
iwmrby has joined #ruby
flashpoint9 has quit [Ping timeout: 258 seconds]
herbmillerjr has quit [Remote host closed the connection]
flashpoint9 has joined #ruby
rfoust has joined #ruby
flashpoi_ has quit [Ping timeout: 256 seconds]
Terens has joined #ruby
Rickmasta has joined #ruby
<Terens>
hello
<Terens>
when should i use class variables
<Terens>
instead of constant?
flashpoi_ has joined #ruby
mpr555 has joined #ruby
blaxter has joined #ruby
dn` has quit [Ping timeout: 248 seconds]
flashpo__ has quit [Ping timeout: 244 seconds]
flashpoint9 has quit [Read error: Connection reset by peer]
<vktec>
When it relates specifically to one Class
hahuang61 has joined #ruby
CloCkWeRX has joined #ruby
phaza has joined #ruby
Rickmasta has quit [Ping timeout: 240 seconds]
sepp2k has quit [Ping timeout: 256 seconds]
redpants has joined #ruby
rajdesai has joined #ruby
Filiphe has quit [Remote host closed the connection]
phaza_ has quit [Ping timeout: 250 seconds]
ebye has quit [Quit: BitchX-1.2.1 -- just do it.]
dn` has joined #ruby
hahuang61 has quit [Ping timeout: 260 seconds]
nankyokusei has joined #ruby
blaxter has quit [Quit: foo]
dminuoso_ has quit [Ping timeout: 240 seconds]
dionysus69 has quit [Ping timeout: 260 seconds]
nankyokusei has quit [Ping timeout: 256 seconds]
jcao219 has joined #ruby
interpolate has joined #ruby
brendan- has joined #ruby
sepp2k has joined #ruby
platzhirsch has joined #ruby
mim1k|work has quit [Ping timeout: 265 seconds]
dionysus69 has joined #ruby
mim1k|work has joined #ruby
govg has quit [Ping timeout: 265 seconds]
Salve has joined #ruby
futabachannel has quit [Ping timeout: 268 seconds]
AlexJakeGreen has joined #ruby
jhack has joined #ruby
naprimer_3 has quit [Ping timeout: 244 seconds]
Martin__ has quit []
CloCkWeRX has quit [Ping timeout: 252 seconds]
d0nn1e has quit [Ping timeout: 260 seconds]
Salve has quit [Ping timeout: 260 seconds]
iwmrby has quit [Quit: WeeChat 1.6]
redpants has quit [Ping timeout: 265 seconds]
rajdesai has quit [Remote host closed the connection]
m4rCsi has quit [Quit: No Ping reply in 180 seconds.]
m4rCsi has joined #ruby
conta has quit [Ping timeout: 265 seconds]
tvw has quit [Remote host closed the connection]
synthroid has quit [Remote host closed the connection]
jhack has quit [Ping timeout: 260 seconds]
moneylotion has joined #ruby
AlexRussia has joined #ruby
dopamean_ has joined #ruby
jhack has joined #ruby
hahuang61 has quit [Ping timeout: 260 seconds]
aufi has quit [Ping timeout: 250 seconds]
dopamean_ has quit [Client Quit]
dopamean_ has joined #ruby
lenwood has joined #ruby
roamingd_ has quit [Remote host closed the connection]
roamingdog has joined #ruby
jhack has quit [Ping timeout: 256 seconds]
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
hightower3 has joined #ruby
roamingdog has quit [Remote host closed the connection]
amclain has joined #ruby
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
<lupine>
I have a really thorny regex problem that I would *like* to solve with a variable-length negative lookbehind capture group. Ruby doesn't support the "variable-length" part of that. suggestions? ^^
jhack has joined #ruby
<lupine>
http://rubular.com/r/lboKkL4IkV - I want to avoid matching line 3 in the test data, while leaving all other matches untouched
hightower2 has quit [Ping timeout: 240 seconds]
tlaxkit has quit [Remote host closed the connection]
jackjackdripper has joined #ruby
tlaxkit has joined #ruby
flying has quit []
augcesar has joined #ruby
skweek has quit [Ping timeout: 256 seconds]
edwinvdg_ has quit [Read error: Connection reset by peer]
dionysus69 has quit [Ping timeout: 265 seconds]
xrlabs has quit [Quit: Connection closed for inactivity]
matheusmoreira has quit [Ping timeout: 260 seconds]
matheusmoreira has joined #ruby
frozengeek has quit [Quit: frozengeek]
<Bish>
is there a lonely operator for array access?
<aegis3121>
[]&:[](index)
<Bish>
eh?
<Bish>
u mean &.[]()
<aegis3121>
Well, with a `.` instead of a colon.
<Bish>
that's ugly
<aegis3121>
yep
<aegis3121>
Could use `#at`
<aegis3121>
[]&.at(index)
<ljarvis>
Array(arr)[index]
<baweaver>
you can also make a wrapper for it
pokalyis has quit [Ping timeout: 250 seconds]
<Bish>
well the thing i want to use it at, does not have .at
<ruby[bot]>
squarebracket: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<squarebracket>
ok, sure, i'll use gists rubybot
pawnbox_ has joined #ruby
<apeiros>
squarebracket: self in initialize is the instance already
pawnbox has quit [Read error: Connection reset by peer]
<apeiros>
you need to call it on the class, you reach it via self.class or the class' constant
<squarebracket>
ahhh, right.
ziarkaen has quit [Ping timeout: 246 seconds]
<squarebracket>
thanks, no matter how much I seem to read on the subject, Ruby's class model always feels a bit foreign to me :(
<apeiros>
that's surprising. it's a rather simple model.
<hanmac>
just wait until you hear that a singleton_class does have singleton class XD (all the way down)
<apeiros>
linear ancestry. nothing can hold methods except modules (and classes - which are modules))
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jhack has quit [Quit: jhack]
XangadiX has joined #ruby
harai has joined #ruby
Beams has quit [Quit: .]
pawnbox_ has quit [Remote host closed the connection]
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
<squarebracket>
I mean, I get that part, and the whole include/extend thing. It just seems weird to me that 'self' doesn't reference the instance, it references ... the class I guess?
<elomatreb>
Ruby classes are also just objects, instances of "Class"
<squarebracket>
And, from what I understand, that's where the `class << self` paradigm comes from -- add stuff to the class of the current instance.
<hanmac>
singleton classes are classes too ;P
baweaver is now known as Simmon
Simmon is now known as baweaver
Salve has joined #ruby
rfoust has joined #ruby
gusrub_ has quit [Remote host closed the connection]
<apeiros>
squarebracket: eh, of course self references the instance
<apeiros>
squarebracket: if it referenced the class, your code would have worked as-is.
<apeiros>
but as you say yourself, that makes no sense.
Rutix has joined #ruby
Rutix has quit [Changing host]
Rutix has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<squarebracket>
you're right, I was just writing that that couldn't be the case...
<squarebracket>
this is where i get confused.
<apeiros>
you can have places where self is a class
<apeiros>
because, as elomatreb just said, classes are objects too. there are scopes where you're within them as instances.
<apeiros>
e.g. within the class body.
<apeiros>
or within class methods
railssmith has quit [Ping timeout: 260 seconds]
Silthias1 has quit [Quit: Leaving.]
<squarebracket>
oh, so self always refers to the underlying object? and then depending on scope, that will be the instance, or the class?
SteenJobs has quit [Quit: SteenJobs]
<apeiros>
self is always the current object
<apeiros>
always the instance
<elomatreb>
Class Bla; .... end is just syntax sugar for `Bla = Class.new do ... end`
<squarebracket>
ah, ok ,right.
antgel has quit [Ping timeout: 245 seconds]
<apeiros>
and self.class will tell you of which class it is an instance
<apeiros>
since Foo is a class, it's an instance of Class
<elomatreb>
Class.ancestors is also nice
hahuang61 has joined #ruby
XangadiX has quit [Quit: ego sensuo, carthagenem delendam.]
brendan- has joined #ruby
claudiuinberlin has quit []
<apeiros>
yes, though I'd love if there was an Object#method_lookup_chain
jhack has joined #ruby
cdg has quit [Remote host closed the connection]
flashpoint9 has joined #ruby
<squarebracket>
so then that makes sense why `self.method` within a class definition would attach that method to the Class object (i.e. a classmethod), but what about regular instance methods? Is that just more syntactic sugar for self.objected_created_thru_initialize.method?
<apeiros>
other way round
<apeiros>
def self.foo is syntax sugar
<apeiros>
hm, maybe not sugar
<elomatreb>
apeiros: Do you think one could build something like that? Would probably be extremely useful for learning
<apeiros>
but as I said before, classes are the only containers for methods. what I omitted: instance methods are the only type of methods there is.
SteenJobs has joined #ruby
<apeiros>
and the term "class method" is actually just a convenient convention to name "instance methods on the singleton class of a class or module"
TomyWork has quit [Ping timeout: 256 seconds]
<squarebracket>
oh, ok
<squarebracket>
right, that makes sense.
* squarebracket
thinks
<apeiros>
the singleton_class is the one bit which is surprising in rubys object model.
<apeiros>
you know how it works?
SteenJobs has quit [Client Quit]
<apeiros>
elomatreb: yes
<apeiros>
elomatreb: I'm not sure it'd make much sense, though.
<elomatreb>
I think it has similar benefits to things like did_you_mean
tlaxkit has quit [Quit: tlaxkit]
<apeiros>
oh. maybe I misunderstand what you meant "could be built"
jahmalz has quit [Quit: Leaving]
<apeiros>
oooh, you meant Object#method_lookup_chain ?
elaptics has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<elomatreb>
Yes ;)
<apeiros>
I think it'd be 99% self.class.ancestors
<apeiros>
the missing bit would be "test for presence of singleton_class, and if there's one, prepend it"
jcao219 has joined #ruby
<squarebracket>
apeiros: based on what you've said, I'd assume singleton_class refers to the singleton object that represents the underlying class, i.e. it is the thing to which "class methods" are attached.
<apeiros>
squarebracket: the part "it is the thing to which "class methods" are attached" is correct
<apeiros>
not sure about the rest :)
<elomatreb>
apeiros: I don't know about you, but such debugging tools help dumb people like me extremely. I can't express how much I miss source_location in other languages
troulouliou_div2 has quit [Ping timeout: 252 seconds]
<apeiros>
every object has a singleton_class (ruby doesn't always create it for performance reasons). it's indeed the place where methods live which belong to that class, and that class only.
<apeiros>
whoops
<apeiros>
every object has a singleton_class (ruby doesn't always create it for performance reasons). it's indeed the place where methods live which belong to that *object*, and that object only.
<apeiros>
in the method lookup chain, it's the one hidden class which comes right before the class of the object itself.
<apeiros>
i.e. `x.foo` will look in x.singleton_class for the method foo, then in x.class, then in the rest of x.class.ancestors
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
<apeiros>
and it doesn't actually matter whether x is a class or another object. it's just more common with classes. but proof for other objects:
<apeiros>
>> x = "foo"; def x.a_singleton_class_method; "yay!"; end; x.a_singleton_class_method
<ruby-lang953>
does anyone know how to fix the issues with installing gems on latest ruby release?
roamingdog has quit [Ping timeout: 252 seconds]
bocaneri has quit [Remote host closed the connection]
jcao219 has joined #ruby
<havenwood>
ruby-lang953: What's the issue you're running into?
<ruby-lang953>
I want to make my script into an exe
dminuoso_ has joined #ruby
<ruby-lang953>
so I want to install ocra
<ruby-lang953>
but it can't connect to rubygems.org
conta has joined #ruby
dminuoso_ has quit [Client Quit]
<ruby-lang953>
I made a simple translator program, and I wanted to share it with those that don't have ruby
kirun has joined #ruby
<havenwood>
ruby-lang953: Windows doesn't have the updated intermediate certs necessary and the version of RubyGems that ships with the Ruby you've installed must not have them either. A good solution would be to update RubyGems.
<havenwood>
yottabyte: Plenty of folk use Angular with Rails. You might want to also ask in the #rubyonrails channel.
<havenwood>
yottabyte: Or you can use React or Elm or whatever else with Rails. There are various ways to pull it off.
<dminuoso>
havenwood: AngularJS does not fit well into the realm of Rails honestly.
<dminuoso>
havenwood: React on the other hand is great for Rails.
<havenwood>
dminuoso: Yet folk do it.
<dminuoso>
havenwood: There's just very little point since by using AngularJS you have shifted most things that make Rails useful into the client already.
jcao219 has quit [Ping timeout: 252 seconds]
<ruby-lang953>
will a marshal dump save a hash?
jhack has joined #ruby
<havenwood>
dminuoso: Yeah, two-way data binding seems to be a heavy sink where a component on this or that view is easy to pull off.
<havenwood>
ruby-lang953: Try it!
<havenwood>
ruby-lang953: (Yes.)
conta has quit [Ping timeout: 260 seconds]
<nofxx>
dminuoso, agreed. Also another nice kid in this block: vue.js
smlocal has joined #ruby
<nofxx>
that's how we do it here, 5, 10 SPA's on vue, and the rest 90% is only cruds and htmls and rails fun
<hanmac>
i need to search if a book with the title "Ruby is more than Rails" already exist ... ;P
VeryBewitching has joined #ruby
triangles has joined #ruby
Madplatypus has joined #ruby
gusrub_ has quit [Remote host closed the connection]
troulouliou_div2 has quit [Quit: Leaving]
gusrub_ has joined #ruby
tomphp has joined #ruby
spacenoid has joined #ruby
<miah>
hanmac: yes several
gusrub_ has quit [Remote host closed the connection]
tyang_ has joined #ruby
gusrub_ has joined #ruby
<askhader>
I'm experiencing an OpenSSL error while using a PayPal library. I want to verify exactly what values OpenSSL is working with (i.e. cert store path, signing algo.) - what's the best way to go about that?
nonnatus has joined #ruby
phantompain has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SteenJobs has joined #ruby
SteenJobs has quit [Client Quit]
tyang has quit [Ping timeout: 248 seconds]
aegis3121 has quit [Ping timeout: 248 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
tdy has quit [Ping timeout: 260 seconds]
tomphp has joined #ruby
gusrub_ has quit [Ping timeout: 258 seconds]
sparch has quit [Ping timeout: 244 seconds]
Dimik has joined #ruby
cbetta has joined #ruby
bmurt has joined #ruby
tomphp has quit [Ping timeout: 260 seconds]
tomphp has joined #ruby
skweek has joined #ruby
sepp2k has quit [Quit: Leaving.]
tomphp has quit [Client Quit]
aegis3121 has joined #ruby
troys is now known as troys_
last_staff has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
roamingdog has joined #ruby
roamingdog has quit [Ping timeout: 260 seconds]
quazimodo has joined #ruby
<askhader>
How can I check what the version of HttpClient is compatible with my version of ruby? (1.8.7)
memlock has joined #ruby
<havenwood>
askhader: Clone the repo and run the tests. It looks like 1.8 was removed from its Travis CI fairly recently.
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
naftilos76 has quit [Read error: Connection reset by peer]
polysics has quit [Ping timeout: 260 seconds]
<askhader>
havenwood: Thank you
skweek has quit [Remote host closed the connection]
naftilos76 has joined #ruby
mpwin has joined #ruby
naftilos76 has quit [Read error: Connection reset by peer]
naftilos76 has joined #ruby
skweek has joined #ruby
naftilos76 has quit [Remote host closed the connection]
jhack has quit [Ping timeout: 258 seconds]
SeepingN has quit [Ping timeout: 248 seconds]
memlock has quit [Quit: Leaving]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Darmani has joined #ruby
jhack has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
polysics_ has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 245 seconds]
<ruby-lang953>
how can I push information in a text file to a hash?
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
JeanCarl1Machado has joined #ruby
<apeiros>
ruby-lang953: you read it, and add the keys and values to the hash.
<ruby-lang953>
Im trying to use eval
<apeiros>
that sounds like a bad idea.
jphase has joined #ruby
jphase_ has quit [Read error: Connection reset by peer]
jschoolcraft has quit [Quit: peace]
jschoolcraft has joined #ruby
jschoolcraft has quit [Client Quit]
jschoolcraft has joined #ruby
<ruby-lang953>
really?
<apeiros>
really
<matheusmoreira>
someone replaces your text file with malicious code, you eval it... that's how one gets exploited.
cdg has joined #ruby
quazimodo has quit [Ping timeout: 256 seconds]
<matheusmoreira>
the sensible solution is to parse the text. what format is it in?
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chiggins has left #ruby ["WeeChat 1.5"]
gusrub_ has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
gusrub_ has quit [Remote host closed the connection]
gusrub_ has joined #ruby
pawnbox has joined #ruby
banisterfiend has joined #ruby
jackjackdripper has joined #ruby
claudiuinberlin has quit [Remote host closed the connection]
nankyokusei has joined #ruby
<ruby-lang953>
I copied hash infomration and stored in a text file
<ruby-lang953>
I got it to work with split :word: thingy
<ruby-lang953>
but the marshal dump is not working
<ruby-lang953>
it can't recognize the hash name
GinoManWorks has quit [Quit: Leaving]
<matheusmoreira>
oh so you marshalled the hash
gusrub_ has quit [Read error: Connection reset by peer]
toretore has quit [Ping timeout: 248 seconds]
pawnbox has quit [Ping timeout: 260 seconds]
gusrub_ has joined #ruby
<ruby-lang953>
I want to use text files as install and restore points
biberu has quit []
<ruby-lang953>
and marshal the hash after text files are read
<ruby-lang953>
and use marshal hash for normal function of program
<matheusmoreira>
might I suggest a different format instead? JSON is really good, will work well with hashes and can be read/written from pretty much any language, not just ruby
<Papierkorb>
and it's easy to read and write manually too
<ruby-lang953>
is there a link for json?
<matheusmoreira>
indeed
<elomatreb>
YAML is good too, if a little more heavy than JSON
<matheusmoreira>
try require 'json', it might just be built-in, I don't quite remember
symm- has quit [Quit: Leaving...]
<Papierkorb>
matheusmoreira: It has been in the standard distribution for ages :)
<matheusmoreira>
good thing about YAML is how you can write symbols natively. JSON only has string keys.
nankyokusei has quit [Ping timeout: 240 seconds]
jhack has quit [Quit: jhack]
<ruby-lang953>
I've never worked with either of those methods :(
jhack has joined #ruby
BillSussman has joined #ruby
anuxivm has joined #ruby
<matheusmoreira>
Papierkorb: IIRC there was a movement to split up most of the standard library into gems. Whatever happened to that anyway? I know 'curses' got factored out, at the very least.
symm- has joined #ruby
machinewar has joined #ruby
<Papierkorb>
matheusmoreira: Dunno, but would be surprised if JSON, yaml and friends were factored out, I mean almost any ruby script uses them
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sepp2k has joined #ruby
viva2el2 has joined #ruby
<ruby-lang953>
ok but now I am lost
<ruby-lang953>
wtf is json file?
<ruby-lang953>
do I save the file as .json?
roamingdog has joined #ruby
<Papierkorb>
ruby-lang953: you can do so, yes
<Darmani>
Is there a good place where I can practice solving OOP problems?
<Darmani>
I'm not very good at them and I need a place to start.
<ruby-lang953>
how do I load from a json file with hashes?
ziarkaen has joined #ruby
<Papierkorb>
ruby-lang953: Read the file and then use JSON.load
<viva2el2>
Not sure if this Ruby related. Using Sublime Text 3. I can't find 'name' on a reserved word list. If I use this a variable name, why doesn't the editor pick it up as a variable in syntax hightling ?
<matheusmoreira>
JSON file is just a regular file containing JSON text. you write the string you got from to_json into that file. Then you can File.read the string back and JSON.load the object
<viva2el2>
Not sure if this Ruby related. Using Sublime Text 3. I can't find 'name' on a reserved word list. If I use this a variable name, why doesn't the editor pick it up as a variable in syntax hightling ?
smlocal has quit [Remote host closed the connection]
<ruby-lang953>
so.... something = JSON.load ?
<ruby-lang953>
is there any examples?
smlocal has joined #ruby
nettoweb has joined #ruby
nettoweb has quit [Client Quit]
<viva2el2>
For example it my syntax highlighting picks up 'name_2' as a variable, so what is 'name' to Ruby ?
<Papierkorb>
viva2el2: "name" is not a keyword, feel free to use it
lel has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
<matheusmoreira>
Darmani: its good to have a problem you want to solve, and try to model it as an OO system.
_sfiguser has joined #ruby
djbkd has quit [Remote host closed the connection]
<viva2el2>
Okay so this is likely related to Sublime Text ?
<Darmani>
matheusmoreira: I don't really have a specific problem... Could you give me an example?
ziarkaen has quit [Ping timeout: 252 seconds]
smlocal has quit [Ping timeout: 258 seconds]
symm- has quit [Ping timeout: 265 seconds]
<Papierkorb>
Darmani: come up with a project. Fix something that's getting on your nerves
phantompain has joined #ruby
jenrzzz has joined #ruby
johnmilton has quit [Ping timeout: 248 seconds]
<matheusmoreira>
The only examples I know are the classic Java-tier shape/animals examples... lol.
<Darmani>
So just create an object and add attributes to it...?
skweek has quit [Ping timeout: 245 seconds]
<Papierkorb>
Darmani: I see training examples as waste. Do projects, fail hard and learn fast through that, rinse and repeat
<Papierkorb>
Darmani: Someone can tell you "doing X is a bad idea", but sometimes you have to experience why it sucks and not just learn that apparently it sucks
Synthead has joined #ruby
<Darmani>
Papierkorb: Sure I get that... I'm just trying to get the basic's down though.
symm- has joined #ruby
troys_ is now known as troys
manjaro-kde5 has quit [Ping timeout: 258 seconds]
<matheusmoreira>
Well the basic is to just create a class that represents something. It's actually pretty philosophical when I think about it. You gotta figure out what information the thing is made out of.
phaza has joined #ruby
<ruby-lang953>
is there a link for how to load a json file?
<ruby-lang953>
because it doesn't make sense to me
<matheusmoreira>
If you make an Apple class, you ask yourself... Does an apple have a color? Or is the color an accidental property that arises from the properties of its atoms? Does it have a taste? What is a taste? You have to decide how deep your analysis goes
<elomatreb>
matheusmoreira: class Hydrogen < Atom; ... end
tyang_ has quit [Ping timeout: 248 seconds]
<matheusmoreira>
You make a Person class, you gotta ask yourself, what the hell is a person? Well a person's got a name, but they also have age, weight, phone numbers, web sites, facebooks, a ton of things that may or may not be relevant to your project.
<elomatreb>
Truly atomic composition
phaza_ has quit [Ping timeout: 268 seconds]
<Papierkorb>
elomatreb: But that's not atomic, you can split that into terminals and non-terminals. Blasphemy! :P
<ruby-lang953>
what do I do with the parse?
<ruby-lang953>
do I assign it to something?
<matheusmoreira>
and then somebody comes along and actually thinks all that stuff up and makes a standard out of it: https://schema.org/Person
blackbombay_ has joined #ruby
<ruby-lang953>
it makes no sense sstil
<matheusmoreira>
this is the object structure Google uses to parse structured metadata about people
<Darmani>
:o
<Darmani>
that's cool.
<matheusmoreira>
hilariously, Person is a subclass of "Thing"
<matheusmoreira>
persons are thingies :D
SteenJobs has joined #ruby
<elomatreb>
Wikipedia had a similar project a few years ago, I don't remember what happened with that
<viva2el2>
Thanks Papierkorb for the clarification. And thanks matheusmoreira, neat link.
Immune has quit [Ping timeout: 260 seconds]
blackbombay has quit [Ping timeout: 246 seconds]
roamingdog has joined #ruby
<matheusmoreira>
you mean wikidata?
<elomatreb>
Yeah, it seems it's quite alive
<matheusmoreira>
its still very much alive, I've contributed a bunch of entries there, some data on some poisons and the studies that back that data
ruby-lang953 has quit [Quit: Page closed]
cpruitt has joined #ruby
workmad3 has joined #ruby
<matheusmoreira>
its essentially the same thing: structured data according to some sort of schema. schema.org however, specifically governs structured data embedded in HTML pages.
SteenJobs has quit [Client Quit]
<matheusmoreira>
google understands that stuff, its how those neat little boxes show up
machinewar has quit [Read error: Connection reset by peer]
<matheusmoreira>
check out those examples, its really simple. with this, HTML pages become databases
pawnbox has quit [Ping timeout: 250 seconds]
DroidBurgundy has quit [Remote host closed the connection]
polysics has quit [Ping timeout: 258 seconds]
<matheusmoreira>
anyway... The Rails codebase probably contains some of the best Ruby code out there. Learning to write good Ruby code means reading a lot of good Ruby code to train your neural network
<matheusmoreira>
Also understanding the why behind every choice
<elomatreb>
matheusmoreira: Rails also contains a lot of old stuff, don't treat it as The Perfect Ruby Code
zukin has quit [Quit: leaving]
viva2el2 has quit []
polysics has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
chungsie has joined #ruby
centrx has quit []
<chungsie>
well
<chungsie>
I converted the txt files to json using word and komodo
<chungsie>
and changed over the file access functions
<chungsie>
and I get an error still
<matheusmoreira>
well short of recommending a book such as eloquent ruby or something I'm not sure what to use for example code
<chungsie>
`parse': 784: unexpected token
SteenJobs has joined #ruby
gusrub_ has quit [Remote host closed the connection]
<chungsie>
the files look like this { "haefoo" : "slowly", "ehnee" : "lonely", "zya-foopya-zo" : "deeply", }
<chungsie>
why wont a marshal work?
yottabyte has left #ruby [#ruby]
claudiuinberlin has quit []
<elomatreb>
matheusmoreira: Rails isn't the best for example code, since it can be hard to find snippets that don't require context. ActiveSupport on the other hand is a goldmine, especially things like the Array and String extensions
tomphp has joined #ruby
<elomatreb>
The problem with ActiveSupport is that some parts of it are 10 years old (or more), so you may have to adapt the codestyle to use it in new examples in order to not confuse people
hightower2 has joined #ruby
synthroid has quit []
_sfiguser has joined #ruby
<matheusmoreira>
Yeah I agree
<matheusmoreira>
I posted the activesupport rubydoc
<matheusmoreira>
chungsie: can you post your code
<elomatreb>
ActiveSupport can be used independently of Rails
<chungsie>
I just started over
<chungsie>
want to try a completely different approach
dopamean_ has quit [Quit: WeeChat 1.3]
smlocal has joined #ruby
<chungsie>
I had to take a prozac
c0mrad3 has quit [Quit: Connection closed for inactivity]
<matheusmoreira>
there's partition but it requires a predicate, there's chunk which is the same thing but also yields the result of the predicate
gusrub_ has quit []
<matheusmoreira>
each_const needs a better name...
<matheusmoreira>
cons*
<elomatreb>
I agree, the each part is weird
gusrub_ has joined #ruby
jphase_ has joined #ruby
JeanCarloMachado has joined #ruby
chris349 has joined #ruby
firstdayonthejob has quit [Ping timeout: 260 seconds]
<chris349>
In my Gemfile I have something github: user/project. But my firewall blocks the port for git. How can I have github: links in the Gemfile use https intead of git protocol?
<matheusmoreira>
can't you provide the https:// URL directly?
flashpoint9 has quit [Remote host closed the connection]