<makara>
@baweaver, I think I understand now. +- is not an operator, so I can't overload it. I was wanting to create a new operator, but i don't see how the Ruby parser would understand how to tokenize it in the first place
<baweaver>
you'd have to screw with the actual parser to make that happen
<baweaver>
parser.y if I remember
<makara>
@baweaver, its ok, I'm just learning Ruby
<baweaver>
Then I'd focus on learning basics instead of trying to get too much into that type of thing quite yet.
bijan_ has quit [Ping timeout: 252 seconds]
bga57 has joined #ruby
bijan__ has joined #ruby
bijan__ has quit [Read error: Connection reset by peer]
HailTheRobots has quit [Read error: Connection reset by peer]
HailTheRobots has joined #ruby
bijan_ has joined #ruby
Burgestrand has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
za1b1tsu has joined #ruby
vondruch has joined #ruby
bijan_ has joined #ruby
Burgestrand has quit [Quit: Closing time!]
roshanavand has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
aufi has joined #ruby
makara has quit [Ping timeout: 246 seconds]
themsay has quit [Ping timeout: 246 seconds]
phaul has joined #ruby
serard has joined #ruby
Freshnuts has quit [Ping timeout: 268 seconds]
bijan_ has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
bijan_ has joined #ruby
bijan__ has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
Freshnuts has joined #ruby
bijan__ has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
Burgestrand has joined #ruby
keden has joined #ruby
HailTheRobots has quit [Remote host closed the connection]
HailTheRobots has joined #ruby
HailTheRobots has quit [Read error: Connection reset by peer]
HailTheRobots has joined #ruby
HailTheRobots has quit [Remote host closed the connection]
HailTheRobots has joined #ruby
Freshnuts has quit [Ping timeout: 246 seconds]
sir_tune has joined #ruby
moei has joined #ruby
vende has joined #ruby
HailTheRobots has quit [Remote host closed the connection]
<ruby[bot]>
slowmow: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<slowmow>
I don't get is
<slowmow>
it
<phaul>
'/path' is not a file or directory on your computer. That's what it says
cnsvc has quit [Ping timeout: 256 seconds]
<phaul>
Im guessing you have to fill in 'path' with actual value rather than passing the literal value '/path'
bijan_ has quit [Read error: Connection reset by peer]
serard has quit [Ping timeout: 252 seconds]
Mike11 has joined #ruby
LinuxKnight has quit [Remote host closed the connection]
Dbugger has quit [Remote host closed the connection]
cnsvc has quit [Ping timeout: 256 seconds]
bijan_ has joined #ruby
bijan_ has quit [Read error: Connection reset by peer]
dbz has joined #ruby
paranoicsan has quit [Quit: paranoicsan]
bijan_ has joined #ruby
bijan_ has quit [Ping timeout: 250 seconds]
serard__ has quit [Quit: Leaving]
serard__ has joined #ruby
serard__ is now known as serard
serard has quit [Client Quit]
vdl has quit [Quit: WeeChat 1.6]
vdl has joined #ruby
serard has joined #ruby
bijan_ has joined #ruby
RedNifre has joined #ruby
zapata has quit [Read error: Connection reset by peer]
sir_tune has quit [Remote host closed the connection]
zapata has joined #ruby
KeyJoo has joined #ruby
agent_white has quit [Quit: brb]
Guest14049 has joined #ruby
bijan_ has quit [Read error: Connection reset by peer]
bijan_ has joined #ruby
aufi has quit [Remote host closed the connection]
serard has quit [Ping timeout: 250 seconds]
KeyJoo has quit [Quit: KeyJoo]
awkwords_ has joined #ruby
Swyper has joined #ruby
bijan_ has quit [Ping timeout: 268 seconds]
awkwords has quit [Ping timeout: 250 seconds]
bijan_ has joined #ruby
vende has quit [Remote host closed the connection]
bijan__ has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
roshanavand has joined #ruby
za1b1tsu has quit [Read error: Connection reset by peer]
raulp has quit [Quit: raulp]
bijan__ has quit [Ping timeout: 252 seconds]
keden has quit [Quit: WeeChat 2.3]
raulp has joined #ruby
Swyper has quit [Quit: Swyper]
bijan_ has joined #ruby
bijan_ has quit [Remote host closed the connection]
bijan_ has joined #ruby
bijan_ has quit [Client Quit]
Burgestrand has quit [Quit: Closing time!]
dbz has quit [Remote host closed the connection]
nchambers has joined #ruby
blackmesa has joined #ruby
cow[moo] has joined #ruby
Swyper has joined #ruby
blackmesa1 has quit [Ping timeout: 250 seconds]
alan_w has joined #ruby
blackmesa1 has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
serard has joined #ruby
chongtxtx has quit [Ping timeout: 252 seconds]
chongtxtx has joined #ruby
Mike11 has quit [Quit: Leaving.]
blackmesa1 has quit [Ping timeout: 252 seconds]
Guest14049 has quit [Ping timeout: 245 seconds]
chongtxtx has quit [Ping timeout: 250 seconds]
chongtxtx has joined #ruby
Renich_ has joined #ruby
salasrod has quit [Quit: /quit]
raulp has quit [Quit: raulp]
Renich has quit [Ping timeout: 268 seconds]
Renich_ is now known as Renich
salasrod has joined #ruby
raulp has joined #ruby
eckhardt_ has joined #ruby
orbyt_ has joined #ruby
clemens3 has quit [Ping timeout: 272 seconds]
sauvin has quit [Remote host closed the connection]
cnsvc has joined #ruby
eldritch2 has quit [Quit: ZNC 1.6.6+deb1ubuntu0.1 - http://znc.in]
bambanx has joined #ruby
reber has quit [Remote host closed the connection]
jaddison_ has quit [Quit: jaddison_]
Freshnuts has joined #ruby
Freshnuts has quit [Remote host closed the connection]
\void has joined #ruby
serard has quit [Ping timeout: 252 seconds]
hutch has quit [Ping timeout: 250 seconds]
hutch has joined #ruby
blackmesa1 has joined #ruby
Burgestrand has joined #ruby
Burgestrand has quit [Client Quit]
themsay has joined #ruby
clemens3 has joined #ruby
nchambers has quit [Quit: WeeChat 2.2]
eldritch has joined #ruby
Puffball has joined #ruby
SeepingN_ has quit [Quit: The system is going down for reboot NOW!]
jenrzzz has joined #ruby
elcontrastador has joined #ruby
agent_white has joined #ruby
uplime has joined #ruby
themsay has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 245 seconds]
roshanavand has quit [Ping timeout: 250 seconds]
tau has quit [Remote host closed the connection]
hutch has quit [Ping timeout: 268 seconds]
<knight33>
This question might be a little abstract, but where to begin writing an application? I've no issue looking at other Ruby applications, and understanding the majority of code, conditionals, variables, scopes, objects, etc. I've fixed so many bugs at work. However, when I sit and stare at a blank terminal in Vim, trying to write an API or web app or
<knight33>
something, I don't know what to do. I keep finding tutorials on Rails that teach you how to generate controllers and skip the learning part. Any suggestions?
GinoMan has joined #ruby
hutch has joined #ruby
discopatrick has quit [Quit: Connection closed for inactivity]
<Eiam>
JjOtt: means what it says on the tin, you over released something
<Eiam>
oh they left
desperek has joined #ruby
jenrzzz has joined #ruby
serard has joined #ruby
serard_ has joined #ruby
dviola has quit [Quit: WeeChat 2.3]
serard has quit [Ping timeout: 252 seconds]
relyks has joined #ruby
Scriptonaut has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<Scriptonaut>
hey I was just wondering if any of you know an array method similar to .find, but rather than returning the first element that satisfies the condition, it returns a property/value of that element. So like if I had an array of object, I would want to return object.some_value of the first object that satisfies the condition, rather than returning the object itself
<Scriptonaut>
I could easily do this in two lines, but I'm wondering if there's a shorthand oneliner way
<Scriptonaut>
actually I might just change it to an each loop and then return the element explicitly, I just usually liek to avoid explicit return statements when it's at the tail-end of a method
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
<uplime>
you could use map
<Scriptonaut>
I only want the first element that satisfies the condition
<Scriptonaut>
map would give me an array
<Scriptonaut>
I could do `next if blah?` and then chain a `compact` to the end of the block but that would be janky
<Eiam>
oh that'll give you the object not its value
<Eiam>
oh, just use reduce and break?
SeepingN has joined #ruby
<Eiam>
set your memo to the value you want 'returned'
<Eiam>
and break out
<Scriptonaut>
woodruffw: find won't work
<Scriptonaut>
find returns the element in the array, not a different value calculated from the element
<Scriptonaut>
ya reduce was something I was thinking of
<woodruffw>
right, i'm saying that you should return the element and then chain the calculation after it
<Scriptonaut>
I need the calculation in order to determine if it satisfies the condition, which is an expensive database lookup, I don't want to have to do that calculation twice. I think I'm just going to do an each loop and do an explicit return
<Scriptonaut>
was just looking for a more 'ruby way' of doing it
<woodruffw>
ah
<Eiam>
reduce imo
<woodruffw>
yeah, reduce then
<Scriptonaut>
I'll checkout reduce
<Eiam>
given your constraints defined
<Scriptonaut>
haven't used that in a while
<havenwood>
Scriptonaut: Have you tried just selecting them mapping? Does that incur a penalty in your case?
<Scriptonaut>
selecting then mapping would incur a penalty because then the alg would become 2n rather than n (O)
<Eiam>
why is the map touching the DB at that point?
bambanxx has joined #ruby
<Eiam>
do the DB lookup and then work with local data
<Eiam>
those transforms shouldn't incur db hits..
<Eiam>
depends on your ORM or whatever though too I suppose
<Scriptonaut>
Eiam: because I'm looping over an array of object, then doing a db lookup for each one, then determining if the lookup yielded a sufficient result. If it did, then I need to return that result
<Scriptonaut>
so I would have to calculate the result a second time once I returned teh element
matti has quit [Ping timeout: 240 seconds]
<Eiam>
why not get array of object, get all data and do a single lookup, then filter that?
<Scriptonaut>
the lookup api can't take more than one param at a time
<Eiam>
you are paying the price of an array of unknown size DB lookups one at a time but if you've already got the data..
<Scriptonaut>
so I can't do like Datasets::ICD10.snomedct_map([list, of, codes])
<Eiam>
well that sucks =)
<Scriptonaut>
I have to do it one by one
<Eiam>
get a better DB? =)
RedNifre has quit [Ping timeout: 252 seconds]
<Scriptonaut>
lol, it's postgres, but the module was written that way
<Eiam>
(i realize its probably not your endpoint and beyond your control)
<Scriptonaut>
havenwood: do you contribute to ruby?
<Scriptonaut>
you were saying "we" when talking about removing features like that
<havenwood>
Scriptonaut: I do contribute to a couple implementations of Ruby, as a hobbyist not core of anything.
DTZUZO has joined #ruby
<Scriptonaut>
ah ok
RedNifre has quit [Ping timeout: 250 seconds]
<havenwood>
Scriptonaut: commented on your gist with a couple nit suggestions
tau has joined #ruby
<Scriptonaut>
havenwood: nice. You mixed up the dx_code.code and dx_code.code_type in the else statement, but I like that idea better than mine (having an assignment operation inside a conditional)
<Scriptonaut>
and ya, I shoulda used .any?
cow[moo] is now known as cow[away]
jordanm has joined #ruby
kapil____ has quit [Quit: Connection closed for inactivity]
coltkirk has left #ruby ["ERC (IRC client for Emacs 26.1)"]