{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/17694","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/17694/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/17694/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/17694/events","html_url":"https://github.com/JuliaLang/julia/issues/17694","id":168258441,"number":17694,"title":"Need a way to convert SubString{String} to Char","user":{"login":"pranavtbhat","id":6998059,"avatar_url":"https://avatars.githubusercontent.com/u/6998059?v=3","gravatar_id":"","url":"https://api.github.com/users/pranavtbhat","html_url":"https://github.com/pranavtbhat","followers_url":"https://api.github.com/users/pranavtbhat/followers","following_url":"https://api.github.com/users/pranavtbhat/following{/other_user}","gists_url":"https://api.github.com/users/pranavtbhat/gists{/gist_id}","starred_url":"https://api.github.com/users/pranavtbhat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pranavtbhat/subscriptions","organizations_url":"https://api.github.com/users/pranavtbhat/orgs","repos_url":"https://api.github.com/users/pranavtbhat/repos","events_url":"https://api.github.com/users/pranavtbhat/events{/privacy}","received_events_url":"https://api.github.com/users/pranavtbhat/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JuliaLang/julia/labels/intro%20issue","name":"intro issue","color":"0052cc"},{"url":"https://api.github.com/repos/JuliaLang/julia/labels/strings","name":"strings","color":"006b75"},{"url":"https://api.github.com/repos/JuliaLang/julia/labels/up%20for%20grabs","name":"up for grabs","color":"0b02e1"}],"state":"open","locked":false,"assignee":{"login":"StefanKarpinski","id":153596,"avatar_url":"https://avatars.githubusercontent.com/u/153596?v=3","gravatar_id":"","url":"https://api.github.com/users/StefanKarpinski","html_url":"https://github.com/StefanKarpinski","followers_url":"https://api.github.com/users/StefanKarpinski/followers","following_url":"https://api.github.com/users/StefanKarpinski/following{/other_user}","gists_url":"https://api.github.com/users/StefanKarpinski/gists{/gist_id}","starred_url":"https://api.github.com/users/StefanKarpinski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefanKarpinski/subscriptions","organizations_url":"https://api.github.com/users/StefanKarpinski/orgs","repos_url":"https://api.github.com/users/StefanKarpinski/repos","events_url":"https://api.github.com/users/StefanKarpinski/events{/privacy}","received_events_url":"https://api.github.com/users/StefanKarpinski/received_events","type":"User","site_admin":false},"assignees":[{"login":"StefanKarpinski","id":153596,"avatar_url":"https://avatars.githubusercontent.com/u/153596?v=3","gravatar_id":"","url":"https://api.github.com/users/StefanKarpinski","html_url":"https://github.com/StefanKarpinski","followers_url":"https://api.github.com/users/StefanKarpinski/followers","following_url":"https://api.github.com/users/StefanKarpinski/following{/other_user}","gists_url":"https://api.github.com/users/StefanKarpinski/gists{/gist_id}","starred_url":"https://api.github.com/users/StefanKarpinski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefanKarpinski/subscriptions","organizations_url":"https://api.github.com/users/StefanKarpinski/orgs","repos_url":"https://api.github.com/users/StefanKarpinski/repos","events_url":"https://api.github.com/users/StefanKarpinski/events{/privacy}","received_events_url":"https://api.github.com/users/StefanKarpinski/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/JuliaLang/julia/milestones/20","html_url":"https://github.com/JuliaLang/julia/milestones/0.6.0","labels_url":"https://api.github.com/repos/JuliaLang/julia/milestones/20/labels","id":1298021,"number":20,"title":"0.6.0","description":"","creator":{"login":"JeffBezanson","id":744556,"avatar_url":"https://avatars.githubusercontent.com/u/744556?v=3","gravatar_id":"","url":"https://api.github.com/users/JeffBezanson","html_url":"https://github.com/JeffBezanson","followers_url":"https://api.github.com/users/JeffBezanson/followers","following_url":"https://api.github.com/users/JeffBezanson/following{/other_user}","gists_url":"https://api.github.com/users/JeffBezanson/gists{/gist_id}","starred_url":"https://api.github.com/users/JeffBezanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeffBezanson/subscriptions","organizations_url":"https://api.github.com/users/JeffBezanson/orgs","repos_url":"https://api.github.com/users/JeffBezanson/repos","events_url":"https://api.github.com/users/JeffBezanson/events{/privacy}","received_events_url":"https://api.github.com/users/JeffBezanson/received_events","type":"User","site_admin":false},"open_issues":198,"closed_issues":19,"state":"open","created_at":"2015-09-09T16:35:16Z","updated_at":"2016-09-14T16:45:34Z","due_on":"2016-10-01T04:00:00Z","closed_at":null},"comments":4,"created_at":"2016-07-29T06:20:23Z","updated_at":"2016-09-15T02:18:38Z","closed_at":null,"body":"```julia\r\narr = hcat(rand(Char, 10), rand(Int, 10))\r\nwritecsv(\"test.txt\", arr)\r\n\r\nmx = readcsv(\"test.txt\")\r\ncollect(Char, mx[:,1])\r\n\r\n# ERROR: MethodError: Cannot `convert` an object of type SubString{String} to an object of type # Char\r\n# This may have arisen from a call to the constructor Char(...),\r\n# since type constructors fall back to convert methods.\r\n# in copy!(::Base.LinearFast, ::Array{Char,2}, ::Base.LinearFast, ::Array{Any,2}) at #./abstractarray.jl:412\r\n#  in collect(::Type{Char}, ::Array{Any,2}) at ./array.jl:209\r\n# in eval(::Module, ::Any) at ./boot.jl:234\r\n#  in macro expansion at ./REPL.jl:92 [inlined]\r\n#  in (::Base.REPL.##1#2{Base.REPL.REPLBackend})() at ./event.jl:46\r\n\r\n```\r\n\r\nSince `arr` isn't homogenous, I can't do `readcsv(\"test.txt\", Char)`\r\n\r\nI think the simplest thing to do would be\r\n```juila\r\nChar(x::Substring{String}) = x[1]\r\n```"},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/247214699","html_url":"https://github.com/JuliaLang/julia/issues/17694#issuecomment-247214699","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/17694","id":247214699,"user":{"login":"tkelman","id":5934628,"avatar_url":"https://avatars.githubusercontent.com/u/5934628?v=3","gravatar_id":"","url":"https://api.github.com/users/tkelman","html_url":"https://github.com/tkelman","followers_url":"https://api.github.com/users/tkelman/followers","following_url":"https://api.github.com/users/tkelman/following{/other_user}","gists_url":"https://api.github.com/users/tkelman/gists{/gist_id}","starred_url":"https://api.github.com/users/tkelman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkelman/subscriptions","organizations_url":"https://api.github.com/users/tkelman/orgs","repos_url":"https://api.github.com/users/tkelman/repos","events_url":"https://api.github.com/users/tkelman/events{/privacy}","received_events_url":"https://api.github.com/users/tkelman/received_events","type":"User","site_admin":false},"created_at":"2016-09-15T02:18:38Z","updated_at":"2016-09-15T02:18:38Z","body":"That would be like converting between a scalar and an iterable, which we don't usually allow with numbers and tuples or arrays."}}
{"actor":{"display_login":"tkelman"}}