[#79440] [Ruby trunk Bug#13188] Reinitialize Ruby VM. — shyouhei@...
SXNzdWUgIzEzMTg4IGhhcyBiZWVuIHVwZGF0ZWQgYnkgU2h5b3VoZWkgVXJhYmUuCgoKTWFydGlu
6 messages
2017/02/06
[#79441] Re: [Ruby trunk Bug#13188] Reinitialize Ruby VM.
— SASADA Koichi <ko1@...>
2017/02/06
On 2017/02/06 10:10, shyouhei@ruby-lang.org wrote:
[#79532] Immutable Strings vs Symbols — Daniel Ferreira <subtileos@...>
Hi,
15 messages
2017/02/15
[#79541] Re: Immutable Strings vs Symbols
— Rodrigo Rosenfeld Rosas <rr.rosas@...>
2017/02/15
Em 15-02-2017 05:05, Daniel Ferreira escreveu:
[#79543] Re: Immutable Strings vs Symbols
— Daniel Ferreira <subtileos@...>
2017/02/16
Hi Rodrigo,
[#79560] Re: Immutable Strings vs Symbols
— Rodrigo Rosenfeld Rosas <rr.rosas@...>
2017/02/16
Em 15-02-2017 22:39, Daniel Ferreira escreveu:
[ruby-core:79622] [Ruby trunk Misc#13230] Better Do ... while structure
From:
nobu@...
Date:
2017-02-20 05:35:05 UTC
List:
ruby-core #79622
Issue #13230 has been updated by Nobuyoshi Nakada.
Probably it equals:
```cpp
unsigned b=0;
do {
cout<<a[b];
if (!(++b<10)) break;
cout<<',';
} while (1);
```
or
```cpp
for (unsigned b=0; cout<<a[b], (++b<10);) {
cout<<',';
}
```
If it were in Ruby:
```ruby
b = 0
while true
STDOUT << a[b]
break unless (b += 1) < 10
STDOUT << ','
end
```
```ruby
b = 0
while (STDOUT << a[b]; (b += 1) < 10)
STDOUT << ','
end
```
```ruby
b = 0
while begin
STDOUT << a[b]
(b += 1) < 10
end
STDOUT << ','
end
```
----------------------------------------
Misc #13230: Better Do ... while structure
https://bugs.ruby-lang.org/issues/13230#change-63044
* Author: Jabari Zakiya
* Status: Feedback
* Priority: Normal
* Assignee:
----------------------------------------
I just saw this, and thought I'd pass it along.
http://ncomputers.org/suggestions/do%20while.cpp
```
Do ... while structure improvement
Sometimes the use of jumps such as: continue, break, goto, call to a function, etc. is necessary to avoid the execution of some instructions.
This is the case of the seed, warp and swap loops of this solution for the n queens problem.
To avoid the use of jumps or tricks like for(;;) if(condition)break; on some of these cases, we are suggesting the below improvement to the do ... while loop str
/* author: ncomputers.org */
int main(){
// Allow initializers (extra improvement)
do(bool condition=0){
// Block A
}while(condition){
// Block B
// Variables declared inside the initializer still visible
}
return 0;
}
```
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>