00:01:36 | FromGitter | <kdheepak> @zetashift and in Nim ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59ebdfdfd6c36fca317ecc2e] |
00:04:21 | FromGitter | <kdheepak> @zetashift what did you mean by py2nim incoming? |
00:05:49 | FromGitter | <zetashift> it was a silly joke, I tend to make those after midnight |
00:06:01 | Yardanico | lol |
00:06:07 | Yardanico | I though you was referring to my nimpylib |
00:06:18 | Yardanico | https://github.com/Yardanico/nimpylib it's a PoC mostly |
00:06:25 | Yardanico | https://github.com/Yardanico/nimpylib/blob/master/examples/example.nim |
00:06:28 | Yardanico | https://github.com/Yardanico/nimpylib/blob/master/examples/example2.nim |
00:06:38 | FromGitter | <zetashift> it was a play on c2nim whcih goes from C to Nim |
00:07:24 | FromGitter | <zetashift> I saw it! I'm still a grasshopper in Nim so I can't use all the libs yet, also I don't know jack about python but it's hella easier than when I tried to learn C++ and got scared to program(this is true) |
00:07:53 | Yardanico | this nimpylib doesn't parse python code |
00:08:06 | Yardanico | because most of the time python ast is valid nim ast |
00:08:20 | Yardanico | https://github.com/Yardanico/nimpylib/blob/master/examples/example2.nim |
00:08:25 | Yardanico | as you can see here :) |
00:08:40 | FromGitter | <zetashift> yea it's just python modules to nim in a sense right? |
00:09:15 | Yardanico | well almost |
00:09:28 | FromGitter | <zetashift> from the example it seems some semantics too |
00:09:43 | Yardanico | well nim semantics can't be changed |
00:09:55 | Yardanico | print is a macro for example |
00:09:58 | FromGitter | <zetashift> not even with macros? |
00:10:03 | Yardanico | yes |
00:10:06 | Yardanico | macros can't change the semantics |
00:10:18 | FromGitter | <zetashift> I should probably start reading the advanced topics in Nim in Action one of these days |
00:10:42 | Yardanico | or wait |
00:10:46 | Yardanico | maybe they can |
00:10:52 | Yardanico | maybe I read this from somewhere :P |
00:11:21 | Yardanico | well they can't change nim syntax |
00:11:47 | FromGitter | <kdheepak> @Yardanico nimpylib is impressive :) |
00:24:47 | Yardanico | I actually want to try to implement https://github.com/Yardanico/nimpylib/issues/3 |
00:24:55 | Yardanico | it can be possible indeed, and would be very cool |
00:29:17 | * | derlafff quit (Remote host closed the connection) |
00:38:48 | FromGitter | <kdheepak> @araw |
00:39:25 | Yardanico | He's Araq, not araq :) |
00:40:01 | Yardanico | *not araw |
00:40:34 | FromGitter | <Yardanico> @kdheepak ah bah |
00:40:41 | FromGitter | <Yardanico> your message wasn't sent to IRC |
00:40:49 | FromGitter | <Yardanico> try to send it again |
00:40:59 | FromGitter | <kdheepak> Shoot. I accidentally hit enter here in gitter, and edited the comment. But the IRC bot would have not sent it. I'll send the message again. |
00:43:10 | FromGitter | <kdheepak> @Araq, I have a question about the nlvm (https://github.com/arnetheduck/nlvm) package. Taking a closer look at this, this package appears to be a frontend for LLVM IR. Do you envision long term having LLVM, C, CPP and JS support for Nim? Also, (question is in general for people), anyone here familiar enough with LLVM IR to know if there are concepts in Nim that will be difficult (or not possible?) to support? |
00:44:59 | * | Nobabs25 quit (Quit: Leaving) |
00:45:00 | FromGitter | <Yardanico> I think Nim can't have LLVM backend as a fourth one (at least currently), because: it would be hard to maintain backends (it's already hard to do it now), LLVM would be something like a JS backend - e.g. some stdlib modules wouldn't have support for it, because they use C headers/libraries. |
00:46:40 | FromGitter | <Yardanico> Also I really think (and I think Araq agrees that this needed but VERY HARD to do) we need an almost FULL compiler rewrite, because current one is not easy to maintain (initally whole compiler was written in Pascal and then translated by pas2nim to Nim, so some parts of it are VERY ugly) |
00:46:56 | FromGitter | <Yardanico> but if this will ever happen, it will happen for nim 2.0 |
00:47:04 | FromGitter | <kdheepak> @Yardanico why wouldn't it work because of C headers/libraries (just trying to understand). |
00:47:36 | FromGitter | <zetashift> can't you just get LLVM support through Clang? |
00:47:48 | FromGitter | <Yardanico> @zetashift that's another thing |
00:48:05 | FromGitter | <Yardanico> clang compiles C/C++ to LLVM |
00:48:17 | FromGitter | <Yardanico> nlvm is a backend for nim to allow compiling nim to llvm |
00:48:29 | FromGitter | <Yardanico> it wouldn't make any sense to use clang for this |
00:48:44 | FromGitter | <Yardanico> @kdheepak because LLVM doesn't allow including C headers/libraries |
00:49:28 | FromGitter | <Yardanico> so some stdlib modules will be not available on LLVM backend |
00:49:30 | FromGitter | <Yardanico> e.g. times module |
00:49:33 | FromGitter | <kdheepak> LLVM should support dynamically loading c libraries, correct? |
00:49:44 | FromGitter | <Yardanico> @kdheepak yes, but that's harder than current nim's importc |
00:50:06 | FromGitter | <kdheepak> Current nim's importc does not use FFI? |
00:50:30 | FromGitter | <Yardanico> importc just "imports" some C struct/function/etc and puts it into generated C directly |
00:50:47 | FromGitter | <kdheepak> Oh, it links symbols directly? |
00:50:57 | FromGitter | <kdheepak> I think I understand. |
00:50:59 | FromGitter | <kdheepak> Hmmm. |
00:51:39 | FromGitter | <Yardanico> e.g. ⏎ proc myproc(a, b, c: cint): cint {.cdecl, importc.} ⏎ ⏎ would assume there's myproc available on C side, which accepts a, b, c integers and returns an integer [https://gitter.im/nim-lang/Nim?at=59ebeb9b210ac2692016458f] |
00:52:29 | FromTwitch | <yardanico> I forgot to disable this bridge :P |
00:53:27 | FromGitter | <kdheepak> @Yardanico I wonder how Julia does this? |
00:54:01 | Yardanico | from julia docs: The code to be called must be available as a shared library. |
00:54:16 | Yardanico | so you can't for example use mktime function from time.h |
00:54:49 | Yardanico | well you can |
00:54:51 | Yardanico | via libc |
00:55:48 | FromGitter | <kdheepak> So basically in Julia, everything from standard c libraries is set up only using shared libraries? |
00:56:06 | Yardanico | yep |
00:56:21 | Yardanico | https://docs.julialang.org/en/release-0.4/manual/calling-c-and-fortran-code/ |
00:57:00 | FromGitter | <kdheepak> General question: Is there a disadvantage of using shared libraries vs importing them directly? I'm assuming that importing and including the libraries are more efficient? |
01:02:57 | FromGitter | <zetashift> no I ment can't you use the generated C by Nim and then run that through Clang? |
01:03:55 | FromGitter | <kdheepak> @zetashift you can. But if you wanted to create a JIT with a REPL for Nim @Araq suggested earlier that going down the LLVM as a backend for Nim might be the best way. |
01:08:35 | * | derlafff joined #nim |
01:10:39 | * | der joined #nim |
01:10:42 | * | derlafff quit (Read error: No route to host) |
01:16:46 | * | couven92 quit (Quit: Client Disconnecting) |
01:18:11 | FromGitter | <khogeland> I've run up against a GC bug (mine or Nim's, can't tell) that I'm not equipped to debug |
01:18:18 | Yardanico | are you sure it's a GC bug? |
01:18:27 | Yardanico | what's the stack trace? please make a gist wit hti |
01:18:31 | Yardanico | *with it |
01:18:31 | FromGitter | <khogeland> Yes: https://gist.github.com/khogeland/15d808b58cb6f83aec66fe30b4f0dd63 |
01:18:50 | FromGitter | <khogeland> Haven't been able to get a minimal repro. |
01:19:58 | FromGitter | <khogeland> (Have tried running that same `searchAlbums` proc forever in a spawned thread the same way I'm doing here, but there's something different that I'm not seeing) |
01:20:53 | Yardanico | hmm is the code open-sourced? |
01:21:12 | Yardanico | Araq might be very interested in this bug, because he fixes all GC bugs :) |
01:21:21 | FromGitter | <khogeland> https://github.com/khogeland/omnim/blob/master/ui/ui.nim#L22 |
01:21:48 | Yardanico | you're using unsafeAddr and ptr's here |
01:21:49 | Yardanico | hmm |
01:21:57 | FromGitter | <khogeland> And the `spawn` on L43 |
01:22:01 | Yardanico | yeah I saw that |
01:22:29 | Yardanico | I think that *might* be because you pass pointers to another thread |
01:22:35 | Yardanico | it's not generally safe |
01:23:11 | FromGitter | <khogeland> Sure, but the call that is causing that error is the only thing *not* using any of those pointers. |
01:24:03 | FromGitter | <khogeland> Rather, it doesn't look like it is, but I don't know if the scope variables in passed procs are deep copied |
01:31:37 | Yardanico | you can make an issue on github |
01:32:36 | FromGitter | <khogeland> I came here because I haven't been able to find a repro that doesn't involve running MPD and my application |
01:32:51 | * | der quit (Remote host closed the connection) |
01:33:01 | FromGitter | <khogeland> Will create an issue though. |
01:33:33 | * | arnetheduck joined #nim |
01:33:56 | * | derlafff joined #nim |
01:40:28 | libman | Yardanico: (sorry, missed your question above) no need to mention license in the source code at all, just a LICENSE file as detected by GitHub and in nimble. |
01:58:44 | * | Yardanico quit (Remote host closed the connection) |
02:02:02 | * | derlafff quit (Remote host closed the connection) |
02:08:10 | * | smt` quit (Ping timeout: 258 seconds) |
02:11:56 | * | derlafff joined #nim |
02:13:52 | * | der joined #nim |
02:14:35 | * | derlafff quit (Read error: Connection reset by peer) |
02:26:11 | * | der quit (Remote host closed the connection) |
02:26:18 | * | derlafff joined #nim |
03:12:58 | * | rauss quit (Read error: Connection reset by peer) |
03:13:03 | * | rosshadden joined #nim |
03:33:22 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
03:54:23 | * | vlad1777d quit (Ping timeout: 252 seconds) |
04:13:54 | * | libman quit (Quit: Connection closed for inactivity) |
05:47:49 | * | pilne quit (Quit: Quitting!) |
05:54:56 | * | lastjedi joined #nim |
06:16:06 | * | solitudesf joined #nim |
06:18:11 | * | firstjedi joined #nim |
06:19:00 | * | miran joined #nim |
06:21:47 | * | lastjedi quit (Ping timeout: 252 seconds) |
06:40:32 | * | dddddd quit (Remote host closed the connection) |
06:44:52 | * | nsf joined #nim |
07:06:22 | * | claudiuinberlin joined #nim |
07:16:05 | * | gangstacat quit (Quit: Ĝis!) |
07:17:46 | * | Trustable joined #nim |
07:28:09 | * | Trustable quit (Remote host closed the connection) |
08:14:18 | Araq | khogeland: spawn searchHandler(unsafeAddr listPane, searchProc, addr query, addr uiLock) |
08:14:25 | Araq | is wrong |
08:14:55 | Araq | causing a corruption and corruptions are not local so a stack trace inside the GC doesn't mean you found a GC bug |
08:22:41 | * | adamchain_ quit (Ping timeout: 246 seconds) |
08:27:51 | * | Arrrr joined #nim |
08:27:51 | * | Arrrr quit (Changing host) |
08:27:51 | * | Arrrr joined #nim |
08:35:14 | FromGitter | <mratsim> @kdheepak for your data science visualization needs, NimData (eq. Pandas) generates an HTML page that is easier to use (search/sorting) than jupyter display. And in arraymancer-vision you get Facebook Visdom to display images |
08:35:42 | * | Calinou is now known as CALINOU |
08:36:12 | FromGitter | <mratsim> It's not Jupyter but at least it's not nothing ;) |
08:50:43 | * | nsf quit (Quit: WeeChat 1.9) |
08:56:45 | * | Vladar joined #nim |
09:07:59 | * | cyraxjoe quit (K-Lined) |
09:09:14 | * | cyraxjoe joined #nim |
09:25:12 | FromGitter | <khogeland> @Araq Like I said originally, it is a GC bug, i.e. a bug in my code due to poor understanding of Nim's GC |
09:25:45 | planetis[m] | whatever |
09:28:02 | FromGitter | <khogeland> But I think I get why that was happening anyway. Do to my unsafe references to variables in the other heap, I was creating objects in that heap that would be reaped on the next GC due to their only references being in the spawned thread |
09:28:47 | FromGitter | <khogeland> I have a better design in mind now that I've done more reading |
09:29:51 | FromGitter | <khogeland> (i.e. one that will actually work and is safe ) |
09:33:29 | FromGitter | <khogeland> I'm still a noob at actually having to understand and deal with memory safety, having spent the vast majority of my time with JVM languages and Python. This is a great learning experience. |
09:38:13 | * | sleepyqt joined #nim |
09:41:58 | * | Vladar quit (Remote host closed the connection) |
09:49:18 | * | couven92 joined #nim |
09:56:53 | * | zolk3ri joined #nim |
10:14:15 | FromGitter | <mratsim> @khogeland Omnisearch for MPD, that means that it search in album/title/comment/artists all at the same time? Interesting, I’ve always been on how to replace Foobar2000 on Mac/linux … Maybe I’ll write an audio player in Nim someday ... |
10:24:39 | * | Yardanico joined #nim |
10:26:59 | FromGitter | <khogeland> @mratsim Yeah, I found that feature very useful when I was using fb2k. Originally I was hoping I'd be able to add it as an extension to rofi, but rolled my own UI instead. |
10:28:43 | * | PMunch joined #nim |
10:41:40 | * | Vladar joined #nim |
10:55:20 | * | sleepyqt quit (Remote host closed the connection) |
10:58:08 | miran | quick question - how to convert TaintedString (when you read from a file) to the regular string? |
10:58:10 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:59:33 | miran | ignore the question above. i just needed `.string` |
11:00:41 | * | ofelas joined #nim |
11:02:14 | * | Snircle joined #nim |
11:03:44 | PMunch | That, or $ |
11:04:31 | * | Yardanico quit (Ping timeout: 248 seconds) |
11:07:24 | dom96 | .string is the correct usage |
11:09:04 | PMunch | Oh, why not $? |
11:10:26 | dom96 | well, it's easier to overlook $, and since we're dealing with TaintedString it's better to be explicit. |
11:10:41 | dom96 | Plus, I bet $ has some overhead |
11:10:56 | PMunch | Hmm, fair point |
11:39:23 | dom96 | yay, nice to see in my Twitch stats that the avg number of viewers is increasing with each stream :) |
11:49:51 | Arrrr | "each proc that has a var of a type which is handled by a destructor needs a hidden try finally block" Hope v1 becomes a thing before this new runtime is introduced |
11:52:14 | miran | dom96: should i change the parameters' names in all functions in `sequtils` to more descriptive ones like you proposed? |
11:52:27 | dom96 | miran: In a separate PR, sure. |
11:52:39 | miran | will do |
11:55:45 | dom96 | thanks |
11:55:50 | dom96 | :) |
12:07:06 | * | gist joined #nim |
12:07:23 | * | gist left #nim (#nim) |
12:18:45 | * | nsf joined #nim |
12:40:28 | miran | dom96: would other sequtils functions also benefit from changing `seq` to `openArray`? if just some of them - which ones do you propose? |
12:43:24 | dom96 | hrm, to be honest I don't really know. |
12:43:28 | dom96 | Just change yours for now |
12:43:39 | miran | ok |
12:44:10 | Arrrr | almost every single one of them would |
12:45:17 | miran | ok then - which ones wouldn't? :) |
12:47:27 | Arrrr | Concat, keepIf, delete. |
12:47:32 | Arrrr | They are hard to adapt to openArray |
12:58:43 | miran | for now i created a PR with just name changes. changing to openArray can be part of some other PR when there is consensus on what to change (cc dom96) |
13:00:27 | dom96 | Looks good, thanks |
13:03:14 | Araq | PMunch, taintedString has no $ I hope |
13:03:23 | * | Arrrr quit (Read error: Connection reset by peer) |
13:03:37 | Araq | that would defeat its purpose a bit |
13:03:47 | miran | Araq: i've tried and i could use $ with tainted |
13:03:51 | PMunch | Hmm, good point |
13:03:58 | Araq | dom96, $ for strings TaintedString is a nop |
13:04:09 | Araq | it has no overhead |
13:05:16 | Araq | miran, with --taintMode:on ? |
13:06:25 | * | Yardanico joined #nim |
13:07:54 | * | Yardanico quit (Remote host closed the connection) |
13:08:01 | * | sleepyqt joined #nim |
13:08:05 | miran | Araq: with the default settings |
13:09:01 | miran | ...which should be `on` from what i can read |
13:10:20 | Araq | no it is off :-) |
13:11:34 | miran | oh, ok then :) |
13:12:18 | * | Yardanico joined #nim |
13:28:16 | miran | Araq: your opinion about changing types to `openarray` in sequtils to increase the functionality? |
13:29:07 | Araq | seems ok but it's only a step in the right direction until we get an Iterable concept that works |
13:29:18 | Yardanico | Araq, what do you mean by "works?" :) |
13:29:27 | Yardanico | it already works with latest zahary changes |
13:29:33 | Araq | Yardanico, you said it doesn't work yet? |
13:29:46 | Yardanico | Araq, It didn't work with arrays before zahary fixed it |
13:29:51 | Yardanico | now it works with arrays too |
13:30:21 | Yardanico | iterable type should only implement items, yes? or indexed access too? |
13:33:32 | Araq | Iterable --> items; Literable --> items + len ? |
13:34:31 | Araq | but I guess we don't need Literable, you can always use 'when compiles(x.len)' inside to optimize it further |
13:34:40 | FromGitter | <x86128> Hello,trying to register on forum, but not received confirmation email. Pls check. Email on google domain. |
13:34:54 | Yardanico | cc dom96 |
13:35:03 | Yardanico | he'll verify you manually :) |
13:35:10 | dom96 | x86128: what's your username? |
13:35:16 | FromGitter | <x86128> Yes |
13:35:30 | Yardanico | yes? |
13:35:39 | dom96 | presumably x86128 :) |
13:35:40 | FromGitter | <x86128> X86128 |
13:35:47 | dom96 | fixed |
13:36:00 | dom96 | (I confirmed you manually) |
13:36:03 | FromGitter | <x86128> Thanks |
13:37:11 | Yardanico | Araq, but how can procs return concept type? |
13:37:44 | Araq | they cannot |
13:37:48 | dom96 | Literable? |
13:37:49 | dom96 | what |
13:37:53 | dom96 | Call it countable |
13:37:55 | Yardanico | Araq, so they will return sequence? |
13:38:01 | Araq | dom96, whatever ok |
13:38:17 | Araq | Yardanico, what else, it's 'sequtils'? |
13:38:22 | Yardanico | ah, probably yes :P |
13:43:49 | dom96 | Araq: What have you done to the {.pure.} pragma? |
13:44:28 | FromGitter | <mratsim> Call it Enumerable please |
13:44:37 | FromGitter | <mratsim> Countable or Literable geez :P |
13:44:49 | Yardanico | IterableWithLen :D |
13:46:37 | FromGitter | <mratsim> And when Enumerable is done, it can replace openarray: https://github.com/nim-lang/Nim/issues/6528 |
13:48:32 | Yardanico | ehh, compiler crashes again :P |
13:48:42 | FromGitter | <x86128> Pls, point me some document for Nim standard library hackers. Need to run tests for sleepAsync function from asyncdispatch module with my attempts to use addTimer func from selectors module. |
13:49:16 | Yardanico | Araq, anything wrong here? https://gist.github.com/Yardanico/0146665df88e0d1658b07084050f1849 |
13:49:34 | Yardanico | (it crashes the compiler, as usual :P) |
13:49:56 | FromGitter | <mratsim> Or maybe as an alternative to Enumerable, Indexable may be even more explicit |
13:50:58 | PMunch | Hmm, is in not possible to put a compileTime proc into a static Table? |
13:51:21 | FromGitter | <mratsim> Or actually: Iterable —> implements items, Enumerable —> implements items + pairs + len, Indexable —> Implements `[]` |
13:53:31 | Araq | dom96, something good? |
13:54:23 | dom96 | I don't get it. You don't have to prefix enum names even when {.pure.} is specified? |
13:59:19 | Araq | Yardanico, told you it's not yet fixed. I just fixed it though, it was easy |
13:59:25 | PMunch | https://pastebin.com/n5M3XEz8 |
13:59:34 | PMunch | Why does this make the compiler spin infinitely? |
13:59:42 | Yardanico | Araq, probably changed skipTypes somewhere ? :) |
14:01:43 | Araq | Yardanico, something like that |
14:03:15 | * | sleepyqt quit (Quit: Leaving) |
14:03:38 | Araq | dom96, pure enum field names get their own scope that is queried if the name was not found in any other scope |
14:04:09 | Araq | so as long as nothing else clashes with it you can use these names without the Enum. prefix |
14:04:35 | dom96 | So now the only difference is that I cannot use a prefix for non-pure enums |
14:04:56 | Araq | er, sure you can |
14:04:56 | dom96 | This behaviour should be implemented for non-pure enums and pure enums should have been left alone |
14:05:19 | dom96 | so what's the difference between pure/non-pure enums now? |
14:05:21 | Araq | well the point is to remove the whole distinction between the two enum types |
14:05:57 | dom96 | er, so you've basically removed {.pure.}? |
14:07:09 | FromGitter | <mratsim> So this should be updated: https://nim-by-example.github.io/types/enums/ |
14:07:27 | PMunch | Pure was nice though.. |
14:07:43 | * | claudiuinberlin joined #nim |
14:07:44 | dom96 | It is nice. |
14:07:48 | Araq | I unified the two concepts, not sure why you don't understand it |
14:07:57 | dom96 | Which is why I'm trying to understand what the purpose of Araq's changes is |
14:08:09 | FromGitter | <mratsim> It should be named “qualified” instead of pure though. |
14:08:09 | Araq | "pure was nice though", omg you can still prefix them all you want |
14:08:23 | PMunch | But you can't force people to.. |
14:08:27 | dom96 | indeed |
14:08:32 | PMunch | I thought that was the entire point of pure |
14:08:39 | dom96 | precisely |
14:08:43 | Araq | the point was to prevent clashes |
14:08:50 | PMunch | To say: this symbol doesn't make any sense without the enum name |
14:09:10 | dom96 | But you've just said that you can prefix non-pure enums too |
14:09:21 | dom96 | so if there are clashes you can prevent them |
14:09:31 | PMunch | And what happens if you have "OneEnum.test" and "AnotherEnum.test", both marked as pure. What will test refer to? |
14:09:38 | FromGitter | <mratsim> you will still get “ambiguous call” though? I guess it’s the same discussion as {.this:this.} pragma |
14:09:56 | Araq | it never was about enforcing rules, it was about preventing clashes |
14:10:14 | Araq | nobody wants these rules anyway: |
14:10:17 | Araq | case e |
14:10:17 | * | zolk3ri quit (Ping timeout: 260 seconds) |
14:10:24 | Araq | of SomeEnum.valueA: |
14:10:28 | Araq | of SomeEnum.valueB: |
14:10:38 | dom96 | I do |
14:10:44 | Araq | of SomeEnum.valueC: echo "just kill me already" |
14:10:57 | dom96 | Sometimes it makes sense to have a short enum value name |
14:11:04 | dom96 | and then a qualifying prefix that is long |
14:11:19 | dom96 | In that case I want to force the user of my library to prefix the enum |
14:11:46 | Araq | yeah, that is exactly what Nim is NOT about |
14:11:55 | Araq | your users are adults. |
14:12:11 | * | zolk3ri joined #nim |
14:13:22 | Araq | if foo in {SomeEnum.short, shortToo, shorter} |
14:13:38 | Araq | # ^ context is everything |
14:16:27 | PMunch | Hmm, I still feel this should be handled somehow else.. |
14:16:51 | dom96 | okay, then we should get the ability to enforce this when importing enums |
14:17:36 | dom96 | btw my book mentions the pure pragma |
14:18:19 | PMunch | TBH, that shouldn't be a factor in the language design |
14:18:30 | PMunch | Of course it's not good, but such is life.. |
14:18:34 | * | Yardanico quit (Remote host closed the connection) |
14:19:22 | dom96 | True. |
14:20:01 | Araq | people argued that every enum should be pure and then we should have special rules in 'case' and set literals to be able to avoid the prefix |
14:21:06 | PMunch | That makes more sense.. |
14:21:13 | Araq | but this doesn't work well, what about [value: "a", valueB: "b"] array constructions |
14:22:51 | PMunch | "SomeEnum.[value: val1, valueB: val2]" for "type SomeEnum = enum val1, val2" |
14:23:05 | PMunch | Same for set |
14:23:49 | PMunch | Case is the only special thing |
14:24:37 | Araq | that's not true at all |
14:25:41 | Araq | in Karax for example the problem comes up all the time too, we want a CSS "enum" without the prefixes that yet doesn't clash |
14:26:11 | Araq | registerEvent(onclick, proc ...) |
14:26:28 | Araq | # ok, onclick is nothing unexpected here |
14:26:55 | Araq | registerEvent(Event.onclick, proc ...) # some other onclick clashed so I need to write it out |
14:27:23 | dom96 | It's hard to tell that `onclick` is an enum type |
14:27:33 | dom96 | it could be a procedure |
14:27:41 | Araq | it's superior to your "I want to enforce it everywhere until I figured out that's a horrible idea" |
14:27:43 | dom96 | forcing the prefix makes it clearer |
14:27:49 | dom96 | It makes the code far more readable |
14:27:54 | PMunch | Agreed |
14:28:03 | Araq | no, I disagree and Nim doesn't work this way |
14:28:20 | miran | prefix *sometimes* makes things clearer |
14:28:33 | Araq | everything else in the language doesn't work this way either anyway |
14:28:41 | dom96 | But sadly this indeed isn't how Nim was designed |
14:29:37 | Araq | Event.onclick # you don't know anything about enums here, could also be ModuleName.onclick |
14:29:38 | PMunch | Fair enough |
14:31:41 | PMunch | Anyways, know why the compiler enters an infinite loop in my example? |
14:32:04 | PMunch | https://pastebin.com/n5M3XEz8 |
14:32:27 | * | arnetheduck quit (Ping timeout: 260 seconds) |
14:34:57 | Araq | no but I doubt it should work |
14:35:02 | miran | while we're at stuff that's (not) Nim-like, i'll try to pitch my idea about new case syntax once more :) |
14:35:25 | miran | thoughts? https://gist.github.com/anonymous/b7cf1316c54e645aa723bfa25a67347a (cc Araq) |
14:36:24 | Araq | hard to implement |
14:36:34 | Araq | (I think) |
14:36:44 | * | gangstacat joined #nim |
14:36:56 | miran | which part? _ instead of else, or `of` just once at the top? |
14:37:50 | miran | it looks cleaner to me, and it is similar to pascal/delphi (which are listed as nim's inspirations, iirc) |
14:39:31 | * | zolk3ri quit (Ping timeout: 255 seconds) |
14:42:21 | * | zolk3ri joined #nim |
14:50:02 | * | elrood joined #nim |
14:50:04 | * | sleepyqt joined #nim |
14:50:49 | dom96 | Araq: well... I sort of do. I know it's a type because types start with a capital letter (by convention) :) |
14:54:39 | * | ipjk joined #nim |
14:55:31 | Araq | nah, people start to use FooBar as module names and we don't enforce the convention. btw I don't really like CapitalCase for types anyway |
14:55:47 | dom96 | I love it |
14:56:04 | dom96 | Why do you dislike it? |
14:56:34 | Araq | it's pointless, types are what comes after the colon in Nim |
14:58:04 | Araq | if colors help in understanding code do wrong colors make matters worse? |
14:58:14 | dom96 | not only after a colon |
14:58:33 | Araq | cause VS Code does the coloring wrong and I don't really care |
15:25:42 | * | Yardanico joined #nim |
15:33:12 | * | Lattay joined #nim |
15:33:24 | Lattay | hi |
15:33:32 | Yardanico | Lattay, hi |
15:34:37 | Lattay | i'm using nim for few days and i really like a lot of features, i heard the 1.0 is planned but is there any dead line ? |
15:34:52 | Yardanico | Lattay, there's none, but Araq is planning to release it at the end of the year |
15:35:06 | Yardanico | (I mean there's no public deadlines) |
15:35:16 | Yardanico | maybe Araq has its' own |
15:35:37 | Lattay | ok nice so the syntax will be fixed after that isn't it ? |
15:35:38 | miran | Lattay: just enjoy the language and ignore the version number ;) |
15:35:48 | Yardanico | Lattay, syntax wouldn't change much |
15:36:01 | Yardanico | (I don't think it would change at all) |
15:36:30 | Lattay | just asking beacause i seen some discuss about redesigning case for exemple |
15:36:45 | miran | nah, that was just me and my ideas :) |
15:37:08 | miran | but i would really much like to see that in v1.0, but it's not me who decides |
15:37:21 | Lattay | ok, that wasn't a bad one by the way |
15:37:29 | miran | thanks! :) |
15:38:26 | Lattay | indeed there is a lot of details that make me said "yes very good language but why that choice !?" |
15:39:01 | * | lastjedi joined #nim |
15:39:23 | miran | yeah, that's why i'm hoping v1.0 will come as late as possible - to iron out all the small details before it is too late |
15:40:53 | Lattay | yeah i agree with you, there is some details that lack of coherence and that is some times a bit weird |
15:41:08 | * | firstjedi quit (Ping timeout: 252 seconds) |
15:42:59 | Lattay | the worst choice imho is the import system that implicitly import all in current namespace |
15:43:19 | * | firstjedi joined #nim |
15:43:40 | Lattay | and that's even more frustrating since it's a real pleasure to code with nim |
15:43:55 | Yardanico | Lattay, it's really easier to me to code with that types of imports |
15:44:05 | Yardanico | you can still have python-like imports |
15:44:10 | Yardanico | "from module import nil" |
15:44:20 | Yardanico | and you'll need to prefix every usage of every identifier from that module |
15:45:25 | Lattay | yeah you're right but still i feel it weird in this way (but i am a python guy) |
15:45:41 | Yardanico | I was a python guy too |
15:45:47 | * | lastjedi quit (Ping timeout: 246 seconds) |
15:45:49 | Yardanico | but now I really like these imports :P |
15:46:28 | * | NimBot1 quit (Remote host closed the connection) |
15:50:21 | * | yglukhov joined #nim |
15:50:51 | miran | one more python guy here |
15:51:29 | Yardanico | https://github.com/Yardanico you can check in my github that I was a python guy |
15:52:14 | miran | i got used to these imports too, but definitely wouldn't mind if there was `from foo import bar` syntax |
15:52:23 | Yardanico | there is |
15:52:32 | Yardanico | it just doesn't work for overloading sometimes |
15:52:39 | Yardanico | e.g. from tables import `[]` |
15:53:57 | Yardanico | so, to use tables you must at least |
15:53:58 | Yardanico | from tables import Table, TableRef, newTable, `[]`, `[]=` |
15:54:04 | Yardanico | from tables import TableRef, newTable, `[]`, `[]=` |
15:57:34 | miran | you make a valid point |
15:58:00 | Yardanico | nim heavily relies on overloading and generics |
15:58:27 | Yardanico | so "from x import a, b, c, d" doesn't really fit Nim |
15:58:28 | dom96 | unfortunately while I do myself wish imports were explicit, a lot of the language would need to be changed for that to work |
15:58:52 | dom96 | Nim would need to get traditional OOP |
15:59:05 | Yardanico | yeah |
15:59:19 | dom96 | And there would need to be a special rule for procedures that are operators |
15:59:24 | Yardanico | like in python |
15:59:37 | dom96 | (although I guess that could be solved by traditional OOP too) |
15:59:45 | Yardanico | dom96, as in python, you just import class |
15:59:54 | Yardanico | you can't change import syntax in nim IMO, it's too late :) |
15:59:59 | dom96 | But then you get a similar problem. |
15:59:59 | Yardanico | but it's fine |
16:00:12 | dom96 | myObject.func() |
16:00:18 | dom96 | I still don't know where 'func' is defined |
16:00:23 | dom96 | At least not immediately |
16:00:46 | dom96 | I'd have to find where 'myObject' is defined |
16:01:03 | dom96 | myObject = module.MyClass() |
16:01:13 | Yardanico | well we can't change nim core language :) |
16:01:18 | miran | couldn't this be solved with: |
16:01:29 | Yardanico | maybe for nim 2.0 or nim 3.0 (if that would be a thing) |
16:01:34 | miran | `from tables import *` (per reasons Yardanico mentioned) |
16:01:55 | Yardanico | ehm |
16:01:57 | miran | `from strutils import splitlines` (for explicit import) |
16:02:16 | dom96 | that wouldn't solve much |
16:02:18 | Yardanico | as I said - this part of the language can't be changed anymore |
16:02:35 | Yardanico | almost every library imports stuff like "import stuff" |
16:02:43 | miran | ah, true |
16:03:02 | dom96 | the solution for Nim is to offer the best IDE support possible :) |
16:03:07 | Yardanico | yep |
16:03:07 | Yardanico | bbl |
16:07:27 | * | Yardanico quit (Ping timeout: 248 seconds) |
16:11:30 | * | yglukhov quit (Read error: Connection reset by peer) |
16:11:37 | * | yglukhov_ joined #nim |
16:22:24 | * | pilne joined #nim |
16:30:45 | * | Lattay quit (Quit: Page closed) |
16:35:00 | zolk3ri | can't be changed because of "almost every library imports stuff like "import stuff"? use sed! |
16:47:46 | * | JappleAck joined #nim |
16:47:46 | * | yglukhov_ quit (Read error: Connection reset by peer) |
16:50:55 | * | Yardanico joined #nim |
16:51:09 | * | Arrrr joined #nim |
16:51:09 | * | Arrrr quit (Changing host) |
16:51:09 | * | Arrrr joined #nim |
16:51:20 | FromGitter | <Yardanico> but |
16:51:31 | FromGitter | <Yardanico> how you would change it in other github repos? |
16:51:34 | FromGitter | <Yardanico> if you don't own them |
16:52:17 | FromGitter | <Yardanico> and sorry, but changing import statement behaviour at this point would be really stupid. |
16:56:34 | zolk3ri | Yardanico: You make it backward compatible for a few releases, and issue a warning about it being deprecated soon, or whatever. Not that I care about the import stuff to begin with anyway. :P |
16:57:02 | Yardanico | zolk3ri, but firstly you need to convince our BDFL that new import behaviour is good and old one is bad :) |
16:57:37 | miran | there are more important issues to convince him ;) |
16:57:40 | zolk3ri | Not me! I don't mind either way. :P |
16:57:42 | FromGitter | <Bennyelg> Hello Folks |
16:57:47 | zolk3ri | Hey. |
16:57:50 | FromGitter | <Bennyelg> sorry for been away so much time |
16:57:53 | FromGitter | <Bennyelg> I had issues |
16:59:28 | Arrrr | `asArray` could be implemented as a proc https://pastebin.com/qPuVQabP |
17:03:59 | Yardanico | Arrrr, but it would change the type at runtime |
17:04:19 | Yardanico | so that's slower |
17:04:45 | Yardanico | Arrrr, dom96, did you see https://github.com/nim-lang/Nim/issues/6563#issuecomment-338488276 ? |
17:05:18 | Arrrr | but can be done at compile time. Besides, it is not like you are going to hand made big arrays |
17:05:20 | Yardanico | ah no |
17:05:26 | Yardanico | Arrrr, it is |
17:05:29 | Yardanico | check unicode module |
17:06:35 | Yardanico | dom96 made this suggestions because of https://github.com/nim-lang/Nim/pull/6301/files/eb1b13baad7f5496be46c8ee0e003081041b5e9e#diff-15d82a47d4b87ec3cce5f6262d3828ceR339 |
17:07:25 | Arrrr | Still is too small. Macros are not for free. |
17:07:40 | Yardanico | why? |
17:08:33 | Arrrr | Nothing is magical. How would the macro work? |
17:09:14 | Arrrr | Both are done at compile time, but macro has to deal with more things that a simple conversion |
17:09:27 | Yardanico | your asArray is done at runtime |
17:09:39 | Arrrr | run that code |
17:09:42 | Yardanico | ah |
17:09:44 | Yardanico | you have const |
17:09:49 | Yardanico | maybe change asArray to compiletime proc? |
17:10:22 | Yardanico | ah no |
17:10:24 | Yardanico | it doesn't work this way |
17:18:34 | * | x86128 joined #nim |
17:20:26 | * | dddddd joined #nim |
17:21:43 | * | couven92 quit (Quit: Client Disconnecting) |
17:43:17 | FromGitter | <x86128> How to list at compile time all set and defined conditions like "linux", "ioselSupportedPlatform", "release" and so that "when" clause can determine? |
17:53:27 | Yardanico | when can actually be used for ANY condition that can be computed at compile-time |
17:54:54 | FromGitter | <x86128> I want to list all currently set conditions |
17:55:05 | Yardanico | you can't |
17:56:42 | Yardanico | because it's not some magical thing |
17:56:53 | Yardanico | and you can create your own when's |
17:57:59 | Yardanico | x86128: https://github.com/nim-lang/Nim/blob/c39e2029762387d05f7b3d81490c6129703c1b60/lib/system/platforms.nim#L14 |
17:58:21 | Yardanico | you can find all possible OS definitions here |
17:58:26 | Yardanico | and cpu definitions too |
17:59:21 | dom96 | This would be nice |
18:00:10 | dom96 | ideally we should have a 'currentOS' const with a set of possible values |
18:00:35 | Yardanico | dom96, ehm? |
18:00:41 | Yardanico | https://github.com/nim-lang/Nim/blob/c39e2029762387d05f7b3d81490c6129703c1b60/lib/system/platforms.nim#L42 |
18:00:55 | dom96 | when currentOS == Windows: vs. when defined(windows): |
18:00:56 | FromGitter | <x86128> Need some thing similar to "env" command in linux shell, but only in compile time :) |
18:01:02 | Yardanico | dom96, you can do that |
18:01:04 | FromGitter | <data-man> Hello! |
18:01:13 | Yardanico | dom96, when targetOS == windows |
18:01:39 | Yardanico | hm |
18:02:11 | Yardanico | it isn't included in system for some reason |
18:02:22 | FromGitter | <data-man> @x86128: The builtin 'system.locals' implemented as a compiler plugin. You can implement system.defines. |
18:02:38 | Yardanico | yeah, make a compiler plugin then |
18:02:40 | Yardanico | nim supports them |
18:02:50 | Yardanico | https://github.com/nim-lang/Nim/tree/13f974336eff453fe4384ef2566f069b6fde75a1/compiler/plugins |
18:05:17 | FromGitter | <x86128> @data-man Uh, Oh, firstly I need to become a YODA Nim hacker :D |
18:06:49 | Yardanico | nah |
18:06:51 | Yardanico | you don't |
18:07:07 | Yardanico | but I don't think system.defines is actually useful |
18:07:10 | miran | hmmm, the same regex pattern `nre` recognizes and `re` does not... :/ |
18:07:16 | Yardanico | maybe only as a documentation |
18:07:26 | Yardanico | miran, because re is extended by default? |
18:07:48 | Yardanico | and they're actually different |
18:07:57 | Yardanico | re is justa PCRE wrapper |
18:08:03 | Yardanico | nre is more nim-like |
18:09:01 | miran | well, `nre` doesn't have an option to give me subgroups of a match, and `re` doesn't recognize the pattern |
18:09:38 | Yardanico | because they're different |
18:09:43 | Yardanico | as I said |
18:09:52 | Yardanico | maybe read the docs ? :) |
18:10:25 | Yardanico | miran, read http://perldoc.perl.org/perlre.html for regex documentation |
18:10:28 | miran | ok, they are different, but i thouht `re` should work with perfectly valid regex |
18:10:39 | Yardanico | are you sure it's perfectly valid? |
18:10:42 | Yardanico | did you check on regex101? |
18:11:27 | miran | yeah, it works on regex101 |
18:11:53 | Yardanico | can you post a snippet of your code which doesn't work> |
18:11:54 | Yardanico | ? |
18:12:11 | miran | this is the pattern: (\w+): capacity (-*\d+), durability (-*\d+), flavor (-*\d+), texture (-*\d+), calories (-*\d+) |
18:12:26 | miran | and here is one line of the text: Sugar: capacity 3, durability 0, flavor 0, texture -3, calories 2 |
18:12:30 | Yardanico | can you show me the code ? :) |
18:12:44 | Yardanico | and btw, you don't even need regex here |
18:12:50 | dom96 | try re("...", {reStudy}) |
18:13:01 | dom96 | instead of re"..." |
18:13:03 | Yardanico | strscans is enough for a line like this |
18:14:12 | FromGitter | <data-man> https://github.com/nim-lang/Nim/pull/6082 Can someone check this PR on Windows x64? |
18:14:17 | miran | tried reStudy and got: Error: invalid character constant |
18:15:31 | Yardanico | miran, Note: The 're' proc defaults to the extended regular expression syntax which lets you use whitespace freely to make your regexes readable. However, this means matching whitespace requires \s or something similar. |
18:15:39 | Yardanico | this was changed in devel though |
18:15:54 | Yardanico | try re("...", {}) |
18:15:59 | Yardanico | ah |
18:16:02 | Yardanico | it should be the same, sorry |
18:16:24 | * | libman joined #nim |
18:16:31 | miran | yeah, \s did the trick |
18:16:54 | * | def-pri-pub joined #nim |
18:16:54 | Yardanico | this was changed in devel as I said :) regex syntax will not be extended by default |
18:17:38 | miran | nice to hear |
18:22:36 | FromGitter | <data-man> Need a wrapper for pcre2 and new modules re2 and nre2 :) |
18:24:19 | Yardanico | *need a pure-nim regex library |
18:25:45 | FromGitter | <data-man> I like the regex library in D language |
18:25:50 | FromGitter | <gokr> The other day I got fed up with regex and used the peg module . |
18:25:56 | FromGitter | <gokr> instead |
18:34:39 | dom96 | this should work though re("...", {reStudy}) |
18:39:28 | * | x86128 quit (Read error: Connection reset by peer) |
18:44:39 | * | solitude joined #nim |
18:45:53 | * | solitudesf quit (Ping timeout: 248 seconds) |
18:47:02 | * | Jesin joined #nim |
18:48:08 | * | jivank[m] quit (Ping timeout: 252 seconds) |
18:48:54 | * | gokr joined #nim |
18:50:10 | Yardanico | dom96, https://github.com/dom96/jester/issues/123 |
18:50:11 | * | def-pri-pub quit (Ping timeout: 255 seconds) |
18:50:13 | Yardanico | ah sorry |
18:50:18 | Yardanico | dom96, https://github.com/nim-lang/nimforum/pull/110 |
18:50:46 | * | def-pri-pub joined #nim |
18:50:48 | * | Demos[m] quit (Ping timeout: 240 seconds) |
18:50:53 | * | Jipok[m] quit (Ping timeout: 252 seconds) |
18:51:08 | * | notdekka[m] quit (Ping timeout: 240 seconds) |
18:51:12 | * | shashlick quit (Ping timeout: 240 seconds) |
18:51:12 | * | MrAxilus[m] quit (Ping timeout: 240 seconds) |
18:51:15 | * | hohlerde quit (Ping timeout: 248 seconds) |
18:51:26 | * | TheManiac quit (Ping timeout: 252 seconds) |
18:51:47 | * | watzon quit (Ping timeout: 248 seconds) |
18:51:59 | * | planetis[m] quit (Ping timeout: 246 seconds) |
18:52:28 | * | dyce[m] quit (Ping timeout: 240 seconds) |
18:52:34 | * | mindB quit (Ping timeout: 264 seconds) |
18:52:34 | * | unclechu quit (Ping timeout: 264 seconds) |
18:53:10 | * | byteflame quit (Ping timeout: 264 seconds) |
18:53:30 | Yardanico | matrix bridge dead again ? :) |
18:53:52 | * | ehmry quit (Ping timeout: 276 seconds) |
18:54:27 | * | d10n quit (Ping timeout: 240 seconds) |
18:57:36 | * | d10n joined #nim |
18:57:37 | * | d10n quit (Changing host) |
18:57:37 | * | d10n joined #nim |
19:08:27 | * | ipjk quit (Read error: Connection reset by peer) |
19:17:54 | * | yglukhov joined #nim |
19:18:31 | * | vlad1777d joined #nim |
19:21:23 | * | Arrrr quit (Read error: Connection reset by peer) |
19:21:52 | * | HoloIRCUser joined #nim |
19:23:37 | * | lastjedi joined #nim |
19:25:28 | * | firstjedi quit (Ping timeout: 258 seconds) |
19:26:19 | * | TjYoco joined #nim |
19:31:28 | * | def-pri-pub quit (Quit: Leaving.) |
19:31:58 | * | firstjedi joined #nim |
19:34:28 | * | Ven joined #nim |
19:34:51 | * | Ven is now known as Guest28087 |
19:35:00 | * | Jesin quit (Quit: Leaving) |
19:35:10 | * | lastjedi quit (Ping timeout: 264 seconds) |
19:38:52 | * | Jipok[m] joined #nim |
19:47:07 | * | smt joined #nim |
19:48:41 | * | ehmry joined #nim |
19:48:41 | * | unclechu joined #nim |
19:48:42 | * | watzon joined #nim |
19:48:42 | * | dyce[m] joined #nim |
19:48:42 | * | Demos[m] joined #nim |
19:48:47 | * | MrAxilus[m] joined #nim |
19:48:48 | * | hohlerde joined #nim |
19:48:48 | * | notdekka[m] joined #nim |
19:48:48 | * | planetis[m] joined #nim |
19:48:48 | * | shashlick joined #nim |
19:48:48 | * | jivank[m] joined #nim |
19:48:49 | * | mindB joined #nim |
19:48:49 | * | TheManiac joined #nim |
19:48:49 | * | byteflame joined #nim |
19:50:46 | * | firstjedi quit (Ping timeout: 264 seconds) |
19:54:14 | Yardanico | yay matrix is back again |
19:54:37 | * | tj_yoco joined #nim |
19:57:00 | * | TjYoco quit (Ping timeout: 246 seconds) |
20:36:28 | * | miran quit (Quit: Leaving) |
20:40:16 | * | tj_yoco quit (Quit: Leaving) |
20:46:49 | Yardanico | guys, discord server - https://discord.gg/ezDFDw2 :) |
20:47:48 | Yardanico | ehh, so I should make irc-discord bridge ? :P |
20:51:40 | * | ofelas quit (Quit: shutdown -h now) |
21:01:27 | PMunch | Hmm is there a library where something like this: http://floating-point-gui.de/errors/comparison/ is implemented? |
21:17:38 | * | PMunch quit (Quit: leaving) |
21:17:38 | * | claudiuinberlin quit (Read error: Connection reset by peer) |
21:23:13 | * | solitude quit (Ping timeout: 248 seconds) |
21:23:37 | * | GitDisc joined #nim |
21:24:05 | Yardanico | guys, I found a Go bridge between multiple services - e.g. you can have Gitter <> IRC <> Discord |
21:24:06 | FromGitter | <ircdiscord> [irc] <Yardanico> guys, I found a Go bridge between multiple services - e.g. you can have Gitter <> IRC <> Discord |
21:24:07 | GitDisc | [gitter] <FromIRC> **<Yardanico>** guys, I found a Go bridge between multiple services - e.g. you can have Gitter <> IRC <> Discord |
21:24:07 | FromGitter | <ircdiscord> [irc] <FromGitter> <ircdiscord> [irc] <Yardanico> guys, I found a Go bridge between multiple services - e.g. you can have Gitter <> IRC <> Discord |
21:24:08 | FromGitter | <ircdiscord> [irc] <FromGitter> <ircdiscord> [irc] <FromGitter> <ircdiscord> [irc] <Yardanico> guys, I found a Go bridge between multiple services - e.g. you can have Gitter <> IRC <> Discord |
21:24:08 | GitDisc | [gitter] <FromIRC> **<GitDisc>** [gitter] <FromIRC> **<Yardanico>** guys, I found a Go bridge between multiple services - e.g. you can have Gitter <> IRC <> Discord |
21:24:10 | * | GitDisc quit (Remote host closed the connection) |
21:24:14 | FromGitter | <Yardanico> FUCK |
21:24:30 | Yardanico | well I mean can we maybe run a new one? |
21:24:37 | Yardanico | because it supports discord also |
21:25:51 | * | def-pri-pub joined #nim |
21:26:04 | * | GitDisc joined #nim |
21:26:10 | GitDisc | [discord] <Yardanico> ok I've started discord-irc bridge |
21:26:17 | zolk3ri | lmao |
21:26:27 | Yardanico | I can add gitter too guys |
21:26:37 | Yardanico | but we'll need to disable FromGitter |
21:26:47 | Yardanico | I'm using https://github.com/42wim/matterbridge |
21:27:18 | Yardanico | do you know the best thing? we can also add twitch to it :P |
21:27:22 | Yardanico | because it supports IRC |
21:29:29 | Yardanico | So we can easily have Gitter <> IRC <> Discord <> Twitch bridge |
21:29:35 | Yardanico | and also slack, telegram, etc |
21:30:25 | Yardanico | what do you think? |
21:30:37 | GitDisc | [discord] <Yardanico> very good bridge btw |
21:32:54 | dom96 | What is this blasphemy? |
21:32:55 | dom96 | Go? |
21:33:11 | Yardanico | well yes, but it just works and we can have gitter-irc-twitch-discord easily |
21:33:21 | GitDisc | [discord] <thedipperslipper> have anyone bought "Nim in Action" yet? |
21:34:04 | Yardanico | dom96, also slack, telegram, matrix, xmpp, and some others |
21:34:17 | FromGitter | <mratsim> > __> |
21:34:40 | FromGitter | <mratsim> https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQrdqx3NDUzb8AH1XtBwW5hfvUW_vkuLfYgsNrUqstVM23vzB5q |
21:34:53 | Yardanico | well this would really be useful |
21:35:06 | Yardanico | so anyone can use his favourite chat messenger |
21:35:25 | GitDisc | [discord] <thedipperslipper> are messages here get posted in the irc as well? |
21:35:28 | GitDisc | [discord] <Yardanico> yes |
21:35:35 | GitDisc | [discord] <thedipperslipper> oh, hi everyone |
21:35:58 | FromGitter | <mratsim> (https://files.gitter.im/nim-lang/Nim/QFpA/images.jpg) |
21:36:13 | * | elrood quit (Quit: Leaving) |
21:36:14 | * | yglukhov quit (Ping timeout: 255 seconds) |
21:36:39 | Yardanico | well it would be really useful to anyone :) |
21:37:10 | zolk3ri | port it to nim |
21:37:13 | Yardanico | hah |
21:37:31 | zolk3ri | :P |
21:38:08 | * | bkerin joined #nim |
21:38:36 | dom96 | only 533 commits |
21:38:49 | Yardanico | dom96, and 450 stars :D |
21:39:05 | Yardanico | well I maybe *can* port it, but can we run it now before I port it to Nim? |
21:40:02 | Yardanico | but I would need to fix nim stdlib bugs :P |
21:40:25 | zolk3ri | nah, dom96 is gonna fix nim stdlib bugs and stream it |
21:40:27 | zolk3ri | :p |
21:41:21 | * | Yardanico quit (Remote host closed the connection) |
21:42:17 | zolk3ri | /2/2 |
21:42:19 | zolk3ri | err |
21:43:22 | * | nsf quit (Quit: WeeChat 1.9) |
21:49:03 | * | Vladar quit (Remote host closed the connection) |
21:53:38 | * | Nobabs27 joined #nim |
21:57:12 | * | sleepyqt quit (Quit: Leaving) |
21:58:19 | * | Guest28087 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:02:06 | * | def-pri-pub quit (Quit: Leaving.) |
22:13:18 | FromGitter | <mratsim> What am I missing so that arraymancer.nim.cfg gets used? |
22:13:18 | bkerin | is there a way to declare a method virtual? |
22:13:27 | FromGitter | <mratsim> (https://files.gitter.im/nim-lang/Nim/rTTV/2017-10-23_00-12-47.png) |
22:13:45 | bkerin | just using {.base.} and setting to nil seems to make a no-op which is not what is wanted |
22:14:02 | FromGitter | <mratsim> @bkerin what do you mean virtual? Dynamic dispatch? all methods are dynamic dispatched |
22:14:25 | bkerin | like purse virtual =0 in sig or some crap like that in C++ |
22:14:45 | bkerin | i.e. not callable in base class and needs an implementation |
22:15:01 | bkerin | s/purse/pure/ |
22:16:35 | FromGitter | <mratsim> @bkerin I use that: https://github.com/mratsim/Arraymancer/blob/master/src/autograd/ag_data_structure.nim#L56-L65 |
22:17:40 | bkerin | looks good |
22:26:00 | * | pilne left #nim ("Leaving!") |
22:27:36 | bkerin | so far what drives me nuts most about this lang |
22:27:39 | FromGitter | <Yardanico> U |
22:27:54 | FromGitter | <Yardanico> What? |
22:28:14 | bkerin | is finding things in the docs |
22:28:43 | bkerin | im gonna end up scripting something to search the entries in the big index page and it still seems some things aren'g there |
22:28:50 | FromGitter | <Yardanico> Well you don't need to find thing to this one |
22:29:07 | FromGitter | <Yardanico> E.g. you just throw an error as you would usually do |
22:29:24 | FromGitter | <Yardanico> Use devdocs to search on nim docs |
22:29:30 | FromGitter | <Yardanico> It has offline mode |
22:31:06 | bkerin | mm ill try it |
22:31:31 | bkerin | meanwhile can someone tell me how to get type of a thing as string |
22:33:04 | FromGitter | <kdheepak> @Varriount @arnetheduck or others, have any of you tried the nlvm (https://github.com/arnetheduck/nlvm) on a Mac? |
22:35:25 | * | bkerin quit (Quit: Confucius say: Man who stand on toilet is high on pot.) |
22:38:17 | * | Sentreen quit (Ping timeout: 258 seconds) |
22:51:05 | * | Sentreen joined #nim |
22:55:14 | * | SusWombat joined #nim |
22:59:03 | FromGitter | <Yardanico> bkerin: take a look at typetraits module |
22:59:39 | FromGitter | <Yardanico> It wouldn't work for runtime types though |
23:02:00 | FromGitter | <mratsim> @bkerin import typetraits and thing.type.name |
23:02:02 | * | def-pri-pub joined #nim |
23:02:17 | FromGitter | <mratsim> it was in my “virtual” method example |
23:03:46 | * | CALINOU is now known as Calinou |
23:05:39 | * | gokr quit (Ping timeout: 246 seconds) |
23:07:51 | * | gokr joined #nim |
23:17:06 | FromGitter | <khogeland> Why are methods not GC-safe? |
23:17:56 | FromGitter | <khogeland> ```method bar(s: RootObj) {.base.} = discard ⏎ proc foo() {.thread.} = ⏎ bar(RootObj())``` ⏎ ⏎ Does not compile [https://gitter.im/nim-lang/Nim?at=59ed27238808bed73d1625a3] |
23:18:11 | Araq | write .base, gcsafe |
23:18:30 | Araq | the default for any effect in Nim is "yeah, possible" |
23:31:35 | * | zolk3ri quit (Quit: Lost terminal) |
23:33:53 | * | gokr quit (Ping timeout: 248 seconds) |
23:38:05 | * | vlad1777d quit (Ping timeout: 255 seconds) |
23:49:24 | * | Snircle quit (Ping timeout: 246 seconds) |
23:54:22 | GitDisc | [discord] <zetashift> sweet I always prefer Discord over gitter/slack |
23:54:51 | FromGitter | <khogeland> lol, nice. |
23:55:47 | FromGitter | <khogeland> Need an IRC bridge for the Discord channel for maximum flexibility, IRC -> Discord -> IRC -> Gitter -> Slack |
23:56:06 | FromGitter | <khogeland> And maybe an IRC bridge out the other end |