dockimbel on master
FEAT: enables the experimental … (compare)
dockimbel on master
TESTS: extra tests for `constru… (compare)
""
vs {}
came up not long ago. It's Rebol's design, and confuses people. Beyond 50 chars the runtime molds strings with {}
instead of ""
. If, for example, truncated console output always added a closing }
that would be useful, because you could persist console sessions.
Object help alignment looks like a bug/regression. @bitbegin, I hate to say it, but it was your recent help changes that caused it.
why default mode returns block, whereas load-csv/header returns a map?
The rationale here is that /header
means it should be used, not just that it exists. If you want the default format, and to separate the header, we (you? ;^) can add an example like this to the wiki page:
>> s: {a,b,c^/1,2,3^/4,5,6}
== "a,b,c^/1,2,3^/4,5,6"
>> data: load-csv s
== [["a" "b" "c"] ["1" "2" "3"] ["4" "5" "6"]]
>> hdr: take data
== ["a" "b" "c"]
>> data
== [["1" "2" "3"] ["4" "5" "6"]]
`data: read/lines %file.csv
, remove first data
if there is header present ... and then finally the loop foreach row data [items: parse/all data ";" ....]
.... done ....
The truth is that I never faced other delimiter than semicolon.
CSV is comma separated values, so comma is used as default separator. Anyway, loading data with semicolon should be as easy as load-csv/with data #";"
. If it doesn't work, there may be a bug. We have tests for it, but I could have overlooked something, that's possible.
>> load-csv/with {a;b;c^/1;2;3^/4;5;6} #";"
== [["a" "b" "c"] ["1" "2" "3"] ["4" "5" "6"]]
Anyway, what you describe parse data #";"
is simply not enough, you were lucky if it worked always for you, or you had used very simple data.
>> to-csv/with [["@pekr" {convert this ; with your "parse loop"}]["@pekr" "I think it won't work"]] #";"
== {@pekr;"convert this ; with your ""parse loop"""^/@pekr;"I think it won't work"^/}
>> data: load-csv/with ";" "12345;Krenzelok;Petr;;19.12.2018;;19.12.2018;19.12.2018;"
== [[""]]
>> data: load-csv/with #";" "12345;Krenzelok;Petr;;19.12.2018;;19.12.2018;19.12.2018;"
*** Script Error: load-csv does not allow char! for its data argument
*** Where: load-csv
*** Stack: load-csv
Hi, RED consolle is totally hung trying to execute the following code:
probe bookmark-source: to-file "/C/Users/mybook/AppData/Local/Google/Chrome/user data/Default/Bookmarks"
probe read bookmark-source
halt
My bookmark file is big, about 65.500 entries
Well, I have changed the code to experiment.
I read different webpages and the GUI is not updated until the last network read. Instead ist should output at each read round.
sites: [
http://www.repubblica.it
http://www.virgilio.it/
http://www.slashdot.org
]
forall sites [
counter: 0
until [
counter: counter + 1
page: first sites
page-text: attempt [read page]
either not none? page-text [success: true] [success: false]
print ["page: " page " counter: " counter " Success: " success]
; probe page-text
counter > 1
]
]
Is it normal ? Should I report it to the BUG section ?