<havenwood>
mynameisdebian: If you write idiomatic code, it'll be *way* easier for us to read and spot errors.
ramfjord has quit [Read error: Connection reset by peer]
<havenwood>
mynameisdebian: Write code for the reader.
<baweaver>
that and for loops put you in the completely wrong mindframe
<mynameisdebian>
okay, I'll fix my for loops
<baweaver>
You'd start doing things like: arr2 = []; for x in y; arr2.push(x * 2) end
<baweaver>
when in Ruby this makes more sense: ys.map { |x| x * 2 }
<havenwood>
mynameisdebian: I think if you solve the threshold problems you'll find and resolve your error, and have code that you and others can read! If you bear with us on incremental improvement we can probably quickly hone in on the issue.
<baweaver>
also makes it easier to abstract portions of transformations
bradleyprice has quit [Remote host closed the connection]
<mynameisdebian>
Okay, I'll try. Let me consider the recommendations suggested above and try to refactor my code, and I'll come back and ask the question again.
<havenwood>
mynameisdebian: Sounds good!
caleBOT has quit [Ping timeout: 264 seconds]
eckhardt_ has joined #ruby
chouhoulis has quit [Ping timeout: 265 seconds]
bradleyprice has joined #ruby
ramfjord has joined #ruby
bradleyprice has quit [Ping timeout: 240 seconds]
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
TvL2386 has quit [Ping timeout: 264 seconds]
cagomez has quit [Ping timeout: 245 seconds]
ohcibi has quit [Ping timeout: 264 seconds]
ohcibi has joined #ruby
mupt has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
TvL2386 has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
DTZUZO has quit [Ping timeout: 268 seconds]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
rshetty has joined #ruby
<mynameisdebian>
I have this code/output: https://gist.github.com/rrdein/7fc0d1bdee60308036c98af00eed7686 . On line 33 it prints some variables. You can see that when i goes from 0 to 1 that cidrs[0][1] (the fourth column) continues to change in the output, even though the value of i should never again be 0 to change cidrs[0][1] on line 30 (cidrs[i][1] += 1). I have commented out line 30 and confirmed that it is the onl
<mynameisdebian>
y line changing this value. Can anyone see the error in my code?
ciscam has quit [Ping timeout: 268 seconds]
duderonomy has joined #ruby
myndzi has left #ruby [#ruby]
ciscam has joined #ruby
taylorzr has quit [Remote host closed the connection]
<baweaver>
If you initialize with a default value, it literally passes that value
<baweaver>
in other words, that same array gets passed to everything
<baweaver>
You probably want: Array.new(cidr_list_length) { [nil, -1, -1] }
<baweaver>
which calls a function to generate each individual "counter" instead of passing the same one.
<baweaver>
Now then, as to the nature of the code itself... one sec, reading.
nibbo has quit [Ping timeout: 240 seconds]
<havenwood>
mynameisdebian: Said another way, when you pass the default value as a second argument, it's that *same* object for each element of the Array. When you pass the default value as a block, the evaluated block value is distinct for each element of the Array.
<mynameisdebian>
baweaver: you mean that it becomes pass by reference?
<mynameisdebian>
havenwood: same question I think
r29v has joined #ruby
<mynameisdebian>
I guess you already answered that, both of you
<havenwood>
>> a = Array.new(3, ''); a.first << 'mynameisdebian'; a
<havenwood>
mynameisdebian: Above ^, you'll see the former is one string three times, and the latter is three strings, once each.
<mynameisdebian>
Ah, give me a minute to process that plz
FernandoBasso has quit [Quit: Leaving]
<lavamind>
havenwood: I fixed my problem by installing the upstream vagrant Debian package, instead of the distribution one
<havenwood>
lavamind: ah, nice
<lavamind>
it seems the distribution package does a gem-type install, which messes up the bundle components
ramfjord has quit [Ping timeout: 260 seconds]
<havenwood>
ooooh - didn't think of that
<lavamind>
well, more like confuses
<havenwood>
i stick to the gem install variants
<havenwood>
i like to install my rubies with the package manager and my gems with ruby
<mynameisdebian>
havenwood: I must confess I'm not totally familiar with the syntax on that eval.in, but I'll try to research Array.new a little bit more. I'm going to try the solution you and baweaver posted
archedice has quit [Ping timeout: 248 seconds]
<lavamind>
the thing is with vagrant is it used to be gem-based but isn't anymore
ramfjord has joined #ruby
<havenwood>
lavamind: what is it these days?
<lavamind>
so if you install the "vagrant" gem it just puts in some kind of placeholder with a message
jabowa has joined #ruby
apparition47 has quit [Quit: Bye]
<lavamind>
havenwood: "Vagrant 1.0.x had the option to be installed as a RubyGem. This installation method is no longer supported. "
<Zarthus>
i was unaware vagrant was a gem ever at all ;D
<Zarthus>
Though in the time I used vagrant I never even used ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
apparition has joined #ruby
archedice has joined #ruby
karapetyan has joined #ruby
CrazyEddy has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
karapetyan has quit [Ping timeout: 265 seconds]
taylorzr has quit [Ping timeout: 255 seconds]
bradleyprice has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
pauliesaint has quit [Quit: pauliesaint]
<mynameisdebian>
If I have an array of Nokogiri Nodes (node_array) and a Nokogiri XML document (xml_doc), how can I replace the nodes located in xml_doc at XPath "//dict//array//string" with the XML nodes in node_array?
ramfjord has quit [Ping timeout: 256 seconds]
vondruch has quit [Ping timeout: 276 seconds]
konsolebox has quit [Ping timeout: 255 seconds]
ramfjord has joined #ruby
roamingdog has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
bradleyp_ has joined #ruby
ramfjord has joined #ruby
bradleyprice has quit [Ping timeout: 255 seconds]
Ragso has joined #ruby
<Ragso>
Hello :o
ramfjord has quit [Ping timeout: 260 seconds]
<Ragso>
Im a newbie on rails, can anyone possibly help me out with something that im stuck at?
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
AJA4350 has quit [Ping timeout: 265 seconds]
pauliesaint has joined #ruby
FrankyCyborg has quit [Quit: FrankyCyborg]
rshetty has joined #ruby
starseed0000 has joined #ruby
pauliesaint has quit [Quit: pauliesaint]
pauliesaint has joined #ruby
pauliesaint has quit [Client Quit]
rshetty has quit [Ping timeout: 240 seconds]
pauliesaint has joined #ruby
motstgo has joined #ruby
jinie has quit [Ping timeout: 265 seconds]
jinie has joined #ruby
nicht has joined #ruby
nicht has quit [Max SendQ exceeded]
mupt has quit [Ping timeout: 256 seconds]
cschneid has joined #ruby
rshetty has joined #ruby
emerson has joined #ruby
DeepIO_ has joined #ruby
DeepIO_ has quit [Max SendQ exceeded]
DeepIO_ has joined #ruby
tdy has quit [Ping timeout: 240 seconds]
DeepIO has quit [Ping timeout: 248 seconds]
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
cschneid has quit [Remote host closed the connection]
<Radar>
?rubyonrails Ragso
<ruby[bot]>
Ragso: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
AlHafoudh has quit [Ping timeout: 256 seconds]
AlHafoudh has joined #ruby
cschneid has joined #ruby
cadillac_ has quit [Quit: I quit]
cadillac_ has joined #ruby
aupadhye has joined #ruby
braincrash has quit [Quit: bye bye]
cschneid has quit [Remote host closed the connection]
rshetty has quit [Remote host closed the connection]
kvda has joined #ruby
braincrash has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
redlegion has quit [Excess Flood]
shinnya has joined #ruby
redlegion has joined #ruby
redlegion has quit [Excess Flood]
redlegion has joined #ruby
redlegion has quit [Excess Flood]
redlegion has joined #ruby
redlegion has quit [Excess Flood]
redlegion has joined #ruby
redlegion has quit [Excess Flood]
redlegion has joined #ruby
redlegion has quit [Excess Flood]
redlegion has joined #ruby
redlegion has quit [Excess Flood]
redlegion has joined #ruby
AlHafoudh has quit [Ping timeout: 240 seconds]
redlegion has quit [Excess Flood]
redlegion has joined #ruby
redlegion has quit [Excess Flood]
tdy has joined #ruby
redlegion has joined #ruby
redlegion has quit [Excess Flood]
redlegion has joined #ruby
redlegion has quit [Excess Flood]
redlegion has joined #ruby
redlegion has quit [Excess Flood]
redlegion has joined #ruby
redlegion has quit [Excess Flood]
redlegion has joined #ruby
redlegion has quit [Excess Flood]
redlegion has joined #ruby
redlegion has quit [Excess Flood]
redlegion has joined #ruby
redlegion has quit [Excess Flood]
redlegion has joined #ruby
redlegion has quit [Excess Flood]
redlegion has joined #ruby
redlegion has quit [Excess Flood]
redlegion has joined #ruby
redlegion has quit [Excess Flood]
redlegion has joined #ruby
redlegion has quit [Excess Flood]
redlegion has joined #ruby
redlegion has quit [Excess Flood]
redlegion has joined #ruby
redlegion has quit [Excess Flood]
redlegion has joined #ruby
redlegion has quit [Excess Flood]
caleBOT_ has joined #ruby
redlegion has joined #ruby
redlegion has quit [Excess Flood]
redlegion has joined #ruby
redlegion has quit [Excess Flood]
redlegion has joined #ruby
redlegion has quit [Excess Flood]
<baweaver>
!connection redlegion
jp is now known as ompboat
ompboat is now known as jp
eckhardt_ has joined #ruby
apparition has quit [Quit: Bye]
caleBOT_ has quit [Ping timeout: 264 seconds]
alex`` has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
konsolebox has joined #ruby
karapetyan has quit [Ping timeout: 240 seconds]
AlHafoudh has joined #ruby
apparition has joined #ruby
apparition has quit [Client Quit]
gix- has joined #ruby
gix has quit [Disconnected by services]
herbmillerjr has quit [Quit: Konversation terminated!]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
taylorzr has joined #ruby
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rshetty has joined #ruby
caleBOT_ has joined #ruby
rshetty has quit [Remote host closed the connection]
xuyuheng has joined #ruby
caleBOT_ has quit [Ping timeout: 248 seconds]
rshetty has joined #ruby
donofrio has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 256 seconds]
rshetty has quit [Remote host closed the connection]
pauliesaint has left #ruby [#ruby]
rshetty has joined #ruby
dreamthese has quit [Remote host closed the connection]
RougeR has quit [Ping timeout: 248 seconds]
dreamthese has joined #ruby
caleBOT has joined #ruby
wilbert_ has quit [Ping timeout: 264 seconds]
ciscam has quit [Ping timeout: 276 seconds]
ciscam has joined #ruby
Jushy has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Inline has quit [Quit: Leaving]
kvda has joined #ruby
reber has joined #ruby
pauliesaint has joined #ruby
rshetty has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
caleBOT has quit [Remote host closed the connection]
starseed0000 has quit [Ping timeout: 245 seconds]
jp is now known as mopboat
mopboat is now known as jp
jp is now known as mopboat
mopboat is now known as jp
Guest34814 has quit [Read error: Connection reset by peer]
tpendragon has quit [Remote host closed the connection]
anisha has joined #ruby
hanmac has joined #ruby
aufi has joined #ruby
AlHafoudh has quit [Ping timeout: 240 seconds]
foxxx0 has quit [Ping timeout: 264 seconds]
ohcibi has quit [Ping timeout: 240 seconds]
AlHafoudh has joined #ruby
foxxx0 has joined #ruby
ohcibi has joined #ruby
giraffe has joined #ruby
giraffe is now known as Guest56583
rshetty has joined #ruby
karapetyan has joined #ruby
tpendragon has joined #ruby
hph^ has joined #ruby
vondruch has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mynameisdebian has quit [Remote host closed the connection]
schleppel has joined #ruby
karapetyan has quit [Ping timeout: 240 seconds]
agent_white has quit [Quit: bbl]
ramfjord has joined #ruby
ramfjord has quit [Ping timeout: 256 seconds]
pauliesaint has quit [Quit: pauliesaint]
caleBOT has joined #ruby
dionysus69 has quit [Ping timeout: 276 seconds]
dionysus70 has joined #ruby
za1b1tsu has joined #ruby
dionysus70 is now known as dionysus69
pauliesaint has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
caleBOT has quit [Ping timeout: 255 seconds]
aufi has quit [Ping timeout: 240 seconds]
RougeR has joined #ruby
RougeR has quit [Changing host]
RougeR has joined #ruby
micutzu has quit [Quit: Leaving]
_rshetty_ has joined #ruby
\void has quit [Quit: So long, and thanks for all the fish.]
dviola has quit [Quit: WeeChat 2.1]
rshetty has quit [Ping timeout: 240 seconds]
SeepingN has joined #ruby
amar has joined #ruby
Tempesta has quit [Quit: AdiIRC is updating to v3.2 Beta Build (2018/06/30) 64 Bit]
Tempesta has joined #ruby
j416 has quit [Ping timeout: 248 seconds]
pauliesaint has quit [Ping timeout: 260 seconds]
alem0lars has joined #ruby
kapil___ has joined #ruby
pauliesaint has joined #ruby
conta has joined #ruby
amar has quit [Ping timeout: 248 seconds]
DTZUZO has joined #ruby
alem0lars has quit [Ping timeout: 256 seconds]
bjpenn has quit [Ping timeout: 240 seconds]
alex`` has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
konsolebox has quit [Ping timeout: 264 seconds]
konsolebox has joined #ruby
eckhard__ has joined #ruby
dionysus69 has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
pauliesaint has quit [Quit: pauliesaint]
eckhardt_ has quit [Ping timeout: 260 seconds]
crankharder has quit [Ping timeout: 268 seconds]
eckhard__ has quit [Client Quit]
crankharder has joined #ruby
feelx- has joined #ruby
konos5__ has joined #ruby
feelx has quit [Ping timeout: 260 seconds]
<konos5__>
@apeiros?
<konos5__>
r u here?
jenrzzz has quit [Ping timeout: 264 seconds]
tdy has quit [Read error: Connection reset by peer]
tdy has joined #ruby
konos5__ is now known as konos5
j416 has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
amelliaa has joined #ruby
sysvalve has joined #ruby
aufi has joined #ruby
pebble2016 has quit [Quit: Connection closed for inactivity]
cadillac_ has quit [Read error: Connection reset by peer]
rshetty has quit [Ping timeout: 276 seconds]
hfp_work has joined #ruby
mjolnird has quit [Remote host closed the connection]
mjolnird has joined #ruby
rdsm has joined #ruby
cadillac_ has joined #ruby
Crack has quit [Ping timeout: 256 seconds]
Burgestrand has quit [Quit: Closing time!]
pauliesaint has joined #ruby
wilbert_ has joined #ruby
karapetyan has joined #ruby
dionysus69 has joined #ruby
caleBOT_ has joined #ruby
mupt has joined #ruby
Burgestrand has joined #ruby
nowhere_man has joined #ruby
caleBOT_ has quit [Ping timeout: 265 seconds]
pauliesaint has quit [Remote host closed the connection]
guille-moe has quit [Quit: guille-moe]
pauliesaint has joined #ruby
Crack has joined #ruby
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
ciscam has quit [Ping timeout: 245 seconds]
ciscam has joined #ruby
addyluxe has joined #ruby
ineb has joined #ruby
<ineb>
is there a name for software tests that go against real-world systems? for example if i write an image-uploader to imgur and finally want to test if a real world upload really works.
<ineb>
of course these tests can fail if imgur changes anything server-side
<havenwood>
ineb: end-to-end?
<havenwood>
ineb: i dunno
<ineb>
both, unit- and integrationtests dont cover this
mzo has quit [Ping timeout: 248 seconds]
<havenwood>
HIT_REAL_APIS=1 rake
<havenwood>
ineb: i can't think of anything fancy to call it
wilbert_ has quit [Quit: wilbert_]
<ineb>
i was thinking of a separate test suite for those tests but then i thought that these kinds of test shouldnt be included in the gem at all
wilbert has joined #ruby
nowhere_man has quit [Ping timeout: 256 seconds]
<ineb>
maybe a spearate project that includes my gem as depency and test things.
<havenwood>
ineb: i've put that sort of test behind an env var before, just for convenience - but it's a good question, what best practices are in handling those real API integration sanity checks
<havenwood>
it might be a nice thing to leave to the CI to do
<havenwood>
ineb: it's interesting how many projects have tests that break when you disable WiFi ;-)
kapil___ has quit [Quit: Connection closed for inactivity]
BloopMonster has quit [Ping timeout: 265 seconds]
<ineb>
iam having this issue on another front aswell. i wrote a gem which can alter GPU settings. like voltage and clocks. all tests are mocked but at some point i want to try if my code really works at altering the settings of my GPU ^^
<Bish>
i don't thing equality works on compiled bytecode
<Bish>
think*
<havenwood>
Bish: it's just an Array
<Bish>
oh, you made .to_a
<havenwood>
Bish: i didn't visually spot the difference
<havenwood>
:flag=>20 versus :flag=>28
Rapture has joined #ruby
<ineb>
i tried Ripper to get an AST but **{} looks the same as **Hash.new
<havenwood>
:orig_argc=>0
<havenwood>
Bish: yeah, something already funky in the parser pre-2.5 became a segfault in 2.5
Asher has quit [Ping timeout: 276 seconds]
Mike11 has joined #ruby
strmpnk has joined #ruby
<havenwood>
Bish: works fine (in that it bugs and doesn't pring) with parens: p(**{})
<havenwood>
Any method triggers the segfault as well.
<havenwood>
Integer **{} #!> Blarg!
Zaab1t has quit [Quit: Zaab1t]
<ineb>
havenwood: how to debug that from here on? RubyVM::InstructionSequence.compile('p **{}') crashes ofc
<havenwood>
ineb: ruby -yydebug -e "p **{}"
<havenwood>
ineb: ^ to find the line of parse.y where it's borking
jinie has quit [Ping timeout: 248 seconds]
<havenwood>
"Reducing stack by rule 62 (line 1671)"
jinie has joined #ruby
<havenwood>
well, that's just where it's ending up
<havenwood>
-e:2: warning: `**' interpreted as argument prefix
Asher has joined #ruby
Asher has quit [Ping timeout: 240 seconds]
<ineb>
i see that warning on working code aswell
<ineb>
maybe after Shifting token '}' i see $2 = nterm assoc_list (2.5-2.5: ) at the failing code and $3 = nterm brace_body (2.2-2.3: ) when its a working hash
<ineb>
but i dont really understand anything
alem0lars has joined #ruby
dionysus69 has quit [Ping timeout: 245 seconds]
<ineb>
nah scratch that.
nowhereman_ has joined #ruby
nowhere_man has quit [Ping timeout: 276 seconds]
karapetyan has quit [Remote host closed the connection]
rain1 has joined #ruby
<rain1>
hiya
<rain1>
im learning to use nokogiri to get some data off a web page! I wanted to ask advice
anisha has quit [Quit: This computer has gone to sleep]
greengriminal has joined #ruby
grilix has joined #ruby
<greengriminal>
Hey all quick question, I know that in Ruby 2.4 changes were made to how rounding works and I know that you can now pass optional params such as `half: :even`
<greengriminal>
Now previously in 2.3 I could do: (0.99 + (1.0 * 0.025)).round(2) which would give me 1.01. now in ruby 2.4 the same calculation is giving 1.02.
amar_ has quit [Ping timeout: 245 seconds]
RougeR has quit [Ping timeout: 260 seconds]
<greengriminal>
Using `round(half: :down)` or `round(half: :up)` doesn't appear to be working.
<greengriminal>
Am I missing something fundamental here?
aufi has quit [Quit: Leaving]
rshetty has joined #ruby
rouget430__ is now known as RougeR
RougeR has quit [Changing host]
RougeR has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
naftilos76 has joined #ruby
clemens3 has quit [Ping timeout: 240 seconds]
sysvalve has quit [Quit: Leaving]
caleBOT_ has quit [Remote host closed the connection]
amar_ has joined #ruby
Es0teric has joined #ruby
graphene has quit [Read error: Connection reset by peer]
RougeT430 has joined #ruby
cthulchu has joined #ruby
graphene has joined #ruby
<apeiros>
greengriminal: uh, no? (0.99 + (1.0 * 0.025)).round(2) gives 1.02 in 2.3 too
<apeiros>
not that the `1.0 *` part would do anything…
<apeiros>
it is interesting that this results in 1.02, though, given that it's 1.0149999999999999023003738329862244427204132080078125.round(2)
<apeiros>
yeah, given that somebody else confirmed, I already believed you.
[Butch] has joined #ruby
<apeiros>
the next older than 2.3.5 I have is 2.2.3, and there I get 1.01 too.
<cthulchu>
do we have actual developers of the language around in freenode?
<cthulchu>
hi
<greengriminal>
my team are trying to upgrade to a rails proj to use 2.5.0 and as a result we have some failing spec which relates back to the rounding changes that were introduced in 2.4
dionysus69 has joined #ruby
<apeiros>
given that 1.015 itself is the same approximation, this might well be due to handling such deviations.
mtkd has joined #ruby
DTZUZU has quit [Read error: Connection reset by peer]
caleBOT has joined #ruby
dionysus70 has joined #ruby
mynameisdebian has quit [Remote host closed the connection]
<apeiros>
(almost certainly is)
mynameisdebian has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
dionysus70 is now known as dionysus69
DTZUZU has joined #ruby
bjpenn has joined #ruby
bradleyp_ has quit [Remote host closed the connection]
Beams has quit [Quit: .]
<havenwood>
cthulchu: yeah, there are several implementers from various Ruby engines around. why do you ask?
<cthulchu>
purely out of curiosity.
taylorzr has joined #ruby
<cthulchu>
I actually am trying to make rubocop work. it seems like it uses Ruby 2.1 parser while I use Ruby 2.2
<cthulchu>
so it highlights errors that are not errors
foxxx0_ is now known as _foxxx0_
foxxx0 is now known as foxxx0_
_foxxx0_ is now known as foxxx0
quobo has quit [Quit: Connection closed for inactivity]
<havenwood>
cthulchu: did you install rubocop with Ruby 2.2?
<cthulchu>
no
<havenwood>
cthulchu: do that
<cthulchu>
it's installed as an extention to VS Code
<cthulchu>
maybe I'll find something for pastebin or alike
<cthulchu>
I don't like gist
<havenwood>
Just stop with the images!
<cthulchu>
:)
<konsolebox>
greengriminal: reading this thread, it seems like rounding .5 up was the default, changed, and then reverted back. https://bugs.ruby-lang.org/issues/12958
claudiuinberlin has joined #ruby
dgaff has joined #ruby
<dgaff>
Hey all - I'm gettin re-acquainted with rspec and I'm writing lots of tests that look like so: expect(SomeClass.run.keys.collect(&:class).uniq).to eq([String]) - in effect, I'm checking to see if the structure of the returned output looks like it ought to (in this case, a hash with exclusively string keys) - is there a more idiomatic way to do this?
rippa has joined #ruby
bradleyprice has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
karapetyan has quit [Remote host closed the connection]
mynameisdebian has joined #ruby
karapetyan has joined #ruby
millerti has quit [Ping timeout: 264 seconds]
yohji has quit [Remote host closed the connection]
Mike11 has quit [Quit: Leaving.]
caleBOT__ has joined #ruby
jraavis has joined #ruby
akaiiro has joined #ruby
<cthulchu>
hell this is too difficult
<cthulchu>
configuring rubocop
<cthulchu>
what an uncomfortable thing
jraavis has quit [Client Quit]
jraavis has joined #ruby
<greengriminal>
Thanks konsolebox so with that said I should be using BigDecimal instead of a Float ?
caleBOT has quit [Ping timeout: 260 seconds]
<apeiros>
greengriminal: you should always use BigDecimal or Rational if you care about precision.
mupt has joined #ruby
<konsolebox>
greengriminal: you have to check the last part of the thread
<greengriminal>
Yeah I was taking a thorough read through of that read just now
donofrio has joined #ruby
jraavis has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
amar_ has quit [Remote host closed the connection]
jrafanie has joined #ruby
amar_ has joined #ruby
fuxx has joined #ruby
fuxx is now known as Guest48266
amar_ has quit [Ping timeout: 248 seconds]
dionysus69 has joined #ruby
xuyuheng has joined #ruby
Tempesta has joined #ruby
ellcs has joined #ruby
herbmillerjr has joined #ruby
xuyuheng has quit [Ping timeout: 240 seconds]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoul_ has quit [Remote host closed the connection]
noobineer has quit [Read error: Connection reset by peer]
chouhoulis has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
Tempesta has quit [Quit: See ya!]
greengriminal has quit [Quit: This computer has gone to sleep]
Tempesta has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wilbert has quit [Ping timeout: 240 seconds]
GodFather has joined #ruby
noobineer has joined #ruby
cow[home] has quit [Quit: WeeChat 2.1]
jamesaxl has joined #ruby
Eiam has joined #ruby
orbyt_ has joined #ruby
greengriminal has joined #ruby
claudiuinberlin has joined #ruby
greengriminal has quit [Client Quit]
greengriminal has joined #ruby
vindvaki has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mupt has quit [Ping timeout: 256 seconds]
SeepingN has joined #ruby
noobineer has quit [Ping timeout: 265 seconds]
bak1an has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
NingaLeaf has joined #ruby
greengriminal has quit [Quit: This computer has gone to sleep]
xuyuheng has joined #ruby
alem0lars has quit [Ping timeout: 255 seconds]
greengriminal has joined #ruby
dgaff has quit [Ping timeout: 264 seconds]
yokel has quit [Remote host closed the connection]
rippa has quit [Read error: Connection reset by peer]
chouhoul_ has joined #ruby
xuyuheng has quit [Ping timeout: 248 seconds]
yokel has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
shinnya has joined #ruby
bradleyp_ has joined #ruby
floHH has joined #ruby
bradleyprice has quit [Ping timeout: 260 seconds]
tag has joined #ruby
<floHH>
Hi, I`m a student from Germany and in serious trouble with my exam exercises, is there anyone who can help ? The task is written in german... we find an agreement for your effort =)
<Zarthus>
we're not going to write your exam for you.
<floHH>
and if I pay ?
<Zarthus>
that's still unethical
<Zarthus>
if you're not competent enough to pass the exam, you should have studied better.
NingaLeaf has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<floHH>
ya most of ppl act that way
<floHH>
had not enough time (child,work,..) and next semester we dont continue with ruby
mupt has joined #ruby
<havenwood>
floHH: If you're allowed to get help, post a gist of what you've tried so far and the trouble you're having.
zachk has joined #ruby
zachk has joined #ruby
rshetty has joined #ruby
Crack has quit [Ping timeout: 256 seconds]
xuyuheng has joined #ruby
<floHH>
it is definetly not forbidden, the code was put online by the prof
tolerablyjake has joined #ruby
tty has joined #ruby
<elomatreb>
Generally getting a specific solution from other people will be considered plagiarism
jenrzzz has quit [Ping timeout: 245 seconds]
rshetty has quit [Ping timeout: 240 seconds]
xuyuheng has quit [Ping timeout: 265 seconds]
kapil___ has quit [Quit: Connection closed for inactivity]
<eam>
if you're getting specific answers for your job though, that's fine
mupt has quit [Ping timeout: 260 seconds]
reber has quit [Remote host closed the connection]
nahra has joined #ruby
mupt has joined #ruby
dkmueller has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
roamingdog has quit [Remote host closed the connection]
mjolnird has quit [Quit: Leaving]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
xuyuheng has joined #ruby
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
Es0teric has joined #ruby
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
biberu has quit []
conta has quit [Quit: conta]
xuyuheng has quit [Ping timeout: 268 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
NingaLeaf has joined #ruby
mupt has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
mupt has joined #ruby
raynold has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 248 seconds]
Crack has joined #ruby
xuyuheng has joined #ruby
graphene has quit [Read error: Connection reset by peer]
graphene has joined #ruby
MagePsycho_ has quit [Quit: MagePsycho_]
chouhoul_ has quit [Remote host closed the connection]
xuyuheng has quit [Ping timeout: 240 seconds]
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoulis has joined #ruby
mupt has quit [Ping timeout: 256 seconds]
alem0lars has joined #ruby
orbyt_ has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
<Eiam>
eam: hey now, I donate to the open source communities when they help me for my job! ;)
<Eiam>
I'd give the code back, if I was allowed to do so!
<cthulchu>
suddenly my color coding stopped working
<cthulchu>
weird
<cthulchu>
what's wrong with this: \e[1m\e[43m>>>Analytics testing is in progress:\e[0m
floHH has quit []
<SeepingN>
it's hard to read? ;)
<SeepingN>
(I get white on mustard. black text would be nice perhaps)
* SeepingN
blames yhour TERM
jcalla has quit [Quit: Leaving]
<Eiam>
I see \ e [ 1 m \ e [ 43 ,
grilix has quit [Ping timeout: 240 seconds]
bak1an has joined #ruby
graphene has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 255 seconds]
leitz has quit [Quit: Nappy time]
graphene has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
dkmueller has quit [Quit: Konversation terminated!]
ldnunes has quit [Quit: Leaving]
xuyuheng has joined #ruby
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tolerablyjake has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
sagax has quit [Quit: Konversation terminated!]
moei has quit [Quit: Leaving...]
xuyuheng has quit [Ping timeout: 264 seconds]
r29v has joined #ruby
mtkd has joined #ruby
caleBOT__ has quit [Remote host closed the connection]
caleBOT has joined #ruby
graphene has quit [Remote host closed the connection]
<headius>
I'd be interested in a follow-up post showing your results
<havenwood>
this xxhash library uses class variables in place of constants - i'd not be surprised if there's lots of room to optimize
<headius>
oh jeez, yeah
<headius>
class vars are dirt stupid in JRuby now
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
<headius>
I don't know what TR does for class vars
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
<headius>
yeah looks like TR does optimize class vaes
<headius>
so there's an opportunity
<headius>
I know how to do it, I just hate class vars :-)
<havenwood>
headius: I hate them too!
<havenwood>
headius: That's a great read. Thanks for the article!
alem0lars has quit [Ping timeout: 276 seconds]
<headius>
sure, hopefully more to come as I explore this stuff
ellcs has quit [Ping timeout: 255 seconds]
megamos has quit [Ping timeout: 264 seconds]
xuyuheng has joined #ruby
sameerynho has quit [Ping timeout: 256 seconds]
xuyuheng has quit [Ping timeout: 248 seconds]
<cthulchu>
why do we need the final newline?
grilix has joined #ruby
caleBOT has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
\void is now known as nanomustdie
nowhereman_ has quit [Ping timeout: 256 seconds]
nanomustdie is now known as \void
<elomatreb>
cthulchu: At the end of source files? It's an old convention from Unix, so that you could print the file to the terminal and it wouldn't mess up your prompt
caleBOT has quit [Ping timeout: 240 seconds]
desperek has quit [Quit: xoxo]
znz_jp has quit [Remote host closed the connection]
<headius>
I used to hate final newline until I realized that version control is way cleaner that way
<headius>
you add a new line it's only a single +, rather than a - and a +
moei has joined #ruby
<elomatreb>
That too, yeah
<eam>
I like to add two of three of 'em
caleBOT_ has joined #ruby
znz_jp has joined #ruby
<headius>
eam: just to make sure
<headius>
if one's good, two is better
<eam>
space is cheap don'tcha know
<elomatreb>
You'll exhaust the Strategic Newline Reserve
<SeepingN>
and wc -l works better
<eam>
we are making the things by the dozen over here
xuyuheng has joined #ruby
caleBOT has joined #ruby
psychicist__ has quit [Ping timeout: 248 seconds]
mynameisdebian has quit [Remote host closed the connection]
<Eiam>
I like to tease new hires about running out of bug numbers, create a bunch of bugs then don't save them, the numbers are lost to history forever! we will run out some day
mynameisdebian has joined #ruby
<cthulchu>
elomatreb, ha! very cool, thanks!
<Eiam>
the good news is once we run out of numbers for new bugs, we will just cease to find or fix bugs and everyone will eventually accept their bug ridden reality. But it'll never get worse!
caleBOT_ has quit [Ping timeout: 256 seconds]
xuyuheng has quit [Ping timeout: 264 seconds]
nowhereman_ has joined #ruby
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
kvda has joined #ruby
<elomatreb>
Give each issue a UUID
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<headius>
give each issue a 4096-bit RSA key to be sure
orbyt_ has joined #ruby
grilix has quit [Remote host closed the connection]
xuyuheng has joined #ruby
karapetyan has quit [Remote host closed the connection]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xuyuheng has quit [Ping timeout: 256 seconds]
wilbert has joined #ruby
caleBOT has quit [Remote host closed the connection]
caleBOT_ has joined #ruby
<eam>
after you run out of bug numbers how will you track fixing it?
jamesaxl has quit [Quit: WeeChat 2.1]
johnny56 has joined #ruby
<SeepingN>
a new instance
zapata has quit [Ping timeout: 256 seconds]
r29v has quit [Quit: r29v]
kvda has joined #ruby
kvda has quit [Client Quit]
mynameisdebian has quit [Remote host closed the connection]
cagomez has quit [Remote host closed the connection]
caleBOT_ has quit [Ping timeout: 265 seconds]
bjpenn has quit [Ping timeout: 248 seconds]
dbugger_ has quit [Remote host closed the connection]
wilbert has quit [Ping timeout: 240 seconds]
xuyuheng has joined #ruby
xuyuheng has quit [Ping timeout: 240 seconds]
lytol has quit [Remote host closed the connection]
zapata has joined #ruby
blackmesa has joined #ruby
cagomez has joined #ruby
xuyuheng has joined #ruby
r29v has joined #ruby
greengriminal has quit [Quit: Leaving]
xuyuheng has quit [Ping timeout: 260 seconds]
caleBOT_ has joined #ruby
jrafanie has joined #ruby
roamingdog has quit [Remote host closed the connection]
nicht has joined #ruby
nicht has quit [Remote host closed the connection]
mynameisdebian has joined #ruby
caleBOT_ has quit [Remote host closed the connection]
nicht has joined #ruby
caleBOT_ has joined #ruby
mupt has joined #ruby
blackmesa has quit [Ping timeout: 256 seconds]
blackmesa1 has joined #ruby
mynameisdebian has quit [Ping timeout: 245 seconds]
mynameisdebian has joined #ruby
nicht has quit [Remote host closed the connection]
xuyuheng has joined #ruby
nicht has joined #ruby
nicht has quit [Max SendQ exceeded]
graphene has quit [Remote host closed the connection]
nicht has joined #ruby
graphene has joined #ruby
karapetyan has joined #ruby
darkhanb has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]