<< 17-11-2017 >>

00:16:16*arecaceae quit (Remote host closed the connection)
00:16:35*arecaceae joined #nim
00:53:19*vlad1777d_ quit (Ping timeout: 248 seconds)
00:56:30*couven92 quit (Quit: Client Disconnecting)
01:20:17*Serenitor joined #nim
01:34:45*kalkin-- joined #nim
01:38:08*kalkin--- quit (Ping timeout: 248 seconds)
01:40:06FromGitter<Varriount> @mratsim Could this be useful for Arraymancer: https://nim-lang.org/docs/manual.html#guards-and-locks ?
01:46:29SerenitorI am trying to retrieve a ref (or ptr) type from VmArgs (compiler/vmdef) so that I can pass refs from nimscript to nim, but it seems to be tricky. before I spend more time, does someone know whether or not that's a horrible idea in the first place? like, could it anger the GC or something?
01:47:42FromGitter<kayabaNerve> Hey. I had a question real quick. ⏎ SIGSEGV: Illegal storage access. (Attempt to read from nil?) ⏎ ⏎ When I get this error at COMPILE TIME, what should I be looking for? [https://gitter.im/nim-lang/Nim?at=5a0e3fbd614889d4758e993c]
01:48:51Serenitor@kayabaNerve stack trace is missing?
01:48:59*jinshil joined #nim
01:49:08FromGitter<kayabaNerve> Yep. It just says Proccessing a list of files and then throws that
01:49:30FromGitter<kayabaNerve> It compiled other versions of this. Then I cleaned up the formatting and added some stuff in another file that processes fine
01:50:11FromGitter<kayabaNerve> Hint: map [Processing] ⏎ *unused stuff* ⏎ Hint: pinky [Processing] ⏎ Hint: inky [Processing] ⏎ Hint: clyde [Processing] ... [https://gitter.im/nim-lang/Nim?at=5a0e4053cc1d527f6b7e080e]
01:51:36FromGitter<kayabaNerve> https://github.com/kayabaNerve/PacMan3D/blob/master/entities/ghosts/inky.nimhttps://github.com/kayabaNerve/PacMan3D/blob/master/entities/ghosts/clyde.nim ⏎ For reference^^
01:52:23FromGitter<Varriount> @kayabaNerve Are you using the development version of the compiler, or the latest stable release?
01:52:31FromGitter<kayabaNerve> Uhhh Latest Stable IIRC
01:52:55FromGitter<kayabaNerve> Nim Compiler Version 0.17.2 (2017-09-07) [Windows: amd64] ⏎ Copyright (c) 2006-2017 by Andreas Rumpf ⏎ ⏎ git hash: 811fbdafd958443ddac98ad58c77245860b38620 ⏎ active boot switches: -d:release [https://gitter.im/nim-lang/Nim?at=5a0e40f7982ea2653f8c350e]
01:53:11FromGitter<Varriount> You might try the development version. It's usually in working order, and has the most recent bug fixes.
01:53:43FromGitter<kayabaNerve> So is your theory it's the compiler breaking, not my code?
01:53:59FromGitter<Varriount> Also, you can compile the compiler with stacktraces on, so if/when you do encounter the bug, you can file an issue. :D
01:54:19FromGitter<kayabaNerve> Lol. I thought about compiling it again.
01:54:24FromGitter<Varriount> @kayabaNerve Pretty much.
01:54:26FromGitter<kayabaNerve> But then I decided to come here first
01:54:44SerenitorI've had that once and iirc it had something todo with me messing up an object constructor's syntax somewhere
01:54:48FromGitter<Varriount> I mean, your code might have some error that the compiler is choking on.
01:54:51FromGitter<kayabaNerve> So. How would I install the newest nim compiler on Windows?
01:55:24FromGitter<Varriount> Clone the Github repository, and use your current compiler to compile the development compiler.
01:55:32*jinshil_ joined #nim
01:55:45FromGitter<kayabaNerve> Yep... thought so. It's cool that Nim is bootstrapped.
01:57:12FromGitter<kayabaNerve> Constructors look fine to me
01:57:20FromGitter<Varriount> What I did on my new laptop was download the latest stable version and installed it somewhere temporary. I then cloned the Github repository to C:\Nim, placed the nim.exe binary from the temporary location, and compiled.
01:57:31FromGitter<Varriount> (of course, I had to edit my PATH variable too)
01:58:03FromGitter<kayabaNerve> git clone https://github.com/nim-lang/Nim.git or do I have to specify the devel branch?
01:58:30*jinshil quit (Ping timeout: 255 seconds)
01:58:47FromGitter<Varriount> Nope,
01:58:53FromGitter<Varriount> devel is the default.
01:59:12FromGitter<kayabaNerve> git clone https://github.com/nim-lang/Nim.git ⏎ koch boot -d:release -d:stacktrace
01:59:15FromGitter<kayabaNerve> That?
01:59:52FromGitter<Varriount> I generally use `koch boot -d:release --stacktrace:on --linetrace:on`
02:00:00*skrylar quit (Remote host closed the connection)
02:00:17FromGitter<kayabaNerve> Got it. Thanks
02:00:38FromGitter<Varriount> The produced compiler is faster than a non-release version, but you still get optimizations from the C compiler.
02:01:11FromGitter<kayabaNerve> Compiling
02:02:45FromGitter<kayabaNerve> Done
02:05:13FromGitter<kayabaNerve> Same error but there's a trace
02:05:14FromGitter<kayabaNerve> Traceback (most recent call last) ⏎ nim.nim(121) nim ⏎ nim.nim(77) handleCmdLine ⏎ main.nim(167) mainCommand ⏎ main.nim(74) commandCompileToC ... [https://gitter.im/nim-lang/Nim?at=5a0e43da982ea2653f8c40e0]
02:05:21FromGitter<kayabaNerve> And that's long.... sorry
02:06:09FromGitter<kayabaNerve> https://pastebin.com/UzMefn8p
02:06:16*jinshil_ quit (Quit: Good-bye!)
02:06:47FromGitter<Varriount> Well, the next part of this would be to find out what part of the input code is causing the compiler to choke.
02:06:58*jinshil joined #nim
02:07:01FromGitter<kayabaNerve> That would be the clyde file
02:07:02FromGitter<Varriount> It looks like the problem is in a 'while' statement.
02:07:13FromGitter<kayabaNerve> https://github.com/kayabaNerve/PacMan3D/blob/master/entities/ghosts/clyde.nim
02:07:30FromGitter<kayabaNerve> That's the last file it's processing
02:07:37FromGitter<kayabaNerve> I have that for loop in at least 3 other files
02:08:38Serenitorwhat's the last file in the stack trace that's one of yours? main.nim line 74 right? what happens there?
02:08:53FromGitter<Varriount> Serenitor: That's the compiler source code.
02:09:01FromGitter<kayabaNerve> Yep^^
02:09:11FromGitter<kayabaNerve> Last file it's processing Clyde.nim
02:09:49FromGitter<kayabaNerve> That Git repo is up to date besides a typo I fixed (assigned xSpeed twice instead of xSpeed and the zSpeed, shouldn't matter as that wasn't in a constructor)
02:10:30FromGitter<kayabaNerve> Every other ghost file is already processed
02:11:06FromGitter<kayabaNerve> Ghosts isn't but Clyde doesn't refer to Ghosts at all. Ghosts includes Clyde. I also haven't touched that code in a while and it did work
02:12:12FromGitter<kayabaNerve> The three files I actually edited besides the ghosts are map, player, and main. The first two are already processed. Third has yet to.
02:12:56FromGitter<kayabaNerve> Commenting the for loop did nothing @Varriount
02:13:59FromGitter<Varriount> One moment. I'm going to check out the repo
02:14:00*Serenit0r joined #nim
02:14:23FromGitter<Varriount> @kayabaNerve Congratulations, you've discovered a compiler crash. Those don't occur too often these days.
02:15:18FromGitter<kayabaNerve> Yay. I did something that likely helps in the long run but does mean I'm screwed in the short term!
02:15:22FromGitter<kayabaNerve> Do I get a medal? :P
02:16:18Serenit0ronly if you figure out what causes it :)
02:16:32FromGitter<kayabaNerve> Here's the line that it crashes on if typeExpr.typ.kind == tyFromExpr:
02:16:44FromGitter<kayabaNerve> So that's what causes it
02:16:46FromGitter<kayabaNerve> :P
02:16:55FromGitter<kayabaNerve> You didn't say I had to know why or I had to offer a fix
02:17:23*Serenitor quit (Ping timeout: 255 seconds)
02:18:25FromGitter<Varriount> First I need to find my laptop. :/
02:20:11FromGitter<kayabaNerve> K. I added 'echo' statements in because I'm an expert in debugging. Recompiling :P
02:21:06FromGitter<kayabaNerve> Hey! It gave me info!
02:21:13FromGitter<kayabaNerve> tyFromExpr ⏎ updatePosition(player, 0, 0)
02:21:20*SenasOzys quit (Ping timeout: 248 seconds)
02:21:37Serenit0rif stack trace fails you -> spam echos -> if echos fail you -> remove code until it compiles again ^^
02:22:07FromGitter<kayabaNerve> It gave me the problem line... sort of
02:22:29FromGitter<kayabaNerve> typeExpr.typ.kind is null
02:22:31FromGitter<kayabaNerve> @Varriount
02:23:07FromGitter<kayabaNerve> of nkDotExpr: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ First is tyFromExpr ... [https://gitter.im/nim-lang/Nim?at=5a0e480adf09362e671ae82e]
02:23:09FromGitter<Varriount> Looking into it...
02:23:28FromGitter<kayabaNerve> Third is blank. 4th is invalid. So I guess the typeExpr.typ is the null part
02:23:42FromGitter<Varriount> You added echo statements in the compiler?
02:23:56FromGitter<kayabaNerve> Yes lol
02:24:25FromGitter<kayabaNerve> I can't say "How else would you do it?" because I know better but I can say "It worked"
02:24:36FromGitter<Varriount> This is what I get from --verbosity:3 - https://gist.github.com/Varriount/46bc7ff52473bbb7fa3a91110d8a0926
02:25:11FromGitter<kayabaNerve> From my code?
02:25:23FromGitter<Varriount> Yeah.
02:25:29FromGitter<kayabaNerve> It's complaining about this line: updatePosition(player, 0, 0)
02:25:44FromGitter<kayabaNerve> Which I only write as player.updatePosition
02:26:18FromGitter<kayabaNerve> But I never do 0, 0
02:26:19FromGitter<Varriount> "player.updatePosition(z: 1)" <- I don't believe that's valid syntax
02:26:36FromGitter<kayabaNerve> It has default args of 0
02:27:06FromGitter<kayabaNerve> And it's an equal sign
02:27:08FromGitter<kayabaNerve> Not a colon
02:27:09FromGitter<Varriount> Replace the `:` with `=`
02:27:16Serenit0rmixing function call syntax with object constructor syntax is exactly what causes that compiler error without stacktrace for me once, too
02:27:25FromGitter<kayabaNerve> Yep
02:27:28FromGitter<Varriount> On lines 94, 97, 100, and 103
02:27:42FromGitter<kayabaNerve> It works
02:27:47FromGitter<kayabaNerve> Yep. Thanks!
02:28:01FromGitter<Varriount> Serenit0r: Did you file an issue? Did it get resolved?
02:28:19FromGitter<kayabaNerve> That said: ⏎ 1) I hope this helps the compiler. ⏎ 2) Would you not put echo statements in the compiler? :P ⏎ 3) Thanks for your help [https://gitter.im/nim-lang/Nim?at=5a0e4942982ea2653f8c5510]
02:28:30FromGitter<Varriount> @kayabaNerve By the way, I like your code. Nice and clean.
02:29:15FromGitter<Varriount> @kayabaNerve Echo statements in the compiler can help.. but in a large program, they can lose their usefulness
02:29:56FromGitter<kayabaNerve> Thank you. I try. Feel free to submit some pull requests. For the GitHub Game Off
02:30:11FromGitter<kayabaNerve> And yes, outside of this quick debugging, they're almost pointless
02:30:13FromGitter<Varriount> There's a Github game off?
02:30:16Serenit0r@Varriount no, didn't file an issue
02:30:19FromGitter<kayabaNerve> Yep. Started this month
02:30:21FromGitter<kayabaNerve> Dibs
02:30:25FromGitter<kayabaNerve> Dibs on filing the issue
02:30:39FromGitter<kayabaNerve> They've had it for multiple years lol
02:30:57FromGitter<kayabaNerve> And it's one month; starts in November. I'm doing 3D PacMan with SFML
02:31:11FromGitter<kayabaNerve> Only thing I can get working reliably + simple + retro 2.5D goodness
02:34:10FromGitter<Varriount> @kayabaNerve Well, when I run the main executable, the window appears. Nothing is drawn though.
02:34:27FromGitter<kayabaNerve> Yeah. I 'm working on it
02:34:30FromGitter<kayabaNerve> I started late too lol
02:35:04FromGitter<Varriount> Well, we're glad you chose Nim
02:37:04FromGitter<kayabaNerve> https://github.com/nim-lang/Nim/issues/6765
02:37:14FromGitter<kayabaNerve> I got you guys to retweet my tweet about it :P
02:37:37*JappleAck quit (Quit: Leaving)
02:37:38*marenz__ quit (Ping timeout: 255 seconds)
02:37:50FromGitter<kayabaNerve> Dom liked it... Loving his book. I actually started a chapter or 2 of my own introduction to coding with nim. Put it on pause, saw his book, backed off. Knew I couldn't match the quality.
02:39:34FromGitter<kayabaNerve> Thoughts on that issue? Just edited with a clarification of what's null
02:42:00FromGitter<kayabaNerve> Also, real quick, what are the donations supposed to go to? The BTC wallet has no outputs and Gratipay says you get $2 a week (not really enough to do anything)
02:42:08*endragor quit (Ping timeout: 255 seconds)
02:42:30*d10n-work quit (Quit: Connection closed for inactivity)
02:44:04Serenit0rhave you checked if the issue occurs even without the object? if so, may be better to omit it
02:44:56FromGitter<kayabaNerve> I haven't. One sec
02:46:09FromGitter<kayabaNerve> proc test(x: int = 0) = ⏎ ⏎ ```discard``` ⏎ ⏎ test(x: 0) [https://gitter.im/nim-lang/Nim?at=5a0e4d70cc1d527f6b7e41d8]
02:46:11FromGitter<kayabaNerve> This works fine
02:46:54Serenit0rcool :)
02:47:46FromGitter<kayabaNerve> Yep
02:47:53FromGitter<kayabaNerve> Requires being wrapped in an object
02:49:08FromGitter<Varriount> @kayabaNerve Bountysource is preferred.
02:49:26FromGitter<kayabaNerve> Updated
02:49:31FromGitter<Varriount> I have a recurring donation set up through Bountysource.
02:49:38FromGitter<kayabaNerve> It requires that you use obj.MyFunc to crash
02:50:59Serenit0rnim 1+1
02:51:04Serenit0rhow does that bot work again
02:51:19FromGitter<kayabaNerve> Not like that :P
02:52:19Serenit0rhm maybe it's not online :(
02:53:02FromGitter<Varriount> !eval echo 1 + 1
02:53:05NimBot2
02:53:18FromGitter<Varriount> Serenit0r: ^
02:53:25Serenit0rah thanks
02:53:36Serenit0r!eval type Obj = object; proc test(o: Obj, x: int = 0) = discard; Obj().test(x: 22)
02:53:37NimBotCompile failed: SIGSEGV: Illegal storage access. (Attempt to read from nil?)↵Compilation Failed
02:53:42Serenit0rhaha ^^
02:55:03FromGitter<kayabaNerve> YES!
02:55:15FromGitter<kayabaNerve> VINDICATION!
02:55:23FromGitter<kayabaNerve> For everyone who didn't touch my links
02:56:08*chemist69 quit (Disconnected by services)
02:56:14*chemist69_ joined #nim
03:00:32FromGitter<kayabaNerve> @Varriount I'm hoping I get some game down by the end of the month. Make me happy, allow me to enter, show the other people Nim...
03:01:21FromGitter<kayabaNerve> Bountysource accepts BTC. Yay.
03:01:53*endragor joined #nim
03:02:59*endragor quit (Remote host closed the connection)
03:03:08*endragor joined #nim
03:07:11FromGitter<Varriount> @kayabaNerve You have some BTC to spend?
03:07:33FromGitter<kayabaNerve> @Varriount A bit
03:08:34FromGitter<kayabaNerve> "$1,575 this month from 43 supporters"
03:08:57FromGitter<kayabaNerve> That's actually impressive lol
03:09:16FromGitter<kayabaNerve> Over 25 each month average...
03:10:18FromGitter<Varriount> I wish it were more, however Nim doesn't have backing from huge companies.
03:13:43*Snircle_ quit (Quit: Textual IRC Client: www.textualapp.com)
03:17:35FromGitter<kayabaNerve> @Varriount BTW, If you want to get in on the game off, I'd love to have a partner
03:17:49FromGitter<kayabaNerve> Sorry about pinging you so much. I meant to say that but I got distracted in other chats
03:18:02FromGitter<kayabaNerve> Same to anyone else lurking here :)
03:23:01*cspar quit (Ping timeout: 240 seconds)
03:31:52FromGitter<kayabaNerve> And hey! My donation went through :)
03:39:13*mwbrown quit (Ping timeout: 248 seconds)
03:41:12*mwbrown joined #nim
03:45:52*cspar joined #nim
04:02:34FromGitter<mratsim> For games you need to ping @yglukhov and @zacharycarter
04:03:00FromGitter<mratsim> Maybe even open a forum thread
04:04:18FromGitter<kayabaNerve> Eh. I'm not so invested I'll seek one out actively. Thanks though, @mratsim
04:05:06FromGitter<mratsim> @varriount "@mratsim Could this be useful for Arraymancer: https://nim-lang.org/docs/manual.html#guards-and-locks ?" ==> Yes that would be useful for the Cuda object pool. But for general computation I don't need lock in OpenMP/Cuda
04:08:22FromGitter<mratsim> I might need them in the future in neural networks to update multiple branches of the net (a direct acyclic graph) in parallel, but even then I'm not sure.
04:10:51FromGitter<mratsim> Anyway good to know! For atomics I was exploring using "cas" (completely undocumented in system.nim)
04:15:23FromGitter<Varriount> @kayabaNerve Normally I would love to, but both classes and work take up a large portion of my time.
04:30:56*Serenit0r quit (Ping timeout: 248 seconds)
04:32:00FromGitter<kayabaNerve> @Varriount All good :)
04:34:12*Serenitor joined #nim
04:48:42*craigger quit (Ping timeout: 240 seconds)
04:50:01*craigger joined #nim
05:03:51*Serenit0r joined #nim
05:05:05*craigger quit (Ping timeout: 248 seconds)
05:06:41*Serenitor quit (Ping timeout: 248 seconds)
05:07:04*craigger joined #nim
05:10:01TangerHey folks. For a sequtils.any or sequtils.all call, is there a way to include a variable in the predicate proc's body or should I just construct my seq to be a seq of tuples with extra data added instead?
05:11:29*craigger quit (Ping timeout: 248 seconds)
05:11:37*craigger joined #nim
05:12:51*craigger_ joined #nim
05:16:03*craigger quit (Ping timeout: 255 seconds)
05:17:05*craigger_ quit (Ping timeout: 240 seconds)
05:17:53*craigger joined #nim
05:41:02FromGitter<Varriount> Tanger: doo they accept a closure?
05:41:59*cspar_ joined #nim
05:41:59*cspar quit (Ping timeout: 250 seconds)
05:49:57*dddddd quit (Remote host closed the connection)
06:05:45TangerVarriount: Nope, but I did define the predicate above the any() call, which compiled fine
06:05:57TangerA bit unsure about running it though, seems dodgy
06:21:36*miran joined #nim
06:30:02FromGitter<Varriount> Tanger: Could you post the code?
06:36:52TangerVarriount: https://pastebin.com/b3T00Ujj With nim 0.17.3
06:38:29*nsf joined #nim
06:41:00FromGitter<Varriount> That should work, although the inline might present problems with newer compiler versions
06:41:30FromGitter<Varriount> Your compiler version will just disregard the inline and make it a closure type
06:47:29TangerVarriount: Awesome, thanks. Quick question, the compiler would disregard it because it's trying to access variable r in the encasing scope, yeah?
06:50:16FromGitter<Varriount> Yes.
06:50:47TangerThanks heaps!
06:51:10FromGitter<Varriount> Honestly, I would just use a for loop
06:51:26FromGitter<Varriount> Tied with a const array of strings
06:55:31TangerYeah, that makes sense. Or a switch seeing as it's just string comp
07:00:35TangerYeah, that makes sense. Or a switch seeing as it's just string comp
07:08:08*miran quit (Quit: Konversation terminated!)
07:16:47*07EAAFYYY joined #nim
07:35:39*miran joined #nim
07:37:37*nsf quit (Ping timeout: 248 seconds)
07:37:59*gokr joined #nim
07:50:26FromGitter<mratsim> And if result.ok and result.ok == true is redundant
07:50:53FromGitter<mratsim> Just "if result.ok" is enough
07:55:37FromGitter<mratsim> Design question, I see that you use error codes as return values and a lot of discard to ignore them. Why not using enum instead of bool for self documenting errors? And why not exceptions or asserts to avoid all that error checking/discarding and have an easy to debug stacktrace?
07:59:40*07EAAFYYY quit (Ping timeout: 268 seconds)
08:06:18*yglukhov joined #nim
08:14:46*vlad1777d_ joined #nim
08:27:35*Arrrr joined #nim
08:27:36*Arrrr quit (Changing host)
08:27:36*Arrrr joined #nim
08:31:43*floppydh joined #nim
08:33:39*jjido joined #nim
08:34:51*PMunch joined #nim
08:47:53*awal quit (Quit: ZNC 1.6.4 - http://znc.in)
08:48:15*jjido quit (Remote host closed the connection)
08:48:26*jjido_ joined #nim
08:50:16*awal joined #nim
08:50:24*jjido_ quit (Remote host closed the connection)
08:50:40*awal is now known as Guest95989
08:50:44*jjido joined #nim
08:51:05*Guest95989 is now known as awal
08:51:39*claudiuinberlin joined #nim
08:52:13*jjido quit (Read error: Connection reset by peer)
08:52:32*jjido joined #nim
08:55:22*vlad1777d_ quit (Ping timeout: 260 seconds)
08:55:35*yglukhov quit (Ping timeout: 240 seconds)
08:56:12*yglukhov joined #nim
08:58:34*jjido quit (Ping timeout: 264 seconds)
08:59:12*hogeland quit (Ping timeout: 248 seconds)
08:59:18*hogeland joined #nim
09:00:14*jinshil quit (Quit: Good-bye!)
09:04:13*jjido joined #nim
09:08:55*SenasOzys joined #nim
09:13:15*xkapastel quit (Quit: Connection closed for inactivity)
09:14:39*Vladar joined #nim
09:15:57*jjido quit (Ping timeout: 240 seconds)
09:23:20*Serenit0r quit (Quit: Leaving)
09:36:17FromGitter<mratsim> https://developers.redhat.com/blog/2017/11/16/speed-python-using-rust/ Python is used for rapid prototyping, Rust learning curve is not rapid ... Just use cython or Nim.
09:36:36FromGitter<mratsim> (it's in HN front page)
09:39:31Arrrri thought the article mentioned nim
09:44:48FromGitter<dom96> @kayabaNerve @Varriount not sure if the donation happened yet, but the preferred way is definitely Bitcoin
09:44:55FromGitter<dom96> BountySource takes 10%
09:45:21FromGitter<dom96> And I'm considering switching to OpenCollective
09:45:58FromGitter<dom96> well, I can't tell anyone to switch, but I'm considering featuring it more prominently
09:46:50livcddom96: can you share with us how many people bought your book already ? :D
09:46:50FromGitter<dom96> I guess I should move the money around in that BTC wallet to make it seem more active?
09:46:57FromGitter<dom96> nope
09:47:02livcdahh
09:47:17FromGitter<dom96> mostly because I don't know the exact number :)
09:47:24livcdaha
09:48:47*yglukhov quit (Ping timeout: 248 seconds)
09:50:48*jjido joined #nim
09:53:25*yglukhov joined #nim
10:10:09FromGitter<data-man> @dom96: The first 9 chapters of your book are available for free at Manning Publications. Can you share the sources (AsciiBook if I'm not mistaken) for these chapters?
10:10:26*SenasOzys quit (Remote host closed the connection)
10:11:39*Trustable joined #nim
10:12:10livcdi thought only 2 chapters are available for free
10:13:40FromGitter<mratsim> Yes it's 2.
10:14:18FromGitter<data-man> Two for downloading but not for reading.
10:14:42FromGitter<data-man> https://www.manning.com/books/nim-in-action
10:19:03mirandata-man you can "read" all the chapters, but the content is scrambled
10:22:07dom96yeah. They're not all available for free
10:22:13dom96And no, I can't share the sources.
10:22:33FromGitter<data-man> I want to translate these chapters into Russian. Ok, sorry.
10:23:27dom96I think said this to you already.
10:23:34dom96If you want to translate the book then contact the publisher
10:29:37FromGitter<data-man> @dom96: I do not have the book for translation. 
10:32:02dom96you'll get one if the publisher agrees to let you translate it
10:35:28FromGitter<data-man> Thanks, I will try to contact.
10:41:25*Senketsu quit (Ping timeout: 250 seconds)
10:41:52*xet7 quit (Remote host closed the connection)
10:43:47FromGitter<data-man> I'm almost implemented a function for a "natural" string comparison. Do we need this function in the stdlib or is it better to make a separate package for it?
10:44:09FromGitter<alehander42> what is "natural" comparioson?
10:45:25Araqthere is no such thing
10:45:43Araqstring comparisons are language specific
10:46:33FromGitter<data-man> http://php.net/manual/en/function.strnatcmp.php
10:47:25FromGitter<alehander42> ah so it's basically int in string comparisons
10:48:07FromGitter<alehander42> https://github.com/sourcefrog/natsort this seems like a fuller example
10:49:39FromGitter<data-man> Yes, I ported this implementation with additional features.
10:52:07Araqmake it a nimble module please
10:52:16Araqhard to get it right the first time
10:59:12*kier quit (Ping timeout: 248 seconds)
11:04:28FromGitter<data-man> @Araq: Do you remember why you chose the "Quick Search" algorithm for strutils.find? I testing the Knuth–Morris–Pratt algorithm, and it's faster almost twice.
11:08:27Araqfor which test?
11:10:14*kier joined #nim
11:14:37FromGitter<data-man> ```var ⏎ s = "0123456789abc" ⏎ sub = "abc" ⏎ n: int ⏎ n = strutils.find(s, sub)``` [https://gitter.im/nim-lang/Nim?at=5a0ec49c540c78242d153fc4]
11:22:04*Cthalupa joined #nim
11:22:26*marenz__ joined #nim
11:29:14Araqhttp://www-igm.univ-mlv.fr/~lecroq/string/node8.html#SECTION0080
11:29:16Araqvs
11:29:26Araqhttp://www-igm.univ-mlv.fr/~lecroq/string/node19.html
11:30:02AraqqsBc[ASIZE] # only requires temporary storage of the alphabet size which is known at compile-time (256)
11:30:18Araqthat means it only stack allocates
11:31:16AraqKMP requires kmpNext[XSIZE]
11:41:20FromGitter<data-man> Yes, and for my example XSIZE equal to only three. It requires less time to precompute a table.
11:42:53Araqwell that was my reasoning
11:43:08AraqI don't know if we should change the stdlib
11:43:50Araqbut some builtin vowel-less C intrinsic is probably even faster than your KMP algorithm
11:44:06Araqwithout any preprocessing step
11:47:38FromGitter<data-man> In the musl libc an interesting implementation.
12:08:26*yglukhov quit (Remote host closed the connection)
12:12:48*yglukhov_ joined #nim
12:14:31*couven92 joined #nim
12:15:43FromGitter<data-man> @Araq: What do you think about https://github.com/nim-lang/Nim/pull/6767 ?
12:17:11*yglukhov_ quit (Ping timeout: 250 seconds)
12:18:55*nsf joined #nim
12:26:29*Ven joined #nim
12:26:53*Ven is now known as Guest25798
12:29:53FromGitter<data-man> The question to all Nim users: to display a elapsed time in a unittests by default?
12:31:38*PMunch quit (Ping timeout: 258 seconds)
12:32:12federico3data-man perhaps it should be opt-in instead
12:37:55FromGitter<data-man> @federico3: Now can be disabled with env var "NIMTEST_NO_ELAPSED_TIME". But enabled by default.
12:39:44*PMunch joined #nim
12:42:09FromGitter<data-man> "To enable, or not to enable, that is the question." By William Shakespeare. 
12:42:42federico3 data-man I saw that
12:42:46FromGitter<alehander42> It should be opt-in, and also can it be configured on test-basis ? e.g. ⏎ test "a": ⏎ measure() ⏎ checks [https://gitter.im/nim-lang/Nim?at=5a0ed946df09362e671dafa8]
12:43:15FromGitter<alehander42> or something like that? (to enable it only for some tests)
12:44:43FromGitter<alehander42> or even if it's opt-out it should print "Disable timings with ..." on each execution so the users can easily disable it
12:49:02FromGitter<mratsim> I’ve started cleaning up the repo, will finish this evening: https://github.com/nim-lang/needed-libraries/issues/77
12:49:37Araqdata-man: I don't like unittest.nim and I don't want to look at it.
12:50:48Araqso any improvements to it have to go through somebody else.
12:50:55Araqsame for the logging module.
12:51:53Araqif I want to log something, I write into a SQLite database.
12:52:17FromGitter<data-man> @alehander42: I implement this for a simple NimBench replacement, because unittests have more features. ⏎ @Araq: Wow?!
12:53:49*PMunch quit (Ping timeout: 268 seconds)
12:55:27*kier quit (Ping timeout: 248 seconds)
12:55:55Araqyes, wow. I've spent weeks to turn log files into something that collects errors, quantifies the relevance and write me an email when things get wrong.
12:56:20Araqno thanks, text files are dumb.
12:57:47*Arrrr quit (Read error: Connection reset by peer)
12:58:00FromGitter<alehander42> great work @mratsim !
12:59:08*kalkin-- quit (Remote host closed the connection)
13:00:27*Guest25798 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:00:54FromGitter<data-man> @Araq: Does this mean that unittest module will be deprecated in the future?
13:02:27FromGitter<alehander42> that explains the logging, but why don't you like unittest ?
13:02:54*SenasOzys joined #nim
13:03:48*Snircle joined #nim
13:05:18*dddddd joined #nim
13:14:55*sleepyqt joined #nim
13:16:07*PMunch joined #nim
13:23:57*yglukhov joined #nim
13:28:02*yglukhov quit (Remote host closed the connection)
13:35:39FromGitter<andreaferretti> @data-man I hope not, I am using it in a dozen libraries!
13:41:32*nsf quit (Quit: WeeChat 1.9.1)
13:42:31*gokr quit (Ping timeout: 240 seconds)
13:46:30*fvs joined #nim
13:48:16couven92ping federico3?
13:48:55*Jesin quit (Quit: Leaving)
13:50:13*cspar joined #nim
13:52:04*sleepyqt_ joined #nim
13:52:14couven92Araq, see what I tried with AppVeyor: https://ci.appveyor.com/project/dom96/nim/build/945/artifacts
13:52:31*cspar_ quit (Ping timeout: 258 seconds)
13:52:35*dom96 wonders why appveyor links lead to his username
13:54:41*sleepyqt quit (Ping timeout: 248 seconds)
13:56:47*xet7 joined #nim
13:59:32Araqdata-man: no, unittest is here to stay but I personally don't use it
14:01:01Araqalehander42: too often I've seen "works in reality, fails in unittest" because of its metaprogramming voodoo triggering subtle compiler bugs
14:01:42FromGitter<data-man> @andreaferretti: Your hope has come true! 
14:02:03Araqthese have become very rare but I simply don't trust it.
14:02:30Araqit also nests templates 4 level deep and obscures everything
14:04:08couven92dom96, that is a really good question, I have no idea... I just clicked on the GitHub PR page
14:04:58FromGitter<mratsim> I like unittest syntax though. Simple and to the point.
14:06:48FromGitter<alehander42> well the compiler bugs thing should improve with time (as you also say)
14:07:53FromGitter<alehander42> and the ability to analyze `check` args is cool (I expect my nim test lib to use a lot of metaprogramming after all), is there another nim test tool that you prefer ?
14:09:23AraqI should have patched 'doAssert' to do the args analysis a long time ago
14:10:31Araqbut I usually write custom testers
14:11:35AraqI believe in integration tests, not in unit tests...
14:11:55dom96I'm actually using the unittest module for integration tests...
14:12:08dom96That'll probably bite me someday
14:12:42FromGitter<mratsim> @dom96 for https://github.com/nim-lang/needed-libraries/issues/77#issuecomment-345249053 I was inspired by Rust's http://www.arewelearningyet.com/ ;) maybe we need another naming concept though: https://wiki.mozilla.org/Areweyet
14:13:25dom96mratsim: cool :) If you can come up with another naming scheme then sure
14:13:31dom96But I don't think it's necessary
14:14:35FromGitter<mratsim> I'm using unittest to do "load tests" :P (because C++ backend was crashing randomly without stack traces in the past on my workaround for "no mitems for C++")
14:14:50*kier joined #nim
14:16:04Araqunittest also uses environment vars (bah), multi-methods, atQuitProcs, terminal coloring and does its own exception handling
14:16:05couven92Araq, can we have a doAssertEqual?
14:16:17FromGitter<mratsim> I think it's fine as is to be honest, one thing that can help is related discussions in the forum or on GitHub. I tend to get Nim links now when I search for tensor and OpenMP or low level optimization and tensor.
14:16:20couven92as a template, to write a nice message?
14:17:04dom96Araq: We should consider improving that
14:17:17dom96Surely there is a way to achieve it without too many breaking changes
14:17:35Araqcouven92: I prefer a doAssert that does some introspection to see the '=='
14:18:13couven92Araq, what do you mean?
14:18:22couven92ah, just overloading the doAssert?
14:18:32Araqno, fixing the doAssert
14:18:40couven92Ah! :)
14:19:03couven92so changing for binary operators?
14:19:16Araqyes
14:19:27couven92on my to-do list
14:19:48*yglukhov joined #nim
14:19:48Araqnice :-)
14:20:15couven92anyone got an idea on how to suppress showing a single command in a linux shell with set -x enabled?
14:20:29couven92like @<command> does in the Windows cmd?
14:24:07couven92found it: { echo "Message"; } 2> /dev/null
14:28:28*dom96 is now a proud owner of a Nim mug
14:31:19couven92dom96, oooh! I want one as well... also added to my to-dos!
14:31:21couven92:)
14:31:35Araqmuhaha fixed a compiler bug by removing code
14:31:52dom96Didn't PMunch get one? :)
14:31:55dom96https://teespring.com/en-GB/nimlang_mug#pid=527&cid=101950&sid=front
14:32:43couven92dom96, yeah, but he got a job, not sitting next to me in my Uni-office anymore... So I cannot just 'borrow' it anymore :(
14:32:50dom96awww
14:32:58dom96That's a shame
14:33:54floppydhdamn that's only cool mug
14:33:59floppydhone*
14:34:04PMunchdom96, yea I'm drinking tea from my mug right now
14:34:12dom96:D
14:34:18PMunchI've had it for a week already :)
14:34:35dom96I wonder why it took so long to get delivered to me.
14:34:48PMunchBut you should've put the logo on both sides. Now all I see is a black mug :(
14:34:48dom96What are your thoughts on the quality?
14:34:58PMunchGuess I have to start drinking with my left hand..
14:35:14dom96oh damn, that's true
14:35:22dom96That's a pretty bad bug
14:35:25dom96:(
14:35:32floppydhwell you want to show off?
14:35:46dom96I'll mirror it on the other side
14:35:51PMunchWell, the packaging didn't have anything between the cardboard and the mug, so it has slight scuffs every 90 degrees
14:36:05PMunchfloppydh, yeah but I want to see it as well :P
14:36:10floppydhPMunch: :D
14:36:28PMunchOn the front it's even gone through the black paint so there are some slight white marks there
14:36:41dom96D:
14:36:50dom96Mine seems to have survived the journey ok
14:37:09PMunchAnd the edge around the top isn't very neat
14:37:19couven92dom96, fix the both sides issue, so I can order a better cup than PMunch's! :D
14:37:28dom96lol
14:37:37dom96I wonder if I should try a different mug maker
14:38:02PMunchIt seems their painting method involves painting a little bit over the edge, so it sorta dithers a millimeter onto the edge
14:38:26dom96yeah, I can see that.
14:39:15dom96Ugh, there is no way to easily mirror this
14:44:09PMunchIsn't it just one big file?
14:44:23dom96https://lh3.googleusercontent.com/XbObA0pkxVmeK8Y0FRniXVADzkk8HBsOdBtvrf4Wx6CiQbxpdbbbvcrUW_J3yOfmJIY8hyxoMaarOHmQgZnRd0DFcYkGjmmhnRxttrl5RNzmDy0g7tJVad1F1vJqXHe26wlo2jxhurFFGYa36MD2MHDQN28rsLkW24eKXEKj8QmmutWoLEOrw1DwIyJ4YMER9KZYqFYu3l5VzpMFZXCBQb-yPLQ827uC5WCwqBfetQ30fYU4CwIsSvCErxBy9OBakRYFd9RCIHL047OSrd5xmPUoIe8oCdbT2lhpTv53RuH2W2U_XjWHgiCZURVEYlofqg8afMMnHTVmktkz1_CTeWlPFghTP_gUfmkkk02vHeREQzE7LbyJ0uV10170tE8hbHlsm7KgHET5kxF5wLSQMXaikR1F_Yeo-VIwHYKA0QU
14:44:23dom96NMsKlgziZCuVsNs6mTyd8_3FRuOEFQ86b6d9UtsmLQCqCqVLuE8i6dQBNHxWoPGlGYAVmcpQNg03Cnm7mOvnw7LYZPssnf-eR9D6FguwBPBdqbFz8l1oD86zwOA0aCeYrnVfds4WJ80kQ3bxs5bM0jOBsT6ddwKeGTCfKYS2XS6aBYOnVgNtS0HpOZa8s_Q=w811-h1008-no
14:44:29dom96bah
14:44:53dom96http://bit.ly/2A78foG
14:44:56dom96Not sure if you can see that
14:45:07dom96But it's not printed as shown in the designer...
14:45:09*Ven joined #nim
14:45:20dom96Actually, I should tweet this at them
14:45:33*Ven is now known as Guest40983
14:46:03PMunchOuch, yeah that's not good
14:46:12PMunchWhat if you had put something at the bottom there?
14:46:38dom96Yeah
14:47:48PMunchBut couldn't you just add that in the back tab as well?
14:47:52floppydhis nimscript still a thing?
14:48:13dom96PMunch: yeah, I'm doing that now
14:48:15dom96floppydh: yes
14:48:21floppydhvery good
14:48:53couven92floppydh, every nimble-file is basically a nimscript file
14:49:11couven92meaning it probably is not going anywhere
14:49:50dom96PMunch: Problem is, they don't show the coordinates of each image on the mug
14:49:55dom96so I have to align them by eye
14:51:56PMunchdom96, ugh I hate when designer software does that..
14:53:08dom96but anyway, here it is https://teespring.com/en-GB/nimlang_mug2
14:54:42dom96But yeah, if anyone knows of any good alternatives to teespring. Please gimme links.
14:55:54*miran quit (Quit: Page closed)
14:57:00PMunchI looked into it a while back. printedmint looked pretty good
14:57:04PMunchHaven't tried them though
14:58:13*gokr joined #nim
15:02:17floppydhtheres no walkFiles in nimscript?
15:04:40floppydhah listFiles
15:06:41*Jesin joined #nim
15:09:22dom96omg, you can actually see the "printable area" on my t-shirt
15:09:29dom96yeah, teespring appears to suck
15:10:21dom96I can only hope it fades with a wash
15:10:49PMunchWhat?
15:13:30dom96it's subtle, but it's like slightly whiter and shinier in light
15:17:03dom96Can you see the line? http://bit.ly/2ipUwid
15:18:23*jjido quit (Ping timeout: 258 seconds)
15:19:30*nsf joined #nim
15:22:27*gokr quit (Ping timeout: 240 seconds)
15:30:20*lawgsy joined #nim
15:31:28Araqdom96: we have better things to do than changing unittest just because I personally dislike it
15:32:26dom96ok
15:33:00*miran joined #nim
15:34:27*enthus1ast- quit (Quit: Lost terminal)
15:37:08*TjYoco joined #nim
15:39:30*couven92 quit (Quit: Disconnecting)
15:40:28*miran_ joined #nim
15:41:49*Guest40983 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:43:27*miran quit (Ping timeout: 250 seconds)
15:43:37*lawgsy quit (Quit: call me - jexit)
15:46:22FromGitter<Varriount> dom96: The blue color shown on restoring significantly differs with the blue that I see on my mug.
15:46:32FromGitter<Varriount> *on teespring
15:47:00dom96Varriount: oh, you bought a blue mug?
15:47:41FromGitter<Varriount> Yes. I thought it would be dark blue, however it's more of a classic blue
15:47:47dom96I was going to put these on nim-lang.org but with these issues I'm not comfortable to do that.
15:47:57dom96we'll need to try others
15:48:17dom96damn, is it too bright?
15:48:35FromGitter<Varriount> http://www.solidbackgrounds.com/images/2560x1440/2560x1440-brandeis-blue-solid-color-background.jpg
15:48:49FromGitter<Varriount> More like that
15:50:03dom96That's completely different to what's shown on the website.
15:50:08dom96To be honest, I would ask them for a refund
15:50:17FromGitter<Varriount> I can get you an actual image, that'll be more accurate.
15:50:37*miran_ quit (Quit: Konversation terminated!)
15:51:41FromGitter<Varriount> @dom96 That might be hard, since I don't have the packaging anymore
15:51:45*miran joined #nim
15:51:53floppydhI want to include another nimscript by string
15:52:19dom96Varriount: Sorry :(
15:52:31FromGitter<Varriount> floppydh: Do you mean you want to read in a file and store the contents as a string?
15:52:50FromGitter<Varriount> Or use `include `?
15:53:27Araqhttps://github.com/nim-lang/Nim/pull/6723 please vote
15:53:58floppydhVarriount in nimscript I want to include another nimscript file from a string, which is a path I have concatted earlier
15:55:10PMunchUhm dom96 I'm unable to see the image you sent
15:56:36dom96PMunch: https://i.imgur.com/y6pLWOH.jpg
15:56:38PMunchOn teespring the blue looks more like lavender..
15:56:59PMunchdom96, aah I think that's normal with the process they use for printing
15:57:41PMunchThey basically have a machine like this: https://5.imimg.com/data5/UJ/PX/MY-34280809/t-shirt-clothes-digital-printing-machine-250x250.png
15:58:13PMunchWhich heat up and melts the print into the shirt
15:58:36PMunchSo it's natural that it also affects the cotton around it, and it will fade with wear
15:58:36Araqfloppydh: so? what's the problem?
16:01:02dom96PMunch: yeah, I thought. Seems pretty shoddy though. I want higher quality :)
16:01:19floppydhAraq: if I "include variable" he says no file: variable
16:01:47Araqthe compiler is a 'she'.
16:01:55floppydhoh I'm sorry
16:02:01AraqXD
16:02:01floppydhbut is nimscript the compiler?
16:02:26floppydhanyway :>
16:03:00Araqif you use nimscript via the compiler API you probably need to set the search path
16:03:03floppydhbtw I showed the "update docgen style" thing to a coworker who has some background in typography, he likes the "Make spacing between paragraph and pre block consistent" and rambled other stuff, but didnt really like Lato I think
16:03:52AraqI like the "rambled other stuff" part. What's Lato?
16:03:58floppydhthe newer font
16:04:21floppydhhe complained about how the lower case 'a' looked for example
16:04:24floppydhin comparison
16:04:28floppydhbut he's pretty crazy
16:05:12*floppydh quit (Quit: WeeChat 1.9.1)
16:07:22miranfloppydh - now that you mention it, yeah - 'a' does look a bit strange
16:08:17mirani guess 'open sans' it too mainstream.... :)
16:11:17*JappleAck joined #nim
16:11:20FromGitter<mratsim> Fonts are religion look at the ComicSans-gate
16:11:36*PMunch quit (Remote host closed the connection)
16:12:06FromGitter<Varriount> @dom96 https://imgur.com/a/LDN3u
16:12:25dom96hrm, thought it would be worse
16:12:51dom96Glad it doesn't make the eyes bleed :)
16:12:59dom96But the colour on the website would have definitely been nicer
16:14:21FromGitter<Varriount> I'm fine with it.
16:15:46federico3dom96: it's somewhat lacking intensity
16:19:21FromGitter<Varriount> That's to make the crown logo "pop"
16:21:09*PMunch joined #nim
16:28:09*rokups joined #nim
16:33:36*yglukhov quit (Remote host closed the connection)
16:35:07*yglukhov joined #nim
16:35:52*Senketsu joined #nim
16:39:27miranfrom what i've seen in strutils, nim doesn't have an option to specify to replace something in a string just X times? (instead of in whole string)
16:39:39*yglukhov quit (Ping timeout: 258 seconds)
16:39:56dom96Not AFAIK
16:40:39*PMunch quit (Remote host closed the connection)
16:41:14miranok, i guess i'll have to invent my own....
16:41:55*yglukhov joined #nim
16:42:11*Ven joined #nim
16:42:34*Ven is now known as Guest48681
16:42:36Araqmiran: better yet, write a real parser
16:43:22Araqthis whole "I have to split/replace only the first X times" is a code smell
16:43:36Araqyou're using the wrong tools for the job.
16:43:50miranAraq: better yet, i/somebody should add these as parameters to strutils functions :)
16:44:07Araqno, that's exactly what I don't want to see anymore
16:44:22Araqhacks in the stdlib to support your own hacks
16:44:35miranb-but how i'm gonna ellegantly solve AoC task then? :)
16:45:22mirani guess argument "but python has this" won't work?
16:46:02*yglukhov quit (Ping timeout: 240 seconds)
16:46:04dom96If it's easy to implement in the stdlib and Python has it then I will accept it, at the risk of angering Araq :)
16:46:41miranok, i'll think about it then :)
16:48:23AraqPython has this stupid "max" parameter everywhere
16:48:54Araqnot a convincing argument.
16:49:38miranstrutils.find has 'start' and 'last' ;)
16:49:50miranwhich i find useful - please don't throw them out
16:50:54Araqthat's totally different from a 'max' parameter
16:59:36*PMunch joined #nim
17:01:26federico3I miss lstrip and rstrip
17:04:46FromGitter<data-man> @federico3: See my comment: https://github.com/nim-lang/Nim/pull/6473#discussion_r144080796
17:06:07shashlickaraq: wanted to raise a question from earlier, am using c2nim on libvirt and it is generating code with preceding _ in the name of vars and functions. Nim is unable to compile the output. Is there any way to circumvent this besides text replace after the fact?
17:07:53federico3data-man: while you are at it, an in-place l/r character trim would be nice
17:08:03Araqshashlick: told you, use #prefix or one of the many ways to influence name conversions
17:08:18dom96shashlick: --prefix:_ might work
17:09:22shashlickI see, let me try. I have to make it generic within nimgen to allow handling this case automatically
17:09:24FromGitter<krux02> Araq: when I call getImpl from macros, the arguments to the function are there only as identifier nodes, not symbol nodes, is that intentional, a bug, or just lazy implementation that would accept a PR to fix it
17:10:00FromGitter<krux02> here is a bit of context: https://github.com/nim-lang/Nim/issues/6771
17:11:36Araqkrux02: it's in a grey area, getType should give you the symbols
17:12:09Araqthe parameter lists are kept as is and instead the type is sem'checked which includes the parameters
17:13:05*sleepyqt_ quit (Quit: Leaving)
17:13:08FromGitter<data-man> @federico3: My suggestions were not accepted. 
17:13:32FromGitter<krux02> I kind of need to know if a symbol depends on the argument symbol
17:14:21FromGitter<krux02> so would it be much work to dive into that code and implement it?
17:15:00Araqit would break my macros I think which rely on the nnkIdent for parameter lists
17:15:23FromGitter<krux02> ouch
17:15:50FromGitter<krux02> well can't you make the macros with untyped arguments?
17:18:18*endragor quit (Remote host closed the connection)
17:19:42FromGitter<krux02> well I have to go, sorry for staying this short
17:21:04*Guest48681 is now known as Ven``
17:22:17*endragor joined #nim
17:24:47*jjido joined #nim
17:26:28*endragor quit (Ping timeout: 240 seconds)
17:29:15*TjYoco quit (Quit: Leaving)
17:32:55*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
17:35:46*yglukhov joined #nim
17:35:56*endragor joined #nim
17:38:36*yglukhov quit (Remote host closed the connection)
17:38:49*yglukhov joined #nim
17:40:27*endragor quit (Ping timeout: 250 seconds)
17:42:54*PMunch quit (Quit: leaving)
17:44:01shashlickdom96, araq: --prefix:_ worked well, thank you! However now have to figure out the libvirt headers - they have used types declared in other .h files and not included them. If I import them manually, I end up with a circular dependency. Wondering how it works
17:49:33*yglukhov quit (Read error: Connection reset by peer)
17:51:43*Ven`` quit (Ping timeout: 258 seconds)
17:52:06*yglukhov_ joined #nim
17:52:28*m712 quit (Quit: bye-nyan!)
17:52:48*m712 joined #nim
18:12:15*yglukhov_ quit (Remote host closed the connection)
18:12:49*yglukhov joined #nim
18:16:36shodan45is there any hope to get some kind of (big?) corporate backing for nim? it just feels like all its competitors do "marketing" better :/
18:17:17*yglukhov quit (Ping timeout: 250 seconds)
18:18:37shodan45I keep trying to like Kotlin.... just so much java baggage
18:21:51Araqshodan45: seems unrealistic, not even Mr Alexandrescu could get D into Facebook, as far as I can tell
18:22:00*fvs left #nim ("ERC (IRC client for Emacs 25.3.1)")
18:22:12shodan45Facebook likes PHP. 'nuf said ;)
18:22:23Araqinstead of "keep trying to like" you should "keep programming in Nim" :-)
18:23:00*fvs joined #nim
18:23:04FromGitter<kayabaNerve> PHP is horrible; a horrible company liking a horrible thing doesn't make it a good thing (can't tell if you're saying it's good or bad)
18:23:28shodan45I *despise* PHP.
18:23:35FromGitter<kayabaNerve> Yay
18:23:39FromGitter<kayabaNerve> Some of my bosses like it
18:24:41shodan45Araq: I just wish there was a way to build a GUI app into a single file that worked cross platform
18:25:00shodan45afaik, the JVM is the only way to do that (with "fat jars")
18:25:33Araqalternatively you can develop a webapp
18:25:51FromGitter<kayabaNerve> Lol ^^
18:25:54shodan45Araq: yeah, that's crossed my mind.....
18:26:02FromGitter<kayabaNerve> Nim does compile to JS
18:27:08FromGitter<kayabaNerve> How well would the JVM + FFI function?
18:27:27shodan45I wonder if it would be possible (tho pretty insane) to use nim to create separate binaries for every platform, then make a small java frontend that detects the platform & runs the right binary.... then bundle everything up into 1 big jar file
18:27:28FromGitter<kayabaNerve> Ignoring the requirement of having Java, how would the overhead be on that?
18:28:00FromGitter<kayabaNerve> shodan45: Nim -> C -> Java FFI -> JVM
18:28:09*salewski joined #nim
18:28:10*dexterk quit (Quit: Konversation terminated!)
18:28:46FromGitter<kayabaNerve> I forgot how you have to compile C to be compatible with the Java FFI but Nim would be compatible
18:29:03FromGitter<kayabaNerve> You should be able to use multi-platform code in the FFI by loading different versions
18:29:07FromGitter<kayabaNerve> And then it runs in the JVM
18:29:09*adamchainz quit (Quit: ZNC 1.6.3+deb1 - http://znc.in)
18:30:06shodan45ooooh even better/crazier: a small frontend jar that sends the OS/platform to some cloud service that then builds the right binary on-demand & sends it back to the frontend to run
18:30:30shodan45I'm full of crazy ideas today
18:30:37*nitely joined #nim
18:30:54FromGitter<kayabaNerve> ... That's a web page boi
18:31:10salewskiAraq, what do you think, is that a bug or feature: https://github.com/nim-lang/Nim/issues/6772
18:31:13Araqjust distribute the Nim code and let the people compile :P
18:31:19FromGitter<kayabaNerve> You just described a complicated way of a web browser and a web page
18:31:32shodan45Araq: hah
18:31:45salewskiIf it is really intended, then I have to fix the code of gintro/gen.nim of course.
18:32:06Araqor provide binaries for the 3 OSes that are in active use
18:32:14Araqit's not that hard really.
18:33:09FromGitter<kayabaNerve> That seems like a feature? You have to cast it to cint as that iterator is yieliding ints
18:33:23shodan45kayabaNerve: the app I'm thinking of needs regular app-level access to the host; a web page won't really work
18:33:29FromGitter<kayabaNerve> I could be wrong. Just my comment.
18:33:58FromGitter<kayabaNerve> shodan45: At this point, I recommend a blood sacrifice to Cthulhu
18:34:01Araqsalewski: sorry, but it's documented in the changelog as a known breaking change
18:34:19Araqyou need to fix your code
18:34:25salewskiOK.
18:35:10nitelygood morning/afternoon/evening y'all :D
18:36:27FromGitter<kayabaNerve> Apparently my issue was closed
18:37:10nitelyI've a quick question: if I've a huge array, say, full of 1's and 2's and I care about RAM usage. I should suffix the numbers with 'int8, right?
18:37:42*yglukhov joined #nim
18:37:42nitelyis that the preferred way of getting int8's?
18:37:59nitely*an array of int8's
18:39:15nitelyI would have expected array[n, int8] would work, but does not
18:39:47*yglukhov quit (Remote host closed the connection)
18:42:44*adamchainz joined #nim
18:42:56FromGitter<data-man> @nitely ⏎ '''nim ⏎ var a: array[4, int8] = [0'i8, 1, 2, 3] ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5a0f2db0df09362e671fa82c]
18:43:15FromGitter<data-man> Oops 
18:44:05*dexterk joined #nim
18:44:10FromGitter<kayabaNerve> K. Updated my bug report as Dom asked. No idea why Araq closed it though
18:44:21Araqhuh?
18:44:27dom96he fixed it
18:44:46dom96"Araq closed this in 2d72671 3 hours ago"
18:45:19*dexterk quit (Client Quit)
18:47:10nitelydata-man: ahh, thanks!
18:47:48salewskiI have some trouble finding in the changelog the changes for ..<. I know that unary < is deprecated, but there must be more changes?
18:48:18*vivus joined #nim
18:52:28FromGitter<data-man> @nitely: Are you working on a new unicode module? ;-)
18:53:22FromGitter<kayabaNerve> I found a compiler crash last night. Documented the code lines that caused it, the line it crashed on, gave a compiler stack trace, said what variable the compiler was trying to access that was null... ⏎ ⏎ Dom96 wanted a full example (one extra line plus one extra () :P), and then Araq closed it. ⏎ ⏎ I added the full example. [https://gitter.im/nim-lang/Nim?at=5a0f3022540c78242d17c5ed]
18:53:50dom96Did you miss my message?
18:53:54dom96Like I said, Araq fixed it
18:53:58*claudiuinberlin joined #nim
18:53:58dom96That's why he closed the issue
18:54:00FromGitter<kayabaNerve> Also, dom96, loving your book. I've known Nim for a few years and used it on and off during that but you did great on your book :D
18:54:15FromGitter<kayabaNerve> Oh. I missed that. Yeah. Sorry.
18:54:17FromGitter<kayabaNerve> My mistake D:
18:55:37Araq- To make Nim even more robust the system iterators ``..`` and ``countup``
18:55:37Araq now only accept a single generic type ``T``. This means the following code
18:55:37Araq doesn't die with an "out of range" error anymore:
18:55:39Araq.. code-block:: nim
18:55:41Araq var b = 5.Natural
18:55:43Araq var a = -5
18:55:45Araq for i in a..b:
18:55:47Araq echo i
18:55:49Araq@salewski
18:56:01Araqbut it could mention that it breaks quite some code...
18:56:43salewskiAraq, .. works fine still, but ..< not. That is really confusing.
18:56:56Araq?
18:57:21Araqthe snippet you gave to me fails with
18:57:28Araqtemp3.nim(6, 6) Error: type mismatch: got (int)
18:57:28Araqbut expected one of:
18:57:29Araqproc foo(ci: cint)
18:57:41Araqyou asked me to look into it
18:57:54salewskiBut with .. it compiles fine.
18:58:25Araqoh I can't read
18:58:33Araqyour snippet uses ..<
18:58:39Araqwell ..< is unchanged
18:59:24Araqand '..' works because I added special overloads to mitigate the burden
18:59:28Araq:-)
18:59:36Araqso ... I dunno.
18:59:48salewskiI have the feeling that ..< has changed, because that does not work any more. .. works for me still.
18:59:53shodan45I think you mean "so .. I dunno"
19:00:47FromGitter<kayabaNerve> Lol
19:02:13salewskiMaybe it would be better if .. and ..< would both break, so we can fix all of that.
19:02:31*yglukhov joined #nim
19:02:52salewskiI was going to replace ..< by .. but now I thing I should apply the cint conversion.
19:03:56*yglukhov quit (Remote host closed the connection)
19:12:23*dexterk joined #nim
19:16:01salewskiAh yes, this would work also now: for i in 0.cint ..< numArgs():
19:16:07Araqas far as I can tell ..< never worked
19:16:30salewskiI think I will fix gen.nim in this way.
19:19:38*rbrt joined #nim
19:21:18salewskiI don't know what you mean by "never worked": So should we all prefer plain .. and avoid ..< ?
19:22:43AraqI don't know why this code ever worked, was it '.. <' ?
19:23:54FromGitter<kayabaNerve> Wait... did my question never send?
19:24:44salewskiYes I know about the problems with .. < with the space -- that was not working in the prime numbers forum post.
19:25:34FromGitter<kayabaNerve> Araq: Any part of Nim that was especially hard to compile to C? I used Polymorphism the other day, surprisingly painless, and it kinda stunned me that this high level code would compile to such a low level language. Sure, ASM/Binary is more low level and what other languages generally do, but C also offers some more constraints...
19:25:35salewskiIndeed I dont use the notation with space any more, as it is deprecated.
19:25:57*vlad1777d_ joined #nim
19:26:59AraqkaybaNerve: it's all hard. the high level stuff, the low level stuff
19:27:23FromGitter<kayabaNerve> Fair enough :) It's more than I could do.
19:27:52Araqgenerate C types, for example.
19:28:18Araqyou can forward declare structs but nothing else and if you do, only pointers to the forward declaration must be used
19:29:31Araqit's an interesting problem that has no equivalent when targeting asm or LLVM.
19:29:57*yglukhov joined #nim
19:30:00FromGitter<kayabaNerve> Interesting...
19:32:15*yglukhov quit (Remote host closed the connection)
19:33:21*rauss quit (Ping timeout: 240 seconds)
19:33:45*yglukhov joined #nim
19:35:10*rauss joined #nim
19:40:40*salewski quit (Quit: WeeChat 1.9.1)
19:45:35nitelydata-man: yes, working on the unicode module
19:45:56nitelyhuge savings thanks to you right now :D
19:47:08FromGitter<kayabaNerve> Do we have an inline Brainf*** lib?
19:47:46FromGitter<kayabaNerve> Where instead of Nim, I can run Brainf*\*\* on passed Nim data and then view what Brainf*\*\* did?
19:48:08FromGitter<kayabaNerve> K. I'm typing triple *. I tried escaping them. Gitter hates me.
19:48:21FromGitter<kayabaNerve> But anyways. We don't as it makes no sense, right?
19:48:30*xkapastel joined #nim
19:49:15dom96No, but you could write one
19:49:35dom96You could even write a macro that takes brainfuck as input and returns a Nim AST, essentially compiling Brainfuck to Nim.
19:50:00*Vladar quit (Quit: Leaving)
19:50:16FromGitter<kayabaNerve> I might since we don't have one lol
19:50:20FromGitter<kayabaNerve> And that's a great idea tbh
19:50:35*ShalokShalom joined #nim
19:50:55FromGitter<kayabaNerve> That said, I do like the idea of having a piece of code I compile once through the standard compiler that has both in one file. ⏎ ⏎ That points to a lib
19:56:30*zolk3ri joined #nim
20:02:12FromGitter<data-man> @nitely: ⏎ I'm also working on this module. :) ⏎ I recommend trying NimData. I did PR for this wonderful library, and now possible to parse a hex numbers. ⏎ For example, the scheme for UnicodeData.txt looks something like this: ⏎ ... [https://gitter.im/nim-lang/Nim?at=5a0f4044540c78242d181e24]
20:03:52*NimBot joined #nim
20:05:51federico3any feedback? https://screenshots.firefoxusercontent.com/images/0f63674f-e6c1-40ad-a294-27e0e8a14dbd.png
20:08:19nitelydata-man: what's the sizeof that thing?
20:11:21nitelythat parsing lib looks neat
20:11:50FromGitter<mratsim> @dom96 @alehander42 I’ve updated https://github.com/nim-lang/needed-libraries/issues/77 with all the duplicates. I can’t close them though. (Nor add the scientific label to #77)
20:12:05nitelybut parsing was the easiest part for me anyway
20:12:10dom96mratsim: why not? I added you as a collaborator
20:12:18dom96(You need to accept the invite)
20:13:22FromGitter<mratsim> ah
20:13:50*gokr joined #nim
20:14:07nathanjkayabaNerve: have you seen http://howistart.org/posts/nim/1/index.html ? bf to nim macro
20:14:19FromGitter<mratsim> indeed that was it
20:15:19nitelydata-man: unicode database is massive
20:15:34FromGitter<data-man> @nitely: A df_unidata sizeof ? I don't know. And no, NimData is much more than just a parsing library.
20:18:20nitelyah, I see. I only focused on th parsing bit
20:19:02*Sentreen quit (Ping timeout: 260 seconds)
20:19:12nitelythere are huge saving opportunitiesby using two stages tables and min perfect hashig on the unicode db
20:20:03nitelyTBH I only care about building the regex engine, but had to d this first or else it would just work on ascii :D
20:21:37dom96yay, glad you'll still be working on that regex engine :)
20:24:15nitelydom96: haha, yes looking forward to it
20:26:04FromGitter<kayabaNerve> nathanj: Thanks
20:28:56FromGitter<mratsim> Greenspun's tenth rule: Any sufficiently complicated regexp engine contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.
20:30:03*rbrt quit (Quit: Oíche mhaith)
20:31:27*adamchainz quit (Ping timeout: 248 seconds)
20:31:40*Sentreen joined #nim
20:32:00FromGitter<data-man> @nitely: ⏎ I do not yet choose which method to use.  ⏎ For e.g.: https://github.com/JuliaLang/utf8proc and https://github.com/patperry/utf8lite ⏎ And the https://github.com/patperry/corpus library is fantastic! [https://gitter.im/nim-lang/Nim?at=5a0f4740df09362e67202eea]
20:34:03nitelydata-man: What're you building?
20:35:21FromGitter<mratsim> Done with scientific nim cleanup, I guess we need the same for data structure/collections (are we collectors yet/are we structured yet), GUI (are we UI yet), database/key-value store/ORM (are we database yet), http/websocket/network (are we internet yet), multithreading/green threads/concurrency (are we threaded/concurrent yet), primitive types/time/vec2/bigints (are we typed yet), OpenGL/Vulkan (are we graphics yet).
20:35:21FromGitter... What do you think?
20:35:52FromGitter<data-man> @nitely: unidata, DFA-based utf-decoder, uni-sets, etc.
20:36:04nitelyI wrote an implementation of unicode normlization the other day. It's similar in spirit to the one in golang. Can be used on streams (is O(n))
20:39:21FromGitter<data-man> D has very good uni module.
20:39:37FromGitter<data-man> And compile-time regexes.
20:44:07nitelyfor graphemes here's a start: https://github.com/nitely/nim-graphemes
20:44:41nitelybut at the moment it's much easier to just wrap some ofthose C libs for the unicode support
20:48:27FromGitter<data-man> Pure Nim only. It's true path. 
21:03:09*nitely quit (Ping timeout: 260 seconds)
21:05:05*jjido quit (Remote host closed the connection)
21:06:18*jjido joined #nim
21:07:46*rokups quit (Quit: Connection closed for inactivity)
21:15:29*jjido quit (Read error: No route to host)
21:18:31*PMunch joined #nim
21:23:55FromGitter<Varriount> I could have sworn that someone wrote done Unicode libs already
21:24:08FromGitter<Varriount> *wrote some
21:24:44FromGitter<Varriount> @data-man How easily could D's Unicode libs be ported to Nim?
21:25:57dom96What is Nim's unicode module missing?
21:26:25GitDisc<treeform> What is the hard part about unicode?
21:28:57GitDisc<treeform> Does nim use utf8 even on windows wright? (as it should)
21:29:36*jjido joined #nim
21:31:44dom96looks like I'm hitting the same breaking change as Salewski
21:31:51dom96Araq: What's the rationale for this?
21:33:34dom96I now have to write: for i in 0.cuint..<unit.getNumDiagnostics():
21:33:35dom96:\
21:34:27FromGitter<kayabaNerve> dom96: Write a Nim Superset that fixes this.
21:34:57dom96That's a bit extreme :)
21:35:25FromGitter<data-man> @Varriount: Porting from D will not be very easy. ⏎ @dom96: Missing normalizations, emoji, codepoint name by code, has old data, ...
21:36:02dom96So let's add these to Nim :)
21:38:11FromGitter<data-man> I'm busy with too many interesting things :-)
21:39:04FromGitter<data-man> This is my biggest problem.
21:42:39FromGitter<data-man> But I hope to do everything to version 1.0
21:45:37dom96:)
21:45:47dom96We can always keep adding things after v1
21:46:00dom96Just make sure to fix all the things that require breaking changes
21:47:39*mr_yogurt joined #nim
21:47:54*jjido quit (Read error: No route to host)
21:48:46FromGitter<kayabaNerve> Or
21:48:53FromGitter<kayabaNerve> Make a Nim update tool
21:49:23FromGitter<kayabaNerve> Have it browse and auto update source
21:49:43FromGitter<kayabaNerve> Also have it print deprecation warnings/errors. It's a tool, not magic
21:50:51Araqdom96: could add an overload for this case
21:51:42dom96Araq: Why was this change made?
21:52:21FromGitter<data-man> @dom96: Probably soon, I will update a unicode data to the current version (10.0 or 11-beta) as it implemented in the stdlib now.
21:52:42Araqit was error prone for ranges, see the changelog
21:53:11Araqalso it's unclear why it would take T, S generic parameters rather than only T
21:54:08dom96because we get errors like I just got :\
21:55:36dom96the changelog doesn't explain what this fixes
21:56:49*mr_yogurt quit (Ping timeout: 260 seconds)
21:57:20*nsf quit (Quit: WeeChat 1.9.1)
21:59:55*vivus quit (Quit: Leaving)
22:00:33*miran quit (Quit: Konversation terminated!)
22:00:38Araqit does, read it again
22:05:38dom96oh, I see, it's after the .. code-block... this file is markdown :)
22:07:23dom96isn't there a way to fix that without breaking so much code?
22:07:40dom96can't the implementation of `..` check for this use of Natural?
22:07:43Araqyes, as I said, I can add an overload
22:08:05dom96ok, please do
22:09:39Araqdata-man: I still have "lexim" somewhere that gives us compile-time regexes
22:10:15Araqbut I haven't used it for anything and it probably needs some updates
22:12:20FromGitter<alehander42> @mratsim so the closed issues would be used for discussion of concrete libs
22:12:24FromGitter<alehander42> or ?
22:12:57Araqcan somebody bisect this for me https://github.com/nim-lang/Nim/issues/6724
22:14:50*Chuang-Tzu joined #nim
22:15:20Chuang-TzuHow does the terminal module compare to ncurses?
22:16:30Araqit works on Windows too but has fewer features.
22:17:19federico3https://ci.appveyor.com/project/Araq/nim/build/2248/tests what is this copyMem error?
22:18:20FromGitter<data-man> @Araq: https://github.com/Araq/lexim and it's VM-based? ⏎ I like how the scanf is implemented. Probably, CT-regexes also can be implemented as a macro, but it is not my level. :-)
22:19:15Chuang-TzuWould it make sense to port ncurses to pure nim, or come up with a new api that's more nim centric?
22:19:33Araqfederico3: your code breaks the JS target?
22:19:46AraqChuang-Tzu: we had a pdcurses wrapper somewhere iirc
22:19:54federico3yep, looks like copyMem is not defined in js - see https://github.com/nim-lang/Nim/issues/5667
22:20:11Araqdata-man: the VM is only used when you use runtime regexes
22:20:44Araqit's pretty complex but compiles to Nim code in the end with no overhead
22:20:58Chuang-TzuI saw that there's an ncurses wrapper... but don't wrappers cause problems with memory management?
22:21:44Araqnot many problems, but inconveniences
22:21:46*PMunch quit (Quit: leaving)
22:24:35FromGitter<data-man> @Araq: Great! Why is it not in stdlib? :-)
22:24:47Araqbecause it's not ready
22:24:55Araqplease take over its development :-)
22:26:32*Trustable quit (Remote host closed the connection)
22:26:59FromGitter<data-man> Oh, no! I'm newbie to Nim.
22:28:17Araqit's pretty standard stuff, regex to AST
22:28:20AraqAST to DFA
22:28:29Araq*NFA
22:28:31AraqNFA to DFA
22:28:36Araqminimize DFA
22:28:39Araqgenerate code
22:29:31Araqit runs at compile-time but Nim's compiletime evaluation VM was too slow so I used a helper.exe that is called at compiletime
22:30:30*rbrt joined #nim
22:31:57FromGitter<data-man> Interesting. D-regex uses Thompson NFA.
22:32:34FromGitter<nitely> DFA blow up on unbounded regex.
22:33:00FromGitter<nitely> ie: having something like \\w
22:33:38FromGitter<nitely> Well, except when they only match ascii I guess. But even then the DFA woud be huge
22:34:24FromGitter<nitely> I think google's re2 uses NFA when the regex is unbounded and DFA otherwise...
22:35:04FromGitter<nitely> or a sort of hybrid, not sure
22:36:03Araqwell lexim is a primarily a lexer generator, DFAs are the state of the art for real lexers
22:36:56FromGitter<data-man> And you do not plan to make a JIT VM?
22:37:16Araqnah
22:37:38FromGitter<data-man> :-)
22:38:11Araqregexes are too complex really. takes thousands of lines to support that "Perl compatible" aspect
22:39:12*TjYoco joined #nim
22:40:45FromGitter<nitely> I would say Thomson's NFA is fairly straightforward
22:41:07FromGitter<nitely> it does not support lookbehind/lookahead though
22:42:10FromGitter<nitely> and other more exotic features like the recursion operator
22:43:16FromGitter<nitely> but if it did it would no longer be just a regex engine
22:44:01FromGitter<data-man> D regex module has interesting thing: regex-based a sample generator (officially not documented, because not finished.) ⏎ I planned implement this for Nim's PEGs. :-)
22:49:05*ShalokShalom quit (Remote host closed the connection)
22:58:43*fvs left #nim ("ERC (IRC client for Emacs 25.3.1)")
23:00:37*gokr quit (Ping timeout: 268 seconds)
23:00:41FromGitter<mratsim> @alehander42 I don’t know if it’s cleaner to close issues and reopen for extended discussions, or leave one issue open for each duplicate and clutter the tracker :/
23:01:34FromGitter<mratsim> (talking about the needed-libraries tracker)
23:12:19*TjYoco quit (Quit: Leaving)
23:12:48*JappleAck quit (Quit: Leaving)
23:15:52*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
23:40:06*craigger_ joined #nim
23:41:51*craigger quit (Ping timeout: 248 seconds)
23:48:38FromGitter<kayabaNerve> If I have a variable of an unknown type, how can I 100% of the time check if it's nill?
23:49:15FromGitter<kayabaNerve> Not saying I need to know if it's proper or not. Just if it's not nil. I'm getting SIGSEVs and need to see what the issue is
23:56:02FromGitter<kayabaNerve> NVM
23:58:27*marenz__ quit (Ping timeout: 240 seconds)