00:02:52 | * | oculux joined #nim |
00:05:49 | * | EastByte joined #nim |
00:05:49 | * | voltist joined #nim |
00:05:49 | * | silvernode[m] joined #nim |
00:05:49 | * | OMGOMG joined #nim |
00:08:22 | * | bung joined #nim |
00:12:52 | * | bung quit (Ping timeout: 256 seconds) |
00:29:11 | FromDiscord | <dayl1ght> is it possible to tell nim not to copy an object? |
00:29:31 | disruptek | who are you people? |
00:29:53 | FromDiscord | <dayl1ght> e.g. if I have `type Person = object`, and an `array[10, Person]`, I'd like to do `let person = people[0]; person.name = "abc"` |
00:30:07 | FromDiscord | <dayl1ght> and have that mutate the people array instead of copying to a new variable |
00:31:15 | disruptek | use a ref. |
00:31:28 | disruptek | ~manual |
00:31:28 | disbot | manual: 11the Nim Manual is https://nim-lang.org/docs/manual.html -- disruptek |
00:32:37 | FromDiscord | <dayl1ght> doesn't a ref imply a heap allocation |
00:33:45 | disruptek | use a pointer, then. |
00:34:24 | disruptek | i don't know anyone named abc and i'm suspicious of this code. |
00:34:39 | disruptek | what are you making? |
00:37:59 | FromDiscord | <dayl1ght> How is that suspicious, it seems pretty standard to me |
00:38:23 | FromDiscord | <dayl1ght> I have a list of stack-allocated values and I want to mutate one of them |
00:38:49 | disruptek | use a ptr or a template. |
00:41:11 | FromDiscord | <dayl1ght> a template? |
00:41:29 | FromDiscord | <dayl1ght> sent a code paste, see https://play.nim-lang.org/#ix=2zqC |
00:41:32 | disruptek | it's like a hygienic c macro. |
00:41:34 | FromDiscord | <dayl1ght> I basically want to this, but in nim |
00:41:36 | FromDiscord | <dayl1ght> to do* |
00:42:11 | FromDiscord | <dayl1ght> do you mean a template that takes the addr, mutates that and then returns it? |
00:42:37 | disruptek | template person: Person = people[0] ... person.name = "cher" |
00:43:07 | FromDiscord | <dayl1ght> ah interesting, I didn't know you could have templates inline like that |
00:43:14 | FromDiscord | <dayl1ght> thanks, that should work |
00:46:01 | FromDiscord | <dayl1ght> tbh this seems like a very standard usecase, I'm surprised templates are the best way to do this |
00:46:38 | disruptek | well, they are free and they work well to remove [0] from people's code that for some reason needs to remove [0]. |
00:46:53 | FromDiscord | <dayl1ght> e.g. if I have a bunch of assignments to fields of `someVariable.anotherVariable.yetAnotherVariable`, it's common to save `someVariable.anotherVariable.yetAnotherVariable` to a local and keep assigning that |
00:47:12 | FromDiscord | <dayl1ght> I don't need to remove [0], I need nim not to copy the value |
00:47:25 | FromDiscord | <Elegant Beef> yea you can doβ΅`let a = person[0].unsafeaddr` |
00:47:54 | disruptek | use a ptr if you really want to add a variable to your program. |
00:48:03 | FromDiscord | <Elegant Beef> As was said you can do it with pointers **or** templates |
00:48:45 | disruptek | it's hard to help when the actual goal is secret. |
00:49:01 | disruptek | but beef'll keep tryin'. |
00:49:12 | FromDiscord | <exelotl> @dayl1ght there's a {.byaddr.} pragma coming soon that does exactly what you want: https://github.com/nim-lang/Nim/pull/13508 |
00:49:13 | disbot | β₯ new syntax for lvalue references: `var b {.byaddr.} = expr` ; snippet at 12https://play.nim-lang.org/#ix=2mVU |
00:49:15 | FromDiscord | <dayl1ght> eh the goal is basically what I said |
00:49:16 | FromDiscord | <Elegant Beef> Hey i know nothing, i just spew bullshit π |
00:49:21 | FromDiscord | <dayl1ght> sent a code paste, see https://play.nim-lang.org/#ix=2zqF |
00:49:34 | FromDiscord | <dayl1ght> I don't want to have to keep repeating self.frames multiple times |
00:49:52 | disruptek | i prefer templates because they are free. |
00:50:16 | FromDiscord | <Elegant Beef> You're free |
00:50:22 | disruptek | the semantics can be a little less... firm, though. just like me. |
00:51:02 | FromDiscord | <dayl1ght> @exelotl yeah that looks exactly like what I want |
00:52:41 | FromDiscord | <exelotl> in your code above you should be able to use `addr` instead of `unsafeAddr` because the thing that you're taking the address of is mutable, being a `var` parameter |
00:53:02 | FromDiscord | <exelotl> templates are a decent solution too I guess. You might be lucky and find that the C compiler is able to optimise the repeated expansion |
00:53:11 | FromDiscord | <Elegant Beef> The only reason i said unsafeaddr was it said `let` earlier |
00:54:10 | FromDiscord | <exelotl> another fun solution I found to this problem is using an iterator that yields a `var` result:β΅https://gist.github.com/exelotl/ef2507c58b4f81c74a197f99c56b9bd5 |
00:54:43 | FromDiscord | <Yardanico> hacktioberfest did an update against spammy people https://hacktoberfest.digitalocean.com/hacktoberfest-update |
00:54:55 | FromDiscord | <Yardanico> " As of 2pm PST on October 1, at least 4% of pull requests from Hacktoberfest participants have been marked βinvalidβ or βspam.β" |
00:55:05 | FromDiscord | <dayl1ght> thanks, I'll try pointers first and if it's too cumbersome I'll use a template |
00:58:21 | * | abm quit (Read error: Connection reset by peer) |
01:23:13 | * | arecacea1 quit (Remote host closed the connection) |
01:23:36 | * | arecacea1 joined #nim |
01:36:35 | * | Tanger joined #nim |
01:47:07 | * | apahl quit (Ping timeout: 240 seconds) |
01:49:22 | * | apahl joined #nim |
02:09:15 | * | bung joined #nim |
02:13:27 | * | bung quit (Ping timeout: 240 seconds) |
02:30:49 | * | bung joined #nim |
02:36:20 | Prestige | Noob template question, is it possible/how do I do this? https://play.nim-lang.org/#ix=2zqT |
02:40:42 | Prestige | just found https://forum.nim-lang.org/t/3342 |
02:56:47 | * | muffindrake quit (Ping timeout: 240 seconds) |
02:59:08 | * | muffindrake joined #nim |
02:59:40 | FromDiscord | <Elegant Beef> So did you find your answer? |
02:59:58 | Prestige | I suppose what Araq posted is the best solution for now |
03:00:16 | Prestige | Although I wish I could use : as a proc name :P |
03:15:01 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
03:21:09 | * | EastByte quit (*.net *.split) |
03:21:09 | * | voltist quit (*.net *.split) |
03:21:09 | * | silvernode[m] quit (*.net *.split) |
03:21:09 | * | OMGOMG quit (*.net *.split) |
03:27:22 | * | vqrs quit (Ping timeout: 260 seconds) |
03:28:56 | * | vqrs joined #nim |
03:30:21 | * | vicfred quit (Quit: Leaving) |
03:38:08 | * | vicfred joined #nim |
03:49:01 | * | EastByte joined #nim |
03:49:01 | * | voltist joined #nim |
03:49:01 | * | silvernode[m] joined #nim |
03:49:01 | * | OMGOMG joined #nim |
03:49:05 | * | apahl quit (Ping timeout: 272 seconds) |
03:49:40 | * | apahl joined #nim |
04:06:02 | * | supakeen quit (Quit: WeeChat 2.9) |
04:06:37 | * | supakeen joined #nim |
04:27:45 | * | narimiran joined #nim |
04:31:54 | * | zielmicha__ quit (Ping timeout: 256 seconds) |
04:32:03 | * | zielmicha__ joined #nim |
05:18:42 | * | solitudesf joined #nim |
05:19:22 | * | Tanger quit (Quit: Leaving) |
05:24:05 | * | gangstacat quit (Ping timeout: 272 seconds) |
05:41:47 | * | thomasross quit (Ping timeout: 240 seconds) |
06:09:00 | * | NimBot joined #nim |
06:11:23 | * | leorize quit (Ping timeout: 240 seconds) |
06:12:22 | * | letto quit (Quit: Konversation terminated!) |
06:12:24 | FromDiscord | <Yardanico> Well it's too ambiguous |
06:13:21 | Prestige | Yeah, it is. Just wish it were possible, but I decided on || |
06:14:16 | * | letto joined #nim |
06:15:19 | * | PMunch joined #nim |
06:21:25 | * | JustASlacker joined #nim |
06:26:23 | * | JustASlacker quit (Ping timeout: 256 seconds) |
06:29:04 | * | leorize joined #nim |
06:35:41 | PMunch | leorize, hi, I see you mentioned nimlsp and semantic highlighting yesterday |
06:35:57 | PMunch | I started implementing it, but the spec is still not finalised so I put it on ice for a little while |
06:36:51 | leorize[m]1 | PMunch: I thought they pushed out a formal draft as part of the next version of lsp recently? |
06:37:21 | PMunch | Oh they did? |
06:37:29 | PMunch | I haven't been following the development of this |
06:41:17 | PMunch | Huh, neel looks pretty interesting |
06:42:23 | leorize[m]1 | PMunch: https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#textDocument_semanticTokens |
06:43:52 | * | gangstacat joined #nim |
06:44:51 | PMunch | Oh cool |
06:44:59 | PMunch | Maybe it's finally time to implement this then |
06:45:39 | PMunch | If anyone wants to help out we need a mapping from the output of Nimsuggest to the symbol kinds defined here |
07:15:25 | Prestige | Exciting stuff |
07:16:54 | FromDiscord | <Elegant Beef> I could grab markers to draw a map, i've got crayons too! |
07:18:41 | PMunch | Hmm, I'm looking at docopt and trying to find a way to get proc registration to work.. |
07:19:20 | FromDiscord | <Elegant Beef> This is were i say "i'm a big numpty so i can clap and pretend to help" |
07:19:31 | PMunch | I mean it returns a `Table[string, Value]` so it should be possible to create the whole register actions system separate from docopts |
07:20:04 | PMunch | Problem is that you can have sub-commands, not entirely sure how that would work |
07:20:36 | PMunch | Looking at the naval_fate example, what would the procedures look like? https://github.com/docopt/docopt.nim |
07:28:45 | * | Trustable joined #nim |
07:31:47 | FromDiscord | <pietroppeter> Prestige have a look at https://github.com/mattaylor/elvis it seems Araq's implementation taken a bit further adding truthy and falsy logic (which might not what you want) |
07:35:08 | * | Trustable quit (Remote host closed the connection) |
07:41:26 | FromDiscord | <Recruit_main707> whats the difference between nimsuggest and idetools? |
07:41:35 | FromDiscord | <Recruit_main707> is idetools outdated? |
07:44:18 | Araq | my implementation? |
07:44:29 | Araq | of what? |
07:45:29 | * | mmohammadi9812 joined #nim |
07:45:35 | Araq | ah never mind |
07:48:26 | FromDiscord | <pietroppeter> (you probably alright got it, implementation of ternary operator from a 2017 forum post: first commit in elvis repo actually references that forum post) |
07:48:55 | PMunch | Sorry, the playground is down for maintenance |
07:49:56 | FromDiscord | <pietroppeter> (and I discovered today where does the name come from https://en.wikipedia.org/wiki/Elvis_operator ) |
07:51:08 | FromDiscord | <Clyybber> lol, thats neat |
07:51:38 | FromDiscord | <pietroppeter> I hope it is not the PR on markdown that put playground down π₯Ί |
07:53:07 | PMunch | Haha, well not only that :P |
07:53:20 | PMunch | I went to rebuild all the images, and the VPS ran out of disk space |
07:53:37 | PMunch | So now I'm just cleaning it out and will rebuild everything |
07:54:24 | FromDiscord | <Elegant Beef> This reminds me, how do you do the tutorializing through nim playground, i know it can do guided shit, but dont recall how to set it up? |
07:55:43 | PMunch | @Elegant, this should explain it: https://github.com/PMunch/nimtours |
07:58:09 | FromDiscord | <pietroppeter> ok good, I am relieved... btw thanks a ton for the playground. I love it, it is a really great service! the thing I love most is the fact that I can code nim on the phone π |
07:59:09 | PMunch | @Elegant, here is the example tour from GitHub: https://play.nim-lang.org/#tour=https://raw.githubusercontent.com/PMunch/nimtours/master/example.html |
08:00:01 | PMunch | @pietroppeter, thanks :) It wasn't me who created it initially, but I have rewritten big chunks of it after I took over maintaining it |
08:00:44 | FromDiscord | <Elegant Beef> Yea it's nice |
08:02:29 | Araq | PMunch, are you removing support for older Nims? |
08:02:42 | PMunch | Araq, wasn't planning on it, why? |
08:02:48 | * | Vladar joined #nim |
08:03:54 | Araq | to save disk space |
08:05:20 | PMunch | Eh, they don't really take up that much space |
08:05:36 | PMunch | The issue is that docker isn't cleaning up properly after itself |
08:07:30 | Araq | maybe Golang needs destructors, they make cleanups easier |
08:22:37 | FromDiscord | <Recruit_main707> the lsp repo has stalled a bit, is it still developed PMunch? |
08:29:53 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
08:40:02 | Araq | Ruby got a rightward assignment operator :-) |
08:40:13 | Araq | fib(10) => x |
08:40:49 | Araq | I might want that for Nim too... |
08:40:58 | Araq | f(x, y) = let a |
08:41:25 | Araq | maybe too weird though |
08:41:52 | PMunch | Recruit_main707, yeah I'm still developing it |
08:41:57 | Araq | but it's got others finally noticed all PLs got the assignment syntax wrong |
08:42:02 | Araq | *it's good |
08:42:11 | FromDiscord | <Vindaar> or do it like R and have both `->` and `<-` both doing what one expects |
08:42:12 | PMunch | Currently it's more in a state of maintenance, but I have plans to implement new features |
08:42:25 | PMunch | And you're more than welcome to help out if you like :) |
08:43:23 | Araq | and Ruby got endless method definitions |
08:43:47 | Araq | you can never read them completely, they are endless |
08:44:11 | FromDiscord | <Varriount> Araq: While it might be philosophically correct, breaking widespread convention is rarely accepted well |
08:44:16 | FromDiscord | <Elegant Beef> What do you mean got the syntax wrong? `a = b` a is b π |
08:44:26 | Araq | pretty nice. Infinite code can be more maintainable in the long run |
08:46:10 | Araq | Beef: first you evaluate f(x, y) and then you store the result somewhere |
08:46:58 | FromDiscord | <Varriount> Araq: There are times where I feel like Nim is this convoluted gadget that does 20 things in 30 different ways. |
08:47:46 | Araq | there are times where I feel like you're a troll. |
08:48:45 | FromDiscord | <Elegant Beef> Well with the let ketword it gets weird since it reads as "let 'a' equal result of proc" vs. "result of proc equals let a" although im just thinking of this more mathematically than anything else |
08:49:12 | Araq | what 20 things do we do in 30 different ways? |
08:49:35 | FromDiscord | <Elegant Beef> The whole "left hand is the unknown" is all i can think about when doing assignment |
08:51:51 | FromDiscord | <Varriount> Well, if I'm a troll, then I don't see how any answer I give could be considered constructive. |
08:51:54 | * | natrys joined #nim |
08:52:02 | Araq | Python: special syntax for 'if' expressions. Nim lacks it, it unified 'if' instead. |
08:52:12 | Araq | Go: special syntax for ':='. Nim lacks it |
08:52:24 | Araq | are Python and Go convoluted gadgets too then? |
08:54:57 | PMunch | @Varriount, I think he just meant that the statement is similar to what trolls normally make |
08:55:03 | * | Vladar quit (Quit: Leaving) |
08:56:05 | Araq | Varriount: I know you're not a troll but indeed I see how anything constructive can come after "20 things in 30 different ways" |
08:56:14 | Araq | * I cannot see |
09:06:28 | PMunch | Hmm, how can I check if every boolean in an array is true? |
09:07:30 | FromDiscord | <Elegant Beef> Cast to N number of ints check if `int.high and cast[0]` is `int.high` then question why i responded |
09:10:21 | PMunch | Haha, so far I went with foldl from sequtils |
09:16:08 | FromDiscord | <Rika> isnt there an `allIt` template in sequtils |
09:16:24 | PMunch | Oh right, there is |
09:17:57 | PMunch | Hmm, `name = args[argIt].to[string]()`: Error: cannot instantiate: 'T' |
09:18:22 | PMunch | `to` is defined as: proc to[T](v: Value): T |
09:23:40 | Araq | args[argIt].to[:string]() |
09:24:01 | Araq | maybe :-) |
09:24:55 | PMunch | Aah, that seems to work |
09:27:46 | FromDiscord | <lqdev> PMunch: `args[argIt].to[:string]()` |
09:29:27 | FromDiscord | <Rika> ar/q already said that |
09:31:11 | * | abm joined #nim |
09:33:18 | PMunch | Hmm, I have a procedure and I want to iterate over its arguments. With `getImpl` it groups `x, y: int` into a single IdentDef, is there a way to get a version where it is split? |
09:49:35 | Araq | not as far as I know |
09:51:48 | FromDiscord | <lqdev> @Rika ircord truncated it to `args[argIt].to` |
09:52:02 | FromDiscord | <Rika> no |
09:52:09 | FromDiscord | <lqdev> uh? |
09:52:24 | FromDiscord | <Rika> its `args[argIt].to:string` tho |
09:52:44 | FromDiscord | <lqdev> https://media.discordapp.net/attachments/371759389889003532/761526070155280385/Screenshot_20201002_115235.jpg |
09:52:55 | FromDiscord | <lqdev> that's what i'm seeing |
09:53:04 | FromDiscord | <Rika> https://media.discordapp.net/attachments/371759389889003532/761526146818375700/unknown.png |
09:53:08 | FromDiscord | <lqdev> wait, maybe it interpreted it as a link? |
09:53:22 | FromDiscord | <lqdev> ominous. |
09:53:36 | FromDiscord | <Rika> spooky |
09:53:49 | FromDiscord | <lqdev> it's spooktober after all |
09:56:07 | PMunch | http://ix.io/2zsJ what do you think about this? Should I PR it to docopt? |
09:57:18 | PMunch | Silly Discord trying to parse text :P |
09:58:21 | FromDiscord | <lqdev> @Rika ok on my PC it looks loke yours |
09:58:24 | FromDiscord | <lqdev> (edit) 'loke' => 'like' |
10:01:16 | * | krux02 joined #nim |
10:04:35 | FromDiscord | <Vindaar> @PMunch: yeah, do it! Although I fear what the reception might look like |
10:06:01 | PMunch | Why? It doesn't change anything for current docopt usage, but allows easier calling/unpacking |
10:06:08 | PMunch | I just need to add a better failure mode |
10:13:05 | FromDiscord | <Vindaar> because as far as I remember the author wasn't willing to change the code in the past. Their opinion was that it is a straight up port of docopt. I hope I'm wrong though |
10:13:26 | PMunch | I mean this could also be implemented as a separate library |
10:13:34 | PMunch | So if he doesn't want it I'll just make it a separate thing |
10:13:57 | FromDiscord | <Vindaar> At least personally I'd find that nice π (if they don't want it) |
10:16:42 | PMunch | Hmm... https://play.nim-lang.org/#ix=2zsV |
10:16:55 | PMunch | (just manually set the version and it will compile) |
10:17:01 | PMunch | (The latest tag is broken atm) |
10:18:16 | FromDiscord | <Vindaar> what do you want to use that for? |
10:18:17 | PMunch | Nvm, fixed the latest tag (or rather I just set it to the latest version that was built) |
10:18:43 | PMunch | `macro dispatchProc(args: Table[string, Value], procedure: proc, conditions: static[seq[string]] = @[]): untyped` |
10:18:48 | PMunch | Well that's my actual signature |
10:19:00 | FromDiscord | <Vindaar> ah |
10:19:05 | PMunch | If you don't supply conditions I will just turn the procedure name into a condition |
10:19:49 | PMunch | So instead of `args.dispatchProc(myCommand, @["myCommand"])` you could just do `args.dispatchProc(myCommand)` |
10:19:49 | FromDiscord | <Vindaar> why not make it `static[varargs[string]]`? |
10:20:14 | PMunch | Guess I could |
10:20:22 | PMunch | But that's still a weird bug |
10:21:32 | FromDiscord | <Vindaar> I guess it is. But I think I've seen something like this mentioned befor |
10:31:45 | PMunch | Hmm, has discardable been removed? |
10:32:32 | * | dv-^_^61 joined #nim |
10:32:35 | FromDiscord | <lqdev> no |
10:34:41 | PMunch | This doesn't work in my macro: http://ix.io/2zsZ |
10:34:52 | PMunch | I guess it's because that is a closure? |
10:35:01 | * | dv-^_^6 quit (Ping timeout: 264 seconds) |
10:38:41 | FromDiscord | <lqdev> probably |
10:38:42 | FromDiscord | <lqdev> wtf nimsuggest |
10:38:57 | FromDiscord | <lqdev> i just saw my RAM usage rapidly grow to 16GiB |
10:40:08 | FromDiscord | <Vindaar> gotta buy more ram! |
10:43:38 | FromDiscord | <lqdev> is this electron? |
10:44:06 | FromDiscord | <Vindaar> nah, it's tau. Even more heavy on RAM. It's a feature! |
10:45:31 | FromDiscord | <whisperdev> Is nimsuggest the worst nim program? |
10:46:05 | FromDiscord | <Vindaar> on a serious note: no, it just has a few annoying bugs |
10:46:08 | FromDiscord | <Recruit_main707> does anyone know how to set up a lsp in komodo? |
10:47:19 | * | Vladar joined #nim |
10:47:19 | FromDiscord | <whisperdev> Why is Nim so slow with JSON? π¦ |
10:47:48 | PMunch | Is it possible to create a macro that returns a block that can either return a value or not? |
10:48:09 | PMunch | @whisperdev, what do you mean? |
10:48:18 | FromDiscord | <Vindaar> PMunch: well, you can't do that normally either right? How could a macro do it then? |
10:48:29 | FromDiscord | <whisperdev> @PMunch Just checked Kostya's benchmarks |
10:48:39 | * | Trustable joined #nim |
10:48:52 | FromDiscord | <Clyybber> and nobody seems to have small reproducable examples to show the nimsuggest bugs :D |
10:49:46 | FromDiscord | <flywind> `nimsuggest` is really annoying in recently days |
10:50:08 | PMunch | @Vindaar, well you can with a {.discardable.} procedure.. |
10:50:32 | PMunch | @whisperdev, link? |
10:50:44 | FromDiscord | <Vindaar> I suppose this: https://github.com/kostya/benchmarks#json |
10:51:04 | FromDiscord | <Vindaar> PMunch: oh, never considered that |
10:55:50 | FromDiscord | <lqdev> @Clyybber the problem is that nimsuggest only starts being super annoying when your project grows |
10:55:59 | FromDiscord | <lqdev> it's fine on small projects |
10:56:39 | * | mmohammadi98120 joined #nim |
10:57:39 | FromDiscord | <Rika> @whisperdev its not the language that is slow but the implementation |
10:57:49 | FromDiscord | <Rika> of json parsing or w/e |
10:58:25 | * | mmohammadi9812 quit (Ping timeout: 264 seconds) |
10:58:33 | FromDiscord | <whisperdev> @Rika The user only cares about the library that they can use to do stuff π |
10:58:46 | FromDiscord | <lqdev> lmao i know why it's so fucking slow |
10:58:56 | FromDiscord | <lqdev> https://github.com/kostya/benchmarks/blob/7c13e9221c4e58f95151864b5db87363a38734b2/common/commands.mk#L24 |
10:59:04 | FromDiscord | <lqdev> they aren't compiling with -d:danger |
10:59:08 | FromDiscord | <lqdev> :DDDDD |
10:59:19 | FromDiscord | <whisperdev> It's interesting that serde typed is faster than simdjson |
10:59:21 | FromDiscord | <lqdev> that's an unfair comparison |
10:59:25 | FromDiscord | <Rika> well is d:danger https://github.com/kostya/benchmarks/blob/7c13e9221c4e58f95151864b5db87363a38734b2/common/commands.mk#L4 |
10:59:27 | FromDiscord | <Vindaar> there's that line though: https://github.com/kostya/benchmarks/blob/7c13e9221c4e58f95151864b5db87363a38734b2/common/commands.mk#L4 |
10:59:28 | FromDiscord | <Rika> oops |
10:59:32 | FromDiscord | <Rika> (edit) removed 'well is d:danger' |
10:59:33 | FromDiscord | <lqdev> oh there |
10:59:37 | FromDiscord | <lqdev> didn't see it |
11:00:07 | FromDiscord | <Rika> its interesting that they separated nim flags but not rust flags or others |
11:00:12 | * | mmohammadi9812 joined #nim |
11:00:12 | FromDiscord | <Rika> wonder why they did so |
11:00:31 | FromDiscord | <whisperdev> I think Yardanico committed the packedjson and danger/arc |
11:00:47 | FromDiscord | <lqdev> idk why there's an extra --opt:speed in the nim flags |
11:00:54 | FromDiscord | <lqdev> -d:danger implies that |
11:01:20 | FromDiscord | <whisperdev> because people dont know...too many flags π |
11:01:31 | FromDiscord | <lqdev> regardless, i do agree it's quite slow. |
11:01:45 | FromDiscord | <lqdev> right now i'm using std/json to parse tiled tilemaps |
11:01:51 | FromDiscord | <Rika> ar/q explained why its slow a lot of times in this channel |
11:01:55 | FromDiscord | <lqdev> hopefully it won't become too much of a bottleneck |
11:02:08 | FromDiscord | <lqdev> @Rika link? |
11:02:12 | FromDiscord | <lqdev> or quote |
11:02:23 | * | mmohammadi98120 quit (Ping timeout: 265 seconds) |
11:02:24 | FromDiscord | <Rika> no idea, its been a long time already |
11:02:30 | planetis[m] | there is https://github.com/OpenSystemsLab/jsmn.nim but haven't used it |
11:02:32 | FromDiscord | <Rika> but i just remember them explaining |
11:03:19 | * | mmohammadi98126 joined #nim |
11:03:52 | FromDiscord | <whisperdev> so why is it slow? araq cant code? (/s) |
11:04:02 | planetis[m] | ...and the accompanying https://github.com/OpenSystemsLab/sam.nim |
11:05:06 | * | abm quit (Ping timeout: 256 seconds) |
11:05:34 | * | mmohammadi9812 quit (Ping timeout: 272 seconds) |
11:08:14 | * | mmohammadi98126 quit (Ping timeout: 260 seconds) |
11:10:46 | PMunch | Hmm, it's not pretty, but it works.. http://ix.io/2ztb |
11:11:33 | FromDiscord | <lqdev> PMunch: making an RTS? |
11:11:47 | * | waleee-cl joined #nim |
11:16:24 | PMunch | Haha, no the stuff there is just the example from docopt |
11:16:45 | Araq | it's slow because it also has to work at compile-time |
11:16:49 | * | abm joined #nim |
11:17:21 | Araq | and nobody optimized it to use SSE, started to work on it but then got distracted |
11:18:02 | Araq | if you need speed, use a binary format, you also avoid the clusterfuck of imprecise floating point parsing this way |
11:20:46 | FromDiscord | <lqdev> good idea |
11:20:57 | FromDiscord | <lqdev> but tiled doesn't have a binary export format :( |
11:21:03 | FromDiscord | <lqdev> maybe i can create a converter script though |
11:27:53 | * | a_b_m joined #nim |
11:29:48 | PMunch | http://ix.io/2zto/nim |
11:29:53 | PMunch | I think I'm happy with this now |
11:31:24 | * | abm quit (Ping timeout: 256 seconds) |
11:38:17 | * | a__b__m joined #nim |
11:41:17 | * | a_b_m quit (Ping timeout: 246 seconds) |
11:41:17 | * | bung quit (Ping timeout: 246 seconds) |
12:02:22 | PMunch | If you guys want to show support -> https://github.com/docopt/docopt.nim/pull/51 |
12:02:22 | disbot | β₯ Add procedure dispatch module |
12:06:02 | * | supakeen quit (Quit: WeeChat 2.9) |
12:06:35 | * | supakeen joined #nim |
12:12:03 | * | bung joined #nim |
12:16:35 | * | bung quit (Ping timeout: 260 seconds) |
12:17:47 | * | gangstacat quit (Ping timeout: 240 seconds) |
12:22:02 | Araq | 1.4 is finished, I think |
12:22:17 | Araq | no showstopper bugs left |
12:22:30 | FromDiscord | <lqdev> whaaat |
12:22:35 | PMunch | Ooh, any cool new features? |
12:23:27 | Araq | gc:orc, strict funcs, view types |
12:23:49 | FromDiscord | <Rika> nice, congrats |
12:23:54 | Araq | but don't expect view types to work :-) |
12:23:57 | FromDiscord | <lqdev> i guess IC is a 1.6 feature then? |
12:24:02 | Araq | yep |
12:24:08 | FromDiscord | <lqdev> also what about your new concepts RFC impl? |
12:24:19 | Araq | new concepts are for 2021 |
12:24:30 | FromDiscord | <lqdev> mmkay |
12:24:44 | FromDiscord | <lqdev> can't wait |
12:25:03 | Araq | well you can contribute, my concepts impl is well documented |
12:28:11 | * | arecacea1 quit (Read error: Connection reset by peer) |
12:28:35 | * | arecacea1 joined #nim |
12:28:38 | supakeen | orc? |
12:28:54 | FromDiscord | <mratsim> And my axe! |
12:31:43 | * | dv-^_^619 joined #nim |
12:35:30 | * | dv-^_^61 quit (Ping timeout: 272 seconds) |
12:40:58 | Araq | next version will be named 'Uruk' |
12:44:17 | FromDiscord | <exelotl> Is there any chance that a fix for https://github.com/nim-lang/Nim/issues/15428 could make it into 1.4 ? π
|
12:44:20 | disbot | β₯ Wrong codegen with openArray ; snippet at 12https://play.nim-lang.org/#ix=2zud |
12:45:09 | Araq | tried, it requires a non-trivial and hence risky refactoring |
12:45:22 | Araq | better done for 1.4.2 |
12:46:06 | FromDiscord | <exelotl> Ah ok, that's fair :) |
12:46:18 | Araq | mratsim: I cannot reproduce |
12:46:33 | Araq | https://github.com/nim-lang/RFCs/issues/257 |
12:46:35 | disbot | β₯ Noinline and/or Addressable consts ; snippet at 12https://play.nim-lang.org/#ix=2zuj |
12:46:49 | Araq | the compiler doesn't duplicate large const arrays for my toy example |
12:47:19 | Araq | it produces e.g. extern NIM_CONST tyArray__9cFSACijKI7Pz9b3NAOxFR9bw myarr__16fupmXehsHjrCLAZF0diw |
12:47:30 | Araq | which is exactly what you want it to generate |
12:47:51 | Araq | is your RFC about allowing 'unsafeAddr' for these? |
13:12:56 | leorize[m]1 | anyone here got windows? I need someone to help me debug something with git. |
13:18:30 | Araq | I'm on Windows but busy |
13:18:40 | Araq | what do you want to know? |
13:19:22 | leorize | can you clone c2nim then run: `git -C <absolute windows path to c2nim> rev-parse --show-cdup`? |
13:19:33 | leorize | please also run the command on `cmd.exe` |
13:20:43 | leorize | (also why do we bundle c2nim with windows release tarball?) |
13:21:01 | Araq | historical reasons I think |
13:22:00 | Araq | fun fact: if you compile 'of b:' ('if' misspelt) with Nim devel it takes up *all* of your RAM and dies with OOM |
13:22:15 | Araq | and OSes in 2020 cannot handle that, swap, crash and burn |
13:22:29 | disruptek | only your os. |
13:22:51 | Araq | Linux did the same, back then when I still used Linux |
13:23:04 | Araq | but alright |
13:23:18 | Araq | Windows in 2020 cannot handle that. ffs... |
13:23:35 | disruptek | eh i don't use swap. |
13:24:00 | Araq | I expect the swapping to work |
13:24:22 | Prestige | temped to try it |
13:24:28 | Prestige | tempted* |
13:24:32 | PMunch | Hmm, ditto |
13:24:42 | disruptek | in 1991 when i had 4mb of ram and it took all day to build the kernel, i could run navigator in x. go figure. |
13:25:48 | PMunch | Okay, playground is done rebuilding all of the images now :) |
13:27:00 | disruptek | time to crash the playground with `of`. |
13:27:51 | Araq | 1.2 is fine I think |
13:28:22 | leorize | Araq: linux got that fixed now :P they basically make the oom killer an userspace app lol |
13:29:28 | leorize | Araq: can you help me with running that command? I need to know the output so I can figure out why nightlies is failing |
13:29:54 | Araq | my computer is unresponsive... |
13:30:02 | Araq | I'm debugging this OOM |
13:30:27 | leorize | move to fedora 33 for debugging oom, they got a proper oom killer there now |
13:31:06 | Araq | can't use an OS that sounds like a hand lotion |
13:32:07 | leorize | lol |
13:32:51 | FromDiscord | <Broken insanity> hiβ΅how i can merge 2 lists into 1 alternating elements ? |
13:33:20 | Araq | it's ok, I use nimMaxHeap=4000 it works better, not really reliably, but better |
13:35:26 | Araq | leorize, the command produces nothing whatsoever |
13:36:09 | leorize[m]1 | Araq: ok that's what it's supposed to do |
13:36:16 | leorize[m]1 | then why is koch not working... |
13:36:37 | leorize[m]1 | can you remove `dist/c2nim` then run `./koch c2nim`? |
13:36:43 | PMunch | @Broken try zip in sequtils |
13:38:09 | disruptek | Araq: can you think of a reason we shouldn't move mangling into a single-source-of-truth ModuleGraph structure? it solves all my problems. |
13:38:37 | FromDiscord | <Broken insanity> thanks |
13:39:01 | Araq | disruptek, I tried to tell you for months now that the PSym.loc.r is the single source of truth as symbols are not duplicated |
13:39:16 | disruptek | but it's meaningless for conflict resolution. |
13:39:22 | Araq | (when a symbol is duplicated it has its own identity) |
13:40:41 | Araq | koch c2nim |
13:40:41 | Araq | deps.cmd: git clone -q https://github.com/nim-lang/c2nim.git C:\Users\rumpf\projects\nim\dist\c2nim |
13:40:43 | Araq | deps.cmd: git -C C:\Users\rumpf\projects\nim\dist\c2nim rev-parse --show-cdup |
13:40:44 | Araq | FAILURE: C:\Users\rumpf\projects\nim\dist\c2nim already exists but is not a git repo |
13:41:21 | Araq | the deps.cmd is making me nervous |
13:41:24 | leorize | I bet it's the CR-LF that's causing problem then |
13:41:34 | Araq | do we rely on batch scripts? |
13:42:04 | leorize | no |
13:43:01 | leorize | deps.cmd is just printing whatever we run |
13:55:17 | * | vicfred quit (Quit: Leaving) |
13:59:08 | FromDiscord | <mratsim> @Araq I think you used my "let ExpLut" instead of making it const |
13:59:10 | * | bung joined #nim |
13:59:34 | Araq | I think I know my 10 line test program and I used 'const' |
14:00:51 | Araq | I also read the C code generator's code, it does produce 'extern' for named constants |
14:01:09 | FromDiscord | <mratsim> mmmmh |
14:01:28 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
14:01:31 | FromDiscord | <mratsim> not on my usual machine but I'll give you some instructions to reproduce on Constantine |
14:01:39 | FromDiscord | <mratsim> give me 15min |
14:02:01 | Araq | maybe you use it in the VM with 'static T' and it loses the information that it was a named const |
14:04:39 | Araq | or maybe you expand it in multiple modules thanks to template overdoses |
14:15:52 | leorize[m]1 | Araq: can you apply this patch http://ix.io/2zuO then run `./koch c2nim`? I need some debugging data to be completely sure why it's not working |
14:19:57 | * | PMunch quit (Quit: leaving) |
14:25:33 | FromDiscord | <mratsim> @Araq https://github.com/nim-lang/RFCs/issues/257#issuecomment-702763701β΅β΅Adding info on how it's called. |
14:25:34 | disbot | β₯ Noinline and/or Addressable consts ; snippet at 12https://play.nim-lang.org/#ix=2zuj |
14:26:19 | * | waleee-cl joined #nim |
14:26:46 | * | arecacea1 quit (Read error: Connection reset by peer) |
14:27:21 | * | arecacea1 joined #nim |
14:29:56 | * | enthus1ast quit (Ping timeout: 240 seconds) |
14:30:20 | * | enthus1ast joined #nim |
14:32:10 | * | JustASlacker joined #nim |
14:32:55 | * | zielmicha__ quit (Ping timeout: 240 seconds) |
14:32:57 | * | JStoker quit (Ping timeout: 240 seconds) |
14:33:03 | * | zielmicha__ joined #nim |
14:35:08 | * | JStoker joined #nim |
14:35:55 | * | waleee-cl quit (Ping timeout: 240 seconds) |
14:37:21 | Araq | leorize[m]1, |
14:37:22 | Araq | DEBUG: cmd output: |
14:37:22 | Araq | DEBUG: cmd status: 0 |
14:37:59 | leorize | does it success? |
14:38:37 | leorize | if it doesn't then probably I'll have to add repr() to that output thingy to know exactly what's the problem... |
14:38:57 | Araq | status is 0, so success |
14:39:14 | leorize | I check if the output is empty also |
14:39:22 | leorize | I mean does the ./koch c2nim still erroring? |
14:39:27 | Araq | yes |
14:40:02 | leorize | can you add repr to the output so I can have a view on what's exactly in it? |
14:40:11 | leorize | the file is tools/deps.nim |
14:40:13 | Araq | 0000000002971EA0"\10" |
14:40:13 | Araq | "" |
14:40:14 | * | waleee-cl joined #nim |
14:40:18 | Araq | there is a newline in it |
14:40:32 | * | EastByte quit (*.net *.split) |
14:40:32 | * | voltist quit (*.net *.split) |
14:40:32 | * | silvernode[m] quit (*.net *.split) |
14:40:32 | * | OMGOMG quit (*.net *.split) |
14:40:34 | Araq | you need a strip call |
14:40:57 | * | EastByte joined #nim |
14:40:57 | * | voltist joined #nim |
14:40:57 | * | silvernode[m] joined #nim |
14:40:57 | * | OMGOMG joined #nim |
14:41:05 | Araq | <insert dirty joke here> |
14:41:17 | leorize | how come that is not a problem with linux... windows is weird |
14:41:28 | leorize | should be simple enough |
14:43:17 | * | l1x quit (Ping timeout: 246 seconds) |
14:43:48 | Araq | result = status == 0 and output.strip() == "" |
14:43:51 | Araq | does the trick |
14:44:09 | * | l1x joined #nim |
14:45:39 | * | ormiret quit (Ping timeout: 244 seconds) |
14:46:47 | * | disruptek throbs. |
14:47:24 | * | ormiret joined #nim |
14:50:06 | leorize | #15470 created |
14:50:06 | disbot | https://github.com/nim-lang/Nim/pull/15470 -- 3tools/deps: fix git dir check [backport:1.4] |
14:50:12 | leorize | thanks Araq for helping out |
14:51:04 | leorize | do you want me to remove c2nim from being bundled with windows zip as well? |
14:51:47 | leorize | c2nim commit is not pinned so it would not result in a deterministic build for windows |
14:53:57 | * | krux02 quit (Remote host closed the connection) |
14:55:48 | * | JustASlacker quit (Ping timeout: 256 seconds) |
14:57:41 | disruptek | does anyone know what problems, if any, exist with our zip wrapper? |
14:58:56 | Araq | leorize, hmm yeah, remove c2nim from our windows offer |
14:59:12 | Araq | disruptek, it doesn't work and I cannot fix it |
14:59:20 | disruptek | fair enough. |
15:08:19 | * | disruptek π what color is your mangle π what color β¬ oooh yeah β« baby |
15:17:47 | FromDiscord | <ache of head> π€ |
15:25:28 | FromDiscord | <Avatarfighter> What is up everyone |
15:25:31 | * | voltist quit (Ping timeout: 244 seconds) |
15:25:38 | FromDiscord | <Avatarfighter> What is new with you all |
15:25:51 | * | voltist joined #nim |
15:26:27 | FromGitter | <alehander92> oi |
15:32:25 | * | gangstacat joined #nim |
15:32:34 | FromDiscord | <dayl1ght> wow I get a huge difference with -d:release and without |
15:32:45 | FromDiscord | <dayl1ght> I wonder what's going on π€ |
15:32:46 | disruptek | weird. |
15:33:08 | FromDiscord | <dayl1ght> I'm using objects a lot, I assume -d:release is optimizing the copies? |
15:33:09 | FromDiscord | <Rika> there must be some optimisations happening for some reason |
15:33:28 | FromDiscord | <dayl1ght> like passing objects through procs a lot |
15:33:30 | FromDiscord | <Rika> no |
15:33:44 | FromDiscord | <Rika> optimisations in general are being applied |
15:33:49 | FromDiscord | <Rika> not just for objects or w/e |
15:34:27 | FromDiscord | <dayl1ght> right, optimizations in general, but it's weird to have such a huge difference in perf |
15:34:51 | FromDiscord | <Rika> no it is not |
15:35:05 | FromDiscord | <Rika> nim compiles debug by default |
15:35:29 | FromDiscord | <Rika> people can see something from around 2x performance increase to 10x or even more |
15:35:32 | FromDiscord | <Rika> depending on the program, of course |
15:35:44 | FromDiscord | <dayl1ght> eh it's more like over 100x lol |
15:35:50 | FromDiscord | <Rika> still normal |
15:35:51 | FromDiscord | <dayl1ght> I think there's something wrong with my program |
15:36:04 | FromDiscord | <Rika> perhaops |
15:36:08 | disruptek | Araq: supersnappy is a dep-free nim compression impl that works with arc and is 3x faster than frosty itself for my test data (~2.9mb json graph). compresses to 760k. |
15:36:26 | disruptek | (i propose to use this for ic) |
15:36:41 | FromDiscord | <dayl1ght> if I have a `type Something = object ... x: Table[int, int]` |
15:36:48 | * | casaca quit (Ping timeout: 244 seconds) |
15:36:55 | FromDiscord | <dayl1ght> and then a `proc mutateSomething(self: var Something) = something.intField = 0` |
15:37:06 | * | casaca joined #nim |
15:37:06 | FromDiscord | <dayl1ght> does calling mutateSomething copy the whole instance of `Something`? including the table? |
15:37:40 | FromDiscord | <Rika> no |
15:38:35 | FromDiscord | <dayl1ght> so `Something` is passed by reference? I thought `object`s were copied |
15:39:27 | * | nature joined #nim |
15:39:38 | FromDiscord | <mratsim> @dayl1ght all compiled languages: C, C++, Rust, Swift, D, Crystal have a default debug with no optimization and a release build with everything turned on |
15:40:09 | FromDiscord | <mratsim> Also objects bigger than 24 bytes (3 words on 64-bit) are passed by reference in the backend |
15:40:19 | FromDiscord | <dayl1ght> sent a code paste, see https://play.nim-lang.org/#ix=2zvk |
15:40:20 | FromDiscord | <mratsim> i.e. don't worry about them |
15:40:23 | FromDiscord | <dayl1ght> basically I have a lot of code like these little procs: |
15:40:27 | FromDiscord | <dayl1ght> (edit) 'procs:' => 'procs^' |
15:40:37 | FromDiscord | <dayl1ght> I'm wondering if the interpreter is being copied every time |
15:40:42 | * | JustASlacker joined #nim |
15:41:01 | FromDiscord | <Rika> anything with var is passed via pointer afaik |
15:41:04 | FromDiscord | <mratsim> No, a var parameter is always passed by pointer otherwise you can't modify it |
15:42:14 | * | jacereda joined #nim |
15:42:15 | FromDiscord | <mratsim> Also relevant: https://github.com/status-im/nimbus/wiki/Interpreter-optimization-resources |
15:42:25 | FromDiscord | <dayl1ght> right, that makes sense |
15:44:00 | FromDiscord | <dayl1ght> can I pass -O0, -O1 etc to gcc somehow? |
15:44:08 | FromDiscord | <mratsim> sure |
15:44:17 | FromDiscord | <mratsim> -d:release passes -O3 |
15:44:26 | FromDiscord | <mratsim> --opt:size passes -Os |
15:44:27 | FromDiscord | <dayl1ght> I'd like to test different optimization levels |
15:44:50 | FromDiscord | <mratsim> and otherwise on the CLI you can do nim c --passC:"-O2" yourfile.nim |
15:44:54 | FromDiscord | <dayl1ght> ah nice |
15:44:55 | FromDiscord | <dayl1ght> thanks |
15:45:13 | FromDiscord | <mratsim> or in any of your nim files you can do {.passC:"-O2".} |
15:45:23 | FromDiscord | <juan_carlos> `-d:lto -d:strip` also exist. |
15:45:49 | FromDiscord | <mratsim> or you can compile different files with different optimization levels with {.localPassC:"-O2".} on one file and -O3 on another. |
15:46:23 | FromDiscord | <whisperdev> How do I align string output when I want to have columns? |service|service_status| |
15:46:29 | * | hnOsmium0001 joined #nim |
15:46:30 | FromDiscord | <mratsim> but for an interpreter the biggest optimization is usually avoiding allocation in the interpreter loop and computed gotos |
15:46:39 | disruptek | !repo terminaltables |
15:46:40 | disbot | https://github.com/xmonader/nim-terminaltables -- 9nim-terminaltables: 11terminal tables for nim 15 33β 2π΄ |
15:47:02 | * | JustASlacker quit (Ping timeout: 264 seconds) |
15:47:29 | FromDiscord | <dayl1ght> yeah, I haven't done any optimizations yet but it should be within python's/ruby's ballpark at least |
15:47:35 | FromDiscord | <dayl1ght> I'll test some more |
15:47:44 | * | jacereda` joined #nim |
15:49:01 | FromDiscord | <mratsim> Usually, if it doesn't involve strings that are naivelly allocated over and over again, Nim is around C speed (but naive handling of strings in C is slower than Python too ...) |
15:49:44 | FromDiscord | <dayl1ght> The reason I suspect copying is because I'm following the design of a C interpreter from a book pretty closely, and I can compare my implementation to the author's and theirs is much faster |
15:49:58 | FromDiscord | <dayl1ght> so I think with my naive translation from C to nim using `object`s there's a lot of copying happening somewhere |
15:50:17 | FromDiscord | <mratsim> When doing 1-1 impl of C code I never got different speed |
15:50:21 | * | dv-^_^6193 joined #nim |
15:50:37 | FromGitter | <alehander92> whisperdev use align and alignLeft |
15:50:40 | FromDiscord | <mratsim> tested in the forum with Quake for example which is a highly optimized piece of code due to the hardware of the time |
15:50:40 | FromGitter | <alehander92> from strutils maybe |
15:50:56 | FromDiscord | <mratsim> Nim objects are very efficient |
15:51:03 | FromDiscord | <dayl1ght> e.g. some of their functions were like `doX(CallFrame* x)` |
15:51:06 | FromDiscord | <mratsim> ref objects are meh but Nim objects are fast |
15:51:15 | FromDiscord | <dayl1ght> whereas my equivalent is `doX(x: CallFrame)` |
15:51:31 | * | jacereda quit (Ping timeout: 246 seconds) |
15:51:33 | FromDiscord | <mratsim> wouldn't copy |
15:52:01 | FromDiscord | <mratsim> I'm writing a crypto library with 4300 bits integers on the stack, they aren't copied |
15:52:14 | FromGitter | <alehander92> wow strutils2 |
15:52:34 | FromDiscord | <dayl1ght> hmm isn't the point of `object`s the fact that they are copied? |
15:52:37 | * | dv-^_^619 quit (Ping timeout: 260 seconds) |
15:52:39 | FromDiscord | <mratsim> https://github.com/mratsim/constantine/blob/master/constantine/curves/bls12_381_pairing.nim#L24-L26 |
15:52:54 | FromDiscord | <mratsim> No, the point of objects is that they have value semantics |
15:53:01 | FromDiscord | <dayl1ght> I'm not claiming nim is slow btw, I'm just trying to find what's wrong in _my_ code lol |
15:53:16 | Araq | give us some links/code |
15:53:36 | FromDiscord | <mratsim> but when you pass parameter, Nim will copy unmodified objects if 24 byts or less or pass by hidden pointer if bigger |
15:54:52 | FromDiscord | <mratsim> compile with --debugger:native and use Apple Instruments / intel VTune / perf record and perf annotate |
15:55:15 | FromDiscord | <mratsim> write a bench and analyze where your code spend the time |
15:55:32 | FromDiscord | <mratsim> Example investigation: https://github.com/nim-lang/Nim/issues/9514 |
15:55:33 | disbot | β₯ [Perf] Max/min are not inline and slow (7x slower than memory-bound implementation) ; snippet at 12https://play.nim-lang.org/#ix=2svy |
15:55:34 | FromDiscord | <dayl1ght> yeah with perf record I got a lot of time spent in nimFrame, popFrame and some GC function |
15:56:01 | FromDiscord | <mratsim> And other: https://forum.nim-lang.org/t/5124#32241 |
15:56:11 | FromDiscord | <mratsim> only optimize in -d:release |
15:56:20 | FromDiscord | <mratsim> nimFrame and popFrame don't exist in release mode |
15:56:53 | FromDiscord | <mratsim> GC functions are probably because you are using temporary seq/strings in a tight loop instead of reusing a buffer, not sure what the original C code uses |
15:57:13 | FromDiscord | <dayl1ght> oh oops, that was while recording in debug mode, you're right. It's still slower than I expect in release mode though |
15:57:21 | FromDiscord | <dayl1ght> this is the interpreter loop: https://github.com/frankpf/kiwi/blob/debug/vm/src/interpreter.nim#L170 |
15:57:47 | FromDiscord | <dayl1ght> thanks for the tips, I'll investigate more |
16:01:04 | Araq | echoErr fmt ? |
16:01:46 | Araq | if that is not lazy, there is no need to benchmark it, the string constructions and output to the console destroy everything |
16:02:54 | FromDiscord | <dayl1ght> that calls out to process.stdout.write when the argv includes `--debug` |
16:03:35 | FromDiscord | <dayl1ght> console output won't happen, but string construction could definitely be the issue |
16:03:48 | Araq | replace it by a template |
16:04:03 | FromDiscord | <dayl1ght> sent a code paste, see https://play.nim-lang.org/#ix=2zvx |
16:04:10 | Araq | TableRef[Opcode, int64] --> probably better as array[Opcode, int64] |
16:04:27 | Araq | you should use 'result' |
16:04:48 | leorize[m]1 | change that to a template so you'd have lazy evaluation |
16:05:08 | FromDiscord | <dayl1ght> result where? |
16:05:15 | jacereda` | besides not being lazy, echoErr also compares all the arguments in the command line with "--debug" |
16:05:26 | Araq | everywhere you can. |
16:05:26 | FromDiscord | <dayl1ght> ah and it does that every time it's called too. |
16:05:46 | leorize | you should have a proper argument parser lol |
16:05:53 | FromDiscord | <dayl1ght> well yeah :p |
16:06:01 | leorize | cligen and nim-argparse are my personal favorite |
16:06:13 | leorize | there are probably better ones now, though |
16:06:14 | FromDiscord | <dayl1ght> I assume in echoErr fmt"{var1} {var2}" the string will be constructed every time, gcc/nim can't optimize it out |
16:06:18 | FromDiscord | <dayl1ght> because debugMode() depends on runtime values |
16:06:28 | Araq | and replace your stack based VM with a register based one |
16:06:39 | leorize | if you use template then `fmt` will be lazily evaluated |
16:06:42 | FromDiscord | <dayl1ght> Araq: do you mean assigning to result? what's the difference between that and returning |
16:07:02 | leorize | assigning to result enables some optimization regarding named values |
16:07:39 | FromDiscord | <dayl1ght> thanks, those are great tips, I'll use a template for echoErr and make debugMode not be called every single time |
16:07:51 | FromDiscord | <dayl1ght> I imagine those two alone should get me to python ballpark |
16:07:54 | FromDiscord | <Rika> additional optimisations can be done by using result instead of return |
16:08:00 | jacereda` | Araq: I don't think it would run much faster with a register-based VM, this VM is constructing/destructing boxed values all the time |
16:08:25 | leorize | if debugMode got called enough then it'd be cheap :P assuming you have a big enough cpu cache |
16:08:28 | FromDiscord | <dayl1ght> jacereda: you mean the pop/push sequences? |
16:08:32 | jacereda` | yes |
16:08:33 | Araq | register-based VM are much easier to debug too IME |
16:08:40 | FromDiscord | <dayl1ght> yeah I'll optimize those later |
16:08:45 | jacereda` | if you keep the stack-based design, having a TopOfStack value might make a difference |
16:09:00 | jacereda` | you don't need to perform 2 fetches for, say, binary operators |
16:09:05 | FromDiscord | <dayl1ght> yep |
16:09:18 | FromDiscord | <dayl1ght> I can just mutate the stack and stackTop |
16:09:26 | Araq | throw away the stack-based design, it's both harder to debug and slower |
16:09:52 | leorize | not everyone agrees on that tbh |
16:09:53 | Araq | the only reason why people write them is because they are clueless and then write tutorials for the more clueless |
16:11:20 | FromDiscord | <dayl1ght> I'm planning to move to a register-based bytecode later on, but it seems harder to implement |
16:12:33 | jacereda` | I disagree, stack-based designs are just a perfect fit for some types of languages (Forth), not so good if you want to write a JIT |
16:14:02 | disruptek | you sound like my mom. |
16:15:56 | Araq | well I have written them all, AST based, stack based, register based. AST based is the least amount of code but stack and register are pretty much the same, stacks are harder to debug, tend to produce variable length instructions and thus harder to map to decent debug information |
16:17:12 | jacereda` | never had a variable-length instruction in any of my stack-based interpreters |
16:17:36 | jacereda` | when you need things like pushLiteral, you just embed the literal in the next cell |
16:17:44 | FromDiscord | <dayl1ght> isn't that variable length |
16:17:53 | FromDiscord | <dayl1ght> since your push will take two bytes effectively |
16:18:25 | FromDiscord | <dayl1ght> whereas other instructions without parameters would only take one byte for the opcode |
16:18:26 | jacereda` | the opcode is pushLiteral, not the literal itself |
16:19:10 | FromDiscord | <dayl1ght> if I have `push` and `push_lit 2` instructions, my push needs only 1 byte for the opcode |
16:19:14 | jacereda` | I tend to avoid bytecode, direct threading is the way to go, we aren't in the 8 bit era |
16:19:27 | FromDiscord | <dayl1ght> and push_lit needs one byte for the opcode + 1 for the literal, isn't that the definition of variable length? |
16:21:06 | jacereda` | in that sense, lisp is also composed of variable-length instructions? |
16:21:38 | FromDiscord | <dayl1ght> I don't know about lisp but that looks exactly like e.g. x86 to me |
16:21:44 | FromDiscord | <dayl1ght> if it was fixed-length both push and push lit would take 2 bytes |
16:21:51 | Araq | exactly |
16:21:52 | FromDiscord | <dayl1ght> no? |
16:23:58 | jacereda` | and how would you encode loading a 32-bit value in a register? |
16:24:04 | jacereda` | with a fixed-size encoding |
16:24:06 | jacereda` | loadhi/loadlo? |
16:24:21 | jacereda` | there you have, variable-length instruction |
16:25:01 | FromDiscord | <dayl1ght> I don't think you'd be able to? if your instructoins are 32-bit, you can't have a 32 bit immediate |
16:25:09 | FromDiscord | <dayl1ght> with loadhi and loadlo you still have a fixed-length instruction set |
16:25:12 | FromDiscord | <dayl1ght> if both of those take 32 bits |
16:26:02 | jacereda` | and how is loadhi/loadlo simpler than pushLiteral() implemented as push(*pc++)? |
16:26:29 | FromDiscord | <dayl1ght> oh I'm not discussing whether it's simpler or not |
16:26:52 | FromDiscord | <dayl1ght> but I think for CPUs the advantage of fixed-length instruction sets is that they can know the size without depending on the opcode |
16:27:04 | FromDiscord | <dayl1ght> which means they can pipeline the next instructions for example |
16:27:40 | FromDiscord | <dayl1ght> i think that's why x86 processors decode to (I assume?) fixed-length instructions called uops |
16:28:50 | jacereda` | and I see the value of RISC designs for hardware, but for an interpreter I think a stack-based direct-threading design is way simpler than register-based designs |
16:29:16 | jacereda` | as always, assuming there's no plan to jump to JITting |
16:29:31 | FromDiscord | <dayl1ght> there's a nice discussion of register-based vs stack-based design here http://craftinginterpreters.com/a-virtual-machine.html#design-note |
16:30:16 | FromDiscord | <dayl1ght> I don't think the literature has any evidence of any of the two being better for performance |
16:31:03 | FromDiscord | <dayl1ght> araq: I don't get why variable-length instructions are harder to map to good debug information |
16:31:29 | FromDiscord | <dayl1ght> are you assuming direct compilation from source code to bytecode without an AST? |
16:34:20 | FromDiscord | <mratsim> coming soon VM/interpreter/emulation channel |
16:34:51 | FromDiscord | <mratsim> I think I have that in some of the link I posted |
16:35:07 | FromDiscord | <mratsim> MorphosVM or SableVM has 2 implementations don't remember which |
16:35:24 | FromDiscord | <dayl1ght> mratsim: I do want to have a JIT later on and I looked a little into some project you had |
16:35:36 | FromDiscord | <dayl1ght> I think it was something similar to DynASM? |
16:36:10 | FromDiscord | <dayl1ght> a set of macros to help with emitting x86 assembly |
16:36:15 | FromDiscord | <mratsim> https://www.scss.tcd.ie/publications/tech-reports/reports.07/TCD-CS-2007-49.pdf |
16:36:35 | FromDiscord | <mratsim> DynASM is way more complex than macros |
16:37:01 | FromDiscord | <mratsim> you add inline annotation and then pass a preprocessor that would transform them into ASM that can be called |
16:37:36 | FromDiscord | <dayl1ght> ahh so the source code itself is transformed to asm |
16:37:49 | FromDiscord | <mratsim> You probably looked into Photon-JIT: https://github.com/numforge/laser/tree/master/laser/photon_jit / https://github.com/mratsim/photon-jit |
16:37:49 | FromDiscord | <dayl1ght> https://github.com/mratsim/photon-jit/blob/master/examples/ex01_jit_hello_world.nim |
16:37:52 | FromDiscord | <dayl1ght> I think this is what I saw yeah |
16:38:21 | FromDiscord | <mratsim> Note that nlvm has LLVM ORC JIT support as well |
16:38:21 | * | a__b__m quit (Read error: Connection reset by peer) |
16:38:47 | FromDiscord | <mratsim> photon JIT is more of a proof of concept for now on how to have an easy to extend JIT assembler |
16:38:47 | FromDiscord | <dayl1ght> assembler.mov rdi, 0x01 |
16:39:06 | FromDiscord | <dayl1ght> so this is kinda like a DSL to help with building x86 instructions? |
16:39:26 | FromDiscord | <mratsim> especially compared to asmjit (opcode generation via javascript) and xbyak (opcode generation via C++ text generation) |
16:39:28 | FromDiscord | <dayl1ght> e.g. it pushes the bytes of mov rdi, 0x01 to some internal buffer |
16:39:30 | FromDiscord | <mratsim> yes |
16:39:32 | FromDiscord | <dayl1ght> ah ok |
16:39:54 | FromDiscord | <dayl1ght> yeah that looks useful, I'm so far away from having a JIT tho |
16:40:21 | FromDiscord | <dayl1ght> I also want to experiment with combining AOT + JIT |
16:40:26 | FromDiscord | <mratsim> but apart from the buffer I tried to make most computed at compile-time |
16:40:30 | FromDiscord | <dayl1ght> I think there's a lot of untapped potential in AOT compilation for dynamic languages |
16:40:40 | jacereda` | for AOT I would look at https://c9x.me/compile/ |
16:40:59 | jacereda` | it will be slower than LLVM, but it's small and fast |
16:41:00 | FromDiscord | <mratsim> that's also something I'm interested in for machine learning |
16:41:26 | * | abm joined #nim |
16:41:44 | FromDiscord | <mratsim> basically https://github.com/numforge/laser/tree/master/laser/lux_compiler is a DSL that can either be compiled into Nim or have a LLVM backend for GPU codegen |
16:41:57 | FromDiscord | <mratsim> well it's a plan for a DSL |
16:42:50 | FromDiscord | <mratsim> there are a couple of markdown that explain the design, challenges there: https://github.com/numforge/laser/tree/master/laser/lux_compiler/core |
16:43:15 | jacereda` | speaking of GPU, anyone working on making Nim generate SPIR-V? |
16:43:20 | FromDiscord | <dayl1ght> there's this phd thesis from 2010 on AOT compilation for PHP: https://paulbiggar.com/research/thesis.pdf |
16:43:24 | FromDiscord | <mratsim> so if you want an IR/AST that can be used at both AOT and Runtime this can help you |
16:43:36 | FromDiscord | <dayl1ght> it looked promising, I'm sad no one is exploring AOT for dynamically typed languages |
16:43:40 | jacereda` | oh, found this https://github.com/jwollen/nim2spirv |
16:43:43 | FromDiscord | <mratsim> I think I saw something |
16:43:48 | FromDiscord | <mratsim> yep |
16:43:49 | FromDiscord | <dayl1ght> my theory is that everyone copies JS and JIT makes a lot of sense for JS since you don't want to pay the overhead of compiling |
16:43:57 | FromDiscord | <dayl1ght> but for python and ruby for example, I think AOT might make more sense |
16:44:30 | FromDiscord | <dayl1ght> since you probably don't care how long it takes to compile :p |
16:44:45 | FromDiscord | <dayl1ght> I'll look into the design of lux, thanks |
16:46:23 | FromDiscord | <mratsim> those were my initial experiments, ordered by ascending difficulty: https://github.com/mratsim/compute-graph-optim |
16:46:46 | FromDiscord | <dayl1ght> ah there's also this recent paper (2019) on JS AOT compilation: https://hal.archives-ouvertes.fr/hal-01937197/document |
16:46:54 | FromDiscord | <dayl1ght> that one is _very_ interesting, they claim to get within 50% of v8's perf |
16:46:58 | FromDiscord | <dayl1ght> which is super impressive |
16:47:04 | * | abm quit (Quit: Leaving) |
17:00:46 | * | Trustable quit (Remote host closed the connection) |
17:13:49 | FromDiscord | <Kaynato> I saw https://arxiv.org/abs/1811.05213 but the exact methodology they say are a significant burden |
17:19:14 | * | kobi7 joined #nim |
17:25:14 | * | arecacea1 quit (Remote host closed the connection) |
17:25:48 | planetis[m] | if I write a destructor for an object which also contains seq, do I need to write `=destroy`(foo.myseq) manually, inside the destructor? |
17:26:22 | * | jacereda` quit (Ping timeout: 246 seconds) |
17:27:04 | planetis[m] | because I think that this used to be redundant? |
17:27:37 | * | arecacea1 joined #nim |
17:28:10 | FromDiscord | <whisperdev> Not Nim specific but what is the most efficient way to get strings that startWith("Prefix.") from an array of strings? |
17:28:41 | * | JustASlacker joined #nim |
17:29:00 | planetis[m] | write a for loop yourself, I guess |
17:29:18 | Prestige | If it's an array/sequence ^ can also use filter |
17:29:39 | FromDiscord | <shashlick> @leorize - I'm checking for musl based on gcc output - is that sufficient |
17:30:08 | Prestige | https://nim-lang.org/docs/sequtils.html#filter.i%2CopenArray%5BT%5D%2Cproc%28T%29 @whisperdev |
17:30:18 | leorize | @shashlick it's usually is |
17:30:37 | FromDiscord | <shashlick> okay - on alpine, it's in the target, whereas on ubuntu, its a spec that's read in |
17:30:45 | leorize | that won't work for musl-gcc I think |
17:30:52 | FromDiscord | <mratsim> @planetis no need it will be destroyed at end of scope |
17:30:59 | leorize | so it's a bit of a pita |
17:31:02 | FromDiscord | <shashlick> also, reason i'm using gcc -v is because i need the version info as well |
17:31:32 | leorize | you got gcc -dumpversion as well :P |
17:31:45 | leorize | though I don't think they will change the `-v` output format |
17:32:57 | FromDiscord | <whisperdev> If I want to operate on LPWSTR lets say with something like .startsWith() I need to write my own implementation that works with LPWSTR? |
17:32:59 | planetis[m] | mrastim: i mean I have overwriten the object's destructor, that encapsulates the seq and I don't see a dealloc call being generated for the seq |
17:33:37 | FromDiscord | <shashlick> @leorize - target is in the -v output |
17:33:45 | * | bung quit (Quit: Lost terminal) |
17:34:01 | leorize | -dumpmachine + -dumpversion :P |
17:34:09 | leorize | totally deterministic |
17:34:47 | FromDiscord | <shashlick> two calls vs. one? |
17:34:57 | FromDiscord | <shashlick> but brittle perhaps |
17:35:38 | leorize | I think -v works well enough, provided that -v output won't change |
17:35:47 | * | JustASlacker quit (Ping timeout: 260 seconds) |
17:36:07 | planetis[m] | I will try an older nim version, I must be wrong |
17:36:17 | leorize | planetis[m]: sounds like a bug to me |
17:36:29 | leorize | oh wait you overriden the destructor? |
17:36:37 | leorize | then you need to add that in explicitly I think |
17:36:41 | FromDiscord | <shashlick> dumb question but musl only supported on linux right |
17:36:44 | FromDiscord | <shashlick> not osx/win |
17:37:02 | leorize | that's where it's most used, yes |
17:37:19 | leorize | musl has been ported to other os but userbase is near zero so you shouldn't care about it |
17:37:24 | FromDiscord | <shashlick> cause i don't want to make the code os specific |
17:38:24 | leorize | planetis[m]: probably should ask Araq about how destructor works |
17:38:48 | FromDiscord | <whisperdev> What's better nim-chronos or std's async/await? |
17:39:00 | disruptek | planetis[m]: you need to write your own. |
17:39:15 | disruptek | whisperdev: chronos does not work with arc. |
17:40:05 | leorize | there was this talk long ago about merging chronos and std's but then both sides do nothing :P |
17:40:29 | disruptek | no point in pursuing chronos, imo. |
17:41:06 | leorize | chronos has a ton of useful features that the stdlib doesn't have |
17:41:16 | leorize | I mainly care about the AsyncBuffer though |
17:41:28 | leorize | I might port it over in the future |
17:41:35 | disruptek | as long as it doesn't work on arc, i couldn't care less. |
17:42:27 | FromDiscord | <whisperdev> does it work with orc? |
17:42:30 | disruptek | no. |
17:42:46 | leorize | it should work with orc, but you gotta test it first |
17:43:05 | leorize | I mean if it doesn't work with orc we can't say that orc is a refc replacement :P |
17:43:23 | disruptek | it is, but they are doing dangerous stuff. |
17:43:29 | disruptek | shortcuts. |
17:43:54 | disruptek | honestly, i won't use status software because i don't want to be beholden to their priorities and motivations for features, etc. |
17:49:56 | FromDiscord | <aHaquer> I'm working on a nimble package, but sometime between yesterday and today, running nimble install didn't appear to actually overwrite the executable, so I deleted the executable but it's now complaining that it can't find the fileβ΅> bash: /home/delight/.nimble/bin/fake: No such file or directory |
17:51:00 | FromDiscord | <Rika> because nimble doesnt overwrite the executable |
17:51:05 | FromDiscord | <Rika> it shims it |
17:51:25 | FromDiscord | <Rika> on linux it symlinks it |
17:51:58 | FromDiscord | <Rika> which executable did you delete? |
17:52:03 | FromDiscord | <Rika> rather, what location |
17:52:27 | * | Vladar quit (Quit: Leaving) |
17:52:33 | FromDiscord | <Rika> if its the one at `/home/delight/.nimble/bin`, you deleted the symlink |
17:52:46 | FromDiscord | <aHaquer> I removedβ΅> ~/.nimble/bin/fake |
17:53:25 | FromDiscord | <aHaquer> Oh |
17:53:36 | FromDiscord | <aHaquer> How do I restore the symlink |
17:53:54 | FromDiscord | <Rika> i think making nimble install whatever package again will reinstate it |
17:55:12 | FromDiscord | <aHaquer> I've triedβ΅> nimble installβ΅multiple times |
17:55:21 | FromDiscord | <Rika> in what directory? |
17:55:36 | FromDiscord | <aHaquer> In the package directory |
17:55:44 | FromDiscord | <aHaquer> Upper level |
17:55:51 | FromDiscord | <aHaquer> /Repos/package |
17:56:34 | FromDiscord | <Rika> what error does it come up with |
17:56:54 | FromGitter | <Knaque> `bash: /home/delight/.nimble/bin/fake: No such file or directory` |
17:56:58 | FromDiscord | <aHaquer> It doesn't give me any error when I nimble install |
17:57:03 | FromDiscord | <aHaquer> Just when I try to run it |
17:57:28 | FromDiscord | <Rika> @knaque: that error is of a different methodology |
17:57:51 | FromDiscord | <Rika> so it succeeds on nimble install? that might mean your package isnt configured as a binary package |
17:57:52 | FromDiscord | <aHaquer> Also, yesterday it did appear to be overwriting, but now it's not |
17:57:53 | FromGitter | <Knaque> I didn't know which you were referring to so I made a dumb guess :shrug: |
17:58:12 | * | kobi7 quit (Ping timeout: 256 seconds) |
17:58:49 | FromDiscord | <aHaquer> I think I configured is as a binary package, how would I check? |
17:59:18 | FromDiscord | <aHaquer> Oh yeah it is |
17:59:25 | FromDiscord | <aHaquer> there is a bin in my package.nimble |
17:59:27 | FromDiscord | <Rika> afaik there should be a `bin` field in the nimble file? |
17:59:37 | FromDiscord | <Rika> okay huh it says success on install? |
18:00:03 | FromDiscord | <aHaquer> All of the output I get on the install it |
18:00:06 | FromDiscord | <aHaquer> (edit) 'it' => 'is' |
18:00:06 | FromDiscord | <Rika> `Success: xxx installed successfully.`? |
18:00:12 | FromDiscord | <aHaquer> sent a long message, see http://ix.io/2zwb |
18:00:24 | FromDiscord | <Rika> there should be a last line whether it failed or succeeded |
18:00:27 | FromDiscord | <Rika> (edit) 'there should be a last line ... whether' => 'there should be a last linesaying' |
18:00:46 | FromDiscord | <aHaquer> (edit) 'http://ix.io/2zwb' => 'http://ix.io/2zwe' |
18:00:49 | FromDiscord | <Rika> did you write "y" then enter? |
18:01:10 | FromDiscord | <Rika> because the caps `N` means it defaults to no |
18:01:13 | FromDiscord | <aHaquer> it does not seem to be waiting for me to enter the prompt |
18:01:19 | FromDiscord | <Rika> h u h |
18:01:31 | FromDiscord | <Rika> try `nimble install -y` |
18:01:44 | FromDiscord | <aHaquer> Oh crap |
18:01:53 | FromDiscord | <Rika> ? |
18:02:07 | FromDiscord | <aHaquer> Sorry for wasting your time, I was just pressing enter |
18:02:14 | FromDiscord | <Rika> ah okay |
18:02:14 | FromDiscord | <aHaquer> I thought it would auto Y |
18:02:18 | * | kobi7 joined #nim |
18:02:19 | FromGitter | <Knaque> I've corrected him to actually read the thing. |
18:02:26 | FromDiscord | <Rika> the caps letter is the automatic decision |
18:02:34 | FromDiscord | <aHaquer> Sorry, I'm new to nim |
18:02:39 | FromDiscord | <Rika> its fine |
18:02:40 | FromDiscord | <aHaquer> This is my first package |
18:02:43 | FromDiscord | <Rika> we all were at one point |
18:03:06 | FromDiscord | <aHaquer> thanks for the help |
18:03:15 | * | kobi7 quit (Client Quit) |
18:09:33 | * | thomasross joined #nim |
18:13:08 | planetis[m] | so yeah I tested older nim version, turns out you need to call destroy yourself: https://play.nim-lang.org/#ix=2zwh |
18:14:41 | planetis[m] | weiird i still see a leak after commenting out destroy in 1.2 |
18:14:52 | planetis[m] | works without a leak in devel |
18:19:37 | FromDiscord | <Recruit_main707> does getOccupiedMem work without a gc? |
18:19:55 | FromDiscord | <shashlick> @leorize - how do you know if a binary is built with musl instead of glibc |
18:21:02 | leorize[m]1 | @shashlick you don't |
18:21:39 | FromDiscord | <shashlick> i updated nimterop to download musl binaries and am building choosenim fine |
18:21:50 | FromDiscord | <Vindaar> huh, can't you just use `objdump` or similar π€ |
18:21:50 | leorize[m]1 | you can to an extent but I would not go there |
18:22:14 | FromDiscord | <juan_carlos> is best practice to use `create()` without passing the `size` ?, is it inferred or has to grow it after creation?. |
18:23:01 | leorize[m]1 | @Vindaar you can sorta deduce it out by looking at the symbols |
18:23:20 | leorize[m]1 | however there aren't any concrete way to figure that part out |
18:23:41 | leorize[m]1 | you can, however, very easily figuring out if a binary was built with glibc :p |
18:23:59 | FromDiscord | <Vindaar> hmm π§ |
18:25:18 | leorize[m]1 | @juan_carlos nim's `create()` is similar to `calloc` |
18:30:35 | Araq | planetis[m], you need to destroy the string if you override the =destroy. |
18:30:53 | planetis[m] | Araq: ok thanks |
18:31:17 | Araq | and it's covered by our destructors manual too |
18:31:29 | planetis[m] | now i need to unbreak my repo, somehow git checkout tag broke it |
18:31:34 | planetis[m] | freaking git |
18:32:59 | FromDiscord | <shashlick> is there any way to tell which c compiler Nim is using |
18:33:09 | FromDiscord | <shashlick> beyond defined(gcc) |
18:33:19 | FromDiscord | <shashlick> like what was passed in with --gcc.exe and the like |
18:35:46 | FromDiscord | <haxscramper> How I can completely disallow type conversion for `type D = discinct int` - I want to disallow `D(12)` and instead provide custom conversion function that would do some correctness checks for parameter. Tried `proc D(a: int) {.error.}` but got referinition error |
18:36:50 | FromDiscord | <shashlick> compilesettings.ccompilerPath is always blank |
18:50:55 | FromDiscord | <Recruit_main707> `The Nim profiler can also be used for measuring memory usage, simply compile your application with the --profiler:off, --stackTrace:on, and -d:memProfiler flags.`β΅Does this still work? i keep getting `Error: undeclared identifier: 'nimProfile'` |
18:51:46 | FromDiscord | <Rika> its memProfiler |
18:51:55 | * | abm joined #nim |
18:52:19 | FromDiscord | <Slyris> installing nim through scoop don't work anymore ? |
18:52:26 | FromGitter | <alehander92> Araq |
18:52:30 | FromDiscord | <Slyris> My CI don't install nim anymore since few commits |
18:52:32 | * | Trustable joined #nim |
18:52:50 | FromDiscord | <Slyris> but since i don't have a windows computer right now i cannot test |
18:52:52 | FromDiscord | <Recruit_main707> > its memProfilerβ΅? |
18:52:55 | FromGitter | <alehander92> did you get my update for the friday stuff |
18:53:02 | FromGitter | <alehander92> wednesday* |
18:53:49 | FromDiscord | <himu> what's the best configuration to set up nim with nvim/vim? nimlsp seems to crash often. |
18:55:51 | Prestige | it needs some work. I'm using nimslp and nim.nvim |
18:56:15 | Prestige | https://github.com/alaviss/nim.nvim |
18:57:43 | * | leorize quit (Ping timeout: 240 seconds) |
19:00:41 | FromDiscord | <lqdev> nimlsp? what for? |
19:01:04 | FromDiscord | <lqdev> nim.nvim already uses nimsuggest directly |
19:01:08 | FromDiscord | <lqdev> for autocomplete |
19:01:16 | FromDiscord | <lqdev> though it doesn't do error reporting |
19:01:23 | FromDiscord | <lqdev> yet |
19:01:38 | Prestige | To interact with my lsp client |
19:02:06 | FromDiscord | <lqdev> but why do you need lsp for nim |
19:02:10 | leorize[m]1 | @shashlick sounds like a bug? |
19:02:13 | FromDiscord | <lqdev> if nim.nvim already does most of the work |
19:02:18 | FromDiscord | <lqdev> error reporting i guess? |
19:03:57 | Prestige | Yes, and I have shortcuts set up for lsp so I like using it where I can |
19:08:11 | Araq | alehander92: I think so, not sure |
19:08:30 | FromDiscord | <shashlick> @leorize - yep - will debug at some point - cCompilerPath is not set |
19:09:01 | * | leorize joined #nim |
19:09:13 | FromDiscord | <Rika> @Recruit_main707 where do you put "nimProfile" anywhere |
19:12:58 | Araq | narimiran, branch off 1.4 from this devel, it's complete |
19:13:10 | Araq | (to the best of my knowledge...) |
19:13:27 | Araq | the Nim profiler is dead, please use a different tool :-/ |
19:13:32 | Araq | good night |
19:13:35 | leorize[m]1 | not so fast, windows nightlies are failing due to niminst and i don't know why |
19:16:42 | leorize | ofc it's caused by someone touching niminst recently... |
19:20:18 | narimiran | Araq: ok, will do |
19:20:33 | narimiran | leorize: ok, will wait |
19:21:28 | FromDiscord | <Recruit_main707> @Rika its in the actual gc files |
19:21:42 | FromDiscord | <Recruit_main707> i dont use it directly |
19:21:49 | FromDiscord | <Rika> odd |
19:22:57 | leorize | just opened #15472 |
19:22:58 | disbot | https://github.com/nim-lang/Nim/pull/15472 -- 3niminst: restore ZIP building functionality |
19:23:44 | leorize | after that passes please restart my nightlies PR |
19:27:46 | leorize | actually you can just merge the PR now |
19:27:51 | leorize | CI doesn't build nor run niminst |
19:34:58 | Zevv | what's that hip font rendering library |
19:35:01 | Zevv | i forgot |
19:37:08 | disruptek | !repo author:treeform font |
19:37:10 | disbot | no results π’ |
19:37:19 | disruptek | !repo author:treeform fonts |
19:37:19 | disbot | no results π’ |
19:37:28 | disruptek | wtf treeform. |
19:38:26 | disruptek | oh, it's not author: |
19:38:33 | disruptek | !repo typography |
19:38:34 | disbot | https://github.com/treeform/typography -- 9typography: 11Fonts, Typesetting and Rasterization. 15 117β 7π΄ |
19:39:05 | Zevv | ah thanks |
19:40:08 | Zevv | man that dude did a solid job there |
19:41:33 | * | aenesidemus joined #nim |
19:55:29 | * | arecacea1 quit (Remote host closed the connection) |
19:55:49 | * | arecacea1 joined #nim |
20:09:30 | nature | I can't wrap my head around a problem since last week I have with Nim... I'd be really grateful if someone can point me out what is wronf here... |
20:09:54 | nature | This file compile without any problem: https://paste.rs/VUq |
20:10:14 | nature | But this one doesn't: https://paste.rs/Wb3 |
20:11:12 | nature | I have the following error: at line 25: "template/generic instantiation of `async` from here" and line 28: "Error: type expected" |
20:12:36 | leorize | nature: s/ValueError:/ValueError,/ |
20:13:06 | leorize | newException is a template that takes two parameters, it doesn't process any special syntax here :P |
20:13:09 | nature | gosh... |
20:13:19 | nature | thanks leorize |
20:13:30 | nature | I am quite new to Nim as you can tell ^^' |
20:14:44 | leorize | hope you're enjoying Nim :) |
20:15:06 | leorize | and don't be shy asking questions here, we are always happy to help |
20:15:10 | nature | I am still figuring my way around, but I really like it so far! :D |
20:16:37 | nature | Btw any advice for a good devlopment environment ? |
20:16:52 | FromDiscord | <himu> nimsuggest seems to be stopping again and again. Hmm. Looks like nimslp+coc is the best way here. @lqdev |
20:17:39 | FromDiscord | <lqdev> sorry to hear that. |
20:18:12 | FromDiscord | <himu> @nature. If its IDE you are talking about, prefer VS Code. VS Code support for Nim is quite good. |
20:18:14 | leorize | @himu nimsuggest/nimlsp will always crash, my plugin just tell you when it does :P |
20:18:15 | FromDiscord | <lqdev> but nimlsp uses nimsuggest anyways :) |
20:18:42 | leorize | usually for nimlsp the lsp client just silently restart the thing so you won't see any messages |
20:19:12 | leorize | nature: my go-to is neovim + nim.nvim, but I'm biased |
20:19:17 | nature | @himu I am currently using vscode but I had to use this extension made by a chinese guy since the "official" one didn't work for me... |
20:20:05 | FromDiscord | <himu> nimlsp also crashes a lot. Actually i didn't have any problems until I opened VS Code. Official extension seems to work quite well for me. |
20:20:12 | Prestige | leorize: how do you feel about lsp in general? I've been trying to use it for everything possible |
20:20:40 | nature | leorize: I like vim a lot too, but I was looking for some good autocomplete + linting support, I don't know if nvim can do it well |
20:21:13 | leorize | I think it's a neat idea |
20:22:01 | FromDiscord | <lqdev> !repo alaviss/nim.nvim |
20:22:01 | disbot | https://github.com/alaviss/nim.nvim -- 9nim.nvim: 11Nim plugin for NeoVim 15 100β 13π΄ |
20:22:03 | leorize | the protocol is obviously designed for vscode, but it seems like everyone managed to adapt it to work everywhere |
20:22:05 | Prestige | I've been wanting to contrib to nimlsp, but I'm curious about the state of nimsuggest (if it's crashing) |
20:22:07 | FromDiscord | <lqdev> nature ^ |
20:22:28 | FromDiscord | <lqdev> all linting is done by the compiler |
20:22:40 | FromDiscord | <himu> I have to set up nvim again in VS Code. What a drag. coc+nimlsp was working well until some recursive dependency error came up and its been crashing ever since |
20:23:13 | leorize | Prestige: well... nimsuggest will always crash until 4raq finishes his rewrite of it |
20:23:23 | Prestige | ah, bummer |
20:23:26 | FromDiscord | <lqdev> sent a code paste, see https://play.nim-lang.org/#ix=2zwQ |
20:23:30 | FromDiscord | <lqdev> add to your init.vim and have fun |
20:23:47 | FromDiscord | <lqdev> whenever nimsuggest misbehaves, just type :Res and job done. |
20:23:50 | Prestige | If he's in the middle of a rewrite, I won't bother |
20:24:08 | leorize | don't worry, nimlsp use nimsuggest as a library |
20:24:30 | leorize | so you will be touching nimsuggest -> lsp translation code 99% of the time |
20:24:37 | FromDiscord | <himu> Hmm. Do you guys use coc? Maybe for other languages and frameworks? |
20:24:40 | Prestige | I mean contributing to nimsuggest |
20:24:47 | Prestige | Yeah I do @himu |
20:25:11 | Prestige | for nim, c, go, js, ts, and java |
20:25:14 | leorize | please do contribute, 4raq works on like several things at the same time so we won't get rewritten nimsuggest anytime soon |
20:25:51 | Prestige | I'll see if I can complete any open nimsuggest issues for hacktoberfest |
20:26:05 | FromDiscord | <Elegant Beef> "Updated Docs" |
20:26:59 | leorize | nature: nim.nvim has a demo in it's readme, please watch that and decide for yourself :) |
20:27:01 | Prestige | hehe |
20:27:32 | FromDiscord | <lqdev> leorize: how can you enable the doc thingy btw |
20:27:40 | FromDiscord | <lqdev> could be quite handy sometimes |
20:27:43 | nature | yes I checked the repo, might just go back to vim then :D |
20:27:57 | leorize | @lqdev `set completeopt+=preview` |
20:28:16 | nature | (for nim, I use vim for pretty much anything else already) |
20:28:22 | leorize | there's also the :NimDocOf command if you want to call docs on demand |
20:28:35 | nature | would you recommend coc or just nim.nvim ? with neovim |
20:28:43 | leorize | Prestige use both :P |
20:29:01 | leorize | I use only nim.nvim though |
20:29:09 | FromDiscord | <lqdev> btw is there anything i can do with `[*missing arguments*]` in generic procs |
20:29:18 | FromDiscord | <lqdev> it takes up a good amount of screen space |
20:29:27 | FromDiscord | <lqdev> sometimes i can't read proc signatures because of it |
20:29:46 | leorize | fix the compiler :P I'm not sure why that happens tbh |
20:30:18 | Prestige | Hm I only see 2 open issues tagged with nimsuggest... thought there would be like, 100 |
20:30:27 | leorize | !repo nim-lang/nimsuggest |
20:30:28 | disbot | https://github.com/nim-lang/nimsuggest -- 9nimsuggest: 11idetools for the nim language 15 24β 6π΄ |
20:30:29 | leorize | ^ look there |
20:31:26 | Prestige | oh ty |
20:34:12 | * | vicfred joined #nim |
20:35:18 | nature | Prestige: how did you setup nim.nvim + coc ? Looking for some inspiration |
20:37:11 | FromDiscord | <dk> hashing refs by addr, yay/nay? |
20:37:19 | Prestige | I literally only use it for syntax highlighting nature |
20:37:51 | FromDiscord | <lqdev> @dk depends on the context |
20:38:23 | FromGitter | <alehander92> Araq well i tried many things on wednesday, but https://irclogs.nim-lang.org/30-09-2020.html#19:54:54 |
20:39:40 | Prestige | nature: but here's my nvim config: https://github.com/avahe-kellenberger/dotfiles/blob/master/nvim/init.vim |
20:39:43 | FromGitter | <alehander92> i just need to find a bit more time, was busy with the start of the job sorry |
20:40:01 | FromGitter | <alehander92> but now it should be different |
20:44:08 | nature | crap leorize just realized your the writer of nim.nvim hahah, makes sense now |
20:44:11 | Prestige | Is it possible to have two files include each other (to split them up but act as if they were together)? |
20:44:15 | nature | great work there and thanks :D |
20:44:27 | FromDiscord | <Varriount> Prestige: `include` |
20:44:51 | Prestige | Just curious if it works that way, the manual was pretty brief on include |
20:44:52 | * | synshroud joined #nim |
20:44:55 | Prestige | wa |
20:44:59 | Prestige | woops |
20:45:07 | leorize | Prestige: recursive include is not something anyone tried I think |
20:45:11 | leorize | nature: np :) |
20:45:50 | FromDiscord | <Varriount> Prestige: You would just have one file include the other. Or have a parent file include both. |
20:47:04 | Prestige | hm okay. I was hoping I could move all my templates, iterators, and macros (which are specific to the file) moved into another file. Maybe I'm weird |
20:47:37 | Araq | alehander92: ok, well |
20:48:00 | Prestige | Araq: I thought you went to sleep mate |
20:49:10 | Araq | true |
20:49:47 | Araq | can't sleep though, somebody is wrong on the internet |
20:50:14 | Prestige | https://xkcd.com/386/ |
20:50:20 | FromDiscord | <ache of head> xD |
20:50:28 | FromDiscord | <lqdev> Araq: i know that feeling almost _too_ well lol |
20:51:15 | * | natrys quit (Quit: natrys) |
20:57:22 | * | Trustable quit (Remote host closed the connection) |
20:58:33 | nature | leorize: I have nim.nvim, but when I open a nim file I get the error: "nimsuggest instance for project /home/nature/dev/nim-chat stopped with exitcode: 1" |
20:58:40 | nature | How can I torubleshoot this ? |
20:59:14 | leorize | what version of nimsuggest do you have? |
20:59:18 | leorize | run nimsuggest --version |
20:59:45 | nature | nim compiler 1.2.6 |
21:00:04 | leorize | does your project compile with nim? |
21:00:08 | nature | yes |
21:00:30 | leorize | can you run `nimsuggest /home/nature/dev/nim-chat`? |
21:02:22 | nature | https://paste.rs/Qk2 |
21:02:57 | leorize | ah yea you're running 1.2.6 |
21:03:10 | leorize | try `nimsuggest /path/to/file/you/were/opening/with/neovim` |
21:03:54 | nature | https://paste.rs/Fda |
21:04:27 | leorize | congrats, you found a compiler bug :P |
21:04:37 | leorize | it should probably triggers if you run `nim check` on that same file |
21:04:40 | nature | crap haha |
21:05:18 | nature | no it works |
21:05:37 | nature | I wonder if it's related to nixos... |
21:06:27 | FromDiscord | <himu> Is there something like nodemon for nim? A server that checks on the project repo and automatically runs the nim project once a file/folder changes. |
21:07:02 | Zevv | bwah why are the initDayTime date arguments the wrong way around |
21:07:09 | Zevv | is that german notation? |
21:07:22 | Prestige | iso 8601? I haven't seen it |
21:10:06 | leorize | nature: it's not uncommon for nimsuggest to mysteriously die, esp if your project is complex |
21:11:18 | nature | any lead as to how to fix this ? |
21:12:07 | leorize | try to create a minimal test case to reproduce it and open an issue :P |
21:12:17 | leorize | then hope that Araq looks at it |
21:12:43 | leorize | or you can just try debugging the compiler, which is not easy |
21:13:39 | nature | oh ok, I tried nimsuggest on another simpler nim file and everything seems to work fine |
21:13:50 | Araq | it's as easy to debug as anything else |
21:14:13 | nature | I'd be willing to try :D |
21:14:17 | * | Amun_Ra quit (Ping timeout: 256 seconds) |
21:14:23 | nature | how do I set a breakpoint ? |
21:14:47 | Araq | you can do that with gdb but it's a waste of time |
21:14:58 | * | abm quit (Read error: Connection reset by peer) |
21:15:12 | Araq | the compiler runs through pretty much every breakpoint thousand of times before the problem shows up |
21:15:47 | FromDiscord | <shashlick> Araq: any tricks you can think of to find out what c compiler Nim is using at compile time |
21:16:46 | Araq | there is defined(gcc) and the stuff you encountered that doesn't work |
21:17:12 | FromDiscord | <shashlick> okay - does Nim respect $CC if set? |
21:17:15 | leorize | @shashlick: just create a nim file that imports a C file |
21:17:26 | leorize | and nim don't respect $CC unless you use --cc:env |
21:17:34 | Araq | shashlick: --cc:env yes |
21:17:59 | FromDiscord | <shashlick> ah okay |
21:18:34 | FromDiscord | <shashlick> what does importing a C file do |
21:19:29 | leorize | write a simple function that produce output depending on the compiler compiling it |
21:19:40 | FromDiscord | <himu> I have a doubt regarding recursive dependencies. Do recursive module dependencies also give error for procs? If yes, how do I resolve it. For now, I have put all my types into a single file/module and that module is being imported everywhere in my project. |
21:19:59 | FromDiscord | <shashlick> leorize: i need the actual path since nimterop calls the C compiler for preprocessing |
21:20:21 | leorize | then you're pretty much screwed |
21:20:24 | FromDiscord | <shashlick> right now, I check $CC but if a user sets --gcc.exe or a nim.cfg, nimterop won't know |
21:20:32 | FromDiscord | <shashlick> do user needs to do both |
21:20:37 | leorize | unless you can get the value of --gcc.exe |
21:20:46 | FromDiscord | <shashlick> shouldn't matter on alpine since everything is standard |
21:20:54 | FromDiscord | <shashlick> but on ubuntu when you have to use musl-gcc |
21:20:59 | FromDiscord | <shashlick> or even arm compilers |
21:21:13 | nature | found the culprit! |
21:21:31 | leorize | my advise is to fix compilersettings then mark it for backport |
21:21:59 | FromDiscord | <shashlick> rabbit holes |
21:22:02 | leorize | if users want to cross compile with nimterop, they need newer nim |
21:22:09 | nature | !repo status-im/nim-chronos |
21:22:10 | disbot | https://github.com/status-im/nim-chronos -- 9nim-chronos: 11Chronos - An efficient library for asynchronous programming 15 111β 13π΄ |
21:22:30 | nature | importing this prevents nimsuggest from working |
21:22:45 | * | Amun_Ra joined #nim |
21:22:45 | leorize | can you file a bug at nim-lang/nimsuggest? |
21:22:56 | nature | will do :) |
21:23:12 | leorize | I guess chronos was doing some weird magic |
21:25:04 | disruptek | vulkan support in my browser means jack shit if the fucking location bar has 500ms latency on each keystroke. |
21:25:47 | disruptek | Araq: --cc:env feels like it was added just to make supporting zig harder. |
21:26:15 | * | solitudesf quit (Ping timeout: 256 seconds) |
21:26:26 | Araq | *shrug*, I did it with the best intentions |
21:26:33 | FromDiscord | <shashlick> here's the other fun - nimterop compiles plugins using nim so if you are mixing glibc and musl, you can have toast built with glibc trying to load a plugin built with musl, or vice versa |
21:26:48 | disruptek | it's no big deal, but i had to write a shim. |
21:27:31 | Araq | IMHO you should stop messing around with musl and write system.nim Nim code that doesn't need a libc |
21:28:00 | Araq | or accept that libc is kinda part of the OS and you don't replace it. |
21:28:14 | Araq | and that Linux isn't an OS but a family of OSes |
21:28:17 | leorize | it's for supporting building 3rd party libraries inline with a nim build |
21:28:54 | * | narimiran quit (Ping timeout: 260 seconds) |
21:29:38 | leorize | I can write you syscall-based Nim if you pay me enough :P |
21:30:10 | disruptek | there's a job in the ic department opening up soon. |
21:30:16 | leorize | Status did at least 30% of the work with their io.nim rewrite |
21:32:07 | leorize | disruptek: you dropping out of ic dev or are you looking for more man power? |
21:32:22 | disruptek | yes. |
21:32:55 | disruptek | actually, i did just figure out where this aliasing issue is coming from. |
21:34:53 | Araq | leorize: I'd pay you for Windows syscalls, you have to work for free for Linux support |
21:36:04 | leorize | no one in their right mind would call Windows syscalls directly, even Go do it via their dlls |
21:36:43 | disruptek | that's why he suggested /you/ do it. |
21:36:47 | Araq | can't betray Linux's ideas about dysfunctional money-less societies |
21:37:09 | FromDiscord | <shashlick> why cannot ag search recursively |
21:38:13 | disruptek | newSeq(int): TaintedString = ... yay |
21:38:24 | disruptek | newSeq(int): seq[TaintedString] = ... rather |
21:38:52 | Araq | so ... the aliasing issue comes from tyAlias? |
21:39:06 | Araq | leorize: well kernel.dll stuff is fine |
21:39:16 | Araq | no need to go deeper than that |
21:39:34 | leorize | I should be available this winter break, and I'll let you know then if I can take up on the job :P |
21:39:38 | disruptek | the typeCache in /some/ modules knows it as seq[String] and others seq[TaintedString]. |
21:40:08 | disruptek | or anyway, the names those have mangled to. since they have the same hash... |
21:40:25 | Araq | the trick is to skip tyAlias |
21:40:33 | disruptek | the trick is to /not/ skip it. |
21:40:56 | Araq | trust me. |
21:41:17 | disruptek | i know what you're saying, but i'd rather have Tainted sig out with a different value. |
21:42:25 | Araq | and I don't. skipping is the only sane option and type aliases are a misfeature already |
21:42:40 | Araq | Tainted is only important if it's a 'distinct' type |
21:43:04 | disruptek | okay, but we don't track distinct, either. |
21:46:25 | Araq | why not? |
21:46:47 | * | apahl quit (Ping timeout: 240 seconds) |
21:46:56 | disruptek | probably because there's no point in the backend. |
21:47:28 | disruptek | it's like you always say: the problem isn't where you think it is. |
21:47:50 | * | apahl joined #nim |
21:47:54 | disruptek | the issue is simply that we overwrite the typeCache value that /was/ seqString with seqTaintedString. |
21:48:28 | disruptek | it is output in proc params, but the problem arises when we are generating code for a proc body with a TaintedString rettype. |
21:48:53 | disruptek | and this resets the cache. which has the same signature because duh, strings are taintedstrings, etc. |
21:49:48 | Araq | why do you use the cache? it was written for generating unique hashes |
21:50:05 | Araq | anyhow, you'll figure it out, good night |
21:50:09 | disruptek | peace. |
21:50:23 | disruptek | getTypeDescAux has always used the cache. |
21:50:27 | * | nature quit (Quit: WeeChat 2.9) |
21:59:22 | Araq | my name mangler never used getTypeDescAux |
22:00:14 | disruptek | what do you think getTypeName does? |
22:13:50 | Zevv | disruptekkkkk |
22:16:02 | Prestige | I'm writting a proc to swap elements in a doubly linked list. Is there a more sane way to do this? https://play.nim-lang.org/#ix=2zxo |
22:16:24 | Prestige | I haven't put in nil checks yet, just getting a concept going |
22:17:16 | Prestige | maybe I could just swap the values, lol |
22:19:16 | disruptek | Zevv: dude. |
22:19:44 | disruptek | !last clyybber |
22:19:45 | disbot | clyybber spoke in 12#nim 11 hours ago 12https://irclogs.nim-lang.org/02-10-2020.html#10:48:52 |
22:26:27 | FromDiscord | <shashlick> why is musl-gcc being picked by default on ubuntu after installing musl-tools |
22:33:40 | FromDiscord | <shashlick> somehow nim is always using musl-gcc even after i've uninstalled it |
22:33:52 | disruptek | neat. |
22:34:36 | FromDiscord | <shashlick> ugh, nim.cfg in parent dir in wrong place |
22:34:37 | FromDiscord | <shashlick> life's good |
22:38:09 | FromDiscord | <Eleven> Is Nim a good alternative to Data Science? |
22:40:12 | disruptek | Zevv: you here? |
22:40:20 | FromDiscord | <Vindaar> Well, it's still missing some stuff you might want. But more and more is being developed and to me we're at a decent spot already, @Eleven |
22:41:02 | FromDiscord | <Eleven> thanks guy :3 |
22:41:11 | FromDiscord | <Vindaar> what do you do / need most? |
22:42:17 | FromDiscord | <Eleven> study the data science base and then work with it |
22:42:18 | voidpi | vindaar: your ggplot looks awesome |
22:43:16 | FromDiscord | <Vindaar> @Eleven sorry, I don't follow :/β΅@voidpi Thanks! Feel free to let me know what is missing for you! |
22:43:56 | FromDiscord | <Eleven> good brother, good night ^^ |
22:45:58 | Zevv | disruptek: a bit |
22:46:00 | Zevv | sup |
22:46:03 | Zevv | was about to nap |
22:46:14 | Zevv | I nimmed tonight |
22:46:18 | Zevv | loong time ago |
22:46:32 | disruptek | wut |
22:46:39 | Zevv | yessss |
22:46:43 | Zevv | at least a month |
22:46:49 | Zevv | feels great man |
22:46:51 | Zevv | nimmin' |
22:47:22 | voidpi | vindaar: thanks, I want to retry some plot9 stuff I did with ggplot-nim |
22:47:26 | disruptek | um, so i have a generic instance of an alias that is turned into something that is not an alias. |
22:47:43 | disruptek | trying to decide if this is a nim bug. if it's not a bug, it's a huge pita for me. |
22:48:23 | Zevv | dude |
22:48:25 | disruptek | my type is tyString with a symbol of skType named TaintedString. |
22:48:37 | disruptek | like, what is it even? |
22:49:07 | FromDiscord | <Vindaar> voidpi: cool! Some stuff may still not work of course. I did already port over the periodic table from the plotnine docs, haha https://github.com/Vindaar/ggplotnim/blob/master/recipes.org#fun-with-elements |
22:50:57 | Zevv | disruptek: I am no longer of any use to you |
22:51:07 | Zevv | I have become utterly dumb |
22:51:11 | Zevv | stupid |
22:51:11 | voidpi | vindaar: fucking nice! |
22:51:12 | Zevv | simple |
22:51:15 | disruptek | too much brew, eh? |
22:51:29 | disruptek | what did you read tonight? |
22:51:37 | Zevv | too much shouting, complaining, hacking |
22:52:14 | Zevv | I'm making a high performance event viewer; i got gazillions of things happening in logs, all timing critial. I want to visualize because I have no clue wat all this stuff is doing |
22:52:24 | Zevv | people mashing stuff and stuff and more stuff in elastic search |
22:52:30 | Zevv | and not a soul knows how to look at it |
22:52:40 | Zevv | they come up with crappy "dashboard" and "big data" things |
22:52:54 | disruptek | well, yes. kinesis etc. |
22:52:57 | Zevv | that crunch and crunch and eat CPU and still only create whirling sprays of vomit |
22:53:43 | disruptek | that sounds like a fragrant problem. |
22:54:16 | Zevv | This is todays fruit: http://zevv.nl/div/2020-10-03%2000-50-29.mkv |
22:54:31 | Zevv | making the zoomable pannable time window was the hardest thing |
22:54:48 | Zevv | grid fading in when resolution changes from month to day to hour to minute to second to millisecond |
22:54:58 | Zevv | now the events need to go look like something nice |
22:55:08 | Zevv | put in little graphs and shit |
22:55:12 | Zevv | it will be sooo nice |
22:55:29 | disruptek | what is it, d3? |
22:55:35 | Zevv | what is d3? |
22:55:46 | Zevv | no it's just raw sdl2 |
22:55:49 | disruptek | js canvas svg etc. |
22:55:53 | Zevv | I want 60fps at least |
22:55:56 | Zevv | I have *no* patience |
22:56:25 | Zevv | there is probably soooo many things doing just this soo much easier |
22:56:49 | Zevv | this is my crap. there is many more like it. but this crap is mine |
22:56:58 | disruptek | uh, noted. |
22:57:23 | disruptek | i wouldn't have a clue how to sdl. |
22:57:32 | Zevv | neither did I |
22:57:53 | Zevv | you have no shortage of stuff you had no clue about |
22:57:54 | disruptek | feels like too much work. |
22:58:10 | Zevv | everything feels like too much work |
22:58:14 | Zevv | until you had a beer of two |
22:58:34 | disruptek | omg i had such a nightmare getting this car up here. |
22:58:42 | disruptek | was my own fault, but still... |
22:58:53 | disruptek | the gods didn't want to help. |
22:59:03 | voidpi | Zevv: looks awesome |
23:01:34 | Zevv | just wait |
23:01:37 | Zevv | it looks like shit now |
23:09:24 | Zevv | sorry I'm not any help disruptek |
23:09:55 | Zevv | would love to hack on stuff some time again, really |
23:10:01 | disruptek | it's okay, i will take it out on you later. |
23:10:20 | Zevv | do your best |
23:11:05 | disruptek | i need to hit you up for help on frosty, too. |
23:12:53 | Zevv | just memcpy that shit and whack it through a pipe |
23:12:55 | Zevv | how hard can it be |
23:13:55 | disruptek | oh right, i forgot. |
23:14:45 | Zevv | there you have it |
23:14:49 | Zevv | glad to be of service |
23:14:56 | disruptek | dude, you're the best. |
23:15:05 | disruptek | sleep tight, zevv. |
23:16:30 | Zevv | thanks man |
23:16:32 | Zevv | ZzzZ |
23:24:10 | * | dv-^_^61939 joined #nim |
23:28:07 | * | dv-^_^6193 quit (Ping timeout: 260 seconds) |
23:34:58 | * | NimBot joined #nim |
23:36:18 | FromDiscord | <Avatarfighter> this was the most wholesome interaction I've seen in ages |
23:40:33 | FromDiscord | <Rika> and disrupt.k is a participant, really surprising innit? |
23:41:33 | FromDiscord | <Avatarfighter> it brings a tear to my eye |
23:41:54 | * | thomasross quit (Ping timeout: 260 seconds) |
23:44:42 | * | abm joined #nim |