Julia Juno Jupyter part1 [無断転載禁止]©2ch.net (745レス)
Julia Juno Jupyter part1 [無断転載禁止]©2ch.net http://mevius.5ch.net/test/read.cgi/tech/1455271513/
上
下
前次
1-
新
通常表示
512バイト分割
レス栞
抽出解除
必死チェッカー(本家)
(べ)
自ID
レス栞
あぼーん
リロード規制
です。10分ほどで解除するので、
他のブラウザ
へ避難してください。
21: デフォルトの名無しさん [] 2016/02/15(月) 10:16:09.06 ID:TvNTryet コンパイル中のエラーよりも実行時の型エラーの方が厄介な言語だなこいつは。 慣れれば問題ないが。 http://mevius.5ch.net/test/read.cgi/tech/1455271513/21
22: デフォルトの名無しさん [] 2016/02/15(月) 10:20:41.18 ID:TvNTryet >>13 非推奨っぽいが、 これでいいらしい。 "AaBb\\".data 代入も出来るようだ。 s = "AaBb\\" s.data[2] = UInt8(64) s http://mevius.5ch.net/test/read.cgi/tech/1455271513/22
23: デフォルトの名無しさん [] 2016/02/15(月) 10:21:13.05 ID:TvNTryet これは割りと嬉しいかも。 julia> @sprintf "ab [%7s]" "xあx" "ab [ xあx]" julia> @sprintf "ab [%-7s]" "xあx" "ab [xあx ]" julia> @sprintf "ab [%7s]" "xxx" "ab [ xxx]" julia> @sprintf "ab [%-7s]" "xxx" "ab [xxx ]" http://mevius.5ch.net/test/read.cgi/tech/1455271513/23
24: デフォルトの名無しさん [] 2016/02/15(月) 10:31:07.93 ID:TvNTryet うむむ julia> @sprintf "ab [%-7s]" bytestring(hex2bytes("")) "ab [ ]" julia> @sprintf "ab [%-7s]" bytestring(hex2bytes("4141E381824141")) "ab [AAあAA ]" julia> @sprintf "ab [%-7s]" bytestring(hex2bytes("4141E981824141")) "ab [AA遂AA ]" julia> @sprintf "ab [%-7s]" bytestring(hex2bytes("4141Ee81824141")) "ab [AA\ue042AA ]" julia> @sprintf "ab [%-7s]" bytestring(hex2bytes("4141Ef81824141")) "ab [AA\uf042AA ]" julia> @sprintf "ab [%-7s]" bytestring(hex2bytes("4141E881824141")) "ab [AA聂AA ]" julia> @sprintf "ab [%-7s]" bytestring(hex2bytes("4141E8e8824141")) "ab [AA騂AA ]" julia> @sprintf "ab [%-7s]" bytestring(hex2bytes("4141E9e8824141")) "ab [AAꨂAA ]" julia> @sprintf "ab [%-7s]" bytestring(hex2bytes("414155aa554141")) ERROR: UnicodeError: invalid character index in next at unicode/utf8.jl:65 in strwidth at strings/basic.jl:205 [inlined code] from printf.jl:159 in anonymous at no file:0 julia> @sprintf "ab [%-7s]" hex2bytes("414155aa554141") "ab [UInt8[0x41,0x41,0x55,0xaa,0x55,0x41,0x41]]" http://mevius.5ch.net/test/read.cgi/tech/1455271513/24
25: デフォルトの名無しさん [sage] 2016/02/15(月) 11:19:37.91 ID:TvNTryet >>11 julia> ccall((:curl_version, :libcurl), Ptr{Cchar}, ()) Ptr{Int8} @0x6b29c060 julia> @sprintf "%s" ccall((:curl_version, :libcurl), Ptr{Cchar}, ()) "Ptr{Int8} @0x6b29c060" んーこれも期待した動作と違うなぁ。 http://mevius.5ch.net/test/read.cgi/tech/1455271513/25
26: デフォルトの名無しさん [sage] 2016/02/15(月) 11:28:27.71 ID:TvNTryet >>16 ifに括弧なしは一見便利だけどend強制されるのはPythonに慣れてるとうざく感じる。 julia> Array{UInt8}([1:n;]) == map(a -> UInt8(a), 1:n) true ちょっと気持ち悪いところもある。 http://mevius.5ch.net/test/read.cgi/tech/1455271513/26
27: デフォルトの名無しさん [sage] 2016/02/15(月) 11:32:12.26 ID:TvNTryet julia> Array{UInt8}([1:n;]) == map(a -> UInt8(a), (1:n)) true julia> Array{UInt8}([1:n]) == map(a -> UInt8(a), (1:n)) 警告出るが true (二回目からは警告出なくなる?) julia> Array{UInt8}((1:n)) == map(a -> UInt8(a), (1:n)) エラー http://mevius.5ch.net/test/read.cgi/tech/1455271513/27
29: デフォルトの名無しさん [sage] 2016/02/15(月) 11:49:21.03 ID:TvNTryet >>28 有賀?。 >>24でも書いたけどbytestringってこんなデータ来ると死ぬから使いたくないなぁ。 julia> bytestring(hex2bytes("414155aa554141")) http://mevius.5ch.net/test/read.cgi/tech/1455271513/29
30: デフォルトの名無しさん [sage] 2016/02/15(月) 12:16:36.12 ID:TvNTryet julia> pointer_to_array(ccall((:curl_version, :libcurl), Ptr{Cchar}, ()), n) でnバイト分のArray{Int8}になるみたいだけどなぜかデフォでUInt8じゃないのが気に入らないなぁ。 julia> Array{UInt8}(pointer_to_array(ccall((:curl_version, :libcurl), Ptr{Cchar}, ()), n)) とかいちいち書くの面倒だなぁ。 http://mevius.5ch.net/test/read.cgi/tech/1455271513/30
32: デフォルトの名無しさん [sage] 2016/02/15(月) 12:21:09.84 ID:TvNTryet >>31 julia> pointer_to_array(ccall((:curl_version, :libcurl), Ptr{UInt8}, ()), n) できました!! ありがとうございます!!! http://mevius.5ch.net/test/read.cgi/tech/1455271513/32
メモ帳
(0/65535文字)
上
下
前次
1-
新
書
関
写
板
覧
索
設
栞
歴
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.038s