00:50:49 | * | dddddd quit (Remote host closed the connection) |
01:10:54 | * | Guest71713 quit (Quit: Page closed) |
01:16:50 | * | Snircle quit (Ping timeout: 256 seconds) |
01:18:16 | * | Snircle joined #nim |
01:29:44 | * | max3 quit (Quit: Connection closed for inactivity) |
01:29:52 | FromGitter | <kayabaNerve> Why... |
01:30:41 | FromGitter | <kayabaNerve> Speaking of crypto, I put my project on the forums :D sorry if my partner was too cryptic/that shouldn't be there. No better place to get Nim devs though. |
01:33:14 | FromGitter | <kayabaNerve> We are protecting our assets until we get legal straightened out... |
01:40:49 | * | CodeVance1 quit (Read error: Connection reset by peer) |
01:44:20 | * | CodeVance joined #nim |
01:51:11 | * | Lord_Nightmare2 joined #nim |
01:53:05 | * | Lord_Nightmare quit (Ping timeout: 248 seconds) |
01:53:05 | * | Lord_Nightmare2 is now known as Lord_Nightmare |
02:10:15 | * | Cthalupa quit (Quit: ZNC 1.6.6+deb1 - http://znc.in) |
02:18:06 | * | yglukhov[i] joined #nim |
02:22:17 | * | yglukhov[i] quit (Ping timeout: 245 seconds) |
02:34:24 | FromDiscord | <citycide> how do you make something like this work without having to do a `cast` to the object `Foo` (in this case): https://gist.github.com/citycide/8f7e534196bb0825e0767c9821e105d5 |
02:34:50 | FromDiscord | <citycide> right now it gives me `undeclared field: 'name'` |
02:35:26 | * | jdhorwitz joined #nim |
02:38:06 | * | jdhorwitz quit (Client Quit) |
02:38:43 | * | jdhorwitz joined #nim |
02:41:06 | * | jdhorwitz quit (Client Quit) |
02:49:12 | * | SenasOzys quit (Ping timeout: 256 seconds) |
02:51:24 | * | arecaceae quit (Remote host closed the connection) |
02:51:47 | * | arecaceae joined #nim |
02:52:14 | * | Cthalupa joined #nim |
02:53:11 | FromDiscord | <2vg> change `if` to `when` |
02:54:01 | FromDiscord | <citycide> ahh awesome π |
02:57:29 | * | jdhorwitz joined #nim |
02:59:08 | jdhorwitz | Does anyone have any good pointers as how to use irc most effective, as in keep channel history, get alerted of messages, basics like that? I'm using irssi currently |
03:01:44 | * | jdhorwitz quit (Client Quit) |
03:02:30 | * | Electrux joined #nim |
03:02:51 | FromGitter | <kayabaNerve> Use a bouncer |
03:03:56 | FromGitter | <kayabaNerve> That's not a basic |
03:04:14 | FromGitter | <kayabaNerve> That's how you keep a history and see messages you missed while offline |
03:04:22 | FromGitter | <kayabaNerve> And I recommend hexchat tbh |
03:04:49 | FromGitter | <kayabaNerve> In the case of Nim, just use our Gitter/Discord |
03:08:57 | * | Electrux quit (Quit: WeeChat 2.1) |
03:09:16 | * | Electrux joined #nim |
03:09:22 | Electrux | what's a bouncer? |
03:10:07 | FromGitter | <kayabaNerve> An IRC bouncer logs in as you |
03:10:12 | FromGitter | <kayabaNerve> Then, you log in to it |
03:10:25 | FromGitter | <kayabaNerve> And it sends you all your missed messages |
03:10:39 | Electrux | oh wow :O that's interesting |
03:10:41 | FromGitter | <kayabaNerve> It's a way to never disconnect from the network. A proxy. |
03:10:56 | FromGitter | <kayabaNerve> Yeah. I've never done it but I know people who have |
03:33:59 | * | Lord_Nightmare2 joined #nim |
03:36:02 | * | Lord_Nightmare quit (Ping timeout: 252 seconds) |
03:36:03 | * | Lord_Nightmare2 is now known as Lord_Nightmare |
03:55:20 | * | CodeVance quit (Read error: Connection reset by peer) |
03:56:02 | * | gmpreussner quit (Ping timeout: 260 seconds) |
03:56:21 | * | gmpreussner joined #nim |
03:59:10 | * | adeohluwa joined #nim |
03:59:16 | adeohluwa | Go Nim!!! |
03:59:20 | adeohluwa | awesome forum |
04:05:21 | * | CodeVance joined #nim |
04:16:09 | * | xet7 quit (Remote host closed the connection) |
04:18:00 | * | xet7 joined #nim |
04:18:05 | * | Snircle_ joined #nim |
04:18:11 | * | Snircle quit (Ping timeout: 276 seconds) |
04:18:24 | * | CodeVance quit (Read error: Connection reset by peer) |
04:22:51 | * | CodeVance joined #nim |
04:26:16 | * | CodeVance quit (Read error: Connection reset by peer) |
04:34:58 | * | CodeVance joined #nim |
05:34:07 | * | CodeVance quit (Read error: Connection reset by peer) |
05:58:11 | * | sz0 quit (Quit: Connection closed for inactivity) |
06:07:21 | Electrux | yaay i made my first linked list implementation ( just adding elements for now ) :D |
06:09:00 | * | adeohluwa quit (Quit: Connection closed for inactivity) |
06:10:55 | Electrux | question... why must an object be constructed with all the parameters as <parameter name>: <value> |
06:11:09 | Electrux | why can it not take default values for the data in the type? |
06:15:23 | FromGitter | <stisa> Electrux what do you mean?something like https://glot.io/snippets/f1dyxsll3r should work |
06:16:06 | Electrux | what if it is a "ref object of RootObj"? |
06:17:11 | * | miran joined #nim |
06:17:28 | Electrux | https://glot.io/snippets/f1dz0yrwlc this is my code |
06:18:11 | Electrux | on line 12, why must i write "Node( prev: nil, next: nil, data: val )" instead of just "Node"? |
06:18:45 | * | yglukhov[i] joined #nim |
06:18:59 | Electrux | would just "Node" mean that i am trying to assign a type? and Node( ... ) mean that i am creating its object? |
06:22:45 | * | yglukhov[i] quit (Ping timeout: 245 seconds) |
06:24:00 | FromGitter | <stisa> Electrux `new list.starting` is enough to initialize the ref |
06:24:41 | FromGitter | <stisa> Also `Node()` should work |
06:24:50 | Electrux | oh... that is cool :O |
06:25:33 | Electrux | thanks a lot ^_^ |
06:26:36 | FromGitter | <Jamlee> can nim compile 100% statically executable? |
06:27:57 | Electrux | how would i delete a node which i initialized? |
06:28:19 | FromGitter | <Varriount> Set it to some other value, like nil |
06:28:42 | Electrux | that would automatically destroy it? |
06:29:13 | FromGitter | <Varriount> Yes. Nim is a garbage collected language |
06:29:33 | Electrux | sorry i have always been used to c++ in which u have to use new and delete... never worked with auto garbage collection before |
06:30:10 | * | yglukhov[i] joined #nim |
06:34:40 | Electrux | and thanks a lot :D |
06:35:49 | Electrux | oh one more thing... if i send an object as non var to a function, i can still change the internal data of the object right? |
06:36:37 | * | yglukhov[i] quit (Ping timeout: 268 seconds) |
06:44:27 | FromGitter | <gogolxdong> How to make a process accept CLI options? |
06:45:58 | * | Trustable joined #nim |
06:46:18 | Electrux | https://glot.io/snippets/f1dzsea2md can someone please check the delItem function if the node is actually getting deleted and garbage collected? i removed it from the list ( changed the prev and next references to the next and prev of this node respectively ) and then, i set itself to nil |
06:46:43 | Electrux | it does seem to work correctly but i do not know how can i find if it is actually being garbage collected or not |
06:46:52 | * | jzeus joined #nim |
06:49:29 | jzeus | is there any way to read http response headers on HttpRequestError? |
06:50:53 | * | yglukhov[i] joined #nim |
06:56:14 | * | yglukhov[i] quit (Ping timeout: 252 seconds) |
06:56:59 | * | yglukhov[i] joined #nim |
07:06:19 | * | yglukhov_ joined #nim |
07:06:53 | * | Lord_Nightmare quit (Ping timeout: 252 seconds) |
07:07:04 | * | Lord_Nightmare2 joined #nim |
07:08:00 | * | Lord_Nightmare2 is now known as Lord_Nightmare |
07:09:22 | * | yglukhov[i] quit (Ping timeout: 264 seconds) |
07:12:17 | FromGitter | <7sDream> may be you need `httpclient.get` instand of `httpclient.getContent`? |
07:38:48 | * | yglukhov[i] joined #nim |
07:41:27 | * | yglukhov_ quit (Ping timeout: 240 seconds) |
07:44:52 | Electrux | should i return the value i want or assign the value to result? |
07:44:57 | Electrux | which is preferrable? |
07:46:57 | * | dddddd joined #nim |
07:51:04 | * | ElectruxR joined #nim |
07:52:20 | * | Electrux quit (Ping timeout: 245 seconds) |
08:03:32 | * | gmpreussner quit (Ping timeout: 245 seconds) |
08:04:59 | * | gmpreussner_ joined #nim |
08:08:57 | * | ElectruxR quit (Ping timeout: 245 seconds) |
08:10:21 | * | ElectruxR joined #nim |
08:15:41 | FromGitter | <gogolxdong> How to use initOptParser to parse commands? |
08:21:47 | FromGitter | <data-man> @gogolxdong: https://nim-lang.org/docs/parseopt.html#15 |
08:27:40 | FromGitter | <gogolxdong> This is the example in parseopt.nim. First it's wrong, filename wasn't delcared, second, it doesn't demonstrate what's a cmdArgument and how to use OptParser.key and val. |
08:30:52 | FromGitter | <gogolxdong> key and val is TaintedString"" by default. |
08:32:28 | * | Elronnd_ joined #nim |
08:33:05 | * | Elronnd quit (Read error: Connection reset by peer) |
08:35:33 | * | ElectruxR quit (Quit: WeeChat 2.1) |
08:35:53 | * | Electrux joined #nim |
08:52:44 | * | Guest11714 quit (Quit: Bye) |
08:53:30 | * | oprypin joined #nim |
09:04:29 | FromGitter | <7sDream> Just some test on `parseopt` β https://i.loli.net/2018/05/26/5b0921ce9f071.png |
09:21:12 | * | xkapastel quit (Quit: Connection closed for inactivity) |
09:26:08 | Electrux | can i create reverse iterator? |
09:28:58 | Electrux | i am able to create normal iterator using "iterator items( ... )", but what about reverse iterator? |
09:32:39 | miran | Electrux: give me a minute, i'll send you an example |
09:35:44 | FromGitter | <data-man> @Electrux: Search on the forum :) https://forum.nim-lang.org/t/1938 β β ```code paste, see link``` β β Same for items_reversed, without ```var``` [https://gitter.im/nim-lang/Nim?at=5b092a6f54ce2313615758af] |
09:36:32 | miran | Electrux: http://ix.io/1brL/ |
09:44:03 | Electrux | ooh wow! both are great!! |
09:44:05 | Electrux | thanks a lot :) |
09:46:00 | Electrux | btw, for a function taking an object t as parameter - "proc func( t: T )", are these 2 equivalent function calls - "t.func()", and "func( t )"? i just tried this with reverse iterator and both seem equivalent |
09:47:53 | miran | yes, both of those, and (sometimes ;)) `func t` |
09:48:07 | Electrux | and if they are equivalent, it means that the language supports chaining quite well i guess... if there is a set of functions, say: "func1( t: T ): T", "func2( t: T ): T", "func3( t: T ): T", etc... then one could chain these functions as much as one wants? |
09:48:26 | Electrux | as in t.func1().func2().func3().func2().func1() |
09:49:40 | miran | Electrux: yup :) |
09:49:50 | miran | no need for pipe operator |
09:49:56 | Electrux | wooow that is SOOOO cooool :D |
09:50:06 | Electrux | thanks a lot developers for this <3 |
09:50:22 | Electrux | and thanks for clarifying miran D: |
09:50:24 | Electrux | :D * |
09:50:32 | miran | enjoy :) |
09:54:04 | * | yglukhov[i] quit (Ping timeout: 252 seconds) |
09:58:16 | FromGitter | <7sDream> even no need for `()` |
09:58:33 | FromGitter | <7sDream> try `"1".parseInt.repr.echo` |
10:00:31 | Electrux | that's wonderful :O |
10:21:24 | * | Vladar joined #nim |
10:21:25 | * | CodeVance joined #nim |
10:30:51 | * | yglukhov[i] joined #nim |
10:31:07 | * | miran quit (Ping timeout: 252 seconds) |
10:33:52 | * | dddddd quit (Remote host closed the connection) |
10:50:33 | arecaceae | trying to register stdin in a selector on Linux and I'm triggering this assertion https://github.com/nim-lang/Nim/blob/v0.18.0/lib/pure/ioselects/ioselectors_epoll.nim#L394 - someone has ad-hoc some ideas? |
11:03:24 | * | yglukhov[i] quit (Remote host closed the connection) |
11:03:57 | * | yglukhov[i] joined #nim |
11:06:23 | * | kobi7 joined #nim |
11:06:29 | kobi7 | Hello guys |
11:06:57 | kobi7 | in vscode, you can debug and inspect variables ( https://code.visualstudio.com/docs/editor/debugging#_data-inspection ) |
11:07:05 | * | nsf joined #nim |
11:07:09 | kobi7 | how do I use that with the nim extension? |
11:07:41 | kobi7 | I see names that are not the local variables |
11:08:38 | * | yglukhov[i] quit (Ping timeout: 260 seconds) |
11:08:39 | kobi7 | I'm trying to find a bug |
11:09:17 | * | marszym[m] joined #nim |
11:16:44 | * | elrood joined #nim |
11:23:58 | arecaceae | https://github.com/nim-lang/Nim/issues/7828 >.< |
11:33:14 | dom96 | That sucks :/ |
11:34:01 | * | yglukhov[i] joined #nim |
11:34:36 | kobi7 | How to convert slices (like a sub string) to the actual strings? |
11:38:46 | * | yglukhov[i] quit (Ping timeout: 264 seconds) |
11:41:09 | kobi7 | when mapping, is there a shortcut => syntax? |
11:41:40 | kobi7 | sorry found it, do notation |
11:43:15 | dom96 | don't use the do notation |
11:43:27 | dom96 | https://nim-lang.org/docs/future.html#=%3E.m,untyped,untyped |
11:46:18 | kobi7 | dom96: do you use vscode? I think there is a bug when moving lines up and down. it sometimes screws with the indentation |
11:46:37 | dom96 | I do |
11:47:03 | dom96 | I've disabled all that |
11:47:12 | dom96 | "editor.detectIndentation": false, "editor.autoIndent": false, |
11:49:26 | kobi7 | good to know. thanks. a word about this on the website would be nice |
11:49:55 | dom96 | where? |
11:51:05 | kobi7 | maybe a section about IDEs, to get a good experience from the start |
11:52:19 | kobi7 | Can't map accept a seq ? |
11:53:59 | kobi7 | I have a seq of slices and want to map them to become strings |
11:54:25 | FromGitter | <Vindaar> @kobi7 can you show an example? |
11:54:55 | FromGitter | <Vindaar> @dom96 what do you mean with "don't use the do notation"? Just in the context of map? |
11:55:38 | kobi7 | I'm using regex with captured named groups, which returns a seq[Slice[int]] |
11:55:45 | kobi7 | then, a simple: let subs = match.group("subs").map (s => lower[s]) |
11:56:00 | kobi7 | doesn't work. lower is just the lowercased text |
11:56:31 | dom96 | Vindaar: I mean: the do notation doesn't fit Nim and I would personally like to see it be removed from the language. |
11:56:41 | dom96 | So I suggest => as a better alternative |
11:57:47 | dom96 | kobi7: What error do you get? |
11:58:21 | kobi7 | can I paste here? |
11:58:37 | dom96 | If it's less than 3 lines then yes |
11:58:50 | dom96 | otherwise use pastebin/gist |
11:58:51 | FromGitter | <Vindaar> @dom96 oh, I see. However, in some cases it's imo pretty nice, no? |
11:59:23 | dom96 | Vindaar: I don't think so, but it's a subjective topic |
11:59:31 | kobi7 | it says map expects openArray, |
12:00:08 | dom96 | show me the error please |
12:00:32 | kobi7 | https://pastebin.com/JjzW508v |
12:00:40 | FromGitter | <Vindaar> @dom96 yeah, it sure is. I just remember a case where I thought it allowed me to write some nicer code. I see if I can find it. But are you fine with `quote do`? |
12:02:06 | dom96 | AFAIK you can just write `quote:` without the `do` as well |
12:02:30 | FromGitter | <Vindaar> wait, what? in the sense that it's exactly the same? |
12:02:34 | FromGitter | <Vindaar> I'll give it a try |
12:02:38 | dom96 | kobi7: It's not getting the closure |
12:02:48 | dom96 | i.e. the `op` |
12:03:59 | kobi7 | dom96: weird, it works now |
12:04:37 | dom96 | kobi7: maybe it's the space after the `map`? |
12:05:09 | kobi7 | yeah, could be. the error was unrelated then |
12:05:43 | kobi7 | dom96, where is trim? I only see removeSuffix|Prefix |
12:06:00 | kobi7 | easy to implement ofcourse, just wondering |
12:06:50 | dom96 | strip? |
12:08:23 | kobi7 | no thanks, j/k |
12:08:34 | dom96 | lol |
12:10:18 | FromGitter | <Vindaar> @dom96 now I remember: using do it's easy to write multi line anonymous procs. How do I do that with -> and =>? |
12:10:42 | dom96 | just use `proc` for that |
12:15:39 | * | SenasOzys joined #nim |
12:18:38 | * | leorize joined #nim |
12:22:51 | * | yglukhov[i] joined #nim |
12:24:13 | FromGitter | <Vindaar> fizzbuzz as an example: β β ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b0951ededd06f7d15e5ec4e] |
12:25:00 | FromGitter | <Vindaar> maybe I'm just not thinking straight right now, but I can't figure out how to replace the do in a nice way there |
12:26:52 | FromGitter | <Vindaar> ohh, just with normal map and not mapIt I guess |
12:27:05 | FromGitter | <Vindaar> you mean like: β β ```code paste, see link``` β β right? [https://gitter.im/nim-lang/Nim?at=5b095299a7abc8692ee6e619] |
12:29:53 | * | dddddd joined #nim |
12:31:19 | FromGitter | <7sDream> why I prefer the `do` way, It's a bit like kotlin :P |
12:43:25 | dom96 | Vindaar: precisely |
12:44:09 | dom96 | This is how I would format it: https://gist.github.com/dom96/3c90c9be8ea28e1c680ff9e24d13959f |
12:45:35 | * | yglukhov[i] quit (Remote host closed the connection) |
12:45:35 | FromGitter | <Vindaar> formatted like that it looks actually pretty neat I agree. Has the advantage of being clear about the types of the proc |
12:46:28 | * | leorize quit (Quit: WeeChat 2.1) |
12:47:21 | * | kobi7 quit (Quit: Leaving) |
12:47:29 | dom96 | yeah, and you got lucky there with 'do' I think |
12:47:34 | dom96 | Often you also have to specify types for it |
12:47:40 | dom96 | and then the syntax is completely weird |
12:48:04 | dom96 | as shown here: https://nim-lang.org/docs/manual.html#procedures-do-notation |
12:52:18 | * | skellock joined #nim |
12:54:24 | * | pwntus joined #nim |
12:54:44 | * | pwntus quit (Changing host) |
12:54:44 | * | pwntus joined #nim |
12:57:16 | * | Trustable quit (Remote host closed the connection) |
13:00:03 | FromGitter | <Vindaar> yep, I know. For these cases I never use it either. Just a couple of times like here with the *It templates and for `any` and `all`. So yeah, my use case is also quite small. I could live without if it would mean to get rid of bloat in Nim's stdlib or the compiler (wherever `do` is implemented...) |
13:12:52 | narimiran[m] | > "editor.detectIndentation": false, "editor.autoIndent": false, |
13:12:53 | narimiran[m] | @dom96 this is only problem with nim files. all other files work properly without any modification of those settings |
13:13:22 | narimiran[m] | is this some nimsuggest bug? can this be fixed? |
13:13:36 | dom96 | I'm pretty sure it's a problem with the VS Code plugin |
13:15:15 | narimiran[m] | yeah, it might be the nim vscode extension |
13:15:36 | narimiran[m] | like it tries to be too clever |
13:20:53 | * | yglukhov[i] joined #nim |
13:49:23 | FromDiscord | <r00ster> does somebody knows a good game/graphics library for nim? |
14:08:39 | * | yglukhov[i] quit (Remote host closed the connection) |
14:12:17 | * | icebattle quit (Ping timeout: 276 seconds) |
14:13:56 | * | miran joined #nim |
14:21:44 | FromGitter | <kayabaNerve> r00ster: SFML |
14:22:30 | FromGitter | <kayabaNerve> OpenGL |
14:24:01 | Yardanico | why not sdl |
14:28:05 | * | CodeVance quit (Ping timeout: 260 seconds) |
14:28:41 | * | yglukhov[i] joined #nim |
14:30:18 | * | skellock quit (Quit: Textual IRC Client: www.textualapp.com) |
14:33:15 | Calinou | why not Godot |
14:33:16 | * | Calinou hides |
14:33:24 | Calinou | there's a Nim GDNative binding :) |
14:33:30 | Calinou | https://github.com/pragmagic/godot-nim |
14:33:55 | dom96 | Why not Unreal Engine 4? https://github.com/pragmagic/nimue4 :P |
14:34:57 | * | ofelas quit (Ping timeout: 265 seconds) |
14:35:48 | Calinou | it's proprietary :( |
14:42:22 | FromGitter | <Varriount> Meh, at least it's affordable |
14:43:09 | FromGitter | <kayabaNerve> @Varriount so is Windows |
14:43:33 | FromGitter | <kayabaNerve> SSL is just graphics. SFML has networking modules and more. Better Nim bindings |
14:43:56 | FromGitter | <kayabaNerve> Godot is complex and imo, tries to do too much without maturing in any area |
14:44:03 | FromGitter | <kayabaNerve> *SDL |
14:44:18 | FromGitter | <kayabaNerve> Unreal is proprietary |
14:44:39 | FromGitter | <kayabaNerve> And Godot is great. Don't get me wrong. Just not what I would recommend |
14:45:45 | FromGitter | <kayabaNerve> (SDL also has gamepads, audio... My point was SFML does even more. The Nim stdliub can cover up a lot of what SFML does though) |
14:46:05 | FromDiscord | <Dragon> Hey guys |
14:46:12 | * | icebattle joined #nim |
14:46:32 | FromDiscord | <Dragon> just wondering, what is the difference between |
14:46:32 | FromDiscord | <Dragon> |
14:46:32 | FromDiscord | <Dragon> `uint8(10)` |
14:46:32 | FromDiscord | <Dragon> |
14:46:33 | FromDiscord | <Dragon> and |
14:46:33 | FromDiscord | <Dragon> |
14:46:33 | FromDiscord | <Dragon> `10.uint8` |
14:46:34 | FromDiscord | <Dragon> |
14:46:35 | FromDiscord | <Dragon> ? |
14:47:05 | Yardanico | there's none (in terms of how things will work) |
14:47:49 | FromDiscord | <Dragon> Ok, thanks |
14:48:36 | FromGitter | <gogolxdong> the latter only works for literal values, the former works for variable as well. |
14:49:44 | Yardanico | well, there's no difference between "uint8(10)" and "10.uint8" |
14:50:24 | Yardanico | @gogolxdong are you sure? :) |
14:50:38 | Yardanico | !eval let a = 10; echo a.uint8 |
14:50:40 | NimBot | 10 |
14:52:18 | FromGitter | <gogolxdong> It's 10'u8 that only works for literal value. |
14:52:27 | FromGitter | <7sDream> It's UFCS, so no diffierence |
14:53:42 | FromGitter | <7sDream> https://en.wikipedia.org/wiki/Uniform_Function_Call_Syntax#Nim_programming_language |
15:26:30 | * | xkapastel joined #nim |
15:39:49 | * | yglukhov[i] quit (Remote host closed the connection) |
15:44:49 | * | natrys joined #nim |
15:56:29 | * | ofelas joined #nim |
15:58:42 | * | nsf quit (Quit: WeeChat 2.1) |
16:00:24 | * | yglukhov[i] joined #nim |
16:04:50 | * | yglukhov[i] quit (Ping timeout: 245 seconds) |
16:16:55 | * | athenot quit (Ping timeout: 245 seconds) |
16:27:31 | * | miran_ joined #nim |
16:27:35 | * | miran quit (Ping timeout: 240 seconds) |
16:27:42 | * | miran_ is now known as miran |
16:30:52 | * | icebattle quit (Ping timeout: 256 seconds) |
16:33:09 | * | icebattle joined #nim |
16:41:53 | * | yglukhov[i] joined #nim |
16:46:34 | * | yglukhov[i] quit (Ping timeout: 264 seconds) |
16:55:23 | * | dddddd quit (Remote host closed the connection) |
17:12:30 | FromGitter | <krux02> eval! type A[N: static[int]; T] = array[0 .. N-1,T] ; type E = enum C,D β template alenT: enum (arg: typedesc[T]): int = castint (high(arg)) + 1 β template B(I, T): untyped = A[alen(I), T] β var myArray2: B(E, int) [https://gitter.im/nim-lang/Nim?at=5b09957dc712f5612534f4af] |
17:12:43 | FromGitter | <krux02> eval! echo "Hallo Welt" |
17:19:46 | Yardanico | @krux02 ? |
17:19:51 | Yardanico | it's !eval |
17:20:16 | Yardanico | !eval let a = 1 β let b = 2 β echo b |
17:20:17 | NimBot | Compile failed: in.nim(1, 11) Error: undeclared identifier: 'β' |
17:28:11 | FromGitter | <kayabaNerve> Yardanico: Use ; |
17:28:23 | FromGitter | <kayabaNerve> !eval let a = 1; let b = 2; echo b |
17:28:25 | NimBot | 2 |
17:30:43 | FromGitter | <krux02> !eval type A[N: static[int]; T] = array[0 .. N-1,T] ; type E = enum C,D β template alenT: enum: int = castint) + 1 β template B(I, T): untyped = A[alen(I), T] β var myArray2: B(E, int) β eval! echo "Hallo Welt" [https://gitter.im/nim-lang/Nim?at=5b0999c3a45f930a65d8ec11] |
17:30:45 | NimBot | Compile failed: in.nim(1, 71) Error: identifier expected, but found 'keyword template' |
17:31:08 | dom96 | krux02: that's far too long |
17:31:24 | FromGitter | <krux02> that is one reason why I don't like semantic indentation |
17:32:40 | Yardanico | @kayabaNerve I know btw |
17:32:52 | FromGitter | <krux02> dom96: it's 4 lines, that is not too long |
17:33:05 | dom96 | it is for FromGitter |
17:33:22 | Yardanico | maybe we need a special character to be recognized by NimBot to separate newlines for eval? |
17:33:34 | dom96 | actually you need to put everything on one line |
17:33:43 | miran | Yardanico: what's wrong with ; ? |
17:34:00 | FromGitter | <krux02> yea and exactly that is impossible |
17:34:12 | Yardanico | miran nothing wrong |
17:34:55 | FromGitter | <krux02> !eval if false: echo 1; echo 2 |
17:34:57 | NimBot | <no output> |
17:35:31 | FromGitter | <krux02> there is no way to put the statement after the if in the same line |
17:35:52 | miran | !eval (if false: echo 1); echo 2 |
17:35:54 | NimBot | 2 |
17:36:20 | * | miran drops mic |
17:36:40 | dom96 | lol |
17:37:09 | FromGitter | <krux02> well I was obviously wrong |
17:39:01 | FromGitter | <krux02> still I think ``if false: echo 1; echo 2`` is very ambiguous |
17:39:47 | * | icebattle quit (Ping timeout: 245 seconds) |
17:40:40 | dom96 | yeah, it possibly should be rejected |
17:41:01 | dom96 | NimForum is on HN front page btw |
17:41:50 | FromGitter | <krux02> interesting |
17:42:07 | FromGitter | <krux02> have to check it out, normally I don's visit HN |
17:43:03 | FromGitter | <kayabaNerve> Yardanico: I thought you would but then you had that weird symbol thingy and I just wanted to help |
18:05:01 | * | arecaceae quit (Remote host closed the connection) |
18:06:10 | * | arecaceae joined #nim |
18:34:56 | * | Snircle_ quit (Quit: Textual IRC Client: www.textualapp.com) |
18:39:37 | * | endragor joined #nim |
18:39:45 | * | endragor quit (Remote host closed the connection) |
18:41:20 | Yardanico | dom96, woah - https://github.com/nim-lang/nimforum/issues/140 |
18:41:33 | Yardanico | why gravatar does this in 2018 :( |
18:45:27 | * | endragor joined #nim |
18:48:26 | * | Guest8009 joined #nim |
18:50:37 | * | endragor_ joined #nim |
18:54:01 | * | endragor quit (Ping timeout: 265 seconds) |
19:03:21 | * | endragor_ quit (Remote host closed the connection) |
19:03:54 | * | endragor joined #nim |
19:05:16 | Guest8009 | Minere bitcoin BTC enquanto navega e trabalha sem deixar o pc lentΓ£o. https://getcryptotab.com/718967 https://www.youtube.com/watch?v=luzqQN3kL4g&t=166s |
19:08:28 | * | endragor quit (Ping timeout: 252 seconds) |
19:12:53 | Yardanico | lol |
19:13:10 | Yardanico | at least it's not a troll :) |
19:19:05 | * | skrylar joined #nim |
19:24:44 | * | Elronnd_ is now known as Elronnd |
19:54:15 | skrylar | oh boy. bugs with mapIt |
19:54:45 | skrylar | foo[0..4].mapit($(something[it])) # returns a seq[outType] because i guess it can't infer what is going on through the slice operator |
19:57:41 | * | zahary_ quit (Quit: Connection closed for inactivity) |
19:58:49 | * | ldlework joined #nim |
20:02:09 | * | max3 joined #nim |
20:06:41 | FromGitter | <ephja> more like a limitation |
20:19:37 | skrylar | i worked around it pretty easily, but.. egh |
20:21:15 | skrylar | i have to say, i like CBOR's simplicity. |
20:21:37 | skrylar | After screwing around with flat buffers and protobuf, there is no zigzag encoding or intensive bit twiddling nonsense |
20:25:09 | * | dddddd joined #nim |
20:29:51 | * | skrylar is baffled |
20:30:08 | skrylar | import linenoise \n linenoisePrompt("Do the thing") # the compiler claims this identifier is invalid |
20:30:59 | skrylar | the nimble package herps the derp, but copying the .{[ch]|nim} files manually work |
20:33:59 | * | natrys quit (Quit: natrys) |
20:36:24 | FromGitter | <kayabaNerve> Yardanico: BRB I need contact info for someone |
20:37:30 | FromGitter | <kayabaNerve> Musk? Yes. β Araq's? Yes. β Dom's? Yes. β Mine? I forgot mine. β That dude that killed me on Neopets? Yes. [https://gitter.im/nim-lang/Nim?at=5b09c58ac5750d377c15cfb4] |
21:03:30 | * | nsf joined #nim |
21:04:51 | * | NimBot joined #nim |
21:04:54 | FromGitter | <Varriount> @kayabaNerve You played Neopets? |
21:04:56 | * | endragor joined #nim |
21:09:25 | * | endragor quit (Ping timeout: 260 seconds) |
21:13:40 | * | skrylar made the worlds worst text-to-phonetics engine in nim :3 |
21:16:03 | skrylar | https://asciinema.org/a/SU5KyiO8qlKo1R2O523lXD7EI |
21:16:51 | * | FuntDobra joined #nim |
21:16:55 | * | miran quit (Ping timeout: 245 seconds) |
21:25:22 | * | Vladar quit (Quit: Leaving) |
21:30:31 | FromGitter | <Vindaar> @skrylar I think mapIt (and the other *it) templates all return a `seq[outType]` simply from the way they derive the correct type. Sometimes it's a little confusing though, because while the compiler still correctly checks the types, sometimes when the types do not match the error message isn't optimal |
21:31:21 | FromGitter | <Vindaar> this works just fine, as it should: β β ```let a = mapIt(toSeq(0 .. 100), it) β var b: seq[int] β b = a β echo b``` [https://gitter.im/nim-lang/Nim?at=5b09d229ba1a351a68c7f4c2] |
21:32:20 | FromGitter | <Vindaar> but, this throws "Error: type mismatch: got <seq[outType]> but expected 'seq[float]'": β β ```let a = mapIt(toSeq(0 .. 100), it) β var b: seq[float] β b = a β echo b``` β β which in more complex examples can be hard to figure out imo [https://gitter.im/nim-lang/Nim?at=5b09d26454ce2313615915dd] |
21:32:53 | skrylar | Vindaar: this is the particular line i had to massage in to working: var symbols: seq[int] = fragments[1..fragments.len-1].map(proc (it: string): int = symbol_table[it]) |
21:39:15 | FromGitter | <Vindaar> so this is the line that finally worked and doing it with `mapIt` didn't? |
21:39:43 | skrylar | correct |
21:40:15 | FromDiscord | <awr> was `atomic` once ever a keyword in nim |
21:40:38 | FromDiscord | <awr> i just noticed nim-mode for emacs seems to highlight it |
21:45:21 | FromGitter | <Vindaar> @skrylar hm, this is probably different than what you had in your code, but both of these work fine for me: β β ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b09d571a45f930a65d99402] |
21:45:50 | skrylar | i was using the $() wrapper like the docs suggested i had to do |
21:46:04 | FromGitter | <Vindaar> oh, I see |
21:46:09 | FromGitter | <Vindaar> where does it say that? |
21:46:27 | skrylar | look at the examples, they both use $(it * stuff) |
21:46:41 | skrylar | it seems not to be necessary :| |
21:47:48 | FromGitter | <Vindaar> ahh! in the example case here https://nim-lang.org/docs/sequtils.html#mapIt.t,untyped,untyped the idea though is that they want to map the numbers given in `nums`, multiply them by 4 and then store it in a `seq[string]`. Maybe that example is misleading |
21:47:53 | Yardanico | @awr it WAS :) |
21:48:03 | Yardanico | or wait |
21:48:11 | * | yglukhov[i] joined #nim |
21:48:38 | FromGitter | <Vindaar> the $() is simply the call to the "to string" proc |
21:48:53 | * | Electrux quit (Ping timeout: 256 seconds) |
21:51:43 | * | FuntDobra quit (Ping timeout: 256 seconds) |
21:52:15 | FromDiscord | <awr> https://github.com/nim-lang/Nim/blob/master/lib/system.nim#L3184 |
21:52:24 | * | sroecker[m] joined #nim |
21:52:31 | FromDiscord | <awr> it's kinda weird that this operates on an int vs an distinct atomic type |
21:52:51 | * | yglukhov[i] quit (Ping timeout: 256 seconds) |
21:53:50 | FromDiscord | <awr> e.g. std::atomic |
21:54:58 | * | Electrux joined #nim |
21:56:25 | * | foobarrel left #nim ("http://quassel-irc.org - Chat comfortably. Anywhere.") |
21:59:12 | * | SunDwarf quit (Read error: Connection reset by peer) |
21:59:20 | * | Electrux quit (Ping timeout: 252 seconds) |
22:00:12 | * | jzeus quit (Ping timeout: 245 seconds) |
22:04:51 | * | Electrux joined #nim |
22:06:02 | * | SunDwarf joined #nim |
22:09:25 | * | Electrux quit (Ping timeout: 245 seconds) |
22:14:56 | * | Electrux joined #nim |
22:19:27 | * | Electrux quit (Ping timeout: 240 seconds) |
22:19:43 | Yardanico | https://forum.nim-lang.org/t/1 :P |
22:20:34 | Yardanico | it's amazing that https://forum.nim-lang.org/profile/leledumbo was in the first thread on this forum and on the thread about forum update :) |
22:21:00 | dom96 | leledumbo has been around even before me :) |
22:23:04 | Yardanico | there was a clang(llvm) backend?!! https://forum.nim-lang.org/t/76 |
22:23:32 | Yardanico | oh, nvm, just clang c compiler |
22:24:32 | Yardanico | look at this beauty! http://web.archive.org/web/20110905070628/http://force7.de:80/nimrod/ |
22:24:50 | * | Electrux joined #nim |
22:27:06 | * | jzeus joined #nim |
22:27:07 | dom96 | Yep, we've come far :) |
22:27:42 | * | rockcavera quit (Remote host closed the connection) |
22:28:02 | * | jdhorwitz joined #nim |
22:29:12 | dom96 | http://web.archive.org/web/20100405011853/http://force7.de:80/heimdall/viewforum.php?f=2 |
22:29:53 | dom96 | Wish we still had the DB for that phpBB forum |
22:29:55 | * | Electrux quit (Ping timeout: 260 seconds) |
22:30:00 | dom96 | I wonder if Araq saved it somewhere |
22:30:25 | FromGitter | <kayabaNerve> @Varriount years ago |
22:30:31 | dom96 | You can still see my first post though: "Sockets question" :D |
22:30:58 | FromGitter | <kayabaNerve> I would've been 8 |
22:31:32 | * | jdhorwitz quit (Client Quit) |
22:32:17 | FromGitter | <kayabaNerve> I'm not that old now so it's not like I played at 22 |
22:34:59 | * | Electrux joined #nim |
22:36:19 | Yardanico | @kayabaNerve I was 8 when first Nim(rod) public version was released :D |
22:36:53 | FromDiscord | <awr> Yardanico have you seen nlvm before? |
22:37:01 | FromDiscord | <awr> https://github.com/arnetheduck/nlvm |
22:38:00 | Yardanico | @awr yes, of course :) |
22:38:16 | Yardanico | I've seen a lot of Nim-related projects |
22:43:42 | FromGitter | <kayabaNerve> Have you seen |
22:43:49 | FromGitter | <kayabaNerve> The program |
22:43:49 | FromGitter | <kayabaNerve> They |
22:43:53 | FromGitter | <kayabaNerve> *that |
22:44:02 | FromGitter | <kayabaNerve> Just prints out all my cryptocurrency addresses? |
22:44:13 | FromGitter | <kayabaNerve> Costs $20. Massive hit in eastern Europe... |
22:47:38 | FromGitter | <kayabaNerve> Also, how old are you Yardanico? Has Nim been public for 5 or 6 years now? |
22:47:41 | FromGitter | <kayabaNerve> Or longer? |
22:48:06 | FromGitter | <kayabaNerve> You sound 13-16 0_0 just younger than me |
22:48:15 | dom96 | kayabaNerve: Since 2008 |
22:48:24 | FromGitter | <kayabaNerve> Oh damn. 10 years |
22:48:34 | FromGitter | <kayabaNerve> So then you are older. Cool beans. |
22:49:21 | FromGitter | <kayabaNerve> I would've been 6 |
23:06:26 | * | elrood quit (Quit: Leaving) |
23:21:36 | * | max3 quit (Quit: Connection closed for inactivity) |
23:25:59 | skrylar | well. wrote a wrapper for WORLD |
23:28:28 | FromGitter | <data-man> For this https://en.wikipedia.org/wiki/World ? :) |
23:33:48 | skrylar | not quite https://github.com/mmorise/World :P |
23:41:33 | FromGitter | <kayabaNerve> @data-man Did you follow me on Medium |
23:41:54 | FromGitter | <kayabaNerve> Or did someone steal your username? |
23:42:04 | FromGitter | <data-man> It's me :) |
23:42:10 | FromGitter | <kayabaNerve> Thanks :D |
23:42:27 | FromGitter | <kayabaNerve> I'm not the only one but that was sent around quite a bit. First follower. |
23:45:58 | * | xkapastel quit (Quit: Connection closed for inactivity) |