<< 01-09-2018 >>

00:07:11*wildlander joined #nim
00:14:50FromDiscord<emekoi> thanks, but my error was something else.
00:24:08FromGitter<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:55FromGitter<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:42leorizeeverything with nim is a good idea :)
02:03:38FromGitter<girng> @leorize ty, i'm coming from crystal lang
02:04:29FromGitter<girng> i love it, but want to try something new for a change
02:04:36FromGitter<girng> i've heard good things about nim
02:06:06FromGitter<girng> i'm wanting to create a simple ping/pong tcp server and stick it on my vps and test some stuff
02:06:25FromGitter<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:17FromDiscord<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:44leorizeemekoi: can you give us the example code?
03:20:41*cspar joined #nim
03:23:19FromDiscord<emekoi> this is on devel currenty: https://paste.ee/p/flC3I
03:31:04leorizelooks like a parser bug of sorts
03:31:20leorizeif you extract the unsafeAddr part to a variable, then it work
03:31:24FromGitter<data-man> In devel-branch there is ```proc toOpenArrayByte*(x: string; first, last: int): openarray[byte]``` Use it.
03:33:26FromDiscord<emekoi> yeah, i need to update my devel
03:33:39leorizeemekoi: please file an issue for that snippet
03:34:30FromDiscord<emekoi> ok
03:43:51FromGitter<data-man> No. The compiler is always right! :) You need to check ```yourstring.len != 0```
03:54:02FromDiscord<emekoi> the string length wasn't 0, but `toOpenArrayByte` works like a charm!
03:59:03FromGitter<data-man> I know ;) https://github.com/nim-lang/Nim/pull/7820
04:00:37FromDiscord<emekoi> kinda offtopic but does anyone know how you would get arguments passed to a function written in assembly?
04:06:55FromGitter<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:49FromDiscord<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:30leorizeemekoi: https://nim-lang.org/docs/manual.html#statements-and-expressions-assembler-statement
04:32:51leorizethe example shows how to access them
04:44:19FromDiscord<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:30FromGitter<rayman22201> https://www.csee.umbc.edu/~chang/cs313.s02/stack.shtml
04:53:44FromGitter<rayman22201> @emekoi
05:03:12FromGitter<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:41FromGitter<data-man> @emekoi: Maybe useful for you https://github.com/jangko/nimJIT (unfortunately, it's not finished) Just for future ideas.
05:10:52FromGitter<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:04FromGitter<rayman22201> for ints
05:11:51FromGitter<rayman22201> @data-man that looks neat
05:14:36FromDiscord<emekoi> does anyone know the new location for nimblecache?
05:14:54FromDiscord<emekoi> *nimcache
05:15:07FromDiscord<emekoi> nvm i found it
05:16:49FromGitter<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:11FromDiscord<emekoi> yeah, but i want to do it from scratch...
05:24:45FromGitter<data-man> Of course it's very exciting. Good luck!
05:32:36FromDiscord<emekoi> thanks!
05:41:27FromGitter<Araq> use luajit's approach.
05:43:09FromGitter<Araq> @rayman22201 actually Nim on Windows uses the `fastcall` calling convention.
05:45:46FromGitter<rayman22201> Oh really
05:45:56FromGitter<rayman22201> Interesting. Good to know
05:47:39FromGitter<rayman22201> That's actually pretty cool that nim uses fastcall
05:50:28FromDiscord<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:39FromGitter<Araq> check out LuaJIT, it uses a custom DSL-to-C intermediate step that can be reproduced with Nim's macro system
05:59:32FromDiscord<emekoi> i've used dynasm before, and apart from the preprocessor step it was quite nice.
06:40:40FromDiscord<treeform> Hey guys, thoughts or feedback on my OpenAL wrapper: https://github.com/treeform/openal ?
06:42:20leorizeI think it would be better without `al` prefix
06:44:06leorizeand certainly `ALuint` and friends isn't helpful at all
06:44:08FromDiscord<treeform> leorize, I am just following convention on how nim's OpenGL library works.
06:44:50FromDiscord<treeform> https://github.com/nim-lang/opengl/blob/master/src/opengl/private/types.nim
06:45:03FromDiscord<treeform> I think its best to be consistent with existing things.
06:45:07leorizethey're private for a reason...
06:45:47FromDiscord<treeform> They are public because of *, but they are in private dir, which I did not copy.
06:47:24FromDiscord<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:35FromDiscord<treeform> Have you used nim's OpenGL library?
06:47:47leorizeno, but I've used the sdl2 library
06:48:28leorizeit strips away the SDL_ prefix for most of the stuff, which I personally prefer
06:48:49FromDiscord<treeform> I have not used the sdl2, did the glfw+OpenGL.
06:49:38FromDiscord<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:11leorizethe only reason why they have prefixes on everything is because C doesn't have a namespace system
06:53:33leorizeif you want Nim code to look more like C, you can just do <moduleName>.<proc>()
06:53:40FromDiscord<treeform> but why does nim's openGL lib keep the prefixes?
06:55:45leorizeno 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:00FromGitter<Araq> wrappers should strip away the prefixes.
07:49:52FromGitter<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:05FromGitter<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:46FromGitter<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:07FromGitter<xmonader> https://github.com/nim-lang/redis/issues/11
08:44:38FromGitter<Araq> @xmonader fix it, change it
08:44:53FromGitter<Araq> make a pull request
08:45:15FromGitter<xmonader> @Araq yeah i'm digging into the code
08:47:31*wildlander quit (Quit: Konversation terminated!)
08:48:36ftsfseems 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:44FromGitter<mratsim> are you talking about “this” fits?
08:49:52FromGitter<mratsim> ftsf*
08:50:08FromGitter<dom96> How do you get such nesting @xmonader?
08:52:39FromGitter<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:33FromGitter<Araq> are there any pure Nim compression libs around?
09:05:49*krux02 joined #nim
09:10:39FromGitter<dom96> Not at a computer right now. But I believe you :)
09:11:19FromGitter<dom96> @Araq untar but that's for decompression
09:13:22FromGitter<xmonader> @dom96 to change this i need to convert to a variant or something else?
09:13:47FromGitter<xmonader> i'd like to do minimal changes in the code without lots of impacts
09:16:46FromGitter<data-man> @Araq https://github.com/jangko/nimz
09:21:09FromGitter<mratsim> I thought that was the point of this :P https://github.com/NimCompression
09:21:40FromGitter<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:40FromGitter<xmonader> Is there a way to have seq[object] ?or seq[any] ? or it requires a variant?
09:41:29PMunchWhat problem are you trying to solve xmonader?
09:43:44PMunchJust checked and 24th Nov. is the deadline for proposing a lighting talk at FOSDEM
09:43:51PMunchSo we still have some time
09:46:43*leorize quit (Ping timeout: 252 seconds)
09:47:24*leorize joined #nim
09:56:49FromGitter<xmonader> @PMunch I want a definition for RedisList to be flexible enough to hold any redis value (str, int, list, ..)
09:56:58FromGitter<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:59dom96xmonader: you need a variant
10:06:37dom96It sucks a bit. But the redis module needs changes anyway
10:06:42dom96A) It uses nil
10:06:52dom96and it has this weird `redisNil` thing which I want to get rid of
10:08:52FromGitter<Araq> +1
10:10:28*pqflx3[m] joined #nim
10:11:18*Compu joined #nim
10:14:52PMunchHmm, can't you do "export some/thing"
10:15:08PMunchI want to have "import sdl2/image; export sdl2/image"
10:15:22*Compu quit (Killed (Unit193 (Spam is not permitted on freenode.)))
10:15:24dom96You can AFAIK
10:15:29PMunchTrying to add some common imports and types into a single file
10:15:36FromGitter<mratsim> you need to export image
10:15:41FromGitter<mratsim> not sdl2/image
10:15:50PMunchAh
10:15:55PMunchThat'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:09dom96PMunch: RFC :P
10:41:15*noonien joined #nim
10:44:24*Vladar joined #nim
10:46:54*nsf joined #nim
11:01:58FromGitter<bung87> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b8a71a6f86b741b05f2e3f8]
11:02:27FromGitter<bung87> how to do it right ? very slow
11:03:08FromGitter<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:41FromGitter<bung87> never mind
11:26:12PMunchHmm, I guess that makes sense
11:27:51*Trustable quit (Remote host closed the connection)
11:35:30*Perkol joined #nim
11:37:01FromGitter<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:06FromGitter<Araq> with the new runtime you will be able to do `withScratchRegion: <stuff here>` and keep the allocation heavy code
11:44:18FromGitter<Araq> and yet it will run much faster.
11:44:27FromGitter<Araq> well this will need some benchmarking :-)
11:52:08*kapil___ joined #nim
11:53:27FromGitter<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:35FromGitter<bung87> @mratsim you can see the code here https://github.com/bung87/finalseg/blob/master/src/finalseg.nim
11:58:14FromGitter<bung87> the project is all about string or seq of string , so if it get optimized, speed gets up .
11:59:02krux02bung87: there isn't much that can be optimized in seq or string
11:59:03FromGitter<mratsim> I’m pretty sure the C++ is reusing buffers everywhere to avoid allocation
11:59:25krux02but sometimes it might be better to use a single string with separators instead of seq[string]
11:59:36krux02seq[string] is non-local memory
12:00:10krux02scanning through every string is a seq of string can be scanning though fragmented memory, which is slow
12:00:48FromGitter<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:26FromGitter<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:09FromGitter<mratsim> or here: https://github.com/mratsim/Arraymancer/issues/221
12:03:58FromGitter<mratsim> Once located, rewrite the code.
12:04:42FromGitter<mratsim> If you’re not on Mac, you need to find something similar to the Time Profiler in Apple Instruments
12:05:56krux02valgrind chachegrind
12:06:28FromGitter<bung87> ok thanks, aware of I removed xcode to save bandwidth ...
12:06:48krux02https://github.com/gperftools/gperftools
12:06:51FromGitter<Araq> runes = sentence.toRunes() # slow and not required
12:07:27*cspar quit (Ping timeout: 240 seconds)
12:07:39FromGitter<bung87> c++ version all pass a iterator before perform string result
12:08:46*zachcarter joined #nim
12:09:16FromGitter<Araq> and the code screams "I want a real parser"
12:09:18FromGitter<bung87> @Araq viterbi proc not requires but in `iterator internal_cut` needs slice
12:10:47FromGitter<Araq> speaking of which ...
12:11:14*FromGitter * Araq removes bullshit startsWith parsing from nimsuggest's tester. Amateurs.
12:11:23FromGitter<bung87> https://github.com/bung87/finalseg/blob/8ea55633466b00ea412fbea02b583f5ecc551ac3/src/finalseg.nim#L141
12:13:48*Perkol quit (Quit: Leaving)
12:16:37FromGitter<bung87> you meaning parsing first word and then computing is bad?
12:24:20FromGitter<mratsim> I think Araq means, if speed is critical, implement a state-machine based parser.
12:24:27FromGitter<mratsim> aka a real parser
12:31:22FromGitter<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:16FromGitter<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:54dom96I'm really disappointed in Freenode right now
12:53:00dom96The channel is /still/ being spammed
12:54:46federico3is it?
12:58:09krux02I don't see spam
12:58:28krux02dom96, is there a spam filter in this channel?
12:58:39dom96Yes, all unregistered users are muted
12:58:43dom96I can see them because I've got +o
12:59:26FromGitter<bung87> @Araq @mratsim thanks, learning it
12:59:31krux02the unregistered user get notified that they ar muted?
13:03:58krux02mratsim: "`nim c test.nim` fails" is not a good name for an issue
13:04:10krux02the problem is not that the test fails
13:04:12krux02it is your test
13:04:18krux02not a test in nim
13:04:42*cspar joined #nim
13:04:43FromGitter<mratsim> I wasn’t the one who raised the issue
13:04:57krux02oh sorry
13:05:12FromGitter<mratsim> if anything we both agree ;)
13:05:15krux02timotheecour: I meant you
13:07:55FromGitter<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:52FromGitter<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:12krux02that is not really possible with a macro
13:35:59krux02the sem checker will complain about unused bool
13:36:44krux02andyou need the sem checker before the macro invocation to insert an assert at all bool expressions
13:42:29FromGitter<mratsim> the `check` macro in unittest manages to do it.
13:42:51FromGitter<mratsim> but maybe it doesn’t check for statement vs expressions
13:52:55dom96krux02: they aren't notified
13:57:22*nsf quit (Quit: WeeChat 2.2)
13:57:38krux02dom96: 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:39FromGitter<xmonader> How do i pass nil to a variant object? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b8ab85a4be56c5918c8f065]
16:03:57FromGitter<xmonader> ``````
16:05:41FromGitter<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:01FromGitter<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:32FromGitter<mratsim> you can’t pass nil to a stack object
16:29:02FromGitter<xmonader> @mratsim oh thanks! i guess \0\0 is good enough then
16:30:03*PMunch quit (Quit: Leaving)
16:30:17FromGitter<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:49FromGitter<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:40FromDiscord<Gilgamish> Guys I'm getitng a somewhat cryptic error message, any help is appreciated!
17:38:40FromDiscord<Gilgamish>
17:38:40FromDiscord<Gilgamish> This is the module creating the error.
17:38:40FromDiscord<Gilgamish>
17:38:40FromDiscord<Gilgamish> ```
17:38:40FromDiscord<Gilgamish> type
17:38:41FromDiscord<Gilgamish> Map* = object
17:38:42FromDiscord<Gilgamish> width : int
17:38:44FromDiscord<Gilgamish> map : seq
17:38:44FromDiscord<Gilgamish>
17:38:46FromDiscord<Gilgamish> proc createMap(x : int, y : int) : Map =
17:38:47FromDiscord<Gilgamish> new Map(x, newSeq[int](x*y))
17:38:48FromDiscord<Gilgamish> ```
17:38:50FromDiscord<Gilgamish>
17:38:51FromDiscord<Gilgamish> Error:
17:38:52FromDiscord<Gilgamish> ```
17:38:54FromDiscord<Gilgamish> Error: invalid type: 'T' in this context: 'proc (x: int, y: int): Map' for proc
17:38:56FromDiscord<Gilgamish> ```
17:39:10FromDiscord<Gilgamish> It sounds like parameterized types error, even though I'm not using generics
17:39:55TheLemonManyour `map` should be a `seq[int]` instead of just `seq`
17:40:35FromDiscord<Gilgamish> Thanks bot!
17:43:30*Gilamesh quit (Quit: Page closed)
17:43:53FromDiscord<Gilgamish> Obs, I mean thanks TheLemonMan
17:44:33TheLemonMannp, I've been called worse than bot :P
17:46:35FromDiscord<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:58FromDiscord<Gilgamish> getting ```Error: attempting to call undeclared routine: 'Map' ``` on:
18:07:58FromDiscord<Gilgamish>
18:07:58FromDiscord<Gilgamish> ```
18:07:58FromDiscord<Gilgamish> type
18:07:58FromDiscord<Gilgamish> Map* = object
18:07:59FromDiscord<Gilgamish> width : int
18:07:59FromDiscord<Gilgamish> map : seq[int]
18:08:00FromDiscord<Gilgamish>
18:08:02FromDiscord<Gilgamish> proc createMap*(x : int, y : int) : Map =
18:08:04FromDiscord<Gilgamish> return Map(x, newSeq(x*y))
18:08:04FromDiscord<Gilgamish> ```
18:08:52FromDiscord<Gilgamish> I'm hoping to build a random 2d dungeone generator but moving in 2d space is quite difficult without multidimensional arrays
18:08:55TheLemonManyeah, you need `Map(width: x, map: newSeq[int](x+y))`
18:09:48FromDiscord<Gilgamish> Ah, so you need to specify the variables in the constructor?
18:10:33FromDiscord<Gilgamish> Yes! it compiles, thanks!
18:10:33TheLemonManyep, that's nice because you cant fuck up anything if you move the fields around
18:11:36FromDiscord<Gilgamish> Yeah I can see why it's designed like that. That way certain errors can be caught.
18:17:05FromGitter<ephja> now we just need it for procs and to make use of more distinct types :-)
18:20:04TheLemonManahh, 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:13FromGitter<kayabaNerve> Here's an interesting bug. Looks to be my code, but not Nim...
20:11:24FromGitter<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:16FromGitter<kayabaNerve> https://github.com/EmberCrypto/Events/blob/master/events.nimhttps://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:30FromGitter<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:09FromGitter<bung87> what's Bitwise OR ,Bitwise AND operator in Nim ?
22:56:36FromGitter<ephja> or/and :-P
22:59:18FromGitter<bung87> wow just that
23:02:19FromGitter<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:48FromGitter<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:51FromGitter<bung87> I got `MD5Digest` and it can use `$` convert to string, but how to do like `parseInt('0cc175b9c0f1b6a831c399e269772661',16)`