<pontiki>
that ought to be so for all the grouping variables, no?
<Ox0dea>
Quite a substantial number of ostensibly global variables are really "virtual" or "scope-local" variables, but matz had already run out of sigils with which to prefix them by that time.
<Ox0dea>
pontiki: Sure, $~ and everything derived thereof fit into ^.
<pontiki>
could have gone for the RCS one
<pontiki>
$(@)
<pontiki>
:D
workmad3 has quit [Ping timeout: 264 seconds]
<Ox0dea>
%1 wouldn't be so bad.
* pontiki
nods
tkuchiki has joined #ruby
tkuchiki has quit [Remote host closed the connection]
djbkd has joined #ruby
<pontiki>
i never really gave it all that much thought; it works rather like perl does
failshell has joined #ruby
djbkd has quit [Remote host closed the connection]
failshell has quit [Remote host closed the connection]
craysiii has joined #ruby
bruno- has joined #ruby
twohlix has quit [Quit: justQU.IT]
scpike has quit [Remote host closed the connection]
diegoaguilar has quit [Remote host closed the connection]
weemsledeux has joined #ruby
ec\ has quit [Quit: Lost terminal]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nateberkopec has quit [Ping timeout: 240 seconds]
wldcordeiro has joined #ruby
diegoaguilar has joined #ruby
bruno- has quit [Ping timeout: 260 seconds]
<havenwood>
shevy: If you invoke the Hundred Years Winter in Ruby 2.3 the Strings will freeze. Make haste children and beavers!
l_tonz has joined #ruby
l_tonz has quit [Client Quit]
* baweaver
scampers off
l_tonz has joined #ruby
d34th4ck3r has joined #ruby
tolo123 has joined #ruby
<shevy>
lol
<shevy>
yeah that dam freezing
nofxx has joined #ruby
nofxx has joined #ruby
gregoriokusowski has quit [Quit: gregoriokusowski]
Xiti has quit [Quit: Xiti]
<pontiki>
oh, well played :)
Fire-Dragon-DoL has quit []
tolo123 has left #ruby [#ruby]
<Ox0dea>
> Now is the winter of our discontent, made glorious summer by this Object#thaw, and all the mutation that low'r'd upon our codebases.
Xiti has joined #ruby
<pontiki>
:D
<havenwood>
"Didn’t I tell you," answered Mr. Beaver, "that she'd made it always winter and never Christmas? Didn’t I tell you? Well, just come and see!" ~ Ruby 2.3, coming this Christmas!
shock_one has joined #ruby
leafybasil has quit [Remote host closed the connection]
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shock_one has quit [Ping timeout: 244 seconds]
x07C8 has joined #ruby
<Ox0dea>
>> h = {}; h[a = [1]] = 1; h[a.tap(&:pop)] = 2; h
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
northfurr has joined #ruby
nateberkopec has quit [Ping timeout: 252 seconds]
<Ox0dea>
havenwood: That `{a: 1, a: 2}` warns and `{[] => 1, [] => 2}` doesn't might be of some pertinence.
Pupeno has joined #ruby
M-mistake1 has quit [Remote host closed the connection]
M-Kodo1 has quit [Remote host closed the connection]
Jardayn has quit [Read error: Connection reset by peer]
Motoservo has joined #ruby
cjheath has joined #ruby
<cjheath>
Hey ho all. Any other gem authors wondering how they can avoid/minimise the occurrence of “WARN: Unresolved specs during Gem::Specification.reset” warnings?
cpup- is now known as cpup
andersoldahl has joined #ruby
Motoservo has quit [Client Quit]
northfurr has quit [Quit: northfurr]
benlovel1 has joined #ruby
benlovell has joined #ruby
<Ox0dea>
cjheath: Do some housekeeping.
northfurr has joined #ruby
Pupeno has quit [Ping timeout: 244 seconds]
maletor has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<cjheath>
I’ve done gem cleanup, biundle updates on all projects that have installed gems, gem cleanup again, and I’m still gettng errors on json
<cjheath>
0x0dea: Also this is not about me, it’s about users of my gems. This seems to be new behaviour and its most unfriendly to end-users
inteq has joined #ruby
<cjheath>
So I’m just trying to understand what causes it (duplicate versions obviously, but what else?) and how it can be avoided or minimised
benlovel1 has quit [Ping timeout: 240 seconds]
benlovell has quit [Ping timeout: 240 seconds]
dfockler has joined #ruby
Xiti has quit [Quit: Xiti]
<cpup>
Are Arrays optimized for space when sparse?
pleiosaur has quit [Remote host closed the connection]
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rshetty_ has joined #ruby
nateberkopec has quit [Ping timeout: 264 seconds]
Bloomer has joined #ruby
craysiii has quit [Remote host closed the connection]
<cjheath>
The dups are different versions, matched by a Gemspec/Gemfile requirement. So for example I have various projects that installed 1.8,1 and 1.8.2 of json. But the program I’m running can work with either (it has json (>= 1.7.7, ~> 1.7))
fowl has left #ruby [#ruby]
<cjheath>
Hmmm, I guess that means there’s no match to the ~>1.7, bit either matches >= 1.7.7
h99h9h88 has joined #ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
moeabdol1 has joined #ruby
<cjheath>
factory_girl_rails has this requirement, for example.
rshetty has quit [Ping timeout: 256 seconds]
hxegon_ has joined #ruby
<cjheath>
I notice that some gems now include Gemfile.lock - is that a good or bad practise?
jord has quit [Quit: Connection closed for inactivity]
hxegon has quit [Ping timeout: 256 seconds]
Lucky__ has joined #ruby
moeabdol has quit [Ping timeout: 244 seconds]
shock_one has joined #ruby
jgt2 has joined #ruby
Xiti has joined #ruby
stardiviner has joined #ruby
arescorpio has joined #ruby
leafybasil has joined #ruby
ivanskie has joined #ruby
hxegon_ has quit [Quit: leaving]
Bloomer has quit [Ping timeout: 268 seconds]
sunya7a has joined #ruby
dmitch has quit [Read error: Connection reset by peer]
mois3x has quit [Quit: mois3x]
shock_one has quit [Ping timeout: 240 seconds]
IrishGringo has quit [Remote host closed the connection]
_aeris_ has quit [Remote host closed the connection]
rideh has quit [Ping timeout: 260 seconds]
jgt2 has quit [Ping timeout: 244 seconds]
_aeris_ has joined #ruby
mois3x has joined #ruby
d34th4ck3r has quit [Quit: zzz]
northfurr has quit [Quit: northfurr]
rideh has joined #ruby
northfurr has joined #ruby
leafybasil has quit [Ping timeout: 256 seconds]
govg has joined #ruby
brendan- has joined #ruby
northfurr has quit [Client Quit]
nateberkopec has joined #ruby
cmoney has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
zenguy_pc has joined #ruby
andersoldahl has quit [Quit: My Mac has gone to sleep.]
dasher00 has quit [Ping timeout: 272 seconds]
pdoherty has quit [Ping timeout: 265 seconds]
zenguy_pc has quit [Read error: Connection reset by peer]
favadi has joined #ruby
nateberkopec has quit [Ping timeout: 256 seconds]
dasher00 has joined #ruby
TheNet has quit [Quit: Leaving...]
nsuke has quit [Remote host closed the connection]
<Ox0dea>
cjheath: You don't necessarily control when Gem::Specification.reset gets invoked, so you can't run the "offending" portion of your code is a warning suppression block.
<Ox0dea>
It seems the only way to silence it would be to redefine Kernel#warn, or (slightly less invasively) prepend a Module with its own definition to Object.
hmsimha_ has joined #ruby
musou has quit [Quit: Connection closed for inactivity]
<cjheath>
Can;t really do that, since it’s an executable called by rbenv, and the warn has happened before the program starts
ruby-lang251 has joined #ruby
<Ox0dea>
cjheath: There's always BEGIN{}.
<ruby-lang251>
Hey I'm just learning read/write techniques and am having trouble reading and verifying data exists on a file. can someone help?
<cjheath>
Still not sure that’d get called, since rbenv runs a stub before loading the target program
eminencehc has quit [Remote host closed the connection]
northfurr has joined #ruby
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
workmad3 has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
pdoherty has joined #ruby
<Ox0dea>
cjheath: Then it's completely out of your control, no?
<cjheath>
Unless I can fix the Gemfile/gemspec/whatever is causing the mismatch
<cjheath>
which I possibly can
<cjheath>
Actually the error probably occurs when the actual program calls require, rather than earlier
<cjheath>
as I said however, I’m trying to undersrtand best practise on how to avoid warnings
<cjheath>
like, some gems include Gemfile.lock - does this matter or have any effect?
aspiers has quit [Ping timeout: 265 seconds]
<ruby-lang251>
any help on this?
crime has quit [Quit: Connection closed for inactivity]
workmad3 has quit [Ping timeout: 246 seconds]
<cjheath>
ruby-lang251: looking now
<cjheath>
Hint1: Don’t use hardware tabs
<cjheath>
Hint2: if you do use hardware tabs, set ytour eitor to epand then to 8-spaces
northfurr has quit [Quit: northfurr]
<cjheath>
Hint3: See hint1 :)
zenguy_pc has joined #ruby
dikaio has joined #ruby
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
nateberkopec has joined #ruby
<cjheath>
ruby-lang251: Assuming you’re having troubl around line 120-128, you should use a block to File.open (you never close the file)
<ruby-lang251>
so my spacing on my .txt file is throwing the check off?
csaunders has joined #ruby
<cjheath>
no, that was just general advice :)
ausec has joined #ruby
djbkd has quit [Quit: My people need me...]
ausec has quit [Remote host closed the connection]
<cjheath>
I like hadware tabs, but the Ruby community hates them because people stopped always expanding them to 8-spaces, so code always looks different from one screen to anotger
Oatmeal has quit [Ping timeout: 240 seconds]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<cjheath>
the code *indent* and the use of tabs are entirely separate things, but Textmate and other editors forgot that
<ruby-lang251>
i thought the while !file.eof? results in it closing itself?
jgpawletko has quit [Quit: jgpawletko]
Oatmeal has joined #ruby
<cjheath>
Nope. Just breaks the loop when you reach the end
<cjheath>
then the ariable goes out of scope, but nothig closes the file (at leats not until gc)
ausec has joined #ruby
nateberkopec has quit [Ping timeout: 256 seconds]
Bloomer has joined #ruby
<cjheath>
You can also just do File.readlines(“account.txt”).each… as long as the file isn't gigabytes :)
<cjheath>
It looks to me line check_account will actually work though.
<cjheath>
for some definition of “work”
<cjheath>
what problem are you seeing
`tim` has joined #ruby
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
charliesome has quit [Ping timeout: 240 seconds]
weemsledeux has joined #ruby
absolutejam has quit [Ping timeout: 244 seconds]
solocshaw has quit [Ping timeout: 246 seconds]
charliesome has joined #ruby
malconis has joined #ruby
absolutejam has joined #ruby
niemcu has joined #ruby
malconis has quit [Client Quit]
tedstriker has quit [Quit: Anti-Fraping status set.]
<ruby-lang251>
so im saving my account/password on the same line to a txt doc and passing both arguments into this method...where am i wrong here?
<Lilian>
of course there's an idiosyncratic-ruby.com
l_tonz has quit [Remote host closed the connection]
failshell has joined #ruby
blur3d has joined #ruby
gener1c has quit [Ping timeout: 264 seconds]
failshell has quit [Remote host closed the connection]
bigmac__ has joined #ruby
alexdunne has quit [Ping timeout: 240 seconds]
braincra- has quit [Quit: bye bye]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
djbkd has joined #ruby
niemcu has quit [Ping timeout: 264 seconds]
l_tonz has joined #ruby
RegulationD has joined #ruby
braincrash has joined #ruby
pdoherty has quit [Ping timeout: 246 seconds]
snockerton has joined #ruby
snockerton has quit [Client Quit]
nateberkopec has joined #ruby
sanjayu has joined #ruby
l_tonz has quit [Ping timeout: 250 seconds]
RegulationD has quit [Ping timeout: 260 seconds]
l_tonz has joined #ruby
freerobby has joined #ruby
failshell has joined #ruby
gamov has joined #ruby
jgt2 has joined #ruby
shock_one has joined #ruby
nateberkopec has quit [Ping timeout: 246 seconds]
failshell has quit [Remote host closed the connection]
kp666 has quit [Remote host closed the connection]
cyanide7 has quit [Remote host closed the connection]
bigmac__ has quit [Quit: Leaving]
blue_deref has joined #ruby
chipotle has joined #ruby
_blizzy_ has quit [Ping timeout: 264 seconds]
shock_one has quit [Ping timeout: 255 seconds]
jgt2 has quit [Ping timeout: 260 seconds]
failshell has joined #ruby
gix has quit [Ping timeout: 240 seconds]
slackbotgz has quit [Remote host closed the connection]
failshell has quit [Remote host closed the connection]
<gambl0re>
hi guys
gix has joined #ruby
workmad3 has joined #ruby
<cjheath>
hi
foooobear has joined #ruby
<gambl0re>
i have a question
<Ox0dea>
That's a statement.
<gambl0re>
?
Motoservo has joined #ruby
kp666 has joined #ruby
bruno- has joined #ruby
eminencehc has joined #ruby
failshell has joined #ruby
eminencehc has quit [Remote host closed the connection]
<Ox0dea>
> to be honest, i dont feel comfortable asking questions in here anymore
<al2o3-cr>
Does Ruby have any packet manipulation gems similar to scapy except packetfu?
failshell has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 272 seconds]
<Ox0dea>
al2o3-cr: How've you found PacketFu to be deficient?
govg has quit [Ping timeout: 250 seconds]
nateberkopec has joined #ruby
<al2o3-cr>
Ox0dea: I haven't, just wondering as the metasploit framework doesn't seem to use packetfu any more
diegoaguilar has joined #ruby
Oog has joined #ruby
<al2o3-cr>
so wondering what they were using insted
benlovel1 has joined #ruby
benlovell has joined #ruby
<al2o3-cr>
*instead
ibouvousaime has quit [Ping timeout: 265 seconds]
bruno- has quit [Ping timeout: 264 seconds]
NeverDie has quit [Read error: Connection reset by peer]
NeverDie_ has joined #ruby
pdoherty has joined #ruby
<Ox0dea>
al2o3-cr: What does "doesn't seem to use" mean?
<al2o3-cr>
Ox0dea: My mistake they do use packetfu
<al2o3-cr>
They was using Racket
NeverDie_ has quit [Max SendQ exceeded]
<cjheath>
There must be better languages than Ruby for packet dis/assemby
NeverDie has joined #ruby
nateberkopec has quit [Ping timeout: 268 seconds]
benlovel1 has quit [Ping timeout: 250 seconds]
benlovell has quit [Ping timeout: 250 seconds]
<Ox0dea>
cjheath: What makes you say so?
arescorpio has quit [Quit: Leaving.]
<Ox0dea>
Ruby's string manipulation facilities are arguably second-to-none.
VeryBewitching has quit [Quit: Konversation terminated!]
<havenwood>
cjheath: Which language would be better? Why?
<cjheath>
doesn;t really have good structures for manipulating bits-n-bytes
<Ox0dea>
Wat.
<cjheath>
I don’t mean it has none, just not great
<Ox0dea>
cjheath: Integer#[] is bit access.
<cjheath>
pack/unpack is a bit clunky if you ask me
<cjheath>
I know, I’ve done it too, it was painful
Oog has quit []
Renich has quit [Quit: leaving]
juanca_ has quit []
<Ox0dea>
I'm not sure I see how Ruby is at fault.
m3_del has joined #ruby
<cjheath>
How many languages have you worked in, professionally, 0x0dea?
chipotle has quit [Quit: cheerio]
failshell has joined #ruby
<havenwood>
cjheath: You've made the claim. What's the better language and why?
* cjheath
is rubyist since 2002, programmer since 1974
<cjheath>
have worked in quite a few languags
<gambl0re>
1974?...
<Ox0dea>
I'll round down and say five, but I fail to see the relevance.
<cjheath>
since I was 14
<cjheath>
currently55
<Ox0dea>
My apologies; I was not aware we had a bad-ass over here.
<cjheath>
and still coding every day
<gambl0re>
are you professional programmer or just hobby?
<cjheath>
don’t get me wrong, I love Ruby and all… but… horses for courses
<Ox0dea>
cjheath: Which horse, then?
<cjheath>
co-founder of Infinuendo.
<havenwood>
cjheath: Foxes.
<cjheath>
:)
<cjheath>
maintainer of treetop
c9s has joined #ruby
c9s has left #ruby [#ruby]
<cjheath>
just outside the top 10 in gem downloads
<gambl0re>
what is infinuendo
<cjheath>
new company - heard of this thing called DNS? It helps you find a web server goven a name :)
<gambl0re>
cool man...maybe you can help me with my question
failshell has quit [Remote host closed the connection]
<cjheath>
given that I’m currently procrastinating anyway :)
dopieee has quit [Quit: Leaving]
dopie has joined #ruby
willardg has joined #ruby
bnizzle1 has joined #ruby
dfockler has quit [Ping timeout: 246 seconds]
bnizzle has quit [Ping timeout: 268 seconds]
opensource_ninja has quit [Quit: opensource_ninja]
nateberkopec has joined #ruby
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RobertBirnie has joined #ruby
lkba has quit [Remote host closed the connection]
leafybasil has joined #ruby
nateberkopec has quit [Ping timeout: 246 seconds]
yardenbar has quit [Ping timeout: 246 seconds]
snockerton has joined #ruby
daffy_duck_2 has joined #ruby
Aswebb_ has joined #ruby
leafybasil has quit [Ping timeout: 240 seconds]
daffy_duck has quit [Ping timeout: 260 seconds]
devoldmx has joined #ruby
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Aswebb_ has quit [Ping timeout: 250 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
d34th4ck3r has joined #ruby
foooobear has quit [Quit: (null)]
<gambl0re>
thanks cjheath
nemo_ has joined #ruby
RegulationD has joined #ruby
blur3d has quit [Ping timeout: 240 seconds]
<baweaver>
you should probably just ask your question on channel
<cjheath>
asked, answered, s/he has something to play with
<baweaver>
if you're ok with it, fine
dcarmich has joined #ruby
jenrzzz has joined #ruby
<baweaver>
but gambl0re tends to avoid asking in channel for some reason and never gives a straight answer to it
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
craysiii has quit [Remote host closed the connection]
<cjheath>
Well, given that about the moment that gambl0re appeared, 0x0dea mentioned that he doesn;t like to ask questions here, I can understand it
<Radar>
Ox0dea: was quoting gambl0re from a few days ago
<cjheath>
Oh
<cjheath>
sorry, I don’t hang out here normally
<cjheath>
just came to try to get an answer on best practise to avoid some new bundler/rubygems dramas
philoserf has joined #ruby
<cjheath>
Hi Ryan
RegulationD has quit [Ping timeout: 246 seconds]
<Radar>
Hi.
<Radar>
Doesn't look like you asked your question yet.
<cjheath>
an hour back
<Radar>
missed it between all the rambling
<cjheath>
But again, since I didn’t really get an answer, I’ve been having trouble (and users of mygems too) with WARN: Unresolved specs during Gem::Specification.reset
nateberkopec has joined #ruby
<baweaver>
can't say I've seen it before, I'd have to do some research on it to know :/
<cjheath>
because of gem dependency specifications havig ambiguous matches
trautwein has joined #ruby
shock_one has joined #ruby
<cjheath>
currently with json; several projcts sharing the same gemset in rbenv, and ven after bundle update everywhere I have two 1.7.x versionf oe json
roxtrongo has joined #ruby
<cjheath>
QN: Is it “correc t practise” for a gem to ship a Gemfile.lock, and does that get used while loading gems?
<cjheath>
I see a fair few gems that do
<cjheath>
I thought that only the dependencies in <foo>.gemspec got used
shinnya has quit [Ping timeout: 252 seconds]
freerobby has quit [Quit: Leaving.]
al2o3-cr has quit [Ping timeout: 264 seconds]
<cjheath>
The default behaviour of “bundle gem my_new_gem” is to include all files that are checked in to git
<cjheath>
Radar: any thoughts?
nateberkopec has quit [Ping timeout: 244 seconds]
<Radar>
I've seen the warning around the place but I don't know what usually fixes it.
<Radar>
I thought `gem cleanup` does that, but I am not 100% certain.
<Radar>
Would be great if we had a reproducible test case.
poguez_ has quit [Quit: Connection closed for inactivity]
devoldmx has quit [Remote host closed the connection]
<cjheath>
I’ve done all thej bundle updates and gem cleanups, and still have two 1.7.x json’s
shock_one has quit [Ping timeout: 260 seconds]
tmtwd has joined #ruby
h99h9h88 has joined #ruby
<Radar>
steps to reproduce please
<cjheath>
thing is, my bundle and their deps install two specific versions
<cjheath>
Hmm. Maybe I can do that :)
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<cjheath>
Might take a bit of extraction though… there;s a Rails app in tere
<cjheath>
so no, almost certainly not correct (syntax is fine, just the logic isnt!)
<ruby-lang251>
this should push the |data| into a stats.array right?
tlarevo has left #ruby [#ruby]
snockerton has quit [Quit: Leaving.]
<cjheath>
IDK what stats was before, but if it was an array before, then afterwards, it’ll have one more element, which is a closed handle to a file - almost certainly not useful
<ruby-lang251>
hmm
<cjheath>
did you want to append the contents of the file as a new final element for the array
<cjheath>
?
<cjheath>
that would be stats << data.read
<ruby-lang251>
ahh
<cjheath>
or did you want to concatenate each line of the file as separate elements to stats?
<cjheath>
that would be stats.concat data.readlines or something like that
freerobby has joined #ruby
<bnagy>
either way don't use File#open
avahey has quit [Quit: Connection closed for inactivity]
<bnagy>
File#read or File#each
shinenelson has joined #ruby
nateberkopec has quit [Ping timeout: 246 seconds]
spacemud has quit [Ping timeout: 250 seconds]
<cjheath>
He didnt use File#open, he used File.open - differet thing
<bnagy>
my bad, it's foreach (bizarrely)
favadi has joined #ruby
freerobby1 has joined #ruby
<cjheath>
also it depends if s/he wants lines, or just the whole file
freerobby has quit [Read error: Connection reset by peer]
<bnagy>
yeah I meant ::
<bnagy>
but either way, open is still "wrong"
<cjheath>
:)
spacemud has joined #ruby
<cjheath>
Depends, open is good if you need to rewind for example
freerobby1 has quit [Read error: Connection reset by peer]
<bnagy>
yes, it's good if you're doing something completely different to the two situations I was commenting on
freerobby has joined #ruby
<bnagy>
attaboy
<cjheath>
:)
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
htmldrum has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
freerobby has quit [Ping timeout: 260 seconds]
speakingcode has quit [Ping timeout: 268 seconds]
philoserf has quit [Quit: philoserf]
mois3x has quit [Quit: mois3x]
agent_white has quit [Read error: Connection reset by peer]
wprice has quit [Read error: Connection reset by peer]
wprice has joined #ruby
lxsameer has joined #ruby
bryanray has joined #ruby
pdoherty has quit [Ping timeout: 260 seconds]
agent_white has joined #ruby
odigity has quit [Ping timeout: 265 seconds]
nateberkopec has joined #ruby
Log1x has quit [Remote host closed the connection]
sameerynho has joined #ruby
devoldmx has joined #ruby
Mia has joined #ruby
djbkd has quit [Remote host closed the connection]
alexdunne has joined #ruby
mcoder has joined #ruby
<mcoder>
Anyone here choose Redis for a project as a versatile datastore vs rolling your own service in Ruby and exposing via HTTP, etc.? Any wins doing this you can elaborate on?
odigity has joined #ruby
lxsameer has quit [Ping timeout: 260 seconds]
<baweaver>
the two aren't comparable
<baweaver>
you're talking about different things
<baweaver>
one is a language, one is a database
arup_r has joined #ruby
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver>
ruby can USE redis
<baweaver>
or it could use any other number of databases
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cgfbee has quit [Remote host closed the connection]
astrobunny has joined #ruby
<baweaver>
what are you trying to make?
Log1x has joined #ruby
<mcoder>
Yes I understand, what I mean is that in a SOA architecture you can implement data service that is called by other services. The data service can do many of the same things Redis can do and then some.
Axy has joined #ruby
<baweaver>
I'm not sure you do
nateberkopec has quit [Ping timeout: 265 seconds]
Mia has quit [Ping timeout: 244 seconds]
<baweaver>
A service still has a data source
<baweaver>
which could be Redis, MySQL, or who knows what else
<mcoder>
The immediate need is for realtime stats and distributed caching.
alexdunne has quit [Ping timeout: 246 seconds]
<mcoder>
In this case it would be in-memory vs outsource it to a datastore like Redis
<baweaver>
I will warn you that Ruby isn't well suited to either streams or realtime
<baweaver>
redis is in memory
riotjones has joined #ruby
<baweaver>
You'd be looking at an in-memory DB like Redis or Memcached
<baweaver>
or a messaging system like RabbitMQ or Kafka for bussing data to something like Logstash or Splunk
djbkd has joined #ruby
<baweaver>
If the words "realtime" or "streaming" are used, Ruby is a very bad option
<baweaver>
That'd be more the land of something like Scala, Elixir, or NodeJS
<Nilium>
Well I just ordered 150 github stickers. This is going to be fun.
<baweaver>
Node would be your most common usecase for small to midscale distributed systems and streaming.
<baweaver>
Scala tends to take the more advanced ground with frameworks like Spark attached to Kafka and Cassandra clusters for truly massive sets.
<Nilium>
I'd use Go for that, but that's more from a maintaining-node-is-hell standpoint
<baweaver>
I don't know Go well enough to really recommend it to anyone
cgfbee has joined #ruby
<baweaver>
can't say I have the time to get acquainted quite yet either :P
<Radar>
I heard Elixir is good too.
<baweaver>
but long story short: do more reading on this, it sounds like you're stringing buzzwords together
<Nilium>
I recommended it hard enough that it's now one of our primary languages at work
ibouvousaime has quit [Ping timeout: 240 seconds]
<baweaver>
Radar: mentioned it
<Radar>
dang.
<Nilium>
Elixir is on the list of things I want to learn.
RegulationD has joined #ruby
<Radar>
Nilium: I'd recommend Programming Elixir by PragProg. Great book.
<Nilium>
The trouble with Elixir, and Erlang, is that I always feel like anything I'd use them for is way too big for me to just start building
<Radar>
More that it was easy to read and well written than my general badassness
<mcoder>
baweaver, thanks for trying to help but I may have been misleading here... I am actually using Scala, not Ruby. I'm asking here and other channels to get real-world feedback from those that added Redis their stack to learn how it helped them when implementing similar functionality in their language of choice is rather easy for certain common cases (counters, analytics, distributed cache).
tubuliferous_ has joined #ruby
<baweaver>
Check Ruby, Python, and Perl off the list
<baweaver>
as I mentioned earlier, anything involving realtime or streaming don't work well in any of those languages
shock_one has joined #ruby
astrobunny has quit [Remote host closed the connection]
<ICantCook>
You want to look into nodejs for this
workmad3 has joined #ruby
<Nilium>
The most I ever had to do with Go was build stuff to process about 5 billion "events" per day, which is not really that much in practice.
<baweaver>
also already mentioned
<mcoder>
Scala/Java are just fine for these cases.
<Nilium>
Would be a fun project to re-do that in Elixir, but nobody would let me ever deploy it at work
<baweaver>
our scale would kill a ruby machine :/
haraoka has joined #ruby
<baweaver>
They are
<baweaver>
which is why I mentioned Scala above
* havenwood
deploys Elixir at work
<baweaver>
I just have a seething hatred of Java
moeabdol1 has quit [Quit: WeeChat 1.3]
<Nilium>
Most things would kill Ruby unless you had a bunch of servers and a load balancer
yfeldblum has joined #ruby
kerunaru has joined #ruby
RegulationD has quit [Ping timeout: 255 seconds]
jgt2 has joined #ruby
Motoservo has quit [Quit: Over & out.]
<baweaver>
we had one guy that killed some larger compute machines on AWS with Scala
<baweaver>
managed to in-memory 20GB to Spark
<Nilium>
You could certainly get the GC to do that
<Nilium>
Scala makes a lot of tiny allocations if you're not careful
<havenwood>
mcoder: What is it you're trying to do?
<baweaver>
mentioned he might want to lower the batch size, he said he already had
<baweaver>
the original was terrabytes
<Nilium>
Jeez
<baweaver>
scale here gets insane fast
<baweaver>
Nilium: do you have a Playstation?
<Nilium>
I've got a PS3 and a PS4, though they admittedly don't get much use lately.
workmad3 has quit [Ping timeout: 265 seconds]
<baweaver>
you know all the movements you go through, game data, friends, and all that?
<Nilium>
More or less.
<baweaver>
it gets big fast :P
<Nilium>
Sounds like you kind of do stuff similar to what I do for phones.
tkuchiki has quit [Remote host closed the connection]
<baweaver>
I just deploy them new servers to break
<Nilium>
Except with phones it's thankfully short bursts of use
chrissonar has joined #ruby
nateberkopec has joined #ruby
<mcoder>
immediate use would be distributed cache that a few other services would need access to. Also some counters/analytics shortly after. I can do these rather easily and quickly in Scala, which is how I lean as I don't want to add anything to the stack unless it really brings something to the table. I can see how Redis could be a superior option for truly large data sets (JVM isn't ideal over 10GB generally). I'm trying to find any other benefi
<baweaver>
It's like a pez dispenser. They click a button and server!
<Nilium>
Although you should see what happens when someone sends out a push notification and you can watch a wave of people pick up their phones and open an app as it hits them
jgt2 has quit [Ping timeout: 240 seconds]
<baweaver>
mcoder: define what needs to be in live memory
<baweaver>
everything else goes to Cassandra, HDFS, or another similar large store
<Nilium>
Closest we have to button→server here is probably our Mesos/Marathon stuff.
<Nilium>
Which is more button→thing-running-on-server
<Nilium>
Assuming there are resources
fedexo has joined #ruby
<baweaver>
Have I ever told you I'm officially a badass developer?
hmsimha_ has quit [Ping timeout: 265 seconds]
<baweaver>
Like I have it on my resume
<Nilium>
Do you have clones, though?
<baweaver>
except it's an acronym
<baweaver>
Build and Deployment Automation Support System
<Nilium>
Clever.
<baweaver>
clones in what context?
<Nilium>
I have "english major" on mine. I have no idea how I have a job.
<cjheath>
BadAssWeaver?
h99h9h88 has quit [Read error: Connection timed out]
<baweaver>
Brandon A, but I don't correct people often ;)
<Nilium>
Clones as in the kind that you meet and a revolver materializes in one of your hands and you have to shoot the other one because they're evil.
<Nilium>
Standard law of doppelgangers.
<baweaver>
You've been reading Fractal Prince haven't you?
<Nilium>
Never heard of it, actually.
h99h9h88 has joined #ruby
<baweaver>
Quantum Thief is the first book in that one
<baweaver>
covers that idea in an amusing way.
nateberkopec has quit [Ping timeout: 252 seconds]
<Nilium>
Worth reading?
<baweaver>
Eh, wasn't my thing
<baweaver>
ymmb
<baweaver>
ymmv
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Nilium>
Hm, may as well give it a shot. Books are cheap.
<Nilium>
Part of why I have a mostly unused PS3 and PS4.
kies^ has joined #ruby
tkuchiki has joined #ruby
george2 has left #ruby [#ruby]
skade has joined #ruby
djbkd_ has joined #ruby
rbowlby has quit [Remote host closed the connection]
<baweaver>
On my list of must read: Lies of Locke Lamora, Name of the Wind, Blood Song, Mistborn, Wheel of Time
<baweaver>
Wheel of time alone will keep you busy for a loooooong time
bruno- has joined #ruby
bryanray has quit [Ping timeout: 260 seconds]
h99h9h88 has quit [Remote host closed the connection]
sdothum has joined #ruby
h99h9h88 has joined #ruby
djbkd_ has quit [Ping timeout: 244 seconds]
bruno- has quit [Ping timeout: 240 seconds]
_michael has joined #ruby
djbkd has quit []
h99h9h88 has quit [Ping timeout: 244 seconds]
aganov has joined #ruby
<shevy>
you are such a busy beaver
<shevy>
wheel of time makes me sad, the author died right? and a good friend also died perhaps 1 month lateron or so, he read every novel
failshell has joined #ruby
dhjondoh has joined #ruby
<baweaver>
Brandon Sanderson picked up the series and finished it
lxsameer_ has joined #ruby
<baweaver>
same author that wrote Mistborn
tvw has joined #ruby
Xeago has joined #ruby
skade has quit [Read error: No route to host]
skade has joined #ruby
sameerynho has quit [Ping timeout: 265 seconds]
nateberkopec has joined #ruby
<Nilium>
Wheel of Time is on the list of things I might eventually read but might die in the process because that's not insignificant
timonv has joined #ruby
<shevy>
hah
<baweaver>
14 books averaging over 800 pages a pop
<baweaver>
took me two months
<Nilium>
And I'm the sort of person who reads Cryptonomicon and goes "that was long"
ElSif has joined #ruby
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
failshell has quit [Remote host closed the connection]
<Nilium>
And then Quicksilver and I think The Confusion. Don't think I read System of the World because I got fed up with it...
<Nilium>
I don't really like Neal Stephenson anymore. That kind of sucks.
_blizzy_ has joined #ruby
shock_one has quit [Remote host closed the connection]
tagrudev has joined #ruby
riotjones has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
nateberkopec has quit [Ping timeout: 252 seconds]
claw has quit [Ping timeout: 260 seconds]
claw has joined #ruby
Pupp3tm4st3r has joined #ruby
Macaveli has joined #ruby
Eiam has quit [Read error: Connection reset by peer]
Axy is now known as Mia
craysiii has joined #ruby
C0r3 has joined #ruby
<C0r3>
shevy: Hey!
Aswebb_ has joined #ruby
Icey has quit [Ping timeout: 255 seconds]
tlarevo has joined #ruby
shock_one has joined #ruby
_blizzy_ has quit [Ping timeout: 240 seconds]
haxrbyte_ has quit [Read error: Connection reset by peer]
timonv has quit [Ping timeout: 250 seconds]
haxrbyte has joined #ruby
tlarevo has quit [Read error: Connection reset by peer]
norc has joined #ruby
tubuliferous_ has quit [Ping timeout: 256 seconds]
<norc>
How does Ruby decide whether to look up "foo" in methods or instance variables?
tlarevo has joined #ruby
<Xeago>
norc: instance variables start with @
<baweaver>
attr_* define methods
<baweaver>
which are effectively getters and setters
<norc>
Sorry I meant local variable. :)
towski_ has quit [Remote host closed the connection]
Aswebb_ has quit [Ping timeout: 250 seconds]
<baweaver>
I want to say it starts looking local and then scopes out
Pisuke has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
Xeago has quit []
<baweaver>
anyways, bed for me. 'night
tlarevo has quit [Read error: Connection reset by peer]
baweaver has quit [Remote host closed the connection]
<norc>
Is this not a local variable of main:Object?
dEPy has joined #ruby
keen________ has quit [Ping timeout: 255 seconds]
_michael has quit [Ping timeout: 260 seconds]
akkad has quit [Quit: Emacs must have died]
<dEPy>
Is theree any quick metaprogramming trick I can use to see which objects (Classes) are calling which objects (Classes)? So when I run rspec for one example I will see something like: Task sent 'register' to User
emilkarl has joined #ruby
<djellemah>
object instances don't have local variables. Methods and bindings do. But methods aren't closures.
<dEPy>
So... I guess that's a no?
nateberkopec has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dEPy>
I just want to find our in my Rails app what relies on what. Cause I have a bunch of code that needs cleaning up. :/
dhjondoh has quit [Quit: dhjondoh]
<dEPy>
I guess I could look at my tests where I have a lot of setup code also. But I still think there's a better way to do this. Is it?
tak1n has joined #ruby
<djellemah>
dEPy: maybe something like rcov would help.
matcouto has joined #ruby
matcouto has joined #ruby
<norc>
djellemah: Then who owns that local variable "foo" ?
<norc>
djellemah: Or is that the realm of main magic?
fedexo has quit [Ping timeout: 240 seconds]
<dEPy>
Well rcov can certainly help me find dead code but not code with too many dependencies
<djellemah>
norc: afaik, irb/pry keeps a binding for you that contains the local variables you've defined.
<djellemah>
Yup, there's no accounting for taste ;-)
nemo_ has quit [Remote host closed the connection]
<ruby-lang251>
8 hours of coding done.
BSaboia has joined #ruby
gamov has quit [Quit: gamov]
jamesaxl has quit [Ping timeout: 246 seconds]
skade has quit [Quit: Computer has gone to sleep.]
ledestin has quit [Remote host closed the connection]
nateberkopec has quit [Ping timeout: 272 seconds]
_aeris_ has joined #ruby
rshetty has joined #ruby
ledestin has joined #ruby
tlarevo has quit [Read error: Connection reset by peer]
quazimodo has quit [Ping timeout: 260 seconds]
tlarevo has joined #ruby
astrobunny has joined #ruby
dEPy has quit [Ping timeout: 268 seconds]
duckpuppy has quit [Ping timeout: 244 seconds]
diegoaguilar has quit [Remote host closed the connection]
C0r3 has quit [Quit: leaving]
DoubleMalt has joined #ruby
rshetty has quit [Remote host closed the connection]
rshetty has joined #ruby
HayesHimself has joined #ruby
tmtwd has quit [Ping timeout: 252 seconds]
alexdunne has joined #ruby
pledgeshield has joined #ruby
workmad3 has joined #ruby
calleerlandsson has joined #ruby
d34th4ck3r has quit [Quit: zzz]
rshetty has quit [Ping timeout: 260 seconds]
nfk|laptop has joined #ruby
rbowlby has joined #ruby
d34th4ck3r has joined #ruby
pledgeshield has left #ruby [#ruby]
platzhirsch has joined #ruby
codecop has joined #ruby
alexdunne has quit [Ping timeout: 260 seconds]
Gnomethrower has joined #ruby
nateberkopec has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
roxtrongo has quit [Remote host closed the connection]
dionysus69 has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
workmad3 has joined #ruby
ruby-lang251 has quit [Quit: Page closed]
TomyWork has joined #ruby
SCHAAP137 has joined #ruby
aspiers has joined #ruby
nateberkopec has quit [Ping timeout: 255 seconds]
rshetty has joined #ruby
roxtrongo has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
CloCkWeRX1 has joined #ruby
workmad3 has quit [Ping timeout: 250 seconds]
RegulationD has joined #ruby
beast has joined #ruby
leafybasil has joined #ruby
Luna_Moonfang has quit [Quit: WeeChat 1.3]
vigintas has joined #ruby
Luna_Moonfang has joined #ruby
charliesome has joined #ruby
jgt2 has joined #ruby
tvw has joined #ruby
tak1n has quit [Ping timeout: 246 seconds]
blaxter has joined #ruby
leafybasil has quit [Ping timeout: 264 seconds]
RegulationD has quit [Ping timeout: 255 seconds]
charliesome has quit [Client Quit]
benlovel1 has joined #ruby
benlovell has joined #ruby
tlarevo_ has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nemo_ has joined #ruby
jgt2 has quit [Ping timeout: 260 seconds]
tlarevo has quit [Read error: Connection reset by peer]
<djellemah>
Periodically I find a use for an xpath-style object-tree-querying gem. Which I haven't found yet. So far I've looked at Representable, Parslet::Transform, alf and rom but none of them really do what I'm looking for. Any other suggestions?
stan has joined #ruby
ta has quit [Remote host closed the connection]
ta has joined #ruby
<ddv>
djellemah: You can't use Nokogiri?
skade has joined #ruby
Aswebb_ has joined #ruby
<apeiros>
as far as I understood, they want to query object structures, not xml. but with a mechanism like xpath.
<djellemah>
ddv: First I'd have to convert the object graph to xml. Which is overkill.
rshetty has quit [Remote host closed the connection]
<ddv>
oh
nateberkopec has joined #ruby
<norc>
Is there some way to get an (incomplete) parse tree representation of ruby code that *fails* to parse, to understand how Ruby tries to understand a piece of code?
<norc>
Ripper seems to only work on code that successfully parses
Ox0dea has quit [Ping timeout: 264 seconds]
andikr has joined #ruby
dc has joined #ruby
tak1n has joined #ruby
Pupeno has joined #ruby
Pupeno has joined #ruby
Luna_Moonfang has quit [Quit: changing terminal]
Luna_Moonfang has joined #ruby
nateberkopec has quit [Ping timeout: 244 seconds]
govg has quit [Ping timeout: 255 seconds]
tkuchiki_ has joined #ruby
tkuchiki has quit [Read error: Connection reset by peer]
shock_one has quit [Remote host closed the connection]
failshell has joined #ruby
alexdunne has joined #ruby
joonty has joined #ruby
Bloomer has quit [Remote host closed the connection]
CloCkWeRX1 has left #ruby [#ruby]
rshetty has joined #ruby
failshell has quit [Ping timeout: 255 seconds]
sl33k has joined #ruby
tlarevo_ has quit [Read error: Connection reset by peer]
tlarevo has joined #ruby
davedev2_ has quit [Remote host closed the connection]
d34th4ck3r has quit [Quit: zzz]
ruurd has joined #ruby
tlarevo has quit [Read error: Connection reset by peer]
tlarevo has joined #ruby
shredding has joined #ruby
senayar has joined #ruby
sl33k has quit [Client Quit]
cjheath has quit [Ping timeout: 250 seconds]
howdoi has joined #ruby
devoldmx has quit [Remote host closed the connection]
darkf has quit [Ping timeout: 264 seconds]
cjheath has joined #ruby
postmodern has quit [Quit: Leaving]
nateberkopec has joined #ruby
ibouvousaime has joined #ruby
kimegede has joined #ruby
devoldmx has joined #ruby
Bloomer has joined #ruby
Juanchito has joined #ruby
dikaio has quit [Quit: ........]
Alina-malina has joined #ruby
nateberkopec has quit [Ping timeout: 260 seconds]
Pumukel has joined #ruby
Peg-leg has joined #ruby
big|bad|wolf has joined #ruby
timonv has joined #ruby
Pumukel has quit [Excess Flood]
workmad3 has joined #ruby
Pumukel has joined #ruby
darkf has joined #ruby
G has quit [Remote host closed the connection]
chihhsin has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
G has joined #ruby
SylarRuby has quit []
mikecmpbll has joined #ruby
Archyme_ has quit [Quit: Leaving]
workmad3 has quit [Ping timeout: 260 seconds]
Cyther has quit [Quit: Leaving]
pepperbreath has quit [Quit: Leaving.]
darkf_ has joined #ruby
duncannz has joined #ruby
marr has joined #ruby
devoldmx_ has joined #ruby
TheHodge has joined #ruby
duncannz has quit [Max SendQ exceeded]
Peg-leg has quit [Read error: Connection reset by peer]
darkf has quit [Ping timeout: 246 seconds]
Peg-leg has joined #ruby
Peg-leg has quit [Read error: Connection reset by peer]
duncannz has joined #ruby
Peg-leg has joined #ruby
darkf_ is now known as dkar
dkar is now known as darkf
Stoge88 has joined #ruby
Stoge88 has quit [Client Quit]
infernix has quit [Ping timeout: 240 seconds]
bweston92 has joined #ruby
devoldmx has quit [Ping timeout: 265 seconds]
nateberkopec has joined #ruby
infernix has joined #ruby
workmad3 has joined #ruby
aspiers has quit [Ping timeout: 268 seconds]
chthon has joined #ruby
nateberkopec has quit [Ping timeout: 255 seconds]
RegulationD has joined #ruby
devoldmx has joined #ruby
devoldmx_ has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 260 seconds]
haxrbyte has joined #ruby
lkba has joined #ruby
tlarevo has quit [Read error: Connection reset by peer]
shock_one has joined #ruby
pepperbreath has joined #ruby
haxrbyte_ has joined #ruby
tlarevo has joined #ruby
benlovel1 has quit [Quit: Lost terminal]
benlovell has quit [Quit: Lost terminal]
RegulationD has quit [Ping timeout: 244 seconds]
infernix has quit [Ping timeout: 256 seconds]
tomaz_b has joined #ruby
tlarevo has quit [Read error: Connection reset by peer]
tlarevo has joined #ruby
haxrbyte has quit [Ping timeout: 264 seconds]
lxsameer_ has quit [Ping timeout: 250 seconds]
shock_one has quit []
tlarevo_ has joined #ruby
lxsameer_ has joined #ruby
tlarevo has quit [Read error: Connection reset by peer]
jgt2 has joined #ruby
tlarevo_ has quit [Read error: Connection reset by peer]
devoldmx has quit [Ping timeout: 260 seconds]
devoldmx_ has joined #ruby
tvw has quit [Ping timeout: 250 seconds]
tlarevo has joined #ruby
htmldrum has quit [Ping timeout: 264 seconds]
devoldmx_ has quit [Remote host closed the connection]
tlarevo has quit [Read error: Connection reset by peer]
d34th4ck3r has joined #ruby
devoldmx has joined #ruby
tlarevo has joined #ruby
Hounddog has joined #ruby
haxrbyte_ has quit [Ping timeout: 250 seconds]
last_staff has joined #ruby
nateberkopec has joined #ruby
bruno- has joined #ruby
devoldmx has quit [Ping timeout: 240 seconds]
govg has joined #ruby
big|bad|wolf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sameerynho has joined #ruby
spider-mario has joined #ruby
EmeraldExplorer has quit [Quit: Connection closed for inactivity]
Neniah has joined #ruby
big|bad|wolf has joined #ruby
Hounddog has quit [Ping timeout: 252 seconds]
rbowlby has quit [Remote host closed the connection]
lxsameer_ has quit [Ping timeout: 272 seconds]
nateberkopec has quit [Ping timeout: 250 seconds]
bruno- has quit [Ping timeout: 246 seconds]
Hounddog has joined #ruby
Neniah has quit [Remote host closed the connection]
bruno- has joined #ruby
elaptics`away is now known as elaptics
Peg-leg has quit [Read error: Connection reset by peer]
Peg-leg has joined #ruby
Peg-leg has quit [Read error: Connection reset by peer]
Peg-leg has joined #ruby
jgt2 has quit [Ping timeout: 272 seconds]
infernix has joined #ruby
jordanloky has joined #ruby
darkf has quit [Ping timeout: 250 seconds]
tubuliferous_ has quit [Ping timeout: 256 seconds]
karapetyan has quit [Remote host closed the connection]
A124 has quit [Read error: No route to host]
karapetyan has joined #ruby
bonemind has joined #ruby
dc has quit [Remote host closed the connection]
d34th4ck3r has quit [Quit: zzz]
A124 has joined #ruby
Pupp3tm4st3r has quit [Ping timeout: 240 seconds]
haxrbyte has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
haxrbyte has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
duckpuppy has joined #ruby
haxrbyte has joined #ruby
dmolina has joined #ruby
nateberkopec has joined #ruby
Pupp3tm4st3r has joined #ruby
rodfersou has joined #ruby
nofxx has quit [Ping timeout: 256 seconds]
blue_deref has quit [Quit: bbn]
duckpuppy has quit [Ping timeout: 240 seconds]
darkf has joined #ruby
haxrbyte_ has joined #ruby
teclator has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
tlarevo has quit [Read error: Connection reset by peer]
tlarevo has joined #ruby
nateberkopec has quit [Ping timeout: 252 seconds]
big|bad|wolf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
workmad3 has joined #ruby
haraoka has quit [Remote host closed the connection]
duncannz has quit [Remote host closed the connection]
leafybasil has joined #ruby
leafybasil has quit [Remote host closed the connection]
stamina has joined #ruby
akem has joined #ruby
leafybasil has joined #ruby
jamesaxl|2 has quit [Ping timeout: 246 seconds]
astrobunny has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
charliesome has joined #ruby
karapetyan has joined #ruby
big|bad|wolf has joined #ruby
gregoriokusowski has joined #ruby
kp666_ has joined #ruby
kp666_ has quit [Max SendQ exceeded]
big|bad|wolf has quit [Max SendQ exceeded]
kp666_ has joined #ruby
kp666_ has quit [Max SendQ exceeded]
pandaant_ has joined #ruby
kp666_ has joined #ruby
kp666_ has quit [Read error: Connection reset by peer]
karapetyan has quit [Ping timeout: 252 seconds]
kp666_ has joined #ruby
kp666_ has quit [Max SendQ exceeded]
kp666_ has joined #ruby
kp666_ has quit [Max SendQ exceeded]
kp666_ has joined #ruby
kp666_ has quit [Max SendQ exceeded]
kp666 has quit [K-Lined]
niemcu has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
Jackneill has joined #ruby
DaniG2k has joined #ruby
jgt2 has joined #ruby
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nateberkopec has joined #ruby
JammyHammy has quit [Read error: Connection reset by peer]
stamina has quit [Quit: WeeChat 1.3]
charliesome has joined #ruby
User458764 has quit [Ping timeout: 260 seconds]
lkba_ has joined #ruby
RegulationD has joined #ruby
Rickmasta has joined #ruby
User458764 has joined #ruby
nateberkopec has quit [Ping timeout: 250 seconds]
lkba has quit [Ping timeout: 240 seconds]
stamina has joined #ruby
vigintas has quit [Ping timeout: 250 seconds]
RegulationD has quit [Ping timeout: 240 seconds]
txdv_ has joined #ruby
txdv has quit [Ping timeout: 244 seconds]
TPBallbag has joined #ruby
ICantCook has quit [Ping timeout: 240 seconds]
ICantCook has joined #ruby
Guest84541 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Bloomer has quit [Remote host closed the connection]
ych has joined #ruby
ych is now known as Guest76581
UtkarshRay has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rshetty has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
akem has quit [Quit: Bye]
ziprar has joined #ruby
benlovell has joined #ruby
JammyHammy has joined #ruby
rshetty has joined #ruby
ldnunes has joined #ruby
rshetty has quit [Remote host closed the connection]
charliesome has joined #ruby
Igorshp has joined #ruby
nateberkopec has joined #ruby
vigintas has joined #ruby
tlarevo has quit [Read error: Connection reset by peer]
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tlarevo has joined #ruby
failshell has joined #ruby
gregf_ has quit [Quit: Lost terminal]
tlarevo has quit [Read error: Connection reset by peer]
tlarevo has joined #ruby
rshetty has joined #ruby
nateberkopec has quit [Ping timeout: 272 seconds]
krz has quit [Ping timeout: 272 seconds]
<darix>
norc: ruby_parser also exists
<darix>
but in doubt paste the code to gist.github.com and maybe we can tell you
<darix>
probably something with optional () which would make it parse
tlarevo has quit [Read error: Connection reset by peer]
tlarevo has joined #ruby
codecop has quit [Remote host closed the connection]
failshell has quit [Ping timeout: 264 seconds]
<norc>
darix: Oh Im just trying to understand how Ruby attemps (and fails) to parse this snippet I found here yesterday; def f(n) end; p f 1, f 1
bruno- has quit [Read error: Connection reset by peer]
tlarevo has quit [Read error: Connection reset by peer]
<darix>
norc: add ()
<darix>
either to the f() or p() call
Igorshp has quit [Remote host closed the connection]
<norc>
darix: That is the thing. Adding it to the p() call is not enough.
but3k4 has joined #ruby
<darix>
f 1, f 1 could mean
<darix>
f(1,f(1)) or f(1), f(1)
niemcu has quit [Ping timeout: 255 seconds]
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tlarevo has joined #ruby
<norc>
darix: I cannot find any combination of paranthesis that reproduces that error message.
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<norc>
As I said, Im really trying to figure out what Ruby assumes if you leave them out, because I cannot reproduce it.
govg has quit [Ping timeout: 256 seconds]
<darix>
norc: well if you add the () it is not ambiguous anymore
<yorickpeterse>
IIRC it's parsed as:
<yorickpeterse>
def f(n); end; p(f.1, f)
<yorickpeterse>
err
<yorickpeterse>
def f(n); end; p(f.1, f(1))
<darix>
norc: similar problems can happen with:
<yorickpeterse>
though I'm pretty sure it's a syntax error
<darix>
f 1 { ... }
<norc>
Okay, lets reduce this for simplicity sake to: [p(1), p 1]
<norc>
SyntaxError: (irb):28: syntax error, unexpected tINTEGER, expecting keyword_do or '{' or '('
bruno- has joined #ruby
<darix>
sometimes you have to tell the parser a little hint if {} is a hash or a block
<workmad3>
norc: `def f(n) end; p f(1, f) 1` gives you that error
<norc>
Except there are no curly brackets
<djellemah>
[f 1] also give the error.
dhjondoh has joined #ruby
dhjondoh has quit [Client Quit]
<norc>
workmad3: Ruby expects end-of-input rather than do, { or ( though.
rshetty has quit [Remote host closed the connection]
<workmad3>
norc: or simplified to f(1, f) 1
<darix>
crowd sourced test case reduction
<norc>
Or is that irrelevant?
rshetty has joined #ruby
y0da has joined #ruby
cjheath has quit [Quit: cjheath]
<norc>
workmad3: Ohh damn I get it now.
but3k4 has quit [Read error: Connection reset by peer]
<agent_white>
p f 1, f 1. print func arg, arg func
tlarevo has quit [Read error: Connection reset by peer]
<darix>
norc: does it really matter if the solution is "make the code less ambiguous"?
<workmad3>
norc: a slight one, yes... `f(1, f) 1` removes one bit of ambiguity leaving fewer options on the exact syntax error
<darix>
even if you could fix the parser to handle the case. just for the readability i would add the ()
<norc>
darix: This is not my code, and this is just purely educational about the parser here. :)
rshetty has quit [Remote host closed the connection]
weihan_ has joined #ruby
<agent_white>
norc: `def f(n) end; p f 1, f; 1` vs `def f(n) end; p f 1, f; 1
allcentury has joined #ruby
<agent_white>
erm
cjheath has joined #ruby
<norc>
(Over the past few weeks I noticed much how time it saves me to carefully read parser errors. Understanding what the error means, rather than just looking at the line and trying out things until the code works again)
Oatmeal has quit [Read error: Connection reset by peer]
<agent_white>
`p f 1, f 1` vs `p f 1, f; 1`
nateberkopec has joined #ruby
rshetty has joined #ruby
haxrbyte_ has quit [Ping timeout: 272 seconds]
gregf_ has joined #ruby
tlarevo has quit [Read error: Connection reset by peer]
tlarevo has joined #ruby
Igorshp has joined #ruby
<norc>
workmad3: I think Im slowly getting it. It chokes on: p(something) tINTEGER
skade has quit [Quit: Computer has gone to sleep.]
<workmad3>
norc: it also chokes on f(1, f 1) btw
Oatmeal has joined #ruby
nateberkopec has quit [Ping timeout: 250 seconds]
rshetty has quit [Ping timeout: 265 seconds]
s00pcan has quit [Ping timeout: 268 seconds]
<workmad3>
norc: personally, I find it's easier to be liberal with use of parens rather than try to figure out exactly what the parser might see in some esoteric circumstance... even if I can get it to parse, there's likely to be enough ambiguity that I'd have trouble figuring out if it was correct anyway so I'd prefer a couple of extra chars that meant I could read my own code ;)
syath has joined #ruby
<agent_white>
^
DaniG2k has left #ruby [#ruby]
<agent_white>
workmad3: You and me both brotha. Rubyists for parens! :D
<norc>
workmad3: Absolutely. It was never my goal to leave out parens. :)
<workmad3>
agent_white: definitely! no parens for parameterless methods, and rarely parens on class macros... otherwise parens everywhere!
<norc>
Bought Ruby under a Microscope the other day, and the book starts off with the tokenizer and parser - so here I am, trying to figure things out one bit at a time.
<workmad3>
agent_white: `super` vs `super()` can still cause me to spend some extra time figuring out code though :)
tlarevo has quit [Read error: Connection reset by peer]
kimegede has quit [Quit: Leaving...]
tlarevo has joined #ruby
karapetyan has joined #ruby
kimegede has joined #ruby
tlarevo has quit [Read error: Connection reset by peer]
Rollabunna has joined #ruby
<agent_white>
workmad3: Haha same here! I'll add parens to methods without params more as 'notes' to myself to "be mindful" around the method. :P
tlarevo has joined #ruby
<norc>
Im actually wondering whether my reduced example of [p(1), p 1] # => actually is not ambiguity, but a demonstration that Ruby does not condone leaving out parens (it actually tells me that it expected () {} or do end after the second p)
<norc>
workmad3: What difference?
solocshaw has joined #ruby
tlarevo has quit [Read error: Connection reset by peer]
<workmad3>
norc: between `super` and `super()`?
<norc>
Yeah
<workmad3>
norc: `super` calls the supermethod with the original arguments (possibly modified), `super()` calls the supermethod with no arguments
karapetyan has quit [Ping timeout: 264 seconds]
tlarevo has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
<norc>
Ok that is a subtle but disgusting difference I was not aware of....
zenguy_pc has joined #ruby
<workmad3>
norc: haha :) yup
yeticry_ has quit [Read error: Connection reset by peer]
<djellemah>
This kind of inconsistency-that-still-makes-sense is what drives pythonistas up the wall about ruby.
<norc>
But yeah, Im beginning to wonder whether strictly adding parens around every method call might be a good idea again...
tkuchiki_ has quit [Remote host closed the connection]
favadi has joined #ruby
dhjondoh has joined #ruby
dhjondoh has quit [Client Quit]
nateberkopec has joined #ruby
RegulationD has joined #ruby
but3k4 has joined #ruby
y0da has quit [Read error: Connection reset by peer]
tlarevo has quit [Read error: Connection reset by peer]
tlarevo has joined #ruby
nateberkopec has quit [Ping timeout: 246 seconds]
tlarevo has quit [Read error: Connection reset by peer]
tlarevo has joined #ruby
RegulationD has quit [Ping timeout: 264 seconds]
cornerma1 has joined #ruby
agit0 has joined #ruby
<agent_white>
djellemah: Haha so true. But they'll never get me to quit bitching about their whitespace.
blackmesa has quit [Ping timeout: 246 seconds]
but3k4 has quit [Ping timeout: 268 seconds]
cornerman has quit [Read error: Connection reset by peer]
cornerma1 is now known as cornerman
rshetty has joined #ruby
tlarevo has quit [Read error: Connection reset by peer]
govg has joined #ruby
tlarevo has joined #ruby
<norc>
agent_white: I once heard that carriage return is considered a whitespace for Python indentation...
but3k4 has joined #ruby
tlarevo has quit [Remote host closed the connection]
<apeiros>
norc: on that note, super() still passes on a block passed to the original method. you need super(&nil) to suppress that.
sankaber has joined #ruby
rshetty_ has joined #ruby
_blizzy_ has joined #ruby
<workmad3>
agent_white: tbh, the couple of times I've used python, the whitespace didn't really bother me in practice (I thought it would before hand)... what really bothered me was the weirdness of python objects (always needing an explicit `this` argument for 'methods'), and with what I was doing needing a lot of regexp, the python regexp support made me want to cry with how verbose and crappy it was
<agent_white>
norc: Python had me at ending blocks that way... too scary for me. I like defined beginning/ends to things :P
<norc>
apeiros: Im guessing beyond historical reasons and "because matz said so" this is just the way it is?
<apeiros>
norc: I have no insight into the ideas behind this design :-/
<agent_white>
workmad3: Haha oh god yes. 'this' bothered me to no end. Wasn't sure if I was writing JS or python.
<apeiros>
I guess the idea was that it's "convenient". personally I think it's more than offset by the confusion it causes.
iceden has quit [Ping timeout: 260 seconds]
<norc>
agent_white: 'this' is actually not that bad if you ignore any prior C++ experience, or assume it to be like "self" in Ruby or something along these lines.
solocshaw has quit [Ping timeout: 240 seconds]
rshetty has quit [Ping timeout: 250 seconds]
<norc>
The day I understood JavaScript prototypes and method invocation was the day I stopped having headaches when writing JS code. ;-)
<agent_white>
norc: Welp. That explains the sour taste it puts on my tongue then ;P
dhjondoh has joined #ruby
dhjondoh has quit [Client Quit]
<workmad3>
norc: I still get the occasional headache when I switch between JS and ruby, and forget that something like a `.each` method in JS typically takes a function signature of `function(index, object)` rather than `function(object, index)` and will set `this` to the current object too
subscope has joined #ruby
blackmesa has joined #ruby
<norc>
workmad3: Heh. The biggest trap people fall into is when they try to iterate over objects in the first place in JS. It usually never ends well. ;-)
yeticry has joined #ruby
<workmad3>
norc: that's a .each on an array, not iterating over object parameters :P
<norc>
workmad3: Ive seen enough people using for(element in ary) just to discover erroneous behavior because of the two big traps. ;-)
<norc>
And after a year you then have a select list with an order that sometimes changes, and always seem to have that "null" as first attribute, which the "senior javascript developer" just cannot explain, because it is a "complex matter".
tlarevo has joined #ruby
symm- has quit [Ping timeout: 260 seconds]
rshetty_ has quit [Read error: Connection reset by peer]
rshetty has joined #ruby
hiyosi has joined #ruby
s00pcan has quit [Ping timeout: 265 seconds]
dionysus69 has quit [Ping timeout: 256 seconds]
s00pcan has joined #ruby
dc has joined #ruby
stamina has joined #ruby
krisquigley has quit []
dc has quit [Ping timeout: 256 seconds]
ruurd has joined #ruby
pandaant_ has quit [Quit: Lost terminal]
duckpuppy has joined #ruby
xaa has joined #ruby
napcae has joined #ruby
<xaa>
hi, I am wondering if rubygems is included with ruby > 2.1.5? Because if I rn $apt-cache policy rubygems I have no candiate version. On another server I have ruby1.93 and the candidate is rubygems1.8.24. thank you
Gu_______ has joined #ruby
duckpuppy has quit [Ping timeout: 240 seconds]
<xaa>
sorry if this is a dumb question.. I am playing with linux since few months only
Pupp3tm4st3r has quit [Remote host closed the connection]
<pard>
>> def l(*_l, &_L ) if _L then 12 end end; l (5, 5)
<ruboto>
pard # => /tmp/execpad-c9cbaf580b06/source-c9cbaf580b06:2: syntax error, unexpected ',', expecting ')' ...check link for more (https://eval.in/458441)
rshetty_ has quit [Ping timeout: 265 seconds]
<apeiros>
norc: no. if it would, the block would be associated with (5).
<norc>
>> p((5,5))
<ruboto>
norc # => /tmp/execpad-03e45cb84e76/source-03e45cb84e76:2: syntax error, unexpected ',', expecting ')' ...check link for more (https://eval.in/458442)
<norc>
That isa the same thing.
<norc>
apeiros: mmm
<apeiros>
or at least that's how I understand what's going on. I might be off. I try not to use ambiguous syntax and hence rarely run into such stuff :)
<pard>
>> def l(*_l, &_L ) if _L then 12 end end; l (5, 5) { 12 }
<ruboto>
pard # => /tmp/execpad-db7917337518/source-db7917337518:2: syntax error, unexpected ',', expecting ')' ...check link for more (https://eval.in/458443)
<apeiros>
pard: yes. we've seen it. no need to spam it.
<pard>
sorry
<norc>
But yeah. All of this shows that trying to leave out parens for method calls is a bad idea.
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
synthroid has joined #ruby
<norc>
Or inserting spaces in front of them.
<pard>
apeiros, it did not appear in my client; apologies
<pard>
the reason i call it a quirk is that, l (5) {12} takes (5) as an arg list, but l (5, 5) won't
<apeiros>
it's inconsistent, yes.
<pard>
:\
<apeiros>
but I think verbose ruby warns you about spaces between method-name and (
inteq has quit [Remote host closed the connection]
Igorshp has quit [Remote host closed the connection]
<pard>
verbose ruby?
<apeiros>
-v
<pard>
thanks
<apeiros>
or $VERBOSE=true
<pard>
thanks a lot :)
RegulationD has joined #ruby
<pard>
apeiros, could i ask for a technicl advice?
<norc>
apeiros: It seemingly does not match anything.
<apeiros>
not just seemingly. it does not match anything.
<norc>
Then why allow it in the first place
<apeiros>
for the same reason as == is allowed on all objects.
benlovell has joined #ruby
<apeiros>
Fixnum#=~ is not defined, so 1 =~ uses Object#=~. and that defaults to always return nil.
Macaveli has joined #ruby
<pard>
apeiros, how you actually used any of the parser nstruments availabl for ruby? if yes, has their output been ntelligible?
<apeiros>
it allows you to use =~ with *any* object, without first testing whether it is implemented.
<pard>
*have
karapetyan has joined #ruby
<apeiros>
pard: short answer is no, I haven't.
<pard>
sorry
andersoldahl has joined #ruby
RegulationD has quit [Ping timeout: 255 seconds]
<norc>
apeiros: I dont know. I mean I can see how =~ #=> nil would be useful for NilClass, but extending it to Object seems a little drastic.
<pard>
i was just wondering if there is any acceptabl reason none of them uses a clean representatio of the AST
<norc>
But I dont want to judge.
rikkipitt has joined #ruby
benlovell has quit [Ping timeout: 264 seconds]
<apeiros>
norc: as said, same reason as for ==
<pard>
can && also be oevrloadde like any other op ?
<apeiros>
you expect to be able to do `a == b` without thinking about what `a` is.
<apeiros>
pard: no. && is not a method call and hence can't be redefined.
<Mon_Ouie>
pard: No, because it's not a method (it does not evaluate the rhs if the lhs is false)
<pard>
thanks
yeticry has quit [Ping timeout: 265 seconds]
devoldmx has joined #ruby
<norc>
apeiros: Testing whether two objects are equal without knowing what they are is a senseful thing. Testing whether any object (String, a Socket or an AbstractInterfaceThingy) matches a string pattern is not.
<norc>
But maybe thats just me.
<apeiros>
norc: "a string pattern" - who says =~ is limited to that?
<apeiros>
irc_user =~ host_mask # where host_mask.class # => HostMask
<norc>
apeiros: Oh. I guess the important bit here is in the docs. "meaningful pattern-match semantics."
<norc>
Sorry.
<norc>
It was just set in my mind that this always means regular expressions.
<apeiros>
one problem with == and =~ is that they're not commutative. a == b != b == a.
<pard>
>> 12 > 5 > 12
<apeiros>
(they can be - if the operands are implemented that way, but they not necessarily are)
<ruboto>
pard # => undefined method `>' for true:TrueClass (NoMethodError) ...check link for more (https://eval.in/458449)
<apeiros>
pard: ruby does not expand 12 > 5 > 12 to 12 > 5 && 5 > 12 for you.
sepp2k has joined #ruby
<pard>
:\
<norc>
apeiros: 1 == 2 == 3 is a syntax error to begin with though, no?
<apeiros>
so you do (12 > 5) > 12 (execution order), and since 12 > 5 evaluates to true, you do `true > 12`
<apeiros>
norc: no. you're chaining methods.
<apeiros>
1 + 2 + 3 # not a syntax error either. chaining methods
<Mon_Ouie>
>> 1 == 2 == 3
<ruboto>
Mon_Ouie # => /tmp/execpad-491708012d5b/source-491708012d5b:2: syntax error, unexpected == ...check link for more (https://eval.in/458450)
<Mon_Ouie>
^ it is, for some reason
<apeiros>
1.==(2).==(3)
<norc>
apeiros: I mean I get what you mean by chaining (its commonly done in C++ operator overloading for >> and <<)
<apeiros>
Mon_Ouie: OO
devoldmx has quit [Ping timeout: 272 seconds]
<pard>
>:'\
<apeiros>
that. is. weird.
<pard>
quirk
<apeiros>
special cased in the parser then I guess?
<pard>
>> def l(*_l, &_L ) if _L then 12 end end; l(if 5 then break end)
<ruboto>
pard # => /tmp/execpad-0dc94c6a2a08/source-0dc94c6a2a08:2: void value expression (https://eval.in/458453)
<apeiros>
pard: what's up with your weird argument names? _l, _L?
<pard>
sorry
TPBallbag has quit []
<norc>
apeiros: I have a feeling we have an obfuscated code contest candidate here. :-)
<Mon_Ouie>
I believe it is because in parse.y tEQ (the token for ==) is marked as "nonassoc". Since it has no associativity rule, the parser could not decide whether a == b == c is (a == b) == c or a == (b == c) and thus it is not allowed.
<norc>
The way he has been looking for the weirdest ways to break the ruby parser
<apeiros>
pard: "sorry" is unnecessary and not actually an answer :-p
mwlang has joined #ruby
<apeiros>
norc: may well just be exploring the limits of ruby. that makes sense to me. gives you a frame of reference.
<Mon_Ouie>
(<=>, ==, !=, =~ and !~ are some of the operators that have no associativity rules)
<pard>
i thought they might be undistinguishabl from 1 , that's why i perepend them with _
<apeiros>
Mon_Ouie: intriguing. not what I'd have expected.
mwlang has quit [Client Quit]
<norc>
apeiros: absolutely, I have been doing similar things recently. :)
<norc>
Was not trying to be judgemental.
bruno- has quit [Ping timeout: 244 seconds]
<apeiros>
if they have <=> and == without associativity, I don't get why >=, >, <, <= have one
<Mon_Ouie>
For some reason they explicitly make > and < associative from left to right though
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<pard>
i feel it's an unnecessary thing that merely compicates the parser code
decoponio has joined #ruby
bruno- has joined #ruby
<pard>
why don't they just do an RD parser rather than using a '93 crank?
GnuYawk has quit [Ping timeout: 240 seconds]
<apeiros>
pard: go ahead and implement an RD parser?
<pard>
i mean, look they way llvm's cpp parser compres to gcc's minefield
<Mon_Ouie>
Because they wrote it before 93 and no one wants to rewrite it? :p
freerobby has joined #ruby
<pard>
*the
brendan- has quit [Ping timeout: 265 seconds]
<apeiros>
compare it to the '93 crank and see whether it's better and covers all, if it does, make a pull request?
<pard>
:)
<pard>
i actually am
<pard>
that is why i have joind this channel
<apeiros>
pard: then I guess you should ask on the ruby-core ML which parser behaviors are intentional and which aren't.
<agent_white>
Maybe they're following bitwise operator precedence in C?
<apeiros>
because I doubt anybody but parser implementors/maintainers know.
<pard>
thanks :)
blackmesa has quit [Ping timeout: 240 seconds]
<pard>
is there a channel for it ? or only the ML ?
s00pcan has quit [Ping timeout: 260 seconds]
dfinninger has joined #ruby
<apeiros>
there is #ruby-core. but not sure how active it is.
<apeiros>
ML is probably the better place for such things.
<pard>
thanks a lot
s00pcan has joined #ruby
<agent_white>
Mon_Ouie: Same with associativity... all operators are left to right unless they're assignment, ternary, or increment/casting.
<ruboto>
pard, Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
cdg has joined #ruby
bmurt_ has joined #ruby
<pard>
ruboto, sorry
<apeiros>
alternatively, ask actual questions instead of just throwing out syntax errors
<gregf_>
?justabot
<ruboto>
I'm just a bot. You don't need to address me.
<pard>
apeiros, thanks
chrissonar has quit [Remote host closed the connection]
<pard>
excuse me ?
<gregf_>
?justabot pard ;)
<ruboto>
pard, I'm just a bot. You don't need to address me.
timonv has quit [Quit: WeeChat 1.3]
maletor has joined #ruby
SylarRuby has joined #ruby
brendan- has joined #ruby
<pard>
i thought i'm dumb; but i never thought myself be _that_ stupid; i apologise
<gregf_>
pard: ruboto is only a bot . anyways, no need to apologize ;)
<apeiros>
gregf_: I think the apologies are deeply ingrained in pard. told them twice already :)
<gregf_>
heh
jgt2 has quit [Read error: Connection reset by peer]
bmurt has quit [Ping timeout: 260 seconds]
<pard>
making mistakes makes me embarassed
<apeiros>
pard: *shrug*, everybody makes mistakes. it's ok.
dikaio has joined #ruby
<apeiros>
that is - as long as you learn from them :)
<adaedra>
if you don't make mistakes, you're not trying high enough.
<adaedra>
hard*
RegulationD has joined #ruby
<gregf_>
well, if you feel embarassed about learning something whilst making mistakes you wont learn anythig. that said, pry/irb wont make you feel stupid ;)
jgt2 has joined #ruby
<apeiros>
adaedra: you forget the obvious alternative: or you're perfect :D
HayesHimself has joined #ruby
tkuchiki has joined #ruby
<adaedra>
apeiros: I've yet to find anyone that fits in this description.
<apeiros>
pard: while I generally advise for pry/irb - since you're looking for parser oddities, those tools won't cut it. they can alter how parsing happens. use ruby executable directly. e.g. with `ruby -e` or with plain `ruby` + ctrl-D
bmurt has joined #ruby
naftilos76 has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<apeiros>
adaedra: damn.
<adaedra>
Also, perfection must be soooo boring.
<pard>
even though i take great effort not to; i guess iim under some kind of Dunning–Kruger effect
moty66 has joined #ruby
SylarRuby has quit [Ping timeout: 260 seconds]
bmurt_ has quit [Ping timeout: 260 seconds]
mrhmouse has left #ruby ["WeeChat 1.3"]
codecop has joined #ruby
brendan- has quit [Ping timeout: 264 seconds]
<pard>
apeiros, no :) i was actually trying to know what should i wrap a hash in , as i could not get to print it with mere {'s
norc has quit [Ping timeout: 246 seconds]
<apeiros>
ok
<apeiros>
parens. it's always parens.
<pard>
thank you
<apeiros>
print {} is interpreted as block to print. and plain `5 => 12` within that is not valid (as you've seen from your `a = 5 => 12`
rshetty has quit [Ping timeout: 250 seconds]
bruno- has quit [Ping timeout: 250 seconds]
Macaveli has joined #ruby
<pard>
yes; i guess i have much practice before me before my mind becomes as flexible as ruby is
<gregf_>
pard: out of curiosity, is ruby the first language you;re learning?
SylarRuby has joined #ruby
towski_ has joined #ruby
wldcordeiro has quit [Ping timeout: 265 seconds]
<pard>
gregf_, in a sense yes; i've been doing SysC and VHDL for quite some time,but i have been told they are not much of a prog lang in common sense actually
allcentury has joined #ruby
dfinninger has quit [Remote host closed the connection]
benlovell has joined #ruby
<canton7>
the mindset is quite different :P
<pard>
yes :\
<gregf_>
pard: er, ok. never heard much of that. sorry. no. is 'C' the base language in them?
* pard
embitters
<canton7>
they're hardware description langauges. they describe hardware, which is operating entirely in parallel, rather than sequential software
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<kfrz>
Where can I find some benchmarks on raw speed js vs ruby
howdoi has quit [Quit: Connection closed for inactivity]
<havenwood>
kfrz: There are many, many benchmarks of various things.
<kfrz>
That
<pard>
gregf_, if their output has an actualisation , then their run and make it ; if it does not then it's an err; much of the otherwise valid code in them is consider'd erroneous only because it doesn't have a real-world equivalent
freerobby has joined #ruby
<pard>
*they
<kfrz>
Fair, fair
jgt2 has quit [Quit: WeeChat 1.2]
<kfrz>
I'm just learning so curious
Wompy has quit [Quit: Leaving...]
towski_ has quit [Remote host closed the connection]
freerobby has quit [Client Quit]
<gregf_>
pard: VHDL does look like a prog language. its got keywords, constructs etc etc. tho' no braces.. ;)
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has joined #ruby
<gregf_>
anyways, good luck
<gregf_>
with ruby i meant :)
<pard>
thanks :)
SylarRuby has joined #ruby
skweek has quit [Ping timeout: 272 seconds]
brendan- has joined #ruby
<pard>
is there any style guide for ruby out there ?
rshetty has joined #ruby
<havenwood>
kfrz: If you're looking for speed with something Ruby-like try Crystal. You'll see it performs quite well on those benchmarks. http://crystal-lang.org
<havenwood>
pard: Yeah, there are a few.
kerunaru has joined #ruby
<pard>
i would be very thankful in case sb knows of one; it would also be great if i could also be guided to some sort of comprehnive chaethseet
mollusk_ has quit [Ping timeout: 250 seconds]
<pard>
thanks , could i ask you where it is ?
ziprar has quit [Changing host]
ziprar has joined #ruby
<canton7>
gregf, it looks like a programming langauge, but if you go into it with the sequential mindset you'll get very messed up :P
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skade has quit [Ping timeout: 246 seconds]
diegoaguilar has joined #ruby
ivanskie has joined #ruby
willardg has joined #ruby
l_tonz has quit [Remote host closed the connection]
krz has joined #ruby
weihan_ has quit [Ping timeout: 255 seconds]
ivanskie has quit [Client Quit]
Guest53 has joined #ruby
skade has joined #ruby
ivanskie has joined #ruby
jessemcgilallen has joined #ruby
SylarRuby has joined #ruby
tlarevo has joined #ruby
Voker57 has quit [Read error: Connection reset by peer]
Mon_Ouie has quit [Ping timeout: 244 seconds]
willardg has quit [Client Quit]
duckpuppy has joined #ruby
dc has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
wldcordeiro has joined #ruby
jessemcgilallen has quit [Client Quit]
SylarRuby has quit [Ping timeout: 250 seconds]
cyle has joined #ruby
ElFerna has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
umgrosscol has quit [Remote host closed the connection]
duckpuppy has quit [Ping timeout: 246 seconds]
dc has quit [Ping timeout: 255 seconds]
Motoservo has joined #ruby
eminencehc has quit [Remote host closed the connection]
lkba has joined #ruby
ruurd has joined #ruby
dionysus69 has quit [Ping timeout: 250 seconds]
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mattwashere has joined #ruby
pard has quit [Quit: Leaving]
_blizzy_ has quit [Ping timeout: 240 seconds]
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
troyready has joined #ruby
<kfrz>
havenwood: very interesting.... I like Ruby over JS because of the community, open-nature of everything and multiple paths to success
yardenbar has quit [Ping timeout: 268 seconds]
<kfrz>
so these ruby sub-languages are very very interesting to dig through
tak1n has quit [Remote host closed the connection]
purplexed^ has joined #ruby
polishdub has quit [Quit: Leaving]
brendan- has joined #ruby
_blizzy_ has joined #ruby
karapetyan has joined #ruby
wldcordeiro has quit [Quit: WeeChat 1.3]
wldcordeiro has joined #ruby
<purplexed^>
Hi all. I'm trying to figure out how to run Dir.mkdir_p '/usr/share/<somedirectory> with Rubymine. I can see I don't have the necessary priviledges. I've tried to google for a solution, but I havent found anything I can use. Should I be running Rubymine with some other credentials, other then the one I am logged in with. Just like I would need to do if I ran the program on a machine ? ... and can someone perhaps help me find out how to do that
`tim` has joined #ruby
<adaedra>
wut
<adaedra>
do you mean in your ruby script executed by rubymine?
<adaedra>
/usr/share is usally owned by root, so you need to be root to write in it
karapetyan has quit [Remote host closed the connection]
<adaedra>
(but don't run RubyMine as root as a workaround, plese)
<adaedra>
please*
mrtomme has quit [Ping timeout: 260 seconds]
solars has quit [Ping timeout: 268 seconds]
<purplexed^>
No, I don't plan on doing that :)
bricker has joined #ruby
karapetyan has joined #ruby
mrtomme has joined #ruby
karapetyan has quit [Remote host closed the connection]
blackmesa has joined #ruby
amclain has joined #ruby
karapetyan has joined #ruby
<purplexed^>
so, let's say I have one ruby program, that will generate some directory for use in another ruby program. Where is a good place to store that then ?
shinenelson has quit [Quit: Connection closed for inactivity]
rbowlby has joined #ruby
lkba has quit [Remote host closed the connection]
<purplexed^>
I have an application 'Agent' and another application 'Scheduler'. The Agent will receieve files, that the 'Scheduler' will then load as configuration. So it's a suite of applications
<purplexed^>
what could a good structure look like ?
[Butch] has joined #ruby
<adaedra>
You could run them both from a directory that will be the directory where they save things
duckpuppy has joined #ruby
<adaedra>
How long is this data supposed to stay?
chthon has quit [Ping timeout: 244 seconds]
<purplexed^>
so I could have say: /projectFolder/Agent, /projectFolder/Scheduler/, /projectFolder/configurations
arthurix has quit [Ping timeout: 250 seconds]
<purplexed^>
indefinitely
The_Phoenix has quit [Quit: Leaving.]
Asher1 has joined #ruby
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lkba has joined #ruby
<purplexed^>
I'm very bad at linux still, so excuse my ignorance :)
<adaedra>
So yeah, let them have a common working directory, maybe configured in a config file or a cli switch
kerunaru has joined #ruby
<adaedra>
or by running them from this directory
Asher has quit [Read error: No route to host]
Asher1 is now known as Asher
_blizzy_ has quit [Ping timeout: 268 seconds]
chthon has joined #ruby
<purplexed^>
so, /projectFolder/Agent.rb, projectFolder/Scheduler.rb .. and otherwise the structure above ?
<adaedra>
you can also create a folder in your system at a fixed location with correct rights (to be done before manually) if you want
roxtrongo has quit [Remote host closed the connection]
Voker57 has joined #ruby
<adaedra>
usually, data directories are in /var i think
<purplexed^>
okay, lemme just read up on /var thanks
<purplexed^>
I guess it's really a temp location I need, and I want the scheduler to pick it up, and take it to it's own location
<purplexed^>
so I'll try and find something suitable for that
<purplexed^>
it's a zip file you see
<adaedra>
If it's temporary and does not need to stick across reboots, /tmp is the place
rodfersou|lunch is now known as rodfersou
<adaedra>
also, /tmp is usually writable by anyone, so no need to bother about permissions
<purplexed^>
it looks like tmp is a bit unstable... so let's say i receive a file, put it in temp, it could potentially be deleted before the scheduler gets it. Eventhough the scheduler is triggered right away.. it's a small window though :)
<purplexed^>
maybe it's fine for now
Bloomer has joined #ruby
startupality has quit [Quit: startupality]
<purplexed^>
I can always fix it later
The_Phoenix has joined #ruby
willardg has joined #ruby
<purplexed^>
thanks alot
northfurr has quit [Quit: northfurr]
Eiam has joined #ruby
The_Phoenix has quit [Client Quit]
dionysus69 has quit [Remote host closed the connection]
eminencehc has joined #ruby
dfockler has joined #ruby
dionysus69 has joined #ruby
mary5030 has quit [Remote host closed the connection]
ruurd has quit [Quit: ZZZzzz…]
Pupp3tm4st3r has quit [Remote host closed the connection]
mary5030 has joined #ruby
eminencehc has quit [Remote host closed the connection]
bruno- has joined #ruby
<purplexed^>
Another quick question. If I have 'Agent' running and 'Scheduler' running. And I want 'Agent' to trigger some operation like 'update_configuration' in the 'Scheduler' application. Is "pipes" the normal way to do that.. it seems there are pipes and sockets
roxtrongo has joined #ruby
axisys has quit [Remote host closed the connection]
<apeiros>
purplexed^: within the same process?
symbol has quit [Quit: WeeChat 1.1]
<purplexed^>
no, it's two separate processes
trautwein has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chipotle has joined #ruby
<apeiros>
I think pipes are only useful if you fork. not sure though.
<purplexed^>
okay, well, i have a few sources to read about it :)
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
ruurd has joined #ruby
NeverDie has joined #ruby
bruno- has quit [Ping timeout: 250 seconds]
sharkman has joined #ruby
<sharkman>
test
<purplexed^>
pong
sdothum has joined #ruby
<mg^>
Assertion failed
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<sharkman>
lol
blackoperat has joined #ruby
`based_pdev` has quit [Read error: Connection reset by peer]
tlarevo has quit [Remote host closed the connection]
<Ox0dea>
They are indeed extremely similar to JavaScript Objects.
h99h9h88 has joined #ruby
h99h9h88 has quit [Remote host closed the connection]
dc has joined #ruby
<rgb-one>
Ox0dea: It allows for writing to and reading from values in a hash. Being that you mentioned accessors, I figure that it allows for read write operations of values to the keys of a hash. Is that the case?
h99h9h88 has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
ht__ has joined #ruby
<rgb-one>
reading from keys in a hash*
CanTonic has joined #ruby
<adaedra>
rgb-one: yes, it wraps the hash and add new ways to read an write data in it.
PaulCapestany has quit [Quit: .]
<rgb-one>
adaedra: I see.
<adaedra>
But they in fact have very little added value compared to a traditional hash.
Juanchito has quit [Quit: Connection closed for inactivity]
nemo_ has joined #ruby
SylarRuby has joined #ruby
NeverDie has joined #ruby
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
linocisco has quit [Quit: Leaving]
h99h9h88 has quit [Remote host closed the connection]
finisherr has joined #ruby
_djbkd has joined #ruby
h99h9h88 has joined #ruby
dc has quit [Remote host closed the connection]
rgb-one has quit [Ping timeout: 244 seconds]
preyalone has left #ruby [#ruby]
kerunaru has joined #ruby
dc has joined #ruby
dc has quit [Remote host closed the connection]
nemo_ has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
kerunaru has quit [Client Quit]
<Ox0dea>
eam: To address your analogy from earlier, it's the combination of Struct and OpenStruct that most closely resembles JS Objects; on their own, the former doesn't permit arbitrary property access, the latter doesn't (natively) have behavior.
nemo_ has joined #ruby
<Ox0dea>
crankharder: Would a local bundle config not suffice for your purposes?
bMalum has quit [Quit: bMalum]
dnomyar has joined #ruby
h99h9h88 has quit [Ping timeout: 252 seconds]
al2o3-cr has quit [Ping timeout: 240 seconds]
jackjackdripper has quit [Client Quit]
maletor has quit [Quit: Computer has gone to sleep.]
jackjackdripper has joined #ruby
speakingcode has joined #ruby
alexdunne has joined #ruby
jessemcgilallen has quit [Quit: jessemcgilallen]
quaj has left #ruby ["WeeChat 0.4.2"]
zoo-zed has joined #ruby
eminencehc has joined #ruby
beauby has joined #ruby
jdawgaz has joined #ruby
diegoaguilar has joined #ruby
sankaber has quit [Remote host closed the connection]
rgb-one has joined #ruby
sankaber has joined #ruby
nemo_ has quit [Read error: Connection reset by peer]
bMalum has joined #ruby
tjohnson has quit [Quit: Connection closed for inactivity]
alexdunne has quit [Ping timeout: 256 seconds]
sl33k has joined #ruby
zoo-zed_ has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
kimegede has joined #ruby
AccordLTN has joined #ruby
eminencehc has quit [Remote host closed the connection]
Knifelessness has quit [Ping timeout: 246 seconds]
jessemcgilallen has joined #ruby
nemo_ has joined #ruby
blackmesa has joined #ruby
zoo-zed_ has quit [Client Quit]
lkba_ has quit [Remote host closed the connection]
nemo_ has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
VeryBewitching has joined #ruby
AccordLTN has quit [Client Quit]
juanpablo_ has joined #ruby
northfurr has quit [Quit: northfurr]
<shevy>
knock knock
nemo_ has joined #ruby
stamina has quit [Ping timeout: 268 seconds]
Pupp3tm4st3r has joined #ruby
<havenwood>
shevy: NameError who?
kerunaru has joined #ruby
northfurr has joined #ruby
karapetyan has joined #ruby
kerunaru has quit [Client Quit]
jordanloky has joined #ruby
nemo_ has quit [Read error: Connection reset by peer]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
baweaver has joined #ruby
<Ox0dea>
havenwood: NameError#receiver for missing constants.
<eam>
that's a terrible punchline
nemo_ has joined #ruby
_djbkd has quit [Remote host closed the connection]
nemo_ has quit [Read error: Connection reset by peer]
<shevy>
ack
<shevy>
#define cube( x ) ( ( x ) * ( x ) * ( x ) )
<shevy>
LISP!!!
<havenwood>
shevy: (\/)!_!(\/)
_blizzy_ has quit [Read error: Connection reset by peer]
kimegede has quit [Quit: Leaving...]
nemo_ has joined #ruby
_blizzy_ has joined #ruby
<eam>
did ruby ever support -P ?
<shevy>
what is -P doing again?
<Ox0dea>
havenwood: Does my nerd sniper need recalibrated, then?
<eam>
runs the source code through cpp before ruby reads it
mollusk_ has joined #ruby
<eam>
so you can use C macros in ruby
<shevy>
ack
dc has joined #ruby
<shevy>
hanmac would have found out
m8 has joined #ruby
rgb-one has quit [Read error: Connection reset by peer]
<havenwood>
Ox0dea: hehe
kerunaru has joined #ruby
elaptics`away is now known as elaptics
dasher00 has quit [Remote host closed the connection]
<Ox0dea>
That block parameters can be as arbitrarily complex as method ones is kinda scary.
willardg has joined #ruby
<Ox0dea>
And vim-ruby punts on it completely. :<
AccordLTN has joined #ruby
<eam>
looks like no
charliesome has joined #ruby
<eam>
perl removed it too :(
kimegede has joined #ruby
bricker_ has joined #ruby
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
elusiveother has joined #ruby
Guest53 has joined #ruby
<crankharder>
Ox0dea: "local bundle config" ??
<Ox0dea>
crankharder: You've got yourself a mighty Google-able phrase there.
nemo_ has quit [Read error: Connection reset by peer]
bricker has quit [Ping timeout: 264 seconds]
ekinmur has joined #ruby
nemo_ has joined #ruby
nemo_ has quit [Read error: Connection reset by peer]
bricker_ is now known as bricker
baweaver has joined #ruby
<havenwood>
Ox0dea: Nope, your aim was true.
nemo_ has joined #ruby
axl_ has quit [Ping timeout: 252 seconds]
axl__ has joined #ruby
bweston has joined #ruby
chouhoulis has quit [Remote host closed the connection]
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rbennacer has quit [Remote host closed the connection]
allcentury has quit [Quit: WeeChat 1.2]
karapetyan has quit [Remote host closed the connection]
rbennacer has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
lacrymology has joined #ruby
karapetyan has joined #ruby
<havenwood>
Ox0dea: Stabby lambda to the rescue! :P
jackjackdripper has quit [Quit: Leaving.]
<havenwood>
mmm
<Ox0dea>
havenwood: Or grouping parens, of course.
<lacrymology>
I installed an update on osx and now compass is gone, and I can't install it again (I'm getting a 'failed to build gem native extension' error)
jackjackdripper has joined #ruby
Pupeno has joined #ruby
Pupeno has joined #ruby
AnoHito_ has joined #ruby
<lacrymology>
well, it's not even me, it's my girlfriend, and she's not here with me, and I'm having to instruct her online
<Ox0dea>
lacrymology: The study of crying?
<lacrymology>
can someone please help me
bweston92 has quit [Ping timeout: 240 seconds]
ruurd has joined #ruby
nemo_ has quit [Remote host closed the connection]
Anthony_ has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<lacrymology>
Ox0dea: yes, fake philosophy invented by Tool.
<Ox0dea>
> fake philosophy
<ccooke>
Huh. I didn't realise that ruby was getting more popular again
<ccooke>
Nice
<shevy>
yeah TIOBE boosts ruby!
decoponio has quit [Quit: Leaving...]
<shevy>
WE ARE WINNING THE WAR - says TIOBE
<ccooke>
(Well, I'm about to go work for a company that uses ruby in their app stack
<shevy>
next month we could drop +40 ranks though
<ccooke>
shevy: *grin*
<eam>
uh oh ruby is in the top 10? Time to stop using it in favor of something more obscure
<ccooke>
it's a useful resource, as long as you don't take it as gospel
<dreinull75>
Ox0dea: hi, I've been looking at your Module and I'm not sure why you chse extend. I've now tried prepend but my methods are not caught.
<shevy>
TIOBE is my friend
<ccooke>
eam: oh, I have a language you can use if you like. *nobody* uses it
<lacrymology>
please please help installing gems on osx? I don't even know where to start. I use linux
<lacrymology>
I read that I should use rvm or similar, but I don't know if that means that she'll have to activate the right version every time she wants to run compass or what
<Ox0dea>
ccooke: A fan of Befunge, then?
<lacrymology>
havenwood: does that need to be `sudo`ed?
Vitor has joined #ruby
<havenwood>
lacrymology: Nope.
<ccooke>
Ox0dea: I was about fifteen years ago, when I wrote that language
<lacrymology>
havenwood: okay, and afterwards?
karapetyan has quit [Remote host closed the connection]
<havenwood>
lacrymology: Follow chruby instructions ^ to add chruby.sh and auto.sh to a dotfiles that gets sourced.
<ccooke>
Ox0dea: well, I'd probably pick a different model if I wanted to write an esolang today. I still like the idea, from an abstract thing of interest point of view
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baroquebobcat has joined #ruby
willardg has joined #ruby
<ccooke>
Hmm. Should keep the off-topic elsewhere, shouldn't I? Oh well. It's been a long day :-)
<adaedra>
?offtopic
<ruboto>
this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
cdg has joined #ruby
<Ox0dea>
ccooke: I looked for you in ^, for what that's worth.
stamina has joined #ruby
<lacrymology>
havenwood: that's probably too much for me to explain over facebook chat
raz has joined #ruby
<lacrymology>
I could write a bash script that does all that
rshetty has quit [Remote host closed the connection]
eminencehc has joined #ruby
<havenwood>
lacrymology: Then just install brew and install compass with your system Ruby: sudo gem install compass
karapetyan has joined #ruby
sepp2k has joined #ruby
<lacrymology>
havenwood: will installing brew add the ruby headers?
<havenwood>
lacrymology: It makes build tools available.
ldnunes has quit [Quit: Leaving]
<havenwood>
lacrymology: You can alternatively do that yourself without installing brew.
cdg has quit [Remote host closed the connection]
<lacrymology>
I'll try with brew. Thank you
cdg has joined #ruby
<lacrymology>
I'll look into the other thing too, since I'm apparently becoming a ruby dev myself from now on
<lacrymology>
(that's RE: is ruby becoming a popular language again)
<havenwood>
lacrymology: I should actually probably test this out but here's a spike showing how you can point chruby at brew's Ruby as an alternative or addition to ruby-install'ed rubies: https://gist.github.com/havenwood/ba31f67c1d89ac236400
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
hanmac has quit [Quit: Leaving.]
prestorium has quit [Quit: Leaving]
northfurr has quit [Quit: northfurr]
icarus has joined #ruby
sankaber has quit [Remote host closed the connection]
haxrbyte_ has quit [Read error: Connection reset by peer]
baweaver has quit [Remote host closed the connection]
polishdub has joined #ruby
<pipework>
hxegon: I would have used a block with default_proc and just swapped that in and out, but I'd need to see an example usage to come up with a nice refactor.
jackjackdripper has quit [Quit: Leaving.]
<hxegon>
Idk what default proc is, but one sec for example usage
h99h9h88 has joined #ruby
Igorshp has quit [Remote host closed the connection]
jackjackdripper has joined #ruby
Vitor has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
wlch has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
diegoviola has quit [Ping timeout: 252 seconds]
diego3 has joined #ruby
diego3 has quit [Changing host]
diego3 has joined #ruby
diego3 is now known as diegoviola
dc has quit [Remote host closed the connection]
jgpawletko has quit [Quit: jgpawletko]
petersaints has joined #ruby
h99h9h88 has quit [Ping timeout: 252 seconds]
Pupp3tm4st3r has quit [Remote host closed the connection]
<shevy>
sounds as if it can be used when setting default values for a hash
<shevy>
oh that code looks non-trivial!
karapetyan has joined #ruby
rwilcox has quit [Ping timeout: 255 seconds]
nfk has joined #ruby
malconis has joined #ruby
<pipework>
shevy: It's just a recursive map method that keeps recursing when values are hashes.
<hxegon>
Ox0dea: hmm... this raises more questions than answers for me. Whats the advantage over &block?
<adaedra>
Ox0dea: and y?
<shevy>
Ox0dea is the man to make simple things complex
<Ox0dea>
hxegon: If nothing else, it demonstrates that you're aware of the fact that every method receives an implicit block, but explicit is usually good.
<hxegon>
shevy: emergent complexity is a bitch/awesome
akem has joined #ruby
<Ox0dea>
There *is* a difference between `proc.call` to invoke the implicit block and `yield`, however; the latter does not bother to create an actual Proc object; it just defers to the block it already knows about internally.
konr has joined #ruby
moeabdol has quit [Ping timeout: 250 seconds]
everbot has joined #ruby
rwilcox has quit [Ping timeout: 240 seconds]
<hxegon>
Ox0dea: so does that implementation allow for {}.deep_map(&:whatever) ?
<ruby-lang508>
how can i return a key of a hash without refering to the name? return hash[1] for example?
<eam>
ruby-lang508: what do you mean "without refering to the name?"
<shevy>
ruby-lang508 1 would be the name
shredding has quit [Ping timeout: 240 seconds]
Cyther_ has joined #ruby
<eam>
ruby-lang508: you want the first key in a hash?
Soda has quit [Ping timeout: 268 seconds]
<ruby-lang508>
i want to output the current key name to the user
<eam>
what's the "current" one?
<ruby-lang508>
any of them
<ruby-lang508>
whats the proper syntax
<eam>
hash.keys.first
northfurr has quit [Ping timeout: 264 seconds]
quazimodo has joined #ruby
<ruby-lang508>
well i have a function that turns a users choice into an integer and in another function im trying to interpret there selection.integer to match an available key.
<ruby-lang508>
which is a string
<Ox0dea>
Why?
<shevy>
madness
Cyther has quit [Ping timeout: 265 seconds]
<ruby-lang508>
ya well...i started learning the language jsut a couple weeks ago and im about 340 lines deep in this project and just taking one problem at a time
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rickmasta has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
CJKinni has quit [Ping timeout: 256 seconds]
stamina has quit [Ping timeout: 240 seconds]
hxegon has quit [Ping timeout: 250 seconds]
arthurix has quit [Ping timeout: 256 seconds]
phil6kites has quit [Remote host closed the connection]
skade has quit [Ping timeout: 260 seconds]
pdoherty has quit [Ping timeout: 260 seconds]
Emmanuel_Chanel has quit [Ping timeout: 260 seconds]
northfurr has quit [Quit: northfurr]
jobewan has quit [Read error: Connection reset by peer]
northfurr has joined #ruby
Azure has quit [Remote host closed the connection]
gambl0re has quit [Ping timeout: 264 seconds]
pleiosaur has joined #ruby
northfurr has quit [Client Quit]
wldcordeiro has joined #ruby
CanTonic has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has joined #ruby
charliesome has joined #ruby
devbug has joined #ruby
northfurr has joined #ruby
charliesome has quit [Client Quit]
maletor has quit [Quit: Computer has gone to sleep.]
s00pcan has quit [Ping timeout: 272 seconds]
n_blownapart has joined #ruby
Emmanuel_Chanel has joined #ruby
Emmanuel_Chanel has quit [Max SendQ exceeded]
maletor has joined #ruby
Emmanuel_Chanel has joined #ruby
s00pcan has joined #ruby
m3_del has joined #ruby
alexdunne has joined #ruby
sunya7a has quit [Quit: leaving]
m3_del has quit [Remote host closed the connection]
pdoherty has joined #ruby
startupality has quit [Quit: startupality]
baweaver has quit [Remote host closed the connection]
snockerton has quit [Quit: Leaving.]
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #ruby
skade has quit [Client Quit]
CloCkWeRX has joined #ruby
baweaver has joined #ruby
startupality has joined #ruby
alexdunne has quit [Ping timeout: 255 seconds]
chipotle has joined #ruby
startupality has quit [Client Quit]
RegulationD has joined #ruby
millerti has joined #ruby
<millerti>
I have multiple File objects connected to processes via popen. How can I do something like select in C, where it blocks until any one of those File objects has input?
<eam>
millerti: IO.select() -- but keep in mind select() isn't meaningful on Files
<eam>
(whether in ruby, C or otherwise)
<millerti>
eam: These File objects are from popen. Will it work on that?
gambl0re has joined #ruby
<eam>
yes, but those won't be File objects, they'll be of IO
<eam>
millerti: and btw, if you're messing with stuff at this level I'd recommend using sysread/syswrite instead of read/write
<millerti>
I'm running as many optimization processes as I have CPU cores (28), and each process dumps some output to stdout. To keep things totally busy, I need to wake when any one of them finishes.
charliesome has joined #ruby
sunya7a has joined #ruby
bmurt has joined #ruby
<millerti>
eam: Will that be faster by pre-reserving a maximum amount of space in the receiving string? I'm not sure I need to optimize for that.
<millerti>
eam: Or is this for different exceptions?
<eam>
the difference is the stdio layer, essentially fwrite(3) vs write(2)
<eam>
do you want the read/write to be the amount actually read/written to the fd? Or do you want a buffer that may need a flush()
pullcheezy has quit [Ping timeout: 256 seconds]
<millerti>
eam: I'm just consuming the whole stdin from the process I'm running, into a string, which I then parse into lines and parse further.
<millerti>
eam: If I'm using IO.select, do I have to use sysread?
<eam>
you don't have to
sunya7a_ has joined #ruby
<eam>
the issue with an i/o layer is you can have data that's been read(2) but is sitting in a buffer because something like readline hasn't read it at the ruby i/o layer
<millerti>
OK, then I'm going to tuck this away in my memory for future use.
rodfersou has quit [Quit: leaving]
<millerti>
eam: I'm just doing ioobject.read into a string and closeing the stream.
jackjackdripper has quit [Quit: Leaving.]
startupality has joined #ruby
<eam>
that should be fine, but sysread should be fine too
jackjackdripper has joined #ruby
mag42c has quit [Quit: mag42c]
n_blownapart has quit [Remote host closed the connection]
Lucky__ has joined #ruby
<eam>
in general if you're polling an fd you don't want a stdio layer between you