<Ox0dea>
>> class Foo; def to_s; 'ohai' end end; StringIO.new.tap { |s| s.write(Foo.new) }.string
<ruboto>
Ox0dea # => uninitialized constant StringIO (NameError) ...check link for more (https://eval.in/468573)
<Ox0dea>
Grr.
<adaedra>
heh
<Ox0dea>
2.3 has StringIO available by default.
<shevy>
curious
pusewicz has quit [Ping timeout: 240 seconds]
rgrmatt has quit [Remote host closed the connection]
<Ox0dea>
adaedra: Y'doin' a'ight?
karapetyan has joined #ruby
centrx has joined #ruby
<adaedra>
Meh
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ta has quit [Ping timeout: 265 seconds]
<Ox0dea>
adaedra: What's the next step down from sxiv?
<adaedra>
from what?
<shevy>
fvie!
<dn5>
Ox0dea: You were right. The JSON library is much easier. But I've done both just for testing purpose.
diegoaguilar has quit [Read error: Connection reset by peer]
<dn5>
Ox0dea: I also think you can't be explicit to set new hash to be first using json
blackmes1 has quit [Quit: WeeChat 1.3]
<adaedra>
Wut
diegoaguilar has joined #ruby
<adaedra>
I don't get the extra 'v' in sxiv
segfalt__ is now known as segfalt
rdavila has joined #ruby
rgrmatt has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Puffball has quit [Read error: Connection reset by peer]
Puffball_ has joined #ruby
n_blownapart has quit [Remote host closed the connection]
eminencehc has quit [Remote host closed the connection]
OrbitalKitten has joined #ruby
jdawgaz has joined #ruby
framling has quit [Remote host closed the connection]
rgrmatt has quit [Remote host closed the connection]
DEA7TH has joined #ruby
gusrub has quit [Remote host closed the connection]
<Ox0dea>
adaedra: sxiv is an image viewer for Unix-likes; it's better than feh.
<adaedra>
ah ok
<Ox0dea>
I was trying to assist you in continuing to say things ending in "-eh".
awd123 has joined #ruby
quazimodo has quit [Ping timeout: 260 seconds]
<adaedra>
It made me chuckle.
<Ox0dea>
Yay. <3
gusrub has joined #ruby
<adaedra>
It's very appreciated.
rcvalle has quit [Quit: rcvalle]
<Ox0dea>
dn5: I'm glad you came to your senses. :)
<awd123>
first time
<Ox0dea>
awd123: We'll be gentle.
<awd123>
Good :)
h99h9h88 has joined #ruby
awd123 has left #ruby [#ruby]
babblebre has joined #ruby
<Ox0dea>
dn5: I'm not sure what you mean in your second message.
<dn5>
Ox0dea: Thanks once again. But as I said, I'm not sure it could help me out. While using Json to append, it appends bellow the key I wanted.
yoongkang has quit [Remote host closed the connection]
<Ox0dea>
dn5: You want an array of hashes, right?
kirun has quit [Quit: Client exiting]
leafybas_ has quit [Ping timeout: 260 seconds]
akkad has quit [Ping timeout: 260 seconds]
sankaber has joined #ruby
<dn5>
Ox0dea: I'm not getting you. The new hash I inserted is located bellow the hash that was already in JSON document. Using my dirty-way it explicitly append the new hash to the top.
<Ox0dea>
dn5: Which method did you use to insert the new Hash?
karapetyan has quit [Remote host closed the connection]
<dn5>
File.write
dviola has joined #ruby
karapetyan has joined #ruby
eminencehc has joined #ruby
<Ox0dea>
No, to add the new Hash to your Array.
kies has joined #ruby
sankaber has quit [Remote host closed the connection]
rehat_ has quit [Ping timeout: 250 seconds]
sankaber has joined #ruby
tubuliferous_ has quit [Ping timeout: 265 seconds]
<Ox0dea>
xybre: What's wrong with it in that instance?
wprice has quit [Quit: wprice]
chouhoulis has quit [Ping timeout: 272 seconds]
<xybre>
Ox0dea: Why would you want to do that in the first place?
<Ox0dea>
xybre: It was for demonstration purposes, granted, but #tap was objectively the better choice, in my opinion.
atomical has quit [Ping timeout: 255 seconds]
<Ox0dea>
`s = this; s.that` is noisy.
SteveC has joined #ruby
<Ox0dea>
It was the best way I could think to demonstrate that IO.write invokes #to_s implicitly.
neanderslob has quit [Quit: No Ping reply in 180 seconds.]
Rickmasta has joined #ruby
neanderslob has joined #ruby
gusrub has quit []
<xybre>
It's handy, especially in bad situations. I use it all the time for debugging, and maybe once or twice in my gems. But 99% of the time, I'll use a different technique.
paradisaeidae has joined #ruby
<xybre>
While setting intermediary variables might be cumbersome, their names can give semantic meaning to the code, this narrative helps other people understand it.
rgrmatt has quit [Remote host closed the connection]
bruno- has joined #ruby
<Ox0dea>
xybre: Ruby has lambdae, the essence of functional programming, and the lambda calculus is Turing-complete; I don't see how a subset of the language could be considered functional but not the whole.
bruno- is now known as Guest28170
Yzguy has joined #ruby
<xybre>
"A meaningful question is, 'How amenable is Ruby to achieving the thesis of functional programming?' The answer is 'very poorly'."
grilled-cheese has quit [Quit: grilled-cheese]
<xybre>
"Ruby enforces an evaluation model (call-by-value) that ensures non-compositionality of programs. The implications of this can easily be under-estimated. Ruby is also married to the idea that a program is a sequence of effects. That is to say, Ruby goes out of its way to make it difficult/intractible to use any other computational model."
<xybre>
etc etc
rgtk has quit [Ping timeout: 260 seconds]
<Ox0dea>
Oh, so "functional" in the "we can't actually run this on hardware" sense?
stannard has quit [Ping timeout: 264 seconds]
rgrmatt has joined #ruby
<Ox0dea>
Sure it works in practice, but does it work in theory?
<Ox0dea>
xybre: ^ You.
* Ox0dea
goes to find his missing quotation chevron.
Guest28170 has quit [Ping timeout: 250 seconds]
baweaver has joined #ruby
Gi0_ has joined #ruby
Gi0 has quit [Ping timeout: 264 seconds]
Gi0_ is now known as Gi0
ebbflowgo has joined #ruby
d5sx43 has joined #ruby
weemsledeux has joined #ruby
vigintas has quit [Ping timeout: 240 seconds]
paradisaeidae has quit [Read error: Connection reset by peer]
<xybre>
I suppose you'll have to define "functional programming" then, since we're working off your criteria.
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mattwildig has joined #ruby
roxtrongo has quit [Remote host closed the connection]
d5sx43 has quit [Client Quit]
baweaver has quit [Ping timeout: 244 seconds]
<Ox0dea>
We can write our programs using nothing but Procs and frozen objects, and the line between functional and not, for every intent and purpose we ought care about, vanishes entirely.
rgrmatt has quit [Remote host closed the connection]
Yzguy has quit [Quit: Zzz...]
<Ox0dea>
Should we? Of course not. But see above regarding a subset and the whole.
Yzguy has joined #ruby
<xybre>
It is so vanishingly simple to implement lambdas in almost every language, and most have immutable datatypes to build off of, so by that criteria something like 80% of all languages are functional?
<Ox0dea>
80% is quite a stretch, but yes, it's fair to say that there is a functional language hiding inside/fighting to break free of most mainstream languages.
<Ox0dea>
The only difference between "functional" and "functional-style" is discipline.
mary5030 has joined #ruby
<Ox0dea>
Languages like Haskell force you to do it, Ruby merely gives you the opportunity.
<xybre>
Using that criteria, then Ruby is "functional". As is Bash, Perl, Vimscript, REXX, and others.
Sam0163141155 has quit [Ping timeout: 255 seconds]
<Ox0dea>
That right there is a stateless function by any definition you might provide.
<Ox0dea>
`add3` closes over its argument just as would be done in any "really functional" language.
<Ox0dea>
To call it "functional-style" is taking the piss, in my estimation.
erichmenge has quit [Ping timeout: 252 seconds]
shinnya has joined #ruby
claw has joined #ruby
DLSteve has joined #ruby
nlsun has quit [Ping timeout: 255 seconds]
justinmcp_ has joined #ruby
ruisantos has quit [Ping timeout: 246 seconds]
FifthWall has quit [Ping timeout: 246 seconds]
solocshaw has quit [Ping timeout: 240 seconds]
justinmcp has quit [Ping timeout: 255 seconds]
pragmatism has quit [Ping timeout: 255 seconds]
skweek has joined #ruby
knight- has quit [Ping timeout: 252 seconds]
ruisantos has joined #ruby
FifthWall has joined #ruby
lavros has joined #ruby
knight_ has joined #ruby
erichmenge has joined #ruby
jackjackdripper has quit [Ping timeout: 265 seconds]
amoeba has quit [Ping timeout: 265 seconds]
Evan_ has quit [Ping timeout: 255 seconds]
pragmatism has joined #ruby
vigintas has joined #ruby
nlsun has joined #ruby
<xybre>
It really just doesn't compare to any language that is designed to be functional from the core out. Much in the same way that most languages that claim "object-oriented" pale in comparison to Ruby.
Radar has quit [Ping timeout: 255 seconds]
<FailBit>
>inb4 c++
jokester has quit [Ping timeout: 240 seconds]
amoeba has joined #ruby
<xybre>
I was gonna say Java, but C++ too :D
<FailBit>
c++ < java
<FailBit>
both are horrifying
Evan_ has joined #ruby
Radar has joined #ruby
Radar is now known as Guest49895
jdawgaz has joined #ruby
Azulinho has quit [Ping timeout: 240 seconds]
rdavila has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
leifg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
FooMunki has joined #ruby
<Ox0dea>
xybre: What is it, then, that makes something like, say, CLOS not constitute "real" object-orientation?
<xybre>
Ox0dea: all languages are roughly equivilent, so it doesn't really matter.
<xybre>
FailBit: I might try D out, I've heard a lot of good things about it. I don't really care about a stdlib that much, but it seems to cover all the bases with that too.
<Ox0dea>
It's something of an anomaly that D didn't catch on.
<FailBit>
D has a nice stdlib
<FailBit>
not as great as ruby, but still quite the improvement over c++
<Ox0dea>
> Most (if not all) compiler packages, contain a tool named rdmd/gdmd/ldmd or similar.
<Ox0dea>
What's that about?
cluda01 has quit [Quit: Leaving.]
duncannz has joined #ruby
rgrmatt has joined #ruby
claw has joined #ruby
skcin7 has joined #ruby
IrishGringo has quit [Ping timeout: 240 seconds]
<xybre>
FailBit: ha, nice. go has `go run` built in.
rgrmatt has quit [Remote host closed the connection]
swgillespie has joined #ruby
rbowlby has quit []
yoongkang has joined #ruby
northfurr has joined #ruby
IrishGringo has joined #ruby
dikaio has joined #ruby
rgrmatt has joined #ruby
daivyk has quit [Quit: ZZZzzz…]
TomPeed has joined #ruby
yoongkang has quit [Ping timeout: 240 seconds]
jdawgaz has joined #ruby
dfockler has quit [Ping timeout: 240 seconds]
Trynemjoel has joined #ruby
banister has joined #ruby
rgrmatt has quit [Remote host closed the connection]
northfurr has quit [Read error: No route to host]
northfurr has joined #ruby
x-light has joined #ruby
wildlander has quit [Quit: Saliendo]
quazimodo has joined #ruby
jokester has joined #ruby
rgrmatt has joined #ruby
mary5030 has quit [Remote host closed the connection]
charliesome has quit [Ping timeout: 264 seconds]
scripore has quit [Quit: This computer has gone to sleep]
mistermocha has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
simplyianm has quit [Remote host closed the connection]
quazimodo has quit [Ping timeout: 260 seconds]
simplyianm has joined #ruby
ebbflowgo has quit [Quit: ebbflowgo]
swgillespie has joined #ruby
quazimodo has joined #ruby
northfurr has quit [Quit: northfurr]
bruno- has joined #ruby
bruno- is now known as Guest98995
astrobunny has joined #ruby
rgrmatt has quit [Remote host closed the connection]
beast has joined #ruby
astrobunny has quit [Remote host closed the connection]
astrobunny has joined #ruby
vigintas has quit [Ping timeout: 260 seconds]
fantazo has quit [Ping timeout: 246 seconds]
davedev2_ has joined #ruby
swgillespie has quit [Client Quit]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yqt has quit [Read error: Connection reset by peer]
TomPeed has quit [Read error: Connection reset by peer]
dkam has joined #ruby
Guest98995 has quit [Ping timeout: 244 seconds]
xcesariox has joined #ruby
davedev24 has quit [Ping timeout: 240 seconds]
astrobunny has quit []
mistermocha has joined #ruby
mary5030 has joined #ruby
rgrmatt has joined #ruby
apeiros has quit [Ping timeout: 246 seconds]
csmb has quit [Ping timeout: 255 seconds]
apeiros has joined #ruby
Davey has quit [Excess Flood]
Davey has joined #ruby
Davey has quit [Changing host]
Davey has joined #ruby
csmb has joined #ruby
FifthWall has quit [Ping timeout: 276 seconds]
FifthWall has joined #ruby
devoldmx has joined #ruby
jokester has quit [Ping timeout: 240 seconds]
ebertx_ has quit [Ping timeout: 255 seconds]
doddok has quit [Ping timeout: 240 seconds]
mistermocha has quit [Ping timeout: 240 seconds]
mh_laakso has quit [Ping timeout: 265 seconds]
jericon has quit [Ping timeout: 255 seconds]
NET||abu- has quit [Ping timeout: 255 seconds]
Guest42003 has quit [Ping timeout: 255 seconds]
doddok has joined #ruby
mh_laakso has joined #ruby
jericon has joined #ruby
Guest49895 has quit [Ping timeout: 240 seconds]
NET||abuse has joined #ruby
rgrmatt has quit [Remote host closed the connection]
htmldrum has joined #ruby
gmci has joined #ruby
jokester has joined #ruby
gmci is now known as Guest34575
mattwildig has quit [Remote host closed the connection]
chouhoulis has quit []
Yzguy has quit [Quit: Zzz...]
leafybas_ has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 276 seconds]
Radar_ has joined #ruby
Yzguy has joined #ruby
tulak has joined #ruby
gbailey has joined #ruby
Gi0 has quit [Ping timeout: 240 seconds]
sdwrage has quit [Quit: This computer has gone to sleep]
atomical has joined #ruby
tulak has quit [Ping timeout: 240 seconds]
hxegon has joined #ruby
<ilhami_>
hey ruby
atomical_ has joined #ruby
sdwrage has joined #ruby
atomical has quit [Ping timeout: 255 seconds]
arescorpio has joined #ruby
hxegon has quit [Quit: Lost terminal]
Sam0163141155 has joined #ruby
yoongkang has joined #ruby
ta has joined #ruby
maletor has joined #ruby
rdavila has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_lazarevsky has quit [Ping timeout: 246 seconds]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
h99h9h88 has joined #ruby
ta has quit [Ping timeout: 252 seconds]
charliesome has joined #ruby
dorei has quit []
beast_ has joined #ruby
beast has quit [Ping timeout: 276 seconds]
swgillespie has joined #ruby
davedev24 has joined #ruby
h99h9h88 has quit [Quit: Leaving...]
swgillespie has quit [Client Quit]
ilhami_ has quit [Quit: Konversation terminated!]
maletor has quit [Ping timeout: 240 seconds]
djbkd has quit [Ping timeout: 244 seconds]
quazimodo has quit [Ping timeout: 240 seconds]
davedev2_ has quit [Ping timeout: 240 seconds]
<shevy>
got a question... I have an array such as this: array = ['--help','abc','def']
crystalmaiden has quit [Ping timeout: 240 seconds]
<shevy>
via .shift I can return (and remove) the first entry; however had, the array may also have its arguments set differently, such as: array = ['abc','--help','def']
<shevy>
is there something similar to .shift but that works on a conditional check? e. g. in the case above, it will return array[1] and then remove it from the array as well?
ricer2 has quit [Quit: Caught SystemExit exception.]
SteveC has joined #ruby
vigintas has joined #ruby
<mozzarella>
_blizzy_: got a better source?
<_blizzy_>
mozzarella, um, no, sorry. I just found out about it on reddit.
<pontiki>
all over every news site?
babblebre has quit [Quit: Connection closed for inactivity]
<pontiki>
try cnn
jorb has quit [Ping timeout: 246 seconds]
<shevy>
foxnews!
<mozzarella>
oh I guess the article itself is better
<mozzarella>
I was just reading the comments
tkuchiki has quit [Ping timeout: 240 seconds]
jorb has joined #ruby
kp666 has joined #ruby
roxtrongo has joined #ruby
vigintas has quit [Ping timeout: 246 seconds]
bruno- has joined #ruby
bruno- is now known as Guest25451
paradisaeidae has quit [Quit: ChatZilla 0.9.92 [Firefox 42.0/20151029151421]]
Trynemjoel has joined #ruby
UtkarshRay has quit [Remote host closed the connection]
benlieb has joined #ruby
yoongkang has quit [Remote host closed the connection]
blue_deref has quit [Quit: bbn]
yoongkang has joined #ruby
weemsledeux has joined #ruby
mistermocha has joined #ruby
Guest25451 has quit [Ping timeout: 260 seconds]
symm- has quit [Ping timeout: 240 seconds]
UtkarshRay has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ebbflowgo has joined #ruby
The_Phoenix has joined #ruby
ebbflowgo has quit [Client Quit]
The_Phoenix has quit [Max SendQ exceeded]
UtkarshRay has quit [Remote host closed the connection]
_blizzy_ has quit [Quit: Leaving]
UtkarshRay has joined #ruby
yoongkang has quit [Ping timeout: 250 seconds]
The_Phoenix has joined #ruby
ricer2 has joined #ruby
_kfpratt has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 240 seconds]
dlitvak has joined #ruby
mattwildig has joined #ruby
vdamewood has joined #ruby
rdavila has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gix has quit [Ping timeout: 244 seconds]
kfpratt has joined #ruby
tulak has joined #ruby
yfeldblum has joined #ruby
kfpratt has quit [Client Quit]
darkf has quit [Read error: Connection reset by peer]
RandyT_ has joined #ruby
darkf has joined #ruby
helpa-bot has joined #ruby
mattwildig has quit [Ping timeout: 260 seconds]
gix has joined #ruby
matled- has joined #ruby
mghaig has joined #ruby
The_Phoenix1 has joined #ruby
skcin7_ has joined #ruby
LicHacker has joined #ruby
tulak has quit [Ping timeout: 240 seconds]
helpa-bot has quit [Remote host closed the connection]
helpa-bot has joined #ruby
<shevy>
hmmm
Scientz has joined #ruby
<shevy>
how could we get to see more games in ruby?
yoongkang has joined #ruby
shinnya_ has joined #ruby
helpa-bot has quit [Remote host closed the connection]
Brando753 has quit [Ping timeout: 240 seconds]
helpa-bot has joined #ruby
sung_ has joined #ruby
sunya7a has joined #ruby
suffice_ has joined #ruby
minimali1m has joined #ruby
arthurix has joined #ruby
Jamo has joined #ruby
M-Techni1 has joined #ruby
[ace] has joined #ruby
ejnahc_ has joined #ruby
rfi_ has joined #ruby
arthurix_ has quit [Read error: Connection reset by peer]
<kiki_lamb>
Quickie question: let's say I have a method, and someone's going to pass a class to it as an argument. Is there a way I can inquire about the arity of that class's initialize method?
exceion has joined #ruby
helpa-bot has quit [Remote host closed the connection]
<shevy>
there also are some ad-hoc additions possible to trace calls... set_trace_var and set_trace_func ... but they are also somewhat limited http://apidock.com/ruby/Kernel/set_trace_func
<Sam0163141155>
Thanks, shevy, I'll have a read through this stuff :-)
ramfjord has quit [Ping timeout: 240 seconds]
<shevy>
for my use cases, caller() usually was enough; I use it in a project to automatically determine the name of the class + constant, and to colourize this
<shevy>
for instance
<shevy>
module Foo; class Bar
mary5030 has quit [Remote host closed the connection]
<shevy>
RED_COLOUR_START Foo::Bar: END_OF_RED_COLOUR "We will whack down the pandas next." # where the leading part is in a red colour on the console
rdavila has joined #ruby
SteveC has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Musashi007 has joined #ruby
<Sam0163141155>
I hear you. I am really new to this (but #new2ruby is empty). I'm trying to give an object different behaviour depending on which object called its methods. Would you do that by passing self?
<shevy>
hmmmm
<shevy>
is there no other way for you to toggle that behaviour?
<Sam0163141155>
This isn't what I'm doing, but it's a simpler example. If you had a password object with a display method and you wanted it to print the password if the owner of the password called the print method, otherwise, print stars or something
<baweaver>
there's a new to ruby channel? Huh
<Sam0163141155>
baweaver: yes, but it's very quiet (read: just one lonely person)
<baweaver>
for passwords, never print anything plaintext, but that's not the point.
simplyianm has quit [Remote host closed the connection]
dionysus69 has joined #ruby
Yzguy has quit [Quit: Zzz...]
<Sam0163141155>
it's not a password. It's a board game, where one player can see more information than the other.
simplyianm has joined #ruby
framling has joined #ruby
<Sam0163141155>
anyway, sorry, I got impatient and bothered all you nice people. Thank you for your time, and I'll combine your advice with some brute force and see what happens.
<baweaver>
Just check whose turn it is then
<baweaver>
find a way to model a game in such a way that information is only available in certain contexts.
<baweaver>
caller in this case would be overkill
<baweaver>
just encapsulate the logic in a turn system
dlitvak has quit [Ping timeout: 265 seconds]
<Sam0163141155>
baweaver: good idea, thank you, I'll try looking at it that way :-)
<baweaver>
Look into Practical Object Oriented Design in Ruby
<baweaver>
it'll help
<baweaver>
Chances are when you find yourself metaprogramming or reaching for anything off that shelf, there's an easier cleaner way to do it
<Sam0163141155>
Thanks, I'm about halfway through POODR, but getting it to stick will take some time
jidar_ is now known as jidar
tkuchiki has joined #ruby
<Sam0163141155>
baweaver: I'll set this project aside and go read awhile. Thanks again for the advice and have a good day
<baweaver>
we answer questions, you're not wasting time here mate
<baweaver>
otherwise we wouldn't be online to answer now would we? ;)
<baweaver>
we don't bite
<baweaver>
well
tatertot has joined #ruby
<baweaver>
I can't speak for shevy, pretty sure he does.
Edward__ has joined #ruby
Pixi_ has joined #ruby
rgtk has joined #ruby
matled has quit [Read error: Connection reset by peer]
Trynemjoel has quit [Ping timeout: 250 seconds]
gregf has quit [Ping timeout: 250 seconds]
Meow-J has quit [Ping timeout: 250 seconds]
lianj has quit [Ping timeout: 250 seconds]
RealMarc has quit [Ping timeout: 250 seconds]
nemesit|znc has quit [Ping timeout: 250 seconds]
haasn has quit [Ping timeout: 250 seconds]
tubbo has quit [Ping timeout: 250 seconds]
parus has quit [Ping timeout: 250 seconds]
Apocalypse has quit [Ping timeout: 250 seconds]
borkdude_ has quit [Ping timeout: 250 seconds]
Eleeleth has quit [Ping timeout: 250 seconds]
nyandoge has quit [Ping timeout: 250 seconds]
cardoni has quit [Ping timeout: 250 seconds]
Raboo has quit [Ping timeout: 250 seconds]
rideh has quit [Ping timeout: 250 seconds]
mjc_ has quit [Ping timeout: 250 seconds]
ironcamel has quit [Ping timeout: 250 seconds]
scroff has quit [Ping timeout: 250 seconds]
bestie has quit [Ping timeout: 250 seconds]
chrisseaton has quit [Ping timeout: 250 seconds]
bttf has quit [Ping timeout: 250 seconds]
tuor has quit [Ping timeout: 250 seconds]
araujo has quit [Ping timeout: 250 seconds]
varesa_ has quit [Ping timeout: 250 seconds]
Xiti` has quit [Ping timeout: 250 seconds]
tater has quit [Ping timeout: 250 seconds]
BLuEGoD has quit [Ping timeout: 250 seconds]
abra0 has quit [Ping timeout: 250 seconds]
chrisarcand has quit [Ping timeout: 250 seconds]
cstrahan has quit [Ping timeout: 250 seconds]
elektronaut has quit [Ping timeout: 250 seconds]
meatchicken has quit [Ping timeout: 250 seconds]
tekacs has quit [Ping timeout: 250 seconds]
bauruine has quit [Ping timeout: 250 seconds]
c0ncealed has quit [Ping timeout: 250 seconds]
skmp has quit [Ping timeout: 250 seconds]
iDavid has quit [Ping timeout: 250 seconds]
oz has quit [Ping timeout: 250 seconds]
HashNuke has quit [Ping timeout: 250 seconds]
martinbjeldbak has quit [Ping timeout: 250 seconds]
SuperTux88 has quit [Ping timeout: 250 seconds]
JStoker has quit [Ping timeout: 250 seconds]
ohcibi has quit [Ping timeout: 250 seconds]
cgfbee has quit [Ping timeout: 250 seconds]
tobyx has quit [Ping timeout: 250 seconds]
woodruffw has quit [Ping timeout: 250 seconds]
heftig has quit [Ping timeout: 250 seconds]
ec has quit [Ping timeout: 250 seconds]
kalleth has quit [Ping timeout: 250 seconds]
duckson has quit [Ping timeout: 250 seconds]
Bish- has quit [Ping timeout: 250 seconds]
sung_ has quit [Ping timeout: 250 seconds]
claw has quit [Ping timeout: 250 seconds]
danoo_ has quit [Ping timeout: 250 seconds]
UNIMPL has quit [Ping timeout: 250 seconds]
AdamMeghji has quit [Ping timeout: 250 seconds]
Morrolan has quit [Ping timeout: 250 seconds]
Liam` has quit [Ping timeout: 250 seconds]
Heero has quit [Ping timeout: 250 seconds]
drPoggs has quit [Ping timeout: 250 seconds]
bryancp has quit [Ping timeout: 250 seconds]
hollywood has quit [Ping timeout: 250 seconds]
bytecrawler has quit [Ping timeout: 250 seconds]
gix has quit [Ping timeout: 250 seconds]
vigintas has joined #ruby
matled- has joined #ruby
Outlastsheep has joined #ruby
soahccc has joined #ruby
bascht1 has joined #ruby
Armand has joined #ruby
HashNuke_ has joined #ruby
bytecrawler has joined #ruby
heftig_ has joined #ruby
gregf1 has joined #ruby
BackEndCoder has joined #ruby
Trynemjoel2 has joined #ruby
Shapeshi1ter has joined #ruby
tobyx_ has joined #ruby
AdamMeghji_ has joined #ruby
mbeasley_ has joined #ruby
ohcibi has joined #ruby
rideh- has joined #ruby
parus_ has joined #ruby
AccordsLTN has joined #ruby
chinmay_dd_ has joined #ruby
Liam- has joined #ruby
contradictioned_ has joined #ruby
chrisarc1nd has joined #ruby
noodle has joined #ruby
Fluent has joined #ruby
sung has joined #ruby
martinbjeldbak_ has joined #ruby
mary5030 has joined #ruby
abra0_ has joined #ruby
canton7 has joined #ruby
tekacs has joined #ruby
ajaiswal_ has joined #ruby
skmp_ has joined #ruby
Bish has joined #ruby
lancetw_ has joined #ruby
sung has joined #ruby
borkdude has joined #ruby
lianj_ has joined #ruby
mighty_gorilla has joined #ruby
claw_ has joined #ruby
ironcame1 has joined #ruby
LoganG_ has joined #ruby
sp_ has joined #ruby
kalleth_ has joined #ruby
elektronaut has joined #ruby
oz has joined #ruby
AccordLTN has quit [Ping timeout: 250 seconds]
ajaiswal has quit [Ping timeout: 250 seconds]
guest192123 has quit [Ping timeout: 250 seconds]
Shapeshifter has quit [Ping timeout: 250 seconds]
ckrailo has quit [Ping timeout: 250 seconds]
Hobbyboy has quit [Ping timeout: 250 seconds]
frode15243 has quit [Ping timeout: 250 seconds]
noodle has quit [Ping timeout: 250 seconds]
Shidash has quit [Ping timeout: 250 seconds]
infernix has quit [Ping timeout: 250 seconds]
ddv has quit [Ping timeout: 250 seconds]
bjmllr has quit [Ping timeout: 250 seconds]
SegFaultAX has quit [Ping timeout: 250 seconds]
jxf has quit [Ping timeout: 250 seconds]
akitada has quit [Ping timeout: 250 seconds]
tonini has quit [Ping timeout: 250 seconds]
BackEndCoder has quit [Ping timeout: 250 seconds]
bougyman has quit [Ping timeout: 250 seconds]
jmcc has quit [Ping timeout: 250 seconds]
jpinnix______ has quit [Ping timeout: 250 seconds]
bjeanes has quit [Ping timeout: 250 seconds]
cbednarski has quit [Ping timeout: 250 seconds]
twodayslate has quit [Ping timeout: 250 seconds]
jmhmccr has quit [Ping timeout: 250 seconds]
zipkid has quit [Ping timeout: 250 seconds]
tejasmanohar has quit [Ping timeout: 250 seconds]
yo61 has quit [Ping timeout: 250 seconds]
pizzaops has quit [Ping timeout: 250 seconds]
vcoinminer has quit [Ping timeout: 250 seconds]
sorah has quit [Ping timeout: 250 seconds]
countryHick has quit [Ping timeout: 250 seconds]
phrozen77 has quit [Ping timeout: 250 seconds]
soahccc has quit [Ping timeout: 250 seconds]
bascht has quit [Ping timeout: 250 seconds]
machty has quit [Ping timeout: 250 seconds]
contradictioned has quit [Ping timeout: 250 seconds]
<nowhereFast>
I'm not getting why this complains about not being initialized
<nowhereFast>
can somebody shed some light on this?
trosborn has quit [Quit: trosborn]
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
matp_ is now known as matp
leafybasil has joined #ruby
<Caius>
nowhereFast: forgive the obvious question, but have you required faye and/or faye/websocket?
F4GG07 has joined #ruby
<nowhereFast>
Caius: I figured it out, thanks :-)
codecop has joined #ruby
<Caius>
:-)
<F4GG07>
hello
<nowhereFast>
while I do have your attention... I'm adding a middleware module, the example I'm looking at in Sinatra defines both a module and a class in the file
<apeiros>
F4GG07: 30s to change your nick.
Mon_Ouie has quit [Ping timeout: 240 seconds]
<nowhereFast>
the examples I've come accross for rails show only the class in the file
<nowhereFast>
then to just config.middleware in the application.rb file
<adaedra>
And I'm not sure it's wise to bring back this discussion
<shevy>
what discussion
<dreinull75>
minitest: one method ina class makes this chain call user.address.street. I dont't want to create all that stuff. Can I tell minitest to mock that? I can use the Mock Object but I don't want to mock every method in the chain.
<dreinull75>
as it is, I have to go. I will check in a couple minutes :)
s00pcan has joined #ruby
<adaedra>
.
krz has joined #ruby
Azure has quit [Ping timeout: 250 seconds]
northfurr has quit [Quit: northfurr]
northfurr has joined #ruby
c33s has joined #ruby
troulouliou_div2 has joined #ruby
moeabdol has quit [Ping timeout: 240 seconds]
purplexed- has joined #ruby
tubuliferous_ has joined #ruby
northfurr has quit [Client Quit]
devoldmx has quit [Remote host closed the connection]
northfurr has joined #ruby
<purplexed->
Hi, I'm trying to figure out a good way to merge a template file https://gist.github.com/sonicjolt/936942659a32ccfad3a5 with the values in the {{ }}.. I'm thinking I could just load it to a variable, and then search and replace. But I'm wondering if there is a better way that I don't know of in Ruby ?
devoldmx has joined #ruby
krz has quit [Ping timeout: 240 seconds]
northfurr has quit [Client Quit]
northfurr has joined #ruby
<jhass>
purplexed-: that's mustache, google a bit, there's a ruby implementation for sure
moeabdol has joined #ruby
<purplexed->
jhass: it doesn't have to look like that.. it's just an idea :)
<jhass>
purplexed-: then use erb
<adaedra>
there flavoursaver or something like that for mustache/handlebars.
leafybasil has joined #ruby
<purplexed->
again, it's just an idea :)
ponga has quit [Quit: Connection closed for inactivity]
Spami has quit [Quit: This computer has gone to sleep]
northfurr has quit [Client Quit]
arta82 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra>
If you're just asking about templating, there's multiple solutions, including jhass proposition, erb, which is built-in.
northfurr has joined #ruby
<purplexed->
yeah, i'm just reading about that
devoldmx has quit [Remote host closed the connection]
arta82 has joined #ruby
devoldmx has joined #ruby
<purplexed->
so, I could have an erb file, that takes a model, and then render the output to a file, I guess ?
<adaedra>
yes
northfurr has quit [Client Quit]
<purplexed->
alright, that sounds like what I need :)
<purplexed->
cheers
lenwood has quit [Ping timeout: 252 seconds]
devoldmx has quit [Remote host closed the connection]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fschuindt has quit [Read error: Connection reset by peer]
tulak has joined #ruby
makenoise has joined #ruby
rehat_ has joined #ruby
lukaszes has joined #ruby
lukaszes has quit [Client Quit]
codecop has quit [Ping timeout: 260 seconds]
sdwrage has joined #ruby
tulak has quit [Ping timeout: 276 seconds]
kadoppe has quit [Ping timeout: 260 seconds]
kadoppe has joined #ruby
safe has joined #ruby
blackmes1 has quit [Ping timeout: 264 seconds]
rgtk has quit [Remote host closed the connection]
DexterLB has quit [Ping timeout: 260 seconds]
Xeago has joined #ruby
c33s has quit [Quit: Leaving.]
DexterLB has joined #ruby
Meow-J has joined #ruby
mistermocha has joined #ruby
dviola has quit [Quit: WeeChat 1.3]
ruby-lang365 has joined #ruby
crankharder has quit [Remote host closed the connection]
<ruby-lang365>
hello i am using capybara gem to test the inputs of the user
Guest54 has quit [Ping timeout: 240 seconds]
djbkd has quit []
<ruby-lang365>
i build an app with two modules
futilegames has joined #ruby
mistermocha has quit [Ping timeout: 240 seconds]
yoongkang has joined #ruby
bruno- has joined #ruby
bruno- is now known as Guest24372
waxjar has joined #ruby
DrShoggoth has joined #ruby
fantazo has joined #ruby
blackmes1 has joined #ruby
leifg has joined #ruby
<ruby-lang365>
I have a single app with two modules. A module that expose an api and other module with a user interface that call this internal api using httparty. Right now i am trying to use capybara to test the interface but when i sumbit a form that call to this internal api using httparty i am getting an error of connection. I know that capybar use rack_test that means i dont have a server when i am running my test
<jhass>
mount the API rack application and use the right paths in the test env?
<ruby-lang365>
i am reading that instead of using capybara rack_test i could use selenium but i dont want to do that because i have to install drivers. I dont know what other solution you think
waxjar has quit [Remote host closed the connection]
yoongkang has quit [Ping timeout: 244 seconds]
<ruby-lang365>
you mean to run the server in the background to test?
asianMike has joined #ruby
_fesuy has joined #ruby
<jhass>
no, rack applications are composable
<jhass>
which web frameworks are used?
futilegames has quit [Quit: futilegames]
futilegames has joined #ruby
<ruby-lang365>
sinatra
futilegames has quit [Client Quit]
_fesuy has quit [Read error: Connection reset by peer]
jdawgaz has joined #ruby
makenoise has quit [Remote host closed the connection]
<jhass>
then you just need to make your UI app configurable in what prefix it uses for the API requests
bb010g has joined #ruby
<jhass>
and configure that in the test env accordingly
makenoise has joined #ruby
<ruby-lang365>
thank you so much
<ruby-lang365>
i am going to try that
Guest24372 has quit [Ping timeout: 255 seconds]
Azulinho has joined #ruby
jamesaxl has joined #ruby
makenoise has quit [Ping timeout: 255 seconds]
pwnd_nsfw has quit [Ping timeout: 246 seconds]
lukaszes has joined #ruby
rob_ has joined #ruby
leifg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
futilegames has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
johnernaut has joined #ruby
<rob_>
hi, im trying to use the ruby-git module which works fine from irb but when i try to do Git.open from within a grape/rack application i get 'private method "open" called for <name of my module>', anyone know why this could be happening?
brendan- has joined #ruby
<jhass>
rob_: why is the name of your module a secret? What's the exact line mentioned in the error message?
<jhass>
rob_: well, that resolves to your Git module, not the one from the gem at the toplevel. What you're calling there is Kernel#open, which is private
<rob_>
ahhhhh
<jhass>
use ::Git if you absolutely have to name your module Git too
<rob_>
ok, thanks
heftig_ is now known as heftig
mghaig has joined #ruby
Azulinho has quit [Quit: Leaving]
djbkd has joined #ruby
Azulinho has joined #ruby
zachrose_ has joined #ruby
armyriad has joined #ruby
mattwildig has quit [Remote host closed the connection]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sbhatore has joined #ruby
djbkd has quit [Ping timeout: 255 seconds]
johnernaut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgrmatt has joined #ruby
felltir has quit []
sdwrage has joined #ruby
blackmes1 has joined #ruby
Azulinho has quit [Ping timeout: 276 seconds]
rdavila has quit [Read error: Connection reset by peer]
makenoise has quit []
tubuliferous_ has quit [Ping timeout: 252 seconds]
simplyianm has quit [Remote host closed the connection]
moeabdol has joined #ruby
pwnd_nsfw has joined #ruby
nej has quit [Changing host]
nej has joined #ruby
nej is now known as ja
gigetoo has quit [Read error: Connection reset by peer]
gigetoo has joined #ruby
djbkd has joined #ruby
_fesuy has joined #ruby
kstuart has joined #ruby
Mia has joined #ruby
Mia has joined #ruby
rgrmatt has quit [Remote host closed the connection]
iateadonut has quit [Ping timeout: 240 seconds]
moeabdol has quit [Ping timeout: 255 seconds]
karapetyan has quit [Remote host closed the connection]
|ifei5g00d has quit [Ping timeout: 250 seconds]
cdg has joined #ruby
mattwildig has joined #ruby
yqt has joined #ruby
perturbation has joined #ruby
djbkd has quit [Ping timeout: 240 seconds]
yosiat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yosiat has joined #ruby
FernandoBasso has joined #ruby
dlitvak has joined #ruby
diosmiux has joined #ruby
dlitvak has quit [Remote host closed the connection]
mghaig has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
mghaig has joined #ruby
dlitvak has joined #ruby
chipotle has joined #ruby
_fesuy has left #ruby ["Leaving"]
FooMunki has quit [Quit: FooMunki]
cdg has quit [Remote host closed the connection]
Rickmasta has joined #ruby
User458764 has joined #ruby
weaksauce has joined #ruby
cdg has joined #ruby
cdg has quit [Remote host closed the connection]
futilegames has quit [Quit: futilegames]
fantazo has quit [Ping timeout: 260 seconds]
Ox0dea has joined #ruby
dlitvak_ has joined #ruby
robbyoconnor has joined #ruby
charliesome has joined #ruby
charliesome has quit [Client Quit]
skweek has quit [Ping timeout: 246 seconds]
Azulinho has joined #ruby
karapetyan has quit [Remote host closed the connection]
eminencehc has joined #ruby
dlitvak has quit [Ping timeout: 255 seconds]
mghaig has quit [Ping timeout: 264 seconds]
Yzguy has joined #ruby
|ifei5g00d has joined #ruby
karapetyan has joined #ruby
cornerma1 has joined #ruby
cornerman has quit [Ping timeout: 240 seconds]
cornerma1 is now known as cornerman
diegoaguilar has quit [Remote host closed the connection]
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Mia has quit [Read error: Connection reset by peer]
lukaszes has joined #ruby
flak has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
asianMike has quit [Remote host closed the connection]
fantazo has joined #ruby
djellemah has quit [Ping timeout: 250 seconds]
lukaszes has quit [Client Quit]
Brando753 has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
Eiam_ has joined #ruby
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Read error: Connection reset by peer]
cluda01 has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
ekinmur has joined #ruby
skweek has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
troulouliou_div2 has quit [Ping timeout: 260 seconds]
Mia has quit [Read error: Connection reset by peer]
sepp2k1 has joined #ruby
xxneolithicxx has joined #ruby
sepp2k has quit [Ping timeout: 255 seconds]
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
Musashi007 has quit [Client Quit]
chipotle has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
<shevy>
the badger?
djbkd has quit [Ping timeout: 265 seconds]
<Ox0dea>
You're trying to summon him, aren't you?
Ajkthx has joined #ruby
ekinmur has quit [Client Quit]
troulouliou_div2 has joined #ruby
troulouliou_div2 has quit [Remote host closed the connection]
Nahra has quit [Remote host closed the connection]
<shevy>
badgers shall rule the world
chipotle_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
robbyoconnor has joined #ruby
<shevy>
Ox0dea do you test your ruby code?
<Ox0dea>
When it's for serious, sure.
aevitas has joined #ruby
chipotle has quit [Ping timeout: 240 seconds]
<shevy>
what do you use then?
<Ox0dea>
minitest.
DMRadford_ has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
> Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
<Ox0dea>
I don't know how zenspider is going to handle having more or less reached that point with minitest.
charliesome has quit [Ping timeout: 265 seconds]
<shevy>
he'll move on to other things
<shevy>
like this game/simulation thingy
charliesome has joined #ruby
<Ox0dea>
Yeah, graphics is his new baby.
Eiam_ has joined #ruby
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
Nahra has joined #ruby
kstuart has quit [Ping timeout: 264 seconds]
DexterLB has quit [Ping timeout: 260 seconds]
simplyianm has joined #ruby
chipotle has joined #ruby
<DMRadford_>
Hello all. Completely new to Ruby here and trying to customize Redmine. Could somebody point me in the right direction here? http://www.pasteall.org/62198
stamina has joined #ruby
PaulCape_ has joined #ruby
Mia has quit [Ping timeout: 244 seconds]
DexterLB has joined #ruby
<jhass>
maybe nothing?
<jhass>
copy_options={} defines a default, you don't have to give it
<DMRadford_>
the top chunk of code is pulled from issue.rb in Redmine. The bottom chunk is what I'm trying to get working in a custom workflow on the after save event. Since I know so little, I don't know how to populate the copy_options={} chunk with values for :subject, :project, etc
<jhass>
is there no documentation?
<DMRadford_>
None that I can find sadly
scripore has joined #ruby
PaulCapestany has quit [Ping timeout: 240 seconds]
chipotle_ has quit [Ping timeout: 255 seconds]
Axy has quit [Read error: Connection reset by peer]
<DMRadford_>
There's no API guide or documentation I can find on the hooks or anything. I THINK what I'm asking is more syntax and such rather than Redmine specific (I can figure out the specifics if I can understand the syntax)
<jhass>
well, what's self? are you inside a method inside Issue or whatever the class is?
<jhass>
the attributes arguments is probably too supposed to be hash rather than the id
<DMRadford_>
That's really all i know. It's a custom workflow plugin that runs ruby code before saving the issue (the left) and after saving the issue (the right)
allcentury has joined #ruby
yosiat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<DMRadford_>
So self. is the issue being edited, or copied in this case
akem has quit [Ping timeout: 246 seconds]
<jhass>
ah, at the bottom, I see
<DMRadford_>
yea, it doesn't show how to copy, just create a new issue
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
so what do you want to change?
TomPeed is now known as justbleed
<DMRadford_>
I want to copy the current issue instead of creating a new one, and I need to set the parent_id to the current id, set the project, tracker, assignee and status.
bruno- has joined #ruby
<DMRadford_>
intersting, there is no definition for create in issue.rb, maybe I'm looking in the wrong .rb file....
<Ox0dea>
rob_: You could try `load` instead, but you're probably trying to import locals, and that's not gonna work.
<rob_>
same error, presumably requires is a method for Object
yfeldblum has joined #ruby
<jhass>
Ox0dea: neither, DSL calls
<rob_>
jhass: right. is this stupid?
<jhass>
rob_: well, we could find workarounds, but I'm not sure it's worth the hassle
<jhass>
rob_: elaborate on the "it would be nice" ?
<jhass>
why do you want this, what's the benefit?
<Ox0dea>
rob_: You probably want `instance_eval(File.read('config/api.rb'))`, but that's gross.
<jhass>
^ please forget this exists. now
<tomdp>
Considering how tricky it might be to get the context in and account for everything, I'm gonna be the bad guy and say eval is 100% OK here because it's not user input
<rob_>
Ox0dea: yeah, i dont really want to eval
<tomdp>
but not worth it
<Ox0dea>
rob_: But that's what `require` and `load` do?
<rob_>
true
<Ox0dea>
You seem not to want your cake or to eat it.
<shevy>
:D
<rob_>
i just dont know what im doing
<jhass>
please, everybody, let's not suggest hacks and instead get behind the motivation for the desire
<jhass>
because I'm pretty convinced it's a misguided desire atm
<tomdp>
But you'd still need to account for whatever context those methods need to do what they do if you're using require or load
<tomdp>
right then
<shevy>
he scares me
_0mega has joined #ruby
<rob_>
so, i could define the api in YAML but im not sure how i'd convert 'String' to String without eval..
<Ox0dea>
rob_: #const_get.
<rob_>
Ox0dea: ah ok, i'll do that then, thanks!
<Ox0dea>
I can't tell if sanity has prevailed or not.
DexterLB has quit [Ping timeout: 260 seconds]
<rob_>
not better to read YAML and just loop over it?
<shevy>
you made a suggestion so sanity lost!
_0mega has quit [Client Quit]
<jhass>
rob_: _why_ ?
<jhass>
what's wrong with having it in the file?
<jhass>
what's the pain point? what problem are you trying to solve?
DexterLB has joined #ruby
<rob_>
because i want to make this generic, so you can modify a config file to modify the required params for the api
<jhass>
I have a strong feeling you're about to create a needless mess
<jhass>
rob_: I share a secret with you: Ruby is so expressive, it's often used for configuration files
<rob_>
that sounds like i'd learn something
<adaedra>
Is this the too much genericity syndrome?
<jhass>
probably, yes. A special form of the premature optimization
dn5 has joined #ruby
<Ox0dea>
Premature generalization.
<rob_>
oh, i agree completely
Meow-J has quit [Quit: Connection closed for inactivity]
<rob_>
i want to be able to send arbitrary JSON to an API that then writes out a file in the context of the parameters using ERB
dzejrou has quit [Quit: dzejrou]
tobyx_ has quit [Remote host closed the connection]
ferz_ has joined #ruby
<rob_>
i could just not bother validating the input
<jhass>
if you want to accept an arbitrary json document it might be better to look into accessing the raw json and parsing it on your own
<jhass>
exactly
<jhass>
arbitrary is pretty much a synonym for unvalidated
ferz_ has quit [Client Quit]
_0mega has joined #ruby
dn5 has quit [Ping timeout: 272 seconds]
Jackneill has quit [Ping timeout: 240 seconds]
wildlander has quit [Quit: Saliendo]
dn5 has joined #ruby
yoongkang has joined #ruby
dn5 has quit [Ping timeout: 252 seconds]
bMalum has quit [Quit: bMalum]
<rob_>
i was basically trying to create a generic app that could be configured to require some specific values
pimpin has joined #ruby
<VeryBewitching>
Ox0dea: Thanks for that, his perspective resonated with my own almost fully.
dn5 has joined #ruby
Yzguy has quit [Quit: Zzz...]
brushbox has quit [Quit: brushbox]
nateberkopec has joined #ruby
symm- has joined #ruby
arta82 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_0mega has quit [Quit: Leaving.]
lxsameer has quit [Quit: Leaving]
arta82 has joined #ruby
dlitvak has joined #ruby
dn5 has quit [Ping timeout: 272 seconds]
<Ox0dea>
VeryBewitching: My pleasure, and in the literal sense, by which I mean to say I'm pleased you found little with which to disagree.
dn5 has joined #ruby
<Ox0dea>
DHH is a pretty reasonable fellow nine times out of ten.
<Ox0dea>
rob_: Hiding the "complexity" of required parameters, I guess.
<rob_>
hiding?
nateberkopec has quit [Quit: Leaving...]
umgrosscol has quit [Quit: End of Line]
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
Obfuscating where the real work gets done.
<rob_>
i just wanted the configuration to be outside the app
PaulCape_ has quit [Quit: .]
<rob_>
im not trying to obfuscate anything
PaulCapestany has joined #ruby
<Ox0dea>
"'Missing required parameter'?! I don't see any required parameters."
<Ox0dea>
"Oh, they're way the hell over here."
<VeryBewitching>
Ox0dea: It was the George Bush picture and clip.
djbkd has joined #ruby
<Ox0dea>
VeryBewitching: They do hate us for our freedom, though, don't they?
* VeryBewitching
is Canadian.
<VeryBewitching>
But yes, they do.
<Ox0dea>
"Us" was Rubyists there, mind.
<VeryBewitching>
I find myself trying to show others my love of it, but most developers I know where I live are either C# or PHP
pimpin has quit [Remote host closed the connection]
<Ox0dea>
In truth, a substantial chunk of languages can be finagled into being quite a bit like Ruby, but we get all the little niceties out of the box.
aramiscd has quit [Ping timeout: 240 seconds]
<VeryBewitching>
It's hard for me to make PHP pretty. I've written some rather elegant, concise solutions with it, but after learning Ruby I'm kind of in love.
<Ox0dea>
Little sense in preaching to the choir with the last song still in your ears, I suppose.
<Ox0dea>
I went from PHP to Python and thought I'd never leave; I was a fool.
djbkd has quit [Ping timeout: 240 seconds]
arta82 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<VeryBewitching>
I didn't like Python, tbh.
<Ox0dea>
You could do so much worse, though.
<jhass>
Ox0dea: heh, basically the same here I guess :D
<VeryBewitching>
Yes, I could write Befunge
<VeryBewitching>
Or *gasp* Visual Basic.
<Ox0dea>
But... I like fungeoids.
sdwrage has quit [Quit: This computer has gone to sleep]
blackmes1 has quit [Read error: Connection reset by peer]
diegoaguilar has joined #ruby
<Ox0dea>
It's actually really neat to watch it go.
<VeryBewitching>
I can imagine.
arta82 has joined #ruby
<Ox0dea>
You can just make out the parser.
leifg has joined #ruby
lukaszes has joined #ruby
arta82 has quit [Max SendQ exceeded]
Moeh has joined #ruby
<VeryBewitching>
Running it in the playground.
<Ox0dea>
Does it work there? It didn't last I tried.
charliesome has quit [Ping timeout: 246 seconds]
safe has quit [Read error: Connection reset by peer]
sdwrage has joined #ruby
safe has joined #ruby
charliesome has joined #ruby
<Moeh>
Hello, I want to iterate over a nested hash and every time when I find a specific key, replace the value with something custom. In the end, a hash with the replaced values should be returned. This is the current code: http://pastie.org/10557331 However, as you can see I get the error that I cannot add new keys during the iteration. Would be great if someone could help me.
<Ox0dea>
VeryBewitching: The playground on fishlanguage.com requires you to provide stdin as initial stack values, for which my brainfuck interpreter does not account.
masolino has quit [Quit: leaving]
nateberkopec has joined #ruby
pimpin has joined #ruby
<VeryBewitching>
Ya, it crapped out. Was fun to watch before it did though :D
aep__ is now known as aep
chipotle has quit [Quit: cheerio]
safe has quit [Quit: Leaving]
_0mega has joined #ruby
last_staff has quit [Quit: last_staff]
pimpin has quit [Ping timeout: 240 seconds]
eminencehc has joined #ruby
leifg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_0mega has quit [Client Quit]
Nahra has quit [Read error: Connection reset by peer]
<EasyCo>
Hey team, what're your preferences for namespacing? Nested classes (class Car; class Chassis; end; end;, or simply class Car::Chassis? Don't worry about modules.
_0mega has joined #ruby
<Ox0dea>
EasyCo: Worry about modules.
solocshaw has joined #ruby
<EasyCo>
Ox0dea: I worry about them all the time, but given those two scenarios. Which do you typically choose?
<Ox0dea>
EasyCo: It's situational.
<VeryBewitching>
Ox0dea: haha, cool. I'll play with that.
<Ox0dea>
VeryBewitching: It uses a few ANSI escape sequences, but surely nothing Konsole can't handle.
Musashi007 has joined #ruby
n_blownapart has joined #ruby
djbkd has quit [Ping timeout: 260 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea>
asciinema doesn't play nice with them or I'd've just linked a demo.
moeabdol has quit [Read error: Connection reset by peer]
treaki has joined #ruby
moeabdol has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
<Ox0dea>
I bought two dozen eggs on sale instead of my usual 18 knowing I'd come to regret it, and here I am.
tulak has quit [Ping timeout: 244 seconds]
tkuchiki has quit [Ping timeout: 240 seconds]
<Ox0dea>
You sometimes have to get one more or one less egg than you actually want in order to keep a dozen carton symmetrical, but you can always balance an 18.
marr has joined #ruby
<jhass>
here the main unit is 10, with 6 being the less popular option
cdg has quit [Remote host closed the connection]
<VeryBewitching>
Have to abolish desktop session, one moment.
VeryBewitching has quit [Quit: Konversation terminated!]
<shevy>
I think on #ruby it was first havenwood who brought forward the meme with that dude... I forgot the context... something with "all the things", but it was not abolish ... hmm
<VeryBewitching>
shevy: Plasma 5 took a dump when I deleted 278GB of data on one drive and 400GB of data on another.. at the same time.
mattwildig has quit [Remote host closed the connection]
<shevy>
Please don't try to explain any random dissimilarities.
gusrub has joined #ruby
<Ox0dea>
I did liberty spikes one night for midkeks. Never again.
htmldrum has quit [Ping timeout: 265 seconds]
dn5 has quit [Ping timeout: 272 seconds]
dn5 has joined #ruby
Nahra has quit [Ping timeout: 260 seconds]
<shevy>
Lately I saw something such as Prawn.debug = true
<shevy>
how common is it to have lots of class methods like that?
_0mega has quit [Quit: Leaving.]
_0mega has joined #ruby
kirun has quit [Remote host closed the connection]
_0mega has quit [Client Quit]
roxtrong_ has joined #ruby
user1138 has quit [Remote host closed the connection]
user1138 has joined #ruby
_0mega has joined #ruby
<Ox0dea>
I guess that's better than PRAWN_DEBUG, and maybe even Prawn::DEBUG.
tubuliferous_ has quit [Ping timeout: 244 seconds]
<Ox0dea>
But if you've got a bunch of methods like that, it's more idiomatic to provide a configurator.
<Ox0dea>
Prawn.config { |p| ... }
<Ox0dea>
I guess nix the block parameter in this particular case.
<VeryBewitching>
I think the way it's done works well because you can turn on debugging at a point in your code you want more detail about and then turn it off and continue.
<guacjack>
I'm 4 months into working as a Ruby developer at a new job (they trained me up on Ruby) and i cant help but think im learning something that is on the decline, like the rest of the dept are moving their apps to full stack javascript and in my team the developers want to keep the apps ruby
<guacjack>
I do like the language though
<Ox0dea>
Ruby is not immortal.
blackmesa has joined #ruby
<guacjack>
Just wondered if you guys thought it was a good idea go get into more Ruby stuff like Rails cause at the minute i do Sintra apps at work
dn5 has quit [Ping timeout: 244 seconds]
<Ox0dea>
> A day may come when the courage of [the Ruby community] fails, when we forsake our friends and break all bonds of fellowship. But it is not this day. An hour of [snakes] and shattered [objects] when the age of [Ruby] comes crashing down! But it is not this day!
<jhass>
do whatever interests you, every new thing you learn will introduce you to at least some concept from which you general work as developer can benefit, no matter the technology applied for the current job