00:06:33 | * | rnrwashere joined #nim |
00:07:37 | * | Snircle joined #nim |
00:10:50 | * | rnrwashere quit (Ping timeout: 250 seconds) |
01:17:21 | * | I_Right_I quit (Remote host closed the connection) |
01:32:25 | * | rnrwashere joined #nim |
02:07:05 | * | banc quit (Quit: Bye) |
02:17:07 | * | abm quit (Read error: Connection reset by peer) |
02:28:08 | * | banc joined #nim |
02:40:48 | * | rnrwashere quit (Remote host closed the connection) |
02:42:11 | * | [rg] left #nim (#nim) |
02:52:26 | * | rnrwashere joined #nim |
02:57:24 | * | rnrwashere quit (Ping timeout: 268 seconds) |
03:24:58 | * | rockcavera joined #nim |
03:31:09 | * | rnrwashere joined #nim |
03:43:44 | * | rnrwashere quit (Remote host closed the connection) |
03:44:14 | * | rnrwashere joined #nim |
04:25:47 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
04:37:39 | * | nsf joined #nim |
05:08:11 | * | rnrwashere quit (Remote host closed the connection) |
05:08:28 | * | rnrwashere joined #nim |
05:10:17 | * | narimiran joined #nim |
05:13:46 | * | rnrwashere quit (Remote host closed the connection) |
06:01:12 | * | solitudesf joined #nim |
06:02:58 | * | krux02 joined #nim |
06:59:23 | * | dddddd joined #nim |
06:59:51 | * | solitudesf quit (Ping timeout: 255 seconds) |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:05:00 | * | gmpreussner joined #nim |
07:20:17 | * | shomodj joined #nim |
07:20:54 | * | fanta7531 joined #nim |
07:23:03 | leorize | Araq: looks like koch is working with newruntime, but I spotted a memory corruption bug |
07:24:22 | leorize | if you run `./koch temp`, it will error out at the end due to a `setCurrentDir` error, due to the string used was corrupted |
07:29:32 | Araq | leorize, problem is that koch.nim is pretty bad test as it's an "interactive" program |
07:30:03 | Araq | can you extract the corruption into a real test case? |
07:31:18 | leorize | I'll try |
07:31:19 | FromGitter | <alehander42> Disruptek linguist is in progress still wip |
07:31:23 | FromGitter | <alehander42> Linguist |
07:31:29 | FromGitter | <alehander42> Languist ' |
07:31:40 | FromGitter | <alehander42> We are talking on rubykaigi about it |
07:32:01 | FromGitter | <alehander42> After several days so there is a nim related talk on a Rubicon |
07:32:05 | FromGitter | <alehander42> Rubyconf |
07:32:11 | FromGitter | <alehander42> Soon |
07:33:19 | Araq | leorize, also valgrind and the clang sanitizers work out of the box with -d:useMalloc |
07:34:04 | Araq | and that alone means the --newruntime is doomed to be a success :-) |
07:40:22 | * | solitudesf joined #nim |
07:46:11 | * | JustASlacker joined #nim |
07:56:52 | * | clyybber joined #nim |
08:04:09 | Araq | alehander42: what is Linguist? |
08:04:54 | FromGitter | <alehander42> So if anybody has any ideas for slides about nim for ruby audience feel free to write me |
08:05:02 | FromGitter | <alehander42> Araq |
08:05:17 | FromGitter | <alehander42> A general version of py2nim |
08:05:38 | FromGitter | <alehander42> Supporting more input/output languages |
08:06:22 | Araq | meh |
08:06:50 | FromGitter | <alehander42> https://github.com/metacraft-labs/languist |
08:06:50 | Araq | py2nim is already super hard to do |
08:07:16 | Araq | make it more general and it becomes even harder |
08:08:16 | FromGitter | <alehander42> Well hard problems are interesting |
08:08:37 | FromGitter | <alehander42> I think applying it for some projects makes sense |
08:08:48 | FromGitter | <alehander42> Most libs are harder to translate |
08:09:09 | FromGitter | <alehander42> But a lot of tools and Web Apps etc which mostly use stdlib and existing dsls |
08:09:18 | FromGitter | <alehander42> Are way more adaptable to translation |
08:09:34 | FromGitter | <alehander42> Especially with good rewriting rules mechanism |
08:09:58 | FromGitter | <alehander42> With which one can add easily project specific patterns |
08:10:15 | Araq | ah |
08:10:24 | Araq | that makes sense |
08:11:00 | FromGitter | <alehander42> E.g. In fast-rubocop |
08:11:26 | clyybber | nim -> befunge when?? |
08:11:36 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:11:38 | FromGitter | <alehander42> We replace some dsl with invocations of compile time nim dsl |
08:12:10 | FromGitter | <alehander42> And parser lib with a treesitter+adapter |
08:12:36 | FromGitter | <alehander42> And some other infrastructure and translate the~ 500 checkers |
08:12:40 | FromGitter | <alehander42> Based on them |
08:13:42 | FromGitter | <alehander42> Most of them are not fully correct translations but a lot of them should leave small manual fixes to be done |
08:13:58 | FromGitter | <alehander42> (and eventually most of them should just work but win) |
08:14:02 | FromGitter | <alehander42> Wip' |
08:15:06 | * | chickendan joined #nim |
08:15:11 | clyybber | leorize: Looks like the corruption issue happening to me too. |
08:15:30 | livcd | alehander42: wow! Nim is going to be on RubyKaigi? |
08:15:48 | Araq | clyybber, btw your cast patch should also be done for tyString |
08:16:07 | Araq | I think |
08:16:24 | clyybber | Araq: Somehow it works without checking for etyp.kind in {tySequence, tyString} |
08:16:41 | clyybber | The string gets treated like a tySequence somehow. |
08:16:56 | Araq | I'm pretty sure that doesn't happen |
08:17:15 | clyybber | It fails with strings without my patch. |
08:17:23 | clyybber | So my patch must have done *something* |
08:17:51 | Araq | well there is source.typ and dest.typ |
08:17:58 | Araq | for every conversion/cast |
08:18:13 | Araq | if you cast *to* seq it should work |
08:18:22 | clyybber | Ah, I got it. |
08:19:08 | Araq | before I wrote Nim I thought C's "cast" means the compiler/optimizer needs to give up |
08:19:40 | Araq | completely wrong, lol, the compiler can look at the involved types and continue with what it needs to do |
08:20:20 | clyybber | gcc's smart |
08:20:31 | clyybber | Araq: Should I send a PR fixing it? |
08:20:42 | Araq | why do you think I told you? :P |
08:20:49 | clyybber | :D |
08:21:39 | Araq | and then get this new runtime to work. I'm working on the mover analyser, your job is porting 100_000 lines of Nim code over to the new runtime. Deal? |
08:22:47 | FromGitter | <alehander42> Livcd |
08:22:54 | FromGitter | <alehander42> Yes indeed |
08:23:02 | FromGitter | <alehander42> At least some of the talk |
08:23:23 | FromGitter | <alehander42> Zahary and me will talk |
08:23:43 | FromGitter | <alehander42> So if you have ideas for slides stuff that would impress ruby politely |
08:26:32 | Araq | well it's Ruby, show some web framework and web benchmark numbers |
08:26:52 | Araq | and Ruby's DSLs are nice and can also be done with Nim |
08:26:54 | FromGitter | <alehander42> Araq but shouldn't the language require type conversion when it needs to do such logic |
08:27:20 | Araq | what? this question came out of nowhere |
08:27:38 | Araq | what's the context? |
08:28:35 | FromGitter | <alehander42> You wrote something about cast and compiler giving up |
08:29:00 | FromGitter | <alehander42> OK we have benchmarks of our Rubicon prototype not of Web stuff |
08:29:18 | FromGitter | <alehander42> But we might show how Web dsls look in Jim |
08:29:22 | FromGitter | <alehander42> Jim |
08:29:24 | FromGitter | <alehander42> Nim |
08:29:41 | Araq | what about it? the type conversions can be implicit or explicit, if they are implicit then they are explicit after sem'check, no biggie |
08:33:44 | * | kapil____ joined #nim |
08:36:26 | * | floppydh joined #nim |
08:45:18 | clyybber | Araq: Why are openArray and varargs handled differently in genSomeCast? |
08:45:46 | clyybber | I mean special cased as opposed to seqs for example. |
08:47:15 | * | shomodj joined #nim |
08:51:45 | Araq | because openarray is special, it's an unnested (ptr, len) pair |
08:52:07 | * | leorize quit (Ping timeout: 240 seconds) |
08:53:42 | * | chickendan quit (Ping timeout: 255 seconds) |
08:53:55 | clyybber | ah, ok. |
08:56:39 | * | leorize joined #nim |
09:06:05 | clyybber | leorize: Is the corrupion issue an regression? |
09:08:13 | * | Vladar joined #nim |
09:11:15 | leorize | clyybber: no idea |
09:11:43 | Araq | probably not, I declared victory when I got 'koch boot -d:release' to run :P |
09:18:49 | Zevv | I get "Error: system module needs: nimGCvisit" when doing some experiments with the new runtime. Should I just sit on my hands a few weeks before doing this? |
09:19:29 | Araq | Zevv, or you fix it |
09:19:54 | Araq | it means your code uses something that the newruntime doesn't support and we need at least a better error message |
09:20:04 | Araq | I've done first steps for this with system.repr |
09:20:16 | Araq | where the compiler should now produce a decent error message |
09:21:31 | * | shomodj quit (Read error: Connection reset by peer) |
09:24:25 | Zevv | ok, clear |
09:35:16 | Araq | the stack trace of 'koch temp c --newruntime foo.nim' should give you some hint why the codegen thinks it requires RTTI |
09:39:20 | Zevv | yeah, I just figured out it is triggered by a {}.toTable() |
09:41:07 | Araq | huh? |
09:41:14 | Araq | so weird :P |
09:42:29 | Zevv | oh shoot, that was the other error: `t.destructor != nil`. Well, I'll see how far I can get. Thanks for the hint |
09:44:47 | Araq | ah that error can't be hard to fix either... bah why is everything so hard |
09:50:05 | * | couven92 joined #nim |
09:50:32 | * | fredrik92 quit (Quit: Client disconnecting) |
09:52:03 | * | shomodj joined #nim |
09:52:45 | * | abm joined #nim |
10:07:45 | * | chickendan joined #nim |
10:11:34 | clyybber | Araq: https://github.com/nim-lang/Nim/pull/11031 is ready. |
10:12:42 | * | xet7 joined #nim |
10:26:17 | * | lritter joined #nim |
10:34:34 | Araq | clyybber, wanna give https://github.com/nim-lang/Nim/issues/11014 a try? |
10:35:53 | * | fanta7531 quit (Quit: fanta7531) |
10:37:45 | Zevv | just looking into that one ,but kind of stuck |
10:38:11 | Zevv | it is related to tables.nim:enlarge(), but I don't understand why |
10:38:53 | Zevv | minimal code to reproduce: var e = initTable[char, bool](); e['a'] = true |
10:39:27 | Araq | maybe it's 'swap' that triggers it? |
10:41:27 | Zevv | If I throw everyting out except "var n: KeyValuePairSeq[A, B]", the error is still there |
10:41:38 | Zevv | that's where I got stuck |
10:43:47 | Araq | hmm |
10:48:38 | clyybber | Araq: Sure |
10:49:17 | clyybber | How do I pretty print PTypes and PNodes again? I forgot, and using repr reaches the call limit |
10:51:46 | Araq | echo $n, " ", $t |
10:51:59 | Araq | there is also debug(x) but that's information overload |
10:52:36 | clyybber | thanks |
10:53:17 | * | dddddd quit (Remote host closed the connection) |
10:56:19 | * | stefanos82 joined #nim |
11:03:14 | * | al_ joined #nim |
11:03:21 | * | al_ quit (Client Quit) |
11:15:04 | * | xet7 quit (Quit: Leaving) |
11:32:44 | krux02 | clyybber, I wrote `debug` to print as much information as it can find without duplication. That is an overload, but it is also written in a way that minimal changes can reduce the output to what you are really looking for. |
11:34:07 | krux02 | for example you might want to change ``this.renderSymType = true`` to ``this.renderSymType = false`` in astalgo.nim:602 |
11:34:42 | clyybber | krux02: Thank you, debug serves me well :D |
11:35:07 | krux02 | good to hear |
11:35:22 | krux02 | you are welcome |
11:35:35 | krux02 | I try to make the output of debug as easy to understand as possible, but it is verbose |
11:38:28 | krux02 | The idea behind it is, turning things off that you don't want is easy, trying to ignore the output to filter for what you are actually looking for is doable, fixing ``debug`` to provide information that you actually need when it is not printed at all is hard. |
11:38:38 | krux02 | so it's verbose by default |
11:41:26 | Araq | if I say debug(n) I don't want debug(n.typ), if I need debug(n.typ) guess what I would have typed |
12:25:35 | clyybber | Araq: `swap` is not the problem |
12:25:50 | clyybber | its the generic type parameters |
12:26:51 | Zevv | KeyValuePairSeq |
12:26:59 | Zevv | [A,B] |
12:29:01 | clyybber | this is really weird... |
12:29:16 | clyybber | seemingly unrelated code happens to create the error in conjunction |
12:30:47 | clyybber | Zevv: I got a minimal test case: |
12:30:49 | clyybber | https://hastebin.com/agulanemob.md |
12:31:32 | clyybber | The funny thing is, if you remove `var e = initTable[char]()` it compiles fine. |
12:31:34 | Zevv | indeed, I got to something similar. |
12:31:38 | Zevv | yes |
12:31:57 | clyybber | even though my enlarge proc doesn't touch `e` in any way |
12:32:08 | clyybber | this is beyond science |
12:32:35 | Zevv | 11:44 <@Araq> ah that error can't be hard to fi |
12:32:39 | Zevv | x |
12:33:01 | Zevv | if it's beyond science, give it back to Araq :) |
12:33:32 | clyybber | Agree :D |
12:33:38 | clyybber | Have fun, Araq. |
12:33:45 | clyybber | jk |
12:33:52 | Zevv | clyybber: put your snippet in the issue |
12:33:55 | clyybber | but I have no idea how to fix this |
12:34:01 | clyybber | Zevv: What issue? |
12:34:11 | clyybber | The .toTable one? |
12:34:17 | Zevv | yeah |
12:34:34 | Zevv | 11014 |
12:37:06 | clyybber | done. |
12:37:23 | Zevv | you can even replace the body of initTable with discard |
12:37:26 | Zevv | and it still barfs |
12:37:30 | clyybber | lol |
12:37:34 | clyybber | wth |
12:39:39 | * | Snircle joined #nim |
12:39:54 | Zevv | you can take out the tuple as well |
12:40:20 | clyybber | you can take out the generic parameter of enlarge out as well. |
12:41:25 | Zevv | and the *call* to enlarge |
12:41:54 | * | clyybber and Zevv are slowly digging their way to the true core of the universe |
12:42:14 | Zevv | http://paste.ubuntu.com/p/2y7tgmb9ss/ |
12:43:05 | clyybber | Zevv: Thats exactly where I'm at too :) |
12:43:11 | * | narimiran_ joined #nim |
12:43:34 | clyybber | whats funny is that if you call enlarge but replace its body with discard, it works again. |
12:43:34 | Zevv | bug golf |
12:44:06 | * | narimiran quit (Ping timeout: 255 seconds) |
12:51:08 | clyybber | Araq: This is getting weird: https://github.com/nim-lang/Nim/issues/11014 |
12:51:48 | clyybber | https://github.com/nim-lang/Nim/issues/11014#issuecomment-483233954 |
12:57:07 | FromGitter | <mratsim> seems like a variable assignment bug with generic destructors :P |
12:58:25 | * | chickendan left #nim ("Left") |
13:01:06 | clyybber | mratsim: Happens with let too, though. |
13:01:35 | FromGitter | <mratsim> I meant variable as memor location, not var vs let |
13:03:13 | clyybber | oh |
13:50:13 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
14:00:36 | * | Cthalupa quit (Ping timeout: 255 seconds) |
14:02:06 | * | narimiran_ is now known as narimiran |
14:09:08 | Araq | clyybber, check the logic: |
14:09:09 | Araq | let h = sighashes.hashType(orig, {CoType, CoConsiderOwned}) |
14:09:09 | Araq | var canon = c.graph.canonTypes.getOrDefault(h) |
14:09:15 | Araq | in liftdestructors.nim |
14:10:19 | Araq | it's only hard if you didn't write the original implementation :P |
14:11:17 | Araq | it picks the "wrong" canon type, the one where t.destructor is still 'nil' |
14:11:58 | FromGitter | <mratsim> "hard if you didn't write the implementation" is usually synonymous with poorly documented and tested :p |
14:13:29 | Araq | you can document it all you want, in the end nobody reads it |
14:13:47 | Araq | life is too short to read code |
14:21:11 | * | Trustable joined #nim |
14:23:15 | FromGitter | <alehander42> Life is too short not to read code but I document badly too |
14:23:32 | FromGitter | <alehander42> I have no idea how I have mobile net here |
14:29:01 | Araq | 100_000 LOC is roughly a book with 4000 pages. Nobody reads that. |
14:30:07 | Araq | ok, maybe 2500 pages, but still |
14:30:16 | FromGitter | <alehander42> Eh you can read parts of it |
14:30:24 | FromGitter | <alehander42> When you debug or look at the arch |
14:30:27 | Araq | which parts? |
14:30:35 | FromGitter | <alehander42> You never know what would be useful |
14:30:42 | FromGitter | <alehander42> I am talking in general |
14:30:46 | FromGitter | <alehander42> Which project is this |
14:32:01 | FromGitter | <mratsim> I like putting thoughts in my code, especially on datastructures |
14:32:04 | Araq | what do you think liftdestructors.nim and injectdestructors.nim do? how much better should it be documented given that the code seems to be buggy. Do you think the docs would cover the bugs, aka the situations that escaped the writer of the code? |
14:32:30 | FromGitter | <alehander42> Well they should |
14:32:55 | FromGitter | <alehander42> Again I am not sure about which project this is |
14:33:02 | FromGitter | <alehander42> What is 100kloc |
14:33:14 | FromGitter | <mratsim> I didn't read the destructors/newruntime code yet |
14:33:56 | * | dddddd joined #nim |
14:35:14 | * | I_Right_I joined #nim |
14:58:36 | * | JustASlacker quit (Remote host closed the connection) |
15:20:14 | * | floppydh quit (Quit: WeeChat 2.4) |
15:23:35 | * | xet7 joined #nim |
15:41:15 | clyybber | Araq: Huh, I see. Made for some really funny bugs |
15:53:07 | Zevv | but what is the fix |
15:53:22 | Araq | canon the type recursively |
16:12:48 | xace | Could someone clarify if there was a disadvantage to using if expressions rather than a if statement? I seem to have a faint memory of it but can't recall what the answer is |
16:13:56 | clyybber | you can conditionally assign some values to a let variable. |
16:14:10 | WilhelmVonWeiner | that would be weird. |
16:14:20 | Araq | the error messages are often more confusing with if-expressions |
16:14:33 | xace | clyybber: but iirc there was something about if expressions being slower than if-statements ? or if the generated C code is more of a mess or w/e |
16:14:45 | clyybber | I don't know, sorry |
16:15:52 | clyybber | unless the if expr introduces a copy it shouldn't be any slower tho. |
16:17:15 | * | cgfuh joined #nim |
16:18:06 | * | abm quit (Quit: Leaving) |
16:19:42 | xace | hmm, i have grepped over the chat logs a couple of times now and i cant seem to find it, i guess I am wrong and will continue using if expressions where I see fit |
16:20:14 | * | rnrwashere joined #nim |
16:21:16 | FromGitter | <mratsim> the generated C code is quite verbose especially if it's not a simple expression. For simple expresson the compiler either generates a CMOV or the same code as if statement but when it complex it sometimes miss opportunities for simplification |
16:22:06 | * | NimBot joined #nim |
16:22:19 | Calinou | yeah, the readability/compactness benefit of if expressions is usually worth it |
16:22:25 | FromGitter | <mratsim> You would have cache/memory locality optimisations to do before that ever begins to be a problem |
16:22:26 | Calinou | (same for when expressions, which I've found were possible recently) |
16:22:53 | xace | @mratsim: oki, thank you |
16:22:54 | Calinou | it also encourages you to use more `let` over `var`, yay for immutability :p |
16:23:57 | xace | Calinou: yeah, i like the liberty the language gives for expressing myself :) |
16:24:56 | xace | @mratsim: yeah, that is true... still trying to get a feel for the language, but your explination answers my problem |
16:25:46 | FromGitter | <mratsim> in short simple if expression will generate C ternary operator, complex sometimes generate goto iirc. |
16:27:23 | clyybber | Araq: `elif canon != orig` is always true... |
16:27:34 | FromGitter | <mratsim> also C compilers are quite good at optimising if expressions because there is no min/max operator, all min/max are implemented through ternary macros :P |
16:28:01 | clyybber | Araq: Even when they look to be the same, at least afaict from an echo. |
16:31:12 | xace | @mratsim: I see, your answer makes more sense now :) |
16:36:04 | * | xet7 quit (Quit: Leaving) |
16:36:42 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:51:13 | clyybber | Araq: Nevermind |
16:56:47 | * | rnrwashere quit () |
16:57:41 | Araq | mratsim: we never generate ?: unless it's hardcoded in the codegen |
16:58:10 | Araq | because C compilers throw away expressions vs statements and operate on a control flow graph |
16:58:15 | FromGitter | <mratsim> I'm pretty sure I found some but I may misremember |
16:58:39 | Araq | hardcoded for 'len', sure. |
16:59:08 | Araq | interestingly, the Intel compiler can optimize for(;;) but not the while loops we produce |
17:02:55 | clyybber | Araq: So how would I canon recursively? Do I just canon the sons too? |
17:03:13 | Araq | before it dies with t.destructor == nil |
17:06:17 | clyybber | Araq: Why is there `var overwrite`? If they are indeed the same, it can't hurt to overwrite them, can it? |
17:06:41 | clyybber | or does that count as an optimization? |
17:07:05 | FromGitter | <mratsim> doesn't it produce a nop and then a cmp + jnz at the end of the loop? |
17:08:16 | Araq | clyybber, optimization, 'ref' incurs a quite expensive write barrier |
17:08:54 | Araq | at least for the default GC that the compiler uses for no other reason than to test this GC thoroughly... |
17:09:09 | * | lritter quit (Ping timeout: 252 seconds) |
17:09:15 | Araq | mark&sweep is faster and Boehm is faster still, theory vs practice. |
17:09:35 | * | lqdev joined #nim |
17:10:18 | clyybber | k |
17:10:51 | * | lqdev left #nim (#nim) |
17:11:08 | * | iLiquid joined #nim |
17:11:34 | * | shomodj joined #nim |
17:11:57 | FromGitter | <mratsim> that's like matrix multiplication. People are looking for algorithm with less than n^3 complexity, but in practice optimising for memory locality trumps every clever scheme found for matrix sizes that fit on a common PC RAM. |
17:12:32 | iLiquid | so I got annoyed by Gitter's unread message handling and how buggy it is, I decided to switch to IRC now (this is liquid600pgm, btw) |
17:12:41 | clyybber | same |
17:13:11 | iLiquid | do you recommend any particularly good IRC clients? |
17:13:24 | iLiquid | I'm using Srain currently, but it feels pretty unfinished |
17:13:26 | clyybber | mratsim: imagine if processors had a way to reliably hint at what should be put into the L caches. |
17:13:33 | narimiran | iLiquid: hexchat does the job |
17:13:37 | clyybber | iLiquid I'm using weechat. |
17:13:43 | * | rnrwashere joined #nim |
17:13:47 | clyybber | iLiquid: Are you on linux? |
17:13:51 | iLiquid | yes |
17:13:54 | Araq | clyybber, it wouldn't make the caches any bigger |
17:14:08 | clyybber | No, but probably more efficient. |
17:14:38 | clyybber | Would also allow to handle very distributed data structures optimally. |
17:14:46 | Araq | there are 'prefetch' instructions anyway |
17:15:04 | * | iLiquid left #nim (#nim) |
17:15:28 | * | iLiquid joined #nim |
17:15:40 | iLiquid | alright, trying out HexChat |
17:15:45 | FromGitter | <mratsim> @clyybber They have: https://github.com/numforge/laser/blob/master/laser/compiler_optim_hints.nim#L30-L73 |
17:16:09 | clyybber | mratsim: Just saw that :D Amazing work |
17:16:40 | FromGitter | <mratsim> it's particularly useful on hyperthreaded CPU because those can be executed during instruction pipeline stalls. |
17:17:10 | clyybber | Thats nice. |
17:17:29 | clyybber | Araq: Sadly not on many architectures. |
17:17:31 | Araq | too bad we have to disable hyperthreading because of Spectre :P |
17:17:48 | FromGitter | <mratsim> It's helpful on only specific scenario though. When the hardware predictor doesn't know what to prefetch but you do (for example a binary tree) |
17:18:00 | clyybber | Yeah, exactly. |
17:18:11 | FromGitter | <mratsim> if it's prefetching the next element of an contiguous array it's useless :p |
17:18:22 | clyybber | Haha, yeah of course. |
17:18:31 | * | iLiquid quit (Remote host closed the connection) |
17:18:48 | * | ng0 joined #nim |
17:18:57 | * | iLiquid joined #nim |
17:19:11 | * | iLiquid quit (Remote host closed the connection) |
17:19:22 | * | iLiquid joined #nim |
17:19:48 | * | iLiquid quit (Remote host closed the connection) |
17:20:25 | I_Right_I | I like the choice of algorithm for the random number generator :-) |
17:20:41 | I_Right_I | in the stdlib |
17:20:59 | clyybber | I just hope Risc-V gets a good prefetching extension: https://content.riscv.org/wp-content/uploads/2018/07/Shanghai-1350_OpenPrefetch.pdf |
17:21:21 | clyybber | But that could be tricky as some implementations dont even have L2 cache. |
17:21:35 | * | daknus joined #nim |
17:21:41 | clyybber | I_Right_I: xoroshiro is amazing. |
17:21:43 | * | daknus quit (Client Quit) |
17:23:21 | * | daknus joined #nim |
17:23:30 | * | daknus is now known as iLiquid |
17:23:31 | shashlick | iLiquid: do you already use some chat like Slack? Matterbridge works very well for me |
17:23:34 | * | iLiquid left #nim (#nim) |
17:23:38 | * | iLiquid joined #nim |
17:23:48 | iLiquid | nope |
17:24:02 | clyybber | dark nuss |
17:24:03 | iLiquid | I only use Discord, but integration seems pretty sloppy |
17:24:14 | shashlick | I get irc, telegram and gitter all pulled into one place in slack |
17:24:50 | * | iLiquid quit (Client Quit) |
17:25:04 | * | iLiquid joined #nim |
17:25:07 | shashlick | Best part is they added nick clean up so no more FromGitter nonsense |
17:25:30 | shashlick | Discord is already bridged here |
17:25:48 | narimiran | shashlick: do you have nick-autocompletion? |
17:27:19 | iLiquid | I'll stay with IRC for now |
17:27:26 | I_Right_I | I don't know why nim hasn't drawn more game developers? |
17:27:40 | shashlick | @narimiran: nope, cause everything comes from the matterbridge bot |
17:27:49 | shashlick | but this is what it looks like |
17:28:32 | FromGitter | <genotrance> (https://files.gitter.im/nim-lang/Nim/TqeA/image.png) |
17:31:12 | FromGitter | <mratsim> @Right, I think game developers are the most represented community though |
17:31:29 | FromGitter | <mratsim> I mean, even Beamdog is using Nim for Neverwinter Nights 1 enhanced edition |
17:34:12 | FromDiscord | <exelotl> I wrote a Discord bot in Nim that can turn a private Discord server into a personal IRC client, where each Discord channel is mapped to a different IRC channel on a different IRC server |
17:34:56 | FromDiscord | <exelotl> But that was back on 0.18 and I still need to update it, and also I got a segfault in the nim discord library when I left it running all day :( |
17:38:24 | * | fanta7531 joined #nim |
17:45:03 | * | cgfuh quit (Ping timeout: 250 seconds) |
17:45:14 | iLiquid | I made a little draft for what static typing will look like in rod: https://termbin.com/rsvy |
17:45:18 | iLiquid | any suggestions? |
17:46:15 | iLiquid | or opinions? |
17:46:51 | * | nsf quit (Quit: WeeChat 2.4) |
17:47:03 | iLiquid | I'm still not quite sure if I should allow for user-defined operators or just lock them down to a small set of standard ones |
17:47:14 | I_Right_I | mratsim: I can see why. I think for game development nim is the perfect use case. And there's a large amount of game engines and libraries that have nim bindings. |
17:56:07 | * | rnrwashere quit (Remote host closed the connection) |
17:58:31 | * | rnrwashere joined #nim |
17:58:39 | * | cgfuh joined #nim |
17:59:25 | * | oculuxe joined #nim |
17:59:32 | * | oculux quit (Ping timeout: 246 seconds) |
18:04:19 | Araq | iLiquid, seems to be messy and ofc I dislike the Go influences :P |
18:05:30 | Araq | and why does the return type lose the ':'? |
18:08:07 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:09:28 | iLiquid | I thought the syntax is a little cleaner this way |
18:09:42 | * | lritter joined #nim |
18:09:53 | clyybber | iLiquid a bit more inconsistent though. |
18:10:03 | Araq | either use ':' or '->' for the return types |
18:10:21 | clyybber | Araq: Does this go remotely in the right direction towards fixing the bug?: https://hastebin.com/meditoxexu.php |
18:10:51 | * | arecacea1 quit (Remote host closed the connection) |
18:10:56 | Araq | clyybber, it's not at all what I have in mind |
18:11:03 | clyybber | thought so :D |
18:11:10 | clyybber | it also doesn't work :P |
18:11:19 | Araq | but it could be some precondition we need |
18:11:39 | clyybber | Araq: Well, atm it segfaults at the sons of RootObj.. |
18:12:03 | Araq | well not every type has 'sons' |
18:12:10 | * | arecacea1 joined #nim |
18:12:33 | Araq | and the type recursions in Nim's compiler always get messy because of 'case objects' |
18:13:12 | clyybber | Araq: But in the case the object doesn't have sons, shoulndt the for loop just run 0 times instead of segfaulting? |
18:13:37 | Araq | no. |
18:13:59 | Araq | the compiler API is not about crash prevention, it's about making you get it right |
18:14:55 | * | I_Right_I quit (Remote host closed the connection) |
18:15:55 | clyybber | Araq: Got it. I think it workss |
18:16:22 | clyybber | at least the snippet that didn't compile, compiles now... |
18:19:47 | clyybber | but we lose that overwrite optimization, and might possibly do unneccessary work... |
18:23:26 | * | narimiran_ joined #nim |
18:27:27 | * | narimiran quit (Ping timeout: 255 seconds) |
18:29:44 | clyybber | Araq: I have a PR up: https://github.com/nim-lang/Nim/pull/11036 |
18:30:02 | clyybber | what approach *did* you have in mind though? |
18:31:25 | * | rnrwashere quit (Remote host closed the connection) |
18:32:51 | * | rnrwashere joined #nim |
18:36:33 | * | Vladar quit (Remote host closed the connection) |
18:43:18 | * | fanta7531 quit (Quit: fanta7531) |
18:45:39 | * | rnrwashere quit (Remote host closed the connection) |
18:53:37 | * | rockcavera quit (Read error: Connection reset by peer) |
18:53:55 | * | rockcavera joined #nim |
18:54:02 | Araq | clyybber, as I said, when t.destructor == nil, canon(t) and look it up |
18:54:43 | * | rnrwashere joined #nim |
18:56:09 | * | rockcavera quit (Remote host closed the connection) |
18:56:49 | * | rockcavera joined #nim |
18:58:10 | * | crem quit (Ping timeout: 268 seconds) |
18:59:39 | * | crem joined #nim |
19:17:19 | * | narimiran_ quit (Ping timeout: 264 seconds) |
19:22:54 | clyybber | Araq: Ah, ok |
19:23:55 | * | lritter quit (Ping timeout: 264 seconds) |
19:24:03 | * | I_Right_I joined #nim |
19:35:45 | * | nsf joined #nim |
19:39:46 | * | ng0 quit (Remote host closed the connection) |
19:41:00 | * | ng0 joined #nim |
19:41:08 | * | rnrwashere quit (Remote host closed the connection) |
19:44:32 | * | [rg] joined #nim |
19:45:18 | * | shomodj joined #nim |
19:51:00 | * | Trustable quit (Remote host closed the connection) |
19:55:04 | * | rnrwashere joined #nim |
19:56:41 | * | nsf quit (Quit: WeeChat 2.4) |
20:04:16 | * | jjido joined #nim |
20:09:28 | * | rnrwashere quit (Remote host closed the connection) |
20:12:31 | * | kapil____ quit (Quit: Connection closed for inactivity) |
20:12:39 | * | rnrwashere joined #nim |
20:22:22 | clyybber | Araq: I tried out some different approaches, and have concluded that the one simply canonalizing all subtypes is probably the best one. |
20:22:45 | clyybber | It's actually faster than checking for t.destructor == nil in my test case. |
20:23:31 | clyybber | but that test case is also fairly small. |
20:36:18 | * | onionhammer quit (Quit: WeeChat 1.9.1) |
20:50:28 | * | rnrwashe_ joined #nim |
20:54:03 | * | rnrwashere quit (Ping timeout: 250 seconds) |
20:59:45 | * | rnrwashe_ quit (Remote host closed the connection) |
21:06:13 | * | smitop joined #nim |
21:16:46 | * | al_ joined #nim |
21:17:05 | * | al_ quit (Client Quit) |
21:34:25 | * | cgfuh quit (Quit: WeeChat 2.3) |
21:38:36 | * | rnrwashere joined #nim |
21:42:15 | * | iLiquid quit (Quit: iLiquid) |
21:42:57 | * | rnrwashere quit (Ping timeout: 250 seconds) |
22:10:34 | * | solitudesf quit (Ping timeout: 268 seconds) |
22:28:36 | * | [rg] quit (Quit: Leaving.) |
22:29:45 | * | [rg] joined #nim |
22:30:05 | * | clyybber quit (Quit: WeeChat 2.4) |
22:32:45 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:33:39 | * | krux02 quit (Remote host closed the connection) |
23:08:55 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:09:09 | * | stefanos82 quit (Remote host closed the connection) |
23:18:30 | * | vlad1777d quit (Remote host closed the connection) |
23:20:45 | * | vlad1777d joined #nim |
23:21:47 | * | shomodj joined #nim |
23:33:12 | FromDiscord | <treeform> For the nim GC, will it ever give back memory back to the operating system (so that other processes could use it)? Or will it just accumulate memory in the `getFreeMem()` region? |
23:40:16 | FromDiscord | <treeform> According to this post its a NO: https://forum.nim-lang.org/t/4386#27396 |
23:40:52 | FromDiscord | <treeform> "Freed" memory goes back to the allocator not the OS. |
23:48:08 | * | shomodj quit (Ping timeout: 246 seconds) |
23:48:55 | * | ng0 quit (Quit: Alexa, when is the end of world?) |