| 00:07:11 | * | wildlander joined #nim |
| 00:14:50 | FromDiscord | <emekoi> thanks, but my error was something else. |
| 00:24:08 | FromGitter | <data-man> Which error? |
| 00:40:07 | * | abm joined #nim |
| 00:43:07 | * | a_b_m quit (Ping timeout: 240 seconds) |
| 00:47:17 | * | a_b_m joined #nim |
| 00:51:29 | * | abm quit (Ping timeout: 272 seconds) |
| 00:58:41 | * | a__b__m joined #nim |
| 01:01:07 | * | a__b__m quit (Client Quit) |
| 01:01:43 | * | a_b_m quit (Ping timeout: 245 seconds) |
| 01:03:19 | * | krux02 quit (Remote host closed the connection) |
| 01:07:10 | * | ehmry quit (Ping timeout: 268 seconds) |
| 01:07:34 | * | ehmry joined #nim |
| 02:00:55 | FromGitter | <girng> hello I was thinking of using nim for a gameserver, good idea? |
| 02:02:31 | * | dddddd quit (Remote host closed the connection) |
| 02:02:42 | leorize | everything with nim is a good idea :) |
| 02:03:38 | FromGitter | <girng> @leorize ty, i'm coming from crystal lang |
| 02:04:29 | FromGitter | <girng> i love it, but want to try something new for a change |
| 02:04:36 | FromGitter | <girng> i've heard good things about nim |
| 02:06:06 | FromGitter | <girng> i'm wanting to create a simple ping/pong tcp server and stick it on my vps and test some stuff |
| 02:06:25 | FromGitter | <girng> i will read docs and tuts now and come back if i run into anything ty |
| 02:31:48 | * | NimBot joined #nim |
| 02:45:29 | * | ekl- joined #nim |
| 02:51:43 | * | ekl- quit (Ping timeout: 245 seconds) |
| 02:57:02 | * | ftsf joined #nim |
| 03:08:17 | FromDiscord | <emekoi> i keep getting error when i try to get the address of a let variable with`unsafeAddr`. i get: `Error: expression has no address; maybe use 'unsafeAddr'`. |
| 03:15:44 | leorize | emekoi: can you give us the example code? |
| 03:20:41 | * | cspar joined #nim |
| 03:23:19 | FromDiscord | <emekoi> this is on devel currenty: https://paste.ee/p/flC3I |
| 03:31:04 | leorize | looks like a parser bug of sorts |
| 03:31:20 | leorize | if you extract the unsafeAddr part to a variable, then it work |
| 03:31:24 | FromGitter | <data-man> In devel-branch there is ```proc toOpenArrayByte*(x: string; first, last: int): openarray[byte]``` Use it. |
| 03:33:26 | FromDiscord | <emekoi> yeah, i need to update my devel |
| 03:33:39 | leorize | emekoi: please file an issue for that snippet |
| 03:34:30 | FromDiscord | <emekoi> ok |
| 03:43:51 | FromGitter | <data-man> No. The compiler is always right! :) You need to check ```yourstring.len != 0``` |
| 03:54:02 | FromDiscord | <emekoi> the string length wasn't 0, but `toOpenArrayByte` works like a charm! |
| 03:59:03 | FromGitter | <data-man> I know ;) https://github.com/nim-lang/Nim/pull/7820 |
| 04:00:37 | FromDiscord | <emekoi> kinda offtopic but does anyone know how you would get arguments passed to a function written in assembly? |
| 04:06:55 | FromGitter | <MisterBianco> Passing arguments in assembly is done by pushing values to the stack and popping them in the reverse order in which you pushed them. |
| 04:31:49 | FromDiscord | <emekoi> so in the assembly i would have `pop eax`, `pop ecx`? and is `mov eax, [esp+4]` and `mov ecx, [esp+8]` equivalent when the args are 32bit ints? |
| 04:32:30 | leorize | emekoi: https://nim-lang.org/docs/manual.html#statements-and-expressions-assembler-statement |
| 04:32:51 | leorize | the example shows how to access them |
| 04:44:19 | FromDiscord | <emekoi> i know how to use the asm statement. i'm building a "JIT" compiler in nim and i trying to jit a proc that adds two numbers, but keep getting weird results. |
| 04:53:30 | FromGitter | <rayman22201> https://www.csee.umbc.edu/~chang/cs313.s02/stack.shtml |
| 04:53:44 | FromGitter | <rayman22201> @emekoi |
| 05:03:12 | FromGitter | <rayman22201> nim uses standard C calling convention, so, assuming you have the address of the stack (ESP on x86) you should be able to do some simple math to get the arguments. |
| 05:07:41 | FromGitter | <data-man> @emekoi: Maybe useful for you https://github.com/jangko/nimJIT (unfortunately, it's not finished) Just for future ideas. |
| 05:10:52 | FromGitter | <rayman22201> @emekoi: It's possible that your math might be off. IDK the types of the arguments, but I think it's EBP + 8 and EBP + 12 (at least on a 64bit machine) |
| 05:11:04 | FromGitter | <rayman22201> for ints |
| 05:11:51 | FromGitter | <rayman22201> @data-man that looks neat |
| 05:14:36 | FromDiscord | <emekoi> does anyone know the new location for nimblecache? |
| 05:14:54 | FromDiscord | <emekoi> *nimcache |
| 05:15:07 | FromDiscord | <emekoi> nvm i found it |
| 05:16:49 | FromGitter | <data-man> IMO, the best way is to wrap some C/C++ library. E.g. GNU lightning, libjit, asmjit, xbyak and so on. |
| 05:20:11 | FromDiscord | <emekoi> yeah, but i want to do it from scratch... |
| 05:24:45 | FromGitter | <data-man> Of course it's very exciting. Good luck! |
| 05:32:36 | FromDiscord | <emekoi> thanks! |
| 05:41:27 | FromGitter | <Araq> use luajit's approach. |
| 05:43:09 | FromGitter | <Araq> @rayman22201 actually Nim on Windows uses the `fastcall` calling convention. |
| 05:45:46 | FromGitter | <rayman22201> Oh really |
| 05:45:56 | FromGitter | <rayman22201> Interesting. Good to know |
| 05:47:39 | FromGitter | <rayman22201> That's actually pretty cool that nim uses fastcall |
| 05:50:28 | FromDiscord | <emekoi> yeah, i'm on windows so i VirtualAlloc some memory, write to itm then set it to be executable. right now i'm using nasm to emit the machine code until i write an assembler myelf. i'm thinking about using templates or macros to try to generate the machine code at compile time. |
| 05:58:39 | FromGitter | <Araq> check out LuaJIT, it uses a custom DSL-to-C intermediate step that can be reproduced with Nim's macro system |
| 05:59:32 | FromDiscord | <emekoi> i've used dynasm before, and apart from the preprocessor step it was quite nice. |
| 06:40:40 | FromDiscord | <treeform> Hey guys, thoughts or feedback on my OpenAL wrapper: https://github.com/treeform/openal ? |
| 06:42:20 | leorize | I think it would be better without `al` prefix |
| 06:44:06 | leorize | and certainly `ALuint` and friends isn't helpful at all |
| 06:44:08 | FromDiscord | <treeform> leorize, I am just following convention on how nim's OpenGL library works. |
| 06:44:50 | FromDiscord | <treeform> https://github.com/nim-lang/opengl/blob/master/src/opengl/private/types.nim |
| 06:45:03 | FromDiscord | <treeform> I think its best to be consistent with existing things. |
| 06:45:07 | leorize | they're private for a reason... |
| 06:45:47 | FromDiscord | <treeform> They are public because of *, but they are in private dir, which I did not copy. |
| 06:47:24 | FromDiscord | <treeform> I wanted to wrap OpenAL as close to C as possible. But I also want to make a high level API that does sound at a later date. That will be way more nim-like. |
| 06:47:35 | FromDiscord | <treeform> Have you used nim's OpenGL library? |
| 06:47:47 | leorize | no, but I've used the sdl2 library |
| 06:48:28 | leorize | it strips away the SDL_ prefix for most of the stuff, which I personally prefer |
| 06:48:49 | FromDiscord | <treeform> I have not used the sdl2, did the glfw+OpenGL. |
| 06:49:38 | FromDiscord | <treeform> I agree prefix can be obnoxious. But they do make the C code and nim code look more alike. Hmm ill think about this. |
| 06:53:11 | leorize | the only reason why they have prefixes on everything is because C doesn't have a namespace system |
| 06:53:33 | leorize | if you want Nim code to look more like C, you can just do <moduleName>.<proc>() |
| 06:53:40 | FromDiscord | <treeform> but why does nim's openGL lib keep the prefixes? |
| 06:55:45 | leorize | no idea, but it's also worth to note that many other wrappers tend to strip the prefix |
| 06:58:41 | * | miran joined #nim |
| 07:40:10 | * | Trustable joined #nim |
| 07:43:03 | * | dddddd joined #nim |
| 07:48:00 | FromGitter | <Araq> wrappers should strip away the prefixes. |
| 07:49:52 | FromGitter | <Araq> it's nice that you plan to have a high level API too, but 100s of `template foo(args) = prefix_foo(args)` helpers are worse than starting without the prefixes. Usually >80% of the calls are already "high level". |
| 08:03:31 | * | gmpreussner_ quit (Quit: kthxbye) |
| 08:03:46 | * | gmpreussner joined #nim |
| 08:29:05 | FromGitter | <mratsim> @emekoi check the tutorials to build a JIT for Brainfuck. I wanted to explore that as well but figures it’s too time consuming while I have loads of other stuff I want to do |
| 08:30:34 | * | cspar quit (Ping timeout: 240 seconds) |
| 08:33:37 | * | cspar joined #nim |
| 08:35:46 | FromGitter | <xmonader> @dom96 from what i see in redis client source code it doesn't support returnting nested array `RedisList` is just `seq[RedisString]` not a seq of redis objects? |
| 08:44:07 | FromGitter | <xmonader> https://github.com/nim-lang/redis/issues/11 |
| 08:44:38 | FromGitter | <Araq> @xmonader fix it, change it |
| 08:44:53 | FromGitter | <Araq> make a pull request |
| 08:45:15 | FromGitter | <xmonader> @Araq yeah i'm digging into the code |
| 08:47:31 | * | wildlander quit (Quit: Konversation terminated!) |
| 08:48:36 | ftsf | seems like it'd be difficult to do as a macro? but I'm not good with macros |
| 08:48:40 | * | ftsf quit (Quit: Leaving) |
| 08:49:44 | FromGitter | <mratsim> are you talking about “this” fits? |
| 08:49:52 | FromGitter | <mratsim> ftsf* |
| 08:50:08 | FromGitter | <dom96> How do you get such nesting @xmonader? |
| 08:52:39 | FromGitter | <xmonader> @dom96 we implement servers on redis protocol try executing scan here ⏎ redis-cli -h playground.hub.grid.tf -p 9910 |
| 08:56:04 | * | Facilitating joined #nim |
| 09:00:49 | * | Facilitating quit (Remote host closed the connection) |
| 09:03:33 | FromGitter | <Araq> are there any pure Nim compression libs around? |
| 09:05:49 | * | krux02 joined #nim |
| 09:10:39 | FromGitter | <dom96> Not at a computer right now. But I believe you :) |
| 09:11:19 | FromGitter | <dom96> @Araq untar but that's for decompression |
| 09:13:22 | FromGitter | <xmonader> @dom96 to change this i need to convert to a variant or something else? |
| 09:13:47 | FromGitter | <xmonader> i'd like to do minimal changes in the code without lots of impacts |
| 09:16:46 | FromGitter | <data-man> @Araq https://github.com/jangko/nimz |
| 09:21:09 | FromGitter | <mratsim> I thought that was the point of this :P https://github.com/NimCompression |
| 09:21:40 | FromGitter | <mratsim> You can ask Bulat to build one maybe he is a compression expert: https://github.com/Bulat-Ziganshin |
| 09:25:12 | * | PMunch joined #nim |
| 09:32:40 | FromGitter | <xmonader> Is there a way to have seq[object] ?or seq[any] ? or it requires a variant? |
| 09:41:29 | PMunch | What problem are you trying to solve xmonader? |
| 09:43:44 | PMunch | Just checked and 24th Nov. is the deadline for proposing a lighting talk at FOSDEM |
| 09:43:51 | PMunch | So we still have some time |
| 09:46:43 | * | leorize quit (Ping timeout: 252 seconds) |
| 09:47:24 | * | leorize joined #nim |
| 09:56:49 | FromGitter | <xmonader> @PMunch I want a definition for RedisList to be flexible enough to hold any redis value (str, int, list, ..) |
| 09:56:58 | FromGitter | <xmonader> without having to drastically change the code |
| 09:59:43 | * | stefanos82 joined #nim |
| 10:04:10 | * | bitstoppa[m] quit (Read error: Connection reset by peer) |
| 10:04:10 | * | sg-james[m] quit (Remote host closed the connection) |
| 10:04:10 | * | syntonym[m] quit (Read error: Connection reset by peer) |
| 10:04:12 | * | codevance[m] quit (Remote host closed the connection) |
| 10:04:13 | * | Connor[m]1 quit (Read error: Connection reset by peer) |
| 10:04:16 | * | stisa[m] quit (Remote host closed the connection) |
| 10:04:17 | * | sendell[m] quit (Remote host closed the connection) |
| 10:04:17 | * | narimiran[m] quit (Remote host closed the connection) |
| 10:04:18 | * | endes[m] quit (Read error: Connection reset by peer) |
| 10:04:18 | * | zacharycarter[m] quit (Read error: Connection reset by peer) |
| 10:04:19 | * | xomachine[m] quit (Remote host closed the connection) |
| 10:04:19 | * | SolitudeSF[m] quit (Remote host closed the connection) |
| 10:04:20 | * | dyce[m] quit (Write error: Broken pipe) |
| 10:04:20 | * | TheKing[m] quit (Write error: Broken pipe) |
| 10:04:20 | * | zielmicha[m] quit (Remote host closed the connection) |
| 10:04:20 | * | GitterIntegratio quit (Remote host closed the connection) |
| 10:04:21 | * | TheManiac[m] quit (Remote host closed the connection) |
| 10:04:21 | * | spymasterd[m] quit (Read error: Connection reset by peer) |
| 10:04:23 | * | yglukhov[m] quit (Remote host closed the connection) |
| 10:04:24 | * | hitchhooker[m] quit (Write error: Connection reset by peer) |
| 10:04:25 | * | Demos[m] quit (Read error: Connection reset by peer) |
| 10:04:25 | * | macsek1911[m] quit (Remote host closed the connection) |
| 10:04:25 | * | toofly[m] quit (Remote host closed the connection) |
| 10:04:25 | * | petersjt014[m] quit (Remote host closed the connection) |
| 10:04:25 | * | Miguelngel[m] quit (Remote host closed the connection) |
| 10:04:26 | * | unclechu[m] quit (Remote host closed the connection) |
| 10:04:26 | * | jaens[m] quit (Read error: Connection reset by peer) |
| 10:04:26 | * | pqflx3[m] quit (Read error: Connection reset by peer) |
| 10:04:26 | * | gh0st[m] quit (Write error: Connection reset by peer) |
| 10:04:59 | dom96 | xmonader: you need a variant |
| 10:06:37 | dom96 | It sucks a bit. But the redis module needs changes anyway |
| 10:06:42 | dom96 | A) It uses nil |
| 10:06:52 | dom96 | and it has this weird `redisNil` thing which I want to get rid of |
| 10:08:52 | FromGitter | <Araq> +1 |
| 10:10:28 | * | pqflx3[m] joined #nim |
| 10:11:18 | * | Compu joined #nim |
| 10:14:52 | PMunch | Hmm, can't you do "export some/thing" |
| 10:15:08 | PMunch | I want to have "import sdl2/image; export sdl2/image" |
| 10:15:22 | * | Compu quit (Killed (Unit193 (Spam is not permitted on freenode.))) |
| 10:15:24 | dom96 | You can AFAIK |
| 10:15:29 | PMunch | Trying to add some common imports and types into a single file |
| 10:15:36 | FromGitter | <mratsim> you need to export image |
| 10:15:41 | FromGitter | <mratsim> not sdl2/image |
| 10:15:50 | PMunch | Ah |
| 10:15:55 | PMunch | That's confusing :P |
| 10:21:06 | * | hitchhooker[m] joined #nim |
| 10:21:06 | * | bitstoppa[m] joined #nim |
| 10:21:06 | * | gh0st[m] joined #nim |
| 10:21:07 | * | codevance[m] joined #nim |
| 10:21:07 | * | GitterIntegratio joined #nim |
| 10:21:07 | * | TheKing[m] joined #nim |
| 10:21:07 | * | yglukhov[m] joined #nim |
| 10:21:07 | * | unclechu[m] joined #nim |
| 10:21:08 | * | Demos[m] joined #nim |
| 10:21:08 | * | dyce[m] joined #nim |
| 10:21:13 | * | narimiran[m] joined #nim |
| 10:21:13 | * | petersjt014[m] joined #nim |
| 10:21:14 | * | macsek1911[m] joined #nim |
| 10:21:14 | * | TheManiac[m] joined #nim |
| 10:21:14 | * | sendell[m] joined #nim |
| 10:21:14 | * | zacharycarter[m] joined #nim |
| 10:21:14 | * | sg-james[m] joined #nim |
| 10:21:14 | * | jaens[m] joined #nim |
| 10:21:14 | * | stisa[m] joined #nim |
| 10:21:14 | * | syntonym[m] joined #nim |
| 10:21:14 | * | endes[m] joined #nim |
| 10:21:14 | * | Connor[m]1 joined #nim |
| 10:21:15 | * | zielmicha[m] joined #nim |
| 10:21:15 | * | toofly[m] joined #nim |
| 10:21:16 | * | SolitudeSF[m] joined #nim |
| 10:21:17 | * | spymasterd[m] joined #nim |
| 10:21:20 | * | xomachine[m] joined #nim |
| 10:21:20 | * | Miguelngel[m] joined #nim |
| 10:33:09 | dom96 | PMunch: RFC :P |
| 10:41:15 | * | noonien joined #nim |
| 10:44:24 | * | Vladar joined #nim |
| 10:46:54 | * | nsf joined #nim |
| 11:01:58 | FromGitter | <bung87> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b8a71a6f86b741b05f2e3f8] |
| 11:02:27 | FromGitter | <bung87> how to do it right ? very slow |
| 11:03:08 | FromGitter | <Araq> it's perfectly logical imo, you can only export the symbols you already have available, so it's `export module.foo` or just `export foo` and not `export module/foo` |
| 11:14:41 | FromGitter | <bung87> never mind |
| 11:26:12 | PMunch | Hmm, I guess that makes sense |
| 11:27:51 | * | Trustable quit (Remote host closed the connection) |
| 11:35:30 | * | Perkol joined #nim |
| 11:37:01 | FromGitter | <mratsim> @bung87, I suppose it’s a benchmark because you can just take the last line. It’s always the same issue, avoid allocating memory: lcut will allocate, join will allocate. I don’t know what cut does but if it’s supposed to replace new lines by '/', just use replace |
| 11:44:06 | FromGitter | <Araq> with the new runtime you will be able to do `withScratchRegion: <stuff here>` and keep the allocation heavy code |
| 11:44:18 | FromGitter | <Araq> and yet it will run much faster. |
| 11:44:27 | FromGitter | <Araq> well this will need some benchmarking :-) |
| 11:52:08 | * | kapil___ joined #nim |
| 11:53:27 | FromGitter | <bung87> hmm still have no idea about how to avoiding this, compare to python a little bit faster but to c++ benchmark ,very slow. |
| 11:55:35 | FromGitter | <bung87> @mratsim you can see the code here https://github.com/bung87/finalseg/blob/master/src/finalseg.nim |
| 11:58:14 | FromGitter | <bung87> the project is all about string or seq of string , so if it get optimized, speed gets up . |
| 11:59:02 | krux02 | bung87: there isn't much that can be optimized in seq or string |
| 11:59:03 | FromGitter | <mratsim> I’m pretty sure the C++ is reusing buffers everywhere to avoid allocation |
| 11:59:25 | krux02 | but sometimes it might be better to use a single string with separators instead of seq[string] |
| 11:59:36 | krux02 | seq[string] is non-local memory |
| 12:00:10 | krux02 | scanning through every string is a seq of string can be scanning though fragmented memory, which is slow |
| 12:00:48 | FromGitter | <mratsim> anyway, if you want to optimize this, if you’re on mac, compile with `-d:release` and run it with “Apple Instruments" |
| 12:02:26 | FromGitter | <mratsim> Then locate the parts where you code spend the most time like I do here: https://github.com/mratsim/Arraymancer/issues/195 |
| 12:03:09 | FromGitter | <mratsim> or here: https://github.com/mratsim/Arraymancer/issues/221 |
| 12:03:58 | FromGitter | <mratsim> Once located, rewrite the code. |
| 12:04:42 | FromGitter | <mratsim> If you’re not on Mac, you need to find something similar to the Time Profiler in Apple Instruments |
| 12:05:56 | krux02 | valgrind chachegrind |
| 12:06:28 | FromGitter | <bung87> ok thanks, aware of I removed xcode to save bandwidth ... |
| 12:06:48 | krux02 | https://github.com/gperftools/gperftools |
| 12:06:51 | FromGitter | <Araq> runes = sentence.toRunes() # slow and not required |
| 12:07:27 | * | cspar quit (Ping timeout: 240 seconds) |
| 12:07:39 | FromGitter | <bung87> c++ version all pass a iterator before perform string result |
| 12:08:46 | * | zachcarter joined #nim |
| 12:09:16 | FromGitter | <Araq> and the code screams "I want a real parser" |
| 12:09:18 | FromGitter | <bung87> @Araq viterbi proc not requires but in `iterator internal_cut` needs slice |
| 12:10:47 | FromGitter | <Araq> speaking of which ... |
| 12:11:14 | * | FromGitter * Araq removes bullshit startsWith parsing from nimsuggest's tester. Amateurs. |
| 12:11:23 | FromGitter | <bung87> https://github.com/bung87/finalseg/blob/8ea55633466b00ea412fbea02b583f5ecc551ac3/src/finalseg.nim#L141 |
| 12:13:48 | * | Perkol quit (Quit: Leaving) |
| 12:16:37 | FromGitter | <bung87> you meaning parsing first word and then computing is bad? |
| 12:24:20 | FromGitter | <mratsim> I think Araq means, if speed is critical, implement a state-machine based parser. |
| 12:24:27 | FromGitter | <mratsim> aka a real parser |
| 12:31:22 | FromGitter | <Araq> look at Nim's `scanf` for inspiration |
| 12:33:05 | * | MrElendig1 joined #nim |
| 12:35:37 | * | skrylar joined #nim |
| 12:37:52 | * | MrElendig1 quit (Remote host closed the connection) |
| 12:46:16 | FromGitter | <mratsim> @timotheecour I think this https://github.com/nim-lang/Nim/issues/8432 should be renamed [Regression] Closure + Generics leads to stack overflow in VM |
| 12:52:54 | dom96 | I'm really disappointed in Freenode right now |
| 12:53:00 | dom96 | The channel is /still/ being spammed |
| 12:54:46 | federico3 | is it? |
| 12:58:09 | krux02 | I don't see spam |
| 12:58:28 | krux02 | dom96, is there a spam filter in this channel? |
| 12:58:39 | dom96 | Yes, all unregistered users are muted |
| 12:58:43 | dom96 | I can see them because I've got +o |
| 12:59:26 | FromGitter | <bung87> @Araq @mratsim thanks, learning it |
| 12:59:31 | krux02 | the unregistered user get notified that they ar muted? |
| 13:03:58 | krux02 | mratsim: "`nim c test.nim` fails" is not a good name for an issue |
| 13:04:10 | krux02 | the problem is not that the test fails |
| 13:04:12 | krux02 | it is your test |
| 13:04:18 | krux02 | not a test in nim |
| 13:04:42 | * | cspar joined #nim |
| 13:04:43 | FromGitter | <mratsim> I wasn’t the one who raised the issue |
| 13:04:57 | krux02 | oh sorry |
| 13:05:12 | FromGitter | <mratsim> if anything we both agree ;) |
| 13:05:15 | krux02 | timotheecour: I meant you |
| 13:07:55 | FromGitter | <mratsim> Wasn’t it possible to doAssert all expressions in a block? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b8a8f2bc9500b4bab682c7e] |
| 13:08:52 | FromGitter | <mratsim> (I can use a macro but iirc we could do that, or I’m confusing with check: in unittest) |
| 13:23:44 | * | cspar quit (Ping timeout: 244 seconds) |
| 13:27:29 | * | cspar joined #nim |
| 13:35:12 | krux02 | that is not really possible with a macro |
| 13:35:59 | krux02 | the sem checker will complain about unused bool |
| 13:36:44 | krux02 | andyou need the sem checker before the macro invocation to insert an assert at all bool expressions |
| 13:42:29 | FromGitter | <mratsim> the `check` macro in unittest manages to do it. |
| 13:42:51 | FromGitter | <mratsim> but maybe it doesn’t check for statement vs expressions |
| 13:52:55 | dom96 | krux02: they aren't notified |
| 13:57:22 | * | nsf quit (Quit: WeeChat 2.2) |
| 13:57:38 | krux02 | dom96: they should |
| 14:54:04 | * | xet7 quit (Ping timeout: 240 seconds) |
| 14:56:11 | * | TheLemonMan joined #nim |
| 15:04:10 | * | cspar quit (Ping timeout: 246 seconds) |
| 15:17:42 | * | cspar joined #nim |
| 15:30:28 | * | xet7 joined #nim |
| 15:38:46 | * | miran quit (Ping timeout: 272 seconds) |
| 15:40:26 | * | kapil___ quit (Quit: Connection closed for inactivity) |
| 16:03:39 | FromGitter | <xmonader> How do i pass nil to a variant object? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b8ab85a4be56c5918c8f065] |
| 16:03:57 | FromGitter | <xmonader> `````` |
| 16:05:41 | FromGitter | <xmonader> I see ⏎ ⏎ ``` redisNil* = "\0\0"``` ⏎ ⏎ is it the expected value instead of nils? [https://gitter.im/nim-lang/Nim?at=5b8ab8d511b41f69dba62c5b] |
| 16:13:02 | * | nsf joined #nim |
| 16:15:01 | FromGitter | <xmonader> I'm going for the \0\0 for now, here's the code tell me what you think and if it's good enough i'll continue on to refactor the code in nim-lang/redis package to use it ⏎ https://github.com/xmonader/nim-resp/blob/master/src/nim_resp.nim ⏎ ⏎ and it supports recursive values ⏎ @dom96 [https://gitter.im/nim-lang/Nim?at=5b8abb0511b41f69dba63995] |
| 16:26:32 | FromGitter | <mratsim> you can’t pass nil to a stack object |
| 16:29:02 | FromGitter | <xmonader> @mratsim oh thanks! i guess \0\0 is good enough then |
| 16:30:03 | * | PMunch quit (Quit: Leaving) |
| 16:30:17 | FromGitter | <mratsim> if you cast a nil pointer to an integer you should get 0 (or ‘\0’ if you like that notation) |
| 16:31:37 | * | ATDT9113 joined #nim |
| 16:32:23 | * | sagax quit (Read error: Connection reset by peer) |
| 16:32:49 | FromGitter | <xmonader> I see thanks @mratsim :) |
| 16:38:27 | * | ATDT9113 quit (Ping timeout: 240 seconds) |
| 16:41:19 | * | SenasOzys joined #nim |
| 17:13:06 | * | smt joined #nim |
| 17:13:47 | * | ofelas joined #nim |
| 17:15:16 | * | smt quit (Client Quit) |
| 17:15:51 | * | smt joined #nim |
| 17:20:46 | * | federico3 quit (*.net *.split) |
| 17:20:56 | * | federico3 joined #nim |
| 17:30:25 | * | Gilamesh joined #nim |
| 17:33:06 | * | kapil___ joined #nim |
| 17:35:10 | * | sagax joined #nim |
| 17:35:26 | * | sagax quit (Client Quit) |
| 17:38:40 | FromDiscord | <Gilgamish> Guys I'm getitng a somewhat cryptic error message, any help is appreciated! |
| 17:38:40 | FromDiscord | <Gilgamish> |
| 17:38:40 | FromDiscord | <Gilgamish> This is the module creating the error. |
| 17:38:40 | FromDiscord | <Gilgamish> |
| 17:38:40 | FromDiscord | <Gilgamish> ``` |
| 17:38:40 | FromDiscord | <Gilgamish> type |
| 17:38:41 | FromDiscord | <Gilgamish> Map* = object |
| 17:38:42 | FromDiscord | <Gilgamish> width : int |
| 17:38:44 | FromDiscord | <Gilgamish> map : seq |
| 17:38:44 | FromDiscord | <Gilgamish> |
| 17:38:46 | FromDiscord | <Gilgamish> proc createMap(x : int, y : int) : Map = |
| 17:38:47 | FromDiscord | <Gilgamish> new Map(x, newSeq[int](x*y)) |
| 17:38:48 | FromDiscord | <Gilgamish> ``` |
| 17:38:50 | FromDiscord | <Gilgamish> |
| 17:38:51 | FromDiscord | <Gilgamish> Error: |
| 17:38:52 | FromDiscord | <Gilgamish> ``` |
| 17:38:54 | FromDiscord | <Gilgamish> Error: invalid type: 'T' in this context: 'proc (x: int, y: int): Map' for proc |
| 17:38:56 | FromDiscord | <Gilgamish> ``` |
| 17:39:10 | FromDiscord | <Gilgamish> It sounds like parameterized types error, even though I'm not using generics |
| 17:39:55 | TheLemonMan | your `map` should be a `seq[int]` instead of just `seq` |
| 17:40:35 | FromDiscord | <Gilgamish> Thanks bot! |
| 17:43:30 | * | Gilamesh quit (Quit: Page closed) |
| 17:43:53 | FromDiscord | <Gilgamish> Obs, I mean thanks TheLemonMan |
| 17:44:33 | TheLemonMan | np, I've been called worse than bot :P |
| 17:46:35 | FromDiscord | <Gilgamish> The gitterirc thing threw me off, many thanks man 😃 |
| 17:51:09 | * | nsf quit (Quit: WeeChat 2.2) |
| 17:55:51 | * | ofelas quit (Quit: shutdown -h now) |
| 17:56:31 | * | Notkea quit (*.net *.split) |
| 17:56:31 | * | ltr_ quit (*.net *.split) |
| 17:56:31 | * | euantor quit (*.net *.split) |
| 17:56:31 | * | zielmicha__ quit (*.net *.split) |
| 17:56:31 | * | pigmej quit (*.net *.split) |
| 17:56:31 | * | joshbaptiste quit (*.net *.split) |
| 17:56:44 | * | pigmej joined #nim |
| 17:56:44 | * | Notkea joined #nim |
| 17:56:55 | * | joshbaptiste joined #nim |
| 17:56:59 | * | zielmicha__ joined #nim |
| 17:57:10 | * | euantor joined #nim |
| 17:57:17 | * | pigmej is now known as Guest21953 |
| 17:59:12 | * | euantor quit (Changing host) |
| 17:59:12 | * | euantor joined #nim |
| 17:59:22 | * | SenasOzys quit (Ping timeout: 272 seconds) |
| 18:02:08 | * | ltr_ joined #nim |
| 18:07:58 | FromDiscord | <Gilgamish> getting ```Error: attempting to call undeclared routine: 'Map' ``` on: |
| 18:07:58 | FromDiscord | <Gilgamish> |
| 18:07:58 | FromDiscord | <Gilgamish> ``` |
| 18:07:58 | FromDiscord | <Gilgamish> type |
| 18:07:58 | FromDiscord | <Gilgamish> Map* = object |
| 18:07:59 | FromDiscord | <Gilgamish> width : int |
| 18:07:59 | FromDiscord | <Gilgamish> map : seq[int] |
| 18:08:00 | FromDiscord | <Gilgamish> |
| 18:08:02 | FromDiscord | <Gilgamish> proc createMap*(x : int, y : int) : Map = |
| 18:08:04 | FromDiscord | <Gilgamish> return Map(x, newSeq(x*y)) |
| 18:08:04 | FromDiscord | <Gilgamish> ``` |
| 18:08:52 | FromDiscord | <Gilgamish> I'm hoping to build a random 2d dungeone generator but moving in 2d space is quite difficult without multidimensional arrays |
| 18:08:55 | TheLemonMan | yeah, you need `Map(width: x, map: newSeq[int](x+y))` |
| 18:09:48 | FromDiscord | <Gilgamish> Ah, so you need to specify the variables in the constructor? |
| 18:10:33 | FromDiscord | <Gilgamish> Yes! it compiles, thanks! |
| 18:10:33 | TheLemonMan | yep, that's nice because you cant fuck up anything if you move the fields around |
| 18:11:36 | FromDiscord | <Gilgamish> Yeah I can see why it's designed like that. That way certain errors can be caught. |
| 18:17:05 | FromGitter | <ephja> now we just need it for procs and to make use of more distinct types :-) |
| 18:20:04 | TheLemonMan | ahh, I hate when the bootstrap unveils new bugs in a PR :P |
| 18:20:39 | * | Trustable joined #nim |
| 18:22:03 | * | miran joined #nim |
| 18:34:10 | * | NSCLRP-1 joined #nim |
| 18:38:53 | * | NSCLRP-1 quit (Remote host closed the connection) |
| 18:38:54 | * | Vladar quit (Read error: Connection reset by peer) |
| 18:39:30 | * | Vladar joined #nim |
| 18:44:11 | * | SenasOzys joined #nim |
| 18:58:21 | * | ofelas joined #nim |
| 19:02:44 | * | nsf joined #nim |
| 19:17:56 | * | xomachine[m] quit (Remote host closed the connection) |
| 19:17:56 | * | Demos[m] quit (Remote host closed the connection) |
| 19:17:57 | * | unclechu[m] quit (Read error: Connection reset by peer) |
| 19:17:57 | * | Miguelngel[m] quit (Remote host closed the connection) |
| 19:17:57 | * | narimiran[m] quit (Write error: Connection reset by peer) |
| 19:17:58 | * | bitstoppa[m] quit (Remote host closed the connection) |
| 19:17:58 | * | jaens[m] quit (Read error: Connection reset by peer) |
| 19:17:59 | * | stisa[m] quit (Read error: Connection reset by peer) |
| 19:17:59 | * | dyce[m] quit (Read error: Connection reset by peer) |
| 19:18:03 | * | TheKing[m] quit (Write error: Connection reset by peer) |
| 19:18:04 | * | yglukhov[m] quit (Remote host closed the connection) |
| 19:18:04 | * | GitterIntegratio quit (Remote host closed the connection) |
| 19:18:04 | * | syntonym[m] quit (Remote host closed the connection) |
| 19:18:06 | * | petersjt014[m] quit (Read error: Connection reset by peer) |
| 19:18:06 | * | codevance[m] quit (Read error: Connection reset by peer) |
| 19:18:06 | * | endes[m] quit (Read error: Connection reset by peer) |
| 19:18:06 | * | Connor[m]1 quit (Read error: Connection reset by peer) |
| 19:18:08 | * | sendell[m] quit (Remote host closed the connection) |
| 19:18:08 | * | zacharycarter[m] quit (Remote host closed the connection) |
| 19:18:08 | * | TheManiac[m] quit (Read error: Connection reset by peer) |
| 19:18:08 | * | spymasterd[m] quit (Read error: Connection reset by peer) |
| 19:18:09 | * | macsek1911[m] quit (Read error: Connection reset by peer) |
| 19:18:10 | * | SolitudeSF[m] quit (Remote host closed the connection) |
| 19:18:10 | * | gh0st[m] quit (Read error: Connection reset by peer) |
| 19:18:11 | * | hitchhooker[m] quit (Remote host closed the connection) |
| 19:18:11 | * | sg-james[m] quit (Remote host closed the connection) |
| 19:18:12 | * | zielmicha[m] quit (Remote host closed the connection) |
| 19:18:12 | * | toofly[m] quit (Remote host closed the connection) |
| 19:18:12 | * | pqflx3[m] quit (Remote host closed the connection) |
| 19:18:40 | * | Perkol joined #nim |
| 19:22:32 | * | PMunch joined #nim |
| 19:22:36 | * | SitiSchu joined #nim |
| 19:25:24 | * | pqflx3[m] joined #nim |
| 19:25:39 | * | pqflx3[m] quit (Remote host closed the connection) |
| 19:36:07 | * | pqflx3[m] joined #nim |
| 19:42:52 | * | bitstoppa[m] joined #nim |
| 19:42:52 | * | codevance[m] joined #nim |
| 19:42:52 | * | TheKing[m] joined #nim |
| 19:42:53 | * | yglukhov[m] joined #nim |
| 19:42:53 | * | GitterIntegratio joined #nim |
| 19:42:53 | * | unclechu[m] joined #nim |
| 19:42:53 | * | Demos[m] joined #nim |
| 19:42:53 | * | dyce[m] joined #nim |
| 19:42:58 | * | sg-james[m] joined #nim |
| 19:42:58 | * | narimiran[m] joined #nim |
| 19:42:58 | * | hitchhooker[m] joined #nim |
| 19:42:59 | * | zacharycarter[m] joined #nim |
| 19:42:59 | * | Connor[m]1 joined #nim |
| 19:42:59 | * | petersjt014[m] joined #nim |
| 19:42:59 | * | macsek1911[m] joined #nim |
| 19:42:59 | * | sendell[m] joined #nim |
| 19:42:59 | * | gh0st[m] joined #nim |
| 19:42:59 | * | jaens[m] joined #nim |
| 19:43:00 | * | TheManiac[m] joined #nim |
| 19:43:00 | * | endes[m] joined #nim |
| 19:43:00 | * | stisa[m] joined #nim |
| 19:43:00 | * | Miguelngel[m] joined #nim |
| 19:43:00 | * | xomachine[m] joined #nim |
| 19:43:01 | * | spymasterd[m] joined #nim |
| 19:43:01 | * | toofly[m] joined #nim |
| 19:43:01 | * | zielmicha[m] joined #nim |
| 19:43:01 | * | SolitudeSF[m] joined #nim |
| 19:43:02 | * | syntonym[m] joined #nim |
| 19:51:59 | * | PMunch quit (Remote host closed the connection) |
| 19:55:07 | * | PMunch joined #nim |
| 20:11:13 | FromGitter | <kayabaNerve> Here's an interesting bug. Looks to be my code, but not Nim... |
| 20:11:24 | FromGitter | <kayabaNerve> Though I did find a bug in Nim along the way. |
| 20:11:28 | * | thor77 quit (Quit: ZNC 1.7.1 - https://znc.in) |
| 20:12:02 | * | thor77 joined #nim |
| 20:12:16 | FromGitter | <kayabaNerve> https://github.com/EmberCrypto/Events/blob/master/events.nim ⏎ https://github.com/EmberCrypto/Events/blob/master/examples/A.nim ⏎ ⏎ Only the last defined event works. [https://gitter.im/nim-lang/Nim?at=5b8af2a0f86b741b05f5a0b7] |
| 20:24:46 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
| 20:28:30 | FromGitter | <kayabaNerve> Fixed it. ⏎ ⏎ ```Table[] = cast[HandlerParent]( ⏎ Handler[T]( ⏎ value: value ⏎ ) ⏎ )``` ⏎ ⏎ I have no idea why it matters but it does. [https://gitter.im/nim-lang/Nim?at=5b8af66ec9500b4bab6a5f3a] |
| 20:29:48 | * | Perkol quit (Remote host closed the connection) |
| 20:56:35 | * | rockcavera quit (Remote host closed the connection) |
| 21:03:28 | * | Jesin quit (Quit: Leaving) |
| 21:06:07 | * | miran quit (Ping timeout: 240 seconds) |
| 21:06:12 | * | ofelas quit (Quit: shutdown -h now) |
| 21:08:03 | * | Jesin joined #nim |
| 21:08:32 | * | rockcavera joined #nim |
| 21:16:08 | * | rory9 joined #nim |
| 21:16:26 | * | rory9 quit (Remote host closed the connection) |
| 21:21:24 | * | stefanos82 quit (Quit: Quitting for now...) |
| 21:52:08 | * | kapil___ quit (Quit: Connection closed for inactivity) |
| 22:45:58 | * | Trustable quit (Remote host closed the connection) |
| 22:55:09 | FromGitter | <bung87> what's Bitwise OR ,Bitwise AND operator in Nim ? |
| 22:56:36 | FromGitter | <ephja> or/and :-P |
| 22:59:18 | FromGitter | <bung87> wow just that |
| 23:02:19 | FromGitter | <ephja> there's no need for separate operators because of the more precise typing compared to C |
| 23:12:31 | * | Vladar quit (Remote host closed the connection) |
| 23:18:36 | * | nsf quit (Quit: WeeChat 2.2) |
| 23:24:48 | FromGitter | <bung87> thanks ! I barely use these know these in js and python |
| 23:36:18 | * | Sembei joined #nim |
| 23:46:06 | * | norkle4 joined #nim |
| 23:46:33 | * | By joined #nim |
| 23:46:46 | * | norkle4 quit (Remote host closed the connection) |
| 23:54:51 | FromGitter | <bung87> I got `MD5Digest` and it can use `$` convert to string, but how to do like `parseInt('0cc175b9c0f1b6a831c399e269772661',16)` |