<apeiros>
(it can only deal with numerics, though)
n_blownapart has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 265 seconds]
chipotle has quit [Quit: cheerio]
araujo has quit [Ping timeout: 256 seconds]
<vikas027>
apeiros: notifications['last_notified'] throws error -- no implicit conversion of String into Integer (TypeError). Earlier, I had tried that. When it didn't worked, I decided to move with map
edwinvdg_ has quit []
araujo has joined #ruby
yfeldblum has quit [Remote host closed the connection]
<apeiros>
vikas027: you really should learn ruby basics
cschnei__ has quit [Remote host closed the connection]
<Radar>
vikas027: notifications is an array
<apeiros>
vikas027: your notifications is an array. you can't access array members by name. they don't have one.
<Radar>
vikas027: notifications[0] is the first element for the array
<Radar>
vikas027: and I agree with apeiros: learn some basic Ruby. Go through the Ruby Koans.
<apeiros>
without the basics, you'll need spone-feeding all the time when asking for help. that's usually not really appreciated.
twe4ked has joined #ruby
<apeiros>
*spoon
babblebre has quit [Quit: Connection closed for inactivity]
<eam>
hm turns out spone is a word too
<apeiros>
it is? I just looked it up too and my dict didn't know it… what does it mean?
<Ox0dea>
!w spone
firstdayonthejob has joined #ruby
<eam>
urban dictionary has a definition for it
<Ox0dea>
It's not in words-insane.
<Ox0dea>
Pfft.
<eam>
;)
<apeiros>
oh, UD - can't be a nice word…
cajone has left #ruby [#ruby]
<eam>
yes, I am not sharing the definition
Limix has joined #ruby
hannelita has quit [Ping timeout: 245 seconds]
gizless has quit [Ping timeout: 250 seconds]
<Ox0dea>
spone(v. intr.): To fork while spoons.
kalopsian has joined #ruby
sftrabbit has quit [Quit: sftrabbit]
pwnd_nsfw has quit [Read error: Connection reset by peer]
floatingpoint has joined #ruby
<vikas027>
apeiros, Radar: Yeah, I am doing that side by side. Sorry, for the unwanted noise. Thank you so much. This (https://dpaste.de/WntQ) is what I wanted, all good now.
hannelita has joined #ruby
<Ox0dea>
vikas027 plz
pwnd_nsfw has joined #ruby
<apeiros>
ugh, .parse
<Ox0dea>
I mean, why not, though?
<apeiros>
vikas027: .parse is like saying "fuck it, I have no idea what's in there, please ruby do your best to figure out, I don't care whether the result will actually be correct".
<Ox0dea>
apeiros: And Ruby tends to be like "I got dis".
<apeiros>
Ox0dea: yes, until it changes how it interprets it (yes, that has happened)
<apeiros>
and even if ruby gets it right, it's still a stoopid idea.
<apeiros>
anyway, bedtime for me
* apeiros
afk
firstdayonthejob has quit [Ping timeout: 260 seconds]
<ruby-lang833>
I want to use the custom configuration options in ruby 4 - store my app configuration date in outside of my main models/controllers - didn't know if there was a default place to declare the config.x.___ options
<ruby-lang144>
it seems to work but i cant get it to confirm if the player has won
<ruby-lang144>
hazel
<ruby-lang144>
lol
<ruby-lang144>
but i do like Horange
<ruby-lang144>
and I'm aware of line 18 giving the code. i was testing as to match it
<baweaver>
Most of it you're going to want to reconsider your object layout.
emilford has joined #ruby
<baweaver>
putting the event loop in with the board makes it interesting to work with.
ddv has quit [Ping timeout: 250 seconds]
<baweaver>
For a game you want, at a minimum: A Board, and an Event Loop
<ruby-lang144>
ok
<baweaver>
look into making your own to_s method so you could just say something in your event loop like `puts board`
yfeldblum has quit [Ping timeout: 260 seconds]
<baweaver>
You might read 'Practical Object Oriented Design in Ruby' some time
<ruby-lang144>
hmm ok
<baweaver>
it'll cover a lot of what you need to think about for structuring applications like that.
<baweaver>
mainly what methods are the concern of what objects
<baweaver>
like a Board should not know what a turn is
A124 has quit [Read error: Connection reset by peer]
<ruby-lang144>
ok. so possibly create another class
blackgoat has joined #ruby
<ruby-lang144>
thank you for the suggestion. I'll have to check that book out tomorrow
shinnya has quit [Ping timeout: 265 seconds]
Arnvald has joined #ruby
<sunya7a>
I'm trying to understand the concept of Foo.send(visibility, :a) on line 21 from this article http://weblog.jamisbuck.org/2007/2/23/method-visibility-in-ruby.html. Could someone point me to the name of this technique so i can google it...when I look up object.send it describes something different I believe
<Radar>
sunya7a: It's calling a method on Foo.
Encapsulation has quit [Remote host closed the connection]
<Ox0dea>
norc_: Reckon Array#drain would find any use?
<norc_>
Ox0dea, feel free to share how naughty you have been again.
<Ox0dea>
norc_: Er, the Rust 1.6 release brought to my attention that they have drain(), which empties a collection but doesn't dispose of the backing memory.
<Ox0dea>
So Array#drain would be #clear without GC.
<Ox0dea>
Only something weird is happening in rb_ary_clear().
bronson has joined #ruby
<Ox0dea>
"Simple" Arrays aren't explicitly passed to the various unsharing and freeing mechanisms, but they're obviously not being completely ignored either.
pawnbox has quit [Remote host closed the connection]
<norc_>
What is the use case here? Trying to avoid time spent in the GC for large arrays?
<Ox0dea>
Under the assumption that (many of) those same elements are likely to find their way back in, aye.
<norc_>
So this is about locality of reference?
<norc_>
To improve caching?
<Ox0dea>
Or even just to avoid freeing an object which we know is about to be used again.
hxegon has joined #ruby
<norc_>
Oh I see.
<Ox0dea>
We don't yet have the sufficiently smart interpreter.
<Ox0dea>
It's easy enough to make sure something's still got a reference, I guess.
cicloid has quit [Quit: zzZZzzzZzzzzzZZZz]
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
harly has quit [Read error: Connection reset by peer]
harly has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
<hxegon>
anyone understand why this wouldn't record cassettes? VCR isn't playing nice today :(
<Ox0dea>
It's just finding the one in Module instead.
BaroMeter has quit [Quit: Leaving]
<Ox0dea>
Er, no need even to try to invoke it, actually.
oivoodoo has joined #ruby
adgtl has joined #ruby
norc has quit [Ping timeout: 252 seconds]
altaircg has joined #ruby
darkf has joined #ruby
oivoodoo has quit [Ping timeout: 272 seconds]
aganov has joined #ruby
chihhsin has quit [Quit: leaving]
altaircg has quit []
altaircg has joined #ruby
altaircg has quit [Client Quit]
zast has quit [Remote host closed the connection]
altair118 has joined #ruby
chouhoul_ has joined #ruby
chihhsin has joined #ruby
blackgoat has quit [Quit: WeeChat 1.3]
chouhoulis has quit [Ping timeout: 250 seconds]
Hobbyboy|BNC is now known as Hobbyboy
fedexo has joined #ruby
onlyme_ has quit [Remote host closed the connection]
altair11_ has joined #ruby
jackjackdripper has joined #ruby
altair118 has quit [Read error: Connection reset by peer]
tmtwd has joined #ruby
altair11_ has quit [Client Quit]
altair118 has joined #ruby
arlek has joined #ruby
Lucky__ has joined #ruby
JohnT has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
framling has quit [Remote host closed the connection]
alyssadaemon has joined #ruby
krz has quit [Ping timeout: 264 seconds]
jamto11 has joined #ruby
jameser has joined #ruby
SweetSoulBro has joined #ruby
mdw has joined #ruby
<SweetSoulBro>
Oh
<SweetSoulBro>
Hi.
<SweetSoulBro>
I come for assistance.
mdw has quit [Client Quit]
<Ox0dea>
Prove it.
<alyssadaemon>
SweetSoulBro: what's the issue?
<SweetSoulBro>
Uh
<SweetSoulBro>
Oh
<SweetSoulBro>
Okay
<SweetSoulBro>
So I'm trying to make a quick Combat character generator for my RPG.
<Ox0dea>
SweetSoulBro: Your Enter key does not deserve the abuse.
<SweetSoulBro>
I need to read specific lines from a txt file.
<Ox0dea>
Are you sure?
<SweetSoulBro>
Yes.
<alyssadaemon>
Is there anything unique about the lines?
<SweetSoulBro>
They're strings.
<Ox0dea>
All strings?
jas02 has joined #ruby
<SweetSoulBro>
The rest of the lines are ints.
<SweetSoulBro>
No
<Ox0dea>
You should use a better format.
kies^ has quit [Ping timeout: 272 seconds]
<SweetSoulBro>
It goes string, int, int, string, int int, etc.
<Ox0dea>
JSON or YAML, for instance.
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
<SweetSoulBro>
For a dice bot?
<Ox0dea>
I don't see why not, but that format's pretty simple.
<alyssadaemon>
I think SweetSoulBro wants to read some sort of input like IRC
c355e3b has quit [Quit: Connection closed for inactivity]
<SweetSoulBro>
Nah, i got that covered already
<alyssadaemon>
Am I correct?
<SweetSoulBro>
It reads from txt files.
<alyssadaemon>
Then I agree with Ox0dea, if you can control the output of the txt files, use that to your advantage
dionysus69 has joined #ruby
<SweetSoulBro>
ALright, so basically the strings are the names of the 6 "Classes", the 2nd number is the base HP, and the third is the base attack bonus.
_djbkd has quit [Remote host closed the connection]
<SweetSoulBro>
I see now.
<SweetSoulBro>
You guys/girls are nice.
<SweetSoulBro>
I appreciate all the help on my silly little project.
<alyssadaemon>
Take care
CaptainAl has joined #ruby
<SweetSoulBro>
I'm not leaving
<SweetSoulBro>
:B
<alyssadaemon>
Ah
<SweetSoulBro>
I'm just thanking you
solars has joined #ruby
dexter-tzu has joined #ruby
fedexo has quit [Ping timeout: 240 seconds]
DoubleMalt has joined #ruby
<SweetSoulBro>
Hmn.
<SweetSoulBro>
Ox0dea: You still here?
<Ox0dea>
SweetSoulBro: In the metaphysical sense?/
<SweetSoulBro>
Yes.
<Ox0dea>
No.
<SweetSoulBro>
Sad.
<SweetSoulBro>
ALright, so I have a bit of an issue with the .transpose thing.
<SweetSoulBro>
Lemme see if I can explain exactly what I'm trying to do.
ympeg has joined #ruby
<SweetSoulBro>
The class listing in the txt file goes class(Str),hp(int1), bab(int2). The program then randomly(psudorandomly) picks one of the classes, which determines what HP and BAB the character gets. The program THEN randomlly generates a random level for the character within set parameters(In a different text file), while also generating six additional ability scores(I got that part down)
juddey has joined #ruby
<SweetSoulBro>
The level determines the BAB, and HP, which is modified, positively or negatively, by the the ablity scores it generates.
dfinninger has joined #ruby
LMity has joined #ruby
toretore has quit [Ping timeout: 264 seconds]
tmtwd has quit [Remote host closed the connection]
<Ox0dea>
SweetSoulBro: Whence comes the requirement that your data be stored in flat text files?
<SweetSoulBro>
Easily modifiable without having to close down and reopen the text file.
<SweetSoulBro>
er
<SweetSoulBro>
the program
<SweetSoulBro>
since it's a dicebot.
<Ox0dea>
Wat.
<SweetSoulBro>
I can just delete a thing in the text file.
<SweetSoulBro>
And it will show up/be changed when i use the command
<SweetSoulBro>
to trigger that particular generator
yfeldblum has quit [Ping timeout: 265 seconds]
dfinninger has quit [Ping timeout: 240 seconds]
agit0 has quit [Quit: zzzZZZ….]
<SweetSoulBro>
...?
hayden_ has joined #ruby
iateadonut has quit [Remote host closed the connection]
<Ox0dea>
>> Array.new(5) { rand 6 }.reduce('') { |s, d| s + '' << 0x2680 + d }
anisha_ has quit [Quit: This computer has gone to sleep]
futilegames has joined #ruby
anisha_ has joined #ruby
futilegames has quit [Client Quit]
oivoodoo has quit [Read error: Connection reset by peer]
PedramT has joined #ruby
oivoodoo has joined #ruby
krzkrz has quit [Ping timeout: 272 seconds]
User458764 has joined #ruby
oivoodoo has quit [Read error: Connection reset by peer]
PedramT has quit [Ping timeout: 260 seconds]
dlitvak has quit [Ping timeout: 256 seconds]
jamto11 has joined #ruby
oivoodoo has joined #ruby
jamto11 has quit [Client Quit]
jottr has joined #ruby
PedramT has joined #ruby
usershell has quit [Read error: Connection reset by peer]
joncol has joined #ruby
usershell has joined #ruby
Azure has quit [Quit: Oops.]
vikas027 has joined #ruby
oivoodoo has quit [Remote host closed the connection]
Azure has joined #ruby
PedramT has quit [Ping timeout: 265 seconds]
PedramT has joined #ruby
Azulinho has joined #ruby
Shaboum has joined #ruby
<joncol>
What's a good way of deploying a Ruby application, when Windows is the target OS? Should I rely on Ruby being installed or use something like phusion/traveling-ruby to include the platform in the package...?
mdw has joined #ruby
blackmes1 has joined #ruby
platzhirsch has left #ruby [#ruby]
PedramT has quit [Remote host closed the connection]
dlitvak has joined #ruby
big|bad|wolf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
PedramT has joined #ruby
mdw has quit [Client Quit]
<workmad3>
joncol: if you're targeting windows, you probably want to somehow ensure ruby is installed with your package
jaiks has quit [Ping timeout: 250 seconds]
PedramT has quit [Remote host closed the connection]
astrobunny has quit [Remote host closed the connection]
big|bad|wolf has joined #ruby
<Ox0dea>
joncol: "Rely" probably isn't the word, but best really is to counsel your users to have a working Ruby installation before trying to run your thing.
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood>
joncol: I haven't actually used Traveling Ruby on Windows but I think that's worth a shot!
tobacco_joe has joined #ruby
<havenwood>
Assuming the Win support is far enough along.
andrey has quit [Remote host closed the connection]
mdw has joined #ruby
lessless has joined #ruby
Ishido has joined #ruby
samgerber has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
<jottr>
Thats so weird. Why would `bundle install` not run because it `can't find rake in any of the sources`....
Xeago_ has joined #ruby
User458764 has joined #ruby
sdothum has joined #ruby
14WAAR304 has joined #ruby
<blarghlarghl>
Does anyone have any insight on why mkmf's find_header would be failing to find a header when it definitely exists on the system? I'm giving it an absolute path even, and it keeps saying "checking for <x>... no"
<blarghlarghl>
Mon_Ouie: that last approach at least lets me also specify lots of directories, so I went and specified all of the parent dirs to search, too. Nothing.
synthroid has joined #ruby
drptbl has joined #ruby
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Mon_Ouie>
These functions work by trying to compile a simple program to see if the file can be included (as opposed to checking for the existence of a file), maybe you need to add values to your FLAGS before calling find_header for the test program to compile properly?
_August_ has quit [Ping timeout: 240 seconds]
<blarghlarghl>
Mon_Ouie: ahh, interesting. okay, I'll go play with that, that's good to know.
xescugc has quit [Ping timeout: 260 seconds]
n00bdev has quit [Ping timeout: 250 seconds]
khaki has left #ruby ["Leaving"]
<blarghlarghl>
Mon_Ouie: Aha. It _does_ "find" it, but as you suggested, it can't include it. Digging around, I can see that it's failing because "fatal error: cstring: No such file or directory"
mdw has quit [Ping timeout: 264 seconds]
Burgestrand has joined #ruby
<Mon_Ouie>
Aha, so I guess you need to add CFLAGS to make it compile as C++?
mdw has joined #ruby
<blarghlarghl>
Mon_Ouie: Yes, likely. Or libstdc++ is missing or something - but I highly doubt that.
<Mon_Ouie>
I don't think it tries to link the produced object file when you use find_header
bluOxigen has quit [Ping timeout: 265 seconds]
bluOxigen has joined #ruby
usershell has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
[adaedra] has joined #ruby
<[adaedra]>
Hello
dlitvak has joined #ruby
c0d3r0x has quit [Quit: Leaving]
<blarghlarghl>
Mon_Ouie: with_cflags("-x c++") did the trick!
<ruby[bot]>
apeiros: # => /tmp/execpad-a3a80b022a83/source-a3a80b022a83:2: unterminated string meets end of file ...check link for more (https://eval.in/506439)
<apeiros>
whoops
DoubleMalt has quit [Remote host closed the connection]
<Almoullim>
and i will se why python people prefer their language and then i will decide based on that and more search on google.
<norc>
ddv: I stopped reading after DHH. Can you summarise your sentence?
<norc>
;-)
lindistock has quit [Remote host closed the connection]
<ddv>
norc: no you can troll elsewhere
dexter-tzu has quit [Ping timeout: 265 seconds]
dwfait has quit [Remote host closed the connection]
<norc>
ddv: I am just very allergic to the name since he just shoves Basecamp down every Rails users throat.
<Ox0dea>
DHHIMASWAM.
dfinninger has joined #ruby
<VeryBewitching>
Almoullim: I love Ruby because if I'm going to spend my day writing code, it should be in a language that doesn't feel like I'm fighting to express my business logic in.
<VeryBewitching>
Python has its uses and I don't begrudge their community or Python itself, but I'd rather write Ruby code than almost anything else.
oivoodoo has quit [Remote host closed the connection]
dfinninger has quit [Remote host closed the connection]
dfinninger has joined #ruby
peeja has joined #ruby
dwfait has joined #ruby
oivoodoo has joined #ruby
oivoodoo has quit [Remote host closed the connection]
adgtl_ has quit [Ping timeout: 272 seconds]
hahuang65 has quit [Ping timeout: 240 seconds]
oivoodoo has joined #ruby
scottschecter has quit [Ping timeout: 265 seconds]
<Almoullim>
Great, just what i wanted to read (People opinions or feeling for that matters)
hnagamin has quit [Ping timeout: 276 seconds]
<konsolebox>
Almoullim: just curious, what is their best argument about why Python could be better than Ruby?
oivoodoo has quit [Remote host closed the connection]
Sucks has joined #ruby
<Almoullim>
havent gone there yet, i started with you :D
aegis3121 has joined #ruby
<VeryBewitching>
Almoullim: That's the start of my opinion, to fully summarize I would say "Use whatever language *you* like, try them all!"
<VeryBewitching>
Language all the things.
dlitvak_ has joined #ruby
<Ox0dea>
VeryBewitching: There are thousands!
<VeryBewitching>
Yes!
<VeryBewitching>
You'll *never* be bored
<VeryBewitching>
haha
joonty has joined #ruby
<Almoullim>
VeryBewitching: thanks for the advice, I'm PHP guy and now I started to think that i should explore some other kanguages
<VeryBewitching>
Almoullim: Oh, I was a PHP guy for about 15 years.
<VeryBewitching>
Then I met this girl named Ruby
<VeryBewitching>
And I like her :D
oivoodoo has joined #ruby
JohnT has joined #ruby
Sucks has quit [Read error: Connection reset by peer]
<cvusr>
but now there is PHP 7 :)
emilford has joined #ruby
<VeryBewitching>
Feh
<Almoullim>
VeryBewitching: thats too long, I've been using PHP only for about 3 years now
mdw has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
<newdan>
Almoullim: what's the other language?
<Ox0dea>
?ot
<ruby[bot]>
this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
<cvusr>
newdan: php or java
<newdan>
Oh lol what
<Almoullim>
newdan: Ruby or Python
<Ox0dea>
shevy: You thought Ron Burgundy had a beard?
<shevy>
Almoullim well really, the difference is not huuuuuge... the biggest is the philosophy really
<shevy>
I have no idea who that is... but I think I saw him in some strange blooper
nertzy2 has quit [Quit: This computer has gone to sleep]
moufl has joined #ruby
<Ox0dea>
Ron Burgundy is the fellow in the "I don't believe you" GIF.
<Almoullim>
well, i think thats about enough discussion for me, i will move on to search and try some codes ;)
<shevy>
somehow this name makes me hungry
<Ox0dea>
But it's a shade of red!
<shevy>
Almoullim so - is it ruby or python
sigurding has quit [Quit: sigurding]
TomPeed has joined #ruby
iamvery has joined #ruby
<Almoullim>
I'll fisrt do some search and see some code or perhaps try to code in both, and then i will decidee
f4cl3y has quit [Ping timeout: 250 seconds]
<VeryBewitching>
I suggest working with both on a small project.
<Almoullim>
i will let you know when i do :)
davedev2_ has joined #ruby
<Almoullim>
Yes thats right.
nertzy2 has joined #ruby
<shevy>
ok so ruby
<VeryBewitching>
Task: Write a command line app in Ruby and Python, both of which read a Twitter feed.
<shevy>
ewww
<shevy>
write a game!
babblebre has joined #ruby
craigp has quit [Remote host closed the connection]
davedev24 has quit [Ping timeout: 250 seconds]
peeja has quit [Ping timeout: 250 seconds]
malconis has joined #ruby
pawnbox_ has joined #ruby
dlitvak_ has joined #ruby
davedev24 has joined #ruby
craigp has joined #ruby
craigp has quit [Remote host closed the connection]
craigp has joined #ruby
v0n has quit [Quit: WeeChat 1.0.1]
v0n has joined #ruby
pawnbox has quit [Ping timeout: 276 seconds]
dlitvak has quit [Ping timeout: 250 seconds]
nertzy2 has quit [Quit: This computer has gone to sleep]
davedev2_ has quit [Ping timeout: 260 seconds]
emilford has quit [Ping timeout: 240 seconds]
dlitvak has joined #ruby
jas02 has quit [Quit: jas02]
hannelita has joined #ruby
lacuna has joined #ruby
malconis has quit [Remote host closed the connection]
kkh is now known as duracrisis
<blarghlarghl>
I'm trying to create a gem with an external library. There are some steps involved to compile this and get the .so file which Ruby can use. I have those steps in a Rake task. How do I have a gem install trigger that rake task to do the actual compiling-on-install?
<Ox0dea>
blarghlarghl: You want to execute some code post-install?
dlitvak__ has joined #ruby
dlitvak_ has quit [Ping timeout: 240 seconds]
bensarz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<blarghlarghl>
Ox0dea: No, I think I want just a regular run of the mill gem with extension. So the thing you linked helps. I'm just not sure I follow. Give me 2 minutes.
malconis has joined #ruby
dudedudeman has joined #ruby
<Ox0dea>
blarghlarghl: There's a sort of TL;DR near the bottom.
hannelita has quit [Ping timeout: 250 seconds]
adgtl has quit [Remote host closed the connection]
<konsolebox>
Almoullim: well i was hoping for a more technical reply
anisha_ has quit [Quit: This computer has gone to sleep]
f4cl3y has quit [Ping timeout: 256 seconds]
bensarz has joined #ruby
bronson has joined #ruby
anisha_ has joined #ruby
dlitvak has quit [Ping timeout: 276 seconds]
einarj has quit [Remote host closed the connection]
<blarghlarghl>
Ox0dea: I think I'm confused on where the actual work gets done and how it knows. So I'm not using rake-compile, but I have a rake task which calls extconf and make. that produces the .so file. how do I get that to run during install? and then how do I get the .so file moved to where I want it to?
<blarghlarghl>
Ox0dea: Or does all that happen magically and i don't even need the rake task, and it all happens because I declared an extension in my gemfile?
samgerber has joined #ruby
bensarz has quit [Client Quit]
<Ox0dea>
blarghlarghl: Right, the latter. :)
<blarghlarghl>
Oh. Well.
<Ox0dea>
Assuming you meant gemspec.
n00bdev has joined #ruby
<blarghlarghl>
Er, yes, I did.
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
Sembei has quit [Quit: WeeChat 1.4-dev]
<blarghlarghl>
Now I'm kind of upset, because I wasted so much effort to stitch it together myself and someone's done it for me. :)
<Ox0dea>
The happy kinda sad.
<blarghlarghl>
yeah :)
chipotle has quit [Ping timeout: 250 seconds]
tildes has quit [Ping timeout: 265 seconds]
Musashi007 has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
kalopsian has quit [Ping timeout: 250 seconds]
n00bdev has quit [Ping timeout: 250 seconds]
karapetyan has joined #ruby
ferr has joined #ruby
samgerber has quit [Ping timeout: 265 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<blarghlarghl>
Ox0dea: bit new to gem building as you can see. I assume that things like Gemfiles and Rakefiles also go into the gemspec's 'files' array? Literally every file that gets shipped (but not files that are generated like the .so files, of course)
betafive has joined #ruby
<Ox0dea>
blarghlarghl: Aye, the default's quite sane.
gheegh has joined #ruby
<gheegh>
hey all.. question.. if you have two LARGE (around 1mb) hashes, how would you do a diff of them? i was using hashdiff, and it's a pig.. taking more than an hour to do it.
emilford has joined #ruby
dfinninger has quit [Remote host closed the connection]
<gheegh>
this is essentially to compute a changelog
<apeiros>
gheegh: define "diff"
<gheegh>
so its not supposed to be a heavy process
<gheegh>
changed fields & values
<treehug88>
output in deterministic fashion; use diff
drptbl has joined #ruby
dudedudeman has quit [Quit: dudedudeman]
<apeiros>
also 1MB isn't necessarily a large hash. {"single key" => "1"*1000000} # there, 1MB hash, one key
kalopsian has joined #ruby
<gheegh>
yeah, well on HashDiff, it's taking more than 1 hour to compare 2 hashes.
<apeiros>
lol
<apeiros>
how many keys?
<gheegh>
that has a singel key..:-)
<gheegh>
58 root keys
dlitvak has joined #ruby
<gheegh>
some of those are array, with keys below.
<apeiros>
gheegh: I'd probably do it manually then and profile to improve the code. if all you want is changed fields and values that's not hard to do.
huyderman has quit [Read error: Connection reset by peer]
<gheegh>
yeah, i was tying to do it "not-specific"
<apeiros>
arrays don't have keys… do you mean nested hashes?
chipotle has joined #ruby
usershell has joined #ruby
<gheegh>
some of those root keys have values of arrays, with hashes in the array..
dfinninger has joined #ruby
<apeiros>
and you want subdiffs of those?
adgtl has joined #ruby
<gheegh>
yep..
<gheegh>
talking through it here, i'm coming to the conclusion.. that doing this quickly.. it will have ot be custom
<apeiros>
well, if you want it generically, you might have to settle on the thought that it does take time.
<apeiros>
the alternative is to write code optimized for your specific usecase.
<apeiros>
maybe there's another gem which does diffs on hashes faster.
<gheegh>
the most common case is that it's pulling ti from ElasticSearch, making 1 change, and then putting it back.. I"m trying to log what changed.
dlitvak__ has quit [Ping timeout: 245 seconds]
<apeiros>
yet another option is to consider a different base data structure to begin with, which yields better to diffing
s00pcan has quit [Ping timeout: 256 seconds]
<apeiros>
then log the change instead of figuring it out?
<speakingtoad>
Hmm
<speakingtoad>
It's like diffing trees basically, interesting problem
<gheegh>
the idea is that i can pick up processing along the way.. it it crashes midstream..
govg has joined #ruby
<gheegh>
yeah, i was considering trying something iwthi a trie
samgerber has joined #ruby
N3sh108 has joined #ruby
sftrabbit has joined #ruby
<speakingtoad>
Whatever you're using now seems to not be linear
<gheegh>
apeiros: that would mean embedding "logging" logic all over hte app
s00pcan has joined #ruby
usershell has quit [Remote host closed the connection]
<gheegh>
yeah, tis not.
<apeiros>
if you've edit point all over the app instead of a clean interface for edits… well, yes.
<apeiros>
*points
<N3sh108>
hello there! I am having some troubles with RoR. I just created a model and I would like to generate a controller for it. How do I do it? If I do 'db:migrate' I get an error concerning the role not being present
<gheegh>
you have the JSON before, and after save.. if you can do a diff efficiently.. then that's the better way
<apeiros>
?rails N3sh108
<ruby[bot]>
N3sh108: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<speakingtoad>
N3sh108: rails g controller MyModelsController
<apeiros>
gheegh: you just claimed otherwise a few minutes ago :-p
f4cl3y has joined #ruby
<N3sh108>
thanks speakingtoad ;)
<apeiros>
anyway, I mentioned the options I see
<gheegh>
ha.. yeah, its not efficient right now.. but that assumes I'm 1) using the most right gem and 2) the best approach..
<gheegh>
:-)
norc has quit [Ping timeout: 252 seconds]
SenpaiSilver has quit [Read error: Connection reset by peer]
nertzy2 has joined #ruby
<speakingtoad>
If performance is an issue it seems to me the cost of logging the change where it occurs is < implementing your own solution
<gheegh>
yeah.. its not going to work as is.. we do about 100K of these "writes" an hour.
<speakingtoad>
Tracking the change your making is likely always more efficient computationally than looking for it after, and in terms of your time which costs more than cpu time, well..
Musashi007 has quit [Quit: Musashi007]
<gheegh>
thanks for the thoughts everyone
<gheegh>
yeah.. probably will end up there..
<gheegh>
but this is done across a dozen models.. it would be nice to have a clean, unified solution
kies^ has joined #ruby
SenpaiSilver_ has quit [Ping timeout: 276 seconds]
<speakingtoad>
Make a mixin?
ellen_ has joined #ruby
<gheegh>
yeah, that's what it is.. :)
mostlybadfly has quit [Quit: Connection closed for inactivity]
scripore has quit [Quit: This computer has gone to sleep]
adgtl has quit [Remote host closed the connection]
blackmes1 has quit [Ping timeout: 276 seconds]
adgtl has joined #ruby
parus has joined #ruby
momomomomo has joined #ruby
dlitvak_ has joined #ruby
anisha_ has quit [Quit: Leaving]
nertzy2 has quit [Quit: This computer has gone to sleep]
dlitvak__ has joined #ruby
dlitvak has quit [Ping timeout: 272 seconds]
momomomomo has quit [Client Quit]
momomomomo has joined #ruby
tjohnson has joined #ruby
boboc has joined #ruby
dlitvak has joined #ruby
dhollinger has joined #ruby
mdw has joined #ruby
<livcd>
can i force the version of gem rails depends on (nokogiri?)
adgtl has quit [Remote host closed the connection]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dlitvak_ has quit [Ping timeout: 276 seconds]
asccigcc has joined #ruby
gbgdev has joined #ruby
dlitvak__ has quit [Ping timeout: 264 seconds]
adgtl has joined #ruby
karmatr0n has joined #ruby
Trieste has quit [Remote host closed the connection]
finisherr has quit [Quit: finisherr]
aegis3121 has quit [Ping timeout: 264 seconds]
PedramT has joined #ruby
adgtl has quit [Remote host closed the connection]
PedramT has quit [Read error: Connection reset by peer]
dlitvak_ has joined #ruby
sgambino has joined #ruby
karapetyan has quit [Remote host closed the connection]
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karapetyan has joined #ruby
Guest38 has joined #ruby
dudedudeman has joined #ruby
dlitvak has quit [Ping timeout: 260 seconds]
blackmes1 has joined #ruby
TomyWork has quit [Ping timeout: 248 seconds]
sftrabbit has quit [Quit: sftrabbit]
PedramT has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
karapetyan has quit [Remote host closed the connection]
lessless has joined #ruby
dionysus69 has joined #ruby
sftrabbit has joined #ruby
Pupeno has joined #ruby
Pupeno has joined #ruby
rodfersou|lunch is now known as rodfersou
krzkrz has quit [Ping timeout: 272 seconds]
mchu has joined #ruby
<blarghlarghl>
Is it possible in a Gemfile to specify a github url to a gemspec to install, but the gemspec is _not_ in the root of the repo?
agit0 has quit [Quit: zzzZZZ….]
SenpaiSilver has joined #ruby
gagrio has quit [Quit: Leaving...]
PedramT has quit [Ping timeout: 272 seconds]
SCHAAP137 has quit [Remote host closed the connection]
craigp has quit [Remote host closed the connection]
cschneid_ has joined #ruby
<soahccc>
blarghlarghl: what is that for a gem? :D sure its not a submodule or something?
<Ox0dea>
blarghlarghl: Looks like not. :<
terminalrecluse has joined #ruby
<Ox0dea>
A submodule might do, but that's just putting a bit of spin on "root".
LMity has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
hannelita has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
pawnbox has joined #ruby
skade has joined #ruby
ramfjord has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
<blarghlarghl>
soahccc, Ox0dea, no, not a submodule. I want this: gem 'nokogiri', :git => 'https://github.com/tenderlove/nokogiri.git' but the gemspec file is not in the root of that repo, but in /ruby/
skade has quit [Client Quit]
<Ox0dea>
blarghlarghl: Your inability to do so is quite deliberate.
<blarghlarghl>
ah, shame.
<Ox0dea>
They specifically don't want folks running edge Nokogiri.
<blarghlarghl>
wait, how does that stop people running edge nokogiri?
<apeiros>
"Sometimes people imply that we've forgotten, or that we don't how to properly manage our codebase. Those people are super fun to respond to!"
<apeiros>
lol
<blarghlarghl>
I am not using nokogiri. :)
jam_ has quit [Ping timeout: 240 seconds]
<blarghlarghl>
if it aids the discussion, then I'll use :git => 'https://github.com/rails/rails.git' as an example. That should work - there's a gemspec file in the root of that repo.
x77686d has joined #ruby
speakingtoad has quit [Ping timeout: 240 seconds]
<blarghlarghl>
The question now is - how do I do that: :git => 'https://github.com/rails/rails.git' # but without a .gemspec in the root of the repo, but in a subdirectory. :)
<Ox0dea>
That's a decent handful of options, but none of them has anything to do with subdirectories.
kspencer has joined #ruby
DonOtreply has joined #ruby
<blarghlarghl>
Ox0dea: argh. hm.
Trieste has joined #ruby
<blarghlarghl>
thanks Ox0dea
<Ox0dea>
Sure thing, blarghlarghl.
<Ox0dea>
(I couldn't help saying your nick aloud that time.)
<blarghlarghl>
Ox0dea: You can guess the state I was in when I picked it. Most definitely because of some a computer issue.
<Ox0dea>
I believe it. :P
n00bdev has quit [Ping timeout: 264 seconds]
<Ox0dea>
It's not entirely clear why it's not an option, mind, but I suspect that the fact that there are just saner ways to achieve the same effect has something to do with it.
sandstrom has quit [Quit: My computer has gone to sleep.]
nofxx has quit [Ping timeout: 256 seconds]
<Ox0dea>
I had a blarghlarghl moment just this morning when I discovered that `ls` now defaults to --quoting-style=shell-escape.
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sgambino has joined #ruby
SOLDIERz has quit [Ping timeout: 276 seconds]
tomchapin has joined #ruby
<blarghlarghl>
Ox0dea: Well, it's all a bit of an edge case here. I am writing gemspecs for a set of language bindings (as you have probably surmised) to a commercial library that's a customer of ours, but they've given me push access to their repo. but i can't just go and restructure all their stuff and i also can't just create a new repo just for the gem.
rkazak has joined #ruby
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TomyLobo has joined #ruby
<Ox0dea>
blarghlarghl: Secret Gists not an option, I trust?
Anasta7 has joined #ruby
<blarghlarghl>
Ox0dea: not the worst idea... what does a gist get me?
oivoodoo has quit [Remote host closed the connection]
Anderson69s has joined #ruby
<Ox0dea>
blarghlarghl: Well, Gists are valid Bundler sources.
chouhoulis has joined #ruby
oivoodoo has joined #ruby
scottschecter has joined #ruby
ajf- has quit [Ping timeout: 265 seconds]
<Ox0dea>
Too "flat" for your intended use case, though. :/
oivoodoo has quit [Remote host closed the connection]
Shaboum has quit [Quit: WeeChat 1.4]
astrobunny has joined #ruby
bjessbrown has joined #ruby
hahuang65 has joined #ruby
oivoodoo has joined #ruby
<dudedudeman>
can i ask what #ruby thinks of scala?
troulouliou_div2 has joined #ruby
SenpaiSilver has quit [Quit: Leaving]
<blarghlarghl>
Ox0dea: yeah, likely. I'll keep casting about. thanks. i'm going to go for a walk first.
chouhoul_ has quit [Ping timeout: 240 seconds]
efox has left #ruby ["adios!"]
<Ox0dea>
dudedudeman: So much syntax! <3
<dudedudeman>
ha. i’m starting to realize that, @Ox0dea
einarj has joined #ruby
<dudedudeman>
my office is doing an intro to functional programming class during office hours, and I won a copy of the book they’re using(scala book), and i’m kind of interested to see how i feel about it
<Ox0dea>
blarghlarghl: I'm pretty sure you want a submodule, but I don't know how much "restructuring" you'd count that as.
<dudedudeman>
i’ve only really touched ruby, so i’m trying to wrap my head around what hte learning cuve is going to be
TomyLobo has quit [Ping timeout: 276 seconds]
<Ox0dea>
dudedudeman: It's surely not the simplest introduction to FP, but it does make a lot of things "easy".
<Ox0dea>
Which, hey!, is one of the biggest Ruby draws.
<dudedudeman>
that’s good to know
<dudedudeman>
all of our server side code at the office is written in scala, so i’ll be able to peg some people here about questions
hahuang65 has quit [Ping timeout: 264 seconds]
antgel has joined #ruby
<Ox0dea>
Good deal. Be wary of the Java interop, though.
RTG` has quit [Ping timeout: 272 seconds]
fmcgeough has quit [Quit: fmcgeough]
<dudedudeman>
yeah, i don’t know much java at all
TomyLobo has joined #ruby
wldcordeiro has joined #ruby
dlitvak has joined #ruby
RTG` has joined #ruby
shredding has quit [Ping timeout: 256 seconds]
kojak_ has joined #ruby
sigurding has quit [Quit: sigurding]
speakingtoad has joined #ruby
jbrhbr has joined #ruby
<kojak_>
I have the following code: http://pastebin.com/k8UG0EXi. That lambda is further called within a method of deliverv. However, it yields this error: `block in <main>': undefined method `[]' for nil:NilClass (NoMethodError)
user083 has quit [Read error: Connection reset by peer]
<blarghlarghl>
Ox0dea: actually, can't i just do this: gem 'extracted_library', :path => './vendor/extracted_library' except for a _not_ extracted library, i.e. for a .gem bundle?
<blarghlarghl>
i can host the .gem file somewhere on our network and then just have the gemfile fetch and install it directly, without running a gem server, surely...
_djbkd has joined #ruby
lucasb has quit [Ping timeout: 276 seconds]
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
I don't see why it couldn't be finagled into just doing the unpacking.
<Ox0dea>
norc_: Does it now? :P
<blarghlarghl>
Ox0dea: yeah, :path is for unpacked ones only it seems... irritating. but I can cheat. I can clone the repo using chef, then point to the cloned repo in the gemfile. it's another layer of... indirection, but there we are.
ls has joined #ruby
n00bdev has quit [Ping timeout: 276 seconds]
<Ox0dea>
norc_: thread_start_func_2() is not the most promising name.
tobacco_joe has joined #ruby
casadei has joined #ruby
_djbkd has quit [Ping timeout: 245 seconds]
Snowy is now known as IdleMcBridle
Xeago has joined #ruby
kalopsian has joined #ruby
ajf- has joined #ruby
LMity has quit [Ping timeout: 240 seconds]
<norc_>
Ox0dea, it follows the common naming convention. Take a function name, and append an integer or _fix or _two to it and then use it.
<norc_>
Ox0dea, it is a bit bad though.
foufou31d has joined #ruby
<norc_>
Ox0dea, they should have done a #define THREAD_START_FUNC_2 thread_start_func_2 for proper calling conventions sake.
<Ox0dea>
norc_: There's a lot of that goin' around.
<norc_>
;-)
B1n4r10 has joined #ruby
User458764 has joined #ruby
aryaching has quit []
blackmesa has joined #ruby
skade has quit [Read error: No route to host]
aryaching has joined #ruby
skade has joined #ruby
<norc_>
Ox0dea, the whole code base is pretty anti vim
<norc_>
Ox0dea, you really need an IDE that does full preprocessing to quickly navigate code. :/
IdleMcBridle is now known as Snowy
<Ox0dea>
Pfft.
dlitvak has quit [Ping timeout: 260 seconds]
n00bdev has joined #ruby
blackmes1 has quit [Ping timeout: 245 seconds]
goodcodeguy has joined #ruby
<Ox0dea>
ctags is fine ~90% the time for MRI.
<Ox0dea>
But you're right, higher would be nice.
skade has quit [Read error: No route to host]
karapetyan has joined #ruby
dlitvak has joined #ruby
user083 has joined #ruby
_djbkd has joined #ruby
vdamewood has quit [Quit: Life beckons.]
pdoherty has joined #ruby
karapetyan has quit [Ping timeout: 245 seconds]
Limix has joined #ruby
_djbkd has quit [Remote host closed the connection]
jbrhbr has quit [Quit: Leaving.]
_djbkd has joined #ruby
iateadonut has quit [Quit: Leaving.]
machinewar has joined #ruby
<machinewar>
anyonen seen this with rails server? log writing failed. "\xE2" from ASCII-8BIT to UTF-8
<machinewar>
I understand the encoding issue, but not sure what code is throwing this error, gets printed to console when run rails server
symm- has joined #ruby
<machinewar>
thinking need to fore_encode 'utf-8' but no idea where to place the fix
lacuna has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<soahccc>
machinewar: you should have a backtrace, no?
_djbkd has quit [Ping timeout: 250 seconds]
<machinewar>
soahccc: this is on my development machine when i initially run the rails server command, will check devlopemnt logs and see if anything was written
ellen_ has quit [Quit: Connection closed for inactivity]
_djbkd has joined #ruby
mchu has quit [Quit: mchu]
Aditya has joined #ruby
bnagy has joined #ruby
SenpaiSilver has joined #ruby
mchu has joined #ruby
<Aditya>
Is ruby good for first time programmers
<soahccc>
Aditya: yes because it's awesome, no because you have a hard time looking at other languages :D
<machinewar>
soahccc: its strange, its trying to log something between Ctrl-C to shutdown server, Listening on IP:Port
AndChat-641136 has quit [Ping timeout: 260 seconds]
<machinewar>
Aditya: I would say its a great language for first time programmers
<Aditya>
Thnx
boboc has quit []
<Aditya>
I know the basics like "abc" of c++ from school
<Aditya>
But i feel like it's gonna take too long before i do something productive with c++
emilford has joined #ruby
<shevy>
Aditya it depends on how you wanna learn, if you are happy to use the basics and be productive, then yeah, ruby is very simple. if you wanna learn everything and use everything, it can be very complex and probably confusing at times
<shevy>
like when you have to know... what is -> versus Proc.new versus lambda
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<shevy>
I solved it by banning -> and lambda !!!
<soahccc>
shevy: I would ban anything but -> :D
<soahccc>
+rather
<shevy>
see Aditya, everything is using ruby differently
<shevy>
erm, *everyone
<soahccc>
shevy: :P
<Aditya>
Well i wanted to design a website of mine
<shevy>
hmm
<shevy>
if you go the rails route, that's quite a lot of extra stuff to know
<Aditya>
What other route is their?
ferr has joined #ruby
adgtl has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
troulouliou_div2 has quit [Quit: Leaving]
<shevy>
cgi!
<shevy>
sinatra is also somewhat simple
<Aditya>
I will look into that
<Aditya>
What are they btw?
Abrin has joined #ruby
devbug has joined #ruby
Newtonianb has joined #ruby
x77686d has quit [Quit: x77686d]
baweaver has joined #ruby
<shevy>
well you know the fancy-pants/buy/swords/3 thingies
<shevy>
rest stuff
<Aditya>
No
IanV0rn2341 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
and easier access to databases
<shevy>
you want to design a website so of course you know rest!
Axy has quit [Read error: Connection reset by peer]
dwfait has quit [Remote host closed the connection]
guacamole has quit [Client Quit]
guacamole has joined #ruby
momomomomo has joined #ruby
ur5us has quit [Ping timeout: 245 seconds]
JohnT has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has quit [Ping timeout: 240 seconds]
ferr has quit [Ping timeout: 250 seconds]
hxegon is now known as hxegon_AFK
Limix has quit [Ping timeout: 276 seconds]
maletor_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
IanV0rn2341 has joined #ruby
nej has quit [Remote host closed the connection]
momomomomo has quit [Client Quit]
betafive has joined #ruby
kalopsian has joined #ruby
jhn has joined #ruby
jottr has joined #ruby
krainboltgreene has joined #ruby
dfinninger has quit [Remote host closed the connection]
l4v2 has joined #ruby
f3ttX] has joined #ruby
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tomchapin has joined #ruby
baweaver has joined #ruby
BSaboia has quit [Ping timeout: 250 seconds]
dotix has quit []
chancy has quit [Remote host closed the connection]
baweaver has quit [Ping timeout: 240 seconds]
zambini has quit [Quit: Leaving.]
TomyLobo has quit [Ping timeout: 272 seconds]
gruz0 has quit [Quit: Leaving]
ramfjord_ has quit [Ping timeout: 265 seconds]
ruby-lang372 has joined #ruby
jgpawletko has quit [Quit: jgpawletko]
<ruby-lang372>
Hi, pretty new to ruby but have made my first app that's single page - what is the best way for me to post a message to the page based on a controllers function?
oivoodoo has quit [Read error: Connection reset by peer]
l4v2 has left #ruby [#ruby]
oivoodoo has joined #ruby
arup_r has quit []
hxegon_AFK is now known as hxegon
skade has joined #ruby
jud has quit [Quit: Leaving]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
B1n4r10 has quit [Ping timeout: 240 seconds]
casadei has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 240 seconds]
n_blownapart has joined #ruby
baweaver has joined #ruby
jbrhbr1 has quit [Quit: Leaving.]
tlaxkit has joined #ruby
mwksl__ has quit [Quit: leaving]
emilford_ has joined #ruby
emilford has quit [Ping timeout: 265 seconds]
kies^ has quit [Ping timeout: 256 seconds]
Salve_ has quit []
Cohedrin has joined #ruby
mfb2 has joined #ruby
skade has quit [Ping timeout: 250 seconds]
B1n4r10 has joined #ruby
pdoherty has quit [Ping timeout: 256 seconds]
dexter-tzu has joined #ruby
<cout>
so I've got this odd problem: I'm requiring 'net/ssh' inside a method (not at the toplevel), and it spuriously fails with LoadError. Afaict, there's never a case where I call this method outside the main thread (and in fact, require is only ever called from the main thread). Yet sometimes it succeeds and sometimes it fails. Any ideas?
<cout>
tried GC.disable in case this was an odd GC issue but no change in behavior
Limix has joined #ruby
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby
B1n4r10 has quit [Ping timeout: 276 seconds]
Canar has joined #ruby
pdoherty has joined #ruby
<Canar>
Hi there, I'm reading about nested-for-loop limits.
<Canar>
Python's is 21.
<Canar>
I'm curious if Ruby has one and what the value is.
B1n4r10 has joined #ruby
<Ox0dea>
Canar: For loops in Ruby are *literally* converted to invocations of #each, so I suspect there's no such artificial limit.
peeja has quit [Ping timeout: 260 seconds]
howdoicomputer has joined #ruby
<Canar>
Ox0dea: That's what I hoped.
<Canar>
Whenever I compare Ruby to Python, I end up prefering Ruby.
<Ox0dea>
There was that one time for me, but I can scarcely recall it.
baweaver has quit [Remote host closed the connection]
maletor_ has joined #ruby
baweaver has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
<Ox0dea>
Oh! `ary[::-1]` for reverse is pretty nifty.
<mg^>
There are two reasons that sum up why I dislike Python. 1. meaningful whitespace. 2. 'print' is a reserved keyword.
PedramT has joined #ruby
B1n4r10 has quit [Ping timeout: 256 seconds]
baweaver has quit [Remote host closed the connection]
<betafive>
issue #2 with python is fixed by version 3
<Ox0dea>
mg^: On the other hand, lots of things are slightly surprisingly *not* keywords in Ruby.
scottschecter has quit [Quit: Leaving]
<Ox0dea>
Of course, that's a plus by my lights.
<Ox0dea>
>> public == private # except maybe when this happens
<ympeg>
it's not any business-ish project, I can experiment and have fun. But I want to finish this app in a finite amount of time ;d
<Ox0dea>
Darmani: Decent song. I'm gonna listen to it to the end.
<Darmani>
Do it xP
K1MOS has joined #ruby
blackgoat has joined #ruby
<newdan>
ympeg: I would probably try FXRuby before Fltk since it seems maintained, if you choose to stick with Ruby. (Note it's FXRuby uses FOX toolkit not JavaFX)
<Ox0dea>
Darmani: Video's pretty funny. What's all this words in my screens?
<Darmani>
Ox0dea: It's a lyric video
<Ox0dea>
Darmani: Yes, that's the problem.
soxet has joined #ruby
<Ox0dea>
Needs more Gambino in a hangar because reasons.
<Darmani>
Ox0dea - Lol no doubt xD
karapetyan has quit [Remote host closed the connection]
soxet has quit [Client Quit]
<Ox0dea>
Donald Glover -> Don Glover -> DONG LOVER
<Ox0dea>
I wouldn't even be mad.
emilford_ has quit [Ping timeout: 256 seconds]
<Darmani>
Ox0dea - lmao did you just make that up?
<Ox0dea>
Of course not.
<Ox0dea>
That's Gambino's real name, to clarify.
<ympeg>
newdan: thank you for your advice.
Term_ has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Darmani>
No I know that's his real name but I didn't know if you switch the letters you get dong lover
lemur has joined #ruby
<Darmani>
that's too funny.
ramfjord has joined #ruby
<Darmani>
E.E Cummin on her face now that's poetry in motion<33 lulz
<Ox0dea>
He talked about how he realized it long after he'd been writing his name "Don Glover" on official papers and the like.
mfb2 has quit [Ping timeout: 264 seconds]
<Ox0dea>
On Conan or some such.
<baweaver>
!ot
* baweaver
sighs
<Darmani>
Ox0dea - Did you ever watch Community?
zambini has joined #ruby
<baweaver>
#ruby-offtopic if you want to talk tv and such
ZeeNoodleyGamer has joined #ruby
<Darmani>
baweaver - what would we do without you man.
einarj has joined #ruby
codecop has quit [Remote host closed the connection]
<baweaver>
chat about tv in #ruby I think
<Ox0dea>
He's not wrong.
<Darmani>
baweaver - And surprisingly the world wouldn't end.
<Darmani>
I know it's hard to believe.
<newdan>
Darmani: But other people in this channel would find it a little noisy
emilford has joined #ruby
<Darmani>
newdan - Because there is so much else going on.
<Darmani>
I rest my case.
lemur has quit [Ping timeout: 250 seconds]
<baweaver>
be nice.
<Ox0dea>
Darmani: You totally interrupted a legitimately Ruby-centric conversation, though. I only ended up a co-conspirator because you linked a not-terrible song.
<Darmani>
baweaver - I will<3
einarj has quit [Remote host closed the connection]
<Darmani>
Ox0dea - A co-conspirator? Are we the mafia? Lol
DonOtreply has quit [Read error: Connection reset by peer]
<Ox0dea>
It's a portmanteau of "hyperbole" and "police".
<Darmani>
Ox0dea - Can you do that? Lol
JJM has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
VeryBewitching has quit [Quit: Konversation terminated!]
<zerowaitstate>
hyperbolice, i like it
<Ox0dea>
Duh.
<Ox0dea>
<3
<Darmani>
I do have a legitimate question though
mchu has quit [Quit: mchu]
<Darmani>
So I'm making a version of Hangman that can be played on the command line. But I'm having trouble figuring out how to account for how many turns the "guesser" has before he loses.
<Darmani>
Would that just be like a number inside a variable that decreases after each guess?
nfk has joined #ruby
<Ox0dea>
For bad guesses, yeah.
mchu has joined #ruby
<Ox0dea>
You're not supposed to lose a turn if you guess good.
aupadhye has quit [Ping timeout: 250 seconds]
<Darmani>
Really? That's not how I played...
<Ox0dea>
Uh... did you play on paper?
Term_ has quit [Ping timeout: 252 seconds]
jaffachief_ has joined #ruby
wilbert_ has joined #ruby
<newdan>
Yeah, when I played it, if you guess a letter wrong you draw another part of the hangman
<Ox0dea>
*hanged man, but ^
<Ox0dea>
The hangman is the executioner.
<Ox0dea>
"I know from experience, dude."
<Darmani>
newdan - Even if you guessed a letter right you only had a limited number of guesses before you lost. At least the way I played.
<Darmani>
Ox0dea - Wut? Lol
<Ox0dea>
> And from having seen a lot of drops in my day.
<newdan>
Darmani: Weird. I don't see how that makes any sense... so you can't have large words?
ESpiney has quit [Read error: Connection reset by peer]
<Darmani>
newdan - Maybe I just never played correctly.... Lol
<Ox0dea>
Darmani: There's supposed to be an emotional component.
<Darmani>
Ox0dea - Lol what?
<Darmani>
Are you supposed to feel something for the "hanged man"?
<Ox0dea>
You're supposed to want to guess correctly so that you don't have to draw more parts of him so that he doesn't have to meet an untimely end.
<Ox0dea>
Not even enough time to count to a billion.
jam_ has joined #ruby
<Darmani>
Can you imagine if hangman was real though? Like people sentenced to death by hanging actually had a chance to live if someone correctly guessed the word the executioner had? lmao
djcp has quit [Ping timeout: 272 seconds]
<Ox0dea>
That's not funny, but I exhaled through my nose a little harder than usual anyhow.
<zerowaitstate>
Darmani: um, yes, that's how court cases work
sperant has joined #ruby
<Darmani>
Lol xP
<zerowaitstate>
Darmani: a little bit abstract, but the same principle
<Darmani>
zerowaitstate - What a controversial statement. Explain it.
<Darmani>
Or pm me and explain it.
jottr has quit [Ping timeout: 240 seconds]
<Ox0dea>
Nobody knows what it means, but it's provocative.
gbgdev has joined #ruby
<Darmani>
Ox0dea - ^ That's what I'm thinking.
skade has quit [Ping timeout: 245 seconds]
<aegis3121>
If you say the right things, you can convince the executioner not to kill you (i.e.: guess the word he's thinking of)
<zerowaitstate>
Darmani: I am looking for a link, gimme a bit
<Darmani>
aegis3121 - Whaaat. It can't be as simple as that.
<Darmani>
Actually now I'm thinking about Bill Clinton and that woman... damn. Maybe you're right.
<aegis3121>
Sure it is. Plant the reasonable doubt, say the magic words, and the jury finds you not guilty.
govg has quit [Ping timeout: 240 seconds]
jam_ has quit [Ping timeout: 240 seconds]
<Darmani>
aegis3121 - What a sad reality you've brought to light. That is depressing.
<Ox0dea>
"'Scuse me, hangman, hate to bother ya while you're at work, but this noose is causing me considerable discomfiture. You think you could--" "That's Numberwang! You've won the rest of your life."
Ebok has joined #ruby
Ebok has quit [Client Quit]
jbrhbr has joined #ruby
<Darmani>
Ox0dea - That was an actual conversation recorded in 1742 in England. For a man who had stolen some sausages for dinner and was condemned to hang by the noose until dead.
Ebok has joined #ruby
<Darmani>
true story.
dhollinger has quit [Quit: WeeChat 1.4]
<Ox0dea>
Darmani: I think we're reading the same PDF.
<Darmani>
Alrightt I'm going to actually work on this game.
<Darmani>
I'll be back.
<Darmani>
Don't hesitate to summon me<3
<zerowaitstate>
Darmani: I can't find the link from this location. I read a really well-written article by a federal judge for a law journal which talks about certain criminal justice issues in the US where the Fed is way behind the States in terms of fair legal practices. One of the topics was the requirement for prosecutors, who have first access to the crime scene and witnesses, to provide exculpatory evidence to the defense
Burgestrand has joined #ruby
krobzaur_ has joined #ruby
krobzaur has quit [Ping timeout: 240 seconds]
<Darmani>
summoned me like a minute after I said that lmao
bronson has quit [Ping timeout: 265 seconds]
<zerowaitstate>
Darmani: in many States, they are required to do that, but in Federal cases, the prosecutor is only compelled to turn over evidence to the defense if the prosecution feels it's relevant
<Burgestrand>
apeiros how do you manage to stay connected to IRC 24/7? :)
<zerowaitstate>
Darmani: frequently, a person's life hangs in the balance because the prosecutor encountered evidence that was clear them of suspicion, but failed to turn it over to defense because they had no other credible suspect
dfinninger has quit [Remote host closed the connection]
<zerowaitstate>
Darmani: so, hunting for the right words, or guessing that evidence exists and succesfully compelling the prosecutor to disclose it, has saved lives in the past
polishdub has quit [Quit: Leaving]
duderonomy has quit [Ping timeout: 276 seconds]
<zerowaitstate>
Darmani: and none of that has to do with rubyh
<Darmani>
zerowaitstate - XD
<Darmani>
zerowaitstate - That is very interesting to say the least. Although if it is true that is absolutely depressing that a man's life depends on whether or not you can convince a prosecutor to do the right thing.
ramortegui has quit [Remote host closed the connection]
<ruby-lang372>
Can you not change the font-size of flash messages?
<aegis3121>
sounds like a css AND a rails question :)
solars has quit [Ping timeout: 265 seconds]
<Darmani>
Ox0dea - Is that what the cool kids use these days? lmao
<ruby-lang372>
:S
<Ox0dea>
?rails ruby-lang372
<ruby[bot]>
ruby-lang372: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<Ox0dea>
It'll definitely be a CSS rule.
<ruby-lang372>
ahh have to register
griffindy has joined #ruby
<ruby-lang372>
Yeah, font-size isn't working on flash message - but all my other CSS styling is so ill have to dig deeper
oivoodoo has quit [Remote host closed the connection]
aryaching_ has quit []
K1MOS has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aryaching has joined #ruby
<Ox0dea>
ruby-lang372: Ah, in that case, it could only be one thing.
n_blownapart has quit [Ping timeout: 250 seconds]
Musashi007 has joined #ruby
baweaver has quit [Remote host closed the connection]
ajf- has quit [Excess Flood]
ferr has joined #ruby
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mchu has quit [Quit: mchu]
dexter-tzu has quit [Ping timeout: 245 seconds]
chouhoul_ has quit [Ping timeout: 256 seconds]
joneshf-laptop has quit [Remote host closed the connection]
passcod has quit [Remote host closed the connection]
JJM has joined #ruby
asccigcc has joined #ruby
finisherr has quit [Quit: finisherr]
skade has quit [Ping timeout: 256 seconds]
dexter-tzu has joined #ruby
passcod has joined #ruby
jgt has quit [Ping timeout: 276 seconds]
TomPeed has joined #ruby
SophieDeBenedett has joined #ruby
joshuabamboo has joined #ruby
IrishGringo has quit [Ping timeout: 260 seconds]
dwfait has quit [Remote host closed the connection]
krobzaur has joined #ruby
JJM has quit [Ping timeout: 256 seconds]
<Darmani>
Ox0dea - Question,
karmatr0n has joined #ruby
<Darmani>
Once a person guesses a letter from the correct word... How do I reveal that letter in the array?
<Darmani>
I have no ideaaa.
<Ox0dea>
¯\_(ツ)_/¯
ruby-lang372 has quit [Ping timeout: 252 seconds]
krobzaur_ has quit [Ping timeout: 245 seconds]
<aegis3121>
haha
<Darmani>
Come on dude
<Ox0dea>
Come on, dude.
<Darmani>
Seriously -,-
kies^ has quit [Ping timeout: 240 seconds]
Xeago has quit [Remote host closed the connection]
baweaver has joined #ruby
emilford has quit [Ping timeout: 276 seconds]
Xeago has joined #ruby
<zambini>
You know the word, just replace that `_` string value with the new letter
emilford has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Darmani>
zambini - yeah I figured it out shortly after I asked lol
<Darmani>
But I'm glad that there are people that you that help people like me xP so thanks lol
<zambini>
Make sure you do the equivalent to find_all :P
wilbert has quit [Ping timeout: 265 seconds]
aupadhye has joined #ruby
<Papierkorb>
Darmani: Go and #collect the guessed chars
<Darmani>
Papierkorb - I'll show you what I have in a sec. But yeah. I have the wrong letters pointing to an array that catches them.
IrishGringo has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
<Papierkorb>
Darmani: We only give you pointers, you still need to bind those together to build what you want
davedev24 has joined #ruby
<Ox0dea>
Papierkorb: What's a linked list got to do with it?
<lucasb>
I'm going to think how to write a hangman too, just for the lulz. But I'm gonna abandon it half-finished, like I did to tictactoe.
bronson has joined #ruby
duderono_ has joined #ruby
<Darmani>
Papierkorb - Aye aye captain.
Musashi007 has quit [Quit: Musashi007]
davedev2_ has joined #ruby
LMity has joined #ruby
<zambini>
`KEY.each_with_index.map { |x, i| i if 'E' == KEY[i]}.compact` where KEY is your string and 'E' is their guess. Not super pretty and likely not "rubish" :P
sundhell has quit [Ping timeout: 276 seconds]
Guest80422 has joined #ruby
<zambini>
`map.with_index` also works\
sine` has joined #ruby
oivoodoo has joined #ruby
jhn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Guest80422>
hello
dlitvak has joined #ruby
<Darmani>
Guest80422 - Aloha
emilford has quit [Ping timeout: 250 seconds]
davedev24 has quit [Ping timeout: 260 seconds]
big|bad|wolf has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
TheHodge has joined #ruby
emilford has joined #ruby
jud has joined #ruby
<Darmani>
Papierkorb, Ox0dea, lucasb, - Okay so this is still a work in progress...
rehat_ has quit [Remote host closed the connection]
nerium has joined #ruby
big|bad|wolf has quit [Ping timeout: 250 seconds]
<lucasb>
just a note, you don't need commas in %w(a, b, c, d)
dcunit3d has quit [Ping timeout: 250 seconds]
<Darmani>
lucasb - Mmk ^^
paradisaeidae has joined #ruby
zeroDi has quit [Quit: WeeChat 1.3]
dudedudeman has joined #ruby
maletor__ has joined #ruby
SophieDeBenedett has quit [Remote host closed the connection]
LMity has quit [Ping timeout: 276 seconds]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aupadhye has quit [Quit: Leaving]
dlitvak has quit [Ping timeout: 250 seconds]
IrishGringo has quit [Ping timeout: 272 seconds]
<zambini>
Are you looking for feedback?
<Darmani>
Advice, feedback, love, anything. lol
<Darmani>
I suck at OOP programming rbh.
<Darmani>
tbh*
frewtc4ke has joined #ruby
maletor_ has quit [Ping timeout: 260 seconds]
joshuabamboo has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
davedev24 has joined #ruby
ajf- has joined #ruby
<lucasb>
Darmani: don't you try snippets in irb or pry?
<zambini>
:P Np. Everyone starts somewhere. My immediate suggestion (not the most important) is to get rid of that switch and turn it into a more maintainable data structure. Array probably is fine. It can be a const array and you can just add/remove entries. Since you already have that mapping, your describe method can be reduced to `DESCRIPTIONS[@number_of_guesses]`
<Darmani>
lucasb - yeah I do. I like to get general criticism first I guess.
<zambini>
`array[i]` returns `nil` if it's out of bounds, so you can not worry about Out of Bounds exceptions :P
zyzioziom has joined #ruby
<Darmani>
zambini - Lol got it.
<zambini>
Also I would suggest having it return the string instead of `puts`ing. I don't have a real reason for that one.
davedev2_ has quit [Ping timeout: 240 seconds]
<Darmani>
zambini - np. Alright let me go work on this a little more. Maybe I posted it a bit premature. I probably should have tested it beforehand.
nertzy2 has joined #ruby
woodruffw has quit [Ping timeout: 250 seconds]
Azure has quit [Quit: Oops.]
pietr0 has quit [Quit: pietr0]
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chipotle has quit [Ping timeout: 250 seconds]
woodruffw has joined #ruby
spooq has joined #ruby
woodruffw has joined #ruby
maletor__ has quit [Read error: Connection reset by peer]