baweaver changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
candelabra has joined #ruby
<candelabra> a while since I've used ruby, did ruby incorporate the fastercsv gem? if not, is fastercsv still faster than the CSV class?
Rurik has joined #ruby
dotix has quit [Ping timeout: 264 seconds]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Radar> candelabra: The CSV stdlib is the fastercsv gem from my understanding.
mprelude has quit [Ping timeout: 264 seconds]
jack_ has joined #ruby
seitensei has quit [Ping timeout: 255 seconds]
minimalism has joined #ruby
leat2 has joined #ruby
tkuchiki has joined #ruby
livcd has quit [Ping timeout: 246 seconds]
livcd has joined #ruby
rbennacer has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has quit [Ping timeout: 244 seconds]
candelabra has quit [Ping timeout: 250 seconds]
jcoe has joined #ruby
michaeldeol has joined #ruby
<towler> What does it mean "object = record.is_a?(Array) ? record.last : record"
<Radar> towler: If the record object is an array, then get the last element from that array. Otherwise, return the record object.
bkxd has joined #ruby
pontiki has joined #ruby
grenierm has joined #ruby
tkuchiki has quit [Remote host closed the connection]
dgs has joined #ruby
dgutierrez1287 has joined #ruby
Musashi007 has joined #ruby
diegoviola has joined #ruby
dgutierrez1287 has quit [Ping timeout: 246 seconds]
symm-_ has joined #ruby
grenierm has quit [Quit: grenierm]
symm- has quit [Ping timeout: 265 seconds]
candelabra has joined #ruby
solars has quit [Ping timeout: 250 seconds]
ElSif has quit [Read error: Connection reset by peer]
<candelabra> Radar: thanks
Voker57 has quit [Read error: Connection reset by peer]
gizmore has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
VictorBjelkholm has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
moeabdol has quit [Ping timeout: 272 seconds]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fedexo has joined #ruby
danieli has quit [Quit: *does an epic backflip into nowhere*]
JDiPierro has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
cashnguns has quit [Quit: I'm just an old fashioned cowboy]
freerobby has joined #ruby
coffeecupp__ has joined #ruby
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
juanpablo_ has joined #ruby
jeanlinux has joined #ruby
jeanlinux has quit [Remote host closed the connection]
jeanlinu_ has quit [Read error: Connection reset by peer]
Rickmasta has joined #ruby
juanpablo_ has quit [Ping timeout: 250 seconds]
mistermocha has joined #ruby
jeanlinux has joined #ruby
elperdut has joined #ruby
Neverdie has joined #ruby
iateadonut has joined #ruby
minimali1m has joined #ruby
minimali1m has quit [Client Quit]
minimalism has quit [Ping timeout: 264 seconds]
wildlander has quit [Quit: Saliendo]
solocshaw has quit [Ping timeout: 246 seconds]
nettoweb has joined #ruby
candelabra has quit [Ping timeout: 264 seconds]
djbkd has joined #ruby
jack_ has quit [Remote host closed the connection]
CloCkWeRX has joined #ruby
jcoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
weemsledeux has joined #ruby
lxsameer has quit [Quit: Leaving]
keen__________18 has quit [Read error: Connection reset by peer]
djbkd has quit [Ping timeout: 244 seconds]
keen__________18 has joined #ruby
chills42 has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
rehat has joined #ruby
jcoe has joined #ruby
yfeldblum has joined #ruby
mooe has joined #ruby
goodcodeguy has joined #ruby
tkuchiki has joined #ruby
mleung has joined #ruby
tkuchiki has quit [Ping timeout: 260 seconds]
tkuchiki has joined #ruby
northfurr has quit [Quit: northfurr]
sankaber has joined #ruby
badbodh has joined #ruby
badbodh has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
mleung has quit [Quit: mleung]
spencer6245_ has quit [Ping timeout: 246 seconds]
maletor has joined #ruby
badbodh has joined #ruby
bmurt has joined #ruby
bahar has joined #ruby
bahar has joined #ruby
jack_ has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
jack_ has left #ruby [#ruby]
symm-_ is now known as symm-
fedexo has quit [Quit: No Ping reply in 180 seconds.]
dorei has quit []
fedexo has joined #ruby
jcoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ReK2 has quit [Quit: Konversation terminated!]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
badbodh has quit [Remote host closed the connection]
freerobby has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zenspider> weeee... made mazes using the graphics gem http://t.co/FCc23fgDT7
<zenspider> not bad for 102 lines of code (prolly a bit on the high side)
badbodh has joined #ruby
jeanlinux has quit [Ping timeout: 240 seconds]
devoldmx has quit [Remote host closed the connection]
baweaver has joined #ruby
rhg135 has quit [Ping timeout: 255 seconds]
freerobby has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
allomov has joined #ruby
dasher00 has quit [Ping timeout: 246 seconds]
dotix has joined #ruby
iateadonut has quit [Quit: Leaving.]
ledestin has joined #ruby
bmurt has quit []
mary5030 has joined #ruby
xcesariox has joined #ruby
bnizzle has quit [Read error: Connection reset by peer]
DifferentLambda has joined #ruby
allomov has quit [Ping timeout: 252 seconds]
coffeecupp__ has quit [Read error: Connection reset by peer]
freerobby has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
fedexo has quit [Ping timeout: 246 seconds]
dotix has quit [Ping timeout: 265 seconds]
iateadonut has joined #ruby
karapetyan has joined #ruby
morenoh149 has quit [Read error: Connection reset by peer]
ddrmanxbxfr has quit [Quit: Leaving]
morenoh149 has joined #ruby
bonhoeffer has joined #ruby
David27 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<bonhoeffer> is there a way to initialize a Hash with keys from an array of symbols [:a, :b, :c]
freerobby has quit [Read error: Connection reset by peer]
chouhoulis has joined #ruby
dasher00 has joined #ruby
freerobby has joined #ruby
platzhirsch has quit [Ping timeout: 272 seconds]
karapetyan has quit [Ping timeout: 246 seconds]
<monoprotic> what are the values
CloCkWeRX has quit [Ping timeout: 250 seconds]
<bonhoeffer> monoprotic: going to be array — so if q=[:a, :b, :c], i hope to load this: quantities[q][:data].push(j[q])
mleung has joined #ruby
<bonhoeffer> gist corrected, submitted with a mistake
<monoprotic> mkaes more sense haha
shinnya has quit [Ping timeout: 264 seconds]
<bonhoeffer> sorry, so I want {name: ‘purity’, data: [[dec 1, 1], [dec 2, 1] . . . ]}, {name: ‘discipline’, data: . . .
<bonhoeffer> trying to get my data into a graphing application
JDiPierro has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
<bonhoeffer> and i think i need push! as well to change the hash
<monoprotic> do they output[q]'s already exist?
<monoprotic> oh, no
<monoprotic> how are you setting the name
<bonhoeffer> ha, that is what i’m after
craysiii has joined #ruby
<monoprotic> oh i see
<monoprotic> sorry im a little slow :)
<bonhoeffer> sorry, haven’t thought about it much — was more trying to see how to initialize hash’s dynamically so i know what my options are
<bonhoeffer> monoprotic: me too :)
<monoprotic> new to ruby, but you could use the Hash.new { |hash, key| ... } method
freerobby has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
<bonhoeffer> yeah — that is what i’m thinking
bahar has quit [Ping timeout: 240 seconds]
<monoprotic> you say this: {name: ‘purity’, data: [[dec 1, 1], [dec 2, 1] . . . ]}, {name: ‘discipline’, data: . . .
<monoprotic> wouldnt that make objects an array of hashes then
<monoprotic> not a hash itself
bahar has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
freerobby has joined #ruby
[k- has joined #ruby
<bonhoeffer> yes
bonhoeffer has quit [Read error: Connection reset by peer]
freerobby has quit [Read error: Connection reset by peer]
<monoprotic> something like objects.push({:name => q, :data => j[q]})
freerobby has joined #ruby
bonhoeffer has joined #ruby
<monoprotic> or use map isntead of quantiles.each
<bonhoeffer> yeah
<bonhoeffer> good point
<monoprotic> oh but objects[:data] gets added to for each iteration of journal entries
<monoprotic> i see
dopie has joined #ruby
chills42 has quit [Remote host closed the connection]
mleung has quit [Quit: mleung]
freerobby has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
dravine has quit [Remote host closed the connection]
dravine has joined #ruby
mleung has joined #ruby
CloCkWeRX has joined #ruby
chills42 has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
devoldmx has joined #ruby
mleung has quit [Client Quit]
freerobby has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freerobby has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
MichaelSmith has quit [Quit: Connection closed for inactivity]
dopie has quit [Quit: This computer has gone to sleep]
freerobby has joined #ruby
mleung has joined #ruby
mleung has quit [Client Quit]
juanpablo_ has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
chills42 has quit [Remote host closed the connection]
freerobby has quit [Read error: Connection reset by peer]
devoldmx has quit [Remote host closed the connection]
freerobby has joined #ruby
charliesome has joined #ruby
segfalt has quit [Quit: segfalt]
juanpablo_ has quit [Ping timeout: 264 seconds]
freerobby has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
freerobby has joined #ruby
dopie has joined #ruby
MichaelSmith has joined #ruby
yashinbasement has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
badbodh has quit [Read error: Connection reset by peer]
tkuchiki has quit [Ping timeout: 260 seconds]
devoldmx has joined #ruby
DifferentLambda is now known as rhg135
candelabra has joined #ruby
charliesome has joined #ruby
badbodh has joined #ruby
riskish has joined #ruby
ponga has quit [Quit: Connection closed for inactivity]
jeanlinux has joined #ruby
chouhoulis has quit [Remote host closed the connection]
freerobby has quit [Read error: Connection reset by peer]
leafybasil has joined #ruby
spikethecowboy has joined #ruby
northfurr has joined #ruby
DmitryBochkarev has joined #ruby
oo_ has quit [Remote host closed the connection]
nfk has quit [Read error: Connection reset by peer]
gener1c_ has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mleung has joined #ruby
pawnbox has joined #ruby
weemsledeux has quit [Read error: Connection reset by peer]
morenoh149 has quit [Read error: Connection reset by peer]
gener1c has quit [Ping timeout: 250 seconds]
spikethecowboy has left #ruby ["AndroIRC"]
morenoh149 has joined #ruby
devoldmx_ has joined #ruby
charliesome has joined #ruby
Blaguvest has quit [Ping timeout: 256 seconds]
braincrash has quit [Quit: bye bye]
yashinbasement has quit [Quit: Leaving]
devoldmx has quit [Ping timeout: 252 seconds]
candelabra has quit [Ping timeout: 246 seconds]
djbkd has joined #ruby
Musashi007 has quit [Quit: Musashi007]
catcher has joined #ruby
<craysiii> can shoes be used with traveling ruby or something similar??
deg_ has joined #ruby
mleung has quit [Quit: mleung]
braincrash has joined #ruby
djbkd has quit [Ping timeout: 246 seconds]
Musashi007 has joined #ruby
leafybasil has quit [Remote host closed the connection]
<bonhoeffer> monoprotic: what i ended up with — works, but needs refactored: https://gist.github.com/tbbooher/21243a6a455a7aed8d44
<monoprotic> are you from pittsburgh
leafybasil has joined #ruby
<bonhoeffer> nope — but i go there a good bit to work with cmu and SEI
<bonhoeffer> anyway — added comments
<monoprotic> i heard that phrases like "needs refactored" comes from there
<monoprotic> anyway
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
darkf has joined #ruby
<monoprotic> i think you can initialize data with data = Hash.new { |hash, key| hash[key] = Array.new }
<baweaver> >> h = Hash.new { |h,k| h[k] = [] }; h[:a].push(1); h[:b].push(2,3,4); h
<ruboto> baweaver # => {:a=>[1], :b=>[2, 3, 4]} (https://eval.in/432263)
jeanlinux has quit [Read error: Connection reset by peer]
<baweaver> you can
r_baron has quit [Ping timeout: 264 seconds]
leafybasil has quit [Ping timeout: 264 seconds]
<baweaver> *sighs* again though, you're trying to do this in Ruby when you _should_ be doing it with SQL
mleung has joined #ruby
<baweaver> explain the problem, you can probably use a group count
<baweaver> bonhoeffer:
sfr^ has quit [Ping timeout: 244 seconds]
linc01n has quit [Ping timeout: 244 seconds]
Shidash has quit [Ping timeout: 246 seconds]
wldcordeiro has joined #ruby
crdpink2 has joined #ruby
Swappticon has joined #ruby
universa1 has quit [Ping timeout: 244 seconds]
tmk1108 has joined #ruby
mleung has quit [Client Quit]
crdpink has quit [Ping timeout: 246 seconds]
<bonhoeffer> baweaver: interesting — i agree — i should work it there . . . the key is getting an array: {"name" => ‘discipline’, "data" => [date1, 1], [date2, 2]. . . }
<bonhoeffer> trying to get that from one sql query as my current solution does
<bonhoeffer> each row of the db has [date, discipline, health, . . .] as integers
roxtrongo has joined #ruby
<baweaver> pay close attention to pluck in there
dogweather has joined #ruby
<dogweather> Where is #defined? defined? :-)
<zenspider> not as bad as coming across someone designing Table and Row tables in a relational db... but...
<dogweather> Used to be a method of Object in 1.9, but now I can't find it.
<baweaver> probably kernel
<zenspider> dogweather: not a method
<zenspider> it's a builtin
<baweaver> or basic object
<baweaver> is it
<zenspider> defined?(blah)
<baweaver> huh, TIL
symm- has quit [Ping timeout: 264 seconds]
jeanlinux has joined #ruby
<zenspider> it's basically syntax, since it can't eval the arg
<toretore> otherwise defined?(nonexisting_local) would raise
<zenspider> and since we don't have proper macros
<zenspider> toretore: exactly
<dogweather> hmmm, not in Kernel
tmk1108 has left #ruby [#ruby]
<zenspider> dogweather: reading comprehension not your thing?
<dogweather> @zenspider i process FIFO
<bonhoeffer> baweaver: will do
<dogweather> @zenspider you're saying it's a language feature, like 'for'. ?
<zenspider> that's exactly what I'm saying
Shidash has joined #ruby
Musashi007 has quit [Quit: Musashi007]
<dogweather> thanks
linc01n has joined #ruby
<zenspider> ?quickref dogweather
<zenspider> look at reserved words
<bonhoeffer> baweaver: that is a great post, and i could shorten things by using pluck, but it would create 8 queries instead of one
<bonhoeffer> i’m probably missing something
universa1 has joined #ruby
sfr^ has joined #ruby
<dogweather> @ruboto thanks.
<bonhoeffer> and thanks a lot for that post — really cool stuff
<dogweather> anyone have a link to docs for the builtin `defined?`
<baweaver> ruboto is a bot, do note.
<dogweather> :-P
oo_ has joined #ruby
<zenspider> docs?
jeanlinux has quit [Read error: Connection reset by peer]
<baweaver> How do you figure 8?
<zenspider> dogweather: how about you just ask your question here?
<dogweather> Ok! what's the signature and defined behavior of `defined?`?
jeanlinux has joined #ruby
rbennacer has quit [Remote host closed the connection]
<zenspider> dogweather: you already mentioned having used it before... what do you really want to know?
<dogweather> I can infer that it returns truthy vs. falsy, a string describing what it found...
dopamean_ has quit [Read error: Connection reset by peer]
<baweaver> well off I go, gotta get food stuffs.
CloCkWeRX has left #ruby [#ruby]
dopamean_ has joined #ruby
baweaver has quit [Remote host closed the connection]
<zenspider> welp... I'm done trying to pull teeth from this one. have fun with that.
max_Q has quit [Ping timeout: 244 seconds]
max_Q has joined #ruby
marens has quit [Read error: Connection reset by peer]
marens has joined #ruby
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
<toretore> >> foo, @foo, @@foo, $foo, Foo = 1, 1, 1, 1, 1; [defined?(foo), defined?(bar), defined?(@foo), defined?(@bar), defined?(@@foo), defined?(@@bar), defined?($foo), defined?($bar), defined?(Foo), defined?(Bar)]
oo_ has quit [Ping timeout: 264 seconds]
<ruboto> toretore # => /tmp/execpad-f3d47805c5ae/source-f3d47805c5ae:2: warning: class variable access from toplevel ...check link for more (https://eval.in/432264)
nanoz has joined #ruby
gix has quit [Ping timeout: 265 seconds]
tkuchiki has joined #ruby
blackjid has quit [Max SendQ exceeded]
blackjid has joined #ruby
The_Phoenix has joined #ruby
jenrzzz has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
gix has joined #ruby
jxv has quit [Remote host closed the connection]
jeanlinux has quit [Remote host closed the connection]
podman has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pwnd_nsfw has quit [Ping timeout: 246 seconds]
dotix has joined #ruby
tmtwd has quit [Ping timeout: 240 seconds]
tmtwd has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
badbodh has quit [Remote host closed the connection]
Rurik has quit [Ping timeout: 264 seconds]
badbodh has joined #ruby
CloCkWeRX has joined #ruby
dotix has quit [Ping timeout: 252 seconds]
arescorpio has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
jenrzzz has joined #ruby
destruct1re has quit [Quit: Lost terminal]
yfeldblum has quit [Ping timeout: 246 seconds]
grenierm has joined #ruby
pawnbox has quit [Remote host closed the connection]
Keltia has quit [Read error: Connection reset by peer]
Keltia has joined #ruby
Rickmasta has joined #ruby
jdawgaz has joined #ruby
grenierm has quit [Quit: grenierm]
UtkarshRay has joined #ruby
poli has quit [Ping timeout: 256 seconds]
<tejasmanohar> say i wanted to write a programming language in ruby just for fun (even if it's terrible)
<tejasmanohar> the first step is writing the parser as far as i know
<tejasmanohar> are there any libraries that would be especially useful here?
candelabra has joined #ruby
grenierm has joined #ruby
juanpablo_ has joined #ruby
<jordanm> tejasmanohar: maybe you are looking to write a DSL (eg puppet)?
<tejasmanohar> or a programming language
<tejasmanohar> jordanm:
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<tejasmanohar> though Docile loks really cool for DSLs
juanpablo_ has quit [Ping timeout: 244 seconds]
Rurik has joined #ruby
Rurik has quit [Max SendQ exceeded]
Rurik has joined #ruby
Rurik has quit [Max SendQ exceeded]
tkuchiki has quit [Remote host closed the connection]
gambl0re has quit [Ping timeout: 268 seconds]
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
dogweather has quit []
mary5030 has quit [Ping timeout: 272 seconds]
tmtwd has quit [Ping timeout: 240 seconds]
riskish has quit [Quit: Textual IRC Client: www.textualapp.com]
[k- has quit [Ping timeout: 246 seconds]
chancy has joined #ruby
chancy has left #ruby [#ruby]
Juanchito has quit [Quit: Connection closed for inactivity]
MichaelSmith has quit [Quit: Connection closed for inactivity]
roxtrongo has quit [Remote host closed the connection]
grenierm has quit [Quit: grenierm]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
baweaver has joined #ruby
dgs has quit [Quit: dgs]
elperdut has joined #ruby
chancy has joined #ruby
oldbay has joined #ruby
catcher has quit [Quit: catcher]
codecop has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
roxtrongo has joined #ruby
elperdut has quit [Client Quit]
Asher has joined #ruby
candelabra has quit [Quit: Leaving]
djbkd has joined #ruby
linux_dr has joined #ruby
arescorpio has quit [Quit: Leaving.]
Swappticon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dotix has joined #ruby
Musashi007 has joined #ruby
djbkd has quit [Ping timeout: 265 seconds]
dotix has quit [Ping timeout: 252 seconds]
niko has quit [Ping timeout: 619 seconds]
dionysus69 has joined #ruby
DmitryBochkarev has joined #ruby
devoldmx_ has quit [Remote host closed the connection]
acke has joined #ruby
tmtwd has joined #ruby
dionysus69 has quit [Ping timeout: 246 seconds]
<linux_dr> I regret I’m flying a bit blind here, and I’m very unfamiliar with Ruby, but I’m trying to dig into Vagrant’s source enough to write some simple plugins… I fear I’m barking up many a wrong tree, but am having trouble untangling one Ruby construct in particular at the moment.: http://pastebin.com/HSNdcM1i
<ruboto> linux_dr, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/6fad0c1a62e7aa09120b
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<linux_dr> ruboto: ack… (Yes, I know you’re a bot)
<linux_dr> is there a non-robot in the house?
tejasmanohar has quit [Ping timeout: 265 seconds]
mleung has joined #ruby
tejasmanohar has joined #ruby
GnuYawk has joined #ruby
yeticry has quit [Ping timeout: 250 seconds]
yeticry has joined #ruby
acke_ has joined #ruby
<baweaver> linux_dr: just a sec
<baweaver> depends on the initializer of B entirely
<baweaver> cannot tell from that code.
maletor has joined #ruby
<baweaver> I would read some basic ruby tutorials to start
rippa has joined #ruby
<baweaver> most of the time though method will be in the case of class A
<baweaver> then again fake code will get you precious little as far as answers here
<baweaver> as we're not keen on flying blind either
tkuchiki has joined #ruby
acke has quit [Ping timeout: 252 seconds]
<baweaver> Now as far as how it could _not_ be in the context of a, there's something called class_eval and module_eval that take a block and evaluate them in a different context.
jxv has joined #ruby
<baweaver> That's normally an edge case but I don't know what vagrant is doing there.
<baweaver> Now what exactly are you trying to do?
<linux_dr> Understand the vagrant codebase in order to plug into relevant events… The particular function I was refering to is around line 200 in this file: https://github.com/mitchellh/vagrant/blob/master/lib/vagrant/environment.rb
oldbay has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver> protip, click on a line number in git to link directly to it
<linux_dr> baweaver: not sure if you’re familiar with vagrant.
<baweaver> useful for later.
<baweaver> slightly.
maletor has quit [Client Quit]
dionysus69 has joined #ruby
<linux_dr> figured I could link to a line number but forgot how.. Haven’t used github in several months.
<baweaver> it passes to there.
<baweaver> it's fine, figured I'd mention it.
tkuchiki has quit [Ping timeout: 244 seconds]
<baweaver> so in this case it's passing the method hook from the environment file as a proc
<linux_dr> Ok.. so it’s a parameter… NOT run on the resulting object.. lol
tjohnson has quit [Quit: Connection closed for inactivity]
Neverdie has quit [Quit: http://radiux.io/]
<baweaver> not until you hit run is that block evaluated.
<baweaver> of course the extent of my vagrant knowledge is that I used it for virtual dev
pyon has quit [Read error: Connection reset by peer]
<linux_dr> Not sure if you’ve ever seen this code base before, but they have a pretty involved plugin mechanism, to the point that most of the system is implemented, internally, as plugins… What I’d really like to extract from the code is a list of events I can pluginto… The event interception is pretty easy to understand, and there are some examples to follow, but not finding an easy way to grep the code for possible events to
<linux_dr> intercept.
<baweaver> yeah, that'd be beyond me without delving the code for a few hours.
<linux_dr> Yes… I’ve done that, but my Ruby knowledge is sketchy at best.. :(
<baweaver> that I can help with
<baweaver> Vagrant specific, only insofar
<linux_dr> Understood..
mary5030 has joined #ruby
<baweaver> you could try joining #vagrant and asking
<baweaver> not sure how active it is though.
<linux_dr> I think, as far as I’ve been able to untangle things, all event names get registered by being the first parameter to an Environment’s “hook” method.. not sure how to search the code for that.
acke_ has quit [Remote host closed the connection]
<linux_dr> It’s active enough, but mostly end users… not developers (from my experience)
Musashi007 has quit [Quit: Musashi007]
sevenseacat has joined #ruby
<linux_dr> So… the reason I ended up in method’s action_runner (and boxes) is they seem to be the only places where hook could be invoked from.
MikeHuntKuntz has joined #ruby
<linux_dr> Yeh… saw that list… it’s a list of commands, not events, near as I can tell.
<linux_dr> Unless you’re seeing something I’m missing.
MikeHuntKuntz has quit [Client Quit]
<linux_dr> Ok… I stand corrected… they aren’t commands either… but not really events...
mary5030 has quit [Ping timeout: 264 seconds]
<linux_dr> They are part of how plugins register themselves.
ULTRAGAY has joined #ruby
<baweaver> read the comment right above that one.
tmtwd has quit [Ping timeout: 264 seconds]
<linux_dr> Yes… i saw that two… That’s searching where 3rd party plugins are loaded from… getting a plugin recognized is pretty easy… and registering a handler isn’t much harder (There’s a action_hook() method called in the plugin definition that allows this)… the list of events to tap into is what I’m finding elusive.
dgs has joined #ruby
nanoz has quit [Quit: <3]
garretjones has joined #ruby
<ULTRAGAY> hello everyone
<baweaver> !mute ULTRAGAY
<zenspider> why even mute?
<linux_dr> ULTRAGAY: hola… welcome…
bkxd has quit [Ping timeout: 240 seconds]
Rurik has joined #ruby
<zenspider> !ban garretjones
<baweaver> !mute garretjones
<craysiii> dude what the fuck
<sevenseacat> thats probably a good sign that i shouldnt click that.
<baweaver> in the mean time
<baweaver> yep
<craysiii> i opened that
<craysiii> god damnit
<zenspider> fuck me... damnit.
<sevenseacat> :/
<shevy> kiwiirc again
acke has joined #ruby
<zenspider> damnit... why the fuck does ruboto require a timespan??
milanpaperclip has quit [Ping timeout: 255 seconds]
<zenspider> I'm getting tired of this bot as a convenience when it's really a crutch and an inconvenient one at that
bkxd has joined #ruby
<linux_dr> ruboto promotes and demotes itself around every priviledged operation?
<zenspider> don't care about that... care about the fact that !ban just ignores you if you don't fill out a byzantine syntax ... I don't even WANT a timeout on this ban so it doesn't make sense
<Sigma00> time to file a PR?
dgs has quit [Ping timeout: 246 seconds]
<baweaver> already mentioned it.
<linux_dr> Do you get lots of noise from riffraff in here?
<baweaver> on occasion.
* linux_dr nods
Alina-malina has joined #ruby
<baweaver> if they make themselves annoying I just +q anyone not authenticated.
mleung has quit [Quit: mleung]
Musashi007 has joined #ruby
<craysiii> that was a lot more than riff raff.
<sevenseacat> but the newbsssssssss wont somebody think of the newbs
coffeecupp__ has joined #ruby
<zenspider> how the fuck does imgur not have a report link?
<linux_dr> sevenseacat: lol
niko has joined #ruby
<baweaver> zenspider: http://imgur.com/removalrequest
<zenspider> aaaand that's not a report link, is it?
<baweaver> you paste the link and the reason
<baweaver> kinda stupid, but that's what I found.
<zenspider> contrary to popular believe, I am capable of using a webbrowser
<baweaver> Limechat autoloads images :/
<Sigma00> imgur won't remove 'shock' images
<zenspider> "List of images to be deleted, separated by commas." == we don't actually want to facilitate this
coffeecupp__ is now known as coffee
<Sigma00> oh, I hadn't opened that. Now I wish I never did
<Sigma00> file away
coffee is now known as coffeecupp__
<zenspider> believe => belief... this bourbon might be working quicker than I thought
<zenspider> bourbon: why are you named that? I've never provided anyone with any bourbon
<craysiii> reminds me to grab a cider and forgot what i just saw
<craysiii> forget
<baweaver> Anyways, let's move this to #ruby-offtopic
ULTRAGAY has quit [K-Lined]
garretjones has quit [Disconnected by services]
<baweaver> not a fan of giving them this much reaction
<zenspider> damnit... wow. I've -> You've. I'm in stupid-mode
<zenspider> "Disconnected by services" -- what does that mean?
<baweaver> not sure
<baweaver> probably pissed off chanserv
<baweaver> the other one was k-lined
skade has joined #ruby
<zenspider> linux_dr: you had questions about scoping... were they answered?
<baweaver> TL;DR: vagrant is interesting to traverse, not quite yet technically.
<linux_dr> zenspider: I think so… I didn’t realize a given block was an argument...
<zenspider> it is... the important part about that method call (to #method) is that it has an implicit "self." on the front of it
<baweaver> the issue still at foot is something on the note of getting a list of plugins loaded if I caught that right.
<zenspider> normally self in that case would be the instance of class A running the foo method...
<linux_dr> zenspider: It seemed ambiguous WHICH self… lol
<zenspider> but if B.new does an instance_eval on the block instead of a normal yield, then it'l be whatever it does the instance_eval on
mikejonesbra has joined #ruby
<zenspider> see??? not that drunk... just can't pronoun
<zenspider> !mute mike
<baweaver> !mute mikejonesbra
<zenspider> !mute mikejonesbra
charliesome has joined #ruby
<baweaver> haha, ninja'd
<zenspider> !unmute mike
<shevy> hehe
<baweaver> heh
mikejonesbra has quit [K-Lined]
skade has quit [Client Quit]
juanpablo_ has joined #ruby
<linux_dr> umm… why the unmute… what’d I miss?
<baweaver> muted mike
oldbay has joined #ruby
<baweaver> instead of the other person.
<linux_dr> ahh… two different users
<zenspider> not two different users... I think that's a bug in ruboto
<zenspider> submitted the url for deletion... it looks like it was submitted into a manually processed queue
<baweaver> Changed channel mode to quiet anyone not authenticated for the time being
<zenspider> ruboto muted and unmuted the same user in both cases... presumably because of a substring match
lavros has joined #ruby
<linux_dr> I’m guessing IRC’s protocol doesn’t allow for message moderation? (have ruboto red-light messages matching certain patterns?)
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<baweaver> see that if you need to register
<sevenseacat> lol
<zenspider> oh. no. I'm just stupid. got caught up by ruboto itself. by not reading clearly enough
dionysus69 has quit [Ping timeout: 265 seconds]
Oka has quit [Quit: o/]
<zenspider> I'm tempted to say that we should have automute on anyone who's user includes /web/
juanpablo_ has quit [Ping timeout: 265 seconds]
<zenspider> let them calculate primes to get unmuted
<linux_dr> zenspider: I don’t know… I login from the web UI sometimes…
<nofxx> zenspider, got a friend called weber. He doesn't code tho.
<zenspider> then you get to calculate a prime
<nofxx> so no problem
<zenspider> nofxx: I mean /\/web\//
<linux_dr> zenspider: calculate primes? how so?
<zenspider> most of these dipshits are on web/freenode
<zenspider> math, presumably
<baweaver> #shotsfired
<nofxx> zenspider, hehe cool. Couldn't miss the joke. ;)
<sevenseacat> why do we keep having these same conversations over and over again
tejasmanohar has quit [Read error: Connection reset by peer]
<linux_dr> zenspider: I was more refering to an interface.. does Ruboto msg math probs to solve?
<zenspider> sevenseacat: I WAS TRYING TO TALK RUBY WHEN I WAS INTERRUPTED
sevenseacat has left #ruby ["."]
<zenspider> sure. something like that
<linux_dr> zenspider: likewise...
<baweaver> linux_dr: yeah, it'd take me a while to trace the dang thing
<baweaver> fairly dense so far.
<Sigma00> so, guys, what's the best way to tell the purity of a ruby?
<baweaver> then again most non-trivial bits are
<zenspider> linux_dr: anyhow... self can be changed inside a block via instance_eval
<Sigma00> :V
tejasmanohar has joined #ruby
baweaver changed the topic of #ruby to: Register to talk || Rules & more: http://ruby-community.com || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
Rurik has quit [Read error: Connection reset by peer]
<zenspider> you can defend against that by not using an implicit "self."
<linux_dr> zenspider: Understood… was just trying to understand what I was reading.
fxn has joined #ruby
<zenspider> overly complex setup code :)
Rurik has joined #ruby
<zenspider> in fact... that's just a really poor design. why use a block just to create a hash? that's clumsy
<linux_dr> Oh… any side affects of terminating a Ruby program via exec? How portable is that to non-Unixes?
<baweaver> zenspider: they're using it for lazy eval
<baweaver> at least in the vagrant source
<baweaver> which answers the why, but not the wtf why!?
<linux_dr> zenspider: I didn’t write the thing.. just trying to wrestle it into submission.
Musashi007 has quit [Quit: Musashi007]
<baweaver> never a truer statement about programming has been made
<linux_dr> lol
<shevy> lol
acke_ has joined #ruby
tejasmanohar has quit [Ping timeout: 244 seconds]
tejasmanohar has joined #ruby
<linux_dr> You think that’s fun, For my next trick I need to figure out how to resize a virtual hard disk, and the partition and filesystem on it, hopefully without booting the system that’s using it.. (fingers crossed.)
<zenspider> linux_dr: I know... just .. consider it at least a yellow flag
<zenspider> so... I can't type for shit (you're not seeing my typos). I'm not proofreading. I'm fucking up pronouns... but hand me an ultra sharp shun and stuff to cut up and I'm good. idgi
acke has quit [Ping timeout: 256 seconds]
<linux_dr> zenspider: I do think they probably have an overly flexible (and almost certainly and over-engineered) plugin system that needs some amount of backward compatibility.
<zenspider> linux_dr: side *E*ffects. :P
<zenspider> what are you asking, specifically? yes, there can be side effects
Lucky__ has quit [Ping timeout: 250 seconds]
<linux_dr> zenspider: baweaver, was trying to help, but I’m trying to extract a list of hook events I can tap into from a vagrant plugin.
<zenspider> I don't know vagrant... but I know ruby. ;)
<baweaver> yeah, vagrant is a bit dense, still looking about but probably won't find anything
<baweaver> I'd open an issue to ask honestly if you can't get #vagrant to cough up
<linux_dr> I think I’ve tracked it down to, all events should register themselves by name by calling the ‘hook’ method on environment.
dionysus69 has joined #ruby
<zenspider> oh god... pastrami is the best thing ever
badbodh has quit [Ping timeout: 246 seconds]
<zenspider> linux_dr: that's how I'd design it :)
<linux_dr> So I’m trying to find a way to search for anything that can call ‘hook’
TomyLobo has joined #ruby
arup_r has joined #ruby
<baweaver> could put a hook in hook to find hooks
<zenspider> heh. I was gonna suggest that, but wasn't summoning the clever
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<baweaver> rubygems are editable on the system
<baweaver> so just sneak a puts in there as a cheap variant
<zenspider> depends on how they're installed... but you have options either way
<linux_dr> baweaver: I’m concerned that may be to environment specific...
<baweaver> fair
<baweaver> but might give you a better idea.
fxn has quit [Quit: zZzZzZ...]
<zenspider> linux_dr: a simple grep for \\.hook should suffice
acke_ has quit [Remote host closed the connection]
<zenspider> is every generic word a user in here?
Musashi007 has joined #ruby
futilegames has joined #ruby
<linux_dr> well… I found method(:hook) inserted into two hashes that also need to be checked for.
<zenspider> hah
<zenspider> check for senders, not definitions
<zenspider> well... check for both... but you're worried about the senders
toretore has quit [Quit: This computer has gone to sleep]
dionysus69 has quit [Ping timeout: 272 seconds]
<linux_dr> zenspider: I found 3 explicit hook() calls in vagrant/lib/vagrant/environment.rb… but I’m trying to tease out the rest.
oldbay has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<linux_dr> zenspider: I’m really worried about the first parameter, or all possible values of the first parameter, only… really
<zenspider> ... why are you tracking all this down?
Musashi007 has quit [Client Quit]
<linux_dr> zenspider: so I know what events I want to intercept within vagrant.
<linux_dr> what does an “@“ on the front of a word in Ruby mean again?
<baweaver> instance variable
jaredrhine has quit [Remote host closed the connection]
<linux_dr> baweaver: on dereference only? or where else?
<baweaver> hm?
jaredrhine has joined #ruby
<zenspider> the actual name of the var has a @ on the front
<linux_dr> You use @ when you assign to, or evaluate the instance variable… is it needed elsewhere? (in a declaration, for example?)
<zenspider> it sounds like what you're doing is ... distruptive... don't expect this to work long term
<zenspider> what are you actually trying to do?
<linux_dr> umm… what I’m doing is static analysis… or really just trying to understand the damn code a little.
<baweaver> that should get you more up to speed in a few minutes.
<linux_dr> I told you… I want to create a list of all possible values that can be passed as the first argument to Environment’s #hook method.
howdoicomputer has joined #ruby
<linux_dr> baweaver: thanks… seen something like this, but it’s been quite a while… forgot most of it.
<linux_dr> Ruby is not in my usual arsenal...
futilegames_ has joined #ruby
futilegames has quit [Ping timeout: 268 seconds]
futilegames_ is now known as futilegames
wildlander has joined #ruby
choke has joined #ruby
futilegames has quit [Client Quit]
acke has joined #ruby
<Sigma00> HERETIC
<zenspider> now now
chancy has quit []
<baweaver> they can repent
<baweaver> that'd be 5 hail Matz's though.
<Sigma00> we only accept them in block form
<linux_dr> [1..5].each {|idx| print “hail Matz\n” }
<baweaver> we use puts here son
<shevy> :D
<linux_dr> baweaver: lol
devbug has quit [Read error: Connection reset by peer]
<baweaver> also, 5.times
<Sigma00> ^
<Sigma00> that's the only acceptable answer
* Sigma00 sends linux_dr to ruby hell
<baweaver> we're not python
<Sigma00> a.k.a vbscript
<baweaver> there's more than one way to do things :D
<Sigma00> that way lies acceptance, and that's boring
<Sigma00> STRIFE
<linux_dr> lol
<Sigma00> later
podman has quit [Quit: Connection closed for inactivity]
<linux_dr> baweaver: I have come to Ruby by way of Perl, so I guess TIMTOWTDI is part of the landscape… lol
eggoez has quit [Ping timeout: 244 seconds]
Vile` has quit [Ping timeout: 272 seconds]
<shevy> linux_dr but ruby is elegant
<baweaver> make sure to use the english versions instead of the perlish ones
<linux_dr> baweaver: I don’t think I’d go to that extent in Ruby…
<linux_dr> lol
<baweaver> I've seen some perl people before
AccordLTN has joined #ruby
<shevy> lol
<linux_dr> baweaver: Perl is just one language I’ve done a lot with… I’m actually reaquainting myself with C++ for my current job...
dopie has quit [Quit: This computer has gone to sleep]
<baweaver> I'm between Ruby, Python, Javascript, Java, and Scala at $WORK depending on the day.
<baweaver> notably burning Java and replacing with Scala
<baweaver> used to use Perl
<linux_dr> I think I remember Larry Wall calling Perl a post-modern language… I’m not going to suggest it’s at all less capible than any other language…. but you certainly have to see all the plumbing, etc.
<shevy> it came from the 1980 era philosophy!
<baweaver> let's hope it skipped 1984 ;)
VeryBewitching has quit [Quit: Konversation terminated!]
dionysus69 has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dionysus69 has quit [Ping timeout: 244 seconds]
jgt has joined #ruby
tkuchiki has joined #ruby
eggoez has joined #ruby
nanoz has joined #ruby
<linux_dr> 1980 era philosophy?
devoldmx has joined #ruby
tkuchiki has quit [Ping timeout: 244 seconds]
<linux_dr> “pipes should be seen, not heard”? ;-) lol
<shevy> yeah, back then elegance rarely was a design aim to have
devoldmx has quit [Ping timeout: 246 seconds]
jamesaxl has joined #ruby
athinggoingon has quit [Ping timeout: 250 seconds]
baweaver changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
<baweaver> now we're good
firstdayonthejob has joined #ruby
elperdut has joined #ruby
baweaver has quit [Remote host closed the connection]
elperdut has quit [Client Quit]
diegoviola has quit [Remote host closed the connection]
blik71 has joined #ruby
blik71 has quit [Client Quit]
vdamewood has joined #ruby
rehat has quit [Remote host closed the connection]
atzorvas has joined #ruby
yxhuvud has joined #ruby
DoubleMalt has joined #ruby
linux_dr has quit [Quit: linux_dr]
atzorvas has quit [Quit: leaving]
vinleod has joined #ruby
vdamewood has quit [Ping timeout: 264 seconds]
freezeve_ has joined #ruby
<freezeve_> has anyone implemented dijkstra's algorithm in ruby ?
Meow-J has joined #ruby
Jackneill has joined #ruby
juanpablo_ has joined #ruby
jgt has quit [Ping timeout: 264 seconds]
<morenoh149> freezeve_: some probably has
moeabdol has joined #ruby
juanpablo_ has quit [Ping timeout: 250 seconds]
Alina-malina has quit [Read error: Connection reset by peer]
moeabdol has quit [Client Quit]
Coldblackice has quit [Ping timeout: 264 seconds]
Coldblackice has joined #ruby
<zenspider> freezeve_: absolutely. why are you asking?
<freezeve_> how much hard is it ?
<zenspider> 7
roxtrongo has quit [Read error: No route to host]
<shevy> lol
jenrzzz has quit [Ping timeout: 264 seconds]
Voker57 has joined #ruby
freezeve_ has quit []
freezevee has joined #ruby
<freezevee> I am giving detailed explanations about my problem, don't I ?
<freezevee> lol
yottanami has joined #ruby
<wasamasa> sure
<yottanami> I just created a Rails gem and a sample project to use that gem but I got this error Could not find gem 'makan_rails (>= 0) ruby' in source at ../makan_rails.
<yottanami> Source does not contain any versions of 'makan_rails (>= 0) ruby
<yottanami> in Gemfile I have gem 'makan_rails', path: '../makan_rails'
faces has quit [Ping timeout: 250 seconds]
face has joined #ruby
<freezevee> zenspider: it can't be happening
<freezevee> zenspider: I can't be so fucking stupid
<freezevee> I am giving it up
ghostlines has joined #ruby
coffeecupp__ has quit [Ping timeout: 250 seconds]
lkba has quit [Read error: Connection reset by peer]
tejasmanohar has quit [Quit: tejasmanohar]
Rurik has quit [Read error: Connection reset by peer]
Rurik has joined #ruby
pawnbox has joined #ruby
tejasmanohar has joined #ruby
<jhass> yottanami: you do have a .gemspec in that folder?
QORRiE has joined #ruby
atzorvas has joined #ruby
QORRiE has quit [Changing host]
QORRiE has joined #ruby
atzorvas has joined #ruby
atzorvas has quit [Changing host]
firstdayonthejob has quit [Quit: WeeChat 1.4-dev]
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
yottanami has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
northfurr has quit [Quit: northfurr]
<shevy> hmm I may have a string such as "Array#count" but also "Foobar#lala"; I need to find out whether the first part before the '#' is part of default ruby (stdlib, plain vanilla ruby), which would be the case with Array but not with Foobar. Anyone has an idea how to determine this reliably?
<shevy> ack
djbkd has quit [Ping timeout: 250 seconds]
niko has quit [Ping timeout: 612 seconds]
<jhass> shevy: or you follow the adventures of https://github.com/adaedra/cinch-rubydoc
bubbys has joined #ruby
lipoqil has joined #ruby
solars has joined #ruby
tkuchiki has joined #ruby
dotix has joined #ruby
SCHAAP137 has joined #ruby
dasher00 has quit [Read error: Connection reset by peer]
grenierm has joined #ruby
fedexo has joined #ruby
naftilos76 has joined #ruby
aces1up has joined #ruby
tkuchiki has quit [Ping timeout: 246 seconds]
futilegames has joined #ruby
dotix has quit [Ping timeout: 240 seconds]
<shevy> ruby docs are really strange, look at http://ruby-doc.org/core-2.2.3/
<shevy> on the middle left side there is "Classes"
<shevy> ok, so we can assume that a class would start with an uppercased character
<shevy> and in the listing below, suddenly this shows up: "fatal"
<shevy> and "unknown" hehehehe
<shevy> fatal at least has some explanation http://ruby-doc.org/core-2.2.3/fatal.html
yeticry has quit [Ping timeout: 244 seconds]
<shevy> but the title of the page is so weird ... "Class: fatal (Ruby 2.2.3)"
Jackneill has quit [Remote host closed the connection]
yeticry has joined #ruby
DmitryBochkarev has joined #ruby
Jackneill has joined #ruby
futilegames has quit [Quit: futilegames]
Alina-malina has joined #ruby
acke_ has joined #ruby
acke has quit [Ping timeout: 252 seconds]
eGGsha has joined #ruby
tejasmanohar has quit [Quit: tejasmanohar]
coffeecupp__ has joined #ruby
<jhass> http://docs.ruby-lang.org/ja/2.2.0/library/_builtin.html no unknown in the official docs
tejasmanohar has joined #ruby
dasher00 has joined #ruby
codecop has quit [Remote host closed the connection]
monod has joined #ruby
<shevy> the japanese docu is better than the english one :)
<SCHAAP137> a documentary about Ruby?
<SCHAAP137> :D
<craysiii> how would i go about sending a message from my rails app to a seperate ruby program running on the same machine
<jhass> socket, DRb, Redis, amqp, DBMS, file, ...
<zenspider> freezevee: you're kidding right? "how much hard is it?" is a descriptive question?
<jhass> forget it's rails and Ruby and look at IPC
<craysiii> well i know of socket and pipe, but i also see something called distributed objects?
jgt has joined #ruby
ohaibbq has quit [Remote host closed the connection]
Kyokushin has joined #ruby
<zenspider> drb
<zenspider> not a bad way to go
vinleod is now known as vdamewood
ohaibbq has joined #ruby
tejasmanohar has quit [Quit: tejasmanohar]
<nofxx> craysiii, lots of MQ stuff redis based too. Redis is great for this kind of stuff.
ohaibbq_ has joined #ruby
<nofxx> but drb you avoid a server
jxv has quit [Quit: Leaving]
<jhass> may also want to look at existing solutions for background processing too, ActiveJob, DelayedJob, Sidekiq, Resque...
<jhass> you're vague so it's hard to recommend anything
ohaibbq__ has joined #ruby
<freezevee> zenspider: just kidding
<freezevee> zenspider: I believe I understood the algorithm in theory, I only need to implement it
grenierm has quit [Quit: grenierm]
<freezevee> zenspider: but how do you know that it right ?
ohaibbq__ has quit [Read error: Connection reset by peer]
<craysiii> essentially im just trying to send commands from a rails server to an irc bot when a user hits a certain controller
<zenspider> you write tests
ohaibbq__ has joined #ruby
<freezevee> yes, let's say I find a path
<zenspider> craysiii: drb will do fine. it's very easy to get up and running
<freezevee> how do you know it's right and just a similar implementation
<zenspider> you write GOOD tests
<freezevee> I am doing it for a maze (or a 2d array)
ohaibb___ has joined #ruby
<freezevee> If the array is 100*100 in size, how ?
<zenspider> I don't think I can help you
ohaib____ has joined #ruby
ohaibbq has quit [Ping timeout: 244 seconds]
<zenspider> I only code up to 90x90... that's too hard to test
<freezevee> even in 90x90
<freezevee> and If all results are correct
ohaibbq_ has quit [Ping timeout: 244 seconds]
<freezevee> how do you know that it is indeed the path found by dijkstra
ohaibbq has joined #ruby
<freezevee> I can't do this in paper
<freezevee> to cross check the results
nofxx has quit [Ping timeout: 240 seconds]
ohaibbq_ has joined #ruby
jenrzzz has joined #ruby
ohaibbq__ has quit [Ping timeout: 246 seconds]
<zenspider> !ban ohaibbq !T 1d please fix your connection
ohaibbq was banned on #ruby by ChanServ [ohaibbq!*@*]
ohaibbq was kicked from #ruby by ChanServ [Banned: please fix your connection]
ohaibbq_ has quit [Read error: Connection reset by peer]
ohaibbq_ has joined #ruby
ohaibb___ has quit [Ping timeout: 246 seconds]
<craysiii> do i put drb in my gemfile or does it come with ruby?
<zenspider> !ban ohaib____ !T 1d please fix your connection
ohaib____ was banned on #ruby by ChanServ [ohaib____!*@*]
ohaib____ was kicked from #ruby by ChanServ [Banned: please fix your connection]
ghostlines has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zenspider> craysiii: comes with ruby
<zenspider> !ban ohaibbq_ !T 1d please fix your connection
ohaibbq_ was banned on #ruby by ChanServ [ohaibbq_!*@*]
ohaibbq_ was kicked from #ruby by ChanServ [Banned: please fix your connection]
ohaibbq__ has joined #ruby
<zenspider> !ban ohaibbq__ !T 1d please fix your connection
ohaibbq__ was banned on #ruby by ChanServ [ohaibbq__!*@*]
ohaibbq__ was kicked from #ruby by ChanServ [Banned: please fix your connection]
face has quit [Ping timeout: 240 seconds]
<zenspider> damnit... persistent
face has joined #ruby
acke_ has quit [Remote host closed the connection]
<zenspider> yet another thing that ruboto doesn't support. :/
<jhass> go to bed already :P
jenrzzz has quit [Ping timeout: 250 seconds]
ndrei has quit [Ping timeout: 272 seconds]
<craysiii> wow drb is cool
Vile` has joined #ruby
mprelude has joined #ruby
michael_mbp has quit [Excess Flood]
timonv has joined #ruby
<zenspider> yup!
michael_mbp has joined #ruby
coffeecupp__ has quit [Remote host closed the connection]
godfat has quit [Ping timeout: 246 seconds]
mistermocha has quit [Remote host closed the connection]
leat2 has quit [Remote host closed the connection]
Pupeno has joined #ruby
aces1up has quit []
pawnbox has quit [Remote host closed the connection]
jgt has quit [Ping timeout: 256 seconds]
devoldmx has joined #ruby
moeabdol has joined #ruby
leat2 has joined #ruby
The_Phoenix has quit [Quit: Leaving.]
<craysiii> should i be worried that the only docs i can find for drb are for ruby <= 1.9
monod has quit [Quit: Sto andando via]
<craysiii> im running 2.2.1
pandaant has joined #ruby
devoldmx has quit [Ping timeout: 246 seconds]
<jhass> there, latest and your version
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
nhhagen has joined #ruby
Kyokushin has quit [Ping timeout: 240 seconds]
leat2 has quit [Ping timeout: 268 seconds]
apt-get has joined #ruby
ndrei has joined #ruby
apt-get has quit [Ping timeout: 250 seconds]
Vile` has quit [Ping timeout: 240 seconds]
juanpablo_ has joined #ruby
timonv has quit [Ping timeout: 265 seconds]
Ketchy has joined #ruby
[k- has joined #ruby
jglover has joined #ruby
CloCkWeRX has left #ruby [#ruby]
juanpablo_ has quit [Ping timeout: 244 seconds]
fedexo has quit [Ping timeout: 246 seconds]
fxn has joined #ruby
karapetyan has quit [Remote host closed the connection]
dgs has joined #ruby
poli has joined #ruby
ordepdev has joined #ruby
ordepdev has quit [Remote host closed the connection]
platzhirsch has joined #ruby
Blaguvest has joined #ruby
<zenspider> craysiii: won't matter what version the docs are for. it's stable
kies^ has quit [Quit: baaaaiiiiiiiiiii~]
jglover has quit [Ping timeout: 240 seconds]
kies has joined #ruby
nfk has joined #ruby
apt-get has joined #ruby
lkba has joined #ruby
karapetyan has joined #ruby
QORRiE has quit [Quit: Leaving]
firstdayonthejob has joined #ruby
QORRiE has joined #ruby
howdoicomputer has quit [Ping timeout: 260 seconds]
acke has joined #ruby
bigkevmcd has quit [Read error: Connection reset by peer]
bigkevmcd has joined #ruby
Kyokushin has joined #ruby
<zenspider> gah. so... I've been cleaning up getting ready for a release of the revamped version of my gem ...
<zenspider> despite having working on it for a couple weeks now, all of a sudden it's not building from clean
Kyokushin has quit [Client Quit]
platzhirsch has quit [Ping timeout: 252 seconds]
<zenspider> "Don't know how to build task 'ext/ext/sdl/extconf.rb/extconf.rb'"
Rurik has quit [Quit: Leaving]
<zenspider> ext/ext ??
<zenspider> I have NO clue what I changed that could have broke this in this way
Rurik has joined #ruby
<zenspider> rake-compiler hasn't changed in a long time...
armyriad has quit [Quit: Leaving]
tkuchiki has joined #ruby
niko has joined #ruby
michael_mbp has quit [Excess Flood]
stamina has joined #ruby
tkuchiki has quit [Ping timeout: 246 seconds]
acke has quit [Remote host closed the connection]
michael_mbp has joined #ruby
stamina has quit [Remote host closed the connection]
stamina has joined #ruby
Jameser has joined #ruby
sdothum has joined #ruby
Rurik has quit [Remote host closed the connection]
Rurik has joined #ruby
Jameser` has joined #ruby
Jameser has quit [Remote host closed the connection]
Jameser` has quit [Remote host closed the connection]
Ketchy has quit [Quit: Leaving]
Jameser has joined #ruby
dotix has joined #ruby
ruby-lang858 has joined #ruby
ruby-lang858 has quit [Client Quit]
ordepdev has joined #ruby
dotix has quit [Ping timeout: 240 seconds]
jamesaxl|2 has joined #ruby
bubbys has quit [Ping timeout: 252 seconds]
jamesaxl has quit [Ping timeout: 246 seconds]
FernandoBasso has joined #ruby
Azure has quit [Excess Flood]
zenguy_pc has joined #ruby
Azure has joined #ruby
bubbys has joined #ruby
<zenguy_pc> boolean_3 = 2**3 == 8 && 3**2 == 9
<zenguy_pc> boolean_3 = false
<shevy> hehe
<zenguy_pc> first statement is true and second statement is false
<zenguy_pc> right?
<zenguy_pc> 27 uis equal to 9 is false right?
<zenguy_pc> is*
<zenguy_pc> so true && false = false
<[k-> both statements are true
<[k-> this is likely a precedence issue
<zenguy_pc> oh crap.. for some reason i thought 3**2 was 3 x 3 x 3 =27
<zenguy_pc> i did that twice for some reason
<zenguy_pc> thanks
<zenspider> can't assign to false
<zenguy_pc> true && true = true
<zenspider> can't assign to true
dionysus69 has joined #ruby
Jameser has quit [Ping timeout: 256 seconds]
nettoweb has joined #ruby
ordepdev has quit [Remote host closed the connection]
<shevy> :D
Alina-malina has quit [Ping timeout: 246 seconds]
<[k-> in other words, be distinct in what you mean. use = for assignment and == for equality
Jameser has joined #ruby
<zenguy_pc> i got that from codecademy
<zenguy_pc> oh .. i see what you mean
moeabdol has quit [Ping timeout: 240 seconds]
<zenguy_pc> they gave me a state and the following line had a variable = blank. i replace blank with true
leat2 has joined #ruby
<zenguy_pc> i can now see why you mentioned the assign and assignment thing in this context,, i'll be mindful of that in the future
dgs has quit [Quit: dgs]
Alina-malina has joined #ruby
jgt has joined #ruby
jgt has quit [Ping timeout: 244 seconds]
<atmosx> I'm creating a quots API and I have death/birth dates for 'Person'. I wonder, is it a good idea to use db type DateTime or Date when... I don't have the month/day of the death of ppl who livedin ancient times
<atmosx> isn't string better?
platzhirsch has joined #ruby
nanoz has quit [Read error: Connection reset by peer]
bonhoeffer has joined #ruby
bubbys has quit [Ping timeout: 264 seconds]
bubbys has joined #ruby
tno has quit [Remote host closed the connection]
AlexRussia has joined #ruby
sepp2k has joined #ruby
jenrzzz has joined #ruby
morenoh149 has quit [Ping timeout: 272 seconds]
ghostlines has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
[k-_ has joined #ruby
devoldmx has joined #ruby
howdoicomputer has joined #ruby
bubbys has quit [Ping timeout: 250 seconds]
bubbys has joined #ruby
apt-get has quit [Read error: No route to host]
devoldmx has quit [Ping timeout: 260 seconds]
<jhass> one would think people had invented a datetime data types with unknown values by now
<shevy> then we could no longer enjoy the end of the world in 2038
<atmosx> jhass: what about people who are still alive? how would you for 'present' ?
moeabdol has joined #ruby
<jhass> I'd set death_date to null
<atmosx> jhass: what about socrates, he died in 399 BC how would use that?
<atmosx> I mean, you have only year, not month/day
<jhass> yeah, that's what I meant with my previous comment
<atmosx> hm
<jhass> datetimes should allow an "unknown" value for their components
<jhass> dunno if anybody did that somewhere yet
<jhass> I guess you could break it out on the schema level, death_year, death_month, death_day but ugh
<atmosx> jhass: yeah
<atmosx> that's ugly but could work.
<atmosx> brb
juanpablo_ has joined #ruby
<[k-_> and by seconds
<[k-_> and microseconds
<[k-_> because, who knows how much the government wants in the future
tkuchiki has joined #ruby
<zenguy_pc> can unless be assigned an expression instead of just true or false?
Jameser has quit [Ping timeout: 250 seconds]
jdawgaz has joined #ruby
bubbys has quit [Ping timeout: 240 seconds]
<jhass> probably, what do you mean?
bubbys has joined #ruby
<zenguy_pc> statement = 2**3 == 8
juanpablo_ has quit [Ping timeout: 265 seconds]
<zenguy_pc> print "Good to go!" unless statement
allomov has joined #ruby
<zenguy_pc> or this: statement = (2**3 == 8)
tkuchiki has quit [Ping timeout: 240 seconds]
<[k-_> you aren't assigning anything to unless
<zenguy_pc> statement = 2**3 == 9
<zenguy_pc> print "Good to go!" unless statement
<zenguy_pc> that worked
<zenguy_pc> before i got nil ouput
<[k-_> yes, that isnt a syntax error
<[k-_> unless means "if not"
<[k-_> since statement was true in the first case
<[k-_> you can translate the print statement as: print "Good to go!" if !true
charliesome has joined #ruby
Jameser has joined #ruby
<[k-_> therefore, it can be further rewritten as: if (!true == true) { print "Good to go!" }
<[k-_> and ruby would not have to print anything at all
<karapetyan> hello!
<zenguy_pc> print "Good to go!" if !#{statement} ... does that make sense?
<karapetyan> could you help me to understand this example
<[k-_> that is a syntax error
<karapetyan> (5..10).inject { |sum, n| sum + n }
<shevy> zenguy_pc use unless, and get rid of #{}
<zenguy_pc> ok
eGGsha has quit [Quit: Textual IRC Client: www.textualapp.com]
<[k-_> zenguy_pc: assigning is different from an expression
<[k-_> you can't assign an expression to unless
<jhass> karapetyan: did you read inject's docs yet?
<zenguy_pc> [k-: expression is the use of ( ) ?
<[k-_> no, an expression is what you can get a value out of
<karapetyan> jhass: yes, but i don't understand
<karapetyan> Combines all elements of enum by applying a binary operation, specified by a block or a symbol that names a method or operator.
<jhass> karapetyan: yeah okay granted, that's not too well worded
<karapetyan> what does mean binary operation?
mooe has quit [Quit: Connection closed for inactivity]
<jhass> karapetyan: inject iterates over the collection you invoke it on. it yields the return value of the block from the last iteration and the current item. On the first iteration it yields the two first elements of the collection
<shevy> bool true/false
<shevy> 0/1
<karapetyan> jhass: thanks. :)
<jhass> karapetyan: so for your example the block gets 5, 6, 5+6 = 11, 11, 7, 11+7 = 18, 18, 8, 18+8 = 26, 26, 9, 26+9 = 35, 35, 10, 35 + 10 = 45
bonhoeffer has quit [Quit: bonhoeffer]
<karapetyan> thanks! :)
<karapetyan> jhass: perfect!)
Coldblackice has quit [Ping timeout: 252 seconds]
<karapetyan> jhass: can i use inject for array of numbers ?
<jhass> karapetyan: you can also specify the first item by passing an argument, (5..10).inject(0) {|sum, n| sum + n }, then it starts of with 0, 5, 0+5 = 5
<jhass> karapetyan: yes, any enumerable
<karapetyan> jhass: reduce is alias for inject?
<jhass> yes
<jhass> some languages also call this function foldl
leafybasil has joined #ruby
QORRiE has quit [Quit: Leaving]
<karapetyan> jhass: thx, (1..value).inject(:*) is it factorial ?
fxn has quit [Quit: zZzZzZ...]
<jhass> I guess so, yeah
<karapetyan> actually in some examples i need to add 1, but i don't undertand why (1..value).inject(1, :*)
<[k-_> (there is also foldr but it has no usecase in ruby)
<[k-_> the first argument would be the starting value
<jhass> karapetyan: what if value is 1 or 0? the collection is empty/doesn't have enough elements
<jhass> so you have to add one to be on the safe side
<karapetyan> jhass: ok undertand
<karapetyan> thanks guys
<jhass> ?guys karapetyan
<ruboto> karapetyan, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
ordepdev has joined #ruby
<karapetyan> ruboto: ok, sorry folks :)
QORRiE has joined #ruby
<karapetyan> ruboto: actually i really appreciate for you help
<jhass> ?justabot
<ruboto> I'm just a bot. You don't need to address me.
<karapetyan> oh
<karapetyan> :$
Silox| has joined #ruby
<j416> ?gals
<ruboto> I don't know anything about gals
ghostlines has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k-_> is literate programming supported in ruby?
<shevy> it's english!
<shevy> you could say that many domain specific languages are literate programming, aren't they?
badbodh has joined #ruby
badbodh has joined #ruby
ndrei has quit [Ping timeout: 265 seconds]
<[k-_> example?
krz has joined #ruby
danieli has joined #ruby
<shevy> dunno, they are all ugly
ordepdev has quit [Remote host closed the connection]
northfurr has joined #ruby
<[k-_> do you literate program?
nhhagen has quit [Remote host closed the connection]
CorpusCallosum has quit [Ping timeout: 272 seconds]
legion_ has joined #ruby
sdfgsdfg has joined #ruby
<legion_> hlo
<legion_> guys any1 of u used packetfu?
tkuchiki has joined #ruby
<shevy> [k-_ I write poetry
k3asd` has joined #ruby
<legion_> any1...?
sdfgsdfg has quit [Read error: Connection reset by peer]
<karapetyan> factorial_arr << same.values.each { |value| (1..value).inject(1, :*) }
<karapetyan> same = hash
<legion_> PACKETFU.............
<legion_> ?????????????//
leat2 has quit [Remote host closed the connection]
leat2 has joined #ruby
Jameser has quit [Ping timeout: 250 seconds]
youngbaks has joined #ruby
<[k-_> but do you literate programming?
<[k-_> legion_: please write sensibly
howdoicomputer has quit [Ping timeout: 250 seconds]
tkuchiki_ has joined #ruby
<legion_> ok [k- , wanna know something about packetfu
<[k-_> ?ask
<ruboto> Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
<[k-_> ?pm legion_
<ruboto> legion_, I don't know anything about pm
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<legion_> ah ok Thanks, not much familiar with the rules here
<jhass> !fact mk pm Please see Rule 2.9 http://ruby-community.com/pages/user_rules#rule_2_9
<ruboto> jhass, I will remember that pm is Please see Rule 2.9 http://ruby-community.com/pages/user_rules#rule_2_9
timonv has joined #ruby
tkuchiki has quit [Ping timeout: 256 seconds]
<legion_> ah ok went through them, Thanks)
aces1up has joined #ruby
<jhass> karapetyan: is there a question ?
<karapetyan> jhass: already fixed, sorry
<legion_> is there any method in packetfu to view the [HTTP]S requests and their corresponding data?
<aces1up> what is something i can use to comapare a string against an array of strings for the closest match case insensetive?
<karapetyan> jhass: still trying to beat rabbits :$
leat2 has quit [Remote host closed the connection]
morenoh149 has joined #ruby
leat2 has joined #ruby
<[k-_> aces1up: maybe a reduce
<[k-_> but, using a reduce would be more difficult
Guest45 has joined #ruby
Guest45 has quit [Client Quit]
<aces1up> hrmm just looking for maybe a gem or something?
<[k-_> look up levenstein's distance
<[k-_> look up a gem that does levenstein's distance
havenwood has joined #ruby
slayerjain has joined #ruby
<[k-_> i think it is under natural language in awesomeruby.com
leafybasil has quit [Remote host closed the connection]
<jhass> aces1up: look up the levenshtein distance, get a gem for it or implement it yourself, then use min_by
<aces1up> ok
<aces1up> checking it out now
Rurik has quit [Read error: Connection reset by peer]
leafybasil has joined #ruby
matp has quit [Ping timeout: 264 seconds]
Rurik has joined #ruby
dagda1_ has joined #ruby
<havenwood> >> require 'rubygems/text'; include Gem::Text; levenshtein_distance 'awesomeruby', 'awesome-ruby'
<ruboto> havenwood # => 1 (https://eval.in/432337)
<havenwood> aces1up: gem install damerau-levenshtein
<havenwood> aces1up: require 'damerau-levenshtein'; DamerauLevenshtein.distance 'x', 'y'
nsuke has quit [Remote host closed the connection]
oo_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
<aces1up> hey i have a few scripts i want to make into executables is there any recent good ruby to exe gems?
<slayerjain> hello guys, new to ruby, what's the best way to learn ruby?
<[k-_> i just realised i spelt levenshtein distance wrongly :(
<jhass> slayerjain: what's your background?
_aeris_ has quit [Quit: ZNC - http://znc.sourceforge.net]
<[k-_> slayerjain: everyone has different methods more suited to them
<shevy> slayerjain work through https://pine.fm/LearnToProgram/chap_01.html
<havenwood> aces1up: RubyGems has a convention for executables: http://guides.rubygems.org/make-your-own-gem/#adding-an-executable
<legion_> yeah Ocra is awesome
<jhass> havenwood: devdocs.io needs to add rubygems to the index -.-
tkuchiki_ has quit [Remote host closed the connection]
<aces1up> i have used orca in the past, thought there might be some new and shiny now
<havenwood> jhass: mmm
<slayerjain> i have mediocre experience with C,c++, java and swift. I am pursuing CS major
<[k-_> havenwood: why did you not tell us this "rubygems/<gem>" secret before?
<legion_> i checked last and found ocra on top
leafybasil has quit [Ping timeout: 265 seconds]
<havenwood> slayerjain: That's a good start. Here are some links: http://ruby-community.com/pages/links
badbodh_1 has joined #ruby
<jhass> slayerjain: might even just straight hop into the rubykoans then
<havenwood> slayerjain: The Well-Grounded Rubyist, Second Edition or the Ruby Programming Language are good books.
<legion_> codecademy for beginners
<slayerjain> cool thanks! is koans free?
<jhass> yup
aces1up has quit []
<jhass> linked at havenwood's link
<slayerjain> cool! thanks guys , really appreciated
<havenwood> [k-_: I have!
<jhass> ?guys slayerjain ;)
<ruboto> slayerjain, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
CustosL1m3n has quit [Ping timeout: 272 seconds]
<slayerjain> sure duly noted
<legion_> everyone help me
<[k-_> havenwood: when? why didnt i know :(
<[k-_> shevy: 20:31:56 ([k-_) but do you literate programming?
atzorvas has quit [Quit: leaving]
devoldmx has joined #ruby
youngbaks has quit [Ping timeout: 250 seconds]
codecop has joined #ruby
<havenwood> [k-: I guess it's been a while since I've mentioned it.
<slayerjain> once again, thanks everyone
platzhirsch has left #ruby [#ruby]
badbodh has quit [Disconnected by services]
badbodh_1 is now known as badbodh
badbodh has quit [Changing host]
badbodh has joined #ruby
youngbaks has joined #ruby
legion_ has left #ruby ["Leaving"]
lkba has quit [Ping timeout: 250 seconds]
acke has joined #ruby
Jameser has joined #ruby
<shevy> [k-_ I do poetry
devoldmx has quit [Ping timeout: 250 seconds]
<[k-_> shevy: 20:31:56 ([k-_) but do you literate programming?
<shevy> [k-_ I do poetry
xcesariox has joined #ruby
karapetyan has joined #ruby
jenrzzz has joined #ruby
<[k-_> shevy: 20:31:56 ([k-_) but do you literate programming?
<[k-_> you arent answering the question that i understand!
<j416> what is the question that you understand
<j416> :O
<shevy> but it was answered!
acke has quit [Remote host closed the connection]
<shevy> we have reached the age of poetry in code
<shevy> do not remain in the distant past [k-_
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bkxd has quit [Ping timeout: 240 seconds]
_aeris_ has joined #ruby
<shevy> the next evolutionary step is to let robots program for us
acke has joined #ruby
<[k-_> what has poetry in someplace got to do with literature in programming?
<shevy> literature means something to read right
tvw has joined #ruby
<[k-_> no...
<[k-_> answer my question!
<[k-_> yes/no
<shevy> of course it means to read
<[k-_> something to read != to read
<shevy> come to the modern era [k-_
<[k-_> have you read up on literate programming shevy?
karapetyan has quit [Ping timeout: 264 seconds]
<shevy> look there
<shevy> look at the ugliness
<shevy> else if (c != ' ' && c != '\t') continue;
<shevy> wow 1984
<shevy> you weren't even born then [k-_
Meow-J has quit [Quit: Connection closed for inactivity]
<Aeyrix> That's ten years older than me.
<shevy> really?
<Aeyrix> Yep.
slayerjain has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
acke_ has joined #ruby
<[k-_> look shevy, you are so oooold
<[k-_> yet you claim to be in the modern era!
<Aeyrix> Heh.
<shevy> :(
bonhoeffer has joined #ruby
Jameser has quit [Ping timeout: 260 seconds]
charliesome has joined #ruby
bkxd has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
r_baron has joined #ruby
acke has quit [Ping timeout: 240 seconds]
acke_ has quit [Read error: Connection reset by peer]
acke has joined #ruby
<shevy> yeah, oldschool
<shevy> 1984
<[k-_> no, it's newskool
<[k-_> it's what the cool kids do
jenrzzz has joined #ruby
youngbaks has quit [Ping timeout: 244 seconds]
<[k-_> also, Happy Programmers' Day!
<[k-_> Donald Knuth invented literate programming
<[k-_> if you want to quote him using that video, you already lost
youngbaks has joined #ruby
pwnd_nsfw has joined #ruby
<shevy> 1984
jenrzzz has quit [Ping timeout: 240 seconds]
bkxd has quit [Quit: leaving]
dionysus69 has quit [Ping timeout: 244 seconds]
k3asd` has quit [Ping timeout: 264 seconds]
fxn has joined #ruby
bonhoeffer_ has joined #ruby
<[k-_> your face is 1984
<[k-_> your face is older than 1984!
<[k-_> oooooooo #harshburn
bonhoeffer has quit [Ping timeout: 256 seconds]
bonhoeffer_ is now known as bonhoeffer
<[k-_> "write computer programmes on sheets of paper on the spot."
<[k-_> can you do that shevy?
<shevy> dunno
<shevy> I got an editor
<shevy> I do sometimes write notes down on paper with a pencil though
<shevy> for ruby-gnome user interface that seems to be more necessary :(
<jamesaxl|2> hello
fxn has quit [Quit: zZzZzZ...]
jcoe has joined #ruby
Zai00 has joined #ruby
<havenwood> jamesaxl|2: hi
dorei has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
lkba has joined #ruby
<[k-_> good morning
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kobain has joined #ruby
leafybasil has joined #ruby
hinbody has joined #ruby
tmtwd has joined #ruby
howdoicomputer has joined #ruby
psy_ has joined #ruby
pwnd_nsfw has quit [Quit: Leaving]
acke has quit [Remote host closed the connection]
matp has joined #ruby
danieli has quit [Quit: *does an epic backflip into nowhere*]
rbennacer has joined #ruby
pwnd_nsfw has joined #ruby
howdoicomputer has quit [Ping timeout: 252 seconds]
juanpablo_ has joined #ruby
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
oo_ has quit [Remote host closed the connection]
juanpablo_ has quit [Ping timeout: 250 seconds]
Omni_ has quit [Ping timeout: 264 seconds]
youngbaks has quit [Ping timeout: 240 seconds]
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
atomical has joined #ruby
leat2 has quit [Ping timeout: 240 seconds]
Guest49587 has joined #ruby
jeanlinux has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tkuchiki has joined #ruby
slayerjain has joined #ruby
gregf has quit [Quit: WeeChat 1.3]
slayerjain has quit [Client Quit]
Rurik has quit [Ping timeout: 244 seconds]
Hrorek has joined #ruby
tkuchiki has quit [Ping timeout: 244 seconds]
mary5030 has joined #ruby
gregf has joined #ruby
[k-_ has quit [Ping timeout: 272 seconds]
[k-_ has joined #ruby
jgt has joined #ruby
ebbflowgo has joined #ruby
karapetyan has joined #ruby
ebbflowgo has quit [Client Quit]
karapetyan has quit [Ping timeout: 250 seconds]
dionysus69 has joined #ruby
<[k-_> how did the topic change? :O
allomov has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
mary5030 has quit [Ping timeout: 246 seconds]
leat2 has joined #ruby
<shevy> people are lazy on sundays
Zai00 has quit [Quit: Zai00]
Meow-J has joined #ruby
pawnbox has joined #ruby
<[k-_> hm the topic didnt change
<[k-_> i wonder why my client showed it again
jeanlinux has quit [Read error: Connection reset by peer]
Zai00 has joined #ruby
pandaant has quit [Quit: Lost terminal]
dotix has joined #ruby
Rickmasta has joined #ruby
moeabdol has quit [Ping timeout: 264 seconds]
imperator has joined #ruby
jeanlinux has joined #ruby
zenguy_pc2 has joined #ruby
zenguy_pc2 has quit [Read error: Connection reset by peer]
last_staff has joined #ruby
dotix has quit [Ping timeout: 264 seconds]
solocshaw has joined #ruby
zenguy_pc has quit [Ping timeout: 272 seconds]
Outlastsheep has joined #ruby
Hrorek has quit [Changing host]
Hrorek has joined #ruby
Hrorek is now known as Rurik
acke has joined #ruby
lkba_ has joined #ruby
Rollabunna has quit [Remote host closed the connection]
acke has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 244 seconds]
iateadonut has quit [Quit: Leaving.]
howdoicomputer has joined #ruby
segfalt has joined #ruby
oo_ has joined #ruby
Zai00 has quit [Quit: Zai00]
howdoicomputer has quit [Ping timeout: 250 seconds]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
oo_ has quit [Ping timeout: 244 seconds]
dasher00 has quit [Read error: Connection reset by peer]
solars has quit [Ping timeout: 240 seconds]
beast has joined #ruby
lavros has quit [Quit: leaving]
jeanlinux has quit [Read error: Connection reset by peer]
<shevy> The file in question is fairly big. Is there a better way to count how many lines contain the substring '[]'?
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
<Papierkorb> shevy: File.open('..').grep('[]').count
Rollabunna has joined #ruby
<Papierkorb> shevy: That, or with File.readlines().
tkuchiki has joined #ruby
badbodh_1 has joined #ruby
badbodh_1 has quit [Remote host closed the connection]
Zai00 has joined #ruby
<imperator> shevy, IO.foreach if you're worried about memory
badbodh_1 has joined #ruby
<Papierkorb> shevy: actually, this should be better: File.readlines('..').count{|line| line.include? '[]'}
<Papierkorb> Doesn't allocate another huge array just for the size
lkba_ has quit [Read error: Connection reset by peer]
lkba has joined #ruby
badbodh has quit [Ping timeout: 250 seconds]
Zai00 has quit [Client Quit]
tkuchiki has quit [Ping timeout: 244 seconds]
tvw has quit []
voltalio has joined #ruby
veduardo has joined #ruby
dasher00 has joined #ruby
jdawgaz has joined #ruby
saddad has joined #ruby
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
naftilos76 has quit [Ping timeout: 240 seconds]
r_baron_ has joined #ruby
jcoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
r_baron has quit [Ping timeout: 260 seconds]
kirun has joined #ruby
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
moeabdol has joined #ruby
vdamewood has quit [Quit: Life beckons.]
jcoe has joined #ruby
djangoJocky has joined #ruby
apt-get has joined #ruby
jcoe has quit [Client Quit]
ordepdev has joined #ruby
djangoJocky has left #ruby [#ruby]
Soda has joined #ruby
nettoweb has quit [Read error: Connection reset by peer]
dgutierrez1287 has joined #ruby
Adran has quit [Remote host closed the connection]
Soda has quit [Remote host closed the connection]
Hrorek has joined #ruby
Rurik has quit [Read error: Connection reset by peer]
k3asd` has joined #ruby
Swappticon has joined #ruby
elperdut has joined #ruby
ordepdev has quit [Remote host closed the connection]
Adran has joined #ruby
ziro` has joined #ruby
juanpablo_ has joined #ruby
Azure has joined #ruby
xcesariox has joined #ruby
<ziro`> i’ve got a gem that won’t build properly because of a missing build configuration (x86_64-alpine-linux) is there anything I can do it skirt this?
<ziro`> I’m sure another profile would probably work fine?
<[k-> mkmf?
<hanmac> ziro`: have you installed ruby build stuff ? like that stuff ruby need to build gems?
dionysus69 has quit [Ping timeout: 246 seconds]
<[k-> hanmac!
juanpablo_ has quit [Ping timeout: 240 seconds]
<[k-> shevy!
<[k-> friends!
<ziro`> hanmac: yeah, I’ve jsut found a package for my dist that should hopefully satisfy what the gem is trying to build manually
<ziro`> I’m trying to `gem install compass` which depends on libffi which is falling over when it goes to build it
karapetyan has joined #ruby
<ziro`> I guess the bundled version doesn’t come with the build config for alpine-linux (for good reason)
fxn has joined #ruby
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<hanmac> ziro`: ffi gem does need libffi, gems cant install system packages you need to do that yourself
Neverdie has joined #ruby
TheRealSouthner has joined #ruby
<ziro`> eugh, ok, the gem still insists on building it’s own libffi
<ziro`> or, at least the extension the gem is using
<hanmac> yeah the gem might need to build against your system that might take some time
<ziro`> no, as in, it’s not working because the ffi gem builds an extension on my machine which it does not have a configuration for
karapetyan has quit [Ping timeout: 246 seconds]
jgt has quit [Ping timeout: 264 seconds]
n1lo has quit [Ping timeout: 240 seconds]
saddad has quit [Ping timeout: 264 seconds]
allomov has joined #ruby
Vile` has joined #ruby
<ziro`> Although it’s not my gist, this is the error: https://gist.github.com/inkel/f69bd41cb0dc496e55ed
Soda has joined #ruby
allomov has quit [Remote host closed the connection]
jacksonmills has joined #ruby
Hrorek has quit [Read error: Connection reset by peer]
Rurik has joined #ruby
phutchins has joined #ruby
skinkitten has joined #ruby
oo_ has joined #ruby
<hanmac> ziro`: ruby cant find the lib do you really have the package and the dev package installed?
skinkitten has quit [Max SendQ exceeded]
badbodh_1 has quit [Remote host closed the connection]
danieli has joined #ruby
allomov has joined #ruby
howdoicomputer has joined #ruby
rnga has joined #ruby
<ziro`> I have ruby-dev package installed
mleung has joined #ruby
<ziro`> I have a package under then name ‘libffi’ installed
nettoweb has joined #ruby
monod has joined #ruby
badbodh has joined #ruby
<havenwood> ziro`: How bout libffi-dev?
<ziro`> However when I gem install compass, when resolving it’s dependencies it seems to be building something in the ffi gem, regardless
oo_ has quit [Ping timeout: 246 seconds]
TheRealSouthner has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<ziro`> havenwood: unfortunately I have no such pre-built package available
allomov has quit [Ping timeout: 244 seconds]
<ziro`> havenwood: Oh, yes I do
<ziro`> sec
<shevy> checking for ffi.h... no
morenoh149 has quit [Ping timeout: 256 seconds]
xblade has joined #ruby
<shevy> you need that
shinnya has joined #ruby
<ziro`> shevy: sure, I’m on it
MichaelSmith has joined #ruby
<ziro`> I’m sure this libffi-devel package will help
<freezevee> I have this hash : hash = {:id=>0, :neighs=>[8, 1], :dist=>1, :prev=>nil}
imperator has quit [Quit: Valete!]
<freezevee> How do I get the first value of the array ?
<havenwood> freezevee: hash[:neighs].first
<freezevee> hash[:neighs] brings them all but hash[:neighs[0]] is not working
tkuchiki has joined #ruby
<freezevee> can I retrieve whichever I want ?
badbodh has quit [Remote host closed the connection]
<freezevee> If the array size is 10 how to get the a[8] for example
<freezevee> got it
<freezevee> hash[:neighs][8]
<freezevee> thanks !
Soda has quit [Remote host closed the connection]
phutchins has quit [Ping timeout: 246 seconds]
pwnd_nfsw has joined #ruby
<ziro`> shevy: havenwood: issue resolved, ta
xblade has quit [Remote host closed the connection]
umgrosscol has joined #ruby
pwnd_nsfw has quit [Ping timeout: 246 seconds]
pyon has joined #ruby
mleung has quit [Quit: mleung]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jglover has joined #ruby
<shevy> \o/
pwnd_nfsw is now known as pwnd_nsfw
jglover has quit [Client Quit]
veduardo has quit [Ping timeout: 246 seconds]
zotherstupidguy has joined #ruby
zotherstupidguy has quit [Client Quit]
zotherstupidguy has joined #ruby
tkuchiki has quit [Remote host closed the connection]
devoldmx has joined #ruby
dotix has joined #ruby
dagda1_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
dagda1 has joined #ruby
devoldmx_ has joined #ruby
bigkevmcd has quit [Ping timeout: 256 seconds]
finisherr has joined #ruby
devoldmx has quit [Ping timeout: 265 seconds]
bigkevmcd has joined #ruby
dotix has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
saddad has joined #ruby
TheRealSouthner has joined #ruby
Silox| has quit [Quit: Connection closed for inactivity]
TheRealSouthner has quit [Client Quit]
Swappticon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 246 seconds]
leat2 has quit [Quit: leat2]
leat has joined #ruby
Marsupermammal has joined #ruby
CustosLimen has quit [Read error: Connection timed out]
acke has joined #ruby
CustosLimen has joined #ruby
beast has quit [Remote host closed the connection]
David27 has joined #ruby
shevy has left #ruby ["I'll be back ... maybe"]
shevy has joined #ruby
northfurr has quit [Quit: northfurr]
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
codecop has quit [Remote host closed the connection]
houhoulis has joined #ruby
CustosLimen has quit [Max SendQ exceeded]
athinggoingon has joined #ruby
rodfersou has joined #ruby
<shevy> yo people
<shevy> code code code!
<[k-> .
ponga has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Ox0dea has joined #ruby
<Ox0dea> jhass: https://git.io/vZi9k
<Ox0dea> Maeda-san seems to think ?c is still okay.
hinbody has quit [Quit: leaving]
monod has quit [Ping timeout: 244 seconds]
oo_ has joined #ruby
<jhass> old habits are hard to get rid of
Marsupermammal has quit [Ping timeout: 255 seconds]
badbodh has joined #ruby
oo_ has quit [Ping timeout: 255 seconds]
dionysus69 has joined #ruby
michael_mbp has quit [Excess Flood]
[k-_ has quit [Quit: Lingo: www.lingoirc.com]
JDiPierro has joined #ruby
dopie has joined #ruby
howdoi has joined #ruby
godfat has joined #ruby
bonhoeffer has joined #ruby
michael_mbp has joined #ruby
bonhoeffer has quit [Client Quit]
moeabdol has quit [Read error: Connection reset by peer]
moeabdol has joined #ruby
UtkarshRay has quit [Remote host closed the connection]
naftilos76 has joined #ruby
tejasmanohar has joined #ruby
fxn has quit [Quit: zZzZzZ...]
allomov has joined #ruby
gambl0re has joined #ruby
nateberkopec has joined #ruby
taylorrf has joined #ruby
Blaguvest has quit [Ping timeout: 250 seconds]
r_baron_ has quit [Ping timeout: 244 seconds]
shevy has quit [Ping timeout: 256 seconds]
dopie has quit [Quit: This computer has gone to sleep]
tkuchiki has joined #ruby
tejasmanohar has quit [Quit: tejasmanohar]
chouhoulis has joined #ruby
shevy has joined #ruby
<gavit> anyone know how to enter a datetime ntrie in csv for sqlite?
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
tkuchiki has quit [Ping timeout: 244 seconds]
hanmac has quit [Ping timeout: 244 seconds]
<gavit> i thought 2015-01-01 12:00 would be fine
<Ox0dea> gavit: https://archive.is/FuwE#selection-507.0-507.16
juanpablo_ has joined #ruby
k3asd` has quit [Ping timeout: 265 seconds]
timonv has quit [Ping timeout: 244 seconds]
juanpablo_ has quit [Ping timeout: 240 seconds]
<shevy> perhaps he was using ?a because he can save one character compared to 'a'
morenoh149 has joined #ruby
elfuego has joined #ruby
jgt has joined #ruby
<Ox0dea> I do it because my editor highlights it differently. Greater information density with fewer characters? Yes, please.
karapetyan has joined #ruby
atmosx_ has joined #ruby
lkba has quit [Ping timeout: 260 seconds]
platzhirsch has joined #ruby
Azure has quit [Ping timeout: 244 seconds]
<freezevee> I have an array as @uninvited_set, then I set unvisited_set = @unvisited_set and unvisited_set.shift. Why does the first element gets removed also from @unvisited_set ?
hanmac has joined #ruby
<Ox0dea> freezevee: Because that's what Array#shift does.
<freezevee> from the array I am requesting it
<freezevee> but why from the related one ?
<Ox0dea> >> foo = [1, 2, 3]; foo.shift; foo # freezevee
<ruboto> Ox0dea # => [2, 3] (https://eval.in/432361)
<freezevee> I know this
<freezevee> a= [1,2,3] then b = a and b.shift
lkba has joined #ruby
<freezevee> then a = [2,3]
<freezevee> why ?
<Ox0dea> freezevee: #shift modifies the Array in-place.
<Ox0dea> By assigning it to another identifier, you're just giving yourself two references to the same (modified) Array.
<freezevee> also .delete does the same
<shevy> freezevee think of it as "I'm gonna shake that array until one element comes out permanently!"
<freezevee> makes sense
<freezevee> but seems a bit strange to me
<freezevee> because it doesn't act as variables
<Ox0dea> What do you mean?
<shevy> good old perl had similar operations
<Ox0dea> freezevee: I think you're just not quite clear on what it means to be a reference.
<freezevee> has it the same meaning as C references ?
<Ox0dea> Roughly.
<freezevee> now I get it
<freezevee> makes sense
<freezevee> how do we overcome it ?
<freezevee> copy the array ?
<shevy> you don't have to use .shift
dasher00 has quit [Ping timeout: 246 seconds]
<Ox0dea> Sure, if that's what you think needs to be done.
<shevy> you can use [] and positions
<freezevee> I want to remove the first element in each iteration
<shevy> ah, well then ;)
<Ox0dea> freezevee: Are you sure?
<freezevee> yes
<Ox0dea> You can't just iterate over them?
<freezevee> I am trying to implement dijkstra's
<Ox0dea> A*, you mean?
<freezevee> Dijkstra's
elperdut has joined #ruby
<freezevee> I don't know If it's called A* also, I believe they're different
<Ox0dea> No, they're different, but how come you're doing Dijkstra's?
<freezevee> so I have an array with some values and I want to shift the first value of it until it empties
<freezevee> and then use the array again
elperdut has quit [Client Quit]
<freezevee> I am practising with an exercise
<freezevee> pathfinding
<freezevee> on a 2D array
<freezevee> but my problem is simpler than that
umgrosscol has quit [Quit: End of Line]
tejasmanohar has joined #ruby
<freezevee> I mean, I can't get it how to "copy" a table actually
<Ox0dea> freezevee: You just #dup the Array.
<freezevee> maybe b = Array.new( a ) ?
chouhoulis has quit [Remote host closed the connection]
<Ox0dea> Just `b = a.dup`.
<freezevee> aha
<freezevee> let me search for dup
shinnya has quit [Ping timeout: 264 seconds]
<freezevee> never heard of it
<Ox0dea> &ri Object#dup
nettoweb has quit [Read error: Connection reset by peer]
<apt-get> what's the best ruby project structure for something that will NOT be a gem / use rack?
elperdut has joined #ruby
<apt-get> it's a bit more than a script
<havenwood> apt-get: So a gem? :P
<apt-get> but I also want to package it for windows
<Ox0dea> apt-get: You're not going to release it for wider use?
Pupeno has quit [Remote host closed the connection]
<freezevee> thank you friends
<freezevee> great thing to know
nettoweb has joined #ruby
<Ox0dea> apt-get: Probably best to read up on how OCRA wants you to organize things: http://ocra.rubyforge.org/
<havenwood> apt-get: So you want to distribute a self-contained Ruby app?
<freezevee> I 'm banging my head to the wall for Dijkstra
<apt-get> yeah havenwood
moeabdol has quit [Ping timeout: 244 seconds]
<Ox0dea> freezevee: Are you sure you haven't jumped into the deep end unprepared?
<havenwood> apt-get: ocra as already mentioned and also checkout Releasy and Traveling Ruby.
<freezevee> Ox0dea: how will I learn that ?
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
<freezevee> Ox0dea: I bet I do but I need to do this
<Ox0dea> freezevee: Fair enough.
<Ox0dea> Baby steps and all that.
<freezevee> sure
<freezevee> Job inquiry
<freezevee> better than that
<freezevee> God save me
<shevy> haha
<shevy> apt-get a gem-directory structure should be best; you can also use data/ directory inside
Obfuscate has quit [Ping timeout: 264 seconds]
<havenwood> apt-get: What kind of app will it be?
<havenwood> apt-get: Command line?
dionysus69 has quit [Ping timeout: 240 seconds]
Pupeno has quit [Remote host closed the connection]
<havenwood> apt-get: If so I'd do a gem and package it with Traveling Ruby.
<apt-get> havenwood: I didn't really like traveling ruby
<apt-get> as it's more of a "we provide ruby packages for every system along with gems" service
<havenwood> apt-get: What irked you about it?
<apt-get> than a real gem for handling packages
Pupeno has joined #ruby
Obfuscate has joined #ruby
<apt-get> though releasy looked pretty nice
Oka has joined #ruby
dasher00 has joined #ruby
<havenwood> apt-get: Writing your own rake task with traveling ruby isn't hard. They have good examples. I do think releasy is nice.
beast has joined #ruby
atmosx_ has quit [Quit: Lost in trance]
<havenwood> maybe i'll make a travel agent wrapper for traveling ruby
<havenwood> one click this or that
leat has quit [Ping timeout: 246 seconds]
JDiPierro has quit [Remote host closed the connection]
<freezevee> Ox0dea: is there any case you might help me unstuck ?
<Ox0dea> freezevee: I was just about to head out for a few minutes, but feel free to describe your troubles.
tejasmanohar_ has joined #ruby
<apt-get> havenwood: does releasy work nicely with a gem?
<freezevee> Ox0dea: Can I send you my gist in PM ?
<Ox0dea> freezevee: What if somebody in channel is better equipped to assist you?
<apt-get> the reason I didn't want to package it as a gem is because I thought it would interfere with rack
darkf has quit [Quit: Leaving]
<freezevee> Ox0dea: you're right, I feel a bit cautious because it's for a job inquiry
ruby-lang741 has joined #ruby
lkba_ has joined #ruby
<ruby-lang741> Hello
<Ox0dea> freezevee: Encrypt your Gist with BubbleBabble?
<Ox0dea> ruby-lang741: Hiya.
<Ox0dea> >> require 'digest/bubblebabble'; Digest.bubblebabble 'lolwtfisthis'
<ruboto> Ox0dea # => "xirak-zorel-lutik-kapol-fatyk-mapil-fyxax" (https://eval.in/432366)
tejasmanohar has quit [Ping timeout: 250 seconds]
tejasmanohar_ is now known as tejasmanohar
<ruby-lang741> So, my problem is that when I run the exe file created by ocra, it doesn't find my yml config file, ENOENT error is given. How can I get it work?
Semtex-H has joined #ruby
<Ox0dea> u 1
mary5030 has joined #ruby
<freezevee> I don't believe somebody will help but there it is
<freezevee> because it's a bit long
<Ox0dea> That is indeed a lot of code for volunteers to review.
<freezevee> indeed
Synthead has quit [Disconnected by services]
jcoe has joined #ruby
<Ox0dea> Is there some part in particular you think isn't quite there?
<freezevee> well I am stuck where I have all nodes and their neighbours and I want to pick up the next one
<Ox0dea> ruby-lang741: Are you using absolute paths, perhaps?
Synthead has joined #ruby
Lucky__ has joined #ruby
lkba has quit [Ping timeout: 265 seconds]
<freezevee> Ox0dea: I have an array of hashes @node_list which has all information available
<freezevee> Ox0dea: I have done it in paper but can't find the logic to move it to a function
<freezevee> Ox0dea: https://gist.github.com/anonymous/b9a49f25f49b7bd2d17d this is what I've got
Synthead has quit [Disconnected by services]
<freezevee> but I already said, it's too complicated for someone to spend his time
<freezevee> I understand
Synthbread has joined #ruby
<ruby-lang741> This is the line in my code : cnf = YAML.load_file "config.yml". Exe file doesn't get the path of the config file even though it is in the same directory than the exe. I also have Dir.chdir(File.dirname(__FILE__)) at the beginning of the file
DLSteve has joined #ruby
tjohnson has joined #ruby
moeabdol has joined #ruby
Coldblackice has joined #ruby
jcoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
<shevy> then the file does not exist there
DmitryBochkarev has joined #ruby
Rollabunna has quit [Remote host closed the connection]
<Ox0dea> ruby-lang741: Instead of using Dir.chdir, you might consider adding that directory to $LOAD_PATH.
<shevy> you can check via a conditional: _ = 'config.yml'; if File.exist? _; YAML.load_file _; else; puts 'the file does not exist.'
solocshaw1 has joined #ruby
<Ox0dea> ruby-lang741: I haven't used OCRA in some time, but I do recall that it takes some liberties regarding where it places things.
solocshaw has quit [Ping timeout: 244 seconds]
solocshaw1 is now known as solocshaw
ghostlines has joined #ruby
mary5030 has quit [Remote host closed the connection]
Rickmasta has joined #ruby
firstdayonthejob has quit [Ping timeout: 260 seconds]
mary5030 has joined #ruby
mary5030 has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
cornerma1 has joined #ruby
MichaelSmith has quit [Quit: Connection closed for inactivity]
tmtwd has quit [Ping timeout: 272 seconds]
Pupeno has quit [Remote host closed the connection]
cornerman has quit [Ping timeout: 252 seconds]
Pupeno has joined #ruby
Pupeno has joined #ruby
juanpablo_ has joined #ruby
cornerma1 is now known as cornerman
rehat has joined #ruby
leat has joined #ruby
Swappticon has joined #ruby
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
armyriad has joined #ruby
elperdut has joined #ruby
<karapetyan> how to compare if item[0] > 1 && item[0] > item[1]
juanpablo_ has quit [Ping timeout: 250 seconds]
<karapetyan> what if item[1] don't exist?
<karapetyan> it will raise error?
stamina has quit [Ping timeout: 250 seconds]
<Ox0dea> karapetyan: You could probably get away with `item.take(2).sort.last > 1`.
Soda has joined #ruby
centrx has joined #ruby
<Ox0dea> >> nil.to_i # karapetyan: Something to bear in mind.
<ruboto> Ox0dea # => 0 (https://eval.in/432389)
<freezevee> Ox0dea: how can I pick up the hash from an array with :id = 2 ? https://gist.github.com/anonymous/b9a49f25f49b7bd2d17d
<Ox0dea> freezevee: select { |h| h[:id] == 2 }
capin has joined #ruby
<Ox0dea> Erm, make that #find, not #select.
<capin> if I have a string in Ruby i.e. my_string can I not swap two characters in the string? i.e. my_string to my_stirng
xblade has joined #ruby
fedexo has joined #ruby
<freezevee> array.find { |h| h[:id] == 2 } ?
toretore has joined #ruby
<Ox0dea> Should do.
karapetyan has quit [Remote host closed the connection]
<Ox0dea> >> foo = 'my_string'; foo[5, 2] = foo[5, 2].reverse; foo # capin
<ruboto> Ox0dea # => "my_stirng" (https://eval.in/432390)
dopamean_ has quit [Ping timeout: 260 seconds]
karapetyan has joined #ruby
TheHodge has joined #ruby
CustosL1m3n has joined #ruby
<capin> Ox0dea: thanks :)
<Ox0dea> Sure thing.
<freezevee> Ox0dea: thanks ! you're saving my ass
<freezevee> Ox0dea: it's a job I really want
<Ox0dea> You'll probably want to endeavor to really understand what you're doing, then. :P
<Ox0dea> I bet you get asked why A* should generally be preferred over Dijkstra's.
zotherstupidguy has quit [Ping timeout: 246 seconds]
<freezevee> Ox0dea: it's not that advanced level
<freezevee> Ox0dea: I need to know how to implement an algorithm
Pupeno has quit [Remote host closed the connection]
<freezevee> Ox0dea: so If I know what to do with one, I can do this will all
<freezevee> algorithms is theory, you read and then implement
<Ox0dea> You're missing the crucial "understand what the fuck I just did" step.
Pupeno has joined #ruby
karapetyan has quit [Ping timeout: 272 seconds]
Swappticon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> I suppose that's part of the recipe that can be ignored if you're just trying to get your foot in the door.
karapetyan has joined #ruby
VeryBewitching has joined #ruby
<karapetyan> thanks! folks!
Narzew has joined #ruby
<Ox0dea> What's the cleanest approach to obtaining a heredoc's label?
blue_deref has joined #ruby
<Ox0dea> The parser has it, of course, but it's not emitted anywhere; do I have to re-parse the heredoc?
Limix has joined #ruby
houhoulis has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
dopamean_ has joined #ruby
Goose23 has joined #ruby
bonhoeffer has quit [Client Quit]
_tpavel has joined #ruby
JDiPierro has joined #ruby
_tpavel has quit [Read error: Connection reset by peer]
fedexo has quit [Ping timeout: 244 seconds]
<centrx> Ox0dea, Like ParseTree ?
drptbl has joined #ruby
Swappticon has joined #ruby
karapetyan has quit [Remote host closed the connection]
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Hrorek has joined #ruby
Rurik has quit [Read error: Connection reset by peer]
leat has quit [Remote host closed the connection]
leat has joined #ruby
Goose23 has quit [Ping timeout: 264 seconds]
karapetyan has joined #ruby
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
araujo has quit [Quit: Leaving]
phillip has joined #ruby
karapetyan has quit [Remote host closed the connection]
segfalt has quit [Ping timeout: 260 seconds]
segfalt has joined #ruby
elperdut has joined #ruby
pyon has quit [Read error: Connection reset by peer]
timonv has joined #ruby
dotix has joined #ruby
devoldmx_ has quit [Remote host closed the connection]
karapetyan has joined #ruby
devoldmx has joined #ruby
nofxx has joined #ruby
yqt has joined #ruby
farn has quit [Ping timeout: 246 seconds]
Narzew has quit [Read error: Connection reset by peer]
dopie has joined #ruby
dotix has quit [Ping timeout: 244 seconds]
devoldmx has quit [Ping timeout: 250 seconds]
<Ox0dea> centrx: Well, whitequark/parser is the best Ruby parser I know of, and I'll have to fall back on something like it if there's no other way, but I thought there might be some magical String method I didn't know of.
stamina has joined #ruby
mistermocha has joined #ruby
<centrx> oh that's an interesting idea
<Ox0dea> Then again, heredocs are "just Strings", and I suppose it'd be unnecessarily wasteful to stick a #label method on every instance.
skade has joined #ruby
<centrx> Ox0dea, by label you mean the delimiter?
karapetyan has quit [Remote host closed the connection]
<Ox0dea> Oui.
badbodh has quit [Remote host closed the connection]
ruby-lang741 has quit [Ping timeout: 246 seconds]
<centrx> Ox0dea, I suspect that doesn't exist past the parser. Treated as a token without meaning
karapetyan has joined #ruby
<Ox0dea> Makes sense, really. :/
farn has joined #ruby
Narzew has joined #ruby
crdpink has joined #ruby
crdpink2 has quit [Ping timeout: 244 seconds]
matp has quit [Remote host closed the connection]
phillip has left #ruby ["bye"]
monoprotic has quit [Read error: Connection reset by peer]
taylorrf_ has joined #ruby
taylorrf has quit [Ping timeout: 244 seconds]
dopie has quit [Quit: This computer has gone to sleep]
gambl0re has quit [Ping timeout: 240 seconds]
r_baron has joined #ruby
fxn has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mary5030 has quit [Remote host closed the connection]
tmtwd has joined #ruby
zenguy_pc has joined #ruby
matp has joined #ruby
mary5030 has joined #ruby
yfeldblum has joined #ruby
mary5030 has quit [Read error: Connection reset by peer]
mary5030_ has joined #ruby
monoprotic has joined #ruby
monoprotic has quit [Changing host]
monoprotic has joined #ruby
QORRiE has quit [Ping timeout: 260 seconds]
zotherstupidguy has joined #ruby
karapetyan has quit [Remote host closed the connection]
JDiPierro has quit [Remote host closed the connection]
<atmosx> Is there any quick way to turn this object to a hash? #<Person @values={:id=>1, :name=>"Socrates", :url=>"https://en.wikipedia.org/wiki/Socrates", :occupation=>"Philosopher", :birth_day=>nil, :birth_month=>nil, :birth_year=>470, :birth_ad=>false, :death_day=>nil, :death_month=>nil, :death_year=>399, :death_ad=>false, :created_at=>2015-09-13 21:54:28 +0300}> ?
home has joined #ruby
<atmosx> ah stupid of
<atmosx> .methods.sort showed to_hash ...hm and to_json
Asher has quit [Quit: Leaving.]
<nofxx> atmosx, to_h
Asher has joined #ruby
<nofxx> to_h, to_s, to_i, to_f, to_a, to_c... wait. to_r ?
rnga has quit []
<jhass> rational
<nofxx> jhass, ahh! thanks
mary5030_ has quit [Remote host closed the connection]
<atmosx> nofxx: to_h didn't work actually that's why I came up with the question
<Ox0dea> >> ObjectSpace.each_object(Class).flat_map { |c| c.methods.grep(/^to_/) }.uniq
<ruboto> Ox0dea # => [:to_s, :to_enum, :to_a, :to_h] (https://eval.in/432426)
<Ox0dea> Where's :to_i?
<nofxx> atmosx, jhass to_h is new now? So ppl don't have the habit to implemnt it ?
mary5030 has joined #ruby
<nofxx> is new no?*
<Ox0dea> nofxx: It was introduced in 2.0.
<jhass> atmosx: it's not like we have any clue about what that thing is from its inspect
<nofxx> Ox0dea, ty
<Ox0dea> nofxx: Sorry, might be 2.1.
morenoh149 has quit [Ping timeout: 272 seconds]
<Ox0dea> Yeah, 2.1.
Nanuq has joined #ruby
Swappticon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zenguy_pc has quit [Read error: Connection reset by peer]
MichaelSmith has joined #ruby
mary5030 has quit [Ping timeout: 246 seconds]
duncannz has quit [Ping timeout: 256 seconds]
karapetyan has joined #ruby
segfalt has quit [Quit: segfalt]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
hotpancakes has joined #ruby
nettoweb has joined #ruby
FalseDeal has joined #ruby
nettoweb has quit [Client Quit]
morenoh149 has joined #ruby
pwnd_nsfw has quit [Ping timeout: 246 seconds]
allomov has quit [Remote host closed the connection]
<havenwood> So it's in all stable releases, but not in the maintenance release due to be end-of-lifed this Winter.
djbkd has joined #ruby
saddad has quit [Read error: No route to host]
<Ox0dea> nofxx: If you're worried about compatibility, `Hash[*foo]` is usually equivalent to `foo.to_h`.
Burgestrand has joined #ruby
segfalt has joined #ruby
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> Modulo the splat, I suppose; it's situational, really.
TheRealSouthner has joined #ruby
home has left #ruby [#ruby]
elfuego has quit [Quit: elfuego]
* havenwood looks forward to Ruby 2.3 with --enable-frozen-string-literal this Christmas
Pupeno has quit [Remote host closed the connection]
<Ox0dea> havenwood: Aware it's already a compile-time option, I assume?
karapetyan has quit [Remote host closed the connection]
djbkd has quit [Ping timeout: 244 seconds]
sonofflynn has joined #ruby
<havenwood> Ox0dea: Yup!
<Ox0dea> Aware also that objects can be unfrozen? ;)
blue_deref has quit [Quit: Taking myself out of hear.]
DarthGandalf has joined #ruby
<Ox0dea> require 'mutable_everything'
<havenwood> Ruby 3.0, muahahaha.
<sonofflynn> I apologize, but I have a dumb question I think dealing with string escapes. I'm trying to work with shellcode. When I do "\x32\x14\a1".length it equals 3. When use the same string base64 encoded I get: base64.decode64(base64encodedshellcode).length it equals 9
Pupeno_ has joined #ruby
drPoggs has left #ruby ["Leaving"]
<sonofflynn> SO basically, I think I need to figure out how to string escape that shellcode after base64 decoding it, but I can't figure it out for the life of me
<sonofflynn> Could anyone offer some insight? I'd really appreciate it
<Ox0dea> >> "\x32\x14\a1".length
workmad3 has joined #ruby
<ruboto> Ox0dea # => 4 (https://eval.in/432428)
<jhass> sonofflynn: can you provide a runnable script demonstrating the issue?
HAL2328 has joined #ruby
<sonofflynn> sure... one second
<jhass> I forgot minimal I guess
<shevy> huh require 'mutable_everything'?
<sonofflynn> and my math was wrong, base64.decode64(base64encodedshellcode).length is actually 12
<sonofflynn> making a sample poc now...
zenguy_pc has joined #ruby
elfuego has joined #ruby
dgs has joined #ruby
<Ox0dea> >> foo = "\x32\x14\xa1"; [foo.size, Base64.decode64(Base64.encode64(foo)).size] # sonofflynn
<ruboto> Ox0dea # => uninitialized constant Base64 (NameError) ...check link for more (https://eval.in/432429)
<Ox0dea> >> require 'base64'; foo = "\x32\x14\xa1"; [foo.size, Base64.decode64(Base64.encode64(foo)).size] # sonofflynn
<ruboto> Ox0dea # => [3, 3] (https://eval.in/432430)
decoponio has quit [Quit: Leaving...]
<Ox0dea> It seems most likely the case that you didn't invoke the right #encode method?
pwnd_nsfw has joined #ruby
<sonofflynn> possibly, trying to come up with a small POC now.. sorry, one sec.
<sonofflynn> ah, I explained this wrong. Let me make this better, one more second...
hotpancakes has quit []
allomov has joined #ruby
monod has joined #ruby
fxn has quit [Quit: zZzZzZ...]
Neverdie has quit [Quit: http://radiux.io/]
Neverdie has joined #ruby
naftilos76 has quit [Quit: Αποχώρησε]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<sonofflynn> ok, here's essentially my problem - http://pastebin.com/UXFGhswa
<ruboto> sonofflynn, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/225c0da78687ee31793e
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<sonofflynn> I'm base64 decoding shellcode
<sonofflynn> (I just added that gsub at the end, but that doesn't work)
Pupeno_ has quit [Read error: Connection reset by peer]
<sonofflynn> however
dgutierrez1287 has quit [Remote host closed the connection]
<sonofflynn> when it's decoded, it's decoded as "\\x32\\x14\\x23...."
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
<sonofflynn> and I need to convert that so ruby interprets that as "\x32\x14\x23"
<sonofflynn> and it's interpreted as shellcode, not 12 literal string characters
Swappticon has joined #ruby
dotix has joined #ruby
dotix has joined #ruby
jcoe has joined #ruby
dotix has quit [Client Quit]
<lianj> huh, #ruby-lang and #ruby got merged? whats the story?
<Ox0dea> jhass: You really should've emphasised that you missed "minimal".
<jhass> yeah
codecop has joined #ruby
<jhass> lianj: #ruby got a new op team and was the larger channel, so the reason for #ruby-lang to exist ceased to be and we merged the smaller into the larger channel
<sonofflynn> so what's the best way to convert the string "\\x32\\x43\\x14..." into "\x32\x43\x14..." and be interpreted as shellcode vs. literal string characters
<sonofflynn> ?
leat has quit [Ping timeout: 256 seconds]
segfalt has quit [Quit: segfalt]
allomov has quit [Remote host closed the connection]
devoldmx has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
<jhass> mmh, is [Base64.decode64(base64).delete("\\")].pack("H*") correct?
rodfersou has quit [Ping timeout: 260 seconds]
<jhass> where does that base64 come from in the first place? do you control its generation?
<lianj> [encoded.unpack("m")[0].delete("\\\\x")].pack("H*")
Burgestrand has quit []
dgs has quit [Quit: dgs]
<sonofflynn> I do, but it's from a python script
<sonofflynn> ok, let me try those... one second...
<lianj> no, change the python thing to do it right
<Ox0dea> ^
<jhass> ^^
<jhass> can't emphasize that enough
<jhass> fix the python thing
<sonofflynn> ok
<Ox0dea> sonofflynn: I've already demonstrated that properly encoding and decoding that string results in one of length three.
devoldmx has quit [Ping timeout: 246 seconds]
<Ox0dea> Imposing painful data upon yourself is literally masochistic.
<sonofflynn> looking at the python code now...
moeabdol has quit [Ping timeout: 264 seconds]
last_staff has quit [Quit: last_staff]
juanpablo_ has joined #ruby
stamina has quit [Quit: WeeChat 1.3]
DLSteve has quit [Ping timeout: 244 seconds]
Rollabunna has joined #ruby
<sonofflynn> ok, it's with how it's being encoded python side, I'm looking into that
<sonofflynn> but thanks for the quick poc work around with how it currently is
<sonofflynn> I appreciate it Ox0dea and jhass
workmad3 has quit [Ping timeout: 256 seconds]
mistermocha has quit [Remote host closed the connection]
<Ox0dea> sonofflynn: Happy to help, I guess? :P
<sonofflynn> ha
<sonofflynn> it did
<Ox0dea> It all comes down to the fact that you're passing the actual backslash around.
<jhass> sonofflynn: the ruby equivalent of what you're doing on the python side is Base64.encode64(bytes.inspect) instead of Base64.encode64(bytes)
morenoh149 has quit [Ping timeout: 250 seconds]
<jhass> you should do the latter, you're doing the former
xblade has quit []
bmurt has joined #ruby
<Ox0dea> >> 'foo'.inspect.length # sonofflynn: Whence come these extra 2 characters?
<ruboto> Ox0dea # => 5 (https://eval.in/432442)
skade has quit [Quit: Computer has gone to sleep.]
juanpablo_ has quit [Ping timeout: 264 seconds]
morenoh149 has joined #ruby
<Ox0dea> (As an aside, how did we get tricked into helping this fellow with his exploit?)
devbug has joined #ruby
solars has joined #ruby
fxn has joined #ruby
nettoweb has joined #ruby
Rollabunna has quit [Ping timeout: 255 seconds]
Mazhug has joined #ruby
zenguy_pc has joined #ruby
sacarlson has joined #ruby
<sonofflynn> lol
<sonofflynn> I'm not a ruby guy at all, trying to learn some of this
<sonofflynn> I work on a project called Veil
<sonofflynn> it's for pen testers/red teamers
<sonofflynn> for AV evasion
<sonofflynn> it's actually not an exploit, but a callback to help avoid av
<sonofflynn> but, I was obviously failing on the ruby code for this module
<sonofflynn> so... figured I'd hit up this cahnel since you guys likely know it a lot better than I do, (which you do :))
Azure has joined #ruby
<Ox0dea> sonofflynn: Why are you converting it from Python to Ruby?
mistermocha has joined #ruby
Pupeno has quit [Remote host closed the connection]
<sacarlson> is there any reason I shouldn't include a module in a class that is within that same module? example https://gist.github.com/sacarlson/25b99990338f1d04ce5d
Hrorek has quit [Read error: Connection reset by peer]
Rurik has joined #ruby
<Ox0dea> For what it's worth, avoiding AV probably constitutes exploitation.
TheRealSouthner has left #ruby [#ruby]
<sonofflynn> So, I'm not really. The framework is developed in python. What it does is creates windows executables based in a variety of languages
krz has quit [Quit: WeeChat 1.2]
<sonofflynn> right now it supports, python, .net, c, ruby, and powershell
<sonofflynn> (powershell is obviously not an executable)
<Ox0dea> But you're porting existing code, yes?
<sonofflynn> Kind of. I'm using windows api calls in each respective language
<sonofflynn> any language that I can interact with the windows api, I can use
<sonofflynn> (as long as I can also convert to a windows executable)
<Ox0dea> Then why not just use the Python code you're cribbing?
<Ox0dea> What do you stand to gain in converting it all to Ruby?
<sonofflynn> Because, simply changing the base language of the executable from python to ruby bypasses detection by AV
<sonofflynn> so, any payload in C is easily caught
<sonofflynn> but literally porting the same calls to python, completely bypassed detection
<Ox0dea> Why not just figure out which sequence of bytes is tripping the AV and ensure it doesn't end up in your executable?
Pupeno has joined #ruby
<sonofflynn> we're doing that, in addition to adding support for new languages
<Ox0dea> I don't see how the language has much to do with it.
<jhass> sacarlson: you'll have some weirdness like that Module2::Class2::Class2::Class2 will be valid, but beyond that nothing to argue against based on fake code
<sonofflynn> it's funny, it's because AV sucks
<sonofflynn> I can literally port the same code in C to Python
<sonofflynn> and C will get caught, but python won't
<Ox0dea> >> $VERBOSE = nil; String::Hash::Array::String::Hash # jhass
<ruboto> Ox0dea # => Hash (https://eval.in/432446)
<jhass> I know ;)
<sonofflynn> so we're expanding on that same logic to add support for as many languages as possible
<Ox0dea> sonofflynn: Sounds retarded.
<sacarlson> jhass: yes I was thinking it might have recusive properties so that might be a problem with the auto created rspec
<sonofflynn> indeed Ox0dea
<sonofflynn> it does, but it shows how bad antivirus is
<Ox0dea> ?spam
<ruboto> I don't know anything about spam
<sonofflynn> veil-evasion is the specific av evading tool
<sonofflynn> no, not spam, just showing what I am talking about
<Ox0dea> sonofflynn: That wolf shouldn't be howling if it's trying to pass itself off as a sheep.
Pupeno has quit [Remote host closed the connection]
<sonofflynn> but yeah, it's sad, bypassing AV is as simple as changing the language
<sonofflynn> lol
allomov has joined #ruby
<Ox0dea> sonofflynn: I reckon you might be out of your depth, mate.
<sonofflynn> and once we run out of languages, we can expand upon the modules we have
<sonofflynn> by finding where it's detected, modify it, etc.
<Ox0dea> That "changing the language" "works" is accidental.
lxsameer has joined #ruby
<sonofflynn> not really, it works because static signature based detection is the wrong approach
<Ox0dea> Aye, so why not just ensure you don't get caught by it?
<sonofflynn> proper AV detection would be heuristics based, looking at winapi calls, etc.
<sonofflynn> what do you mean? that's what we're doign
modern has quit []
<Ox0dea> You're using a damned chainsaw where a scalpel would do.
<Ox0dea> "Shit, we've been detected; better rewrite all this in another language."
<sonofflynn> well, it's like I said before. We want to add support for as many languages as possible. The reason is because we'd love to have community involvement.
<sonofflynn> Oh, we don't do it like that
<sonofflynn> We release new languages even before we're caught
<sacarlson> sonofflynn: if AV detects in that manner maybe just encrypt the code you plan to run in python, decode the code you plan to run in python then run it. you can reencode it with a different seed so it keeps changing
nofxx has quit [Ping timeout: 264 seconds]
<sonofflynn> the reason we do that is to release a "baseline" of how to do it in a specific language
<sonofflynn> It's to show how to inject shellcode in each respective language
rehat has quit [Remote host closed the connection]
gambl0re has joined #ruby
<Ox0dea> sonofflynn: Sounds like you and your team need more msf in your lives.
<sonofflynn> then anyone can use that as a base and expand upon it, such as grabbing encrypted shellcode, and decrypting it at runtime to bypass static signature analysis
<Ox0dea> sonofflynn: With Base64, yes?
<sonofflynn> MSF is ok, but it's payload generation gets caught usually, which is why we started making Veil
<sonofflynn> base64 != encryption
<Ox0dea> But that's what you're doing, isn't it?
<sonofflynn> That's the only ruby one. Python we have aes encrypted shellcode that's decrypted at runtime
<sonofflynn> DES, ARC, etc.
<sonofflynn> basic letter substitution
<Ox0dea> Ruby supports all of those; why did you go with Base64?
<sonofflynn> I will add in DES, AES, etc.
<sonofflynn> I just wanted to start with base64
<sonofflynn> that's the only reason
<Ox0dea> > base64 != encryption
<sonofflynn> I know
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
<sonofflynn> doesn't need to be encrypted to bypass
<sonofflynn> letter substitution works too'
<Ox0dea> memfrob(3) to the rescue.
<sonofflynn> .replace('\\x', 'zz')
<sonofflynn> then switching back at runtime bypasses too
mary5030 has joined #ruby
segfalt has joined #ruby
Burgestrand has joined #ruby
mistermocha has quit [Remote host closed the connection]
crankharder has quit [Ping timeout: 268 seconds]
Coldblackice has quit [Ping timeout: 250 seconds]
<sonofflynn> but anyways, that's the project, thanks for all the help everyone
allomov has quit [Remote host closed the connection]
segfalt has quit [Client Quit]
mary5030 has quit [Ping timeout: 252 seconds]
osmansekerlen has joined #ruby
rakm has joined #ruby
ruby-lang049 has joined #ruby
<ruby-lang049> Hello World
diegoviola has joined #ruby
rakm has quit [Client Quit]
minimalism has joined #ruby
MyMind has joined #ruby
devbug_ has joined #ruby
<jhass> World Hello
elperdut has joined #ruby
workmad3 has joined #ruby
Sembei has quit [Ping timeout: 264 seconds]
dgs has joined #ruby
Pupeno has joined #ruby
ruby-lang049 has quit [Ping timeout: 246 seconds]
athinggoingon has quit [Ping timeout: 252 seconds]
devbug has quit [Ping timeout: 256 seconds]
TomyLobo has quit [Ping timeout: 246 seconds]
<Ox0dea> >> 'mullins'.to_i(32).to_s(35)
<ruboto> Ox0dea # => "declass" (https://eval.in/432447)
<Ox0dea> How do I "declass" an object?
matp has quit [Remote host closed the connection]
codecop has quit [Quit: Išeinu]
<Ox0dea> Is it possible for foo.class to return nil?
firstdayonthejob has joined #ruby
opensource_ninja has joined #ruby
n008f4g_ has joined #ruby
Pupeno has quit [Remote host closed the connection]
<jhass> def foo.class; end; an done!
<craysiii> implicit nil return. you monster
<Ox0dea> >> foo = []; def foo.class; end; foo.method(:class).super_method.call
<ruboto> Ox0dea # => Array (https://eval.in/432448)
marr has joined #ruby
<craysiii> what if you extend array and define it on the class?
<platzhirsch> Hola
nateberkopec has quit [Quit: Leaving...]
<Ox0dea> craysiii: That's exactly what it's doing?
<Ox0dea> No, never mind, I thought you meant extend the `foo` array itself.
<craysiii> ah
<craysiii> im just a noob asking questions :3
workmad3 has quit [Ping timeout: 246 seconds]
taylorrf_ has quit [Remote host closed the connection]
<Ox0dea> `def foo.bar` opens up foo's singleton class and defines #bar therein.
<craysiii> but foo is an instance of Array.new, and not the Array class itself, right? just wondering how different they are
<Ox0dea> You can change the class of an object, but it breaks if you try to do it with nil.
Pupeno has joined #ruby
<Ox0dea> craysiii: It is, and that's why the super_method lets us at the truth.
<craysiii> ah i see
<Ox0dea> #class has only been redefined to return nil on foo's singleton class.
taylorrf has joined #ruby
<Ox0dea> >> foo = []; def foo.class; end; foo.method(:class).owner.singleton_class?
<ruboto> Ox0dea # => true (https://eval.in/432450)
Pupeno has quit [Remote host closed the connection]
<sacarlson> are there any better auto generating rspec programs than this one? https://github.com/seratch/rspec-kickstarter
Goose23 has joined #ruby
skade has joined #ruby
<Ox0dea> sacarlson: How've you found this one to be deficient?
mistermocha has joined #ruby
<Ox0dea> I don't know of any, but here's something that goes in the other direction: https://github.com/baweaver/clairvoyant
<sacarlson> well yes it outputs nothing when I convert my program into a module for reasons I don't understand
<jhass> >> class Classless < SimpleDelegator; undef class; undef method; def method_missing(*) v = super; v == __getobj__.class ? nil : Classless.new(v); end; end; Classless.new([]).class
tuxero has joined #ruby
<ruboto> jhass # => uninitialized constant SimpleDelegator (NameError) ...check link for more (https://eval.in/432451)
<jhass> >> require "simple_delegator"; class Classless < SimpleDelegator; undef class; undef method; def method_missing(*) v = super; v == __getobj__.class ? nil : Classless.new(v); end; end; Classless.new([]).class
<ruboto> jhass # => cannot load such file -- simple_delegator (LoadError) ...check link for more (https://eval.in/432452)
<jhass> eh
<sacarlson> I'll take a look Ox0dea thanks
<jhass> long live the stdlib naming consistency
<jhass> right, it was in delegate
<jhass> >> require "delegate"; class Classless < SimpleDelegator; undef class; undef method; def method_missing(*) v = super; v == __getobj__.class ? nil : Classless.new(v); end; end; Classless.new([]).class
<ruboto> jhass # => nil (https://eval.in/432453)
<Ox0dea> Looks like just the thing I need. ;)
<jhass> do I want to know for what? :D
<Ox0dea> Likely not.
danieli has quit [Quit: *does an epic backflip into nowhere*]
diego3 has joined #ruby
diego3 has quit [Changing host]
diego3 has joined #ruby
diegoviola has quit [Ping timeout: 240 seconds]
<Ox0dea> In truth, I only asked after "declassing" because of the "mullins" => "declass" thing.
<Ox0dea> Sad fact: there are no eight-letter words which come out the other end of a base transformation as another word. :/
danieli has joined #ruby
<jhass> in a language you recognize at least
<sacarlson> Ox0dea: that's wierd so in that case you generate the test code it it creates something that resembles the code. Interesting but I'm not going with that
<Ox0dea> sacarlson: Aye, it was mostly a fun experiment, I think.
<Ox0dea> jhass: Fair point.
<Ox0dea> >> 'hosts'.to_i(30).to_s(34) # This is my favorite.
<ruboto> Ox0dea # => "argue" (https://eval.in/432454)
diego4 has joined #ruby
<Ox0dea> jhass: Do you know offhand of anything like words-insane for non-English?
diego4 has quit [Changing host]
diego4 has joined #ruby
diego4 is now known as diegoviola
diego3 has quit [Ping timeout: 246 seconds]
<jhass> I don't even know it for English or what it is
sombaloo has joined #ruby
<jhass> ah, aspell?
<Ox0dea> That's certainly the commonest use case.
tkuchiki has joined #ruby
<jhass> no I mean as source
<Ox0dea> I think SCOWL just happens to be hosted on aspell's domain?
Burgestrand has quit []
fxn has quit [Quit: zZzZzZ...]
<Ox0dea> Alas, SCOWL appears to be completely Anglocentric.
<Ox0dea> Maybe there's an eight in the Queen's.
soulcake has quit [Remote host closed the connection]
soulcake has joined #ruby
Rutix has quit []
tkuchiki has quit [Ping timeout: 246 seconds]
soulcake has quit [Max SendQ exceeded]
soulcake has joined #ruby
soulcake has quit [Remote host closed the connection]
iszak has quit [Ping timeout: 268 seconds]
bink33 has joined #ruby
soulcake has joined #ruby
zeroDivisible has joined #ruby
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
juanpablo_ has joined #ruby
Coldblackice has joined #ruby
apt-get has quit [Remote host closed the connection]
mistermocha has quit [Remote host closed the connection]
ghormoon has quit [Ping timeout: 264 seconds]
bmurt has quit []
juanpablo_ has quit [Ping timeout: 250 seconds]
Eldritch has joined #ruby
centrx has quit [Quit: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong."]
mvff has joined #ruby
crankharder has joined #ruby
Eldritch has quit [Client Quit]
Semtex-H has quit []
Pupeno has joined #ruby
jcoe has quit [Read error: Connection reset by peer]
matp has joined #ruby
Pupeno has quit [Remote host closed the connection]
workmad3 has joined #ruby
wildlander has quit [Quit: Saliendo]
saddad has joined #ruby
arup_r has quit [Quit: Leaving]
iszak has joined #ruby
iszak has joined #ruby
bink33 has quit [Quit: Page closed]
workmad3 has quit [Ping timeout: 250 seconds]
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
tuxero has quit [Quit: tuxero]
FalseDeal has quit [Quit: WeeChat 1.3]
oo_ has joined #ruby
karapetyan has joined #ruby
diegoviola has quit [Remote host closed the connection]
oo_ has quit [Ping timeout: 240 seconds]
iszak has quit [Ping timeout: 272 seconds]
fostertheweb has joined #ruby
iszak has joined #ruby
fostertheweb has quit [Client Quit]
fwaokda has joined #ruby
havenwood has quit [Ping timeout: 244 seconds]
<fwaokda> If i want to use mysql2 in my ruby script, do I just need to run `gem install mysql2` and then use require 'mysql2' at the top of my script file?
rodfersou has joined #ruby
moeabdol has joined #ruby
karapetyan has quit [Ping timeout: 244 seconds]
jamesaxl|2 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
devoldmx has joined #ruby
iszak has quit [Remote host closed the connection]
iszak has joined #ruby
<Ox0dea> ?try fwaokda
<ruboto> fwaokda, Why don't you try it and see for yourself?
dgutierrez1287 has joined #ruby
devoldmx has quit [Ping timeout: 244 seconds]
<fwaokda> ruboto: i get an error saying i need to add it to my gem file, yet I dont have a gem file as I'm not using rails
Soda has quit [Remote host closed the connection]
I has joined #ruby
dgutierrez1287 has quit [Ping timeout: 252 seconds]
<Mazhug> you don't need rails for using gemfile. google bundler gem
I is now known as Guest16641
<shevy> ruboto is a bot
<Ox0dea> fwaokda: Where did you get the idea that you need to be using Rails for a Gemfile to be relevant?
* Ox0dea checks that we've got sufficient troll food.
<platzhirsch> Ruboto is the gimp
<platzhirsch> Bring out the gimp
<shevy> fwaokda require 'mysql2' should do; you can look at the docu too http://www.rubydoc.info/gems/mysql2/0.4.0
<fwaokda> thanks for all answers given -- my apologies. I've never used a gemfile in a ruby script... but had seen it in rails projects before
blackmesa has joined #ruby
Rollabunna has joined #ruby
<fwaokda> i'll go google up about using a gemfile with ruby
<Ox0dea> fwaokda: If you're writing some one-off thing, you probably don't need to bother with a Gemfile just yet.
Swappticon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> \o/
choke has joined #ruby
<Ox0dea> It's still good practice and all that, and if you do intend to eventually share your script, you might as well start on the right foot.
<platzhirsch> Oh no, always bother with a Gemfile, I always like packaging things neatly, adding a ribbon :*
monod has quit [Ping timeout: 265 seconds]
hddddd has joined #ruby
<Ox0dea> What is this SystemXVI nonsense?
kirun has quit [Quit: Client exiting]
tjohnson has quit [Quit: Connection closed for inactivity]
Xiti` has joined #ruby
Rollabunna has quit [Ping timeout: 240 seconds]
bestbrents__ has joined #ruby
abbe_ has joined #ruby
Asher2 has joined #ruby
FrankD has joined #ruby
abbe has quit [Read error: Connection reset by peer]
Asher has quit [Write error: Connection reset by peer]
Asher2 has quit [Client Quit]
Asher has joined #ruby
TheRealSouthner has joined #ruby
crdpink has quit [Read error: Connection reset by peer]
jordanm has quit [Read error: Connection reset by peer]
crdpink has joined #ruby
jordanm has joined #ruby
Guest16641 has quit [Quit: This computer has gone to sleep]
abbe_ is now known as abbe
modern has joined #ruby
FrankD_ has quit [Ping timeout: 253 seconds]
Xiti has quit [Ping timeout: 253 seconds]
bestbrents_ has quit [Ping timeout: 253 seconds]
senayar has joined #ruby
TheRealSouthner has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
iszak has quit [Ping timeout: 256 seconds]
Abakadaba has joined #ruby
nofxx has joined #ruby
Abakadaba has quit []
hddddd has quit [Quit: Page closed]
David27_ has joined #ruby
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
David27 has quit [Ping timeout: 246 seconds]
tkuchiki has joined #ruby
David27_ is now known as David27
pocketprotector has quit [Ping timeout: 240 seconds]
acke has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
houhoulis has joined #ruby
blackmesa has quit [Ping timeout: 268 seconds]
sombaloo has quit [Quit: Leaving]
pocketprotector has joined #ruby
elperdut has joined #ruby
chouhoulis has joined #ruby
banister has joined #ruby
Mazhug has quit []
grenierm has joined #ruby
totimkop1 has joined #ruby
n008f4g__ has joined #ruby
shaman42_ has joined #ruby
hostess_ has joined #ruby
iszak_ has joined #ruby
leslie_ has joined #ruby
nullwarp_ has joined #ruby
lorn_ has joined #ruby
bahar_ has joined #ruby
lupine_85 has joined #ruby
Shidash_ has joined #ruby
mjmac_ has joined #ruby
znz_jp0 has joined #ruby
wookiehangover_ has joined #ruby
george2_ has joined #ruby
verdoc_ has joined #ruby
NuckingFuts has joined #ruby
chouhoulis has quit [*.net *.split]
David27 has quit [*.net *.split]
n008f4g_ has quit [*.net *.split]
sacarlson has quit [*.net *.split]
TheHodge has quit [*.net *.split]
platzhirsch has quit [*.net *.split]
Jackneill has quit [*.net *.split]
blackjid has quit [*.net *.split]
sfr^ has quit [*.net *.split]
linc01n has quit [*.net *.split]
Shidash has quit [*.net *.split]
wldcordeiro has quit [*.net *.split]
bahar has quit [*.net *.split]
craysiii has quit [*.net *.split]
jxf has quit [*.net *.split]
[spoiler] has quit [*.net *.split]
segmond has quit [*.net *.split]
duoi has quit [*.net *.split]
lokulin has quit [*.net *.split]
leslie has quit [*.net *.split]
shaman42 has quit [*.net *.split]
Seich has quit [*.net *.split]
voxxit has quit [*.net *.split]
lorn has quit [*.net *.split]
j416 has quit [*.net *.split]
totimkopf has quit [*.net *.split]
nullwarp has quit [*.net *.split]
mjmac has quit [*.net *.split]
verdoc has quit [*.net *.split]
Dwarf has quit [*.net *.split]
Billias has quit [*.net *.split]
jaxxstorm has quit [*.net *.split]
Nightmare has quit [*.net *.split]
lupine has quit [*.net *.split]
wookiehangover has quit [*.net *.split]
ZeeNoodleyGamer has quit [*.net *.split]
DarkBushido has quit [*.net *.split]
epochwolf has quit [*.net *.split]
george2 has quit [*.net *.split]
hostess has quit [*.net *.split]
asi_ has quit [*.net *.split]
PlasmaStar has quit [*.net *.split]
nuck has quit [*.net *.split]
znz_jp has quit [*.net *.split]
Shidash_ is now known as Shidash
wookiehangover_ is now known as wookiehangover
nullwarp_ is now known as nullwarp
george2_ is now known as george2
PlasmaStar has joined #ruby
Seich has joined #ruby
lupine_85 is now known as lupine
Billias has joined #ruby
duoi has joined #ruby
linc01n has joined #ruby
[k- has quit [Ping timeout: 272 seconds]
lokulin has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
[spoiler] has joined #ruby
Soda has joined #ruby
Rickmasta has joined #ruby
DarkBushido has joined #ruby
DarkBushido has joined #ruby
epochwolf has joined #ruby
asi_ has joined #ruby
ZeeNoodleyGamer has joined #ruby
sfr^ has joined #ruby
Balzrael has joined #ruby
jaxxstorm has joined #ruby
devbug_ has quit [Ping timeout: 272 seconds]
renodice has joined #ruby
michael_mbp has quit [Excess Flood]
tno has joined #ruby
devbug has joined #ruby
iszak_ has quit [Ping timeout: 272 seconds]
iszak_ has joined #ruby
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
michael_mbp has joined #ruby
renodice has quit [Client Quit]
rodfersou has quit [Ping timeout: 265 seconds]
voxxit has joined #ruby
pulgolino has quit [Remote host closed the connection]
elperdut has joined #ruby
Pupeno has joined #ruby
Nightmare has joined #ruby
iszak_ has quit [Ping timeout: 240 seconds]
jhkff has joined #ruby
diegoviola has joined #ruby
HAL2328 has quit [Quit: Leaving]
howdoi has quit [Quit: Connection closed for inactivity]
devoldmx has joined #ruby
iszak_ has joined #ruby
hakunin has joined #ruby
hakunin has quit [Remote host closed the connection]
choke has joined #ruby
morenoh149 has quit [Ping timeout: 244 seconds]
devoldmx has quit [Ping timeout: 272 seconds]
badbodh has joined #ruby
danieli has quit [Quit: *does an epic backflip into nowhere*]
senayar has quit [Remote host closed the connection]
firstdayonthejob has quit [Ping timeout: 256 seconds]
grenierm has quit [Quit: grenierm]
blackjid has joined #ruby
veduardo has joined #ruby
ponga has quit [Quit: Connection closed for inactivity]
acke has joined #ruby
juanpablo_ has joined #ruby
jud has joined #ruby
jud has joined #ruby
acke has quit [Remote host closed the connection]
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> Why do classes respond to #local_variables, but not #local_variable_{get,set}?
acke has joined #ruby
_blizzy_ has joined #ruby
yqt has quit [Ping timeout: 250 seconds]
symm- has joined #ruby
juanpablo_ has quit [Ping timeout: 264 seconds]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
platzhirsch has joined #ruby
Rickmast_ has joined #ruby
symm- has quit [Client Quit]
charliesome has joined #ruby
Rickmasta has quit [Ping timeout: 250 seconds]
JDiPierro has joined #ruby
<ironcamel> does sinatra have file based configuration? i don't see it here http://www.sinatrarb.com/configuration.html
solars has quit [Ping timeout: 250 seconds]
n1lo has joined #ruby
freezevee has quit [Remote host closed the connection]
<ironcamel> thanks Ox0dea
chouhoulis has joined #ruby
<Ox0dea> Sure thing.
segmond has joined #ruby
craysiii has joined #ruby
<ironcamel> where it says " register Sinatra::ConfigFile", is register a ruby thing or a sinatra thing?
wldcordeiro has joined #ruby
<Ox0dea> &ri register @ironcamel
<`derpy> No results
jxf has joined #ruby
sacarlson has joined #ruby
TheHodge has joined #ruby
jxf has quit [Changing host]
jxf has joined #ruby
jxf has quit [Max SendQ exceeded]
j416 has joined #ruby
jxf has joined #ruby
platzhirsch has left #ruby [#ruby]
rodfersou has joined #ruby
bruno- has quit [Ping timeout: 255 seconds]
jhkff has quit [Quit: WeeChat 1.3]
fwaokda has quit [Ping timeout: 268 seconds]
djbkd has joined #ruby
jdawgaz has joined #ruby
Limix has quit [Quit: Limix]
osmansekerlen has quit [Quit: osmansekerlen]
Yzguy has joined #ruby
djbkd has quit [Ping timeout: 264 seconds]
arescorpio has joined #ruby
FernandoBasso has quit [Quit: WeeChat 1.3]
platzhirsch has joined #ruby
platzhirsch has left #ruby [#ruby]
Voker57 has quit [Read error: Connection reset by peer]
Pupeno has quit [Remote host closed the connection]
devoldmx has joined #ruby
pyon has joined #ruby
Balzrael has quit [Quit: Leaving]
tmtwd has quit [Ping timeout: 240 seconds]
athinggoingon has joined #ruby
tmtwd has joined #ruby
segfalt has joined #ruby
devoldmx_ has joined #ruby
saddad has quit [Ping timeout: 240 seconds]
devoldmx has quit [Ping timeout: 264 seconds]
G186 has joined #ruby
lokulin has quit [Changing host]
lokulin has joined #ruby
<G186> Hello, i'm new to ruby, quick question, is there a way to accept an input of ints separated by a space like in c? say I wanted to input 3 numbers form the user, I want to input 12 342432 92 all in one line, without writing a parsing method?
TheRealSouthner has joined #ruby
<mistym> G186: Would intstring.split(" ").map(&:to_i) work for you?
<G186> mistym, I'm going to try it!
<pwnd_nsfw> That surely should work
moeabdol has quit [Ping timeout: 272 seconds]
phutchins has joined #ruby
senayar has joined #ruby
Ropeney has joined #ruby
<Ox0dea> G186: https://eval.in/432480
<Ox0dea> That's only if you're looking for something *exactly* like C's scanf(), mind.
<Ox0dea> gets.split.map(&:to_i) would let the user supply an arbitrary number of numbers.