Nim 2.0.2 中文手册template toSeq2[T](a: iterable[T]): seq[T] = var ret: seq[T] assert a.typeof is T for ai in a: ret.add ai ret assert iota(3).toSeq2 == @[0, 1, 2] assert toSeq2(5..7) == @[5, 6, 7] assert not compiles(toSeq2(@[1 必须是⼀个类型为 bool 的常量表达式。 语句不产⽣新作⽤域。 计算为 true 的表达式所属语句将由编译器翻译,⽽只检查每个条件的语义,不检查其他语句语义! when 语句启⽤了条件编译技术。⼀种特殊的语法扩展是,可以在 object 定义中使⽤ when 结构。 When nimvm 语句 nimvm 是⼀个特殊标识符, 可⽤ when nimvm 语句表达式来判断路径,编译时或可执⾏⽂件之间执⾏。 标准库的抽象位置。例如, import std / strutils 可⽤来明确地导⼊标准库⾥的 stutils 模块。 2. pkg : pkg 这个伪路径⽤来明确地指向 Nim 软件包。不过,其技术细节不在本⽂档的范围以内。 它的语义是: 使⽤搜索路径去查找模块名,但是忽略标准库所在位置 。换句话说,它是 std 的反⾯。 对于所有导⼊标准库(stdlib)⾥的模块的情况,建议、优选(但是⽬前并不强制)把0 码力 | 127 页 | 7.05 MB | 1 年前3
Nim Tutorial (Part I) 0.17.1l e s , t y p e s or s t at e m e n t s b u t i s k e p t v e r y b as i c . T h e m an u al c on t ai n s m an y m or e e x am p l e s of t h e ad v an c e d l an gu age f e at u r e s . Al l c od e e f au l t t h e Ni m c om p i l e r ge n e r at e s a l ar ge am ou n t of r u n t i m e c h e c k s ai m i n g f or y ou r d e b u ggi n g p l e as u r e . W i t h -d:release t h e s e c h e c k s ar e ou gh i t s h ou l d b e p r e t t y ob v i ou s w h at t h e p r ogr am d oe s , I w i l l e x p l ai n t h e s y n t ax : s t at e m e n t s w h i c h ar e n ot i n d e n t e d ar e e x e c u t e d w0 码力 | 24 页 | 271.23 KB | 1 年前3
Nim 2.0.8 Manualtemplate toSeq2[T](a: iterable[T]): seq[T] = var ret: seq[T] assert a.typeof is T for ai in a: ret.add ai ret assert iota(3).toSeq2 == @[0, 1, 2] assert toSeq2(5..7) == @[5, 6, 7] assert not compiles(toSeq2(@[10 码力 | 132 页 | 5.73 MB | 1 年前3
Computer Programming with the Nim Programming Language
com/StefanSalewski. CHATGPT AND GPT-4 ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪ You might have already heard about ChatGPT, an AI (Artificial Intelligence) chatbot developed by OpenAI. ChatGPT was launched as a prototype on November solve problems using these rules. Moreover, there are emerging concepts like artificial intelligence (AI) and machine learning (ML). They rely less on algorithms and more on neural networks, which are trained be on the imperative programming style. However, it’s worth noting that Nim can be used to create AI applications. Additionally, we can distinguish between languages such as C, C++, Ada, Rust, D, Go0 码力 | 865 页 | 7.45 MB | 1 年前3
Computer Programming with the Nim Programming Language
com/StefanSalewski. CHATGPT AND GPT-4 ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪ You might have already heard about ChatGPT, an AI (Artificial Intelligence) chatbot developed by OpenAI. ChatGPT was launched as a prototype on November solve problems using these rules. Moreover, there are emerging concepts like artificial intelligence (AI) and machine learning (ML). They rely less on algorithms and more on neural networks, which are trained be on the imperative programming style. However, it’s worth noting that Nim can be used to create AI applications. Additionally, we can distinguish between languages such as C, C++, Ada, Rust, D, Go0 码力 | 784 页 | 2.13 MB | 1 年前3
Computer Programming with the Nim Programming Languagehttps://github.com/StefanSalewski. ChatGPT and GPT-4 You might have already heard about ChatGPT, an AI (Artificial Intelligence) chatbot devel oped by OpenAI. ChatGPT was launched as a prototype on November problems using these rules. 23 Moreover, there are emerging concepts like artificial intelligence (AI) and machine learning (ML). They rely less on algorithms and more on neural networks, which are trained be on the imperative programming style. However, it’s worth noting that Nim can be used to create AI applications. Additionally, we can distinguish between languages such as C, C++, Ada, Rust, D, Go0 码力 | 512 页 | 3.54 MB | 1 年前3
Computer Programming with the Nim Programming Languagehttps://github.com/StefanSalewski. ChatGPT and GPT-4 You might have already heard about ChatGPT, an AI (Artificial Intelligence) chatbot developed by OpenAI. ChatGPT was launched as a prototype on November problems using these rules. 23 Moreover, there are emerging concepts like artificial intelligence (AI) and machine learning (ML). They rely less on algorithms and more on neural networks, which are trained be on the imperative programming style. However, it’s worth noting that Nim can be used to create AI applications. Additionally, we can distinguish between languages such as C, C++, Ada, Rust, D, Go0 码力 | 508 页 | 3.50 MB | 1 年前3
Computer Programming with the Nim Programming Languagehttps://github.com/StefanSalewski. ChatGPT and GPT-4 You might have already heard about ChatGPT, an AI (Artificial Intelligence) chatbot devel oped by OpenAI. ChatGPT was launched as a prototype on November problems using these rules. 23 Moreover, there are emerging concepts like artificial intelligence (AI) and machine learning (ML). They rely less on algorithms and more on neural networks, which are trained be on the imperative programming style. However, it’s worth noting that Nim can be used to create AI applications. Additionally, we can distinguish between languages such as C, C++, Ada, Rust, D, Go0 码力 | 512 页 | 3.53 MB | 1 年前3
Computer Programming with the Nim Programming Languagehttps://github.com/StefanSalewski. ChatGPT and GPT-4 You might have already heard about ChatGPT, an AI (Artificial Intelligence) chatbot developed by OpenAI. ChatGPT was launched as a prototype on November problems using these rules. 23 Moreover, there are emerging concepts like artificial intelligence (AI) and machine learning (ML). They rely less on algorithms and more on neural networks, which are trained be on the imperative programming style. However, it’s worth noting that Nim can be used to create AI applications. Additionally, we can distinguish between languages such as C, C++, Ada, Rust, D, Go0 码力 | 508 页 | 3.54 MB | 1 年前3
Computer Programming with the Nim Programming Languagehttps://github.com/StefanSalewski. ChatGPT and GPT-4 You might have already heard about ChatGPT, an AI (Artificial Intelligence) chatbot developed by OpenAI. ChatGPT was launched as a prototype on November problems using these rules. 23 Moreover, there are emerging concepts like artificial intelligence (AI) and machine learning (ML). They rely less on algorithms and more on neural networks, which are trained be on the imperative programming style. However, it’s worth noting that Nim can be used to create AI applications. Additionally, we can distinguish between languages such as C, C++, Ada, Rust, D, Go0 码力 | 508 页 | 3.50 MB | 1 年前3
共 31 条
- 1
- 2
- 3
- 4













