<Snowy>
is it bad practice to nest "contexts" in rspec? if so, what is the preferred solution?
nfk|laptop has quit [Quit: yawn]
chimche has quit [Client Quit]
<Radar>
Snowy: not in my opinion
<domgetter>
Snowy nested contexts *might* mean you have convoluted logic in your app, but it might also be a genuine portrayal of the complexity of the domain
aspire has quit [Disconnected by services]
djbkd has quit [Ping timeout: 265 seconds]
aspire_ has joined #ruby
<mmercer>
wooho, got it work ty for the info :)
<domgetter>
so I'd say it's worth thinking about your implementation if you have time to think about it, but other than that, if it works, its all good
mmercer has left #ruby ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"]
<Snowy>
okay thanks Radar, domgetter. it's only a small app, so i'll go with it for now and maybe refactor later. just seems messy to me but can't see a quick way around.
<DEA7TH>
Snowy: if it feels messy you might be doing something wrong. It should feel messy without nested contexts / should feel right as it is.
<domgetter>
Snowy: remember, your tests are trying to tell you things about your code. If it's hard to write a test for, it's hard to understand. If it's hard to understand, it might be possible to re-think it so that it's easier to understand. But like I said, if you have time. There's a tradeoff between making that thing beautiful, and making new things
PhantomSpank has quit [Remote host closed the connection]
mchu has joined #ruby
janebootydoe has joined #ruby
DLSteve has joined #ruby
volty has quit [Quit: Konversation terminated!]
ReK2 has quit [Quit: Konversation terminated!]
KineticX has joined #ruby
s00pcan has quit [Remote host closed the connection]
s00pcan has joined #ruby
iateadonut has joined #ruby
mchu has quit [Quit: mchu]
blackmes1 has quit [Ping timeout: 240 seconds]
jeff_laplante has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dopie has quit [Quit: Lost terminal]
chimche has quit [Quit: Leaving.]
dopie has joined #ruby
KineticX has quit [Ping timeout: 240 seconds]
blackmes1 has joined #ruby
crdpink2 has joined #ruby
guacamole has joined #ruby
crdpink has quit [Ping timeout: 250 seconds]
ReK2 has joined #ruby
ReK2 has quit [Changing host]
ReK2 has joined #ruby
guacamol_ has quit [Ping timeout: 255 seconds]
blarghlarghl has joined #ruby
kalopsian has quit [Ping timeout: 264 seconds]
agent_white has quit [Read error: Connection reset by peer]
kalopsian has joined #ruby
<blarghlarghl>
Hi all. I have an external library (bindings via SWIG to a C++ SDK) that defined its own String class. Whenever I do NewString.new("Hi!") via it, it wrongly interprets this set of characters. Then it dies and prints out random chinese characters. So clearly something is going wrong with the charsets here.
blackmes1 has quit [Ping timeout: 260 seconds]
<blarghlarghl>
Does anyone have any ideas on how to start to debug this? I'd like to not fiddle with the bindings or the C++ SDK, but instead write a wrapper that takes a Ruby String class and munges it appropriately to whatever it expects.
mdih has joined #ruby
agent_white has joined #ruby
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
binaryplease1 has joined #ruby
jbrhbr1 has joined #ruby
solocshaw has quit [Read error: Connection reset by peer]
jbrhbr has quit [Ping timeout: 245 seconds]
Mojo_Nixon has joined #ruby
binaryplease has quit [Ping timeout: 256 seconds]
llfwf33 has joined #ruby
lemur has quit [Remote host closed the connection]
marr has quit [Ping timeout: 250 seconds]
babblebre has quit [Quit: Connection closed for inactivity]
casadei has joined #ruby
hinbody has quit [Ping timeout: 260 seconds]
mfb2_ has quit [Remote host closed the connection]
llfwf33 has quit [Client Quit]
guacamol_ has joined #ruby
roshanavand has quit [Remote host closed the connection]
rakm_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
TomPeed has joined #ruby
chimche has quit [Client Quit]
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jottr has quit [Ping timeout: 260 seconds]
|ifei5g00d has joined #ruby
<p1k>
yes I saw this, I was asking more about specifics
llfwf33 has joined #ruby
<shevy>
hmm if I have a ruby script, and want to make it completely quiet (not send any output at all to the commandline), what would a good way be? should I redirect into a StringIO, and after the program has finished restore $stderr?
<shevy>
erm
<shevy>
$stdout
<havenwood>
p1k: If you can do a minimal reproducible example and concise explanation that'd be a great place to start!
jottr_ has quit [Quit: WeeChat 1.3]
llfwf33 has quit [Client Quit]
zeroDivisible has quit [Quit: WeeChat 1.3]
<p1k>
minimum reproducible example may be somewhat difficult but I can try
binaryplease1 has quit [Ping timeout: 256 seconds]
llfwf33 has joined #ruby
mfb2_ has quit [Remote host closed the connection]
Snowy has quit [Read error: Connection reset by peer]
chimche has quit [Client Quit]
Snowy has joined #ruby
hinbody has joined #ruby
kalopsian has quit [Ping timeout: 260 seconds]
scripore has joined #ruby
ror15 has joined #ruby
atomical has joined #ruby
kalopsian has joined #ruby
akem has joined #ruby
lemur has joined #ruby
hakunin has joined #ruby
maletor has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
janebootydoe has quit [Quit: Leaving]
axsuul has joined #ruby
lemur has quit [Ping timeout: 265 seconds]
FooMunki has quit [Quit: FooMunki]
<Ox0dea>
shevy: $stdout.reopen(IO::NULL)
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
freerobby has joined #ruby
<Ox0dea>
No sense capturing the output if you don't want it, and that'll only affect your process, not the controlling terminal, so no need to restore anything.
Chillwind has quit [Quit: Leaving]
allcentury has joined #ruby
<dn5>
How can I check if hash have particular key before doing .each
nanoz has joined #ruby
<Ox0dea>
dn5: There are five ways to do that. :P
<dn5>
Ox0dea, haha you and your jokes
<dn5>
:P
<dn5>
whats the fastest
<Ox0dea>
I'm being serious?
chimche has joined #ruby
<dn5>
Ik
<Ox0dea>
Well, Hash#key?, #has_key?, #include?, and #member? are all different names for the same thing.
<Dyneligt>
Hello. Thanks for the help. I am coding a MUD (based on https://github.com/indspenceable/mud), using Eventmachine and rails. The whole backend is coming out nicely and I can test nicely with Telnet. If I wanted to make a graphic interface for this MUD, what would be the best way to go? I'd just need a client to send commands to the server.
<Dyneligt>
Any advice is welcome. Thanks!
agent_white has quit [Quit: brb]
d0nn1e has quit [Ping timeout: 246 seconds]
weemsledeux has joined #ruby
agent_white has joined #ruby
d0nn1e has joined #ruby
djbkd has joined #ruby
llfwf33 has joined #ruby
atomical_ has joined #ruby
atomical has quit [Ping timeout: 256 seconds]
freerobby has quit [Quit: Leaving.]
nanoz has quit [Read error: Connection reset by peer]
akem has quit [Read error: No route to host]
acke has joined #ruby
llfwf33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
akem has joined #ruby
djbkd has quit [Ping timeout: 250 seconds]
john has joined #ruby
<john>
asdasd
john is now known as Guest24181
jbrhbr has quit [Quit: Leaving.]
<Guest24181>
someone here ?
<Guest24181>
i need a help with a problem
<Guest24181>
i'm newbie in ruby yet
aadam21 has quit [Remote host closed the connection]
<ruboto_>
Guest24181, we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
lacuna has quit [Remote host closed the connection]
\13\15 has quit [Remote host closed the connection]
defendguin has joined #ruby
jam_ has quit [Remote host closed the connection]
sarkis has joined #ruby
<voidDotClass>
it also uses sinatra. is it possible to do websockets over rails in heroku?
acke has joined #ruby
benhuda has joined #ruby
<havenwood>
voidDotClass: you could give Rails 5 beta 1's ActionCable a try
usershell has quit [Remote host closed the connection]
certainty has joined #ruby
\13\15a has joined #ruby
<voidDotClass>
havenwood, yeah, but actioncable requires a different server running vs your regular rails app, right? that means i'd need two heroku dynos, one for the regular app and another for the actioncable?
<voidDotClass>
oh, it also needs redis. i'm trying to stay free tier for now
krz has quit [Quit: WeeChat 1.2]
sarkis has quit [Ping timeout: 264 seconds]
<havenwood>
voidDotClass: How about Phoenix Channels? ;)
<voidDotClass>
thanks havenwood , will check, but that doesn
<voidDotClass>
thanks havenwood , will check, but that doesn't seem part of rails?
axsuul has joined #ruby
axsuul has quit [Read error: Connection reset by peer]
voidDotClass has quit [Remote host closed the connection]
puria has quit [Read error: Connection reset by peer]
sandstrom has quit [Quit: My computer has gone to sleep.]
juddey has quit [Ping timeout: 250 seconds]
sarkis has quit [Ping timeout: 264 seconds]
rocfig has left #ruby ["Leaving"]
crankharder has joined #ruby
devbug has joined #ruby
mark2 has joined #ruby
aufi has joined #ruby
mahk has joined #ruby
failshell has joined #ruby
failshell has quit [Ping timeout: 246 seconds]
sarkis has joined #ruby
usershell has joined #ruby
juddey has joined #ruby
devbug has quit [Ping timeout: 272 seconds]
blaxter has joined #ruby
craigp has joined #ruby
certainty has quit [Ping timeout: 246 seconds]
sarkis has quit [Ping timeout: 240 seconds]
antgel has joined #ruby
PedramT has joined #ruby
TomyWork has joined #ruby
puria has joined #ruby
waka has joined #ruby
blackgoat has joined #ruby
PedramT_ has quit [Ping timeout: 240 seconds]
codecop has joined #ruby
last_staff has quit [Remote host closed the connection]
roshanavand has joined #ruby
last_staff has joined #ruby
Xeago has joined #ruby
juddey has quit [Ping timeout: 265 seconds]
einarj has joined #ruby
codecop has quit [Remote host closed the connection]
sarkis has joined #ruby
sandstrom has joined #ruby
PedramT has quit [Remote host closed the connection]
sandstrom has quit [Client Quit]
PedramT has joined #ruby
Kiwi_sherbet has quit []
codecop has joined #ruby
sarkis has quit [Ping timeout: 250 seconds]
hahuang61 has joined #ruby
firstdayonthejob has quit [Ping timeout: 245 seconds]
roshanavand has quit [Read error: Connection reset by peer]
roshanav_ has joined #ruby
hahuang65 has quit [Ping timeout: 264 seconds]
Synthbread has quit [Read error: Connection reset by peer]
codecop has quit [Remote host closed the connection]
llfwf33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
PedramT_ has joined #ruby
benjohn has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
llfwf33 has joined #ruby
certainty has joined #ruby
edwinvdgraaf has joined #ruby
chipotle has joined #ruby
arup_r has quit [Remote host closed the connection]
Xeago has joined #ruby
dwfait has joined #ruby
PedramT has quit [Ping timeout: 240 seconds]
craigp has quit [Remote host closed the connection]
sarkis has joined #ruby
blaxter has quit [Quit: foo]
sigurding has joined #ruby
sarkis has quit [Ping timeout: 245 seconds]
xet7 has joined #ruby
kalopsian has quit [Ping timeout: 240 seconds]
sandstrom has joined #ruby
plsk has joined #ruby
jbrhbr has joined #ruby
roshanav_ has quit [Remote host closed the connection]
blackgoat has quit [Quit: WeeChat 1.3]
blackgoat has joined #ruby
roshanavand has joined #ruby
Snowy has joined #ruby
huyderman has joined #ruby
pawnbox has quit [Remote host closed the connection]
roshanavand has quit [Remote host closed the connection]
sigurding has quit [Quit: sigurding]
gambl0re has quit []
hannelita has joined #ruby
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
Snowy has quit [Remote host closed the connection]
elaptics`away has quit [Remote host closed the connection]
Snowy has joined #ruby
kalopsian has joined #ruby
danron has joined #ruby
roshanavand has joined #ruby
Z00t has joined #ruby
PedramT has joined #ruby
mikecmpbll has joined #ruby
hannelita has quit [Ping timeout: 264 seconds]
PedramT_ has quit [Ping timeout: 245 seconds]
danron has left #ruby [#ruby]
TheHodge has joined #ruby
pawnbox has joined #ruby
clauswitt has joined #ruby
PedramT_ has joined #ruby
p1k has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
PedramT has quit [Ping timeout: 250 seconds]
dEPy has joined #ruby
sarkis has joined #ruby
craigp has joined #ruby
drptbl has joined #ruby
pik has joined #ruby
sarkis has quit [Ping timeout: 255 seconds]
blaxter has joined #ruby
p1k has quit [Ping timeout: 276 seconds]
Xeago has quit [Read error: Connection reset by peer]
failshell has joined #ruby
quaristice has joined #ruby
bronson has joined #ruby
PedramT has joined #ruby
SCHAAP137 has joined #ruby
kalopsian has quit [Ping timeout: 255 seconds]
sigurding has joined #ruby
ziyadb has joined #ruby
PedramT_ has quit [Ping timeout: 245 seconds]
kalopsian has joined #ruby
PedramT has quit [Read error: Connection reset by peer]
PedramT has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
sftrabbit has joined #ruby
failshell has quit [Ping timeout: 256 seconds]
PedramT has quit [Remote host closed the connection]
jenrzzz has joined #ruby
dEPy has quit [Quit: (null)]
sarkis has joined #ruby
blaxter has quit [Ping timeout: 250 seconds]
bronson has quit [Ping timeout: 276 seconds]
bluOxigen_ has joined #ruby
agent_white has quit [Quit: brbsec]
Mirry has quit [Ping timeout: 246 seconds]
bluOxigen has quit [Ping timeout: 265 seconds]
sarkis has quit [Ping timeout: 250 seconds]
yfeldblum has quit [Ping timeout: 246 seconds]
roshanavand has quit [Remote host closed the connection]
curses has joined #ruby
Amnez777 has quit [Ping timeout: 272 seconds]
harai54 has quit [Ping timeout: 272 seconds]
Mirry has joined #ruby
elaptics`away has joined #ruby
roshanavand has joined #ruby
Xeago has joined #ruby
futilegames has joined #ruby
jbrhbr has quit [Quit: Leaving.]
jam_ has joined #ruby
sigurding has quit [Quit: sigurding]
blackmes1 has joined #ruby
kam270 has joined #ruby
certainty has quit [Ping timeout: 246 seconds]
blackmesa has joined #ruby
elaptics`away is now known as elaptics
karapetyan has joined #ruby
kam270 has quit [Max SendQ exceeded]
sarkis has joined #ruby
kam270 has joined #ruby
jam_ has quit [Ping timeout: 240 seconds]
blackmes1 has quit [Ping timeout: 246 seconds]
Mirry has quit [Ping timeout: 272 seconds]
roshanavand has quit [Remote host closed the connection]
blaxter has joined #ruby
sarkis has quit [Ping timeout: 240 seconds]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
roshanavand has joined #ruby
FooMunki has joined #ruby
bluOxigen_ has quit [Read error: Connection reset by peer]
FooMunki has quit [Client Quit]
bluOxigen has joined #ruby
FooMunki has joined #ruby
futilegames has quit [Quit: futilegames]
Mirry has joined #ruby
sarkis has joined #ruby
j416 has quit [Quit: o/]
Jackneill has joined #ruby
kt2 has quit [Read error: Connection reset by peer]
tectonic has quit [Ping timeout: 250 seconds]
jud^ has joined #ruby
scripore has joined #ruby
LiquidIn1ect has quit [Ping timeout: 255 seconds]
kt2 has joined #ruby
tomdp has quit [Ping timeout: 240 seconds]
linc01n has quit [Ping timeout: 250 seconds]
rdark has joined #ruby
Mirry has quit [Ping timeout: 256 seconds]
sarkis has quit [Ping timeout: 264 seconds]
M-Kodo has quit [Ping timeout: 250 seconds]
greister has quit [Ping timeout: 250 seconds]
alakra has quit [Ping timeout: 250 seconds]
dh64 has quit [Ping timeout: 240 seconds]
blt has quit [Ping timeout: 250 seconds]
adam12 has quit [Ping timeout: 250 seconds]
ducklobster has quit [Ping timeout: 250 seconds]
jud has quit [Ping timeout: 250 seconds]
dh64 has joined #ruby
kerunaru has quit [Ping timeout: 240 seconds]
tectonic has joined #ruby
grassass has quit [Ping timeout: 260 seconds]
tercenya_ has joined #ruby
M-shine has quit [Ping timeout: 240 seconds]
djellemah has quit [Ping timeout: 240 seconds]
dc1 has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
musl_ has joined #ruby
tomdp has joined #ruby
shredding has joined #ruby
linc01n has joined #ruby
jenrzzz has joined #ruby
certainty has joined #ruby
greister has joined #ruby
djellemah has joined #ruby
blt has joined #ruby
alakra has joined #ruby
tercenya has quit [Read error: Connection reset by peer]
dcunit3d has quit [Read error: Connection reset by peer]
musl has quit [Read error: Connection reset by peer]
redlegion_ has quit [Ping timeout: 276 seconds]
usershell has quit [Remote host closed the connection]
adam_ has joined #ruby
redlegion has joined #ruby
karapetyan has quit [Remote host closed the connection]
Nahra``` has quit [Changing host]
Nahra``` has joined #ruby
hannelita has joined #ruby
karapetyan has joined #ruby
marr has joined #ruby
M-Kodo has joined #ruby
sarkis has joined #ruby
nettoweb has joined #ruby
grassass has joined #ruby
M-shine has joined #ruby
usershell has joined #ruby
hannelita has quit [Ping timeout: 264 seconds]
dpg_ has quit [Ping timeout: 276 seconds]
yfeldblum has joined #ruby
sarkis has quit [Ping timeout: 240 seconds]
colegatron has quit [Ping timeout: 240 seconds]
kerunaru has joined #ruby
Bloomer has quit [Remote host closed the connection]
Hounddog has joined #ruby
hannelita has joined #ruby
atomical has quit [Max SendQ exceeded]
dnewkerk has quit [Quit: dnewkerk]
bweston92 has joined #ruby
atomical has joined #ruby
sarkis has joined #ruby
craigp has quit []
Dreamer3 has quit [Read error: Connection reset by peer]
tomdp has quit [Ping timeout: 250 seconds]
Dreamer3 has joined #ruby
blackmesa has quit [Ping timeout: 246 seconds]
adam_ has quit [Ping timeout: 250 seconds]
greister has quit [Ping timeout: 250 seconds]
sigurding has joined #ruby
Amnez777 has joined #ruby
Amnez777 has quit [Max SendQ exceeded]
sarkis has quit [Ping timeout: 255 seconds]
Amnez777 has joined #ruby
grassass has quit [Ping timeout: 256 seconds]
FernandoBasso has joined #ruby
Amnez777 has quit [Changing host]
Amnez777 has joined #ruby
tomdp has joined #ruby
adam_ has joined #ruby
greister has joined #ruby
Guest18754 is now known as Affix
Affix has quit [Changing host]
Affix has joined #ruby
blackmesa has joined #ruby
colegatron has joined #ruby
benlovell has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
grassass has joined #ruby
sarkis has joined #ruby
jenrzzz has joined #ruby
sepp2k has joined #ruby
hannelita has quit [Remote host closed the connection]
aadam21 has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
LiquidInsect has joined #ruby
Xeago has quit [Remote host closed the connection]
arup_r has joined #ruby
sergey_makagon has joined #ruby
webus has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
sarkis has quit [Ping timeout: 260 seconds]
Xeago has joined #ruby
tvw has joined #ruby
aganov has joined #ruby
aadam21 has quit [Ping timeout: 246 seconds]
tulak has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
pik has quit [Ping timeout: 260 seconds]
nbdy has quit [Ping timeout: 272 seconds]
sarkis has joined #ruby
axsuul has joined #ruby
zenlot1 is now known as zenlot
djbkd has joined #ruby
blt has quit [Ping timeout: 255 seconds]
moeSeth has quit [Quit: Connection closed for inactivity]
sarkis has quit [Ping timeout: 264 seconds]
BSaboia has joined #ruby
ruboto_ has quit [Remote host closed the connection]
axsuul has quit [Ping timeout: 260 seconds]
djbkd has quit [Ping timeout: 256 seconds]
rodfersou has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
ruboto has joined #ruby
govg has quit [Ping timeout: 272 seconds]
devbug has joined #ruby
EdwardIII has joined #ruby
joonty has joined #ruby
<EdwardIII>
if you're making a collection with some of your own methods, is it common to inherit from Array?
jenrzzz has joined #ruby
<apeiros>
EdwardIII: it's generally a bad idea to inherit from classes you don't own.
kerunaru has quit [Ping timeout: 256 seconds]
ldnunes has joined #ruby
sarkis has joined #ruby
karapetyan has quit [Remote host closed the connection]
Mirry has joined #ruby
<EdwardIII>
so would you just have an object that implements to_array?
<apeiros>
to_a, each and includes Enumerable
devbug has quit [Ping timeout: 260 seconds]
<apeiros>
depending on your class, you can also leverage Forwardable/SimpleDelegator
<EdwardIII>
ah ok
<EdwardIII>
that looks pretty good
<EdwardIII>
thanks!
elaptics is now known as elaptics`away
hannelita has joined #ruby
<apeiros>
note: each + Enumerable gives you to_a too, so only implement to_a if it's more efficient than generating the array through .each
sarkis has quit [Ping timeout: 260 seconds]
DoubleMalt has quit [Ping timeout: 246 seconds]
<EdwardIII>
apeiros: hrm Enumerable will call .each() when you do to_a by default?
<EdwardIII>
unless you override to_a?
<apeiros>
yes. Enumerable uses .each for about all methods it provides
<EdwardIII>
ok neat
usershel_ has joined #ruby
chipotle has quit [Quit: cheerio]
anaeem1_ has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
usershell has quit [Ping timeout: 245 seconds]
chipotle has joined #ruby
sarkis has joined #ruby
clauswitt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karapetyan has joined #ruby
casadei has joined #ruby
antgel has quit [Ping timeout: 264 seconds]
craysiii has quit [Remote host closed the connection]
binaryplease1 has joined #ruby
binaryplease1 has quit [Client Quit]
binaryplease has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
sarkis has quit [Ping timeout: 250 seconds]
TheBrayn has quit [Ping timeout: 246 seconds]
davzie has left #ruby ["WeeChat 0.3.0"]
karapetyan has quit [Remote host closed the connection]
norc has joined #ruby
aadam21 has joined #ruby
casadei has quit [Ping timeout: 260 seconds]
<shevy>
anyone of you uses something non-standard for ruby documentation? like autogenerating .pdf files or such?
clauswitt has joined #ruby
elaptics`away is now known as elaptics
antgel has joined #ruby
platzhirsch has joined #ruby
<shevy>
I am playing around with http://wkhtmltopdf.org/ but the generated .pdf seem to be of not ideal quality :(
karapetyan has joined #ruby
certainty has quit [Ping timeout: 272 seconds]
sarkis has joined #ruby
bkxd_ has quit [Ping timeout: 255 seconds]
sftrabbit has quit [Quit: sftrabbit]
bkxd has joined #ruby
karapetyan has quit [Remote host closed the connection]
failshell has joined #ruby
sergey_makagon has quit [Remote host closed the connection]
sarkis has quit [Ping timeout: 240 seconds]
tectonic has quit []
Xeago has quit [Remote host closed the connection]
platzhirsch has left #ruby [#ruby]
toretore has joined #ruby
failshell has quit [Ping timeout: 260 seconds]
sigurding has quit [Quit: sigurding]
rkazak has joined #ruby
DoubleMalt has joined #ruby
nerfando has joined #ruby
sarkis has joined #ruby
moty66 has joined #ruby
yfeldblum has quit [Ping timeout: 255 seconds]
Z00t has quit [Read error: Connection reset by peer]
sftrabbit has joined #ruby
sarkis has quit [Ping timeout: 260 seconds]
last_staff has quit [Read error: Connection reset by peer]
jam_ has joined #ruby
chipotle has quit [Quit: cheerio]
dlitvak has joined #ruby
brixen has quit [Ping timeout: 276 seconds]
quaristice has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jam_ has quit [Ping timeout: 240 seconds]
Z00t has joined #ruby
brixen has joined #ruby
postmodern has quit [Quit: Leaving]
sarkis has joined #ruby
Z00t has quit [Remote host closed the connection]
roshanavand has quit [Remote host closed the connection]
last_staff has joined #ruby
certainty has joined #ruby
llfwf33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
PlasmaStar has quit [Ping timeout: 255 seconds]
aadam21 has quit [Ping timeout: 240 seconds]
quaristice has joined #ruby
sigurding has joined #ruby
sarkis has quit [Ping timeout: 250 seconds]
mdw has joined #ruby
PlasmaStar has joined #ruby
kerunaru has joined #ruby
dlitvak has quit [Remote host closed the connection]
rkazak has quit [Quit: Sleep.....ing....]
dlitvak has joined #ruby
BTRE has quit [Quit: Leaving]
aryaching has joined #ruby
hannelita has quit [Remote host closed the connection]
lxsameer has quit [Quit: Leaving]
hannelita has joined #ruby
sarkis has joined #ruby
bigkevmcd has quit [Quit: Outta here...]
quaristice has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aadam21 has joined #ruby
sftrabbit has quit [Quit: sftrabbit]
rrichard_ has joined #ruby
sftrabbit has joined #ruby
sarkis has quit [Ping timeout: 255 seconds]
peeja has joined #ruby
rrichard_ has quit [Max SendQ exceeded]
bruce__lee has joined #ruby
lipoqil has joined #ruby
PedramT has joined #ruby
binaryplease has quit [Quit: WeeChat 1.3]
PedramT has quit [Remote host closed the connection]
yfeldblum has joined #ruby
peeja has quit [Ping timeout: 260 seconds]
roshanavand has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bruce_lee has quit [Ping timeout: 265 seconds]
usershel_ has quit [Read error: Connection reset by peer]
Ishido has joined #ruby
blackmesa has joined #ruby
sarkis has joined #ruby
usershell has joined #ruby
dlitvak has quit [Ping timeout: 246 seconds]
Helheim has quit [Remote host closed the connection]
roshanavand has quit [Ping timeout: 260 seconds]
zeroDivisible has joined #ruby
dlitvak has joined #ruby
bruce__lee has quit [Changing host]
bruce__lee has joined #ruby
sarkis has quit [Ping timeout: 264 seconds]
shredding has quit [Ping timeout: 255 seconds]
User458764 has joined #ruby
nertzy has quit [Read error: Connection reset by peer]
nettoweb has joined #ruby
clauswitt has quit [Read error: Connection reset by peer]
nertzy has joined #ruby
clauswitt has joined #ruby
nerfando has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
BTRE has joined #ruby
PhantomSpank has joined #ruby
duckpuppy has joined #ruby
krz has joined #ruby
sarkis has joined #ruby
f4cl3y has joined #ruby
c355e3b has joined #ruby
sergey_makagon has joined #ruby
benlovell has quit [Ping timeout: 240 seconds]
PhantomSpank has quit [Remote host closed the connection]
sarkis has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 245 seconds]
arup___ has joined #ruby
sftrabbit has quit [Quit: sftrabbit]
roshanavand has joined #ruby
scepticulous has joined #ruby
jenrzzz has joined #ruby
sergey_makagon has quit [Ping timeout: 255 seconds]
Mon_Ouie has quit [Ping timeout: 260 seconds]
arup_r has quit [Ping timeout: 246 seconds]
chimche has joined #ruby
<scepticulous>
I am trying to generate a class and the generate method should take a block in which I can define methods. I am yielding the block withing the Class.new block ( after doing some other stuff ), My method ends up being private. Any ideas ?
<scepticulous>
private method `boo' called for FooPresenter:Class
karapetyan has joined #ruby
roshanavand has quit [Ping timeout: 264 seconds]
<apeiros>
scepticulous: how do you "yield" the block to Class.new?
<apeiros>
or:
<apeiros>
?code scepticulous
<ruboto>
scepticulous, We can't help you without your code, please post it to https://gist.github.com
stamina has joined #ruby
sarkis has joined #ruby
chimche has quit [Client Quit]
mark2 has left #ruby ["PART #RubyOnRails :PART #jquery :PART #reactjs :PART ##javascript :PART #elixir-lang :PART #debian :PART #zsh :PONG :sinisalo.freenode.net"]
<scepticulous>
apeiros: by calling yield
arup_r has joined #ruby
<scepticulous>
yeah I will make a snipped, thought there was a chance, somebodys knows without.
<apeiros>
that can't work as it won't set the context correctly. Class.new essentially uses class_eval. yield does not.
karapetyan has quit [Ping timeout: 240 seconds]
pec has joined #ruby
moeSeth has joined #ruby
TheBrayn has joined #ruby
arup___ has quit [Ping timeout: 265 seconds]
sarkis has quit [Ping timeout: 276 seconds]
arup_r has quit [Ping timeout: 240 seconds]
<scepticulous>
apeiros: ok, I kind of understand. Should I call klass.instance_eval and pass the block after "using" Class instead?
<ruboto>
scepticulous, we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
scepticulous: why don't you just pass the block directly to Class.new?
<scepticulous>
apeiros: I actually tried to avoid class_eval, instance_eval there.
<scepticulous>
because i want to do some stuff in addition to the optional block
<apeiros>
instance_eval will set a different context for method defs too.
<norc>
scepticulous: Are you trying to reimplement Class.new?
<apeiros>
but yes, klass.class_eval.
* norc
is confused
<apeiros>
scepticulous: and that additional stuff must happen before the class_eval?
<scepticulous>
norc: no I just want to generate code that repeats over and over again
<scepticulous>
apeiros: no, there is no specific order
<apeiros>
*sob*, -lgmp fails - anybody knows what library I have to install for that on ubuntu?
<apeiros>
scepticulous: then again - why not pass it to Class.new?
<norc>
apeiros: libgmp3-dev
certainty has joined #ruby
<apeiros>
thanks norc
gigetoo has quit [Ping timeout: 245 seconds]
<apeiros>
norc: is there any generic way to figure such stuff out?
<norc>
apeiros: Google? :D
<apeiros>
*sob*, I feared that answer.
<apeiros>
IMO a platform where you have to figure stuff like this by googling is broken.
gigetoo has joined #ruby
<norc>
apeiros: You are correct. The mixture of two unrelated package management systems like Rubygem and dpkg is not healthy.
sarkis has joined #ruby
lucasb has joined #ruby
<apeiros>
norc: that's not actually even the issue here.
<apeiros>
it should be possible to query your pm for which package contains whatever is needed to have -lgpm work
aupadhye has joined #ruby
benlovell has joined #ruby
roshanavand has joined #ruby
<scepticulous>
apeiros: https://gist.github.com/scepticulous/ae0f92f88aad6ea844de I am already using the block to write lots of common code. In addition to that the generator should also accept a block for specific behavior in addition to the shared behavior.
<apeiros>
ok. then move the class_eval in there.
<apeiros>
IMO also drop the const_set
<apeiros>
Foo = Generator.generate # sufficient
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #ruby
sarkis has quit [Ping timeout: 255 seconds]
<scepticulous>
apeiros: ok thanks, I was looking for some advise, since I lack experience in this.
<apeiros>
advice ;-)
<scepticulous>
damn it
<apeiros>
advise is the verb
<scepticulous>
I corrected it to the wrong syntax
benlovell has quit [Ping timeout: 240 seconds]
chipotle has quit [Quit: cheerio]
<scepticulous>
I'll leave and hide
joonty has quit [Ping timeout: 255 seconds]
Xeago has joined #ruby
aadam21 has quit [Remote host closed the connection]
chipotle has joined #ruby
duoi has quit [Max SendQ exceeded]
<norc>
scepticulous: You are trying to completely reinvent the wheel.
duoi has joined #ruby
<norc>
scepticulous: Ruby has a facility providing you with what you are trying to do, which is called composition.
asmodlol has quit [Ping timeout: 246 seconds]
<norc>
Mixins
<apeiros>
scepticulous: btw., you can do klass.include CommonModule
asmodlol has joined #ruby
<apeiros>
no need for putting that into the block.
<scepticulous>
norc: regarding the generation of class or defining additional methods via a block ?
<apeiros>
that is - with newer rubies. older ones require you to use .send(:include, …)
nerfando has joined #ruby
<apeiros>
f'ing gcc - wouldn't it be jolly nice if it actually told you that it failed because it didn't have enough ram?
<apeiros>
srsly
<norc>
scepticulous: klass = Class.new(your_block); klass.include(Whatever)
<norc>
Done.
<apeiros>
"gcc: internal compiler error: Killed (program cc1)↩︎ Please submit a full bug report…"
<apeiros>
that's what it considers a useful error message…
sarkis has joined #ruby
benlovell has joined #ruby
<scepticulous>
its jruby 9k and its not only include statements, I have to do DSL definition within the class. actually I am trying to workaround some odd aspects of a library that I currently depend on.
* apeiros
hands norc a &
<norc>
apeiros: ICEs have really nasty causes. :-)
<norc>
I used to celebrate whenever I caused one.
<apeiros>
ICE? are we in neuromancer?
<apeiros>
wait… that's not the correct book, is it?
<norc>
Huh
agit0 has quit [Ping timeout: 256 seconds]
whiteline has joined #ruby
<norc>
Though I admit, the weirdest thing I had was discovering a massive bug in the linker used by MSVC that consistently triggered when linking against one of our template libraries - but only if the antivirus software was running the background.
<apeiros>
oh it is neuromancer :D
<norc>
Since then any GCC ICE was just plain boring.
<apeiros>
norc: if you never heard the term "ice" or "ice breaker" you probably haven't read neuromancer - go read it! ;-p
<norc>
Already have the dragon book on my schedule next. :S
* apeiros
cries
<apeiros>
that's been on my list for ages :(
<apeiros>
where can I buy more time?
<norc>
Time is what companies sell you.
bkxd has quit [Ping timeout: 276 seconds]
<norc>
They sell you products designed to lessen your burdens.
<apeiros>
s/sell/steal from/
<apeiros>
they fail. so hard.
<norc>
Some do.
<apeiros>
most :-/
<norc>
Oracle does at least.
sarkis has quit [Ping timeout: 260 seconds]
<apeiros>
mhm, yes, oracle does. sql developer is a major offender.
lucasb has quit [Quit: leaving]
<norc>
apeiros: We are getting hit by the sledgehammer that is called "try running Oracle on a VMware cluster and discover Oracles opinion about virtualization and licensing"
<apeiros>
ha. ha. ha.
<apeiros>
sorry
dionysus69 has quit [Remote host closed the connection]
<norc>
;-)
<apeiros>
my sincere commiseration :)
<apeiros>
oh btw., you also must not benchmark oracle and publish that benchmark. it's forbidden per eula.
<norc>
Hehe. I absolutely love their business model how almost all features in Oracle work out of the box even without licensing. And if they discover that you have been using it, you get back licensed for that feature.
govg has joined #ruby
chipotle has quit [Quit: cheerio]
<apeiros>
I also love how they charge you for bug reports.
<norc>
They do?
<apeiros>
they do.
failshell has joined #ruby
<apeiros>
you have to pay money to report a bug, you have to pay more money to get an actual fix. great business model.
<adaedra>
Can you talk about that in #hell ?
arup_r has joined #ruby
<adaedra>
Because it looks like you're describing it :D
dorei has joined #ruby
<apeiros>
adaedra: we're just trying to warn all rubyists from the evil that is oracle!
<apeiros>
but you're right, off to off-topic!
<adaedra>
heheh
failshell has quit [Remote host closed the connection]
ruboto has quit [Remote host closed the connection]
duckpuppy has quit [Ping timeout: 256 seconds]
ruboto has joined #ruby
joonty has joined #ruby
ItSANgo has quit [Quit: Leaving...]
<apeiros>
>> 1+1
shredding has joined #ruby
<apeiros>
good.
ruby[bot] has joined #ruby
<apeiros>
>> 1+1
duckpuppy has joined #ruby
devbug has joined #ruby
ruby[bot] has quit [Client Quit]
sarkis has joined #ruby
chimche has joined #ruby
<ljarvis>
wat
<ljarvis>
>> 1+1
<ljarvis>
notgood.
arquebus has joined #ruby
llfwf33 has joined #ruby
nertzy2 has joined #ruby
devbug has quit [Ping timeout: 260 seconds]
argoneus has left #ruby [#ruby]
arquebus has quit [Client Quit]
aadam21 has joined #ruby
<apeiros>
yupp, not good. problem with the new bot. if I can't solve it today, I'll reactivate eval-in on ruboto.
sarkis has quit [Ping timeout: 240 seconds]
blackgoat has quit [Quit: night night]
nertzy has quit [Ping timeout: 240 seconds]
failshell has joined #ruby
failshell has quit [Remote host closed the connection]
resin has joined #ruby
mikecmpbll has quit [Read error: Connection reset by peer]
Ishido has quit [Ping timeout: 240 seconds]
chipotle has joined #ruby
grassass has quit [Ping timeout: 245 seconds]
allcentury has joined #ruby
govg has quit [Ping timeout: 250 seconds]
govg has joined #ruby
aadam21 has quit [Ping timeout: 240 seconds]
Puffball_ has joined #ruby
User4587_ has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
User458764 has quit [Ping timeout: 276 seconds]
BSaboia has quit [Ping timeout: 276 seconds]
Puffball has quit [Quit: No Ping reply in 180 seconds.]
kalopsian has quit [Ping timeout: 246 seconds]
atumzin has quit [Remote host closed the connection]
mahk has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
grassass has joined #ruby
kalopsian has joined #ruby
atomical_ has joined #ruby
sarkis has joined #ruby
atomical has quit [Ping timeout: 272 seconds]
BrunoSaboia has joined #ruby
atomical_ has quit [Max SendQ exceeded]
atomical has joined #ruby
bronson has joined #ruby
yalue has joined #ruby
chipotle has quit [Quit: cheerio]
sarkis has quit [Ping timeout: 264 seconds]
yfeldblum has quit [Ping timeout: 250 seconds]
scripore has joined #ruby
FernandoBasso has quit [Quit: Leaving]
bronson has quit [Ping timeout: 240 seconds]
aufi has quit [Ping timeout: 245 seconds]
sergey_makagon has joined #ruby
sigurding has quit [Quit: sigurding]
sarkis has joined #ruby
pvinis has joined #ruby
UtkarshRay has quit [Remote host closed the connection]
<pvinis>
hello. i need to get the current month name in german
<pvinis>
i can get "January", but can i get it in german somehow?
blackmesa has joined #ruby
KineticX has joined #ruby
jam_ has joined #ruby
sarkis has quit [Ping timeout: 240 seconds]
sdothum has joined #ruby
Mirry has quit [Ping timeout: 240 seconds]
codecop has joined #ruby
dlitvak has quit [Ping timeout: 246 seconds]
pik has joined #ruby
mja has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
<apeiros>
pvinis: you'll have to either get one of the i18n gems, or build your own.
dlitvak has joined #ruby
<pvinis>
apeiros: is there one that translates using google translate or something?
ItSANgo has joined #ruby
synthroid has joined #ruby
<apeiros>
maybe. that's not something I'd use.
jam_ has quit [Ping timeout: 276 seconds]
<bhaak>
is it only for German?
<apeiros>
but there's certainly many which provide translations for common things like month names.
peeja has joined #ruby
mfb2 has joined #ruby
axsuul has joined #ruby
JakFrist has joined #ruby
<apeiros>
see e.g. rails-i18n
<norc>
pvinis: Use i18n.
<pvinis>
thats the one i was trying
<norc>
You were using it wrong then. ;-)
<pvinis>
but i cannot find doc or examples
atomical has quit [Ping timeout: 246 seconds]
atomical_ has joined #ruby
sarkis has joined #ruby
<pvinis>
like, how do i call i18n to translate the string "January" in german?
mfb2 has quit [Ping timeout: 240 seconds]
axsuul has quit [Ping timeout: 265 seconds]
chipotle has joined #ruby
govg has quit [Ping timeout: 264 seconds]
Zackio has quit [Quit: C-x C-c]
sarkis has quit [Ping timeout: 256 seconds]
pvinis has quit []
govg has joined #ruby
Zackio has joined #ruby
kiavolo has joined #ruby
<kiavolo>
!list
inkky has quit [Changing host]
inkky has joined #ruby
codecop has quit [Ping timeout: 264 seconds]
Zackio has quit [Client Quit]
kiavolo has quit []
bkxd has joined #ruby
chimche has joined #ruby
jgpawletko has joined #ruby
sgambino has joined #ruby
livcd has joined #ruby
mahk has joined #ruby
sarkis has joined #ruby
<livcd>
Anyone built ruby W glibc using buildroot ?
Zackio has joined #ruby
chipotle has quit [Quit: cheerio]
djdb has joined #ruby
kobain has joined #ruby
Zackio has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 255 seconds]
sandstrom has joined #ruby
KineticX has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
sarkis has quit [Ping timeout: 240 seconds]
BrunoSaboia has quit [Ping timeout: 256 seconds]
peeja has quit [Ping timeout: 255 seconds]
djdb has quit [Client Quit]
duckpuppy has quit [Quit: WeeChat 1.3]
duckpuppy has joined #ruby
Guest6725 has joined #ruby
codecop has joined #ruby
usershell has quit [Remote host closed the connection]
chipotle has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
duckpuppy has quit [Client Quit]
duckpuppy has joined #ruby
BSaboia has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
malconis has joined #ruby
malconis has quit [Remote host closed the connection]
Guest6725 has quit [Quit: Bæ provides this ZNC for me <3]
sarkis has joined #ruby
sftrabbit has joined #ruby
Zacketh has joined #ruby
malconis has joined #ruby
lipoqil has quit [Quit: Connection closed for inactivity]
dlitvak_ has joined #ruby
dlitvak has quit [Ping timeout: 245 seconds]
duckpuppy has quit [Client Quit]
duckpuppy has joined #ruby
duckpuppy has quit [Client Quit]
chimche has quit [Quit: Leaving.]
sarkis has quit [Ping timeout: 250 seconds]
programmerq has quit [Ping timeout: 256 seconds]
mary5030 has joined #ruby
<darix>
livcd: that question doesnt make sense
diegoviola has joined #ruby
<darix>
what is your exact problem?
chimche has joined #ruby
duckpuppy has joined #ruby
codecop has quit [Remote host closed the connection]
<livcd>
darix: i'd like to build a minimal docker container with buildroot for ruby
smactive has joined #ruby
sigurding has joined #ruby
griffindy has joined #ruby
B1n4r10 has joined #ruby
sankaber has joined #ruby
allcentury has quit [Ping timeout: 245 seconds]
momomomomo has joined #ruby
smactive has quit [Ping timeout: 265 seconds]
sarkis has joined #ruby
benlovell has quit [Ping timeout: 260 seconds]
scripore has quit [Quit: This computer has gone to sleep]
mdw has quit [Quit: Sleeping Zzzzz]
Guest53927 is now known as saneax_AFK
crime has joined #ruby
<crime>
if I wanted to store a regex literal such that the regex used in a class is the same in each instance, should I use @@?
sergey_makagon has quit []
sarkis has quit [Ping timeout: 240 seconds]
<apeiros>
"if I wanted to store a regex". you can't store a literal.
<apeiros>
IMO use a constant
<apeiros>
@@vars you'll generally want to avoid
<crime>
so if I just define a constant SomeConstant = some_value in my class body?
<apeiros>
yes
cdg has joined #ruby
huddy has joined #ruby
<crime>
if I do r = /\w/ for example, r.class => Regexp. Are there gotchas to doing that, should I use Regexp.new?
<adaedra>
no.
aryaching has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
<crime>
so its safe?
<apeiros>
…
<crime>
sorry im not very good at ruby
<apeiros>
is the list of remaining questions long?
defendguin has quit [Ping timeout: 256 seconds]
aryaching has joined #ruby
<apeiros>
I suggest you go try it. if you want a review of your code, put it into a gist and ask.
vdamewood has joined #ruby
BrunoSaboia has joined #ruby
sankaber has quit [Remote host closed the connection]
aadam21 has joined #ruby
sankaber has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
BSaboia has quit [Ping timeout: 250 seconds]
aadam21 has quit [Remote host closed the connection]
aadam21 has joined #ruby
ror15 has joined #ruby
platzhirsch has joined #ruby
BrunoSaboia has quit [Ping timeout: 265 seconds]
allcentury has joined #ruby
mja has quit [Quit: Lost terminal]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ljarvis>
also, dont read the file into readlines and then join it.. use File.read(...)
mfb2 has quit [Ping timeout: 245 seconds]
sandstrom has joined #ruby
<apeiros>
and generally, don't do File.open().…
<apeiros>
that means you never close it. and finalizer's close is not guaranteed to run. you're leaving dangling filehandles.
<crime>
oh
<apeiros>
ljarvis' suggestion of File.read(path) of course fixes that.
<crime>
ok so thats definitely a big deal, I'll fix that
mdw has joined #ruby
stannard has joined #ruby
hannelita has quit [Remote host closed the connection]
<apeiros>
pairs_that_start_with: @words.each_cons(2).select { |a,*| a == start_with }
benlovell has quit [Ping timeout: 264 seconds]
kalopsian has quit [Ping timeout: 264 seconds]
sarkis has quit [Ping timeout: 255 seconds]
<apeiros>
similar pattern can be used in words_from_fragment
<ljarvis>
that doesn't return the same thing
<ljarvis>
er
<ljarvis>
ignore me :)
<apeiros>
happily :D
* ljarvis
read res as being flat
<ljarvis>
need coffee
<apeiros>
`#this is a class documentation comment to shut rubocop up` - bad idea. let rubocop complain. that's what it's there for.
<crime>
yeah but if each class has its own file whats the point of having a class documentation comment above each class
<crime>
idk just seems irritating
<apeiros>
oh, actually, words_from_fragment can't use a similar pattern as suggested. missed that it pushes cons.last.
<yorickpeterse>
PLEASE PUT SPACE BEFORE CURLY BRACE
<yorickpeterse>
OFFENCE DETECTED
<yorickpeterse>
STOP RESISTING ARREST
<apeiros>
crime: the point is to have your class, you know, documented
* yorickpeterse
is not the biggest fan of Rubocop
<ljarvis>
wut{ |w,b | }
<yorickpeterse>
ljarvis: see I never got that syntax
<yorickpeterse>
as in, I don't know why it's a thing
TomPeed has joined #ruby
<ljarvis>
single lines and chaining
<ljarvis>
(just pointing out where I use it)
<yorickpeterse>
well yeah, but what I mean is this:
<apeiros>
oh, and regarding my { |a,*|, use word, not a, as lvar name
aryaching has quit [Read error: Connection reset by peer]
<yorickpeterse>
wut{ .... }.wut{ ... }
<yorickpeterse>
vs
<apeiros>
"a" sucks as a name.
<yorickpeterse>
wut { ... }.wut { ... }
<ljarvis>
o
<ljarvis>
ya
<ljarvis>
wut{} is murder
djbkd has joined #ruby
<yorickpeterse>
neither is really better than the other, but I'm just curious where it originated from
<crime>
is it not considered proper to just break that into multiple lines since ruby knows if a line is chained from the previous line?
<yorickpeterse>
The only argument I can think of is that "wut{" makes it look as if { is part of the name, but by that argument the same would apply to "wut(...)"
hannelita has joined #ruby
aryaching has joined #ruby
<apeiros>
yorickpeterse: lots of code style is just about what you're used to
<yorickpeterse>
true
<yorickpeterse>
which is why we should abolish curly braces ᕕ(ᐛ)ᕗ
sarkis has joined #ruby
<apeiros>
my main argument goes towards maintaining a consistent style.
<yorickpeterse>
In all seriousness, I think that's one of the things I like about whitespace based syntax: no arguments possible about what brace style to use
<apeiros>
haha, as if there wasn't enough other style to argue about
<yorickpeterse>
coincidentally my language will be whitespace based, though it has other practical reasons for that
<ljarvis>
yeah I agree with that, except fuck whitespace based syntax
<apeiros>
it drove me off python, but by now I find it one of its best ideas.
<yorickpeterse>
though I intend to start working on a test compiler this week
<apeiros>
yorickpeterse: when I started my language, I jokingly said it'd be done in 2017
<apeiros>
now 2017 is rapidly approaching :<
<yorickpeterse>
I'd say the incubation time of a language is at least 5 years
<ljarvis>
mine is about 6 years in the making too, it does some things useful
<crime>
a whole year though
<apeiros>
>10y for mine :-S
<yorickpeterse>
it simply also takes a few years for people to actually notice it, start using it, write about it, etc
BSaboia has joined #ruby
<yorickpeterse>
though my goal mainly is to learn from it
<crime>
have you guys played with dart? I was messing with it the other day and realized that its actually not terrible
<ljarvis>
i mean.. we *are* still waiting for a ruboto 2.2.3 update
<yorickpeterse>
:P
<ljarvis>
2.3*
<apeiros>
yorickpeterse: will your stdlib contain a Flux class?
<apeiros>
ljarvis: if that thing before hadn't failed, we'd have it now!
<ljarvis>
stupid thing!
<yorickpeterse>
apeiros: a what?
<yorickpeterse>
you mean a Lux class in the "f" package?
<yorickpeterse>
f.Lux? :P
djbkd has quit [Ping timeout: 265 seconds]
<apeiros>
yorickpeterse: a class named Flux, or flux, or whatever the naming scheme allows
<apeiros>
and don't tell me you don't know aeon flux
<yorickpeterse>
unless that was a stab at iOS containing a copy of f.lux, dunno?
<yorickpeterse>
oh
<yorickpeterse>
he
<yorickpeterse>
* heh
<yorickpeterse>
Yeah I remember that movie
<yorickpeterse>
So syntax wise I went with whitespace based because the language inherits heavily from smalltalk with the whole "everything is a method" craze. This naturally leads to lots of method chaining, which in turn can lead to quite a bit of horizontal space being used
<yorickpeterse>
e.g.....
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yorickpeterse>
here | visit.empty? |.while_true: is something I'm still not sure of
<HashNuke>
crime: I'm actually testing my irc client :)
<yorickpeterse>
| foo |.bar would basically be a closure with ".bar" being called on it
<yorickpeterse>
but I'm not a fan of the syntax
<crime>
right on, seems to be working HashNuke
benlovell has joined #ruby
usershell has quit [Ping timeout: 265 seconds]
<yorickpeterse>
the other alternative would be ||: visit.empty? NEWLINE .while_true
<HashNuke>
crime: not an offshelf client. I wrote one. And yay it works :D
<yorickpeterse>
which....meh
lucasb has joined #ruby
<yorickpeterse>
also not sure yet if I like the < and > for type signatures, though they are the most familiar to most
joonty has quit [Ping timeout: 245 seconds]
<yorickpeterse>
hence I want to write a compiler, it would allow me to actually muck with the syntax and see if it's even possible to make the grammar LL(1) without too many lexer hacks
moeSeth has quit [Quit: Connection closed for inactivity]
<yorickpeterse>
(the parser grammar that is, the lexer would not be context-free)
mybatman123 has quit [Ping timeout: 245 seconds]
<yorickpeterse>
also lol I actually used the trait syntax for importing a package, silly me
<yorickpeterse>
("use" would be for traits, "import" for packages)
phreakocious has quit [Ping timeout: 272 seconds]
whippythellama has joined #ruby
blackmesa has quit [Ping timeout: 256 seconds]
solars has quit [Ping timeout: 264 seconds]
<ljarvis>
yorickpeterse: noo docs inside of the method body :( :( :(
<ljarvis>
(i get the reasons) but still noo
<yorickpeterse>
well there's no real alternative if I want them to be properly associated with a method
mybatman123 has joined #ruby
<yorickpeterse>
one should be able to query them during runtime
<yorickpeterse>
I can put them outside a method and associate them on compiler level, but that leads to wacky stuff
<yorickpeterse>
e.g. what happens if there's a comment, 15 newlines and then a method? Should the comment be associated with the method?
mybatman123 has quit [Remote host closed the connection]
<yorickpeterse>
Not sure how Elixir does it
pik has quit [Ping timeout: 240 seconds]
<crime>
yorick, have you read anything about iolanguage? you might like that
<yorickpeterse>
crime: Yes, I looked into Io quite a while a go
mybatman123 has joined #ruby
<yorickpeterse>
* ago
<ljarvis>
yorickpeterse: it uses like a macro, @moduledoc """ .... """
<yorickpeterse>
hmmm
<yorickpeterse>
that's more or less the same as just moving the --- stuff before a method
<crime>
isnt it rad? ast-to-ast transforms, homoiconicity, message passing etc. the community has been busy with tooling lately, it's getting to be a real serious contender
<crime>
give it another year or so and people are actually gonna be out there using it
<yorickpeterse>
crime: isn't Io as dead as can be?
<ljarvis>
huh, io has been around ages.. it's dead
iateadonut has quit [Quit: Leaving.]
<ljarvis>
it aint gonna make it now, I'm afraid
phreakocious has joined #ruby
<crime>
progress is slow but there has been lots of tool development and little updates recently
<yorickpeterse>
ljarvis: so I generally dislike inline docblocks because they push down the body of a method, but it does make it more explicit that it belongs to the method
<yorickpeterse>
and e.g. moving the method around is super easy
<yorickpeterse>
(source wise)
pdoherty has quit [Remote host closed the connection]
<yorickpeterse>
Having said that, I might just abolish the entire idea and only support single line comments
<crime>
steve commits a few times a month generally
<ljarvis>
yorickpeterse: yeah there are certainly more reasons to keep it in the body. I just personally always disliked it for reading code
<yorickpeterse>
and use some kind of i18n system to just attach docs to methods
<yorickpeterse>
allowing multi-lingual docs right out of the box
<yorickpeterse>
ljarvis: so I started folding all comments by default in Vim
<yorickpeterse>
it's a bit buggy sometimes, but 95% of the time it works great
<lucasb>
I think Io's author doesn't develop anymore, but he merges PRs from others
chouhoulis has quit [Remote host closed the connection]
<yorickpeterse>
then it's just "za" on the fold to unfold, or zR to unfold all
mybatman123 has quit [Ping timeout: 250 seconds]
chouhoulis has joined #ruby
<yorickpeterse>
it does also fold empty lines after a comment, which is annoying when removing code
<yorickpeterse>
Either way, one option would be to just have your code somewhere
<ljarvis>
i have tools for jumping around method definitions and never felt the need for folding (i actually dislike it quite a lot for general code folding), hadn't considered just comments, though
<yorickpeterse>
and then have a doc/ directory that's automatically linked to your methods (by the VM or w/e)
Sucks has quit [Read error: Connection reset by peer]
<jackcom>
yeah i wil make program with ruby now
kobain has quit [Ping timeout: 240 seconds]
Sucks_ has joined #ruby
momomomomo has joined #ruby
colegatron has quit [Ping timeout: 245 seconds]
mfb2_ has joined #ruby
axl_ has joined #ruby
dmr8 has joined #ruby
blackmesa has joined #ruby
bubbys has quit [Ping timeout: 246 seconds]
russt has quit [Ping timeout: 272 seconds]
bubbys has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
mfb2 has quit [Ping timeout: 255 seconds]
jackcom has left #ruby [#ruby]
DEA7TH_ has joined #ruby
russt has joined #ruby
cschneid_ has joined #ruby
axl_ has quit [Client Quit]
chipotle has joined #ruby
mfb2_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
bithon has joined #ruby
axl_ has joined #ruby
nettoweb has quit [Ping timeout: 264 seconds]
Gnut has joined #ruby
atomical_ has joined #ruby
last_staff has quit [Read error: Connection reset by peer]
last_staff has joined #ruby
mfb2 has joined #ruby
atomical has quit [Ping timeout: 260 seconds]
aufi has quit [Quit: Konversation terminated!]
Gnut has quit [Quit: Lost terminal]
john1 has joined #ruby
colegatron has joined #ruby
john1 has quit [Read error: Connection reset by peer]
john1 has joined #ruby
codecop has joined #ruby
The_Phoenix has joined #ruby
jschmid has quit [Quit: Leaving]
kappy has joined #ruby
kobain has joined #ruby
KineticX has joined #ruby
KineticX has quit [Remote host closed the connection]
KineticX has joined #ruby
synthroid has quit [Remote host closed the connection]
lubekpl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bMalum has joined #ruby
skade has joined #ruby
yardenbar has quit [Ping timeout: 260 seconds]
ESpiney has joined #ruby
<lucasb>
the source code for this rubybot is online somewhere?
<adaedra>
it's hidden in a safe in an ancient temple in a jungle
uri_ has joined #ruby
<adaedra>
on Mars
aadam21_ has joined #ruby
jbrhbr has joined #ruby
<lucasb>
ok, at least Mars is near Earth
synthroid has joined #ruby
<john1>
lucasb: is not online, it is an exercise of a book
radgeRayden has joined #ruby
gregf has quit [Quit: WeeChat 1.4]
chipotle has quit [Quit: cheerio]
aadam21 has quit [Ping timeout: 255 seconds]
f4cl3y has quit [Ping timeout: 246 seconds]
<lucasb>
eregon: the history section of spec's README says RubySpec was ended at the end of 2015, but it was 2014.
Xeago has quit [Remote host closed the connection]
<crime>
the secret of the amazon
<crime>
sick ruby irc bots
<`derpy>
B)
TomyWork has quit [Ping timeout: 246 seconds]
zast has joined #ruby
mdw has quit [Read error: Connection reset by peer]
mustmodify_ has left #ruby [#ruby]
certainty has joined #ruby
framling has quit [Remote host closed the connection]
crime has quit [Ping timeout: 252 seconds]
djbkd has joined #ruby
freerobby has joined #ruby
axsuul has joined #ruby
<apeiros>
lucasb: part of it will be released. other parts might never be released.
<lucasb>
apeiros: ok, thanks. I was just curious to see its source.
<apeiros>
sure, common question
chipotle has joined #ruby
aganov has quit [Remote host closed the connection]
dudedudeman has joined #ruby
<dudedudeman>
Good morning, Ruby!
certainty has quit [Ping timeout: 240 seconds]
blackmesa has quit [Ping timeout: 256 seconds]
dudedudeman has left #ruby [#ruby]
djbkd has quit [Ping timeout: 265 seconds]
axsuul has quit [Ping timeout: 264 seconds]
User458764 has joined #ruby
agentmeerkat has joined #ruby
jbrhbr has quit [Quit: Leaving.]
kappy has quit [Quit: leaving]
kappy has joined #ruby
mduca has quit [Ping timeout: 240 seconds]
Hounddog has quit [Remote host closed the connection]
sepp2k has joined #ruby
solars has joined #ruby
B1n4r10 has joined #ruby
hahuang61 has quit [Ping timeout: 240 seconds]
froome has joined #ruby
[Butch] has joined #ruby
kerunaru has joined #ruby
DEA7TH_ has quit [Quit: DEA7TH_]
benjohn has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
bMalum has quit [Read error: Connection reset by peer]
ivanskie has joined #ruby
amclain has joined #ruby
gagrio has quit [Ping timeout: 250 seconds]
dionysus69 has joined #ruby
momomomomo has quit [Quit: momomomomo]
TomyLobo has joined #ruby
djbkd has quit [Ping timeout: 265 seconds]
ivanskie has quit [Client Quit]
Guest17508 has joined #ruby
norc has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
synthroid has quit [Remote host closed the connection]
<norc>
apeiros: Though I must say, SQL Developer is pretty neat. Tools like pgAdmin III just pale in comparison.
<froome>
how can I run a bash script (test.sh) from an rb file and pass it an argument?
benlovell has quit [Quit: leaving]
<mfb2>
What does #<Foo> mean in Ruby?
<norc>
mfb2: Can you provide a little more context?
chimche has quit [Quit: Leaving.]
<apeiros>
norc: it fails for me in so many regards…
<mfb2>
When I enter commands to irb, I get output that shows classes/modules wrapped in #<>
<mfb2>
for example:
<apeiros>
simple stuff like copy&paste which are hell. popups rendered in the weirdest positions. losing db connection. taking ages to figure it lost the connection.
<ror15>
#correct_guess should check to see if guess == answer and loop until it does so
kerunaru has joined #ruby
blaxter has quit [Ping timeout: 240 seconds]
<drbrain>
ror15: how does it get a new guess?
harai54 has joined #ruby
llfwf33 has quit [Read error: Connection reset by peer]
<ror15>
By going back to #player_guess
kerunaru has quit [Client Quit]
<drbrain>
and player_guess has `guess = 50` on L20
dlitvak has joined #ruby
<drbrain>
so it'll always end up with "yay"
<drbrain>
I think you should make correct_guess only check the guess
<drbrain>
and have a separate method for looping and calling player_guess
AugustoCesar has left #ruby ["QUIT :Leaving."]
<drbrain>
… and correct_guess
bkxd has quit [Ping timeout: 256 seconds]
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra>
apeiros: is it normal it retains its +o?
<apeiros>
adaedra: yes. reduces lag on kick/ban/mute
<adaedra>
ok.
lubekpl has joined #ruby
<ror15>
drbrain: so maybe until correct_guess do player_guess
<drbrain>
sure
aryaching has quit [Ping timeout: 256 seconds]
<drbrain>
… my proposal will make your test pass quickest
<ror15>
Is that what you mean though?
aryaching has joined #ruby
<drbrain>
I would make a method `play_game` which contains that loop ↑
sigurding has joined #ruby
<ror15>
Ah
<drbrain>
… because of L20 it's hard to make the test pass because of the looping (through recursion)
certainty has joined #ruby
theRealAlexz has quit [Ping timeout: 264 seconds]
chouhoulis has quit [Ping timeout: 260 seconds]
chouhoulis has joined #ruby
usershell has quit [Remote host closed the connection]
B1n4r10 has quit [Ping timeout: 276 seconds]
theRealAlexz has joined #ruby
ruby[bot] has quit [Quit: leaving]
juddey has joined #ruby
chouhoulis has quit [Remote host closed the connection]
jbrhbr has quit [Quit: Leaving.]
ruby[bot] has joined #ruby
certainty has quit [Ping timeout: 260 seconds]
chouhoulis has joined #ruby
john1 has quit [Ping timeout: 255 seconds]
ruby[bot] has quit [Client Quit]
sepp2k has quit [Read error: Connection reset by peer]
dlitvak has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
sftrabbit has quit [Quit: sftrabbit]
voidDotClass has joined #ruby
lemur has joined #ruby
<voidDotClass>
Is it possible to use a hybrid approach in a rails app, i.e have some url methods which respond in json, and also allow loading of resources like css, etc?
<voidDotClass>
it seems that if i go api, then i need to setup a separate front end server
<voidDotClass>
I want to combine the front end server + api backend endpoints in the same rails app
<jhass>
?rails
<ruby[bot]>
Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
jbrhbr has joined #ruby
slackbotgz has joined #ruby
Xeago has joined #ruby
mchu has quit [Quit: mchu]
theRealAlexz has quit [Ping timeout: 240 seconds]
platzhirsch has left #ruby [#ruby]
djbkd has joined #ruby
aryaching has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
theRealAlexz has joined #ruby
theRealAlexz has quit [Changing host]
theRealAlexz has joined #ruby
<norc>
ror15: Also, please use subject to set up your tested subject.
lemur has quit [Remote host closed the connection]
aupadhye is now known as aupadhye|bomgar
dmr8 has joined #ruby
binaryplease has quit [Quit: WeeChat 1.3]
roshanavand has joined #ruby
hannelita has quit [Remote host closed the connection]
voidDotClass has left #ruby ["Leaving"]
dlitvak has quit [Remote host closed the connection]
axsuul has joined #ruby
User458764 has joined #ruby
chimche has joined #ruby
choke has joined #ruby
roshanavand has quit [Remote host closed the connection]
momomomomo has joined #ruby
devbug has joined #ruby
seitensei has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
kies has quit [Ping timeout: 276 seconds]
user083 has quit [Ping timeout: 260 seconds]
frem has joined #ruby
devbug has quit [Ping timeout: 250 seconds]
nixmaniack has joined #ruby
nixmaniack has quit [Changing host]
nixmaniack has joined #ruby
user083 has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
hxegon has joined #ruby
dlitvak has joined #ruby
pawnbox_ has quit [Ping timeout: 255 seconds]
mrmargolis has joined #ruby
pawnbox has joined #ruby
blackgoat has joined #ruby
JakFrist has joined #ruby
karapetyan has joined #ruby
zast has quit [Remote host closed the connection]
lubekpl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
psy has quit [Disconnected by services]
Fearful has left #ruby ["doh"]
BSaboia has quit [Read error: Connection reset by peer]
psy_ has joined #ruby
agentmeerkat has quit [Ping timeout: 276 seconds]
BSaboia has joined #ruby
roshanavand has joined #ruby
kies has joined #ruby
jmignault has joined #ruby
underplank has joined #ruby
seitensei has quit [Quit: "For a good time, try: 'curl -L http://bit.ly/10hA8iC | bash' ;)"]
atomical has quit [Ping timeout: 256 seconds]
aupadhye|bomgar is now known as aupadhye
slackbotgz has quit [Remote host closed the connection]
<underplank>
Is there a way in rake to define a task that takes arguments. What I want is ‘rake task free form arguments’ and the arguments after the task get passed into the task?
slackbotgz has joined #ruby
JohnT has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
<apeiros>
rake takes arguments either via ENV, as in `rake task VAR=value`, or via task arguments. trying to look up how they look, I keep forgetting.
sftrabbit has joined #ruby
<apeiros>
ah, `rake task[arg1, …]`
<Ox0dea>
I mean, it's not like you don't have access to ARGV from within a Rake task.
<apeiros>
Ox0dea: iirc rake will cause issues
<Ox0dea>
apeiros: Not if you bail early! :P
lemur has joined #ruby
<underplank>
ahh, so my usecase is basically construct a command that is always pre-pended with a set of stuff. so as an example if I wanted to always pre-pend “bundle exec” so then I could do rake
dlitvak has joined #ruby
<underplank>
‘rake rails server’ or something like that.
TheEyeOfTheTruth has quit [Quit: Leaving]
<underplank>
thats a contrived example
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
sandstrom has quit [Quit: My computer has gone to sleep.]
PaulCapestany has quit [Quit: .]
<norc>
Ox0dea: Rails and Rake are the reasons, why so many programmers - albeit with some coming from Ruby directly - forget that they are actually writing Ruby code. How dare you strip them from their beliefs.
last_staff has quit [Remote host closed the connection]
Zacketh has quit [Quit: Bæ provides this ZNC for me <3]
Zackio has joined #ruby
ldnunes has quit [Quit: Leaving]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Eeinx has joined #ruby
who42 has joined #ruby
sfr^ has joined #ruby
<grill>
how would one advance the File.readlines line pointer manually while in a loop
sdothum has joined #ruby
KineticX has joined #ruby
underplank has quit [Quit: underplank]
atomical has joined #ruby
elaptics is now known as elaptics`away
<eam>
grill: by calling #readline
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pdoherty has quit [Ping timeout: 260 seconds]
choke has joined #ruby
<grill>
I need to skip over a bunch of lines in between two lines in a file
chrisarcand has quit [Quit: leaving]
<grill>
it looks like readlines returns lines as an array
<grill>
so, i guess i could just advance the array pointer. but how do i get the index of the current line?
<eam>
grill: if you call readlines you've already read them all
edwinvdgraaf has joined #ruby
<grill>
File.readlines(@config_file) do |line| ... end
<grill>
presumably, "line" points to an index, no?
<cscheib>
each_with_index ?
sfr^ has quit [Ping timeout: 260 seconds]
KineticX has quit [Ping timeout: 272 seconds]
<grill>
perhaps
djbkd_ has joined #ruby
guacamole has joined #ruby
momomomomo has quit [Quit: momomomomo]
bluOxigen has quit [Ping timeout: 265 seconds]
<grill>
can you not manually advance an iterator in ruby?
djbkd has quit [Remote host closed the connection]
kalopsian has quit [Ping timeout: 260 seconds]
djbkd has joined #ruby
kalopsian has joined #ruby
bMalum has joined #ruby
froome has quit [Ping timeout: 252 seconds]
<cscheib>
you probably should gist a practical example of what you're trying to do
guacamo__ has quit [Ping timeout: 265 seconds]
<grill>
eh. i guess i'll just use a for loop
sfr^ has joined #ruby
chrisarcand has joined #ruby
DoubleMalt has joined #ruby
<cscheib>
we don't have a real good idea what you're trying to do exactly... there is probably a very "ruby" way to do what you're wanting, it may just do it slightly differently than you're describing
<cscheib>
each with index returns the line and an index
djbkd_ has quit [Ping timeout: 265 seconds]
willy_ has joined #ruby
axsuul has quit [Ping timeout: 250 seconds]
willy_ has quit [Client Quit]
tinnvec has quit [Ping timeout: 260 seconds]
momomomomo has joined #ruby
djbkd has quit [Ping timeout: 264 seconds]
momomomomo has quit [Client Quit]
atomical_ has joined #ruby
sfr^ has quit [Excess Flood]
tinnvec has joined #ruby
Eeinx has quit [Quit: leaving]
Rodya_ has quit [Remote host closed the connection]
<nfk|laptop>
somehow fiddling around in irb and doing (5.times.collect {2}).inject :* makes me feel like i'm touching some godlike domain of understanding
<grill>
iterate through a file, printing lines to another file. however, if the program finds a specific line (e.g. ##ignore start##), it should ignore all following lines until the end of the file or a second specific line (e.g. ##ignore end##).
Rodya_ has joined #ruby
dlitvak has joined #ruby
<lucasb>
is that just 2**5 ? :)
<nfk|laptop>
yes
<nfk|laptop>
that's what blew my mind
pawnbox has joined #ruby
atomical has quit [Ping timeout: 260 seconds]
sfr^ has joined #ruby
<nfk|laptop>
it sort of makes sense if you think about it but i wouldn't have though i could do it that way if i had to
ror15 has joined #ruby
replay has quit [Ping timeout: 256 seconds]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tinnvec has quit [Ping timeout: 260 seconds]
jbrhbr has quit [Quit: Leaving.]
<lucasb>
next if /##ignore start##/ .. /##ignore end##/; would something like this work?
<norc>
nfk|laptop: ([2] * 5) is far more elegant than 5.times.collect {2} tho
<nfk|laptop>
honestly, the way foo.times.collect works still kinda doesn't sit inside my mind well
lxsameer has quit [Quit: Leaving]
tinnvec has joined #ruby
<nfk|laptop>
i hope you meant ** there
<norc>
Nope.
dlitvak has quit [Remote host closed the connection]
dlitvak has quit [Remote host closed the connection]
<lucasb>
ruby's for is more like for-each in other languages. and that's the same thing as the more ruby-idiomatic collection.each {...}
karapetyan has quit [Remote host closed the connection]
<grill>
ruby ruby ruby. such a black sheep
<aegis3121>
grill: I would say yes, because it's not often that you're going through a list that you don't want to access the element of the list.
<norc>
grill: Wait! I lied.
sfr^ has joined #ruby
<norc>
grill: for is about one of the more special things in Ruby.
<aegis3121>
Or Hash, for that matter, since its #each functions in the same way. by sharing the #each method, they can both use (almost) any of the Enumerable methods, too
KineticX has quit [Ping timeout: 240 seconds]
fertapric has joined #ruby
millerti has joined #ruby
cdg has joined #ruby
<aegis3121>
If you're wanting to do something a set number of times, there's #times
<mchu>
hey norc, i looked into many stack overflow tips and am still unable to solve the issue. can i get some help?
<nfk|laptop>
grill, not only does Ruby lack for (int i = 0; i < 0; i++) but so does python, in fact, you can find the for foo in foos inside modern C++
lemur has joined #ruby
mistermocha has quit [Remote host closed the connection]
<nfk|laptop>
worse yet, you should never use for foo in foos in ruby
<Ox0dea>
> lack
<Ox0dea>
> worse
ttrevenen has quit [Ping timeout: 246 seconds]
mistermocha has joined #ruby
phinary has joined #ruby
<nfk|laptop>
well, worse as in "you must ensure to remember"
<nfk|laptop>
because not only does it look ugly when you get used to ruby but it also has some weird behaviours which alternatives do not have
chipotle has joined #ruby
Rodya_ has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
edwinvdgraaf has quit [Remote host closed the connection]
<nfk|laptop>
the most obvious alternative is, if you're wondering, foos.each { |foo| puts foo }
aupadhye has quit [Quit: Leaving]
baweaver has quit [Disconnected by services]
lemur is now known as baweaver
<nfk|laptop>
though there's quite a few more, though some are the same thing just under multiple names
smactive has quit [Ping timeout: 276 seconds]
<Ox0dea>
That's the only way to iterate over a collection in Ruby.
r0_0 has joined #ruby
lemur has joined #ruby
nixmaniack has joined #ruby
<r0_0>
hello room
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<nfk|laptop>
and psycho-pass was great, i just hope they never dare to make a season 2
hxegon has joined #ruby
<Ox0dea>
r0_0: Is that a gun?
jam_ has joined #ruby
<r0_0>
lmao!!
<nfk|laptop>
that's one short barrel then
<Ox0dea>
It'll do.
<nfk|laptop>
a derringer has better aspect ratio
<nfk|laptop>
also, this is offtopic
sfr^ has joined #ruby
<mchu>
hey guys, i got an issue w/ haml (which im new to). already looked into stack overflow an am still unable to solve. any help? picture of my issue is in the following link http://postimg.org/image/il1y0y0zd/
<mchu>
illegal nesting: nesting within a tag that already has content is illegal.
bMalum has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<r0_0>
Ox0dea: oh wait are you talking about my nick?
rdark has quit [Ping timeout: 256 seconds]
Rodya_ has quit [Ping timeout: 265 seconds]
<nfk|laptop>
he certainly is, r0_0
<mchu>
can anyone help?
<r0_0>
nah its a stumped face with an ear
synthroid has joined #ruby
<norc>
Ox0dea: getlocal_OP__WC__0 2 is just short for getlocal 2, 0
<norc>
right?
edwinvdgraaf has joined #ruby
<Ox0dea>
norc: Dunno. :/
<Ox0dea>
r0_0: I don't believe you.
<Ebok>
Shouldnt short for be shorter? >_>;
<norc>
Ebok: It is shorter in that it only needs to pass one argument.
<Ebok>
Ah
<norc>
Which saves a bit of time for Rubys VM
choke has joined #ruby
<Ebok>
Cool
al2o3-cr has joined #ruby
nixmaniack has quit [Ping timeout: 276 seconds]
<r0_0>
Ox0dea: it can be if you want it to be
<Ox0dea>
r0_0: Just wanted to make sure you're okay, bud.
jam_ has quit [Ping timeout: 246 seconds]
roshanavand has quit [Remote host closed the connection]
<norc>
Ebok: Remember this is just the visual representation for bytecode. :)
diegoviola has quit [Quit: WeeChat 1.3]
<Ebok>
You say remember, when its actaully for the first time. I love all things Ruby, but Im definitely still in the shallows.
<Ebok>
So, again. Cool! ^^
<r0_0>
Ox0dea: haha, im actually enjoying ruby now that I have it all set up, came from python
sfr^ has quit [Ping timeout: 260 seconds]
<choke>
Afternoon Ox0dea
<Ox0dea>
r0_0: I didn't realize we were having an on-topic conversation.
<Ox0dea>
Hi, choke.
<choke>
wait -- this channel is on topic today? ( until i show up of course )
<nfk|laptop>
Ox0dea, maybe he's being threatened and can't admit it?
northfurr has joined #ruby
<nfk|laptop>
a j/k
<nfk|laptop>
hopefully
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
r0_0: Blink twice if your life is in danger.
<norc>
<Ox0dea> That's the only way to iterate over a collection in Ruby.
<norc>
^- the only sensible anyhow
<Ox0dea>
norc: No. The only way.
nfk|laptop is now known as r-_-
<r-_->
like that?
usershell has joined #ruby
r-_- is now known as nfk|laptop
<r0_0>
lol
<r0_0>
68 65 6c 70
<adaedra>
nice phone number
jbrhbr has joined #ruby
<nfk|laptop>
i was hoping for a bank account number
<Ox0dea>
norc: "Fixing" it would be a breaking change. :/
<norc>
Yeah. :-)
sfr^ has joined #ruby
guacamole has quit [Ping timeout: 272 seconds]
<al2o3-cr>
meh....
finisherr has joined #ruby
dlitvak has quit [Ping timeout: 246 seconds]
dlitvak_ has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
guacamol_ has quit [Ping timeout: 245 seconds]
nfk|laptop has quit [Ping timeout: 245 seconds]
atomical has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
sfr^ has quit [Excess Flood]
smactive has joined #ruby
<norc>
Ox0dea: Somehow I was looking at it and didn't realize that it was changing the EP for this.
sfr^ has joined #ruby
phinary has joined #ruby
CloCkWeRX has joined #ruby
sfr^ has quit [Excess Flood]
akkmaxon has joined #ruby
<Ox0dea>
norc: Er, is it being changed or just kind of... mucked with?
sfr^ has joined #ruby
atomical_ has quit [Ping timeout: 250 seconds]
bMalum has joined #ruby
<norc>
Ox0dea: Oh no its just following back the EP chain as specified by the level, effectively wandering up (or down depending on how you look at it) the stack for that single instruction.
akkmaxon_ has joined #ruby
blackgoat has quit [Quit: WeeChat 1.3]
<Ox0dea>
norc: To find the environment into which to leak the iterator variable, yeah?
tinnvec has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
<norc>
Ox0dea: Im guessing so, I would have to look at the compiler to figure out whether that is truly the intention.
blackmesa has joined #ruby
akkmaxon_ has left #ruby [#ruby]
<norc>
And correction I didnt mean stack, but it is wandering up the scopes.
tinnvec has joined #ruby
northfurr has quit [Quit: northfurr]
skade has joined #ruby
tjohnson has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
northfurr has joined #ruby
ropeney has joined #ruby
akkmaxon has quit [Quit: akkmaxon]
tinnvec has quit [Ping timeout: 250 seconds]
akkmaxon has joined #ruby
tinnvec has joined #ruby
sfr^ has quit [Ping timeout: 250 seconds]
pawnbox has joined #ruby
hannelita has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
sfr^ has joined #ruby
colegatron has quit [Ping timeout: 260 seconds]
KineticX has joined #ruby
alyssadaemon has joined #ruby
dmr8 has quit [Quit: Leaving]
baweaver has joined #ruby
northfurr has quit [Quit: northfurr]
Jackneill has quit [Remote host closed the connection]
tinnvec has quit [Ping timeout: 240 seconds]
akkmaxon has quit [Client Quit]
bMalum has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Ping timeout: 245 seconds]
jenrzzz has joined #ruby
<mchu>
what does the + mean in — undefined method `+' for nil:NilClass
tinnvec has joined #ruby
hannelita has quit [Ping timeout: 264 seconds]
<mchu>
oh nvm. !
<Radar>
!botsnack
<Radar>
!unmute helpa
<helpa>
hi
<Radar>
\o/
northfurr has joined #ruby
<norc>
Radar: I think he may have been muted on the rails channel too.
edwinvdgraaf has quit [Read error: Connection reset by peer]
<Radar>
norc: neg
<norc>
Mmm weird.
sfr^ has quit [Ping timeout: 240 seconds]
edwinvdgraaf has joined #ruby
<norc>
Well, it seems like all services here were completely borked. :-)
edwinvdgraaf has quit [Read error: Connection reset by peer]
edwinvdgraaf has joined #ruby
KineticX has quit [Ping timeout: 276 seconds]
JakFrist has joined #ruby
<norc>
Okay... NODE_MASGN, NODE_LASGN, NODE_MASGN and NODE_MASGN_CURR - what are they...
<norc>
NODE_DASGN too..
bb010g has joined #ruby
tinnvec has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
<apeiros>
ASGN sounds like assign
<apeiros>
and MASGN I'd guess mass-assign?
<drbrain>
or multi-assign
jgpawletko has joined #ruby
<apeiros>
mhm
<drbrain>
dasgn is for block variables
<norc>
as in a, b = ary?
<drbrain>
"dynamic"
<drbrain>
norc: yes
<drbrain>
L for local
sfr^ has joined #ruby
sfr^ has quit [Changing host]
sfr^ has joined #ruby
<norc>
drbrain: Ah alright. That makes sense now.
tinnvec has joined #ruby
<drbrain>
MASGN_CURR is new to me
jmignault has quit [Ping timeout: 264 seconds]
<apeiros>
is LASGN (L=local) a relict from times when you could do block { |@var, $var, ETC| ?
<norc>
drbrain: Correction, DASGN_CURR
<drbrain>
norc: same, then
karapetyan has joined #ruby
jenrzzz has joined #ruby
roshanavand has joined #ruby
TheAnachron has joined #ruby
<TheAnachron>
Guys I ahve two gems with the same executeable name
<TheAnachron>
(t)
<norc>
TheAnachron: Do you need to use them in the same project?
<aegis3121>
Ox0dea: is it because by wrapping the code you're testing into a block, the block gets placed into a Proc object, then called later, allowing the expectation on the error to exist before the proc is actually evaluated?
<Ox0dea>
aegis3121: Just so.
devbug has joined #ruby
<grill>
cool
symm- has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
huyderman has quit [Ping timeout: 240 seconds]
kalopsian has joined #ruby
Pro| has quit [Remote host closed the connection]
<Ox0dea>
>> p { we can say whatever we want in here since this method ignores its block }
<ruby[bot]>
Ox0dea: # => /tmp/execpad-7c16d0b8c9be/source-7c16d0b8c9be:2: syntax error, unexpected keyword_in, expecting '}' ...check link for more (https://eval.in/501356)
<Ox0dea>
Dammit.
<Ox0dea>
`in` is a keyword.
<Ox0dea>
But you get the idea.
blackgoat has joined #ruby
<Ox0dea>
Every method takes an implicit block, but most methods just ignore it.