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:06 | FromGitter | <Varriount> @mratsim Could this be useful for Arraymancer: https://nim-lang.org/docs/manual.html#guards-and-locks ? |
01:46:29 | Serenitor | I 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:42 | FromGitter | <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:51 | Serenitor | @kayabaNerve stack trace is missing? |
01:48:59 | * | jinshil joined #nim |
01:49:08 | FromGitter | <kayabaNerve> Yep. It just says Proccessing a list of files and then throws that |
01:49:30 | FromGitter | <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:11 | FromGitter | <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:36 | FromGitter | <kayabaNerve> https://github.com/kayabaNerve/PacMan3D/blob/master/entities/ghosts/inky.nim ⏎ https://github.com/kayabaNerve/PacMan3D/blob/master/entities/ghosts/clyde.nim ⏎ For reference^^ |
01:52:23 | FromGitter | <Varriount> @kayabaNerve Are you using the development version of the compiler, or the latest stable release? |
01:52:31 | FromGitter | <kayabaNerve> Uhhh Latest Stable IIRC |
01:52:55 | FromGitter | <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:11 | FromGitter | <Varriount> You might try the development version. It's usually in working order, and has the most recent bug fixes. |
01:53:43 | FromGitter | <kayabaNerve> So is your theory it's the compiler breaking, not my code? |
01:53:59 | FromGitter | <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:19 | FromGitter | <kayabaNerve> Lol. I thought about compiling it again. |
01:54:24 | FromGitter | <Varriount> @kayabaNerve Pretty much. |
01:54:26 | FromGitter | <kayabaNerve> But then I decided to come here first |
01:54:44 | Serenitor | I've had that once and iirc it had something todo with me messing up an object constructor's syntax somewhere |
01:54:48 | FromGitter | <Varriount> I mean, your code might have some error that the compiler is choking on. |
01:54:51 | FromGitter | <kayabaNerve> So. How would I install the newest nim compiler on Windows? |
01:55:24 | FromGitter | <Varriount> Clone the Github repository, and use your current compiler to compile the development compiler. |
01:55:32 | * | jinshil_ joined #nim |
01:55:45 | FromGitter | <kayabaNerve> Yep... thought so. It's cool that Nim is bootstrapped. |
01:57:12 | FromGitter | <kayabaNerve> Constructors look fine to me |
01:57:20 | FromGitter | <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:31 | FromGitter | <Varriount> (of course, I had to edit my PATH variable too) |
01:58:03 | FromGitter | <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:47 | FromGitter | <Varriount> Nope, |
01:58:53 | FromGitter | <Varriount> devel is the default. |
01:59:12 | FromGitter | <kayabaNerve> git clone https://github.com/nim-lang/Nim.git ⏎ koch boot -d:release -d:stacktrace |
01:59:15 | FromGitter | <kayabaNerve> That? |
01:59:52 | FromGitter | <Varriount> I generally use `koch boot -d:release --stacktrace:on --linetrace:on` |
02:00:00 | * | skrylar quit (Remote host closed the connection) |
02:00:17 | FromGitter | <kayabaNerve> Got it. Thanks |
02:00:38 | FromGitter | <Varriount> The produced compiler is faster than a non-release version, but you still get optimizations from the C compiler. |
02:01:11 | FromGitter | <kayabaNerve> Compiling |
02:02:45 | FromGitter | <kayabaNerve> Done |
02:05:13 | FromGitter | <kayabaNerve> Same error but there's a trace |
02:05:14 | FromGitter | <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:21 | FromGitter | <kayabaNerve> And that's long.... sorry |
02:06:09 | FromGitter | <kayabaNerve> https://pastebin.com/UzMefn8p |
02:06:16 | * | jinshil_ quit (Quit: Good-bye!) |
02:06:47 | FromGitter | <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:01 | FromGitter | <kayabaNerve> That would be the clyde file |
02:07:02 | FromGitter | <Varriount> It looks like the problem is in a 'while' statement. |
02:07:13 | FromGitter | <kayabaNerve> https://github.com/kayabaNerve/PacMan3D/blob/master/entities/ghosts/clyde.nim |
02:07:30 | FromGitter | <kayabaNerve> That's the last file it's processing |
02:07:37 | FromGitter | <kayabaNerve> I have that for loop in at least 3 other files |
02:08:38 | Serenitor | what's the last file in the stack trace that's one of yours? main.nim line 74 right? what happens there? |
02:08:53 | FromGitter | <Varriount> Serenitor: That's the compiler source code. |
02:09:01 | FromGitter | <kayabaNerve> Yep^^ |
02:09:11 | FromGitter | <kayabaNerve> Last file it's processing Clyde.nim |
02:09:49 | FromGitter | <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:30 | FromGitter | <kayabaNerve> Every other ghost file is already processed |
02:11:06 | FromGitter | <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:12 | FromGitter | <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:56 | FromGitter | <kayabaNerve> Commenting the for loop did nothing @Varriount |
02:13:59 | FromGitter | <Varriount> One moment. I'm going to check out the repo |
02:14:00 | * | Serenit0r joined #nim |
02:14:23 | FromGitter | <Varriount> @kayabaNerve Congratulations, you've discovered a compiler crash. Those don't occur too often these days. |
02:15:18 | FromGitter | <kayabaNerve> Yay. I did something that likely helps in the long run but does mean I'm screwed in the short term! |
02:15:22 | FromGitter | <kayabaNerve> Do I get a medal? :P |
02:16:18 | Serenit0r | only if you figure out what causes it :) |
02:16:32 | FromGitter | <kayabaNerve> Here's the line that it crashes on if typeExpr.typ.kind == tyFromExpr: |
02:16:44 | FromGitter | <kayabaNerve> So that's what causes it |
02:16:46 | FromGitter | <kayabaNerve> :P |
02:16:55 | FromGitter | <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:25 | FromGitter | <Varriount> First I need to find my laptop. :/ |
02:20:11 | FromGitter | <kayabaNerve> K. I added 'echo' statements in because I'm an expert in debugging. Recompiling :P |
02:21:06 | FromGitter | <kayabaNerve> Hey! It gave me info! |
02:21:13 | FromGitter | <kayabaNerve> tyFromExpr ⏎ updatePosition(player, 0, 0) |
02:21:20 | * | SenasOzys quit (Ping timeout: 248 seconds) |
02:21:37 | Serenit0r | if stack trace fails you -> spam echos -> if echos fail you -> remove code until it compiles again ^^ |
02:22:07 | FromGitter | <kayabaNerve> It gave me the problem line... sort of |
02:22:29 | FromGitter | <kayabaNerve> typeExpr.typ.kind is null |
02:22:31 | FromGitter | <kayabaNerve> @Varriount |
02:23:07 | FromGitter | <kayabaNerve> of nkDotExpr: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ First is tyFromExpr ... [https://gitter.im/nim-lang/Nim?at=5a0e480adf09362e671ae82e] |
02:23:09 | FromGitter | <Varriount> Looking into it... |
02:23:28 | FromGitter | <kayabaNerve> Third is blank. 4th is invalid. So I guess the typeExpr.typ is the null part |
02:23:42 | FromGitter | <Varriount> You added echo statements in the compiler? |
02:23:56 | FromGitter | <kayabaNerve> Yes lol |
02:24:25 | FromGitter | <kayabaNerve> I can't say "How else would you do it?" because I know better but I can say "It worked" |
02:24:36 | FromGitter | <Varriount> This is what I get from --verbosity:3 - https://gist.github.com/Varriount/46bc7ff52473bbb7fa3a91110d8a0926 |
02:25:11 | FromGitter | <kayabaNerve> From my code? |
02:25:23 | FromGitter | <Varriount> Yeah. |
02:25:29 | FromGitter | <kayabaNerve> It's complaining about this line: updatePosition(player, 0, 0) |
02:25:44 | FromGitter | <kayabaNerve> Which I only write as player.updatePosition |
02:26:18 | FromGitter | <kayabaNerve> But I never do 0, 0 |
02:26:19 | FromGitter | <Varriount> "player.updatePosition(z: 1)" <- I don't believe that's valid syntax |
02:26:36 | FromGitter | <kayabaNerve> It has default args of 0 |
02:27:06 | FromGitter | <kayabaNerve> And it's an equal sign |
02:27:08 | FromGitter | <kayabaNerve> Not a colon |
02:27:09 | FromGitter | <Varriount> Replace the `:` with `=` |
02:27:16 | Serenit0r | mixing function call syntax with object constructor syntax is exactly what causes that compiler error without stacktrace for me once, too |
02:27:25 | FromGitter | <kayabaNerve> Yep |
02:27:28 | FromGitter | <Varriount> On lines 94, 97, 100, and 103 |
02:27:42 | FromGitter | <kayabaNerve> It works |
02:27:47 | FromGitter | <kayabaNerve> Yep. Thanks! |
02:28:01 | FromGitter | <Varriount> Serenit0r: Did you file an issue? Did it get resolved? |
02:28:19 | FromGitter | <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:30 | FromGitter | <Varriount> @kayabaNerve By the way, I like your code. Nice and clean. |
02:29:15 | FromGitter | <Varriount> @kayabaNerve Echo statements in the compiler can help.. but in a large program, they can lose their usefulness |
02:29:56 | FromGitter | <kayabaNerve> Thank you. I try. Feel free to submit some pull requests. For the GitHub Game Off |
02:30:11 | FromGitter | <kayabaNerve> And yes, outside of this quick debugging, they're almost pointless |
02:30:13 | FromGitter | <Varriount> There's a Github game off? |
02:30:16 | Serenit0r | @Varriount no, didn't file an issue |
02:30:19 | FromGitter | <kayabaNerve> Yep. Started this month |
02:30:21 | FromGitter | <kayabaNerve> Dibs |
02:30:25 | FromGitter | <kayabaNerve> Dibs on filing the issue |
02:30:39 | FromGitter | <kayabaNerve> They've had it for multiple years lol |
02:30:57 | FromGitter | <kayabaNerve> And it's one month; starts in November. I'm doing 3D PacMan with SFML |
02:31:11 | FromGitter | <kayabaNerve> Only thing I can get working reliably + simple + retro 2.5D goodness |
02:34:10 | FromGitter | <Varriount> @kayabaNerve Well, when I run the main executable, the window appears. Nothing is drawn though. |
02:34:27 | FromGitter | <kayabaNerve> Yeah. I 'm working on it |
02:34:30 | FromGitter | <kayabaNerve> I started late too lol |
02:35:04 | FromGitter | <Varriount> Well, we're glad you chose Nim |
02:37:04 | FromGitter | <kayabaNerve> https://github.com/nim-lang/Nim/issues/6765 |
02:37:14 | FromGitter | <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:50 | FromGitter | <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:34 | FromGitter | <kayabaNerve> Thoughts on that issue? Just edited with a clarification of what's null |
02:42:00 | FromGitter | <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:04 | Serenit0r | have you checked if the issue occurs even without the object? if so, may be better to omit it |
02:44:56 | FromGitter | <kayabaNerve> I haven't. One sec |
02:46:09 | FromGitter | <kayabaNerve> proc test(x: int = 0) = ⏎ ⏎ ```discard``` ⏎ ⏎ test(x: 0) [https://gitter.im/nim-lang/Nim?at=5a0e4d70cc1d527f6b7e41d8] |
02:46:11 | FromGitter | <kayabaNerve> This works fine |
02:46:54 | Serenit0r | cool :) |
02:47:46 | FromGitter | <kayabaNerve> Yep |
02:47:53 | FromGitter | <kayabaNerve> Requires being wrapped in an object |
02:49:08 | FromGitter | <Varriount> @kayabaNerve Bountysource is preferred. |
02:49:26 | FromGitter | <kayabaNerve> Updated |
02:49:31 | FromGitter | <Varriount> I have a recurring donation set up through Bountysource. |
02:49:38 | FromGitter | <kayabaNerve> It requires that you use obj.MyFunc to crash |
02:50:59 | Serenit0r | nim 1+1 |
02:51:04 | Serenit0r | how does that bot work again |
02:51:19 | FromGitter | <kayabaNerve> Not like that :P |
02:52:19 | Serenit0r | hm maybe it's not online :( |
02:53:02 | FromGitter | <Varriount> !eval echo 1 + 1 |
02:53:05 | NimBot | 2 |
02:53:18 | FromGitter | <Varriount> Serenit0r: ^ |
02:53:25 | Serenit0r | ah thanks |
02:53:36 | Serenit0r | !eval type Obj = object; proc test(o: Obj, x: int = 0) = discard; Obj().test(x: 22) |
02:53:37 | NimBot | Compile failed: SIGSEGV: Illegal storage access. (Attempt to read from nil?)↵Compilation Failed |
02:53:42 | Serenit0r | haha ^^ |
02:55:03 | FromGitter | <kayabaNerve> YES! |
02:55:15 | FromGitter | <kayabaNerve> VINDICATION! |
02:55:23 | FromGitter | <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:32 | FromGitter | <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:21 | FromGitter | <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:11 | FromGitter | <Varriount> @kayabaNerve You have some BTC to spend? |
03:07:33 | FromGitter | <kayabaNerve> @Varriount A bit |
03:08:34 | FromGitter | <kayabaNerve> "$1,575 this month from 43 supporters" |
03:08:57 | FromGitter | <kayabaNerve> That's actually impressive lol |
03:09:16 | FromGitter | <kayabaNerve> Over 25 each month average... |
03:10:18 | FromGitter | <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:35 | FromGitter | <kayabaNerve> @Varriount BTW, If you want to get in on the game off, I'd love to have a partner |
03:17:49 | FromGitter | <kayabaNerve> Sorry about pinging you so much. I meant to say that but I got distracted in other chats |
03:18:02 | FromGitter | <kayabaNerve> Same to anyone else lurking here :) |
03:23:01 | * | cspar quit (Ping timeout: 240 seconds) |
03:31:52 | FromGitter | <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:34 | FromGitter | <mratsim> For games you need to ping @yglukhov and @zacharycarter |
04:03:00 | FromGitter | <mratsim> Maybe even open a forum thread |
04:04:18 | FromGitter | <kayabaNerve> Eh. I'm not so invested I'll seek one out actively. Thanks though, @mratsim |
04:05:06 | FromGitter | <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:22 | FromGitter | <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:51 | FromGitter | <mratsim> Anyway good to know! For atomics I was exploring using "cas" (completely undocumented in system.nim) |
04:15:23 | FromGitter | <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:00 | FromGitter | <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:01 | Tanger | Hey 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:02 | FromGitter | <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:45 | Tanger | Varriount: Nope, but I did define the predicate above the any() call, which compiled fine |
06:05:57 | Tanger | A bit unsure about running it though, seems dodgy |
06:21:36 | * | miran joined #nim |
06:30:02 | FromGitter | <Varriount> Tanger: Could you post the code? |
06:36:52 | Tanger | Varriount: https://pastebin.com/b3T00Ujj With nim 0.17.3 |
06:38:29 | * | nsf joined #nim |
06:41:00 | FromGitter | <Varriount> That should work, although the inline might present problems with newer compiler versions |
06:41:30 | FromGitter | <Varriount> Your compiler version will just disregard the inline and make it a closure type |
06:47:29 | Tanger | Varriount: Awesome, thanks. Quick question, the compiler would disregard it because it's trying to access variable r in the encasing scope, yeah? |
06:50:16 | FromGitter | <Varriount> Yes. |
06:50:47 | Tanger | Thanks heaps! |
06:51:10 | FromGitter | <Varriount> Honestly, I would just use a for loop |
06:51:26 | FromGitter | <Varriount> Tied with a const array of strings |
06:55:31 | Tanger | Yeah, that makes sense. Or a switch seeing as it's just string comp |
07:00:35 | Tanger | Yeah, 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:26 | FromGitter | <mratsim> And if result.ok and result.ok == true is redundant |
07:50:53 | FromGitter | <mratsim> Just "if result.ok" is enough |
07:55:37 | FromGitter | <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:17 | FromGitter | <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:36 | FromGitter | <mratsim> (it's in HN front page) |
09:39:31 | Arrrr | i thought the article mentioned nim |
09:44:48 | FromGitter | <dom96> @kayabaNerve @Varriount not sure if the donation happened yet, but the preferred way is definitely Bitcoin |
09:44:55 | FromGitter | <dom96> BountySource takes 10% |
09:45:21 | FromGitter | <dom96> And I'm considering switching to OpenCollective |
09:45:58 | FromGitter | <dom96> well, I can't tell anyone to switch, but I'm considering featuring it more prominently |
09:46:50 | livcd | dom96: can you share with us how many people bought your book already ? :D |
09:46:50 | FromGitter | <dom96> I guess I should move the money around in that BTC wallet to make it seem more active? |
09:46:57 | FromGitter | <dom96> nope |
09:47:02 | livcd | ahh |
09:47:17 | FromGitter | <dom96> mostly because I don't know the exact number :) |
09:47:24 | livcd | aha |
09:48:47 | * | yglukhov quit (Ping timeout: 248 seconds) |
09:50:48 | * | jjido joined #nim |
09:53:25 | * | yglukhov joined #nim |
10:10:09 | FromGitter | <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:10 | livcd | i thought only 2 chapters are available for free |
10:13:40 | FromGitter | <mratsim> Yes it's 2. |
10:14:18 | FromGitter | <data-man> Two for downloading but not for reading. |
10:14:42 | FromGitter | <data-man> https://www.manning.com/books/nim-in-action |
10:19:03 | miran | data-man you can "read" all the chapters, but the content is scrambled |
10:22:07 | dom96 | yeah. They're not all available for free |
10:22:13 | dom96 | And no, I can't share the sources. |
10:22:33 | FromGitter | <data-man> I want to translate these chapters into Russian. Ok, sorry. |
10:23:27 | dom96 | I think said this to you already. |
10:23:34 | dom96 | If you want to translate the book then contact the publisher |
10:29:37 | FromGitter | <data-man> @dom96: I do not have the book for translation. |
10:32:02 | dom96 | you'll get one if the publisher agrees to let you translate it |
10:35:28 | FromGitter | <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:47 | FromGitter | <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:09 | FromGitter | <alehander42> what is "natural" comparioson? |
10:45:25 | Araq | there is no such thing |
10:45:43 | Araq | string comparisons are language specific |
10:46:33 | FromGitter | <data-man> http://php.net/manual/en/function.strnatcmp.php |
10:47:25 | FromGitter | <alehander42> ah so it's basically int in string comparisons |
10:48:07 | FromGitter | <alehander42> https://github.com/sourcefrog/natsort this seems like a fuller example |
10:49:39 | FromGitter | <data-man> Yes, I ported this implementation with additional features. |
10:52:07 | Araq | make it a nimble module please |
10:52:16 | Araq | hard to get it right the first time |
10:59:12 | * | kier quit (Ping timeout: 248 seconds) |
11:04:28 | FromGitter | <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:27 | Araq | for which test? |
11:10:14 | * | kier joined #nim |
11:14:37 | FromGitter | <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:14 | Araq | http://www-igm.univ-mlv.fr/~lecroq/string/node8.html#SECTION0080 |
11:29:16 | Araq | vs |
11:29:26 | Araq | http://www-igm.univ-mlv.fr/~lecroq/string/node19.html |
11:30:02 | Araq | qsBc[ASIZE] # only requires temporary storage of the alphabet size which is known at compile-time (256) |
11:30:18 | Araq | that means it only stack allocates |
11:31:16 | Araq | KMP requires kmpNext[XSIZE] |
11:41:20 | FromGitter | <data-man> Yes, and for my example XSIZE equal to only three. It requires less time to precompute a table. |
11:42:53 | Araq | well that was my reasoning |
11:43:08 | Araq | I don't know if we should change the stdlib |
11:43:50 | Araq | but some builtin vowel-less C intrinsic is probably even faster than your KMP algorithm |
11:44:06 | Araq | without any preprocessing step |
11:47:38 | FromGitter | <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:43 | FromGitter | <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:53 | FromGitter | <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:12 | federico3 | data-man perhaps it should be opt-in instead |
12:37:55 | FromGitter | <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:09 | FromGitter | <data-man> "To enable, or not to enable, that is the question." By William Shakespeare. |
12:42:42 | federico3 | data-man I saw that |
12:42:46 | FromGitter | <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:15 | FromGitter | <alehander42> or something like that? (to enable it only for some tests) |
12:44:43 | FromGitter | <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:02 | FromGitter | <mratsim> I’ve started cleaning up the repo, will finish this evening: https://github.com/nim-lang/needed-libraries/issues/77 |
12:49:37 | Araq | data-man: I don't like unittest.nim and I don't want to look at it. |
12:50:48 | Araq | so any improvements to it have to go through somebody else. |
12:50:55 | Araq | same for the logging module. |
12:51:53 | Araq | if I want to log something, I write into a SQLite database. |
12:52:17 | FromGitter | <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:55 | Araq | yes, 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:20 | Araq | no thanks, text files are dumb. |
12:57:47 | * | Arrrr quit (Read error: Connection reset by peer) |
12:58:00 | FromGitter | <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:54 | FromGitter | <data-man> @Araq: Does this mean that unittest module will be deprecated in the future? |
13:02:27 | FromGitter | <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:39 | FromGitter | <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:16 | couven92 | ping federico3? |
13:48:55 | * | Jesin quit (Quit: Leaving) |
13:50:13 | * | cspar joined #nim |
13:52:04 | * | sleepyqt_ joined #nim |
13:52:14 | couven92 | Araq, 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:32 | Araq | data-man: no, unittest is here to stay but I personally don't use it |
14:01:01 | Araq | alehander42: too often I've seen "works in reality, fails in unittest" because of its metaprogramming voodoo triggering subtle compiler bugs |
14:01:42 | FromGitter | <data-man> @andreaferretti: Your hope has come true! |
14:02:03 | Araq | these have become very rare but I simply don't trust it. |
14:02:30 | Araq | it also nests templates 4 level deep and obscures everything |
14:04:08 | couven92 | dom96, that is a really good question, I have no idea... I just clicked on the GitHub PR page |
14:04:58 | FromGitter | <mratsim> I like unittest syntax though. Simple and to the point. |
14:06:48 | FromGitter | <alehander42> well the compiler bugs thing should improve with time (as you also say) |
14:07:53 | FromGitter | <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:23 | Araq | I should have patched 'doAssert' to do the args analysis a long time ago |
14:10:31 | Araq | but I usually write custom testers |
14:11:35 | Araq | I believe in integration tests, not in unit tests... |
14:11:55 | dom96 | I'm actually using the unittest module for integration tests... |
14:12:08 | dom96 | That'll probably bite me someday |
14:12:42 | FromGitter | <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:25 | dom96 | mratsim: cool :) If you can come up with another naming scheme then sure |
14:13:31 | dom96 | But I don't think it's necessary |
14:14:35 | FromGitter | <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:04 | Araq | unittest also uses environment vars (bah), multi-methods, atQuitProcs, terminal coloring and does its own exception handling |
14:16:05 | couven92 | Araq, can we have a doAssertEqual? |
14:16:17 | FromGitter | <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:20 | couven92 | as a template, to write a nice message? |
14:17:04 | dom96 | Araq: We should consider improving that |
14:17:17 | dom96 | Surely there is a way to achieve it without too many breaking changes |
14:17:35 | Araq | couven92: I prefer a doAssert that does some introspection to see the '==' |
14:18:13 | couven92 | Araq, what do you mean? |
14:18:22 | couven92 | ah, just overloading the doAssert? |
14:18:32 | Araq | no, fixing the doAssert |
14:18:40 | couven92 | Ah! :) |
14:19:03 | couven92 | so changing for binary operators? |
14:19:16 | Araq | yes |
14:19:27 | couven92 | on my to-do list |
14:19:48 | * | yglukhov joined #nim |
14:19:48 | Araq | nice :-) |
14:20:15 | couven92 | anyone got an idea on how to suppress showing a single command in a linux shell with set -x enabled? |
14:20:29 | couven92 | like @<command> does in the Windows cmd? |
14:24:07 | couven92 | found it: { echo "Message"; } 2> /dev/null |
14:28:28 | * | dom96 is now a proud owner of a Nim mug |
14:31:19 | couven92 | dom96, oooh! I want one as well... also added to my to-dos! |
14:31:21 | couven92 | :) |
14:31:35 | Araq | muhaha fixed a compiler bug by removing code |
14:31:52 | dom96 | Didn't PMunch get one? :) |
14:31:55 | dom96 | https://teespring.com/en-GB/nimlang_mug#pid=527&cid=101950&sid=front |
14:32:43 | couven92 | dom96, 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:50 | dom96 | awww |
14:32:58 | dom96 | That's a shame |
14:33:54 | floppydh | damn that's only cool mug |
14:33:59 | floppydh | one* |
14:34:04 | PMunch | dom96, yea I'm drinking tea from my mug right now |
14:34:12 | dom96 | :D |
14:34:18 | PMunch | I've had it for a week already :) |
14:34:35 | dom96 | I wonder why it took so long to get delivered to me. |
14:34:48 | PMunch | But you should've put the logo on both sides. Now all I see is a black mug :( |
14:34:48 | dom96 | What are your thoughts on the quality? |
14:34:58 | PMunch | Guess I have to start drinking with my left hand.. |
14:35:14 | dom96 | oh damn, that's true |
14:35:22 | dom96 | That's a pretty bad bug |
14:35:25 | dom96 | :( |
14:35:32 | floppydh | well you want to show off? |
14:35:46 | dom96 | I'll mirror it on the other side |
14:35:51 | PMunch | Well, the packaging didn't have anything between the cardboard and the mug, so it has slight scuffs every 90 degrees |
14:36:05 | PMunch | floppydh, yeah but I want to see it as well :P |
14:36:10 | floppydh | PMunch: :D |
14:36:28 | PMunch | On the front it's even gone through the black paint so there are some slight white marks there |
14:36:41 | dom96 | D: |
14:36:50 | dom96 | Mine seems to have survived the journey ok |
14:37:09 | PMunch | And the edge around the top isn't very neat |
14:37:19 | couven92 | dom96, fix the both sides issue, so I can order a better cup than PMunch's! :D |
14:37:28 | dom96 | lol |
14:37:37 | dom96 | I wonder if I should try a different mug maker |
14:38:02 | PMunch | It seems their painting method involves painting a little bit over the edge, so it sorta dithers a millimeter onto the edge |
14:38:26 | dom96 | yeah, I can see that. |
14:39:15 | dom96 | Ugh, there is no way to easily mirror this |
14:44:09 | PMunch | Isn't it just one big file? |
14:44:23 | dom96 | https://lh3.googleusercontent.com/XbObA0pkxVmeK8Y0FRniXVADzkk8HBsOdBtvrf4Wx6CiQbxpdbbbvcrUW_J3yOfmJIY8hyxoMaarOHmQgZnRd0DFcYkGjmmhnRxttrl5RNzmDy0g7tJVad1F1vJqXHe26wlo2jxhurFFGYa36MD2MHDQN28rsLkW24eKXEKj8QmmutWoLEOrw1DwIyJ4YMER9KZYqFYu3l5VzpMFZXCBQb-yPLQ827uC5WCwqBfetQ30fYU4CwIsSvCErxBy9OBakRYFd9RCIHL047OSrd5xmPUoIe8oCdbT2lhpTv53RuH2W2U_XjWHgiCZURVEYlofqg8afMMnHTVmktkz1_CTeWlPFghTP_gUfmkkk02vHeREQzE7LbyJ0uV10170tE8hbHlsm7KgHET5kxF5wLSQMXaikR1F_Yeo-VIwHYKA0QU |
14:44:23 | dom96 | NMsKlgziZCuVsNs6mTyd8_3FRuOEFQ86b6d9UtsmLQCqCqVLuE8i6dQBNHxWoPGlGYAVmcpQNg03Cnm7mOvnw7LYZPssnf-eR9D6FguwBPBdqbFz8l1oD86zwOA0aCeYrnVfds4WJ80kQ3bxs5bM0jOBsT6ddwKeGTCfKYS2XS6aBYOnVgNtS0HpOZa8s_Q=w811-h1008-no |
14:44:29 | dom96 | bah |
14:44:53 | dom96 | http://bit.ly/2A78foG |
14:44:56 | dom96 | Not sure if you can see that |
14:45:07 | dom96 | But it's not printed as shown in the designer... |
14:45:09 | * | Ven joined #nim |
14:45:20 | dom96 | Actually, I should tweet this at them |
14:45:33 | * | Ven is now known as Guest40983 |
14:46:03 | PMunch | Ouch, yeah that's not good |
14:46:12 | PMunch | What if you had put something at the bottom there? |
14:46:38 | dom96 | Yeah |
14:47:48 | PMunch | But couldn't you just add that in the back tab as well? |
14:47:52 | floppydh | is nimscript still a thing? |
14:48:13 | dom96 | PMunch: yeah, I'm doing that now |
14:48:15 | dom96 | floppydh: yes |
14:48:21 | floppydh | very good |
14:48:53 | couven92 | floppydh, every nimble-file is basically a nimscript file |
14:49:11 | couven92 | meaning it probably is not going anywhere |
14:49:50 | dom96 | PMunch: Problem is, they don't show the coordinates of each image on the mug |
14:49:55 | dom96 | so I have to align them by eye |
14:51:56 | PMunch | dom96, ugh I hate when designer software does that.. |
14:53:08 | dom96 | but anyway, here it is https://teespring.com/en-GB/nimlang_mug2 |
14:54:42 | dom96 | But yeah, if anyone knows of any good alternatives to teespring. Please gimme links. |
14:55:54 | * | miran quit (Quit: Page closed) |
14:57:00 | PMunch | I looked into it a while back. printedmint looked pretty good |
14:57:04 | PMunch | Haven't tried them though |
14:58:13 | * | gokr joined #nim |
15:02:17 | floppydh | theres no walkFiles in nimscript? |
15:04:40 | floppydh | ah listFiles |
15:06:41 | * | Jesin joined #nim |
15:09:22 | dom96 | omg, you can actually see the "printable area" on my t-shirt |
15:09:29 | dom96 | yeah, teespring appears to suck |
15:10:21 | dom96 | I can only hope it fades with a wash |
15:10:49 | PMunch | What? |
15:13:30 | dom96 | it's subtle, but it's like slightly whiter and shinier in light |
15:17:03 | dom96 | Can 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:28 | Araq | dom96: we have better things to do than changing unittest just because I personally dislike it |
15:32:26 | dom96 | ok |
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:22 | FromGitter | <Varriount> dom96: The blue color shown on restoring significantly differs with the blue that I see on my mug. |
15:46:32 | FromGitter | <Varriount> *on teespring |
15:47:00 | dom96 | Varriount: oh, you bought a blue mug? |
15:47:41 | FromGitter | <Varriount> Yes. I thought it would be dark blue, however it's more of a classic blue |
15:47:47 | dom96 | I was going to put these on nim-lang.org but with these issues I'm not comfortable to do that. |
15:47:57 | dom96 | we'll need to try others |
15:48:17 | dom96 | damn, is it too bright? |
15:48:35 | FromGitter | <Varriount> http://www.solidbackgrounds.com/images/2560x1440/2560x1440-brandeis-blue-solid-color-background.jpg |
15:48:49 | FromGitter | <Varriount> More like that |
15:50:03 | dom96 | That's completely different to what's shown on the website. |
15:50:08 | dom96 | To be honest, I would ask them for a refund |
15:50:17 | FromGitter | <Varriount> I can get you an actual image, that'll be more accurate. |
15:50:37 | * | miran_ quit (Quit: Konversation terminated!) |
15:51:41 | FromGitter | <Varriount> @dom96 That might be hard, since I don't have the packaging anymore |
15:51:45 | * | miran joined #nim |
15:51:53 | floppydh | I want to include another nimscript by string |
15:52:19 | dom96 | Varriount: Sorry :( |
15:52:31 | FromGitter | <Varriount> floppydh: Do you mean you want to read in a file and store the contents as a string? |
15:52:50 | FromGitter | <Varriount> Or use `include `? |
15:53:27 | Araq | https://github.com/nim-lang/Nim/pull/6723 please vote |
15:53:58 | floppydh | Varriount in nimscript I want to include another nimscript file from a string, which is a path I have concatted earlier |
15:55:10 | PMunch | Uhm dom96 I'm unable to see the image you sent |
15:56:36 | dom96 | PMunch: https://i.imgur.com/y6pLWOH.jpg |
15:56:38 | PMunch | On teespring the blue looks more like lavender.. |
15:56:59 | PMunch | dom96, aah I think that's normal with the process they use for printing |
15:57:41 | PMunch | They 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:13 | PMunch | Which heat up and melts the print into the shirt |
15:58:36 | PMunch | So it's natural that it also affects the cotton around it, and it will fade with wear |
15:58:36 | Araq | floppydh: so? what's the problem? |
16:01:02 | dom96 | PMunch: yeah, I thought. Seems pretty shoddy though. I want higher quality :) |
16:01:19 | floppydh | Araq: if I "include variable" he says no file: variable |
16:01:47 | Araq | the compiler is a 'she'. |
16:01:55 | floppydh | oh I'm sorry |
16:02:01 | Araq | XD |
16:02:01 | floppydh | but is nimscript the compiler? |
16:02:26 | floppydh | anyway :> |
16:03:00 | Araq | if you use nimscript via the compiler API you probably need to set the search path |
16:03:03 | floppydh | btw 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:52 | Araq | I like the "rambled other stuff" part. What's Lato? |
16:03:58 | floppydh | the newer font |
16:04:21 | floppydh | he complained about how the lower case 'a' looked for example |
16:04:24 | floppydh | in comparison |
16:04:28 | floppydh | but he's pretty crazy |
16:05:12 | * | floppydh quit (Quit: WeeChat 1.9.1) |
16:07:22 | miran | floppydh - now that you mention it, yeah - 'a' does look a bit strange |
16:08:17 | miran | i guess 'open sans' it too mainstream.... :) |
16:11:17 | * | JappleAck joined #nim |
16:11:20 | FromGitter | <mratsim> Fonts are religion look at the ComicSans-gate |
16:11:36 | * | PMunch quit (Remote host closed the connection) |
16:12:06 | FromGitter | <Varriount> @dom96 https://imgur.com/a/LDN3u |
16:12:25 | dom96 | hrm, thought it would be worse |
16:12:51 | dom96 | Glad it doesn't make the eyes bleed :) |
16:12:59 | dom96 | But the colour on the website would have definitely been nicer |
16:14:21 | FromGitter | <Varriount> I'm fine with it. |
16:15:46 | federico3 | dom96: it's somewhat lacking intensity |
16:19:21 | FromGitter | <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:27 | miran | from 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:56 | dom96 | Not AFAIK |
16:40:39 | * | PMunch quit (Remote host closed the connection) |
16:41:14 | miran | ok, 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:36 | Araq | miran: better yet, write a real parser |
16:43:22 | Araq | this whole "I have to split/replace only the first X times" is a code smell |
16:43:36 | Araq | you're using the wrong tools for the job. |
16:43:50 | miran | Araq: better yet, i/somebody should add these as parameters to strutils functions :) |
16:44:07 | Araq | no, that's exactly what I don't want to see anymore |
16:44:22 | Araq | hacks in the stdlib to support your own hacks |
16:44:35 | miran | b-but how i'm gonna ellegantly solve AoC task then? :) |
16:45:22 | miran | i guess argument "but python has this" won't work? |
16:46:02 | * | yglukhov quit (Ping timeout: 240 seconds) |
16:46:04 | dom96 | If 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:41 | miran | ok, i'll think about it then :) |
16:48:23 | Araq | Python has this stupid "max" parameter everywhere |
16:48:54 | Araq | not a convincing argument. |
16:49:38 | miran | strutils.find has 'start' and 'last' ;) |
16:49:50 | miran | which i find useful - please don't throw them out |
16:50:54 | Araq | that's totally different from a 'max' parameter |
16:59:36 | * | PMunch joined #nim |
17:01:26 | federico3 | I miss lstrip and rstrip |
17:04:46 | FromGitter | <data-man> @federico3: See my comment: https://github.com/nim-lang/Nim/pull/6473#discussion_r144080796 |
17:06:07 | shashlick | araq: 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:53 | federico3 | data-man: while you are at it, an in-place l/r character trim would be nice |
17:08:03 | Araq | shashlick: told you, use #prefix or one of the many ways to influence name conversions |
17:08:18 | dom96 | shashlick: --prefix:_ might work |
17:09:22 | shashlick | I see, let me try. I have to make it generic within nimgen to allow handling this case automatically |
17:09:24 | FromGitter | <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:00 | FromGitter | <krux02> here is a bit of context: https://github.com/nim-lang/Nim/issues/6771 |
17:11:36 | Araq | krux02: it's in a grey area, getType should give you the symbols |
17:12:09 | Araq | the 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:08 | FromGitter | <data-man> @federico3: My suggestions were not accepted. |
17:13:32 | FromGitter | <krux02> I kind of need to know if a symbol depends on the argument symbol |
17:14:21 | FromGitter | <krux02> so would it be much work to dive into that code and implement it? |
17:15:00 | Araq | it would break my macros I think which rely on the nnkIdent for parameter lists |
17:15:23 | FromGitter | <krux02> ouch |
17:15:50 | FromGitter | <krux02> well can't you make the macros with untyped arguments? |
17:18:18 | * | endragor quit (Remote host closed the connection) |
17:19:42 | FromGitter | <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:01 | shashlick | dom96, 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:36 | shodan45 | is 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:37 | shodan45 | I keep trying to like Kotlin.... just so much java baggage |
18:21:51 | Araq | shodan45: 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:12 | shodan45 | Facebook likes PHP. 'nuf said ;) |
18:22:23 | Araq | instead of "keep trying to like" you should "keep programming in Nim" :-) |
18:23:00 | * | fvs joined #nim |
18:23:04 | FromGitter | <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:28 | shodan45 | I *despise* PHP. |
18:23:35 | FromGitter | <kayabaNerve> Yay |
18:23:39 | FromGitter | <kayabaNerve> Some of my bosses like it |
18:24:41 | shodan45 | Araq: I just wish there was a way to build a GUI app into a single file that worked cross platform |
18:25:00 | shodan45 | afaik, the JVM is the only way to do that (with "fat jars") |
18:25:33 | Araq | alternatively you can develop a webapp |
18:25:51 | FromGitter | <kayabaNerve> Lol ^^ |
18:25:54 | shodan45 | Araq: yeah, that's crossed my mind..... |
18:26:02 | FromGitter | <kayabaNerve> Nim does compile to JS |
18:27:08 | FromGitter | <kayabaNerve> How well would the JVM + FFI function? |
18:27:27 | shodan45 | I 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:28 | FromGitter | <kayabaNerve> Ignoring the requirement of having Java, how would the overhead be on that? |
18:28:00 | FromGitter | <kayabaNerve> shodan45: Nim -> C -> Java FFI -> JVM |
18:28:09 | * | salewski joined #nim |
18:28:10 | * | dexterk quit (Quit: Konversation terminated!) |
18:28:46 | FromGitter | <kayabaNerve> I forgot how you have to compile C to be compatible with the Java FFI but Nim would be compatible |
18:29:03 | FromGitter | <kayabaNerve> You should be able to use multi-platform code in the FFI by loading different versions |
18:29:07 | FromGitter | <kayabaNerve> And then it runs in the JVM |
18:29:09 | * | adamchainz quit (Quit: ZNC 1.6.3+deb1 - http://znc.in) |
18:30:06 | shodan45 | ooooh 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:30 | shodan45 | I'm full of crazy ideas today |
18:30:37 | * | nitely joined #nim |
18:30:54 | FromGitter | <kayabaNerve> ... That's a web page boi |
18:31:10 | salewski | Araq, what do you think, is that a bug or feature: https://github.com/nim-lang/Nim/issues/6772 |
18:31:13 | Araq | just distribute the Nim code and let the people compile :P |
18:31:19 | FromGitter | <kayabaNerve> You just described a complicated way of a web browser and a web page |
18:31:32 | shodan45 | Araq: hah |
18:31:45 | salewski | If it is really intended, then I have to fix the code of gintro/gen.nim of course. |
18:32:06 | Araq | or provide binaries for the 3 OSes that are in active use |
18:32:14 | Araq | it's not that hard really. |
18:33:09 | FromGitter | <kayabaNerve> That seems like a feature? You have to cast it to cint as that iterator is yieliding ints |
18:33:23 | shodan45 | kayabaNerve: the app I'm thinking of needs regular app-level access to the host; a web page won't really work |
18:33:29 | FromGitter | <kayabaNerve> I could be wrong. Just my comment. |
18:33:58 | FromGitter | <kayabaNerve> shodan45: At this point, I recommend a blood sacrifice to Cthulhu |
18:34:01 | Araq | salewski: sorry, but it's documented in the changelog as a known breaking change |
18:34:19 | Araq | you need to fix your code |
18:34:25 | salewski | OK. |
18:35:10 | nitely | good morning/afternoon/evening y'all :D |
18:36:27 | FromGitter | <kayabaNerve> Apparently my issue was closed |
18:37:10 | nitely | I'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:42 | nitely | is that the preferred way of getting int8's? |
18:37:59 | nitely | *an array of int8's |
18:39:15 | nitely | I 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:56 | FromGitter | <data-man> @nitely ⏎ '''nim ⏎ var a: array[4, int8] = [0'i8, 1, 2, 3] ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5a0f2db0df09362e671fa82c] |
18:43:15 | FromGitter | <data-man> Oops |
18:44:05 | * | dexterk joined #nim |
18:44:10 | FromGitter | <kayabaNerve> K. Updated my bug report as Dom asked. No idea why Araq closed it though |
18:44:21 | Araq | huh? |
18:44:27 | dom96 | he fixed it |
18:44:46 | dom96 | "Araq closed this in 2d72671 3 hours ago" |
18:45:19 | * | dexterk quit (Client Quit) |
18:47:10 | nitely | data-man: ahh, thanks! |
18:47:48 | salewski | I 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:28 | FromGitter | <data-man> @nitely: Are you working on a new unicode module? ;-) |
18:53:22 | FromGitter | <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:50 | dom96 | Did you miss my message? |
18:53:54 | dom96 | Like I said, Araq fixed it |
18:53:58 | * | claudiuinberlin joined #nim |
18:53:58 | dom96 | That's why he closed the issue |
18:54:00 | FromGitter | <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:15 | FromGitter | <kayabaNerve> Oh. I missed that. Yeah. Sorry. |
18:54:17 | FromGitter | <kayabaNerve> My mistake D: |
18:55:37 | Araq | - To make Nim even more robust the system iterators ``..`` and ``countup`` |
18:55:37 | Araq | now only accept a single generic type ``T``. This means the following code |
18:55:37 | Araq | doesn't die with an "out of range" error anymore: |
18:55:39 | Araq | .. code-block:: nim |
18:55:41 | Araq | var b = 5.Natural |
18:55:43 | Araq | var a = -5 |
18:55:45 | Araq | for i in a..b: |
18:55:47 | Araq | echo i |
18:55:49 | Araq | @salewski |
18:56:01 | Araq | but it could mention that it breaks quite some code... |
18:56:43 | salewski | Araq, .. works fine still, but ..< not. That is really confusing. |
18:56:56 | Araq | ? |
18:57:21 | Araq | the snippet you gave to me fails with |
18:57:28 | Araq | temp3.nim(6, 6) Error: type mismatch: got (int) |
18:57:28 | Araq | but expected one of: |
18:57:29 | Araq | proc foo(ci: cint) |
18:57:41 | Araq | you asked me to look into it |
18:57:54 | salewski | But with .. it compiles fine. |
18:58:25 | Araq | oh I can't read |
18:58:33 | Araq | your snippet uses ..< |
18:58:39 | Araq | well ..< is unchanged |
18:59:24 | Araq | and '..' works because I added special overloads to mitigate the burden |
18:59:28 | Araq | :-) |
18:59:36 | Araq | so ... I dunno. |
18:59:48 | salewski | I have the feeling that ..< has changed, because that does not work any more. .. works for me still. |
18:59:53 | shodan45 | I think you mean "so .. I dunno" |
19:00:47 | FromGitter | <kayabaNerve> Lol |
19:02:13 | salewski | Maybe it would be better if .. and ..< would both break, so we can fix all of that. |
19:02:31 | * | yglukhov joined #nim |
19:02:52 | salewski | I 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:01 | salewski | Ah yes, this would work also now: for i in 0.cint ..< numArgs(): |
19:16:07 | Araq | as far as I can tell ..< never worked |
19:16:30 | salewski | I think I will fix gen.nim in this way. |
19:19:38 | * | rbrt joined #nim |
19:21:18 | salewski | I don't know what you mean by "never worked": So should we all prefer plain .. and avoid ..< ? |
19:22:43 | Araq | I don't know why this code ever worked, was it '.. <' ? |
19:23:54 | FromGitter | <kayabaNerve> Wait... did my question never send? |
19:24:44 | salewski | Yes I know about the problems with .. < with the space -- that was not working in the prime numbers forum post. |
19:25:34 | FromGitter | <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:35 | salewski | Indeed I dont use the notation with space any more, as it is deprecated. |
19:25:57 | * | vlad1777d_ joined #nim |
19:26:59 | Araq | kaybaNerve: it's all hard. the high level stuff, the low level stuff |
19:27:23 | FromGitter | <kayabaNerve> Fair enough :) It's more than I could do. |
19:27:52 | Araq | generate C types, for example. |
19:28:18 | Araq | you can forward declare structs but nothing else and if you do, only pointers to the forward declaration must be used |
19:29:31 | Araq | it's an interesting problem that has no equivalent when targeting asm or LLVM. |
19:29:57 | * | yglukhov joined #nim |
19:30:00 | FromGitter | <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:35 | nitely | data-man: yes, working on the unicode module |
19:45:56 | nitely | huge savings thanks to you right now :D |
19:47:08 | FromGitter | <kayabaNerve> Do we have an inline Brainf*** lib? |
19:47:46 | FromGitter | <kayabaNerve> Where instead of Nim, I can run Brainf*\*\* on passed Nim data and then view what Brainf*\*\* did? |
19:48:08 | FromGitter | <kayabaNerve> K. I'm typing triple *. I tried escaping them. Gitter hates me. |
19:48:21 | FromGitter | <kayabaNerve> But anyways. We don't as it makes no sense, right? |
19:48:30 | * | xkapastel joined #nim |
19:49:15 | dom96 | No, but you could write one |
19:49:35 | dom96 | You 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:16 | FromGitter | <kayabaNerve> I might since we don't have one lol |
19:50:20 | FromGitter | <kayabaNerve> And that's a great idea tbh |
19:50:35 | * | ShalokShalom joined #nim |
19:50:55 | FromGitter | <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:12 | FromGitter | <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:51 | federico3 | any feedback? https://screenshots.firefoxusercontent.com/images/0f63674f-e6c1-40ad-a294-27e0e8a14dbd.png |
20:08:19 | nitely | data-man: what's the sizeof that thing? |
20:11:21 | nitely | that parsing lib looks neat |
20:11:50 | FromGitter | <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:05 | nitely | but parsing was the easiest part for me anyway |
20:12:10 | dom96 | mratsim: why not? I added you as a collaborator |
20:12:18 | dom96 | (You need to accept the invite) |
20:13:22 | FromGitter | <mratsim> ah |
20:13:50 | * | gokr joined #nim |
20:14:07 | nathanj | kayabaNerve: have you seen http://howistart.org/posts/nim/1/index.html ? bf to nim macro |
20:14:19 | FromGitter | <mratsim> indeed that was it |
20:15:19 | nitely | data-man: unicode database is massive |
20:15:34 | FromGitter | <data-man> @nitely: A df_unidata sizeof ? I don't know. And no, NimData is much more than just a parsing library. |
20:18:20 | nitely | ah, I see. I only focused on th parsing bit |
20:19:02 | * | Sentreen quit (Ping timeout: 260 seconds) |
20:19:12 | nitely | there are huge saving opportunitiesby using two stages tables and min perfect hashig on the unicode db |
20:20:03 | nitely | TBH 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:37 | dom96 | yay, glad you'll still be working on that regex engine :) |
20:24:15 | nitely | dom96: haha, yes looking forward to it |
20:26:04 | FromGitter | <kayabaNerve> nathanj: Thanks |
20:28:56 | FromGitter | <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:00 | FromGitter | <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:03 | nitely | data-man: What're you building? |
20:35:21 | FromGitter | <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:21 | FromGitter | ... What do you think? |
20:35:52 | FromGitter | <data-man> @nitely: unidata, DFA-based utf-decoder, uni-sets, etc. |
20:36:04 | nitely | I 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:21 | FromGitter | <data-man> D has very good uni module. |
20:39:37 | FromGitter | <data-man> And compile-time regexes. |
20:44:07 | nitely | for graphemes here's a start: https://github.com/nitely/nim-graphemes |
20:44:41 | nitely | but at the moment it's much easier to just wrap some ofthose C libs for the unicode support |
20:48:27 | FromGitter | <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:55 | FromGitter | <Varriount> I could have sworn that someone wrote done Unicode libs already |
21:24:08 | FromGitter | <Varriount> *wrote some |
21:24:44 | FromGitter | <Varriount> @data-man How easily could D's Unicode libs be ported to Nim? |
21:25:57 | dom96 | What is Nim's unicode module missing? |
21:26:25 | GitDisc | <treeform> What is the hard part about unicode? |
21:28:57 | GitDisc | <treeform> Does nim use utf8 even on windows wright? (as it should) |
21:29:36 | * | jjido joined #nim |
21:31:44 | dom96 | looks like I'm hitting the same breaking change as Salewski |
21:31:51 | dom96 | Araq: What's the rationale for this? |
21:33:34 | dom96 | I now have to write: for i in 0.cuint..<unit.getNumDiagnostics(): |
21:33:35 | dom96 | :\ |
21:34:27 | FromGitter | <kayabaNerve> dom96: Write a Nim Superset that fixes this. |
21:34:57 | dom96 | That's a bit extreme :) |
21:35:25 | FromGitter | <data-man> @Varriount: Porting from D will not be very easy. ⏎ @dom96: Missing normalizations, emoji, codepoint name by code, has old data, ... |
21:36:02 | dom96 | So let's add these to Nim :) |
21:38:11 | FromGitter | <data-man> I'm busy with too many interesting things :-) |
21:39:04 | FromGitter | <data-man> This is my biggest problem. |
21:42:39 | FromGitter | <data-man> But I hope to do everything to version 1.0 |
21:45:37 | dom96 | :) |
21:45:47 | dom96 | We can always keep adding things after v1 |
21:46:00 | dom96 | Just 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:46 | FromGitter | <kayabaNerve> Or |
21:48:53 | FromGitter | <kayabaNerve> Make a Nim update tool |
21:49:23 | FromGitter | <kayabaNerve> Have it browse and auto update source |
21:49:43 | FromGitter | <kayabaNerve> Also have it print deprecation warnings/errors. It's a tool, not magic |
21:50:51 | Araq | dom96: could add an overload for this case |
21:51:42 | dom96 | Araq: Why was this change made? |
21:52:21 | FromGitter | <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:42 | Araq | it was error prone for ranges, see the changelog |
21:53:11 | Araq | also it's unclear why it would take T, S generic parameters rather than only T |
21:54:08 | dom96 | because we get errors like I just got :\ |
21:55:36 | dom96 | the 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:38 | Araq | it does, read it again |
22:05:38 | dom96 | oh, I see, it's after the .. code-block... this file is markdown :) |
22:07:23 | dom96 | isn't there a way to fix that without breaking so much code? |
22:07:40 | dom96 | can't the implementation of `..` check for this use of Natural? |
22:07:43 | Araq | yes, as I said, I can add an overload |
22:08:05 | dom96 | ok, please do |
22:09:39 | Araq | data-man: I still have "lexim" somewhere that gives us compile-time regexes |
22:10:15 | Araq | but I haven't used it for anything and it probably needs some updates |
22:12:20 | FromGitter | <alehander42> @mratsim so the closed issues would be used for discussion of concrete libs |
22:12:24 | FromGitter | <alehander42> or ? |
22:12:57 | Araq | can somebody bisect this for me https://github.com/nim-lang/Nim/issues/6724 |
22:14:50 | * | Chuang-Tzu joined #nim |
22:15:20 | Chuang-Tzu | How does the terminal module compare to ncurses? |
22:16:30 | Araq | it works on Windows too but has fewer features. |
22:17:19 | federico3 | https://ci.appveyor.com/project/Araq/nim/build/2248/tests what is this copyMem error? |
22:18:20 | FromGitter | <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:15 | Chuang-Tzu | Would it make sense to port ncurses to pure nim, or come up with a new api that's more nim centric? |
22:19:33 | Araq | federico3: your code breaks the JS target? |
22:19:46 | Araq | Chuang-Tzu: we had a pdcurses wrapper somewhere iirc |
22:19:54 | federico3 | yep, looks like copyMem is not defined in js - see https://github.com/nim-lang/Nim/issues/5667 |
22:20:11 | Araq | data-man: the VM is only used when you use runtime regexes |
22:20:44 | Araq | it's pretty complex but compiles to Nim code in the end with no overhead |
22:20:58 | Chuang-Tzu | I saw that there's an ncurses wrapper... but don't wrappers cause problems with memory management? |
22:21:44 | Araq | not many problems, but inconveniences |
22:21:46 | * | PMunch quit (Quit: leaving) |
22:24:35 | FromGitter | <data-man> @Araq: Great! Why is it not in stdlib? :-) |
22:24:47 | Araq | because it's not ready |
22:24:55 | Araq | please take over its development :-) |
22:26:32 | * | Trustable quit (Remote host closed the connection) |
22:26:59 | FromGitter | <data-man> Oh, no! I'm newbie to Nim. |
22:28:17 | Araq | it's pretty standard stuff, regex to AST |
22:28:20 | Araq | AST to DFA |
22:28:29 | Araq | *NFA |
22:28:31 | Araq | NFA to DFA |
22:28:36 | Araq | minimize DFA |
22:28:39 | Araq | generate code |
22:29:31 | Araq | it 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:57 | FromGitter | <data-man> Interesting. D-regex uses Thompson NFA. |
22:32:34 | FromGitter | <nitely> DFA blow up on unbounded regex. |
22:33:00 | FromGitter | <nitely> ie: having something like \\w |
22:33:38 | FromGitter | <nitely> Well, except when they only match ascii I guess. But even then the DFA woud be huge |
22:34:24 | FromGitter | <nitely> I think google's re2 uses NFA when the regex is unbounded and DFA otherwise... |
22:35:04 | FromGitter | <nitely> or a sort of hybrid, not sure |
22:36:03 | Araq | well lexim is a primarily a lexer generator, DFAs are the state of the art for real lexers |
22:36:56 | FromGitter | <data-man> And you do not plan to make a JIT VM? |
22:37:16 | Araq | nah |
22:37:38 | FromGitter | <data-man> :-) |
22:38:11 | Araq | regexes are too complex really. takes thousands of lines to support that "Perl compatible" aspect |
22:39:12 | * | TjYoco joined #nim |
22:40:45 | FromGitter | <nitely> I would say Thomson's NFA is fairly straightforward |
22:41:07 | FromGitter | <nitely> it does not support lookbehind/lookahead though |
22:42:10 | FromGitter | <nitely> and other more exotic features like the recursion operator |
22:43:16 | FromGitter | <nitely> but if it did it would no longer be just a regex engine |
22:44:01 | FromGitter | <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:41 | FromGitter | <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:34 | FromGitter | <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:38 | FromGitter | <kayabaNerve> If I have a variable of an unknown type, how can I 100% of the time check if it's nill? |
23:49:15 | FromGitter | <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:02 | FromGitter | <kayabaNerve> NVM |
23:58:27 | * | marenz__ quit (Ping timeout: 240 seconds) |