havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.3.3; 2.2.6; 2.1.10: https://www.ruby-lang.org || Paste >3 lines of text on https://gist.github.com || Rails questions? Ask on #RubyOnRails || logs @ https://irclog.whitequark.org/ruby/
matp has quit [Remote host closed the connection]
heftig has quit [Read error: Connection reset by peer]
matp has joined #ruby
heftig has joined #ruby
tenderlove has quit [Ping timeout: 256 seconds]
careta has quit [Ping timeout: 250 seconds]
nettoweb1 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikecmpbll has joined #ruby
CloCkWeRX has joined #ruby
tenderlove has joined #ruby
hutch34 has joined #ruby
marr has quit [Ping timeout: 245 seconds]
hutch34 has quit [Ping timeout: 260 seconds]
jmignault has joined #ruby
mvxlr has joined #ruby
nfk has joined #ruby
<gener1c> ahoy
jmignault has quit [Ping timeout: 260 seconds]
fmcgeough has joined #ruby
SteenJobs has joined #ruby
firstdayonthejob has quit [Ping timeout: 265 seconds]
jhack has quit [Quit: jhack]
biberu has quit []
raul782 has quit [Remote host closed the connection]
jhack has joined #ruby
jhack has quit [Client Quit]
Joufflu has joined #ruby
raul782 has joined #ruby
raul782 has quit [Remote host closed the connection]
raul782 has joined #ruby
tyang has joined #ruby
tyang_ has joined #ruby
saneax-_-|AFK is now known as saneax
hutch34 has joined #ruby
tyang_ has quit [Read error: Connection reset by peer]
tyang has quit [Ping timeout: 258 seconds]
hutch34 has quit [Ping timeout: 246 seconds]
<havenwood> gener1c: hey
mvxlr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 250 seconds]
skweek has joined #ruby
mtkd has quit [Ping timeout: 260 seconds]
Jackneill_ has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mtkd has joined #ruby
charliesome has joined #ruby
maryo has quit [Ping timeout: 268 seconds]
hutch34 has joined #ruby
jmignault has joined #ruby
rcvalle has quit [Quit: rcvalle]
cdg has quit [Remote host closed the connection]
railssmith has joined #ruby
cdg has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
hutch34 has quit [Ping timeout: 265 seconds]
jmignault has quit [Ping timeout: 244 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Fichtenstein has quit [Ping timeout: 260 seconds]
whathappens has quit [Quit: Leaving...]
cdg has quit [Ping timeout: 245 seconds]
fnord_ has joined #ruby
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mikecmpbll has quit [Quit: inabit. zz.]
bad_ip has joined #ruby
XV8 has joined #ruby
aupadhye has joined #ruby
<havenwood> cd
marxarelli|afk is now known as marxarelli
Guest69 has joined #ruby
railswebdev has joined #ruby
harai has quit [Ping timeout: 250 seconds]
mikecmpbll has joined #ruby
Illianthe has quit [Ping timeout: 258 seconds]
bad_ip has quit [Quit: Some people just want to watch the world burn.]
cats has quit [Remote host closed the connection]
b4ng_b4ng has joined #ruby
cats has joined #ruby
b4ng_b4ng has quit [Client Quit]
fmcgeough has quit [Quit: fmcgeough]
bad_ip has joined #ruby
millerti has joined #ruby
Giphy[m] has joined #ruby
chopin has quit [Read error: Connection reset by peer]
chopin_ has joined #ruby
karapetyan has quit []
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
hutch34 has joined #ruby
SteenJobs has quit [Quit: peaceee]
jmignault has joined #ruby
palms has joined #ruby
benlieb has quit [Quit: benlieb]
Olipro has quit [Ping timeout: 260 seconds]
hutch34 has quit [Ping timeout: 256 seconds]
vikaton has quit [Quit: Connection closed for inactivity]
Olipro has joined #ruby
jmignault has quit [Ping timeout: 250 seconds]
<zacts> I wonder if there is a way to have the mechanize gem rely on oga rather than nokogiri
<blackbom1> Nokogiri = Oga :trollface:
<nchambers> with the cinch IRC gem, does anyone know how to get more debugging information? my bot authenticates to SASL, and then just hangs
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<zacts> I see there is a github issue for this: https://github.com/sparklemotion/mechanize/issues/462 <-- I just added a comment to it
eljimmy has quit [Quit: This computer has gone to sleep]
finisherr has quit [Quit: finisherr]
chouhoulis has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
SCHAAP137 has quit [Quit: Leaving]
tercenya has quit [Remote host closed the connection]
tercenya has joined #ruby
cdg has joined #ruby
Resident_ has joined #ruby
Guest69 has joined #ruby
Resident_ has quit [Client Quit]
PresidentBiscuit has joined #ruby
railswebdev has joined #ruby
cdg has quit [Ping timeout: 256 seconds]
raul782 has quit [Remote host closed the connection]
palms has quit [Ping timeout: 268 seconds]
benlieb has joined #ruby
jcao219 has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 252 seconds]
raul782 has joined #ruby
fnord_ has quit [Ping timeout: 260 seconds]
hypercube32 has quit [Quit: Leaving]
raul782 has quit [Remote host closed the connection]
jmignault has joined #ruby
hutch34 has joined #ruby
raul782 has joined #ruby
chouhoulis has quit [Remote host closed the connection]
palms has joined #ruby
jmignault has quit [Ping timeout: 268 seconds]
hutch34 has quit [Ping timeout: 260 seconds]
s2013 has joined #ruby
balazs has quit [Ping timeout: 258 seconds]
dnicole has joined #ruby
heftig has quit [Quit: No Ping reply in 180 seconds.]
balazs has joined #ruby
dnicole has quit [Remote host closed the connection]
dnicole has joined #ruby
Hobbyboy has quit [Ping timeout: 260 seconds]
x0f has quit [Ping timeout: 248 seconds]
vedu has quit [Ping timeout: 260 seconds]
d^sh has quit [Ping timeout: 256 seconds]
Hobbyboy has joined #ruby
d^sh has joined #ruby
jose__ has quit [Quit: Page closed]
Mia has quit [Ping timeout: 244 seconds]
vedu has joined #ruby
Olipro has quit [Ping timeout: 260 seconds]
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hobbyboy has quit [Ping timeout: 260 seconds]
heftig has joined #ruby
Olipro has joined #ruby
jgt has joined #ruby
palms has quit [Ping timeout: 260 seconds]
Guest69 has joined #ruby
railswebdev has joined #ruby
bmurt has joined #ruby
stive has joined #ruby
vedu has quit [Quit: ZNC - http://znc.in]
heftig has quit [Client Quit]
chopin_ has quit [Remote host closed the connection]
chopin has joined #ruby
Hobbyboy has joined #ruby
heftig has joined #ruby
trake has joined #ruby
chopin has quit [Ping timeout: 240 seconds]
perniciouscaffei has quit [Ping timeout: 250 seconds]
ace05 has quit [Remote host closed the connection]
heftig has quit [Quit: No Ping reply in 180 seconds.]
soahccc has quit [Ping timeout: 260 seconds]
stive has quit []
sepp2k has quit [Read error: Connection reset by peer]
soahccc has joined #ruby
elifoster has joined #ruby
nettoweb has joined #ruby
heftig has joined #ruby
_sfiguser has quit [Ping timeout: 258 seconds]
fullofcaffeine has quit [Remote host closed the connection]
nettoweb has quit [Client Quit]
hutch34 has joined #ruby
jmignault has joined #ruby
harai has joined #ruby
fullofcaffeine has joined #ruby
unknowns2k2 has joined #ruby
cdg has joined #ruby
hutch34 has quit [Ping timeout: 258 seconds]
jmignault has quit [Ping timeout: 265 seconds]
allcentury has joined #ruby
fullofcaffeine has quit [Ping timeout: 250 seconds]
dviola has quit [Quit: WeeChat 1.6]
maryo has joined #ruby
tau has quit [Remote host closed the connection]
unknowns2k2 has left #ruby [#ruby]
<gener1c> havenwood: hey
a3f has quit [Quit: Zzzzz..]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ICantCook has quit [Quit: bye]
hanmac has quit [Ping timeout: 240 seconds]
Guest69 has joined #ruby
chopin has joined #ruby
_sfiguser has joined #ruby
Littlemyu has joined #ruby
railswebdev has joined #ruby
jbeeze has quit [Remote host closed the connection]
jmignault has joined #ruby
centrx has joined #ruby
Mia has joined #ruby
skweek has quit [Ping timeout: 252 seconds]
maryo has quit [Quit: Leaving]
xrlk has quit [Quit: Leaving]
jmignault has quit [Ping timeout: 256 seconds]
PresidentBiscuit has quit [Remote host closed the connection]
PresidentBiscuit has joined #ruby
xrlk has joined #ruby
skweek has joined #ruby
harai has quit [Ping timeout: 260 seconds]
optiz0r has quit [Ping timeout: 248 seconds]
djbkd has joined #ruby
optiz0r has joined #ruby
astrobunny has joined #ruby
PresidentBiscuit has quit [Ping timeout: 256 seconds]
c355e3b has quit [Quit: Connection closed for inactivity]
djbkd has quit [Client Quit]
libastral has quit [Ping timeout: 258 seconds]
Channel6 has joined #ruby
hanmac has joined #ruby
Illianthe has joined #ruby
blackbom1 has quit [Ping timeout: 265 seconds]
libastral has joined #ruby
astrobunny has quit [Remote host closed the connection]
raul782 has quit [Remote host closed the connection]
blackbombay has joined #ruby
hutch34 has joined #ruby
PresidentBiscuit has joined #ruby
hutch34 has quit [Ping timeout: 260 seconds]
trake has quit [Read error: Connection reset by peer]
palms has joined #ruby
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ruid has joined #ruby
Guest69 has joined #ruby
railswebdev has joined #ruby
GodFather has quit [Ping timeout: 244 seconds]
brent__ has quit [Quit: Connection closed for inactivity]
ruid has quit [Quit: Leaving]
fnord_ has joined #ruby
byte512 has joined #ruby
centrx has quit []
eljimmy has joined #ruby
skweek has quit [Ping timeout: 246 seconds]
Asher has quit [Quit: Leaving.]
x0f has joined #ruby
Littlemyu_ has joined #ruby
trake has joined #ruby
KnownSyntax has quit [Remote host closed the connection]
nebg has quit [Ping timeout: 245 seconds]
Asher has joined #ruby
PresidentBiscuit has quit []
Bilge has quit [Ping timeout: 240 seconds]
lupine has quit [Remote host closed the connection]
tobiasvl has quit [Ping timeout: 260 seconds]
blackwind_123 has quit [Ping timeout: 260 seconds]
devster31 has quit [Ping timeout: 245 seconds]
Littlemyu has quit [Ping timeout: 260 seconds]
KnownSyntax has joined #ruby
nebg has joined #ruby
Bilge has joined #ruby
tvl has joined #ruby
tvl is now known as tobiasvl
lupine has joined #ruby
raul782 has joined #ruby
devster31 has joined #ruby
Asher has quit [Quit: Leaving.]
mBailey_j has joined #ruby
Asher has joined #ruby
A5101 has joined #ruby
hutch34 has joined #ruby
hebroon has quit [Read error: Connection reset by peer]
Asher has quit [Remote host closed the connection]
eljimbo has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
arescorpio has quit [Quit: Leaving.]
eljimmy has quit [Ping timeout: 244 seconds]
surrounder has quit [Ping timeout: 245 seconds]
Asher has joined #ruby
eljimmy has joined #ruby
Snickers has joined #ruby
jmignault has joined #ruby
dmtd has joined #ruby
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
eljimbo has quit [Ping timeout: 256 seconds]
exadeci has joined #ruby
jmignault has quit [Ping timeout: 260 seconds]
palms has quit [Ping timeout: 252 seconds]
_sfiguser has quit [Ping timeout: 256 seconds]
kent\n has quit [Quit: No Ping reply in 180 seconds.]
kent\n has joined #ruby
redpants has quit [Quit: leaving]
hanmac has quit [Ping timeout: 258 seconds]
Guest43 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jaguarmagenta has joined #ruby
taphams has joined #ruby
ace05 has joined #ruby
taphams has quit [Client Quit]
<zacts> Ruby <^> <-- my attempt at an ascii ruby gem
_sfiguser has joined #ruby
ace05 has quit [Ping timeout: 256 seconds]
surrounder has joined #ruby
igniting has quit [Ping timeout: 244 seconds]
hutch34 has joined #ruby
Snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gix has quit [Ping timeout: 260 seconds]
astrobunny has joined #ruby
sdelic has joined #ruby
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
cloaked1 has quit [Ping timeout: 252 seconds]
hanmac has joined #ruby
vedu has joined #ruby
domgetter has joined #ruby
hutch34 has quit [Ping timeout: 260 seconds]
Mia has quit [Ping timeout: 260 seconds]
gix has joined #ruby
|RicharD| has joined #ruby
allcentury has quit [Ping timeout: 245 seconds]
cloaked1 has joined #ruby
Guest69 has joined #ruby
etehtsea has joined #ruby
gnufied has quit [Ping timeout: 258 seconds]
ICantCook has joined #ruby
railswebdev has joined #ruby
marxarelli is now known as marxarelli|afk
sdelic has quit [Quit: ZZZzzz…]
gizmore|2 has quit [Read error: Connection reset by peer]
gizmore has joined #ruby
raul782 has quit [Remote host closed the connection]
raul782 has joined #ruby
ur5us has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
|RicharD| has quit [Read error: Connection reset by peer]
juria_roberts has joined #ruby
etehtsea has quit [Read error: Connection reset by peer]
<juria_roberts> if i know a value exists in an array...How do I get the value before that in the array?
<juria_roberts> For example ["a", "b", "c"] i pass in b to a function and get back a
eljimmy has quit [Quit: This computer has gone to sleep]
<domgetter> >> my_arr = ["a", "b", "c"]; i = my_arr.index("b"); my_arr[i-1] # this will break if the "found" item is first
<ruby[bot]> domgetter: # => "a" (https://eval.in/682391)
eljimmy has joined #ruby
<domgetter> you'll also have to account for when the item isn't in the list
<juria_roberts> thanks domgetter
jgt has quit [Ping timeout: 260 seconds]
etehtsea has joined #ruby
cdg has quit [Remote host closed the connection]
amclain has quit [Quit: Leaving]
jud has joined #ruby
hutch34 has joined #ruby
hightower2 has quit [Read error: Connection reset by peer]
hightower3 has joined #ruby
eljimmy has quit [Quit: This computer has gone to sleep]
hutch34 has quit [Ping timeout: 256 seconds]
c0mrad3 has joined #ruby
ramfjord has joined #ruby
<xrlk> XD
<kbdkode> ◖X
ramfjord has quit [Ping timeout: 240 seconds]
toretore has quit [Ping timeout: 260 seconds]
neanderslob has quit [Remote host closed the connection]
eljimmy has joined #ruby
sdelic has joined #ruby
tuxaddicted has joined #ruby
Littlemyu_ has quit [Ping timeout: 260 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
sdelic has quit [Quit: ZZZzzz…]
elifoster has quit [Quit: night]
Channel6 has quit [Quit: Leaving]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch34 has joined #ruby
raul782 has quit [Remote host closed the connection]
hutch34 has quit [Ping timeout: 268 seconds]
Cohedrin has joined #ruby
rsampaio_ has joined #ruby
Jeff_D has joined #ruby
JoshS has joined #ruby
hightower3 has quit [Ping timeout: 244 seconds]
saneax is now known as saneax-_-|AFK
minimalism has joined #ruby
mistermocha has joined #ruby
mistermocha has quit [Client Quit]
harfangk has joined #ruby
jsgrant has joined #ruby
sdelic has joined #ruby
ICantCook has left #ruby ["bbl"]
igniting has joined #ruby
gr33n7007h3 has joined #ruby
<Jeff_D> Can someone help with figuring out a better way to customise tasks in Rake such as the one shipped for Flog? Gist explaining what I have and what I want here: https://gist.github.com/jdickey/6efd0d77a74f7eeae0304a51234e540a
gr33n7007h2 has quit [Ping timeout: 260 seconds]
tercenya has quit [Ping timeout: 258 seconds]
function has joined #ruby
raul782 has joined #ruby
trake has quit [Quit: Leaving]
hutch34 has joined #ruby
eggshke has joined #ruby
hutch34 has quit [Ping timeout: 268 seconds]
ace05 has joined #ruby
Rickmasta has quit [Quit: Textual IRC Client: www.textualapp.com]
function has quit [Quit: found 1 in /dev/zero]
tercenya has joined #ruby
yeticry has joined #ruby
ace05 has quit [Ping timeout: 260 seconds]
jmignault has joined #ruby
<c-c> I wonder if Process is cross-platform? (ie. works on Windows too)
jmignault has quit [Ping timeout: 248 seconds]
eljimmy has quit [Quit: This computer has gone to sleep]
CloCkWeRX has quit [Quit: Leaving.]
jsgrant has quit [Remote host closed the connection]
<Jeff_D> Can someone help with figuring out a better way to customise tasks in Rake such as the one shipped for Flog? Gist explaining what I have and what I want here: https://gist.github.com/jdickey/6efd0d77a74f7eeae0304a51234e540a
<c-c> Jeff_D: its probably bit early so thats why you didn't get much answers but I'll have a look now
<Jeff_D> c-c: Thanks a lot; yeah, I generally lose track of timezones for a while after DST changes :P
<c-c> Jeff_D: does it work?
Chagel has joined #ruby
<Jeff_D> what I have there works. What I _want_ is to wrap a subclass up so I can keep the original pristine. I also want to figure out how to define a (namespaced) Rake task that uses that subclass, so that all I need in the actual Rakefile is the default-task definition. See where I’m trying to go?
<c-c> I see too much words
<c-c> lol
<c-c> can you make simpler?
<c-c> If not and if it works - leave it alone and make work. Also https://ariejan.net/2011/04/04/rake-with-namespaces-and-default-tasks/
Rickmasta has joined #ruby
akkad has quit [Quit: Emacs must have died]
Kovensky has joined #ruby
chopin has quit [Remote host closed the connection]
chopin has joined #ruby
Kovensky has left #ruby [#ruby]
raul782 has quit [Remote host closed the connection]
chopin has quit [Ping timeout: 248 seconds]
raul782 has joined #ruby
hutch34 has joined #ruby
<Jeff_D> c-c: Thanks anyway; updated the Gist after your “too many words” comment (to add even more words :P) that hopefully explains the goal better. I’ll keep using what works. It’s worked for a couple of years now; I’ve just never been very happy with it.
gizmore has quit [Ping timeout: 256 seconds]
gizmore has joined #ruby
Jeff_D has quit [Quit: JMP $]
<dminuoso> c-c: Why wouldn't Process be cross-platform, unless you expect Ruby works on DOS..
tmtwd has joined #ruby
agent_white has joined #ruby
hutch34 has quit [Ping timeout: 256 seconds]
yardenbar has joined #ruby
etehtsea has quit [Quit: Textual IRC Client: www.textualapp.com]
<blackbombay> windows doesnt implement fork, for one.
<c-c> dminuoso: well because I saw 'childprocess' and 'god' on github, and it makes me wonder
<dminuoso> c-c: CreateProcessW is used on win32
pawnbox has joined #ruby
aidalgol has joined #ruby
<c-c> I'm making a base for a game. - A process for UI, a process for engine, and a process (or a server) for game state.
<dminuoso> Uh.
<dminuoso> And then use IPC to keep the engine and UI synced?
raul782 has quit [Remote host closed the connection]
<c-c> Not quite sure, perhaps just send commands to engine and request state from the state server.
mostlybadfly has quit [Quit: Connection closed for inactivity]
<c-c> Much confusion atm. Maybe just send commands via socket. But, then, windows people won't be able to play with this.
<dminuoso> Because Windows doesn't have sockets?
<c-c> dminuoso: I haven't fully redone my homework on how it is at the moment, to be honest.
spicerack has joined #ruby
<dminuoso> c-c: Here's what we did to keep our VR engine, flight state controllers and UI separate and highly portable. We sprinkled CORBA ontop of it until it worked.
yardenbar has quit [Ping timeout: 256 seconds]
<dminuoso> But then again CORBA was required for plenty things anyway.
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
<c-c> CORBA sounds enterpricey
<dminuoso> It's not really
terlar has joined #ruby
<dminuoso> It's just something similar DCOM
<dminuoso> to
<dminuoso> Or D-Bus
<c-c> I have plenty of homework and tests to do, but I think possibly --> named pipes between UI and Engine, sockets between State Server <--> UI/Engine
<dminuoso> Using threads may be much much much simpler.
troulouliou_div2 has joined #ruby
<c-c> but, doesn't ruby concurrency rely on processes
jgnagy has quit [Remote host closed the connection]
<c-c> +?
<dminuoso> c-c: So? It's not like Ruby is going to be useful in a performance contest anyway.
<blackbombay> ruby threads are concurrent though.
<dminuoso> blackbombay: No. But parallel.
jgnagy has joined #ruby
<blackbombay> they're not parallel, no.
<blackbombay> they're concurrent.
<blackbombay> varies from implementation but on cruby at least they're concurrent.
<dminuoso> blackbombay: You are mixing things up. Ruby threads can be concurrent in an ideal scenario - but the GVL usually fucks you.
<dminuoso> No they are not.
<blackbombay> um, they are. :)
<dminuoso> blackbombay: Concurrency simply means that two tasks are being executed at the same time.
<blackbombay> wut
<dminuoso> Which with the GVL is often not possible.
<blackbombay> you've confused parallelism with concurrency.
<blackbombay> i suggest you check out rob pikes video.
<c-c> as an added twist, UI and (possibly engine) maybe rewritten in rust or something if this thing works
<dminuoso> blackbombay: Then you have a different understanding of the words than the rest of the world.
<dminuoso> And I do not take a youtube video as an argument, sorry.
<blackbombay> i'll go with rob pikes definition, which says you have got the meaning backwards.
tjbiddle has joined #ruby
<dminuoso> blackbombay: Then Ill have the meaning backwards but have no confusion when talking with anyone.
<c-c> concurrency: a pen is sharpened by two people -- parallelism: two people sharpen pens
benlieb has quit [Quit: benlieb]
xall has joined #ruby
<dminuoso> blackbombay: It's like nitpicking that RJ45 is not RJ45 but 8P2C.
<blackbombay> then those people are wrong too. it's a common error, but concurrency != parallelism.
benlieb has joined #ruby
<dminuoso> blackbombay: Sure, you may be correct - but nobody in this world will know what 8P2C is.
benlieb has quit [Client Quit]
<blackbombay> at google it matters, at least.
benlieb has joined #ruby
benlieb has quit [Client Quit]
jgnagy has quit [Ping timeout: 258 seconds]
benlieb has joined #ruby
benlieb has quit [Client Quit]
<dminuoso> blackbombay: At any rate, its confusingly meant in both directions by different folks.
<dminuoso> I recognize that
<blackbombay> in any case, to say ruby threads are not concurrent is incorrect. they're not run in parallel(usually), and it is implementation dependent as well. jruby has parallel threads, and so does rubinius.
aganov has joined #ruby
benlieb has joined #ruby
Dimik has quit [Ping timeout: 260 seconds]
benlieb has quit [Client Quit]
<blackbombay> sure, 'concurrent' as a term has been misused a lot, which is probably why rob pike decided to do that presentation in the first place.
benlieb has joined #ruby
benlieb has quit [Client Quit]
ace05 has joined #ruby
Fichtenstein has joined #ruby
conta has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dminuoso> blackbombay: Okay fine I yield. You may be correct and I have mave been carrying the wrong notion these years.
SeepingN has quit [Read error: Connection reset by peer]
<blackbombay> that video is very good. like almost every video rob pike has done.
<c-c> Any comments on using named pipes for local interprocess communication?
minimalism has quit [Quit: minimalism]
<c-c> - In a UI<->Engine -scenario
nofxxx has joined #ruby
ace05 has quit [Ping timeout: 260 seconds]
agent_white has quit [Read error: Connection reset by peer]
minimalism has joined #ruby
hutch34 has joined #ruby
<matthewd> c-c: I'm not sure what sort of comment you're looking for... you've chosen a rather odd-sounding architecture, but "why?" isn't really a comment.
shmuli has joined #ruby
<matthewd> c-c: "That seems more complicated / harder than the less complicated / easier options"?
nofxx has quit [Ping timeout: 246 seconds]
wugy has joined #ruby
wugy has quit [Excess Flood]
wugy has joined #ruby
wugy has quit [Excess Flood]
shmuli has quit [Client Quit]
wugy has joined #ruby
wugy has quit [Excess Flood]
wugy has joined #ruby
wugy has quit [Excess Flood]
<c-c> matthewd: looking for a definitive answer on whether to do it
<c-c> *use it, or them
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<c-c> matthewd: care to expand on "odd-sounding architecture"?
<matthewd> c-c: There may be reasons you've dismissed those, but without walking us through that journey, it's hard to comment on the reasonableness of where you've ended up
agent_white has joined #ruby
<matthewd> 1. Why not threads? 2. Why not unnamed pipes? Do you expect to launch these processes independently?!
hutch34 has quit [Ping timeout: 250 seconds]
<c-c> 1. Because my understanding is ruby relies on process based concurrency.
nofxxx has quit [Ping timeout: 252 seconds]
firstdayonthejob has joined #ruby
<c-c> 2. Unnamed pipes are a possibility. But Windows only supports named pipes, a downside. Currently the approach is: - launch separate UI and Game engine processes, which communicate with Game State -server (or perhaps process when its ran locally).
<matthewd> I'm pretty sure the only thing agreed upon throughout the above argument was that that's not true
Gadgetoid has quit [Ping timeout: 244 seconds]
SeepingN has joined #ruby
<c-c> matthewd: sorry thats vague to me
<c-c> matthewd: since there are at least 3 statements above! :D
<c-c> Note that I've learned most of this during 1.8 and 1.9
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<c-c> so, perhaps now threads are the thing to use on MRI
<matthewd> Concurrency is hard, in conversations too :P
teclator_ has quit [Ping timeout: 260 seconds]
teclator has joined #ruby
frozengeek___ has joined #ruby
xall has quit [Ping timeout: 252 seconds]
tjbiddle has quit [Quit: tjbiddle]
<c-c> I think my problem is not hard at all, just bunch of choices when trying to include non-linux platforms
SeepingN has quit [Quit: The system is going down for reboot NOW!]
A5101 has quit [Ping timeout: 246 seconds]
frozengeek___ has quit [Client Quit]
Macaveli has joined #ruby
SeepingN has joined #ruby
terlar has quit [Ping timeout: 268 seconds]
Gadgetoid has joined #ruby
spicerack has joined #ruby
<matthewd> Ruby threads do not execute in parallel -- only one can actually be doing a thing on the CPU at a given moment
lxsameer has joined #ruby
<matthewd> So, if you have multiple CPU-heavy things to do at the same time, then multiple processes help
<c-c> I know this
<c-c> Also, its not what I asked
frozengeek___ has joined #ruby
<blackbombay> we're past that conversation :p
gingray has joined #ruby
wugy has joined #ruby
<matthewd> I'm getting there
juria_roberts has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Macaveli_ has joined #ruby
<matthewd> "UI", by definition, does not seem CPU-heavy; therefore it seems to be suitable for threads; therefore my answer to your question is "named pipes seem over-complicated for something that seems solvable with threads."
firstdayonthejob has quit [Ping timeout: 240 seconds]
<c-c> But, a bogged-down Engine running in the same process as the UI will cause the UI to seem slow... (?)
Gadgetoid has quit [Ping timeout: 250 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Macaveli has quit [Ping timeout: 244 seconds]
<c-c> Not sure if my idea of Game State Server <--request UI-state <-- UI -->message commands-->Engine is clear
last_staff has joined #ruby
nchambers is now known as God
<c-c> (Engine-->send changes-->State Server omitted above)
vondruch_ is now known as vondruch
charliesome has joined #ruby
charliesome has quit [Client Quit]
tmtwd has quit [Ping timeout: 248 seconds]
God is now known as nchambers
yeticry has quit [Ping timeout: 244 seconds]
dionysus69 has joined #ruby
yeticry has joined #ruby
rsampaio_ has quit [Ping timeout: 258 seconds]
dionysus69 has quit [Client Quit]
dionysus69 has joined #ruby
<matthewd> Assuming "(?)" indicates a question I'm allowed to answer: no, that's why you're using threads.
doublemalt_ has joined #ruby
conta has quit [Quit: conta]
<c-c> matthewd: ah, good move avoiding the actual question!
<matthewd> It was a statement with a question mark appended... and I thought I did just answer it
<c-c> matthewd: there was no word "thread" in the preceding sentence
mvxlr has joined #ruby
Chagel has quit [Ping timeout: 260 seconds]
<c-c> I think this all could be 2-3 very simple statements.
<matthewd> I'm clearly lost. Can you rephrase as an actual question?
Gadgetoid has joined #ruby
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<c-c> "Wouldn't a bogged down Engine running in the same process as the UI cause the UI to be bogged down as well?"
<matthewd> "I think you should use threads" / "But a single process will lag the UI" / "No, that's what threads are for" / "I didn't mention threads"
mark_66 has joined #ruby
<matthewd> No, not if they're in separate threads.
<c-c> Let me cut to the chase. Are MRI's threads are implemented so that they can utilize multiple cores?
<c-c> in Ruby 2
<matthewd> No.
hutch34 has joined #ruby
<c-c> Ergo, it is not a good idea to use threads for concurrency in a UI<->Engine scenario, matthewd
<matthewd> I'm claiming that's not relevant to your needs
<matthewd> I disagree that that follows, but you're free to implement what you like.
<c-c> matthewd: uhuh?
<c-c> matthewd: then can you explain how you'd solve the problem described in the "bogged down Engine" -question?
frozengeek___ has quit [Quit: frozengeek___]
<matthewd> ... by using threads?
<matthewd> We're talking in circles
Chagel has joined #ruby
SeepingN has joined #ruby
conta has joined #ruby
hutch34 has quit [Ping timeout: 258 seconds]
nowhere_man has quit [Ping timeout: 250 seconds]
<c-c> matthewd: no, you are confused
Snickers has joined #ruby
<c-c> matthewd: Are MRI's threads are implemented so that they can
<c-c> utilize multiple cores?
<c-c> (asked this before, you answered "no")
SeepingN has quit [Client Quit]
aufi has joined #ruby
<c-c> If your answer is correct, no amount of threading will help the UI bogged down by the Engine
<matthewd> The answer is still no, and it still doesn't mean one thread will lag when another has work to do.
<dminuoso> c-c: If you use Ruby you are already bogged down.
<c-c> matthewd: well suppose both threads would like 90% of processor cores power
<matthewd> (though it does mean the busy thread will take slightly longer, because it's getting interrupted to handle the UI work)
<dminuoso> c-c: That is a sad reality that you have to accept if you want to do anything graphics related in Ruby.
<dminuoso> Ruby is not fast. Period.
<c-c> matthewd dminuoso it is about the user experience, not actual speed
<matthewd> > "UI", by definition, does not seem CPU-heavy
<dminuoso> c-c: Ruby just is the wrong language for the job.
<dminuoso> c-c: Ruby sucks for user interfaces. Ruby sucks for good parallelism (as discussed earlier).
<matthewd> If you have multiple CPU-heavy tasks to do, then do it in processes. But that's nothing to do with a lagging UI.
<dminuoso> Ruby is great for tooling and perhaps web development. Not games.
<c-c> matthewd: so, now you are making the statements that I started with in the first place :)
xall has joined #ruby
<c-c> dminuoso: also, this is character based
<dminuoso> c-c: If you try to write a game in Ruby and solve any design issues of the Ruby virtual machines with IPC you are going into a world of troubule.
<dminuoso> Honestly.
<matthewd> I've been saying the same set of things the whole time
<dminuoso> c-c: If you want to do it in Ruby as a proof of concept with any regard of performance then go ahead, Ill give some advice.
<c-c> matthewd: you made a statement that "its not true" when I said "ruby relies on process based concurrency"
<c-c> matthewd: now you agree
<c-c> matthewd: you can only fool yourself 8)
<dminuoso> c-c: *parallelism
<matthewd> Now we're back to the concurrency vs parallelism argument
<c-c> nope
<dminuoso> c-c: So as I have been proven wrong, concurrency means overlapping execution times and parallelism means parallel execution.
<dminuoso> c-c: Ruby has concurrency out of the box.
<dminuoso> But poor parallelism due to the global vm lock.
<zacts> I'm just joining in, but when should one utilize threads, and when should one utilize fibers?
<c-c> dminuoso: why would I want to solve 'design issues of ruby vm's?
<zacts> (in a nutshell)
<c-c> dminuoso: are you gyus just making shit up
r3vDev has joined #ruby
<dminuoso> c-c: You talk about "A hogging B"
<dminuoso> c-c: Why would A hog B?
<dminuoso> c-c: Either because Ruby has shit poor parallelism, or because you are making things up.
<c-c> dminuoso: I know it does, I can see it on my process monitor, 100% core use, nowhere to go.
<dminuoso> If its the first, then using IPC to solve the issue is using IPC to work around Ruby design issues.
<dminuoso> c-c: Processes are not going to make things better.
<dminuoso> On the opposite, they make things worse.
astrobunny has quit [Remote host closed the connection]
<c-c> dminuoso: you made a strawman, sorry but thats not my problem
<c-c> my problem is still: how to implement multiplatform concurrency on multiple cores
<c-c> simple as that
astrobunny has joined #ruby
<dminuoso> c-c: Use threads.
<dminuoso> Do you want parallelism? Dont use Ruby.
<c-c> dminuoso: but it was just argued threads do not utilize multiple cores
SesMan has joined #ruby
<dminuoso> c-c: Yeah. You are looking for parallelism, not concurrency.
<matthewd> If you need to use multiple cores, you need processes. But you don't need multiple cores "In a UI<->Engine -scenario"
<c-c> nope
TomyWork has joined #ruby
xall has quit [Quit: WeeChat 1.5]
<c-c> I am looking for concurrency on a local machine
<c-c> :)
astrobun_ has joined #ruby
<c-c> and yes, I agree, seems that processes are the way to go for utilizing multicore cPU
xall has joined #ruby
<dminuoso> c-c: You obviously missed the argument that blackbombay made.
<dminuoso> c-c: Either way. The reason Ruby has piss poor parallelism is a design issue. And you want to work around that design issue using processes and IPC.
<c-c> I'm not into your "parallelism vs concurrency" argument that was not related to my question nor this channel directly.
serard has joined #ruby
<serard> hello
<c-c> Its just a simple game. I'm not making the most efficient supergame ever
<c-c> Calm down with the architecture astronautism! 8)
ace05 has joined #ruby
<serard> I have a variable, I want to use it like a :myvar; is this possible ?
<matthewd> c-c: This discussion doesn't seem to be getting anywhere. You've chosen a solution, so I don't think there's more we can offer.
<dminuoso> zacts: Generally fibers allow for writing better code, as you can get around using locking primitives and improve scheduling behavior.
mikecmpbll has quit [Quit: inabit. zz.]
<c-c> matthewd: well, you offered me a lot of words, but went down the wrong path!
<zacts> ok
<matthewd> serard: Expand on what you mean?
<dminuoso> serard: Yes, but you don't want to do this.
<c-c> matthewd: maybe stick to a more pragmatic approach next time!
<zacts> dminuoso: aren't there gems that abstract out threading primitives?
<zacts> other than fibers
<dminuoso> zacts: What do you mean?
astrobunny has quit [Ping timeout: 256 seconds]
<matthewd> c-c: My feedback remains "given the problem described, the simplest approach that meets the requirements is to use threads; IPC is complicated"
marktwo has quit [Ping timeout: 256 seconds]
<zacts> dminuoso: "as you can get around using locking primitives" <-- can't you do this with gems that abstract out those primitives?
<zacts> sorry if this makes no sense. I'm still learning.
<dminuoso> zacts: No, thread safety needs to be considered. It cant be hidden away without overly excessive locking strategies.
<zacts> ah ok
tomphp has joined #ruby
<serard> Rust ?
<c-c> matthewd: but, threads don't use multicore, so no, thats not the simplest solution
<dminuoso> c-c: THreads can and do use multicore.
<dminuoso> c-c: You are missing the point.
<c-c> dminuoso: well I asked, and matthewd said no
<c-c> I think you are projecting your thinks at me
millerti has quit [Read error: Connection reset by peer]
<matthewd> c-c: You don't need multiple cores to keep a UI responsive, which is the stated requirement
<dminuoso> c-c: Anything that does not involve the GVL can use parallelism without issues.
ace05 has quit [Ping timeout: 250 seconds]
marktwo has joined #ruby
<matthewd> c-c: If "uses multicore because it sounds cool" is an additional requirement, then that changes things
<dminuoso> c-c: Now since you dont have a fucking clue what the GVL is, I recommend you read a book on Ruby.
Azure has quit [Read error: Connection reset by peer]
<c-c> See, tons of projecting
<dminuoso> You're right, I'm somehow caring.
* dminuoso starts to grow up
<zacts> would you need to change Ruby code that is already concurrent, if you want it to then become parallel as well?
<c-c> You run around, talk too much. Show me, or ignore me :)
<zacts> or is this just an interpreter detail?
<matthewd> c-c: But I think this conversation has reached its conclusion, and it's time to take a pragmatic approach to our time management
nobitanobi has joined #ruby
<dminuoso> zacts: Generally it depends. The majority of Rubys core is protected by a global VM lock.
<c-c> matthewd dminuoso thank you for your input, I have read your ideas now at least twice.
<zacts> s/just an interpreter detail/would the interpreter handle parallelism of concurrent code automatically/
Azure has joined #ruby
<zacts> ok
<dminuoso> zacts: Blocking IO for example can be done in parallel without an issue (which is the main parallelism you can find in Ruby libraries)
<matthewd> zacts: As long as it's "properly" concurrent, it's an interpreter detail. Often, people do things that are safe in MRI without realising it's not actually safe on a theoretical fully parallel interpreter.
<zacts> ah ok
* c-c doesn't have a "fucking clue"
<dminuoso> zacts: Note that the GVL does not make Ruby thread-safe either, making it really disgusting because it really gives wrong impressions.
<c-c> How nice that we have 3leet h4x0rs here - so good that they need to swear to make their point.
teclator has quit [Ping timeout: 250 seconds]
<zacts> I'm going to read this Pragmatic Press book on concurrency, if you think it's good
<zacts> let me link
teclator has joined #ruby
<zacts> ^ what do you think of this book for a newbie to concurrency / threads / fibers
<matthewd> e.g., something as seemingly innocuous as reading a hash from two threads is safe in MRI because of the GVL, but is not necessarily so on other interpreters
<dminuoso> zacts: Probably a bad read if you're new to threads.
<zacts> dminuoso: do you have any other suggestions?
<zacts> :-)
<dminuoso> zacts: It seems like a great introduction into those topics in Ruby if you're already familiar.
<dminuoso> Mmmm
<zacts> I'm unfamiliar with threads. I know of them, but don't know much about them
<c-c> I wonder if, as dminuoso says "don't have a f*cking clue", might be due to people putting their own words in my mouth... Hmm, or just because someone thinks other people don't know what they know. I think this is not suitable for this community, dminuoso.
<zacts> perhaps a computer science book like Concepts, Techniques, and Models of Computer Programming by van Roy?
<zacts> I would prefer something more lightweight and Ruby oriented though, if possible
yqt has joined #ruby
<zacts> but I could go for the above genre as well (I will eventually anyway)
Joufflu has quit [Read error: Connection reset by peer]
tvw has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<serard> dminuoso, you told me I can, but I don't want to do this; ok, please tell me how I can do it :)
ledestin has joined #ruby
<dminuoso> zacts: Any other languages you are familiar with?
<zacts> dminuoso: I also generally try to avoid random google searched Ruby tutorials
<dminuoso> zacts: I might have a book or two if you have a Java or C++ background.
<zacts> dminuoso: not really. Perl5.
fullstack has quit [Quit: ZNC 1.6.3 - http://znc.in]
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zacts> dminuoso: perhaps Java
<zacts> I have a Java book, and I wouldn't mind picking it up a bit
Olipro has quit [Ping timeout: 246 seconds]
<zacts> I've only done minimal minimal beginners Java
terlar has joined #ruby
<matthewd> serard: So if I'm reading this right, you want to basically write ruby in your yaml file
<c-c> zacts: just ask two kids to write and edit a story with one pencil. All the cases are found there!
<serard> matthewd, nop, I'm writting a Vagrantfile, which loads a yaml to drive configuration by code
Chagel has quit [Quit: leaving]
<matthewd> That's what I'm looking at
<dminuoso> zacts: Did some digging, your idea of "Concepts, Techniques, and Models of Computer Programming" doesn't sound so bad and seems to cover concurrent programming on all described programming techniques.
<serard> I convert the yaml to an OpenStruct, then I'd like to use that OpenStruct to loop over the triggers definitions, but in Vagrantfile's trigger's plugin, it's declared like before :up
<serard> and I don't want to write loop for each kind of momentum
<serard> (but I will to add checks for non-existing ones)
<zacts> dminuoso: ah ok
<zacts> I'll go ahead and do Concepts / Techniques
Humdai has joined #ruby
<serard> matthewd, by momentum, I mean "config.triggers.before :halt do ... end"
<zacts> I've wanted to do this for a while, and now this gives me a reason to do it in a practical sense
<dminuoso> zacts: I have not read it though, but based on what I see it does seem to be a decent book.
<matthewd> serard: I think I need a better illustration of how these two pieces inter-relate
hutch34 has joined #ruby
<zacts> ah ok
<matthewd> serard: You want to evaluate the first in a way that is equivalent to something approximately shaped like the second, right?
<zacts> I think I'll give it a go, if I get stuck I'll ask here or on the appropriate irc channels
Olipro has joined #ruby
<dminuoso> zacts: Absolutely. It's a really complex and at times disgusting topic. It's fascinating.
<zacts> I may read the pragmatic Ruby threads book at the same time to try applying it to Ruby directly
<dminuoso> zacts: Probably not a bad idea.
<matthewd> serard: Can you show what the second would look like if you did write it by hand to match the first? They currently seem to be doing different things.
<zacts> cool, thanks dminuoso
<serard> matthewd, thanks, here's my actual code for handling one run and run_remote command https://gist.github.com/anonymous/5c374e52b0fe9551043b01671683a3d7
<dminuoso> zacts: Multithreading gives you random bugs you can't debug and fix - but break your application.
<dminuoso> They are wonderful.
claudiuinberlin has joined #ruby
<zacts> lol
andikr has joined #ruby
<dminuoso> zacts: In my previous project we had a so-called race condition and it took us about 6 months of exhaustive search, debugging, regression testing and more debugging to find the bug - it was just a single missing lock.
<zacts> dminuoso: now doesn't elixir have a more elegant approach to this?
<serard> matthewd, Now I want to drive this code by yaml, easing the add of new commands to run at any momentum, for run or run_remote (run and run_remote are provided by vagrant-triggers plugin)
<zacts> oh wow, 6 months!
<dminuoso> zacts: The issue was just that whenever we attached a debugger, the bug disappeared. Whenever we started adding logging, the bug disappeared.
<zacts> oh damn
<serard> matthewd, that's pseudo code ahem :)
<zacts> a bug that disappears when using a debugger, but it's there in all other cases. sounds like hell
<dminuoso> zacts: There's quite a few of those actually. Some even in single threading. :)
<dminuoso> They are called "Heisenbugs"
<zacts> heh
hutch34 has quit [Ping timeout: 256 seconds]
<zacts> I've been told by others that for heavily concurrent code elixir is often a better choice than Ruby?
<dminuoso> zacts: Absolutely.
<zacts> ok
<dminuoso> zacts: Elixir was designed for concurrency.
c0mrad3 has quit [Quit: Connection closed for inactivity]
<zacts> so Elixir runs on the Erlang platform, correct?
<dminuoso> Yeah
<c-c> Why not visit #elixir for more elixir talk
<zacts> c-c: ah sorry
<c-c> well it certainly is an interesting new lang
<c-c> zacts: so np
<zacts> ok :-)
<manveru> zacts: it's #elixir-lang btw ;)
<zacts> could Ruby 3.* theoretically be redesigned to have better threading support in the future?
<zacts> manveru: ah thanks
<manveru> ruby 3 is designed for that, yes
<zacts> oh cool
<zacts> it's already in the brew
<manveru> it'll have share-nothing concurrency support
<domgetter> zacts they're planning on adding "Guilds" into Ruby 3
<zacts> neat
biberu has joined #ruby
CloCkWeRX has joined #ruby
<zacts> nice
jmignault has joined #ruby
Littlemyu_ has joined #ruby
teclator_ has joined #ruby
teclator has quit [Ping timeout: 258 seconds]
Silthias has quit [Ping timeout: 248 seconds]
<serard> I have a vagrant plugin that uses :something (like something.before :halt), how can I use a variable to populate that :something (like my_var="halt", then :my_var) ?
Fernando-Basso has joined #ruby
<manveru> problem with ruby 3 is that it's still about 3 years away :|
frozengeek___ has joined #ruby
<zacts> oh that's a while from now
<zacts> could 2.* backport it in?
<manveru> serard: my_var = :halt
<zacts> or even as a gem?
<manveru> serard: something.before my_var
<domgetter> zacts it would have to be the sort of thing that the virtual machine supports
lenwood has joined #ruby
<matthewd> my_var = "halt".to_sym
<serard> matthewd, thanks, manveru thank !
Macaveli_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<zacts> ah ok
d0nn1e has quit [Ping timeout: 248 seconds]
<domgetter> zacts technically you can have parallelism now in Ruby if you write a C extension. You'd just be operating outside of Ruby while the C code is running
<manveru> or you could use jruby or rubinius
<zacts> cool! I'll check out all this stuff. I'm thinking for professional code I would probably lean towards elixir for highly concurrent new code.
jmignault has quit [Ping timeout: 250 seconds]
<zacts> manveru: ah ok, yeah I might use jruby or something for existing Ruby code then.
<zacts> those were more ponderings / questions than statements
d0nn1e has joined #ruby
<zacts> so feel free to change my mind
<manveru> well, i love elixir :)
<manveru> but it's definitely very different from ruby
<zacts> domgetter: yeah, sounds sketchy for most applications
<domgetter> If we're loving other languages, I love Clojure
<manveru> i should try crystal this year
<zacts> yeah lispy languages are cool
tdy1 has joined #ruby
<zacts> I just love ruby syntax though
<c-c> I've been wooing Rust lately...
Macaveli has joined #ruby
<domgetter> Though Elixir and Crystal are probably more familiar in syntax to Ruby
<c-c> its so sexycal
<c-c> Ruby 4 will be written in Rust (I think)
<domgetter> c-c Yeah well Clojure is super sexpy
Madplatypus has joined #ruby
<domgetter> Is there a Rustbinius project?
<c-c> domgetter: I like lisps, too
tdy has quit [Ping timeout: 268 seconds]
<zacts> there is also LFE
<zacts> Lisp Flavored Erlang
<bougyman> c-c: no shit?
alexherbo2 has quit [Quit: WeeChat 1.6]
<c-c> bougyman: Ruby 4? Just what I see in the crystal ball
binaryplease has joined #ruby
<zacts> it's all about circles. concurrency is like a hippy dippy circle
<manveru> i think you can rip C from matz's cold dead hands ;)
<domgetter> If there were method literals, would Ruby be homoiconic?
<zacts> if we can understand the wisdom of circles, we will solve all concurrency issues
<zacts> sorry, just being silly
<zacts> anyway, I'll bbl
<zacts> thanks for the tips
<zacts> :-)
r3vDev has quit [Ping timeout: 260 seconds]
dasher00 has quit [Ping timeout: 246 seconds]
flying has joined #ruby
<domgetter> Anyone know of any work done to add object literals to Ruby?
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<c-c> manveru: Rust is like C with ruby syntax. Would be fun to hear what Matz thinks about rust.
Burgestrand has joined #ruby
Chair has joined #ruby
joonty has joined #ruby
Chair has quit [Remote host closed the connection]
Macaveli has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
manjaro-kde5- has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
blackbom1 has joined #ruby
aupadhye has quit [Ping timeout: 250 seconds]
Macaveli has joined #ruby
ishe_ua has joined #ruby
blackbombay has quit [Ping timeout: 268 seconds]
elaptics has joined #ruby
lenwood has quit [Ping timeout: 260 seconds]
jgnagy has joined #ruby
<agent_white> Would be fun to see what he says about Elixir. ErlangVM is pretty neat.
Macaveli has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
hutch34 has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
aidalgol has quit [Remote host closed the connection]
tjbiddle has joined #ruby
KnownSyntax has quit [Ping timeout: 250 seconds]
jgnagy has quit [Ping timeout: 260 seconds]
Azure|dc has joined #ruby
Azure has quit [Ping timeout: 248 seconds]
hutch34 has quit [Ping timeout: 250 seconds]
xall has quit [Ping timeout: 252 seconds]
astrobun_ has quit [Remote host closed the connection]
astrobun_ has joined #ruby
minimalism has quit [Ping timeout: 245 seconds]
ace05 has joined #ruby
aupadhye has joined #ruby
pandaant has joined #ruby
camilasan has quit [Remote host closed the connection]
gizmore has quit [Quit: KVIrc 4.9.2 Aria http://www.kvirc.net/]
camilasan has joined #ruby
ace05 has quit [Ping timeout: 252 seconds]
<c-c> Whats the syntax for spawn when I want to use a code block? (as with fork do ... end)
sogard has joined #ruby
manjaro-kde5- has quit [Ping timeout: 246 seconds]
<sogard> Hey there! Does anyone have some experience with the C Ruby API? I have a very simple issue that I cannot get around of.
astrobun_ has quit [Remote host closed the connection]
<sogard> The question is actually an issue with mruby, but I guess finding out how Ruby would solve this would help me figure it out.
astrobunny has joined #ruby
<matthewd> sogard: Just as in ruby, you need an ensure
gizmore has joined #ruby
<matthewd> sogard: Specifically, rb_ensure
tomphp has joined #ruby
astrobunny has quit [Ping timeout: 250 seconds]
minimalism has joined #ruby
KnownSyntax has joined #ruby
KnownSyntax has joined #ruby
KnownSyntax has quit [Changing host]
Beams has joined #ruby
<sogard> matthewd: Do you have any link?
<sogard> This needs to be done on the native side.
nettoweb has joined #ruby
<sogard> matthewd: How does it work? I see there's also protect, rescue and rescue exception.
teclator_ is now known as teclator
<matthewd> Maybe that's a bad example, because it calls rb_yield. Most of the time, it'll pass two static functions.
<matthewd> From the caller's perspective, it will invoke the first function (with the supplied argument), then when it returns or raises, it'll invoke the second function (with its supplied argument) before continuing
<dminuoso> sogard: It's probably the best resource on C extensions.
<matthewd> i.e., rb_rescue(a, b, c, d) == begin; a(b); ensure; c(d); end
<sogard> Thanks. :D
<sogard> Idk how I've managed to miss that.
<matthewd> state = nil; begin; body(data); rescue Exception => ex; state = ex; nil; end
<matthewd> So yeah, as you're embedding rather than extending, that may well be what you want
<dminuoso> sogard: Please check my link - it covers these things.
<dminuoso> sogard: (Most of mruby has ruby equivalents - this included)
johnmccabe has joined #ruby
<matthewd> Call protect, then return state ? Err(state) : Ok(result)
<gr33n7007h3> dminuoso: +1 on that link
gregf_ has joined #ruby
jmignault has joined #ruby
toretore has joined #ruby
xall has joined #ruby
gr33n7007h3 has quit [Quit: WeeChat 1.6]
aupadhye has quit [Ping timeout: 258 seconds]
hutch34 has joined #ruby
zacts has quit [Ping timeout: 256 seconds]
jmignault has quit [Ping timeout: 258 seconds]
manjaro-kde5- has joined #ruby
kent\n has quit [Quit: No Ping reply in 180 seconds.]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kent\n has joined #ruby
hutch34 has quit [Ping timeout: 258 seconds]
Macaveli has joined #ruby
Macaveli has quit [Client Quit]
savage has joined #ruby
c0mrad3 has joined #ruby
Macaveli has joined #ruby
gr33n7007h has joined #ruby
gr33n7007h is now known as al2o3-cr
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nowhere_man has joined #ruby
Macaveli has quit [Client Quit]
<al2o3-cr> għ
<al2o3-cr> l;'#
<c-c> al2o3-cr: focus on vim-window
<al2o3-cr> i spilt a bit of water on brand new keyboard :(
Macaveli has joined #ruby
<domgetter> :(
TvL2386 has joined #ruby
Silex^^ has joined #ruby
jgt has joined #ruby
blackbombay has joined #ruby
<domgetter> You should be able to safely unplug it and possibly take it apart and put it by a fan to dry off with no damage
<al2o3-cr> it was only a drop or so but i panicked
blackbom1 has quit [Ping timeout: 248 seconds]
Silex^^ is now known as Silex
<al2o3-cr> for the price of this laptop i don't want damage anything
<domgetter> Then I was sad for no reason
joast has quit [Ping timeout: 250 seconds]
Snowy has joined #ruby
<serard> With regex, how can I match and capture many times same pattern ?
jgt has quit [Ping timeout: 244 seconds]
Snowy has quit [Remote host closed the connection]
<serard> for example, dumb : "ssh-config-upsert rm ##machine## ##vars.host_ssh_file## ##vars.host_ssh_file##"
Snowy has joined #ruby
<serard> I want to capture-match all ##vars\..*##
tvw has quit []
<al2o3-cr> serard: String#scan
jgt has joined #ruby
<domgetter> also, the .* in ##vars\..*## will grab the ## along with everything else until the end of the line/string
banisterfiend has quit [Ping timeout: 260 seconds]
Beams has quit [Quit: .]
workmad3 has joined #ruby
<domgetter> so you probably want something more like ##vars\.[^#]*## which means "grab two hashtags, then vars dot, then zero or more things that arent hashtags, then 2 more hashtags"
<al2o3-cr> serard: str.scan /##.+?##/
<domgetter> I don't think serard wants to capture ##machine## but I could be wrong
<al2o3-cr> ah, right
<al2o3-cr> serard: str.scan /##vars.+?##/
jsrn_ has joined #ruby
KnownSyntax has quit [Ping timeout: 260 seconds]
konsolebox has joined #ruby
<serard> not ##machine##, only ##vars\..*## yes
<serard> thanks ! :)
<al2o3-cr> serard: str.scan /##(?=v).+?##/
<serard> it's what after vars. that is of interest
mvxlr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
konsolebox has quit [Max SendQ exceeded]
<serard> none works :(
Beams has joined #ruby
<domgetter> >> 'ssh-config-upsert rm ##machine## ##vars.host_ssh_file## ##vars.host_ssh_file##'.scan(/##vars.+?##/)
<ruby[bot]> domgetter: # => ["##vars.host_ssh_file##", "##vars.host_ssh_file##"] (https://eval.in/682688)
ace05 has joined #ruby
<domgetter> Is your real code different from your example?
zacts has joined #ruby
<serard> my bad, was putting the regex within ''
<c-c> Suppose I have a process #1 with module M with class A. I fork a process #2, and require a module M with class B. I assume the process #2 now has module M with classes A and B? And if I spawn process #3 and require module M with class C, #3 will only have classes A & C?
ace05 has quit [Ping timeout: 246 seconds]
<c-c> I looked with pry on #1 and it only has A. I can't figure out how to redirect io from the #1 running terminal to a pry in #2/#3 so I can't peek.
Illianthe has quit [Ping timeout: 258 seconds]
<domgetter> Are you spawning #3 from #1 only?
<toretore> c-c: yes
<c-c> domgetter: both spawned (forked) from #1
<domgetter> c-c You can always have code print to a log file
<c-c> heh, kind of futile question as I've read that forking copies memory and thats it but had to ask
xall has quit [Ping timeout: 244 seconds]
XV8 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<c-c> or maybe there are secret ruby snafu's...
tjbiddle has quit [Quit: tjbiddle]
ldnunes has joined #ruby
atmosx has joined #ruby
xall has joined #ruby
tjbiddle has joined #ruby
teclator has quit [Ping timeout: 244 seconds]
teclator has joined #ruby
CloCkWeRX has quit [Ping timeout: 250 seconds]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Definity has joined #ruby
<serard> I'm closer, but still have some questions : https://gist.github.com/anonymous/363cd68032c967d9f882d8336a9ade5e
jmignault has joined #ruby
yeticry has quit [Ping timeout: 246 seconds]
<serard> I tried this config.trigger[trigger.trigger] :momentum_sym, :vm [machine_config.name] do but I get errors
pandaant has quit [Remote host closed the connection]
yeticry has joined #ruby
tvw has joined #ruby
psycho_one has joined #ruby
<serard> I'm able to change my string to a symbol, but ruby doesnt like the way I use it :(
jmignault has quit [Ping timeout: 268 seconds]
<serard> I also tried :momentum_sym with momentum_sym, with momentum_sym = trigger.momentum.to_sym
<serard> syntax error, unexpected tIDENTIFIER, expecting keyword_end
<serard> ...r[trigger.trigger] momentum_sym, :vm [machine_config.name] d...
tjbiddle has quit [Quit: tjbiddle]
tylersmi- has quit [Quit: ZNC - http://znc.in]
jgt has quit [Ping timeout: 250 seconds]
<serard> using .send or .method maybe ?
mikecmpbll has joined #ruby
careta has joined #ruby
ocbtec has joined #ruby
<dminuoso> serard: Your question makes no sense.
teclator has quit [Ping timeout: 248 seconds]
<dminuoso> serard: But I think you are looking for this
teclator has joined #ruby
<dminuoso> &public_send
<serard> Sorry :o
<dminuoso> &ri public_send
<dminuoso> serard: ^_
<dminuoso> serard: just be sure to whitelist whatever you pass to send.
<serard> dminuoso, what I'm looking to achieve is to data-drive calls to this : https://github.com/emyl/vagrant-triggers/
Donalmartin[m] has joined #ruby
philidor[m] has joined #ruby
<dminuoso> serard: This may be a silly idea - but have you tried asking in the vagrant channel?
zeto[m] has joined #ruby
<serard> yes :(
coreyja[m] has joined #ruby
<serard> dminuoso, the method I call runs a do block
Michael5[m] has joined #ruby
koooge has quit [Quit: Leaving...]
<serard> does it makes sense to use public_send to get into a do block (sorry for the way I say it :o)
jmignault has joined #ruby
ramfjord has joined #ruby
teclator has quit [Ping timeout: 256 seconds]
teclator_ has joined #ruby
<serard> dminuoso, yes I will whitelist things once it works
Silthias has joined #ruby
ace05 has joined #ruby
ramfjord has quit [Ping timeout: 260 seconds]
spicerack has quit [Quit: Textual IRC Client: www.textualapp.com]
ace05 has quit [Ping timeout: 245 seconds]
terlar has quit [Ping timeout: 248 seconds]
al2o3-cr has quit [Quit: WeeChat 1.6]
gr33n7007h has joined #ruby
<serard> ok, got it
<serard> was calling public_send on the wrong thing..
sparch has joined #ruby
sparch has joined #ruby
sparch has quit [Changing host]
hightower2 has joined #ruby
fnord_ has quit [Ping timeout: 260 seconds]
gr33n7007h has quit [Client Quit]
dmtd has quit [Quit: Connection closed for inactivity]
jonjoe has joined #ruby
<jonjoe> hey guys whats the best way to view all outbound email traffic from my computer? Is this even doable from a script? Not really after a how-to more a point in the right direction as I have never really interfaced with my computer this directly
<jonjoe> Im not refering to a mail server more outbound port activity
<dminuoso> jonjoe: No it is not.
lel has quit [Ping timeout: 240 seconds]
<dminuoso> jonjoe: The closest interface you have is ruby-pcap
<dminuoso> jonjoe: But you get more than just email traffic.
<dminuoso> You get everything.
<domgetter> jonjoe what OS?
gr33n7007h has joined #ruby
ferr has joined #ruby
jcao219 has joined #ruby
<dminuoso> jonjoe: (Or pcaprub rather)
gr33n7007h has quit [Client Quit]
<jonjoe> Thats totally cool. Its an experiment for an email security company to help with their assistance software. Typically windows but could be OSX.
<c-c> jonjoe: possibly you could proxy all traffic from email port via a proxy
<jonjoe> Thought I would add context as i just realised my question looked shady as hell haha it is completely legit however.
<jonjoe> Thanks ill check those avenues out! appriciated <3
gr33n7007h has joined #ruby
mvxlr has joined #ruby
gr33n7007h has quit [Client Quit]
douglascorrea has joined #ruby
gregf_ has quit [Quit: Page closed]
Ultra_DuckZ has joined #ruby
gr33n7007h has joined #ruby
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #ruby
r3vDev has joined #ruby
<dminuoso> ^- and this is why I dont buy "email security appliances"
<Ultra_DuckZ> hi, anybody knows if the Rasem gem has a way to tell the width a given string will have in svg? or is there an equivalent gem that can do that? the reason is that I want to put labels under a chart, but the amount of labels depends on how many labels can fit
kobain has joined #ruby
<dminuoso> Ultra_DuckZ: What do you mean by "width" ?
augcesar has joined #ruby
<Ultra_DuckZ> dminuoso: pixel width, I need to do something like label_quantity = (svg_width / (average_string_width + padding))
<Ultra_DuckZ> dminuoso: what I want to achieve is something like the 12:00 labels in the top chart here http://bitcoinity.org/markets
zarubin has joined #ruby
<Ultra_DuckZ> dminuoso: they don't look like they belong to a particular bar in the chart to me, they look a bit "fuzzy"
GodFather has joined #ruby
gr33n7007h has quit [Quit: WeeChat 1.6]
<bougyman> anyone alive?
<bougyman> per_user_writes.rb:30:in `===': invalid byte sequence in US-ASCII (ArgumentError)
douglasc_ has joined #ruby
<bougyman> getting that in a case; when /\bTHING\b/
<bougyman> er case string; when /\bTHING\b/
<bougyman> is there something I can do somewhere to let it know that the string is UTF?
<bougyman> (ruby 2.1)
douglascorrea has quit [Ping timeout: 258 seconds]
<dminuoso> bougyman: How is the string generated?
<Ultra_DuckZ> maybe this will help me, in case anybody is interested http://stackoverflow.com/questions/378887/how-do-i-calculate-a-strings-width-in-ruby
<dminuoso> bougyman: Ideally the interface that generates the string should be encoding aware. File.read for example accepts encoding - as a last resort you can use force_encoding to reinterpret a strings codepoints with a different encoding.
<dminuoso> bougyman: But if at all possible you should fix this at the root.
sdelic has quit [Ping timeout: 245 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
teclator_ is now known as teclator
<jonjoe> @dminuoso lol, dont worry its only an experiment on my dev lappy for now. If anything comes of it ill be making damn sure its ethical and respectful. Thanks for pointing me in the right direction thats helped a ton. Have a great one!
spicerack has joined #ruby
mikecmpbll has joined #ruby
<domgetter> Ultra_DuckZ I don't think there's a way to know ahead-of-time how wide the rendered text will be in pixels
<domgetter> You'll have to code something in Javascript to deal with it in the client
vali has joined #ruby
<domgetter> Ultra_DuckZ is this eventually going to be rendered in a Browser?
spicerack has quit [Client Quit]
spicerack has joined #ruby
<bougyman> dminuoso: it's an unclean string.
<bougyman> call it user input
spicerack has quit [Client Quit]
<bougyman> reading a logfile
<bougyman> and i'm using File::Tail::Logfile
<bougyman> I don't know if it accepts that option
<dminuoso> bougyman: Go find out then.
<vali> hi guys
<bougyman> doing
jgt has joined #ruby
<dminuoso> If it takes me less than 15s to find the answer Im gonna slap you.
sampeter has joined #ruby
<bougyman> damn
<bougyman> the logfile is ASCII encoded.
sampeter has left #ruby ["Leaving"]
<vali> can anyone help me with some info on how to split a some json keys in distinct messages/key=value ones?
<dminuoso> bougyman: There you have your answer then.
<vali> this is the actual message that I want to split.
eggshke has quit []
<bougyman> so force_encoding is my only option
<dminuoso> bougyman: Yes.
<dminuoso> bougyman: It's actually fitting for this situation.
<bougyman> vali: wats wrong with using a json parser?
<bougyman> thanks, dminuoso
tau has joined #ruby
sameerynho has joined #ruby
<vali> bougyman, I don't know how to do it using anything.
jshjsh has joined #ruby
<vali> do you have some docs, links please?
<dminuoso> vali: Google.
<dminuoso> Do you want a link?
<ljarvis> &ri json
<_derpy> No results
<ljarvis> &ri JSON
<bougyman> that's what you want, right?
truenito has joined #ruby
gnufied has joined #ruby
<Ultra_DuckZ> domgetter: it's going to end up in a .svg, so whatever can open a .svg
<vali> bougyman, I want the type keys to be split in one key=value per message
<bougyman> vali: did you even look at the paste?
al2o3-cr has joined #ruby
<vali> bougyman, yes
the_drow has joined #ruby
<bougyman> it turns the json into a hash
<vali> I see the parsing
lxsameer has quit [Ping timeout: 244 seconds]
al2o3-cr has quit [Client Quit]
<ljarvis> vali: hash["attributes"]["type"].zip(hash["value"])
JoshS has quit [Ping timeout: 260 seconds]
al2o3-cr has joined #ruby
<atmosx> ljarvis that's ugly
<ljarvis> ok
_sfiguser has quit [Ping timeout: 246 seconds]
<ljarvis> vali: https://eval.in/682768
<ljarvis> apparently it's ugly, but that's probbaly what you want
truenito has quit [Ping timeout: 258 seconds]
<atmosx> true, true
<linduxed> hey guys, i'm wondering if there's some standard (maybe even simple) way to do certain function executions concurrently
<atmosx> linduxed threads?
<toretore> linduxed: no
<linduxed> an example would be to do something like `map (\x -> show $ x * x) [1..100]`
<linduxed> there's no need for that to only run on one core
<atmosx> ah..
<toretore> linduxed: you won't get parallel cpu time anyway
<toretore> unless you're on jruby
<linduxed> whooooooops
<linduxed> thought i was in the #haskell room
<linduxed> :-|
<linduxed> haha
<toretore> lol
<linduxed> too many channels open
<dminuoso> toretore: or on rubinius
<toretore> doesn't haskell have a form of csp?
<toretore> dminuoso: yeah, if i could ever figure out where it went
<dminuoso> linduxed: concurrently is easy, just use threads. in parallel is the problem
<linduxed> haskell has plenty of concurrencly models available as libraries and whatnot
<vali> this is want I want
gregf_ has joined #ruby
gingray has quit [Ping timeout: 256 seconds]
<vali> bougyman, this is the structure that I want
<linduxed> it's just that the selection of different models is what made me ask the question "is there a simple/standard/quick way to do it"
<ljarvis> vali: ok, well you can get that really easily now with the code I suggested
<ljarvis> you just have to make some tweaks
<vali> looking into it now
<domgetter> Ultra_DuckZ svg renderers are not guaranteed to render the same as one another. For example, in Firefox, you can't query an svg text element's textLength property
<dminuoso> linduxed: Today I learned a big mistake I've been doing for a long time. Concurrency is not the same thing as parallelism. MRI Ruby has concurrency but poor parallelism.
<dminuoso> If you think about those words for a while it actually makes sense. :P
truenito has joined #ruby
<toretore> the words themselves don't give much insight until you're been taught what they mean specifically in this context
<domgetter> Ultra_DuckZ and the bounding boxes can be different for the same code between Chrome and Firefox. So you won't be able to *precisely and exactly* know how big some text will be before it is rendered in a client
nankyokusei has joined #ruby
banisterfiend has joined #ruby
<domgetter> dminuoso concurrency is when two people share a pencil. parallelism is when there are two pencils
Silthias has quit [Ping timeout: 248 seconds]
<domgetter> Ultra_DuckZ in other words, the thing you want to do is only doable with client-side code (i.e. Javascript)
Puffball has quit [Remote host closed the connection]
emilkarl has joined #ruby
ace05 has joined #ruby
Illianthe has joined #ruby
<libastral> someone ever tried to execute "gem server" ? It is completely broken in browser. Browser can't find any css/js file. The rubygems package from my linux distro at least renders correct html in "gem server", but installed from "rbenv" gives a real mess, a stderr in a html markup, unclosed quotes, this really screws up everything
_sfiguser has joined #ruby
c0mrad3 has quit [Quit: Connection closed for inactivity]
XV8 has joined #ruby
Puffball has joined #ruby
charliesome has joined #ruby
<serard> Using Hash#deep_merge only merge existing keys from source; how to add new ones ?
nankyokusei has quit [Ping timeout: 240 seconds]
c355e3b has joined #ruby
<atmosx> libastral works for me (rvm)
<atmosx> chrome only complains about not finding a favicon which is a minor issue anyway
eggshke has joined #ruby
<libastral> atmosx: have you tried going to some gem docs in browser?
ace05 has quit [Ping timeout: 265 seconds]
<linduxed> dminuoso: yes, the two are definitely different!
nobitanobi has quit []
<libastral> * not all, for /js and /css
<matthewd> Does /usr/bin/gem really belong to rbenv? :/
xall has quit [Ping timeout: 268 seconds]
<matthewd> Omitting assets like that sounds a lot like something a distro package might choose to do
<libastral> matthewd: it is on purpose, i think system package should behave better
atmosx has quit [Quit: Textual IRC Client: www.textualapp.com]
<libastral> matthewd: rbenv rubygems is more broken, than system package
<elomatreb> libastral: No issues, Ruby installed with ruby-install
ropeney has joined #ruby
<dminuoso> libastral: I cant replicate the issue.
<dminuoso> But then again I also dont use rbenv.
Ishido has joined #ruby
sameerynho has quit [Quit: WeeChat 1.6]
<libastral> dminuoso: i bypassed rbenv in my gist example
<matthewd> I do use rbenv, but don't have any local docs generated
<libastral> ok, maybe js/css are available only on localhost. I run "gem server" with -b 0.0.0.0 on headless machine
<libastral> but it is sad
<libastral> matthewd: try gem rdoc --rdoc <gem>
<blackbombay> you could try yardoc instead, i think it's leap and bounds ahead of rdoc.
<dminuoso> libastral: I couldn't try that because OSX and firewalls.
<libastral> blackbombay: i'm using yard now, but gem server is much better, because it is out of the box
<matthewd> libastral: I don't care that much ;)
kitallis has joined #ruby
Silthias has joined #ruby
jonjoe has quit [Remote host closed the connection]
jonjoe has joined #ruby
jonjoe has quit [Remote host closed the connection]
jonjoe has joined #ruby
jonjoe has quit [Remote host closed the connection]
jonjoe has joined #ruby
jonjoe has quit [Remote host closed the connection]
jonjoe has joined #ruby
jonjoe has quit [Remote host closed the connection]
jonjoe has joined #ruby
nadir has joined #ruby
jonjoe has quit [Remote host closed the connection]
jonjoe has joined #ruby
jonjoe has quit [Remote host closed the connection]
jonjoe has joined #ruby
serard has quit [Ping timeout: 260 seconds]
xall has joined #ruby
jonjoe has quit [Ping timeout: 246 seconds]
vondruch has left #ruby [#ruby]
jaiks has quit [Remote host closed the connection]
jaiks has joined #ruby
anonymus has joined #ruby
pawnbox_ has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
johnmilton has joined #ruby
terlar has joined #ruby
claudiuinberlin has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
nowhere_man has quit [Ping timeout: 250 seconds]
<anonymus> hi
<anonymus> please have a look
<ruby[bot]> anonymus: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/b5a1b0c0ceb415baaa8e64114ed33b07
<ruby[bot]> anonymus: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
Definity has quit [Ping timeout: 260 seconds]
serard has joined #ruby
<anonymus> why cant I do that
<anonymus> Run_via_ssh.new('be1.local', 'yaa', 'MYPASS123456').run_cmd({ "RUNNING ON #{@hostname} for user #{@username}": ['echo $HOME']})
vondruch has joined #ruby
raul782 has joined #ruby
hutch34 has joined #ruby
<anonymus> why @hostname and @username are empty?
sepp2k has joined #ruby
allcentury has joined #ruby
claudiuinberlin has quit [Ping timeout: 250 seconds]
sami has joined #ruby
raul782 has quit [Remote host closed the connection]
jgt has quit [Ping timeout: 256 seconds]
synthroid has joined #ruby
tyang has joined #ruby
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xrlk has quit [Ping timeout: 256 seconds]
jaiks has quit [Remote host closed the connection]
josealobato has joined #ruby
jaiks has joined #ruby
sdothum has joined #ruby
xrlk has joined #ruby
gregf_ has quit [Ping timeout: 260 seconds]
<anonymus> could anybody have a look please?
<domgetter> anonymus what do you mean they are empty?
<anonymus> moment
<anonymus> RUNNING ON be1.local for user yaa: ["echo $HOME"]
<anonymus> should be like that
<anonymus> but I got
<anonymus> RUNNING ON for user : ["echo $HOME"]
chouhoulis has joined #ruby
<c-c> anonymus: "empty" where?
<anonymus> If I do
<domgetter> When it prints the step?
<anonymus> n = Run_via_ssh.new('be1.local') ; n.run_cmd({ "RUNNING ON #{n.hostname} for user #{n.username}": ['echo $HOME']})
<anonymus> it prints well
<anonymus> but if I do Run_via_ssh.new('be1.local', 'yaa', 'MYPASS123456').run_cmd({ "RUNNING ON #{@hostname} for user #{@username}": ['echo $HOME']})
<anonymus> at the bottom
<anonymus> of script
johnmilton has quit [Remote host closed the connection]
<anonymus> it gives me RUNNING ON for user : ["echo $HOME"]
<anonymus> string
<anonymus> with no @hostname and @user in it
serard has quit [Ping timeout: 268 seconds]
libastral has quit [Ping timeout: 240 seconds]
jgnagy has joined #ruby
<anonymus> which I pretend to be 'be1.local' and 'yaa'
libastral has joined #ruby
<c-c> anonymus: maybe you could try to print the values for those variables in different parts of your code with puts @username
nikivi has joined #ruby
<anonymus> http://pastebin.com/53CZnTdj here is new paste with it
<ruby[bot]> anonymus: as I told you already, please use https://gist.github.com
jgt has joined #ruby
careta has quit [Ping timeout: 260 seconds]
jaguarmagenta has quit [Remote host closed the connection]
griffindy has joined #ruby
jgnagy has quit [Ping timeout: 260 seconds]
Cohedrin has joined #ruby
joonty has quit [Quit: This computer has gone to sleep]
jonjoe has joined #ruby
<domgetter> anonymus if you add puts "username: #{@username}" on line 17 (between the begin and the ssh connection), does it display anything?
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<anonymus> moment
jgt has quit [Ping timeout: 250 seconds]
syngress has joined #ruby
Cohedrin has quit [Client Quit]
chouhoulis has quit [Remote host closed the connection]
<anonymus> nope
<anonymus> its clear
<anonymus> empty
<domgetter> now try adding puts "username: #{username}" on line 11 before the @ definitions
<domgetter> make sure it's "username: #{username}" and not "username: #{@username}"
<ruby[bot]> anonymus: as I told you already, please use https://gist.github.com
swills has quit [Read error: Connection reset by peer]
<domgetter> also, use gist, not pastebin
<domgetter> its super easy
swills has joined #ruby
ace05 has joined #ruby
xall has quit [Ping timeout: 250 seconds]
<domgetter> is that the result of putting it on line 11?
Jinxed- has joined #ruby
<Jinxed-> how would I put multiple statements into a ? setup e.g. b<y ? r="N";y-=1
<anonymus> sorry/ they fail
<anonymus> with both lines
<Jinxed-> I want both r="N" and y-=1 to be on the true side
<domgetter> Jinxed- use the `and` keyword
<anonymus> undefined local variable or method `username'
<domgetter> 2 < 3 ? r = 5 and n = 7 : x = 2
mvxlr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<domgetter> anonymus I think you spelled `username` wrong in your initialize method definition
<Jinxed-> domgetter, wouldn't using and convert it to a boolean expression?
<domgetter> Jinxed- no, `and` is for control flow, not logic
<domgetter> also, I forgot to say to put parens around it
<domgetter> 2 < 3 ? (r = 5 and n = 7) : x = 2
ace05 has quit [Ping timeout: 240 seconds]
johnmilton has joined #ruby
<kke> i have "Foo::Base" and "Foo::Cat < Foo::Base". now i'd like to create "Foo::LolCat < Foo::Cat" but that does not trigger self.inherited in Foo::Base. i'm fine with adding something to Foo::Cat to delegate the self.inherited to Foo::Base. ideas?
<Jinxed-> hmm domgetter any ways to shorten that? I'm learning ruby to improve my golf game
<domgetter> Jinxed- ahh well we can get rid of some whitespace, and you might get fewer characters with parallel definition
<kke> actually, can i do class Foo::LolCat < Foo::Cat; Foo::Base.inherited(Foo::LolCat); ... end
joonty has joined #ruby
<domgetter> Jinxed- for example 2<3 ? (n,r=3,4) : t=5
<kke> yes i can
<domgetter> Jinxed- feel free to remove whitespace until it breaks. looks like that particular example doesnt need any
Cohedrin has joined #ruby
<domgetter> >> 2<3?(n,r=3,4):t=5; r
<ruby[bot]> domgetter: # => 4 (https://eval.in/682830)
<anonymus> domgetter: correctly
<domgetter> anonymus can you copy over the line thst starts "def initialize"? just the one line
<anonymus> :wq
<domgetter> irc is not vim :)
serard has joined #ruby
frozengeek___ has quit [Remote host closed the connection]
<anonymus> def initialize(hostname, username=$conf['ssh_user_def'], password=$conf['ssh_pass_def'])
Burgestrand has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<anonymus> domgetter:
nikivi has quit [Ping timeout: 265 seconds]
jaguarmagenta has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eggshke has quit []
<kke> which is prefered, key? or has_key?
meinside has quit [Quit: Connection closed for inactivity]
<Jinxed-> domgetter, b<y ? (r="N", y-=1):
<Jinxed-> not working
terens has joined #ruby
<kke> looks like "key?". has_* are going to be deprecated.
<Jinxed-> sorry that line works... this doesn't: a<x ? (r+="W", x-=1):
r3vDev has quit [Ping timeout: 252 seconds]
UserJosh has joined #ruby
<kke> actually looks like the deprecation was rejected
nowhere_man has joined #ruby
nfk has joined #ruby
<domgetter> Jinxed- the comma variable definition only works with all vars on the left
jshjsh has quit [Ping timeout: 260 seconds]
<domgetter> Jinxed- so that trick won't work in this particular case where you need -= and +=
<Jinxed-> hmm in ruby can you add on to a string foo with foo+="X"
<al2o3-cr> Jinxed-: yep
<al2o3-cr> or <<
<Jinxed-> foo << "X"
<Jinxed-> ?
tvw has quit [Read error: Connection reset by peer]
<al2o3-cr> Jinxed-: yep
hightower3 has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
hightower2 has quit [Ping timeout: 265 seconds]
fmcgeough has joined #ruby
al2o3-cr has quit [Quit: WeeChat 1.6]
etehtsea has joined #ruby
<Jinxed-> b<y ? (r="N",y-=1):1;a<x ? (r<< "W" and x-=1):1
<Jinxed-> any idea how r could be turned to number 5
palms has joined #ruby
<Jinxed-> i'm confused as all hell
josealobato has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<domgetter> Jinxed- forget the comma thing, it wont work here
<chris2> r should be ["N",y-1]
<chris2> 18>> r=7,8,9
<domgetter> that only works for something like (x,y = 2,3). It doesnt work for two separate expressions like (x -= 3, y += 7)
<ruby[bot]> chris2: # => [7, 8, 9] (https://eval.in/682894)
<chris2> hm, never realized that works
<domgetter> Yeah it's Ruby destructuring makeshift arrays
yardenbar has joined #ruby
agent_white has quit [Quit: leaving]
<chris2> ; should work better there
<Cymew> Now for some realy basic question. If I have class definitions in a file, how do I instantiate those classes in another file? I only get "uninitialized constant", and 'require' that first file does not seem to work.
<Jinxed-> well I finished my ruby golf of this problem... but it is getting its ass kicked by my python implementation
hightower3 has quit [Ping timeout: 260 seconds]
<chris2> what's the problem?
<Jinxed-> it's a codingame problem... using it to experiment with other languages a bit... there are much better ruby solutions... I just don't know the language that well
<Jinxed-> I'm doing the Power of Thor
josealobato has joined #ruby
Burgestrand has joined #ruby
nikivi has joined #ruby
<Jinxed-> the top solutions are shorter than my line to input the variables
<Jinxed-> a,b,x,y = gets.split(" ").collect{|x| x.to_i}
jhack has joined #ruby
<domgetter> Jinxed- gets.split(" "
psychicist__ has joined #ruby
Jardayn has joined #ruby
<domgetter> Jinxed- gets.split(" ") returns an array of several elements, and the collect turns them into nubmers, and then each of the elements is set to each of the variable names
yuki_is_bored has joined #ruby
yardenbar has quit [Ping timeout: 244 seconds]
<domgetter> so like a,b,c,d = [1,2,3,4] would result in a being 1, b being 2, c being 3, and d being 4
dionysus69 has quit [Ping timeout: 252 seconds]
<chris2> ok
<Jinxed-> domgetter, that is what I'm using now or are you saying there is a shorter way to do it
bmurt has joined #ruby
<Cymew> Do the class name and the file have to have the same name? I thought as long as the 'require stated the correct name it would work...
joonty has quit [Quit: This computer has gone to sleep]
<Cymew> Doesn't seem to matter,
<chris2> unrelated, but convention
Definity has joined #ruby
<Cymew> Hmm
chouhoulis has joined #ruby
rfoust has joined #ruby
al2o3-cr has joined #ruby
<Ultra_DuckZ> domgetter: it's working for me so far, it doesn't need to be pixel-perfect either
frozengeek___ has joined #ruby
<Cymew> My google fu suck. Apparently there's a 'require_relative' that works. Is there a canonical place it searches for classes?
frozengeek__ has joined #ruby
nikivi has quit [Quit: irc]
<Ultra_DuckZ> domgetter: I'm generating a chart that I will put in some report, I could even convert it to png from inkscape or gimp to make sure it's always displayed the same afterwards
<Ultra_DuckZ> domgetter: besides there is no javascript or "client code" when you open a .svg, so I don't see any way to really be pixel-perfect, even if it was a requirement
<domgetter> Ultra_DuckZ I was referring to if you used the <svg> html element and rendered the svg in the browser
pawnbox_ has quit [Ping timeout: 265 seconds]
yardenbar has joined #ruby
<Jinxed-> got a shorter version: a,b,x,y=gets.split.map(&:to_i)
syngress has quit [Ping timeout: 245 seconds]
Asher has quit [Quit: Leaving.]
<domgetter> Jinxed- You can do 1 character better with a,b,x,y=gets.split.map &:to_i
Asher has joined #ruby
frozengeek___ has quit [Ping timeout: 260 seconds]
dionysus69 has joined #ruby
cdg has joined #ruby
ramortegui has joined #ruby
hutch34 has quit [Quit: WeeChat 1.5]
pawnbox has joined #ruby
cdg has quit [Read error: Connection reset by peer]
_sfiguser has quit [Ping timeout: 245 seconds]
cdg has joined #ruby
frozengeek___ has joined #ruby
<Jinxed-> whats the diff between puts and p
<domgetter> puts returns nil, p returns the printed object
<chris2> p uses .inspect
etehtsea has quit [Ping timeout: 245 seconds]
<domgetter> correction, p returns the printed string
GodFather has quit [Ping timeout: 260 seconds]
frozengeek__ has quit [Ping timeout: 246 seconds]
<domgetter> second correction, p returns something weird, since it returned a number for p 3
<chris2> seems to return the object
<chris2> 18>> p 3
<ruby[bot]> chris2: # => 3 ...check link for more (https://eval.in/682953)
<domgetter> chris2 I thought so, but I made a Dog class, and it returned the string I returned from inspect
nankyokusei has joined #ruby
<chris2> in 1.8 it was nil it seems
<domgetter> >> class Dog; def inspect; "dog"; end; end; dog = Dog.new; out = p dog; out
<ruby[bot]> domgetter: # => dog ...check link for more (https://eval.in/682957)
<chris2> ofc irb prints the .inspect of the object too
frozengeek__ has joined #ruby
ben_____ has joined #ruby
aegis3121 has joined #ruby
<Jinxed-> c,d=a<=>x,b<=>y
<domgetter> Jinxed- are you wondering what that does or just showing off? :P
anonymus has left #ruby ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"]
<Jinxed-> domgetter, wondering what it does
syngress has joined #ruby
<Jinxed-> I know <=> is 1,0,-1
<domgetter> the <=> is called the comparison operator
<Jinxed-> comparing
<chris2> it's called the spaceship operator!
ace05 has joined #ruby
frozengeek___ has quit [Ping timeout: 248 seconds]
<domgetter> a<=>x is 1,0, or -1, and so is b<=>y, so the expression can be thought of as c,d = 1, 0
<domgetter> c,d = 1,0 sets c to 1 and d to 0
<al2o3-cr> -1 <, 0 ==, 1 >
<domgetter> so c,d=a<=>x,b<=>y is equivalent to c = a <=> x; d = b <=> y
nankyokusei has quit [Ping timeout: 258 seconds]
<Jinxed-> ah makes sense
frozengeek__ has quit [Ping timeout: 252 seconds]
frozengeek__ has joined #ruby
gingray has joined #ruby
ace05 has quit [Ping timeout: 244 seconds]
serard has quit [Ping timeout: 268 seconds]
_sfiguser has joined #ruby
claudiuinberlin has joined #ruby
omphe has joined #ruby
<Jinxed-> thanks domgetter this is very helpful
yardenbar has quit [Ping timeout: 258 seconds]
<Macaveli> How to do substring -1 again in ruby to get the last char
<domgetter> Macaveli str[-1]
abshake has joined #ruby
<Macaveli> sthank
<abshake> hi
nettoweb has joined #ruby
<domgetter> ewelcom
igniting has quit [Ping timeout: 265 seconds]
<domgetter> Jinxed- (for the record, that transformation is not always equivalent. a,b = b,a will swap in-place, but is not the same as a = b; b = a)
nettoweb has quit [Read error: Connection reset by peer]
abshake has quit [Client Quit]
nettoweb has joined #ruby
salut has joined #ruby
frozengeek__ has quit [Read error: Connection reset by peer]
joonty has joined #ruby
<Jinxed-> makes sense
<salut> Hello !
joonty has quit [Client Quit]
<Jinxed-> chris2, did you try the Power of Thor problem
etehtsea has joined #ruby
<chris2> no
<chris2> do they want the shortest way or just any way?
Snowy has quit [Remote host closed the connection]
jhack has quit [Ping timeout: 250 seconds]
<salut> someone know how to set a callback in a module ? I’d like to make a callback wich is be triggered after each class instance variable assignment
Snowy has joined #ruby
DLSteve has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
<Jinxed-> chris2, the site has lots of different categories. The puzzle I'm working on is code golf (you can use any language you want). Shortst character count that passes the test cases wins
chouhoulis has quit [Remote host closed the connection]
<chris2> i mean the solution
<chris2> the output
chouhoulis has joined #ruby
<vali> ljarvis, are you still around ?
<Jinxed-> oh for Power of Thor specifically? You will need the shortest path I believe or else thor runs out of energy
<chris2> ok
<chris2> so its bresenham?
Burgestrand has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Jinxed-> golf is kind of an ugly game as some people abuse the validators a bit... like I was able to remove a few characters because the test cases don't need them
<Jinxed-> bresenham?
nfk has quit [Remote host closed the connection]
<Jinxed-> chris2, you can use whatever approach you want... the solution itself is quite easy
<Jinxed-> making it short in code is hard
<domgetter> making it short and correct*
mvxlr has joined #ruby
<Jinxed-> making it short and (pass the validators)*
Burgestrand has joined #ruby
<domgetter> touche
solocshaw has joined #ruby
mtkd has quit [Ping timeout: 260 seconds]
<Jinxed-> well I don't think I'm getting much shorter than this now
yqt has quit [Ping timeout: 258 seconds]
hutch34 has joined #ruby
<chris2> show it
<Jinxed-> it's crazy... the top solution is 43 characters
<Jinxed-> 45 in ruby
mtkd has joined #ruby
<Jinxed-> a,b,x,y=gets.split.map &:to_i;loop{c,d=a<=>x,b<=>y;puts (" SN"[d]+" EW"[c]).strip;y+=d}
<chris2> usually means you need a better algorithm :)
jhack has joined #ruby
<domgetter> You don't need the space after puts
<Jinxed-> doesn't work when I eliminate it
<chris2> it never terminates?
solocshaw has quit [Read error: Connection reset by peer]
<Jinxed-> no space causes an issue with strip
syngress has quit []
<domgetter> what??
frozengeek__ has joined #ruby
<domgetter> when is puts(thing) different from puts (thing) ?
<chris2> i see lots of optimization there :P
yardenbar has joined #ruby
croberts has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<Jinxed-> chris2, again not good coding practice but it if I get the solution I win so no need
<domgetter> ooooh
<Jinxed-> undefined method `strip' for nil:NilClass (NoMethodError)
crobe has joined #ruby
solocshaw has joined #ruby
<domgetter> right, you're taking advantage of calling string before the puts call
crobe is now known as croberts
<domgetter> strip before*
<Jinxed-> again... pretty crazy the top solutions are almost half of that
Madplatypus has quit [Quit: Connection closed for inactivity]
<Jinxed-> my solution is 87 characters
<al2o3-cr> Jinxed-: you got a link?
<chris2> a,b,x,y=gets.split.map &:to_i;loop{puts ("SN"[d=a<=>x]+" EW"[a<=>b]).strip;y+=d}
<chris2> would that work too?
<Jinxed-> no
<Jinxed-> guy went the wrong direction
<chris2> ah
<chris2> swapped c d
<chris2> a,b,x,y=gets.split.map &:to_i;loop{puts ("SN"[d=b<=>y]+" EW"[a<=>x]).strip;y+=d}
<Jinxed-> better but the guy never turns towards the target at level
<domgetter> you lost the space in " SN"
<chris2> oh
<chris2> would empty lines be ok btw?
<Jinxed-> no, output needs to be exact
<Jinxed-> with the extra space your line works
<chris2> didnt see the space in " SN"
<chris2> i wanted to do puts "\nEW"
<chris2> but it doesnt strip the initial \n then
s2013 has joined #ruby
<Jinxed-> yeah, kind of hacky way for when they are on the correct line vertically/horizontally
<Jinxed-> then strip removes it
omphe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Jinxed-> so I don't output anything (can't output anything but correct directions)
Snickers has quit [Ping timeout: 246 seconds]
jhack has quit [Ping timeout: 256 seconds]
jhack has joined #ruby
nettoweb has quit [Read error: Connection reset by peer]
Definity has quit [Ping timeout: 252 seconds]
`tim` has joined #ruby
s2013 has quit [Client Quit]
nettoweb has joined #ruby
<Jinxed-> clever changes chris2
<vali> Hi guys. I want to split some json data into multiple messages. Can anyone help me with this please? http://pastie.org/private/d9otsh4jtolofnf7biwzhg
omphe has joined #ruby
s2013 has joined #ruby
<vali> I've tried some parsing but I'm missing the bigger picture...
<canton7> the first line of the "split into" bit has invalid json in it
<domgetter> vali so you want to denormalize your data?
s2013 has quit [Client Quit]
<vali> domgetter, I want to end up from having one json message having 5 of them.
<domgetter> vali should all of them have a "host" keyword?
<chris2> a<=>x never changes, does it?
<vali> domgetter, yes
s2013 has joined #ruby
jhack has quit [Ping timeout: 245 seconds]
<vali> chris2, looks correct json too me.
saslam has joined #ruby
<vali> s/too/to/
<chris2> s/chris2/canton7/ ;)
terlar has quit [Quit: WeeChat 1.6]
xall has joined #ruby
<vali> sorry
<vali> :)
<vali> canton7,
abshake has joined #ruby
Snowy has quit [Remote host closed the connection]
Snowy has joined #ruby
abshake has quit [Client Quit]
<Macaveli> Is it possible to build a small table in ruby console?
sogard has quit [Ping timeout: 260 seconds]
<Macaveli> to do some checks?
minimalism has quit [Quit: minimalism]
etehtsea has quit [Ping timeout: 260 seconds]
blackbombay has quit [Ping timeout: 260 seconds]
<Macaveli> something like if variable exists in
<domgetter> vali zip will pair up the attributes with the values, and map will go over the paired up attr/vals and turn each one into the full hash you want
<domgetter> or rather, it will return a new array of the hashes
manjaro-kde5 has joined #ruby
frozengeek___ has joined #ruby
manjaro-kde5 has quit [Client Quit]
blackbombay has joined #ruby
rippa has joined #ruby
omphe has quit [Remote host closed the connection]
frozengeek__ has quit [Ping timeout: 250 seconds]
SeepingN has joined #ruby
kotk has joined #ruby
kotk has quit [Client Quit]
<vali> domgetter, thank you for the help. I'm trying to ap (awesome_print) the whole think. https://gist.github.com/valentinul/da56611e5b9fe66f4cb63ce5dd619f28
<vali> what am I doing wrong ?
raul782 has joined #ruby
<vali> the output structure doesn't look like I'm expecting it.
shinnya has joined #ruby
r3vDev has joined #ruby
<domgetter> My code doesn't modify the original json. You're printing out the original
<domgetter> you'll want to store the result of the map into a variable, and then ap that
<vali> ok
<domgetter> so like output = json[:attributes][:type].zip(json[:value]).map do |attr, val|
<domgetter> and then ap output
<domgetter> Also, I updated my code to clean it up a little bit
millerti has joined #ruby
<domgetter> and if you're using vim, `:set paste` will paste what you copied without adding new indentation
terens has quit [Remote host closed the connection]
terens has joined #ruby
Snowy has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
Snowy has joined #ruby
<arup_r> While using CSV::foreach, can I also get the current line number without using any extra local varible as a counter. I am reading like `CSV.foreach(Rails.root.join("test.csv") { |r| p r.class }`. But r is an Array. So not sure how to get the current line number.
abc2 has joined #ruby
<domgetter> Does that do what you're looking for?
<vali> domgetter, that looks pretty perfect
<vali> and to make that again into json ?
<domgetter> vali JSON.generate(output)
<abc2> Hey, if I have e.g. hash.find{ |k,v| v== something}, but I don't need 'k', is there a way to do this without initializing 'k' unnecessarily in each pass?
<domgetter> abc2: hash.find {|_, v| v == something }
<rapha> hi!
<arup_r> domgetter: yes thanks :) but never saw $. in the doc https://ruby-doc.org/stdlib-2.0.0/libdoc/csv/rdoc/CSV.html
<rapha> i have a script that uses gsub and used to do what i wanted in Ruby 1.8 days
<vali> domgetter, that looks perfect. I owe you a beer.
<rapha> now it does this: "with (266,2049,ٱلله,-,-), gsub search = ([أإآٱ]), replace = (ﺍ) results in (266,2049,ٱلله,-,-)"
<domgetter> arup_r Yeah it's one of the "cryptic" "perlish" dollar-sign vars
<vali> domgetter, thanks you once again for the help.
<domgetter> vali no prob
<rapha> did gsub change in any way or why is the replacement not working anymore?
<domgetter> rapha I wouldn't trust any behavior from pre-1.9 days :/
<arup_r> domgetter: should I use global var or with_index I am thinking. global variables are good to use? any suggestion
SuperLag has quit [Quit: Lost terminal]
jshjsh has joined #ruby
<rapha> domgetter: but gsub is _still_ greedy and does _still_ understand unicode, right?
frozengeek____ has joined #ruby
<domgetter> arup_r globals are generally considered unidiomatic (a soft no-no), but if you need to, you need to
Rodya_ has joined #ruby
<arup_r> ok thanks
SuperLag has joined #ruby
<matthewd> rapha: I'd guess an encoding issue
<domgetter> rapha ah, I'm not sure what it does with the individual bytes
ace05 has joined #ruby
<domgetter> rapha do you have a code example?
<matthewd> >> "266,2049,ٱلله,-,-".gsub(/[أإآٱ]/, "ﺍ")
<ruby[bot]> matthewd: # => "266,2049,ﺍلله,-,-" (https://eval.in/683035)
<rapha> domgetter: yes, what matthewd just did is my code :)
<rapha> why does it work here?!
UserJosh has quit [Ping timeout: 240 seconds]
<domgetter> rapha your terminal might be touchy on multi-byte character support if you're trying it in irb
d10n-work has joined #ruby
raul782 has quit []
ferr has quit [Quit: WeeChat 1.5]
<rapha> matthewd: all of the code and data is inside of one ruby file (for my debugging purposes anyways) so even if it was encoded wrong, it would be /consistently/ encoded wrong
frozengeek___ has quit [Ping timeout: 258 seconds]
<alexandernst> Is there a way I can compose a class from from a variable. For example, let's say I want to catch an exception that is inside Foo::Bar::MyException, but "Bar" is in a variable. Would that be something like Foo::@my_var::MyException?
<rapha> domgetter: not irb; i'm running "ruby script.rb"
<domgetter> also, that is running in ruby 2.3 what version of Ruby are you running?
<matthewd> rapha: Try copy & pasting the above line into irb?
jhack has joined #ruby
<abc2> domgetter, right, I thought of that, but in the end after testing it appears that using _ or any other var is exactly the same; it just relieves the person of having to think about the name of the unneeded var
<rapha> matthewd: it works as it should in both pry and irb. let me gist you the whole script, i must have a problem somewhere else.
<domgetter> abc2: Hash#find will return the key-value pair
ace05 has quit [Ping timeout: 250 seconds]
<domgetter> abc2: if you only care about the value, you could do h.values.find {|v| v == something}, but this would unneccesarily generate an intermediate array
careta has joined #ruby
chouhoulis has quit [Remote host closed the connection]
<abc2> domgetter, right
<matthewd> rapha: Isn't line 13 just wrong?
<domgetter> rapha what version of Ruby is it?
<rapha> ohnoooooooooooooooooes!!!! "'" instead of "/"
* rapha bangs head against wall
<rapha> matthewd: 100000000000000 thanks!!!
<matthewd> .. and no ], and an extra [, and the pair are the wrong way around
jhack has quit [Ping timeout: 260 seconds]
xall has quit [Ping timeout: 258 seconds]
<rapha> matthewd: that can be because of the left-to-right/right-to-left stuff not being displayed correctly. in vim it looks good,
aganov has quit [Quit: Leaving]
<rapha> (thank god vim doesn't implement support for RTL scripts)
<domgetter> rapha mine did when I copy-pasted your stuff. might be my terminal though
<matthewd> Oh, I see. Ugh :/
JeanCarloMachado has joined #ruby
<rapha> :]
<rapha> domgetter: perhaps there is support and i haven't enabled it. but that makes it easier to work with such data:wq
marr has joined #ruby
pawnbox has quit [Remote host closed the connection]
<rapha> oops, irc!=vim
jcao219 has quit [Ping timeout: 256 seconds]
hardest has quit [Ping timeout: 245 seconds]
Burgestrand has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<domgetter> rapha :help :x and :help ZZ
jhack has joined #ruby
<adaedra> Still waiting for tpope/vim-irc plugin.
andikr has quit [Remote host closed the connection]
<rapha> domgetter: oh cool, thank you!
* rapha loves learning new vim tricks
<rapha> ZZ is even one stroke less than :x
<c-c> Hm, how do I read with open, without waiting on read (ie. skip if nothing to read)?
<c-c> (named pipe)
jhack has quit [Ping timeout: 240 seconds]
Asher has quit [Quit: Leaving.]
Asher has joined #ruby
frmendes has joined #ruby
frozengeek____ has quit [Ping timeout: 260 seconds]
<domgetter> c-c sync
polishdub has joined #ruby
fnord_ has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
weaksauce has quit [Ping timeout: 258 seconds]
jbeeze has joined #ruby
frozengeek____ has joined #ruby
careta has quit [Ping timeout: 244 seconds]
jonjoe has quit [Remote host closed the connection]
<adaedra> &ri IO#read_nonblock
jonjoe has joined #ruby
* adaedra kicks the bot
jonjoe has quit [Remote host closed the connection]
<c-c> domgetter: hm, no, that doesn't seem to have any effect.. if you first make a named pipe in irb: system("/tmp/foonamedpipe"), then open it p = open("/tmp/foonamedpipe", "r+"); p.sync = true; p.read #just sits there; p.each { |l| puts l } #also just sits there ...
jonjoe has joined #ruby
jaguarmagenta has joined #ruby
<adaedra> sync is for write buffering.
<domgetter> ah nvm then
<c-c> - what I need is that "read" or whatever to continue immediately even if there is nothing to read
jonjoe has quit [Remote host closed the connection]
<adaedra> read_nonblock
<c-c> indeed
jonjoe has joined #ruby
chopin has joined #ruby
babblebre has joined #ruby
jonjoe has quit [Remote host closed the connection]
jonjoe has joined #ruby
igniting has joined #ruby
allcentury has quit [Ping timeout: 240 seconds]
jonjoe has quit [Remote host closed the connection]
<c-c> lol looks like I omitted "mkfifo" from that system call above ^
jonjoe has joined #ruby
jonjoe has quit [Remote host closed the connection]
jonjoe has joined #ruby
solocshaw has quit [Ping timeout: 258 seconds]
jonjoe has quit [Remote host closed the connection]
jonjoe has joined #ruby
jonjoe has quit [Remote host closed the connection]
jaguarmagenta has quit [Ping timeout: 250 seconds]
jonjoe has joined #ruby
jonjoe has quit [Remote host closed the connection]
<adaedra> !fixconn jonjoe
<adaedra> !fixcon jonjoe
DynamicFail has joined #ruby
endorphine_ has joined #ruby
aegis3121 has quit [Ping timeout: 268 seconds]
domgetter has quit [Ping timeout: 265 seconds]
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
xrlk has quit [Ping timeout: 248 seconds]
aegis3121 has joined #ruby
vuoto has joined #ruby
<c-c> adaedra: so, I wonder if read_nonblock is used by having a try-rescue block?
Jinxed- has quit [Ping timeout: 260 seconds]
jhack has joined #ruby
vuoto has quit [Remote host closed the connection]
<c-c> I get EAGAINWaitReadable errors
josealobato has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
frozengeek____ has quit [Ping timeout: 268 seconds]
vuoto has joined #ruby
TvL2386 has quit [Quit: Ex-Chat]
<adaedra> Well, that corresponds to read(2) behavior
<adaedra> Why are you doing non-blocking read? There maybe another solution.
xrlk has joined #ruby
Jardayn has quit [Ping timeout: 265 seconds]
conta has quit [Ping timeout: 246 seconds]
frozengeek____ has joined #ruby
<c-c> adaedra: I have two processesses. The UI process sometimes sends commands to the engine process. The engine process has main loop that does stuff, and reads the pipe from UI to see if commands for state change sent.
Guest69 has joined #ruby
railswebdev has joined #ruby
<adaedra> That does not sounds incompatible with blocking reading I/O
chopin has quit [Read error: Connection reset by peer]
<c-c> I may be wrong but in the main loop, doing pipe_from_ui.read causes it to wait until theres something to read
jhack has quit [Client Quit]
terens has quit [Ping timeout: 250 seconds]
chopin has joined #ruby
<adaedra> Well yes – do you want to do something in case no data is available from the emitter process?
<c-c> or, maybe something else is wrong here
<c-c> I want the main loop to continue
<c-c> its a game engine -type main loop
Definity has joined #ruby
synthroid has quit [Remote host closed the connection]
Snickers has joined #ruby
GinoManWrx has joined #ruby
xall has joined #ruby
wugy has quit [Read error: Connection reset by peer]
jhack has joined #ruby
<adaedra> You could try something with IO.select
<adaedra> If read_nonblock raising is a concern
<c-c> I don't get the ri: why would I "emulate blocking" read if I want a non-blocking read
<adaedra> the example is not the best
<adaedra> Just do a simple select with a timeout 0
GinoMan2440Wrx has quit [Ping timeout: 268 seconds]
jhack has quit [Quit: jhack]
jgnagy has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rodya_ has quit [Remote host closed the connection]
nankyokusei has joined #ruby
pawnbox has joined #ruby
allcentury has joined #ruby
dan_ has joined #ruby
dan_ is now known as Guest73097
<Guest73097> quick question gentlement, a = [1,2,3,4]... how would i manipulate a to return just [1,2,4]
`tim` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Guest73097> what do you think guys
<c-c> Guest73097: try $ ri Array
binaryplease has quit [Ping timeout: 260 seconds]
<Guest73097> what? sorry i dont understand
jhack has joined #ruby
arup_r has quit []
<c-c> Guest73097: ri is command line documentation for ruby, run from termina
<matthewd> Guest73097: I think you'll need to provide a slightly better explanation of what you want to do
<Guest73097> oh wow cool
ace05 has joined #ruby
<c-c> Guest73097: try opening the terminal and type 'ri' and hit <tab> couple of times
nankyokusei has quit [Ping timeout: 245 seconds]
<Guest73097> matthewd, i have an array which will always have four elements, i want to return the first, second, and fourth element always
GinoManWrx has quit [Read error: Connection reset by peer]
GinoManWrx has joined #ruby
<Guest73097> i know various ways to do this, like a.delete(3); a;
<Guest73097> or [a[0], a[1], a[3]
jhn has joined #ruby
`tim` has joined #ruby
<Guest73097> but neither is very elegant
nettoweb has joined #ruby
<Guest73097> okay guess ill just search online its a pretty hard question i figured you guys would know but maybe not
<matthewd> I think `a.delete_at(2); a` is as elegant as you're going to get
Guest73097 has quit [Quit: Leaving]
benlieb has joined #ruby
Lord_of_Life has quit [Excess Flood]
ace05 has quit [Ping timeout: 258 seconds]
aufi has quit [Ping timeout: 258 seconds]
frozengeek____ has quit [Ping timeout: 268 seconds]
ircuser0815 has joined #ruby
terens has joined #ruby
Lord_of_Life has joined #ruby
brent__ has joined #ruby
<c-c> looks like I forgot to flush
<c-c> seems its is a must for this application before the message hits the named pipe
<c-c> or, perhaps pry or something is blocking somehow
<c-c> now sysread, read, gets work
emilkarl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<adaedra> Now this is where sync could help you.
nikivi has joined #ruby
<c-c> 8)
<c-c> well, I can't figure out why the execution of 3 processes stops completely on one .write or .puts to a named pipe (string lenght under 20 chars). I better go rest
Littlemyu_ has quit [Read error: Connection reset by peer]
flyingX has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
last_staff has quit [Quit: last_staff]
terens has quit [Ping timeout: 260 seconds]
synthroid has joined #ruby
minimalism has joined #ruby
flying has quit [Ping timeout: 244 seconds]
mvxlr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bturker_ has joined #ruby
amclain has joined #ruby
allcentury has quit [Quit: WeeChat 1.2]
serard has joined #ruby
JoshS has joined #ruby
harai has joined #ruby
jshjsh has quit [Ping timeout: 260 seconds]
serard has quit [Ping timeout: 268 seconds]
ishe_ua has quit [Remote host closed the connection]
r3vDev has quit [Ping timeout: 244 seconds]
eljimmy has joined #ruby
harai has quit [Ping timeout: 245 seconds]
marr has quit [Ping timeout: 252 seconds]
nikivi has quit [Quit: irc]
jsrn_ has quit [Read error: Connection reset by peer]
Salih has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
atmosx has joined #ruby
govg has joined #ruby
SCHAAP137 has joined #ruby
kbdkode has quit [Quit: * ~ see ya ~ *]
`tim` has quit [Quit: Textual IRC Client: www.textualapp.com]
endorphine_ has quit [Quit: endorphine_]
endorphine_ has joined #ruby
tomphp has quit [Ping timeout: 252 seconds]
mati_urunda has joined #ruby
Snowy has quit [Remote host closed the connection]
aegis3121 has quit [Ping timeout: 260 seconds]
Snowy has joined #ruby
ramfjord has joined #ruby
joast has joined #ruby
endorphine_ has quit [Ping timeout: 250 seconds]
sparch has quit [Ping timeout: 250 seconds]
jhack has quit [Quit: jhack]
Snowy has quit [Ping timeout: 256 seconds]
chouhoulis has joined #ruby
stan has quit [Read error: Connection reset by peer]
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
phaza has quit []
SegFaultAX has joined #ruby
harai has joined #ruby
chouhoulis has quit [Remote host closed the connection]
manjaro-kde5- has quit [Ping timeout: 250 seconds]
kriskropd has quit [Quit: WeeChat 0.4.2]
kriskropd has joined #ruby
manjaro-kde5- has joined #ruby
l33n has quit [Quit: Leaving]
jshjsh has joined #ruby
railssmi_ has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
araujo has quit [Ping timeout: 256 seconds]
railssmith has quit [Ping timeout: 244 seconds]
claudiuinberlin has quit []
Beams has quit [Quit: .]
Rodya_ has joined #ruby
fullofcaffeine has joined #ruby
railssmi_ has quit [Client Quit]
JoshS has quit [Ping timeout: 268 seconds]
flyingX has quit []
pragmaticus has joined #ruby
mustmodify has joined #ruby
mustmodify has left #ruby [#ruby]
jhooker has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
aufi has joined #ruby
fullofcaffeine has joined #ruby
dasher00 has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
troulouliou_div2 has quit [Remote host closed the connection]
raldu has quit [Ping timeout: 248 seconds]
skweek has joined #ruby
raldu has joined #ruby
dionysus69 has joined #ruby
dasher00 has quit [Ping timeout: 260 seconds]
elifoster has joined #ruby
terens has joined #ruby
manjaro-kde5- has quit [Ping timeout: 250 seconds]
ldnunes has quit [Read error: Connection reset by peer]
setient has quit [Remote host closed the connection]
ldnunes has joined #ruby
nettoweb has joined #ruby
endorphine_ has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
jaguarmagenta has joined #ruby
elifoster has quit [Ping timeout: 260 seconds]
frozengeek____ has joined #ruby
railssmith has joined #ruby
dasher00 has joined #ruby
jaguarmagenta has quit [Ping timeout: 246 seconds]
Humdai has quit [Quit: Leaving]
elifoster has joined #ruby
marxarelli|afk is now known as marxarelli
railssmith has quit [Ping timeout: 265 seconds]
marxarelli has quit [Quit: Textual IRC Client: www.textualapp.com]
Lord_of_Life has quit [Ping timeout: 240 seconds]
tercenya has quit [Remote host closed the connection]
Joufflu has joined #ruby
tercenya has joined #ruby
genpaku has quit [Ping timeout: 248 seconds]
Macrobiotic has joined #ruby
pawnbox has quit [Remote host closed the connection]
genpaku has joined #ruby
mvxlr has joined #ruby
vuoto has quit [Remote host closed the connection]
vuoto has joined #ruby
rcvalle has joined #ruby
swills has quit [Read error: Connection reset by peer]
swills has joined #ruby
Lord_of_Life has joined #ruby
Macaveli has joined #ruby
whathappens has joined #ruby
Livecodingtv_Ale has joined #ruby
railswebdev has quit [Ping timeout: 250 seconds]
Guest69 has quit [Ping timeout: 250 seconds]
mark_66 has quit [Remote host closed the connection]
blackbombay has quit [Ping timeout: 265 seconds]
whathappens has quit [Read error: Connection reset by peer]
whathappens has joined #ruby
claudiuinberlin has joined #ruby
johnmilton has quit [Quit: Namaste]
nankyokusei has joined #ruby
vuoto has quit [Quit: Lost terminal]
blackbombay has joined #ruby
sdothum has quit [Ping timeout: 268 seconds]
sdothum has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
ace05 has joined #ruby
vuoto has joined #ruby
akkad has joined #ruby
DynamicFail has quit [Quit: Leaving]
centrx has joined #ruby
ur5us has joined #ruby
ace05 has quit [Ping timeout: 268 seconds]
chouhoulis has joined #ruby
vuoto has quit [Remote host closed the connection]
frozengeek____ has quit [Read error: Connection reset by peer]
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
frozengeek____ has joined #ruby
vuoto has joined #ruby
jhack has joined #ruby
dviola has joined #ruby
whathappens has quit [Read error: Connection reset by peer]
whathappens has joined #ruby
nicokavts has joined #ruby
SeepingN has joined #ruby
nicokavts has left #ruby [#ruby]
nicokavts has joined #ruby
douglasc_ has quit [Remote host closed the connection]
NeverTired has quit [Quit: Connection closed for inactivity]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
handicraftsman has joined #ruby
handicraftsman has joined #ruby
handicraftsman has quit [Changing host]
handicraftsman has quit [Remote host closed the connection]
jhack has quit [Ping timeout: 260 seconds]
claudiuinberlin has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
claudiuinberlin has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
swills has quit [Read error: Connection reset by peer]
jcao219 has joined #ruby
Cohedrin has joined #ruby
swills has joined #ruby
ramfjord has quit [Ping timeout: 245 seconds]
manjaro-kde5- has joined #ruby
douglascorrea has joined #ruby
jhack has joined #ruby
jhn has quit [Quit: Textual IRC Client: www.textualapp.com]
endorphine_ has quit [Quit: endorphine_]
elaptics has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
railssmith has joined #ruby
kirun has joined #ruby
kriskropd has quit [Quit: WeeChat 0.4.2]
kriskropd has joined #ruby
terlar has joined #ruby
iamse7en has joined #ruby
Sonicblaze has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<iamse7en> Quick question for anyone who has a second https://gist.github.com/anonymous/b3ac5ba82a709c98474c604139710550
<xrlk> agreed
TPug has joined #ruby
dunpeal has joined #ruby
manjaro-kde5- has quit [Ping timeout: 246 seconds]
<dunpeal> Hi. I have a call like this: `foo(bar: 1, qux: 2)`. How do I elegantly condition the provision of `bar` on some predicate?
<dunpeal> For example, if the `provide_bar` variable is false, the call should be made without a bar argument.
weaksauce has joined #ruby
<jhass> iamse7en: either make the outer array a hash and move the id value into its keys or write a small wrapper class that has a nicer API around it
<dminuoso> opts = { qux: 2 }; opts[:bar] = 1 if predicate; meth(opts);
<dunpeal> dminuoso: thanks.
jmignault has quit [Remote host closed the connection]
* dminuoso pokes jhass
<dminuoso> Haven't seen you in a while
<jhass> yeah
johnmilton has joined #ruby
mBailey_j has quit [Ping timeout: 256 seconds]
jcao219 has quit [Ping timeout: 246 seconds]
terlar has quit [Ping timeout: 246 seconds]
<iamse7en> jhass: thank you. do I arr.map {|game| Hash[id, values] } ?
<jhass> no, more like .each_with_object({}) {|values, games| games[id] = values }, but only if you can't change how it's initially constructed in the first place
<iamse7en> ok great, yes i do. thank you
<baweaver> to_h is a thing
Fernando-Basso has quit [Quit: WeeChat 1.5]
<jhass> too bad it requires all that intermediate arrays
<iamse7en> right
<baweaver> Does it now? Huh.
<baweaver> that's unfortunate.
<jhass> it always did?
Joufflu has quit [Quit: Leaving]
<jhass> it's the inverse of Hash#to_a
unknowns2k2 has joined #ruby
VeryBewitching has joined #ruby
Joufflu has joined #ruby
<Joufflu> sup
<baweaver> (Does it now being an oddly phrased question, instead of an inference that it did not at one time do that.)
chrisja has joined #ruby
terlar has joined #ruby
handicraftsman has joined #ruby
terlar has quit [Client Quit]
Rodya_ has quit [Remote host closed the connection]
terlar has joined #ruby
cdg_ has joined #ruby
bocaneri has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 256 seconds]
frozengeek____ has quit [Quit: frozengeek____]
cdg has quit [Ping timeout: 245 seconds]
Fernando-Basso has joined #ruby
Definity has quit [Ping timeout: 265 seconds]
<Joufflu> does ruby have something similar to the console in browsers for javascript ?
muelleme has joined #ruby
<baweaver> irb
whathappens has quit [Read error: Connection reset by peer]
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hutch34 has quit [Ping timeout: 246 seconds]
whathappens has joined #ruby
<havenwood> ?irb
<ruby[bot]> irb is "interactive ruby", it is part of ruby. You can run ruby code and see results immediately. it's useful for testing code. Also see ?pry, a gem which is a popular alternative to irb.
mvxlr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> ?pry
<ruby[bot]> Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
shinnya has quit [Ping timeout: 260 seconds]
GodFather has joined #ruby
sparch has joined #ruby
terlar has quit [Quit: WeeChat 1.6]
terlar has joined #ruby
ace05 has joined #ruby
johnmilton has quit [Remote host closed the connection]
theRoUS is now known as theRoUS|afk
UserJosh has joined #ruby
ace05 has quit [Ping timeout: 245 seconds]
Dimik has joined #ruby
ramfjord has joined #ruby
jshjsh has quit [Ping timeout: 260 seconds]
terlar has quit [Quit: WeeChat 1.6]
bturker_ has quit [Ping timeout: 256 seconds]
xall has quit [Ping timeout: 260 seconds]
somiaj has joined #ruby
UserJosh has quit [Quit: Leaving]
hutch34 has joined #ruby
askhader has quit [Ping timeout: 250 seconds]
<somiaj> Hello, I'm looking to build a lexer for rouge, https://github.com/jneen/rouge. I have one written in pygments (python) and have looked at the lexers and see they are similar in design, so my question is more on how to actually include it in my system installed version of rogue, yet as a local file.
<somiaj> In python I was able to use its setuptools to install my local lexer and integrate it with pygments in such a way when I made local changes, my system installed version saw it. I'm trying to see how to achive something similar in ruby
<handicraftsman> O M G https://github.com/grubby/grubby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<dminuoso> handicraftsman: Wow.
nikivi has joined #ruby
hutch34 has quit [Ping timeout: 260 seconds]
<jhass> haha
unknowns2k2 is now known as antoniobeyah
mvxlr has joined #ruby
<jhass> somiaj: your best bet really is to sidestep your system version and just run ruby -I/path/to/rogue/lib /path/to/rogue/bin/rogue
antoniobeyah has quit [Changing host]
antoniobeyah has joined #ruby
<tobiasvl> hmm, golang is a modern C, eh
<dminuoso> tobiasvl: Yes. Just like Ruby is a modern Smalltalk.
<jhass> somiaj: or actually the bin/rougify in the repo is "smart" and you can just call it
<somiaj> jhass: so that will just copy the file over to my system location? Does it do anything else? I notice the lexer also contains a .spec file? How would I remove it from my system in a clean way?
<jhass> no, it would just run your local, non-system copy of rogue
claudiuinberlin has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
<jhass> so clone the repo, make your changes, run the bin from the repo
brianpWins has joined #ruby
terlar has joined #ruby
<somiaj> jhass: the version I have here is on debian 2.0.2. Yea I thought about having a local install, though I was trying to avoid that approach.
<handicraftsman> Is there any fast non-java implementations of ruby?
<dminuoso> handicraftsman: Rubinius is faster at some select few things.
<dminuoso> handicraftsman: But no.
<somiaj> jhass: thanks. I'll invesigate some more.
<handicraftsman> @dminuoso, heh. (don't like jvm, because it takes more RAM and some time to start)
gusrub has joined #ruby
<jhass> if you run rogue programatically there's probably some way to register your own lexer prior
<dminuoso> handicraftsman: Actually well there is. Topaz is pretty fast.
ace05 has joined #ruby
<dminuoso> But I have no clue what state Topaz is in right now.
<handicraftsman> @dmarr, searching for it
<dminuoso> handicraftsman: The holy grail of performance is jruby with truffle/graal though.
<jhass> or maybe it's even enough to just make sure it's loaded
<jhass> so ruby -r/path/to/your/lexer /usr/bin/roguify I guess
<dminuoso> handicraftsman: If you can bear the heavy warmup of GraalVM. ;-)
<handicraftsman> dminuoso, :D
<dminuoso> handicraftsman: Have you seen these benchmark reports? http://jruby.org/bench9000/
jaguarmagenta has joined #ruby
claudiuinberlin has quit [Remote host closed the connection]
rrichard_ has joined #ruby
<handicraftsman> @dminuoso, OMG - browser does not render it's next frame
<handicraftsman> LEL
terlar has quit [Quit: WeeChat 1.6]
<dminuoso> handicraftsman: It takes a few seconds to load.
claudiuinberlin has joined #ruby
truenito has quit [Remote host closed the connection]
<handicraftsman> For me - 30 seconds
xall has joined #ruby
<dminuoso> Maybe you should reload the page. ;)
Rodya_ has joined #ruby
JeanCarloMachado has quit [Ping timeout: 248 seconds]
svankmajer has joined #ruby
claudiuinberlin has quit [Remote host closed the connection]
<chrisseaton> dminuoso: I don't think Rubinius is faster at anything unfortunately - since they deleted their JIT eight months ago with a plan to rewrite it in a week. With the JIT they were faster at some things.
<chrisseaton> dminuoso: I think Topaz is pretty firmly abandoned now, also unfortunately
jaguarmagenta has quit [Ping timeout: 260 seconds]
<dminuoso> chrisseaton: That's a real shame to hear both.
hutch34 has joined #ruby
chouhoul_ has joined #ruby
TomyWork has quit [Ping timeout: 256 seconds]
tpendragon has quit [Ping timeout: 240 seconds]
blackjid has quit [Ping timeout: 240 seconds]
chouhoulis has quit [Ping timeout: 244 seconds]
hutch34 has quit [Ping timeout: 245 seconds]
daveyboi[m] has joined #ruby
NeverTired has joined #ruby
zeroDi has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
xall has quit [Ping timeout: 248 seconds]
<handicraftsman> Trying to understand how to install graal
skweek has quit [Ping timeout: 256 seconds]
sparch has quit [Quit: bejomimliga]
ldnunes has quit [Quit: Leaving]
griffindy has joined #ruby
<mistym> chrisseaton: Is there a good blog post or something on what's happened/happening with the Rubinius JIT?
machinewar has joined #ruby
fullofcaffeine has quit [Ping timeout: 268 seconds]
ace05 has quit [Remote host closed the connection]
ace05 has joined #ruby
<chrisseaton> mistym: they have a Gitter room - I think that's the best place to ask
machinewar has left #ruby [#ruby]
vuoto has quit [Quit: Lost terminal]
hutch34 has joined #ruby
vuoto has joined #ruby
ocbtec has quit [Quit: leaving]
<chrisseaton> mistym: I know they're planning a new one, but not sure if there's any code yet
<chrisseaton> writing a JIT for Ruby isn't a trivial piece of work
Fetch has quit [Remote host closed the connection]
cdg_ has quit [Remote host closed the connection]
cdg has joined #ruby
<centrx> sounds like a challenge
codfection has quit [Remote host closed the connection]
hutch34 has quit [Ping timeout: 240 seconds]
cdg has quit [Remote host closed the connection]
symm- has joined #ruby
GBrawl has joined #ruby
vuoto has quit [Remote host closed the connection]
vuoto has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
manjaro-kde5- has joined #ruby
saslam has quit [Ping timeout: 248 seconds]
jhack has quit [Quit: jhack]
<tau> is it good practice to use () when calling class methods?
<tau> like x = class.method()
<tau> ?
zeroDi has quit [Quit: WeeChat 1.6]
<jhass> nope
SCHAAP137 has quit [Quit: Leaving]
<dminuoso> tau: Depends on who you ask. I've been pondering about going back to braces.
<tau> i see.
<jhass> eh, well either do it for any kind of method call or not
<dminuoso> ^- that.
<tau> i guess so.
maloik has quit [Remote host closed the connection]
<tau> ruby is cool.
maloik has joined #ruby
<tau> i have been enjoying it.
yardenbar has quit [Ping timeout: 260 seconds]
GBrawl has quit [Quit: (null)]
jhack has joined #ruby
claudiuinberlin has joined #ruby
hutch34 has joined #ruby
terlar has joined #ruby
<centrx> True
xall has joined #ruby
hutch34 has quit [Ping timeout: 250 seconds]
railssmith has quit [Ping timeout: 245 seconds]
xall has quit [Ping timeout: 260 seconds]
Lucky_ABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fullofcaffeine has joined #ruby
mvxlr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
silky__ has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tyang_ has joined #ruby
mvxlr has joined #ruby
nowhere_man has quit [Ping timeout: 256 seconds]
xall has joined #ruby
lenwood has joined #ruby
malcolmva has quit [Ping timeout: 240 seconds]
douglascorrea has quit [Remote host closed the connection]
douglascorrea has joined #ruby
yardenbar has joined #ruby
mvxlr has quit [Client Quit]
tyang has quit [Ping timeout: 244 seconds]
centrx has quit []
frmendes has quit [Quit: Textual IRC Client: www.textualapp.com]
vuoto has quit [Remote host closed the connection]
tyang_ has quit [Ping timeout: 244 seconds]
_sfiguser has quit [Ping timeout: 250 seconds]
manjaro-kde5- has quit [Ping timeout: 260 seconds]
hutch34 has joined #ruby
douglascorrea has quit [Ping timeout: 258 seconds]
[Butch] has joined #ruby
Salih has quit [Quit: Leaving]
nettoweb has joined #ruby
elifoster has quit [Quit: class]
phal has joined #ruby
<phal> Anybody know any good graphing gems that can export as svg?
synthroid has quit []
rrichard_ has quit [Quit: Apparantly my attempt to stay awake has failed...]
jackjackdripper has joined #ruby
jolamb has quit [Quit: ZNC - http://znc.in]
dionysus69 has quit [Ping timeout: 240 seconds]
hutch34 has quit [Ping timeout: 250 seconds]
vuoto has joined #ruby
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
jolamb has joined #ruby
vuoto has quit [Remote host closed the connection]
svankmajer has quit [Ping timeout: 260 seconds]
jackjackdripper has quit [Client Quit]
last_staff has joined #ruby
millerti has joined #ruby
terlar has quit [Ping timeout: 256 seconds]
cdg has joined #ruby
jackjackdripper has joined #ruby
_sfiguser has joined #ruby
claudiuinberlin has quit []
cdg has quit [Remote host closed the connection]
cdg_ has joined #ruby
JoshS has joined #ruby
mtkd has quit [Ping timeout: 245 seconds]
mtkd has joined #ruby
nfk has joined #ruby
Lucky_ABA has joined #ruby
dionysus69 has joined #ruby
blackwind_123 has joined #ruby
tomphp has joined #ruby
savage has quit [Quit: Connection closed for inactivity]
VeryBewitching has quit [Quit: Konversation terminated!]
doublemalt__ has joined #ruby
benlieb has quit [Quit: benlieb]
jshjsh has joined #ruby
handicraftsman has quit [Quit: Leaving]
XV8 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gizmore|2 has joined #ruby
gizmore has quit [Ping timeout: 258 seconds]
nowhere_man has joined #ruby
JoshS has quit [Ping timeout: 268 seconds]
doublemalt_ has quit [Ping timeout: 260 seconds]
hutch34 has joined #ruby
mniip has quit [Read error: Connection reset by peer]
muelleme has quit [Ping timeout: 256 seconds]
hutch34 has quit [Ping timeout: 245 seconds]
mniip_ has joined #ruby
mniip_ is now known as mniip
SteenJobs has joined #ruby
jack85 has joined #ruby
Fichtenstein has quit [Ping timeout: 248 seconds]
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
mvxlr has joined #ruby
jhack has quit [Ping timeout: 256 seconds]
Definity has joined #ruby
jaguarmagenta has joined #ruby
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jhack has joined #ruby
hutch34 has joined #ruby
jaguarmagenta has quit [Ping timeout: 268 seconds]
jhack has quit [Ping timeout: 248 seconds]
chouhoul_ has quit [Remote host closed the connection]
hutch34 has quit [Ping timeout: 248 seconds]
mvxlr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jackjackdripper has quit [Quit: Leaving.]
polishdub has quit [Quit: leaving]
lenwood has quit [Ping timeout: 260 seconds]
last_staff has quit [Quit: last_staff]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tvw has joined #ruby
karapetyan has joined #ruby
yardenbar has quit [Quit: Leaving]
c355e3b has quit [Quit: Connection closed for inactivity]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ule> maybe you could use a linux command line tool
<ule> that's what dragonfly does.. it calls 'convert' in the end
tomphp has joined #ruby
jhack has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
jgnagy has quit []
Ru has joined #ruby
ramortegui has quit [Quit: Ex-Chat]
JeanCarloMachado has joined #ruby
augcesar has quit [Quit: Connection closed for inactivity]
<Ru> ☺
Rodya_ has quit [Ping timeout: 260 seconds]
hutch34 has joined #ruby
Definity has quit [Ping timeout: 258 seconds]
vuoto has joined #ruby
Definity has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
firstdayonthejob has joined #ruby
symm- has quit [Ping timeout: 250 seconds]
tomphp has joined #ruby
tyang has joined #ruby
dionysus69 has quit [Ping timeout: 252 seconds]
hutch34 has quit [Ping timeout: 268 seconds]
jhack has quit [Quit: jhack]
harai has quit [Ping timeout: 256 seconds]
saslam has joined #ruby
millerti has joined #ruby
rfoust has joined #ruby
<Ru> .
<al2o3-cr> ..
tyang_ has joined #ruby
symm- has joined #ruby
marxarelli has joined #ruby
marxarelli has quit [Client Quit]
jhack has joined #ruby
marxarelli has joined #ruby
tyang has quit [Ping timeout: 260 seconds]
enterprisey has joined #ruby
Ru has quit [Ping timeout: 260 seconds]
eclm has quit [Quit: WeeChat 1.4]
harai has joined #ruby
nfk has quit [Remote host closed the connection]
nfk has joined #ruby
antoniobeyah has quit [Quit: antoniobeyah]
eclm has joined #ruby
palms has quit [Ping timeout: 265 seconds]
sepp2k has quit [Quit: Leaving.]
hutch34 has joined #ruby
Ru has joined #ruby
jcao219 has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
[Butch] has quit [Quit: I'm out . . .]
alamar is now known as julian
jack85 has quit [Quit: Page closed]
Ru has quit [Remote host closed the connection]
hutch34 has quit [Ping timeout: 256 seconds]
nonnatus has joined #ruby
railssmith has joined #ruby
vuoto has quit [Remote host closed the connection]
ropeney has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
govg has quit [Ping timeout: 248 seconds]
mati_urunda has quit [Ping timeout: 260 seconds]
JeanCarloMachado has quit [Ping timeout: 256 seconds]
firstdayonthejob has quit [Quit: WeeChat 1.6]
unknowns2k2 has joined #ruby
tomphp has joined #ruby
firstdayonthejob has joined #ruby
enterprisey has quit [Remote host closed the connection]
Fernando-Basso has quit [Quit: WeeChat 1.6]
Ultra_DuckZ has quit [Quit: Konversation terminated!]
cdg has joined #ruby
<gener1c> i have a class that has a lot of methods an i want to check if a parameter is set to true before all the methods and according to it envoke them
<gener1c> invoke*
<gener1c> is there a mass monkey patch i can do?
<gener1c> i tried patching send
vuoto has joined #ruby
<gener1c> didnt really work
rrichard_ has joined #ruby
cdg_ has quit [Ping timeout: 258 seconds]
ur5us has quit [Read error: Connection reset by peer]
ur5us_ has joined #ruby
psychicist__ has quit [Ping timeout: 248 seconds]
johnny56 has quit [Ping timeout: 246 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jschoolcraft has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
roflmyeggo has joined #ruby
<roflmyeggo> why would a gem only be found when its listed in my bundler file?
johnny56 has joined #ruby
<roflmyeggo> it doesnt work if i install it locally
<roflmyeggo> possible reasons?
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xall has quit [Ping timeout: 250 seconds]
vuoto has quit [Remote host closed the connection]
vuoto has joined #ruby
Rodya_ has joined #ruby
synaps3 has joined #ruby
Macrobiotic has quit [Quit: Connection closed for inactivity]
<gener1c> any ideas to why send override wont work when used exactly as mentioned in the above example?
phal has quit [Quit: Page closed]
hutch34 has joined #ruby
synaps3 has left #ruby [#ruby]
<dminuoso> gener1c: make a test case.
Rodya_ has quit [Ping timeout: 240 seconds]
dunpeal has quit [Ping timeout: 252 seconds]
ben_____ has quit []
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
johnmccabe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch34 has quit [Ping timeout: 252 seconds]
JoshS has joined #ruby
bmurt has joined #ruby
woodruffw has quit [Ping timeout: 248 seconds]
kobain has quit [Ping timeout: 260 seconds]
<gener1c> moo okz
jshjsh has quit [Ping timeout: 260 seconds]
gingray has quit [Ping timeout: 258 seconds]
mustmodify has joined #ruby
mustmodify has left #ruby [#ruby]
dasher00 has quit [Remote host closed the connection]
millerti has joined #ruby
<gener1c> http://pastebin.com/ucrLtkYC dminuoso
<ruby[bot]> gener1c: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
vuoto has quit [Remote host closed the connection]
<gener1c> ruby bot , if trying to contribute to your core wouldnt have forced me to uninstall it i would have gladly used gist!~
Jamo has quit [Ping timeout: 260 seconds]
saslam has quit [Ping timeout: 244 seconds]
nikivi has quit [Quit: irc]
CloCkWeRX has joined #ruby
mustmodify has joined #ruby
kobain has joined #ruby
kobain has quit [Excess Flood]
<mustmodify> Why does this end in double-equal-signs?
<mustmodify> Digest::MD5.base64digest '234235'
kobain has joined #ruby
kobain has quit [Excess Flood]
Guest80268 has joined #ruby
Guest80268 has quit [Excess Flood]
Guest80268 has joined #ruby
careta has joined #ruby
<Radar> Why not?
nonnatus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<rapha> hi all
rrichard_ has quit [Quit: He who dares .... wins.]
<rapha> i just wanted to say that i have no question to ask but that i'm very happy that ruby exists and that it's such an awesome language and that you exist giving it such an awesome community
karapetyan has quit [Remote host closed the connection]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
Guest80268 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
kirun has quit [Quit: Konversation terminated!]
Jamo has joined #ruby
<al2o3-cr> mustmodify: because it's padded with =
domgetter has joined #ruby
dunpeal has joined #ruby
d0nn1e has quit [Ping timeout: 260 seconds]
jbeeze has quit [Remote host closed the connection]
svankmajer has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
railssmith has quit [Ping timeout: 258 seconds]
charliesome has joined #ruby
d0nn1e has joined #ruby
charliesome has quit [Client Quit]
<gener1c> dminuoso: ?
dunpeal has quit [Ping timeout: 256 seconds]
Definity has quit [Ping timeout: 258 seconds]
dunpeal has joined #ruby
JoshS has quit [Ping timeout: 260 seconds]
unknowns2k2 has quit [Quit: unknowns2k2]
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch34 has joined #ruby
nofxx has joined #ruby
firstdayonthejob has quit [Ping timeout: 260 seconds]
jaguarmagenta has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
charliesome has joined #ruby
bmurt has joined #ruby
hutch34 has quit [Ping timeout: 244 seconds]
<mustmodify> al2o3-cr: Oh, that makes sense.
<mustmodify> Thanks.
frontrowalex has joined #ruby