General

Profile

stiuna (Juan Gregorio)

  • Login: stiuna
  • Email: cart4for1@mail.com
  • Registered on: 10/21/2019
  • Last sign in: 04/26/2021

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 1 4 5

Activity

03/27/2021

11:36 AM Ruby Misc #17751: Do these instructions (<<,+,[0..n]) modify the original string without creating copies?
I was looking for a FAQ on the site to see if it was allowed to open topics not related to bugs or improvements but I didn't find anything.
And about manipulating bits in a file I meant it literally, it's just as I said above, I thin...
stiuna (Juan Gregorio)
08:45 AM Ruby Misc #17751: Do these instructions (<<,+,[0..n]) modify the original string without creating copies?
@xtkoba
Hey thanks, your code gave me a great idea, with some modifications I can do what I needed. Very helpful.
*(Just in case the '_writeSince_' thing is still an open question, hopefully someone can help with that).*
stiuna (Juan Gregorio)
07:45 AM Ruby Misc #17751: Do these instructions (<<,+,[0..n]) modify the original string without creating copies?
xtkoba (Tee KOBAYASHI) wrote in #note-3:
> I would not even concatenate any strings and would `push` them to an array, as if they were immutable (like in Go language for example).
But in the end that information will have to be writt...
stiuna (Juan Gregorio)

03/26/2021

10:34 PM Ruby Misc #17751: Do these instructions (<<,+,[0..n]) modify the original string without creating copies?
@xtkoba
But use this:
``` ruby
# [header, str]
data = ["", ""]
data[1] << "some data"
```
Or this:
``` ruby
data = {:header => "", :str => ""}
data[:str] << "some data"
```
Isn't this slower than just using a string directly?
`...
stiuna (Juan Gregorio)
09:22 AM Ruby Misc #17751 (Closed): Do these instructions (<<,+,[0..n]) modify the original string without creating copies?
In my program a string increases considerably in size inside a loop, at the end of that loop a header is created that will have to go to the beginning of that string.
During the whole loop:
``` ruby
str << "some data"
```
At...
stiuna (Juan Gregorio)

03/06/2021

12:04 AM Ruby Bug #17673: sysseek(0) and '1A' in header return "EOFError (end of file reached)"
Right, that solved it, the Ruby documentation should specify that. Ok, thanks. stiuna (Juan Gregorio)

03/05/2021

11:39 PM Ruby Bug #17673: sysseek(0) and '1A' in header return "EOFError (end of file reached)"
Aaah! I don't know if it matters but I use Windows, did you run it on Linux all of a sudden? stiuna (Juan Gregorio)
11:28 PM Ruby Bug #17673: sysseek(0) and '1A' in header return "EOFError (end of file reached)"
Can you try on a different machine to check if this is a local problem?
Unfortunately I don't have another computer to test the bug with, what version of ruby do you use?
stiuna (Juan Gregorio)
11:03 PM Ruby Bug #17673 (Closed): sysseek(0) and '1A' in header return "EOFError (end of file reached)"

The first byte of my file starts with the value **'1A'** .
Then:
``` ruby
descriptor = IO.sysopen(filePath)
file2Read = IO.new(descriptor)
file2Read.sysseek(0)
p file2Read.sysread(2).unpack('H*')
#=> "EOFError (end of file r...
stiuna (Juan Gregorio)

12/09/2019

06:55 AM Ruby Misc #16396: What is the reason for this behaviour of Find.find?
> pp Dir['/tmp/**/**/']
Hello, I loved your alternative, from now on I'll use Dir.
Regarding the "bug" of Find I think I can prove it one of these days I report it.
stiuna (Juan Gregorio)

Also available in: Atom