<< 23-10-2020 >>

00:00:00*krux02 quit (Remote host closed the connection)
00:01:40*TomDotTom joined #nim
00:23:02*kinkinkijkin quit (Ping timeout: 260 seconds)
00:41:19*astronavt joined #nim
00:49:12*sealmove quit (Read error: Connection reset by peer)
00:51:45*bung joined #nim
00:52:04*PMunch quit (Quit: leaving)
00:54:56*Tanger joined #nim
00:56:11*bung quit (Ping timeout: 260 seconds)
01:00:27disruptekssshh, relax. it'll be like i'm not even here.
01:07:03*kinkinkijkin joined #nim
01:22:47*apahl_ joined #nim
01:23:23*sealmove joined #nim
01:25:07Yardanico!status
01:25:08FromDiscordUptime - 2 days, 5 hours, and 48 minutes
01:25:12*TomDotTom quit (Ping timeout: 272 seconds)
01:25:37*apahl quit (Ping timeout: 246 seconds)
01:28:28sealmoveWhy doesn't this work? https://play.nim-lang.org/#ix=2BGv
01:30:04sealmoveAh I mixed up object and ref object, sorry
01:31:16sealmoveMy problem is I can't do this: https://play.nim-lang.org/#ix=2BGw Is type conversion the only solution to it?
01:32:04FromDiscord<scott> `Animal` doesn't implement a `name` member/method
01:32:31sealmoveYeah, can't need figure out it's a Dog object?
01:32:45FromDiscord<scott> no, you cast it as an Animal
01:34:30FromDiscord<scott> sent a code paste, see https://play.nim-lang.org/#ix=2BGy
01:34:37FromDiscord<scott> (edit) "https://play.nim-lang.org/#ix=2BGy" => "https://play.nim-lang.org/#ix=2BGz"
01:34:47FromDiscord<flywind> use `echo a.Dog.name`.
01:35:17FromDiscord<scott> nice, will that raise a reasonable error if `a` is somehow not a `Dog` at runtime?
01:36:46FromDiscord<scott> Yes, it does https://play.nim-lang.org/#ix=2BGw
01:36:50sealmoveHum right. I am scratching my head now, don't know what I need. I have a object type with a `parent` field, but I can't know the type of `parent` in advance. All my types inherit from a specific type, but even if I use this general type for `parent` field, it doesn't help :|
01:36:57*abm quit (Quit: Leaving)
01:37:40FromDiscord<scott> if the field is the same in all of them you could just have it be a part of the parent type?
01:37:52FromDiscord<scott> sorry, same type
01:38:41sealmoveI'll try to demonstrate it, w8
01:39:02FromDiscord<flywind> Why generics doesn't help? You can use concept to restrict gererics.
01:39:20sealmovebecause generics are only for proc params
01:39:31sealmoveyou can't use them for object fields
01:40:29FromDiscord<InventorMatt> i think the problem is that it is only looking at it like it is a generic animal not a specific dog and since animal doesn't have a name attribute it doesn't think it exists
01:41:25disrupteka goat is a kind of animal. try using a goat.
01:42:18disruptekbut seriously, convert it.
01:42:26FromDiscord<flywind> Yea, I have done something similar. May be useful. https://planety.github.io/prologue/extendctx/
01:42:28disruptekecho a.Dog.name will work.
01:42:52disruptekexactly how flywind does it.
01:44:21sealmoveyeah I understand the concept, still it doesn't fit my situation, here it is: https://play.nim-lang.org/#ix=2BGC
01:44:26FromDiscord<nikki> if you have an `Option[T]` result where `T` is a value type, can you just do something like `result.fill(makeT())` to initialize it into the storage already defined in the optional (if that's how it's implemented), or can you not?
01:44:45FromDiscord<nikki> afaict `Option[T]` looks immutable but maybe i'm missing sth
01:46:01FromDiscord<scott> you want to call a method on a sibling?
01:46:08sealmovenikki: `result = some(yourValue)`
01:46:18FromDiscord<scott> Or just call `f` on `C`'s parent?
01:46:43FromDiscord<flywind> The example you gave is wrong.
01:46:43sealmoveI want to have a parent field whose type varies
01:46:57sealmoveI know it's wrong, I am searching for a potential solution
01:46:59FromDiscord<scott> just a sec
01:47:05FromDiscord<flywind> `c1 = C(parent: a)`
01:49:06FromDiscord<flywind> https://play.nim-lang.org/#ix=2BGE
01:49:09FromDiscord<flywind> this compiles
01:49:20Yardanicobtw, just a random question - https://nim-lang.org/docs/algorithm.html#sort%2CopenArray%5BT%5D%2Cproc%28T%2CT%29 implements "iterative merge sort", so is it the same as TimSort which seems to do the same ?
01:49:44nikki93sealmove: so just that, interesting. i'll have to look into if it overrides assignment in some way to reuse storage, that'd be interesting. but if not and nim's default semantics are fine, that's cool too
01:50:15FromDiscord<scott> nevermind I don't know how to do it
01:50:38FromDiscord<flywind> I don't think that is `timsort`. timsort is more complex.
01:50:52Yardanicois it?
01:51:15Yardanicoimpl for our sort is in https://github.com/nim-lang/Nim/blob/version-1-4/lib/pure/algorithm.nim#L415 and merge proc is https://github.com/nim-lang/Nim/blob/version-1-4/lib/pure/algorithm.nim#L334
01:51:58sealmoveyeah sorry, messed up the syntax. well, that's what I've been doing but the problem is I am not sure if I can cast to the correct (parental) type.
01:52:38FromDiscord<flywind> a simple implementation for timsort
01:52:38FromDiscord<flywind> https://github.com/bung87/tim_sort
01:53:00Yardanicowell I was checking https://www.geeksforgeeks.org/timsort/
01:53:58FromDiscord<flywind> Maybe this is a kind of timsort not for production.
01:54:09FromDiscord<flywind> (edit) "timsort" => ""timsort""
01:55:14*mwbrown quit (Ping timeout: 260 seconds)
02:01:21sealmoveok here is what I mean explained a lot better https://play.nim-lang.org/#ix=2BGK
02:01:59sealmovethe idea is to somehow keep track of type of parent programmatically, but still save it into a more general typed field
02:03:19leorize[m]1you can use the `of` operator to perform runtime type reflection
02:03:57FromDiscord<scott> > how can `c1` remember/save the type of `a` before it casts it to Root?โ†ตI don't think it can.
02:05:17FromDiscord<scott> is there any reason for the `notin` operator as opposed to using `not in`?
02:05:33sealmoveoperator precedence
02:05:45FromDiscord<scott> oh, I guess that makes sense
02:06:14leorize[m]1https://play.nim-lang.org/#ix=2BGL
02:06:20leorize[m]1sealmove: ^ RTTI
02:06:40FromDiscord<scott> leorize, you can't use `case` for this?
02:07:02leorize[m]1nope
02:07:07FromDiscord<scott> ๐Ÿ˜ฆ
02:07:32leorize[m]1well a simple pattern matching macro should do
02:07:37leorize[m]1not sure if gara support it
02:08:24FromDiscord<scott> huh?
02:09:17leorize[m]1!repo gara
02:09:18disbothttps://github.com/alehander92/gara -- 9gara: 11 15 83โญ 7๐Ÿด
02:09:41FromDiscord<scott> oh that's nice
02:10:59FromDiscord<scott> doesn't look like it does support that though
02:11:17FromDiscord<scott> maybe when I get better at Nim macros I'll give it a shot.
02:12:43disruptekbetter make it a double.
02:13:13FromDiscord<scott> I always make it a double
02:13:38FromDiscord<notchris> Hey all, how do i set a ptr again?
02:14:05leorize[m]1wdym set a ptr?
02:14:19FromDiscord<notchris> omg i forgot .addr, my apologies
02:19:03sealmovehmm, interestingly enough there is indeed a complication with my situation and it's already documented here: https://doc.kaitai.io/user_guide.html#_enforcing_parent_type
02:19:12sealmovethere is a special feature to resolve it
02:19:29sealmovebut the test I was running was testing a different feature, and it runs into this situation
02:19:45sealmoveso the test is flawed...
02:20:50FromDiscord<scott> > so the test is flawed...โ†ตโ†ตAs happens far too often...glad you got your stuff working ๐Ÿ™‚
02:21:32sealmoveI am reusing a test suite written by others :P
02:22:14sealmoveShould file a PR to fix the test
02:22:44FromDiscord<scott> I see that there's a `times.parse(string, TimeFormat)` proc.... are there any standard `TimeFormat` constants such as for ISO 8601, RFC 2822, etc?
02:23:30FromDiscord<scott> if I find a bug and can fix it I always try to. If you don't have the time, at least alerting the maintainer/author would be nice ๐Ÿ™‚
02:25:41FromDiscord<scott> just searched the source code for `8601` and answered my own question
02:26:18*user0 quit (Quit: Leaving)
02:28:44*Axiomatic joined #nim
02:34:17*muffindrake quit (Ping timeout: 260 seconds)
02:36:17*muffindrake joined #nim
02:36:20sealmovewow! it seems I have to determine if there are more than 1 candidate types for `parent` and only then type it as a general type, otherwise type it with the more specific type :S
02:37:10sealmovei guess i have to do some tree analysis there
02:37:46FromDiscord<nikki> https://media.discordapp.net/attachments/371759389889003532/769026750461771806/unknown.png
02:38:12FromDiscord<nikki> two `copyString`s happening here; but it seems like there should really be just one right? not sure if that'd be optimized out by C compiler bc. it has an alloc side effect
02:39:45FromDiscord<nikki> i guess it makes sense actually bc. i'm taking the `name` as a parameter and then passing to `some`, so there's a visible copy. i'll try it as a `sink string`
02:39:52*bung joined #nim
02:44:05*bung quit (Ping timeout: 240 seconds)
02:44:25FromDiscord<nikki> https://gist.github.com/nikki93/cce678c486af52f4b0e85fc8a8ba8995 <-- gist version
02:49:31FromGitter<deech> If you have an object with some proc property `p` and also a `proc p` they clash, eg. `type O = object p: proc(); proc p[T](x:T) ...`, is this a bug?
02:49:43disrupteknope.
02:50:33FromGitter<deech> Why?
02:51:36disruptekbecause it's intentional.
02:52:29FromGitter<jrfondren> my favorite clash is trying to call a proc with a sink parameter in a module named 'sink'
02:53:09FromGitter<jrfondren> the strategy of naming files after what I'm trying to confirm, it does not always work
02:53:36FromGitter<deech> This at least could be a warning, I was going nuts trying to figure out why calling an object property was going into infinite recursion.
02:54:06disruptekmutually recursive p?
02:54:16disrupteki think i saw that on pornhub once.
02:57:42FromGitter<jrfondren> huh, there is a UFCS difference there
02:59:21FromGitter<jrfondren> https://play.nim-lang.org/#ix=2BGR
03:01:03leorize[m]1yea, direct access is always preferred over functions
03:09:43FromDiscord<scott> what about public read-only members?
03:11:56FromDiscord<ElegantBeef> Nim doesnt have those explictly and they're done with procs
03:12:52*mwbrown joined #nim
03:13:04FromDiscord<scott> ok, that's what I though
03:13:06FromDiscord<scott> (edit) "though" => "thought"
03:13:36FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=2BGW
03:13:38FromDiscord<ElegantBeef> Something like that
03:14:26FromDiscord<ElegantBeef> I have a small DSL macro which can generate them, but with the current type macros they're a bit annoying to implement
03:15:23FromDiscord<scott> yeah, that's how I thought it worked. I do wish there was `proc mem=(self: Something, newVal: T): T = self.t = validated newVal` to `something.mem = newVal` sugar
03:15:25FromDiscord<ElegantBeef> Can read about it here https://github.com/nim-lang/Nim/issues/13830#issuecomment-706430286
03:15:26disbotโžฅ `macro pragmas` in type section should apply to `TypeSection`, not `TypeDef` ; snippet at 12https://play.nim-lang.org/#ix=2rOP
03:15:55FromDiscord<ElegantBeef> Yea i have a semi ugly DSL for it https://media.discordapp.net/attachments/371759389889003532/769036348631810098/unknown.png
03:16:46FromDiscord<scott> hey that's cool
03:17:21FromDiscord<ElegantBeef> iirc if you dont have a set or get it doesnt generate it
03:17:26FromDiscord<ElegantBeef> Cant remember what i went with
03:18:03FromDiscord<ElegantBeef> But yea my constructor module is to ease the usage of objects, for common things like events, constructors, properties
03:18:33FromDiscord<ElegantBeef> Shamelessly plugging it constantly ๐Ÿ˜›
03:19:03disruptekgive us a url at least.
03:19:12FromDiscord<ElegantBeef> !repo constructor
03:19:13disbothttps://github.com/beef331/constructor -- 9constructor: 11Nim macros to aid in object construction including event programming, and constructors. 15 3โญ 0๐Ÿด 7& 2 more...
03:21:44*astronavt quit (Quit: Leaving)
03:25:32FromDiscord<ElegantBeef> How many throbs does it cause disruptek?
03:27:03*astronavt joined #nim
03:27:23*apahl_ quit (Ping timeout: 260 seconds)
03:28:02*apahl joined #nim
03:32:24*sealmove quit (Quit: WeeChat 2.9)
03:38:01*fvs joined #nim
03:39:40fvshi, are variables declared in a proc (var or let) "redeclared" if the proc is called repeatedly?
03:40:49Tangerfvs: Yep, they're local to the scope of the proc
03:41:14TangerSo a let inside a loop or proc will get destroyed when the program leaves that scope and rebound every time
03:41:54fvsis that the reason for the {.global.}, to keep scope?
03:42:03fvspragma
03:46:23FromDiscord<ElegantBeef> Yes
03:46:30FromDiscord<ElegantBeef> Not to keep scope but to keep the value
03:46:56fvsyep, got it. Thanks
04:02:41FromDiscord<ElegantBeef> Damn i realized i could just use the fidget templates exactly in nimscript but they dont seem to function properly ๐Ÿ˜„
04:06:02*supakeen quit (Quit: WeeChat 2.9)
04:06:38*supakeen joined #nim
04:09:43*rockcavera quit (Remote host closed the connection)
04:19:11*fvs left #nim ("leaving")
04:26:53*ForumUpdaterBot quit (Remote host closed the connection)
04:28:02*bung joined #nim
04:28:43*ForumUpdaterBot joined #nim
04:28:59Yardanicoi think i understood why my forum updater bot has been stopping working after 2-3 days
04:29:01Yardanicobecause of a rookie mistake
04:29:07YardanicoI forgot to close asynchttpclients :)
04:29:16Yardanicoso after a while "too many open files" would be raised
04:33:18*bung quit (Ping timeout: 272 seconds)
04:34:11FromDiscord<ElegantBeef> Wouldnt ARC save that?
04:34:40Yardanicono
04:34:47Yardanicostdlib doesn't have destructors for sockets/files yet
04:35:02Yardanicothey will be eventually added (I think), but only after arc/orc becomes stable and (probably) default
04:35:05FromDiscord<ElegantBeef> Ah that that was apart of it
04:35:15Yardanicoyes you can make your custom destructors of course
04:35:18FromDiscord<ElegantBeef> Havent actually used arc, just read about what it enables
04:35:35FromDiscord<ElegantBeef> This makes me so sad https://media.discordapp.net/attachments/371759389889003532/769056399447293982/unknown.png
04:35:54Yardanicoyes, converters make me sad too /s
04:35:57FromDiscord<ElegantBeef> For some reason calling the functions from nimscript dont work properly, i thought i had a big brain method of wrapping fidget
04:36:25FromDiscord<ElegantBeef> Converter is just there cause i dont have generic support yet since it's icky
04:40:30FromDiscord<ElegantBeef> You'd think the template being copied to the nimscript import would result in the same result
04:40:36FromDiscord<ElegantBeef> But apparently it doesnt
04:44:25*bung joined #nim
04:48:45*bung quit (Ping timeout: 240 seconds)
04:50:01*lbart quit (Ping timeout: 264 seconds)
04:50:52*lbart joined #nim
04:50:52*lbart quit (Changing host)
04:50:53*lbart joined #nim
05:08:29*mbomba joined #nim
05:14:50*screens__ joined #nim
05:15:12*Araq quit (Ping timeout: 260 seconds)
05:16:08*screens_ quit (Ping timeout: 260 seconds)
05:16:26*Araq joined #nim
05:17:07FromDiscord<nikki> https://github.com/nim-lang/Nim/blob/01a62320f03ebd3282a7def231351c4f84c319d2/lib/pure/options.nim#L80
05:17:20FromDiscord<nikki> just checking my understanding of arc and stuff: this `val` parameter could be a `sink T` right?
05:17:49FromDiscord<nikki> and that would reduce copies when eg. constructing from temporaries or other sink params?
05:24:44*mbomba quit (Quit: WeeChat 2.9)
05:44:03*narimiran joined #nim
05:55:20FromDiscord<ElegantBeef> https://forum.nim-lang.org/t/6971 This forum post now makes me think we need a "This (Determined amount of time) with Nim", where community members can send small writeups about what they're working on.
05:55:51FromDiscord<nikki> is there some way of aliasing a proc? or at least easily making a template that wraps another proc or something (i just haven't gotten to macros/templates in this book yet ๐Ÿ˜… )
05:56:18FromDiscord<ElegantBeef> What do you want to do exactly?
05:56:36FromDiscord<nikki> https://media.discordapp.net/attachments/371759389889003532/769076784799940628/unknown.png
05:56:47FromDiscord<nikki> sorry that this is a picture but -- i want to compare my option and the stdlib option
05:57:10FromDiscord<nikki> and the `some` can't overload on return type so i was thinking to have `mySome` which is mine if i say `useMy` but otherwise aliased to stdlib
05:57:54FromDiscord<ElegantBeef> Can you not do `try_option_result.some`?
05:58:13FromDiscord<ElegantBeef> I dont actually recall if the current module name is usable like that
05:58:31FromDiscord<nikki> ah i see
05:58:56FromDiscord<nikki> well even then i want to actually just have it be the right proc based on `useMy`, not just pick this module's one
05:59:09*siulManfroni quit (Quit: Leaving)
05:59:17FromDiscord<nikki> the `type PickedOption = ...` aliases worked out nicely
06:00:10FromDiscord<nikki> i guess i can use template untyped or w/e
06:00:37FromDiscord<ElegantBeef> You could also import from this file and change which you export based off the defined condition, but there might be a cleaner method i cannot think of
06:01:01FromDiscord<nikki> yeah all of that sounds like more extra space than i want here haha
06:01:41FromDiscord<nikki> went with template untyped ยฏ\_(ใƒ„)_/ยฏ
06:01:42FromDiscord<nikki> seems fine for now
06:02:21FromDiscord<nikki> sent a code paste, see https://play.nim-lang.org/#ix=2BH9
06:04:02FromDiscord<nikki> wow yeah it's just faster with `val: sink T` in the option `some` constructor
06:04:25FromDiscord<ElegantBeef> Making options 2.0 i see ๐Ÿ˜›
06:04:33FromDiscord<nikki> (just wanted to try it empirically even if that's clear -- i saw the diff in the gen'd C code and the only difference is copy vs sink)
06:07:38*NimBot joined #nim
06:08:25FromDiscord<nikki> i think nope, just faster. all it involves is making the param `val: sink T` here: https://github.com/nim-lang/Nim/blob/275354709d2a5e38b9e06b2cee823ddef756d62d/lib/pure/options.nim#L101
06:08:30FromDiscord<nikki> move semantics is some easy wins lol
06:08:56FromDiscord<ElegantBeef> Lol nice now make a pr that only does that for 1.4.0 onwards
06:09:48FromDiscord<nikki> it already says `lent` elsewhere, link in `get` on line 170
06:10:01FromDiscord<nikki> (edit) "link" => "like"
06:10:47FromDiscord<ElegantBeef> I havent looked into lent, or sink arent they 1.4.0 additions?
06:11:07FromDiscord<nikki> yeah and i think only for `--gc:arc`
06:12:23FromDiscord<ElegantBeef> I know lent is practically a read only pointer, but what's sink?
06:12:56FromDiscord<nikki> means to 'move in' the ownership of the obj, if you can
06:13:37FromDiscord<nikki> it makes sense if you're going to eg. install it into some owned spot, such as the `.val` member in an `Option[T]` in this case
06:14:07FromDiscord<nikki> and moving in the ownership means: give me the job of tracking its lifetime, the caller can forget about that now
06:15:00FromDiscord<Rika> sink is rust's move basically
06:15:05FromDiscord<ElegantBeef> Yea i got that now
06:24:49*arecacea1 quit (Remote host closed the connection)
06:25:26*arecacea1 joined #nim
06:28:50*solitudesf joined #nim
06:32:29*bung joined #nim
06:37:25*bung quit (Ping timeout: 264 seconds)
07:12:07lbarthmmm, is nim playground broken?
07:12:07lbarthttps://play.nim-lang.org/#ix=2BHk works on my machine (c)
07:13:38FromGitter<jrfondren> I get the same error on my machine
07:13:51supakeenlbart, only one option. Please ship us your machine.
07:13:56supakeenAnd we'll put it into production.
07:14:01lbart:)
07:14:43lbartok, so my machine is FreeBSD with nim 1.2.6
07:15:58mipriI get the error in 1.2.6 and 1.0.0 even
07:17:07*Vladar joined #nim
07:18:30*NimBot joined #nim
07:18:36mipriwoah
07:18:43miprithe error is fixed by removing trailing whitespace
07:19:49mipriwhich explains why you don't get the error. probably you introduced the whitespace when you copied and pasted this into the playground
07:20:42lbartmipri: oh ! yes, my nvim config removes trailing whitespace
07:23:56mipri>= 128 spaces at the end of any line causes it
07:25:48miprilbart: can you create an issue at https://github.com/nim-lang/Nim/issues ?
07:26:01lbartmipri: yes, I'm on it
07:26:27mipricool
07:31:57lbartthank you
07:56:33*stefantalpalaru_ joined #nim
07:58:05*stefantalpalaru quit (Ping timeout: 240 seconds)
07:59:33*stefantalpalaru_ is now known as stefantalpalaru
07:59:35*stefantalpalaru quit (Changing host)
07:59:35*stefantalpalaru joined #nim
08:04:12*stisa[m] quit (Ping timeout: 246 seconds)
08:04:19*stisa[m]1 joined #nim
08:12:05*lritter joined #nim
08:19:33ForumUpdaterBotNew thread by Torarinvik: The big tutorial thread, see https://forum.nim-lang.org/t/6977
08:20:38*bung joined #nim
08:25:44*bung quit (Ping timeout: 272 seconds)
08:27:27*Tanger quit (Quit: Leaving)
08:28:17*hnOsmium0001 quit (Quit: Connection closed for inactivity)
08:41:18*PMunch joined #nim
08:42:53FromDiscord<Rika> so why does playground crash if there are too many spaces on the end of a line
08:43:25mipriit's nim that crashes, not the playground specifically
08:43:36FromDiscord<Rika> so it doesnt work on your machine?
08:44:05PMunchHuh?
08:44:08mipriif >= 128 spaces at the end of a line, nim crashes with unhandled exception: over- or underflow [OverflowDefect]
08:44:12supakeenIt crashes for me as well.
08:44:19FromDiscord<flywind> It doesn't work on the `vscode`. I ever met this issue.
08:44:35miprithe editor isn't important except that it might accidentally prevent you from observing the bug
08:44:41supakeenhttps://bpa.st/raw/I7PA
08:45:09PMunchHow on earth did you guys find that bug..
08:45:16FromDiscord<flywind> https://github.com/planety/prologue/issues/4
08:45:18disbotโžฅ Can't compile ; snippet at 12https://play.nim-lang.org/#ix=2BHJ
08:45:24mipricopy&paste into a browser that added a bunch of whitespace
08:45:34supakeenPMunch: lbart pasted something and it messed up the whitespace; then investigate and mipri found it :D
08:45:58FromDiscord<flywind> I ever copied the code snippet with many spaces to `vscode` and get that error messages.
08:46:20PMunchHappens with parseStmt as well: https://play.nim-lang.org/#ix=2BHK
08:46:28supakeenNice bug anyhow.
08:47:25PMunch@flywind, why would you compile prologue to js? :P
08:48:14miprithe fun part for me was that when I went to edit the file to try and isolate the line causing the problem, I started by stripping trailing whitespace to make the file more readable. so my experience was: comment everything, it works, uncomment one line, ok it still works, repeat until everything's uncommented
08:48:27mipriuh did I fix the bug by commenting and uncommenting everything in this file?
08:48:39miprino, that unimportant first step did it
08:48:48PMunchOh hooray: https://www.techradar.com/news/microsoft-edge-finally-lands-on-linux
08:49:19PMunchHaha, mipri been there done that
08:49:42PMunchHad a laptop keyboard with an odd layout, which led me to do some misclicks
08:49:53PMunchOne of which was hitting shift and enter at the same time or something like that
08:50:12PMunchThis apparently inserted a different kind of newline which the compiler didn't like (this was Java IIRC)
08:50:21PMunchSo I got some super cryptic errors
08:50:49PMunchBut if I rewrote the line exactly as I saw it it worked fine
08:51:13supakeenIt's also a common type of problem for shebangs that have been edited on windows and have a carriage return which becomes part of the shebang.
08:51:14PMunchOh no wait, it was shift space I think, I at least ended up with &nbsp; characters
08:51:30PMunchsupakeen, or files with BOM...
08:51:33supakeenYap.
08:52:48supakeenIs this something that the parser counts the spaces in an `int8` or such?
08:53:00PMunchLook like something like that
08:53:01supakeenIt's really only whitespace that causes it.
08:53:06PMunchBut what a weird thing..
08:53:11FromGitter<jrfondren> that's worrying. gitter doesn't escape that &nbsp;
08:53:20FromGitter<jrfondren> not when I type it either
08:53:45narimiran1.6.0 release notes: "Nim now allows for 65k trailing whitespaces"
08:53:53supakeen:D
08:54:17mipricompiler/lexer.nim: strongSpaceB*: int8 # trailing spaces of an operator
08:54:35supakeennarimiran: It's not just trailing whitespace to be fair.
08:54:37miprihaven't dug into it, but there's definitely int8 in there
08:54:59supakeenAs in if you `let a = 1 + 128 spaces + 1` it's also a crash.
08:55:08supakeenWithout the double `+` >_<
08:55:23PMunchHmm, is it only trailing? Or does this mean I can't have more than 64 indentation levels?
08:55:32mipriprobably the part that complains about inconstent whitespace around operators
08:55:49supakeenI wonder if it's actually problematic or it's the error message that could be better.
08:55:54supakeenPMunch: It seems to be the latter.
08:55:57Araqgood bug :-)
08:56:00Araqvery funny
08:56:31Araqwould my favorite solution have prevented it? (saturated arithmetic) Yes.
08:57:11narimiranPMunch: also 1.6.0 release notes: "you can now have 32767 indentation levels, use them wisely"
09:00:45*bung joined #nim
09:00:55*solitudesf quit (Remote host closed the connection)
09:01:21*solitudesf joined #nim
09:08:37*^Q-Master^ joined #nim
09:09:21PMunchnarimiran, finally!
09:09:29PMunchThat has really been a limitation for me :P
09:09:34*Q-Master quit (Read error: Connection reset by peer)
09:09:37narimirani know :)
09:09:56FromDiscord<Vindaar> could we _finally_ switch to uint64 for indentation levels? Such a pain right now... smh
09:10:50narimiranint128 or gtfo!!
09:11:14FromDiscord<Vindaar> haha
09:11:39FromDiscord<Rika> damn how many spaces do you need
09:11:45narimiranall.
09:11:52FromDiscord<Vindaar> all of the spaces
09:11:53FromDiscord<Rika> nim, but only whitespace
09:11:59FromDiscord<Rika> lets get working to it
09:12:06FromDiscord<Rika> on
09:14:54*krux02 joined #nim
09:21:17*krux02 quit (Remote host closed the connection)
09:23:07lbartsupakeen, Araq I'm a monkey tester :)
09:23:16*bung quit (Quit: Lost terminal)
09:28:39Yardanicolbart: nooo that was my title :((
09:29:16Yardanicoi used the sledgehammer approach (to reduce test cases of nim libs/apps) to file like 45 arc bugs
09:29:22Yardanicothat's what you do when you have too much free time
09:31:07lbarthe he :)
09:34:45FromDiscord<Rika> monke
09:34:51Araqnow if only you would also fix 45 arc bugs
09:34:55Yardanicoi know :(
09:34:57Araq;-)
09:35:20Araqit's ok, we have 2021 for stabilizing all the stuff we added in 2020
09:40:31*solitudesf quit (Remote host closed the connection)
09:41:40*solitudesf joined #nim
09:50:37*bung joined #nim
09:55:56Yardanico!status
09:55:57FromDiscordUptime - 2 days, 14 hours, and 19 minutes
09:56:15Yardanicogood that @mratsim doesn't see me using the !status command, otherwise he'd post a link to status.im again
10:00:44bungI use recvInto , it always receive all data no matter socket is buffered or not
10:01:26Araqall data is better than no data
10:02:41PMunch@Rika, with covid going on it's important to have a lot of spaces I've heard
10:04:07*krux02 joined #nim
10:06:15FromDiscord<Varriount> Oh, hey Araq
10:06:38bungit seems it returns 0 when no data anymore, 4 when theres 4 bytes remain for reading ?
10:08:16mipri4 when it read 4 bytes. it doesn't know how much or if any bytes are remaining
10:09:47bungwell, I first received 4 bytes that I expected and returns 4, then second it receive more data but returns 0
10:11:30miprithat's not how the underlying syscall works, so you could start by stracing the program to confirm what's actually happening
10:16:11bungoh, if that's correct , I misreading the debug info, it outputs first packet, the second actually get 0 data.
10:18:29*solitudesf quit (Remote host closed the connection)
10:23:03*solitudesf joined #nim
10:24:26*BitPuffin quit (Quit: killed)
10:24:26*k0mpjut0r quit (Quit: killed)
10:24:27*leorize[m]1 quit (Quit: killed)
10:24:28*reversem3 quit (Quit: killed)
10:24:29*Helios quit (Quit: killed)
10:24:29*GitterIntegratio quit (Quit: killed)
10:24:32*nikki93[m] quit (Quit: killed)
10:24:33*guelosk[m] quit (Quit: killed)
10:24:37*unclechu quit (Quit: killed)
10:24:37*leorize[m] quit (Quit: killed)
10:24:39*solitudesf1 quit (Quit: killed)
10:24:39*silvernode[m] quit (Quit: killed)
10:24:39*ee7[m] quit (Quit: killed)
10:24:39*hnOsmium0001[m] quit (Quit: killed)
10:24:43*brainbomb[m] quit (Quit: killed)
10:24:47*inamiyar[m] quit (Quit: killed)
10:24:48*lum[m] quit (Quit: killed)
10:24:48*stisa[m]1 quit (Quit: killed)
10:24:48*MTRNord[m] quit (Quit: killed)
10:24:48*themoon[m] quit (Quit: killed)
10:24:48*planetis[m] quit (Quit: killed)
10:24:49*VijayMarupudi[m] quit (Quit: killed)
10:24:50*Avatarfighter[m] quit (Quit: killed)
10:24:50*lnxw37d4 quit (Quit: killed)
10:34:52*jaens[m] joined #nim
10:38:18Yardanicostreaming random nim again (no voice chat in discord for now)
10:38:19Yardanico~ystream
10:38:20disbotystream: 11Stream at https://twitch.tv/yardanico, voice chat either on Mumble (mumble://uberalles.mumbl.io/) or in Discord (https://discord.com/invite/ezDFDw2) -- Yardanico
10:40:48*lbart_ joined #nim
10:41:55*lbart quit (Read error: Connection reset by peer)
10:52:32FromDiscord<ITR> How do I make a function borrowable? https://play.nim-lang.org/#ix=2BIoโ†ตAnd is there any equivalent to the items function I implemented for ranges in the standard library?
10:57:19Araqwhat's a "borrowable" function?
11:00:12*k0mpjut0r joined #nim
11:00:12*GitterIntegratio joined #nim
11:00:12*stisa[m] joined #nim
11:00:12*Avatarfighter[m] joined #nim
11:00:12*lnxw37d4 joined #nim
11:00:12*themoon[m] joined #nim
11:00:12*leorize[m]1 joined #nim
11:00:13*BitPuffin joined #nim
11:00:13*unclechu joined #nim
11:00:13*reversem3 joined #nim
11:00:13*inamiyar[m] joined #nim
11:00:13*leorize[m] joined #nim
11:00:13*planetis[m] joined #nim
11:00:13*Helios joined #nim
11:00:13*hnOsmium0001[m] joined #nim
11:00:13*MTRNord[m] joined #nim
11:00:13*brainbomb[m] joined #nim
11:00:18*VijayMarupudi[m] joined #nim
11:00:18*ee7[m] joined #nim
11:00:18*silvernode[m] joined #nim
11:00:18*solitudesf1 joined #nim
11:00:18*lum[m] joined #nim
11:00:18*nikki93[m] joined #nim
11:00:19*guelosk[m] joined #nim
11:06:12*lbart_ quit (Ping timeout: 260 seconds)
11:17:58*ForumUpdaterBot quit (Remote host closed the connection)
11:18:22*ForumUpdaterBot joined #nim
11:20:17ForumUpdaterBotNew post on r/nim by unknown_r00t: Macros vs functions, see https://www.reddit.com/r/nim/comments/jg83c9/macros_vs_functions/
11:20:21Yardaniconim updater bot now also supports the nim subreddit :)
11:20:56Yardanicothe irc nickname is kinda confusing though, not gonna lie :)
11:20:58Yardanicowill need to change it
11:21:37FromDiscord<Yardanico> @dom96 @treeform when you have time, please add a proper nim logo to the nim's subreddit :)
11:21:45FromDiscord<Yardanico> or maybe someone else, I don't know who can do that
11:23:26*abm joined #nim
11:44:27ForumUpdaterBotNew thread by Shirleyquirk: Isolated [T], see https://forum.nim-lang.org/t/6978
11:48:08Yardanicowould it be fine if the bot will also post new stackoverflow questions tagged "nim-lang"?
11:48:13Yardanicohere
11:52:24FromDiscord<haxscramper> I think it is fine, since there is not a lot of new questions on stackoverflow anyway - ~one question per week or something like that
11:52:37Yardanicoyeah, but if we answer more - SO will have more nim questions ;P
11:52:52YardanicoI just feel like some people might be used to SO so they'll go there to ask nim questions
11:53:05Yardanicoi want to keep the nim community decentralized but connected (tm)
11:53:09*TomDotTom joined #nim
11:53:09Yardanicothe bridge and this bot help with that
11:53:14*TomDotTom quit (Client Quit)
11:53:24Yardanicowill update nimeventer and test SO soon
11:53:31*TomDotTom joined #nim
11:55:15*ForumUpdaterBot quit (Remote host closed the connection)
11:55:31*ForumUpdaterBot joined #nim
11:57:15FromDiscord<ITR> Araq: A function I can use {.borrow.} with so that I don't have to reimplement them for distinct types. Basically, I want to use line 12 to borrow the iterator on line 8: https://play.nim-lang.org/#ix=2BIo
11:57:55*ForumUpdaterBot quit (Remote host closed the connection)
11:59:20*ForumUpdaterBot joined #nim
12:01:38Yardanicoadded stackoverflow support to the updater bot :)
12:03:17*ForumUpdaterBot quit (Remote host closed the connection)
12:04:03*ForumUpdaterBot joined #nim
12:04:27federico3randomly stumbling on some Nim code! https://github.com/mozilla/DeepSpeech-examples/tree/r0.8/nim_mic_vad_streaming/linux_nim_vad_streaming
12:04:41Yardanicohuh
12:05:06*rockcavera joined #nim
12:05:59ForumUpdaterBotNew question by pietroppeter: How to redirect output in a task in nimble, see https://stackoverflow.com/questions/64459653/how-to-redirect-output-in-a-task-in-nimble
12:06:01Yardanico^posted 2 days ago (the bot only saw it now)
12:06:01*supakeen quit (Quit: WeeChat 2.9)
12:06:05Yardanicobut it works ;)
12:06:24Yardanicoit now checks on the forum/reddit/SO every two minutes
12:06:38*supakeen joined #nim
12:06:46Yardanicoquite a small interval, yes, but I don't want the bot to miss forum events :)
12:07:51Yardanicostackoverflow API is easy to use, but it requires gzip or deflate
12:09:10Yardanicoat least now repo's description of nimeventer is true "Posts updates from various Nim communities to various Nim communities :)"
12:09:12Yardanico!repo nimeventer
12:09:12disbothttps://github.com/Yardanico/nimeventer -- 9nimeventer: 11Posts updates from various Nim communities to various Nim communities :) 15 3โญ 0๐Ÿด
12:09:17Yardanicowow disbot is fast now, what happened
12:11:18FromDiscord<Recruit_main707> disbot answered before the question :o
12:14:41Yardanico@Recruit_main707: well I use asyncCheck for async http(s) requests, so discord webhook got the disbot's reply faster than my message
12:26:16*vivus joined #nim
12:31:19*bung quit (Ping timeout: 246 seconds)
12:31:34*bung joined #nim
12:34:15*lbart joined #nim
12:34:15*lbart quit (Changing host)
12:34:15*lbart joined #nim
12:35:22Yardanicohm guess I should try uploading some of my nim stream vods to youtube
12:35:26Yardanicomaybe some people will watch me
12:35:32Yardanicos/me/them
12:59:38FromDiscord<kodkuce> you know that aync doom i cryed about all time crashing
12:59:59FromDiscord<kodkuce> just runed my server in vbox x86 insted on rpi4 and i get no crash
13:00:06FromDiscord<kodkuce> same stuff behind nginx
13:00:16FromDiscord<kodkuce> no crash on connection termination
13:02:46FromDiscord<kodkuce> so duno maybe arm64 has some issue or duno
13:11:39PMunchHmm, that is really odd
13:11:54PMunchYardanico, I've been thinking about doing something similar
13:12:03FromDiscord<Yardanico> ?
13:12:10PMunchBut it sorta requires a simple enough project for people actually being able to get into watching them
13:12:16FromDiscord<Yardanico> streaming Nim?
13:12:18FromDiscord<Yardanico> Ah yeah
13:12:27FromDiscord<Yardanico> I just reupload to YouTube :P
13:17:29PMunchYeah streaming Nim
13:23:16*narimiran quit (Ping timeout: 265 seconds)
13:24:33*narimiran joined #nim
13:29:37*NimBot joined #nim
13:29:50*ForumUpdaterBot joined #nim
13:34:19*letto quit (Ping timeout: 246 seconds)
13:38:43*arecacea1 quit (Read error: Connection reset by peer)
13:39:18*arecacea1 joined #nim
13:45:38*jken_ quit (Quit: ZNC - https://znc.in)
13:47:15*jken joined #nim
13:47:25FromDiscord<djazz> docs are a bit hard to read with the text overlapping https://media.discordapp.net/attachments/371759389889003532/769195269848956968/Screenshot_from_2020-10-23_15-46-32.png
13:47:56FromDiscord<Clyybber> fixed on devel, waiting for the cache to expire
13:48:09FromDiscord<djazz> k
13:49:31leorize[m]1not fully fixed on devel actually
13:49:50leorize[m]1if you have an overly verbose name it would still spills over
13:49:51leorize[m]1better than nothing though
13:53:37*vicfred quit (Ping timeout: 264 seconds)
13:57:29bungrecvInto should in loop ?
14:04:43*lbart joined #nim
14:04:43*lbart quit (Changing host)
14:04:43*lbart joined #nim
14:04:58*bunbunbunbunny joined #nim
14:17:13FromGitter<jrfondren> generally there's a loop involved somewhere. you might get better help by showing specifically what you have and what you're trying to do.
14:19:13FromGitter<jrfondren> this code is a horrific abomination that should not be emulated, but you can still see that I'm looping over a selector to get I/O events, and calling recv when prompted by that: https://play.nim-lang.org/#ix=2BJs
14:21:17FromDiscord<exelotl> oh yeah an interesting thing that ooc did, was force you to add an additional name tag to your overloaded functions
14:21:23FromGitter<jrfondren> https://nim-lang.org/docs/asyncnet.html has recvLine in a loop similarly
14:21:27FromGitter<jrfondren> the example at the top of that page
14:22:30FromDiscord<exelotl> for example you could define `abs~withInt(n: Int)` and `abs~withFloat(n: Float)`
14:23:52FromDiscord<exelotl> which would let you explicitly choose which version to call in the case of ambiguity, and also was potentially nice for documentation (I don't really like the "abs,int" thing we've got going in the doc navigation menu right now, it feels super noisy)
14:25:13FromDiscord<exelotl> not saying we should adopt the ooc solution, just that we should probably think twice about the new navigation structure, it feels kinda horrible
14:25:23*arecacea1 quit (Remote host closed the connection)
14:25:50bungjrfondren I understand the example, my code old version use recv, it's in receive-send mode, when I change to recvInto it doesn't like in that mode, the await recvInto behavior like asyncCheck recvInto
14:25:58*arecacea1 joined #nim
14:32:19*bunbunbunbunny quit (Quit: Lost terminal)
14:34:46FromDiscord<MiniApple> is nim garbage collection
14:35:18FromDiscord<exelotl> @MiniApple you can choose
14:35:23FromDiscord<MiniApple> hmm
14:35:24FromDiscord<MiniApple> choose?
14:35:32FromGitter<jrfondren> https://nim-lang.org/docs/gc.html talks about that
14:36:16FromDiscord<MiniApple> if i compile my code using `nim c main.nim`
14:36:37FromGitter<jrfondren> then you're using the default refc GC
14:36:57FromDiscord<MiniApple> ok
14:37:11FromDiscord<MiniApple> default is GC
14:37:16FromDiscord<MiniApple> i see
14:38:31*letto joined #nim
14:40:44FromDiscord<kodkuce> nah am getting that file discriptor too in vbox that its not arm issue its my doom issue
14:40:53FromDiscord<kodkuce> (edit) "nah ... am" added "my bad"
14:40:58FromGitter<jrfondren> there are some other languages where "default is GC" means "you can flog yourself if you want to avoid the GC, I guess"; the non-GC option requires huge changes to your code and might not work that well with other people's GC-assuming. Nim has a better story here with arc
14:45:15FromDiscord<lqdev> the new docs suck honestly
14:45:19FromDiscord<lqdev> from a design perspective
14:45:40FromDiscord<lqdev> my idea was to _not_ group non-overloaded procs, but nobody listened to me.
14:45:57FromDiscord<lqdev> for overloads, we could just hide the name entirely and only show the parameters in a human-friendly way
14:46:08FromDiscord<lqdev> ie. not the current int,something[T],set[foo]
14:46:40FromDiscord<lqdev> rather (i: int; thing: something[T]; foos: set[foo])
14:46:48FromDiscord<lqdev> maybe omit the names
14:49:14FromDiscord<Rika> names arent needed
14:49:22FromDiscord<Rika> well, maybe sometimes
14:53:35FromGitter<jrfondren> better search, type-based search like hoogle, more examples, and just a flat index of names without parameters information or groupings.
14:55:44FromDiscord<haxscramper> There is no `--print-errors-as-json` or any other way to make nim compiler output machine-readable text, right? So if I want to somehow wrap binary I need to just parse whatever is printed back?
14:58:40bungyou should implement it yourself, the default only have repr
15:01:19bungyou can use std's json marshal lib I think
15:04:34FromDiscord<haxscramper> I mean various compiler hint messages, warnings, type errors etc. I looked into `compier/msgs` and it seems everything is just dumped into text immediately
15:05:37FromGitter<gogolxdong> How to solve the order of two mutual dependent object type in a file?
15:06:15FromDiscord<Rika> put them in the same type block
15:08:45FromGitter<gogolxdong> where documents this?
15:10:34FromDiscord<haxscramper> ~manual
15:10:34FromDiscord<haxscramper> https://nim-lang.org/docs/manual.html#type-sections
15:10:35disbotmanual: 11the Nim Manual is https://nim-lang.org/docs/manual.html
15:10:35FromGitter<jrfondren> https://nim-lang.org/docs/manual.html#type-sections
15:11:13FromGitter<jrfondren> "Mutually recursive types are only possible within a single type section. " there
15:13:19FromDiscord<exelotl> @lqdev one idea I had was something like https://media.discordapp.net/attachments/371759389889003532/769216888168251413/unknown.png
15:14:05FromDiscord<exelotl> enough to tell you that there are multiple implementations, and link to them, but avoids having `gcd` listed 3 times
15:15:33FromDiscord<Rika> too ambiguous
15:15:40FromDiscord<Rika> which is int, which is float, which is which?
15:15:54FromDiscord<exelotl> you have to go there to find out, just like before
15:16:06FromDiscord<exelotl> only now it doesn't take up 3 lines in the menu
15:16:51FromDiscord<Rika> why? that wastes time dunnit
15:17:10ForumUpdaterBotNew thread by Benjamindlee: Docs: Remove gensym from arguments for procs defined in templates?, see https://forum.nim-lang.org/t/6979
15:19:25*opal quit (Remote host closed the connection)
15:19:44FromDiscord<lqdev> @Rika it's typical for overloads to be close to each other
15:19:47FromDiscord<exelotl> I agree that not being able to tell is a problem, but this isn't trying to solve that, it's just trying to be less cluttered than what we had before
15:19:56*opal joined #nim
15:30:00FromDiscord<dom96> ooh new docs are cool
15:30:12FromDiscord<dom96> but shouldn't we group by the first argument type?
15:30:37leorize[m]1we already got that
15:30:45leorize[m]1and then this version get rid of it for proc name overloading
15:31:02Zevv?
15:31:06FromDiscord<dom96> yeah, we did have that but it was a shitty implementation IMO
15:31:22FromDiscord<dom96> it should be the default really
15:31:23FromDiscord<Clyybber> we should probably have different sorting options
15:32:13*vicfred joined #nim
15:34:53FromDiscord<haxscramper> https://play.nim-lang.org/#ix=2BJX Template gives 'undeclared identifier' error when I put it in generic, but only for second line (`discard`). `assert` works fine and the same code but without generics also compiles without problems
15:39:21Zevvyou broke it dude
15:42:11FromDiscord<haxscramper> Even simpler example, now I"m even more confused https://play.nim-lang.org/#ix=2BJZ
15:42:33Zevvyeah I got it down to something like that as well
15:42:44FromDiscord<Clyybber> heh, thats a nice bug
15:43:19Zevvbut now your code is wrong in othe rways. Remove the generics from g() and it's broken because of opt
15:43:33Zevvjust a detail, but still
15:44:02FromDiscord<Clyybber> oh, hmm, nope that bug isn't neat. I thought it may be a bug of discard but it happens with a proc too
15:44:14ZevvRIGHT
15:44:17Zevvoop sorry
15:46:33*narimiran quit (Quit: leaving)
15:47:43*Helios quit (Ping timeout: 244 seconds)
15:49:04bunghttps://imgshare.io/image/97e3aabd9a9d7d9cbc7642c82ce5881f.NYiBq9
15:49:31*Helios joined #nim
15:49:43bungam sending two before get first response ?
15:51:39FromDiscord<Clyybber> @haxscramper can you report it?
15:51:42FromDiscord<haxscramper> Yes, on it
15:51:53FromDiscord<Clyybber> k thanks
15:56:16FromDiscord<haxscramper> Two bug reports per day, new personal record
15:56:34FromDiscord<Clyybber> \o/
15:59:52*hnOsmium0001 joined #nim
16:00:09*jaens[m] quit (Quit: Idle for 30+ days)
16:02:13reversem3Curious if anyone knows of a nim group for learning , besides flooding this chan if questions over and over again?
16:02:20reversem3 * Curious if anyone knows of a nim group for learning , besides flooding this chan with questions over and over again?
16:02:54disrupteki think it's more useful to share your questions here.
16:03:47reversem3Its just you guys talk more about advanced topics and some of us feel really stupid sometimes (:
16:04:16disrupteklqdev: agree re docs.
16:05:05Zevvreversem3: asking questions over and over is just fine, as long as you learn from the answers
16:05:22reversem3ok sounds good (:
16:05:56ZevvEven after three years of Nim I ask stupid questions here on a regular basis
16:06:13reversem3lol ok
16:06:17FromGitter<topcheese> Yeah they always seem good with answering question, but I feel you on the advanced topics here. hahaha
16:06:21FromDiscord<kodkuce> duno if i should rewrite my backend again in Nim or do it in python or nodejs, i am afraid if i rewrtie will again get that file descriptor error :(
16:07:19disrupteki probably understand about 30% of this language. enough to be dangerous.
16:07:57FromGitter<topcheese> I actually learn a lot from the topics, but most of the time it's over my my head.
16:09:10disrupteki dunno, i think a lot of understanding accretes slowly.
16:09:36disruptekwhat's great about irc is that you learn the pain points.
16:09:43disruptekit's hard to really absorb that elsewhere, i think.
16:11:45FromGitter<topcheese> Some day I hope to be a Nimpleton.
16:12:04disruptekc'mon, we all start as nimpletons.
16:13:22FromGitter<topcheese> What then graduate into a Nimpson, you know a family?
16:13:50FromDiscord<lqdev> how can i profile what's taking really long when compiling?
16:13:53disruptekno, the second level is called `Yardanico`.
16:14:07FromDiscord<lqdev> it seems that after all the modules are processed the compiler does something
16:14:08FromGitter<topcheese> Or cool like a Nimpster?
16:14:15FromDiscord<lqdev> and i want to know what's taking so long
16:14:25disruptekme too.
16:14:49FromDiscord<lqdev> @Clyybber you told me a while ago that there's a VM profiler
16:15:05FromDiscord<haxscramper> `--profileVM:on`
16:15:24disruptekit's pretty crude, though.
16:16:14FromDiscord<lqdev> good enough
16:17:11FromDiscord<lqdev> hmm so it seems like the hot spots in the VM take maybe 0.4s
16:17:19FromDiscord<lqdev> still doesn't answer my questionโ€ฆ
16:17:23FromDiscord<lqdev> maybe it's C codegen?
16:17:32disruptekentirely possible.
16:17:48*PMunch quit (Quit: leaving)
16:17:59FromDiscord<lqdev> what does the compiler do after it processes modules, yet before it compiles and links the generated C code?
16:18:06disruptekfinally made my full-object-export macro. https://github.com/disruptek/grok/blob/master/grok/star.nim
16:18:17disrupteklqdev: it has to write out the files.
16:18:25reversem3I'm just so sick of python , its breaks all the time , I want something stable
16:18:32disruptekwe assume that backend codegen is about a third of compilation time.
16:18:52reversem3it took forever on a i7 to build 1.4 though
16:19:02reversem3but it is much faster
16:19:07disruptekthere's no reason to build nim.
16:19:09disruptek~gitnim
16:19:09disbotgitnim: 11https://gitnim.com/ -- choosenim for choosey nimions -- disruptek
16:19:25FromDiscord<lqdev> disruptek: so the only way to decrease that time would be to either get a better processor or have less modules?
16:19:46disruptekor wait a few weeks for ic.
16:20:08FromDiscord<lqdev> i'll wait
16:20:12Zevvwait, what, really?
16:20:15Zevvyou're getting there?
16:20:17FromDiscord<lqdev> but then there's another weird thing in 1.4
16:20:27FromDiscord<lqdev> for some reason it always recompiles all my {.compile.}d C files
16:20:33FromDiscord<lqdev> 1.2 didn't do that
16:20:37FromDiscord<lqdev> is that a bug?
16:21:04disruptekit sounds like it.
16:21:09Zevvdude!
16:21:21disruptekZevv: well, the hard part was always mangling.
16:21:33ZevvI thought you threw the towel definitaly
16:21:36disruptekmangling works, for some measure of "work", so...
16:21:38Zevvdefinivealy
16:21:39Zevvdamn
16:21:55disruptekoh i've thrown in the towel definitely, definitively, and all other forms of defiantly.
16:22:04Zevvright so
16:22:22disruptekwhat day is it?
16:22:33Zevvi forgot long ago
16:22:38disruptekwell, it could go in this week i guess. probably next week.
16:22:58disrupteki have to polish a couple things so lqdev doesn't freak out at the compilation speed.
16:23:06Zevvput in some sleeps you mean
16:23:16disruptekyeah. i have to make it look /hard/ at least.
16:23:25Zevvbetter busy-wait then
16:23:43disruptekalso, timmy asked for some more compilation switches and progress-related terminal output.
16:23:59disruptekthe guy just really loves helpers. i dunno what to say.
16:24:09FromDiscord<Clyybber> Zevv: its green
16:24:14Zevvso am I
16:24:26ZevvI'm waiting until I'm a grown up
16:24:28disruptekZevv: you're sick about tracy, huh.
16:25:39Zevvoh not at all. I'm not botherd by these things anymore
16:25:57disruptekcross your fingers, i might lose power in a sec.
16:26:19reversem3<disruptek "there's no reason to build nim."> I had to with choosenim
16:26:31disruptekwut
16:26:45disruptekwhy?
16:26:58Zevvcross your fingers, i might lose po%!@#!$#$*@2 NO CARRIER
16:27:11FromDiscord<lqdev> seems like that C compilation thing is fixed on devel
16:27:18FromDiscord<lqdev> guess it'll be included in 1.4.2
16:27:48disrupteki wish we versioned more.
16:28:08disruptekreversem3: honestly, i think if you're building the compiler, you're doing it wrong.
16:28:43disruptekand that's coming from a die-hard gentoo user, so...
16:29:34*Sembei quit (Quit: WeeChat 2.9)
16:31:20disrupteklqdev: what are you working on?
16:31:56FromDiscord<Clyybber> TIL I'm doing it wrong
16:32:04reversem3<disruptek "and that's coming from a die-har"> All I did was choosenim update stable
16:32:18disruptekyou're fucked, son.
16:32:33reversem3I have build nim before for fun , cause I like pain lol
16:32:41disruptekclyybber: i don't even build nim when i work on the compiler.
16:33:15FromDiscord<lqdev> disruptek: a game
16:33:21FromDiscord<lqdev> hence why i want fast compile times
16:33:21FromDiscord<Clyybber> disruptek thats where all your time goes
16:33:36*reversem3 sent a long message: < https://matrix.org/_matrix/media/r0/download/matrix.org/TULfsXxXsRPcVOlmWuQhMECc/message.txt >
16:33:40FromDiscord<Clyybber> @lqdev what are your compile times rn?
16:33:54disruptekmaybe. it takes a long time to run the vm on my chalk slate what with all these new registers zevv added.
16:33:57FromDiscord<lqdev> about 5 seconds + 2 seconds for glfwInit
16:34:03disrupteklol
16:34:06FromDiscord<Clyybber> lol
16:34:56disruptekwhy does choosenim think that 1.4.0 is stable?
16:35:04disruptekdid i miss a memo?
16:35:17FromDiscord<Clyybber> ~disruptek
16:35:18reversem3I thought it was stable
16:35:18disbotdisruptek: 11a sexy fella with magic hands.
16:35:18disbotdisruptek: 11:disruptek: -- Clyybber
16:35:18disbotdisruptek: 11an unsafe nil deref
16:35:32FromDiscord<Clyybber> reversem3: hes just messing with you
16:35:38disrupteknope.
16:35:43reversem3Is he the "magic man"
16:35:52disruptekyou heard about me, huh?
16:36:05reversem3from the song yes
16:36:09reversem3lol
16:36:13FromDiscord<Clyybber> disruptek: removed the latest entry did we?
16:36:27disruptekwhat latest entry?
16:36:38FromDiscord<Clyybber> or I dreamt
16:36:44disruptekwhen you add an entry you remove your previous entry.
16:36:49FromDiscord<Clyybber> oh
16:36:56FromDiscord<Clyybber> :disruptek:
16:37:33disruptekevery time someone uses the :disruptek: emote i feel a little shiver in the netheregions.
16:38:22disruptek1.4 isn't stable. it's "the latest development release".
16:39:37FromDiscord<Clyybber> no
16:39:58disruptekwell, i'd like an rfc on this, honestly.
16:40:00reversem3So confused
16:40:04disrupteki think the messaging is extremely poor.
16:40:10FromDiscord<Clyybber> I'd like an RFC for disruptek to shut up
16:40:17FromDiscord<Clyybber> :D
16:40:33FromDiscord<Clyybber> reversem3: disruptek often thinks about words
16:40:36disruptekyeah, you better add a fuckin' smiley.
16:40:37FromDiscord<Clyybber> and only words
16:40:43FromDiscord<Clyybber> lol
16:41:09reversem3Its like watching toddlers fight over a toy (:
16:41:14disruptekwe've gone back and forth on what 1.0 and 1.2 mean.
16:41:41FromDiscord<Clyybber> disruptek: if you consider 1.2 to be a development release too then fine
16:41:57disruptekwe support 1.2 for status reasons. we support 1.0 for lts reasons. now we call 1.4 "stable" even though it was released, with much difficulty, only a week ago?
16:42:05disruptekyeah, i considered 1.2 a devel release.
16:42:37disruptek1.4 is about --> this <-- far from head ffs.
16:43:14disruptekclyybber: you can merge criterion btw.
16:43:27FromDiscord<Clyybber> how long does it take now?
16:43:28disrupteki think it won the race but i'll win the war.
16:45:29FromDiscord<Clyybber> well your PR is red
16:45:39FromDiscord<Clyybber> Error: NimScript file does not exist: tests/compiler.nims
16:45:51disrupteklike i said. i lost the race.
16:46:04disrupteksee, there was this brunette and we got to talking and...
16:47:07disrupteknevermind, i guess araq wants it sped up.
16:48:00FromDiscord<Clyybber> > https://github.com/nim-lang/Nim/issues/10744#issuecomment-715454728โ†ตlol
16:48:01disbotโžฅ better navigation
16:50:17*zielmicha___ joined #nim
16:50:17Axiomaticgit checkout nim1.4; git checkout -f nim-1.0 -- .
16:51:55FromDiscord<Clyybber> disruptek: witness the harvest of your FUD
16:52:09FromDiscord<Clyybber> (edit) "harvest" => "fruits"
16:52:27disruptek~disrupte is a fruit witness.
16:52:27disbotdisrupte: 11a fruit witness.
16:52:32disruptek~disruptek is a fruit witness.
16:52:32disbotdisruptek: 11a fruit witness.
16:52:33disbotdisruptek: 11:disruptek:
16:52:33disbotdisruptek: 11an unsafe nil deref
16:53:03disruptekactually, they gave up talking about llvm eventually.
16:53:05FromDiscord<Clyybber> we should base IC on fruits honestly
16:53:11disruptekikr?
16:53:22FromDiscord<Clyybber> disruptek: Yeah, I'm talking bout your latest work
16:53:31disruptekwhat did i do?
16:53:44FromDiscord<Clyybber> check the message above my message
16:55:27disruptekeh that's just a knucklehead pasting into the wrong window.
16:56:07disrupteknothing to do with me.
16:57:32*VijayMarupudi[m] quit (*.net *.split)
16:57:33*k0mpjut0r quit (*.net *.split)
16:57:33*zielmicha__ quit (*.net *.split)
16:57:34*opal quit (*.net *.split)
16:57:38*zielmicha___ is now known as zielmicha__
16:59:19FromGitter<topcheese> nooo, I missed the llvm talk? I'm not ready for it anyway.\
16:59:44FromDiscord<Clyybber> more U
17:00:07*Cthalupa quit (Ping timeout: 246 seconds)
17:01:31FromGitter<topcheese> Because I don't understand why it's not used like in Zig, but I know there's some nim/zig thing that was going on. I remember that.
17:02:11disruptekyou mean like a fight between nim and zig?
17:02:37*Cthalupa joined #nim
17:03:02FromGitter<topcheese> No, like feeling stupid for asking why Nim doesn't use llvm like Zig to cross-compile ... so yeah I guess a fight. hahaha
17:03:22supakeenwe both sent selected community members to a tiny arena in the ocean
17:03:27supakeenthe fights have not yet concluded
17:03:42disruptekyou can see the smoke on google earth though.
17:03:44FromGitter<topcheese> I mean llvm is suppose to be built for that, but I just have to search for the previous talks.
17:04:33disrupteknim doesn't use llvm because everyone is afraid we won't have the critical portability we need to get those three embedded neckbeards using the language.
17:05:07leorize[m]1well it's simple
17:05:09*abm quit (Quit: Leaving)
17:05:12FromGitter<topcheese> Well not everyone like to ride the bandwagon.
17:05:38leorize[m]1nim predates llvm being mainstream :P
17:05:52FromGitter<topcheese> haters going to hate.
17:05:57FromDiscord<Clyybber> topcheese: did you see https://github.com/arnetheduck/nlvm ?
17:06:27leorize[m]1before llvm was good people generates C
17:06:28*VijayMarupudi[m] joined #nim
17:06:36FromGitter<topcheese> It's been awhile, I was meaning to check out recent updates.
17:06:38leorize[m]1so that's why Nim generates C
17:06:52disruptek~leorize
17:06:53disbotleorize: 11responsible for the awesome NeoVim plugin at https://github.com/alaviss/nim.nvim -- disruptek
17:07:09leorize[m]1currently there are a lot more things with higher priority than moving to llvm
17:07:23disruptek~leorize is our patron saint of ci/cd.
17:07:23disbotleorize: 11our patron saint of ci/cd.
17:07:55FromGitter<topcheese> I was also looking at crossdocker for Nim, but I'm not currently doing Docker.
17:08:05Zevvgood
17:08:07disrupteki thought they made pants.
17:08:13FromGitter<topcheese> I feel that leorize.
17:08:33disrupteki don't think you're supposed to touch saints.
17:08:43FromGitter<topcheese> hahaha
17:09:13FromGitter<topcheese> It's good to know that we have options with Nim.
17:09:22disrupteki really want labels on our pulls. this is silly.
17:16:21FromDiscord<Python> Wait what
17:16:32FromDiscord<Python> @disruptek
17:16:43disruptekyeah, pants.
17:16:43FromDiscord<Python> R u a actual bot or like
17:16:47disruptekthey make pants.
17:16:55FromDiscord<Python> ?
17:16:58FromDiscord<Python> @disruptek hi
17:17:04supakeenPython: one gets used to disruptek
17:17:17disruptekor one gets used by disruptek.
17:17:27FromDiscord<Python> @supakeen can I invite u to my server
17:17:30FromDiscord<Python> Ur fake
17:17:33FromDiscord<Python> They control u
17:17:47FromDiscord<Python> @supakeen
17:17:53FromDiscord<Python> @disruptek
17:18:45supakeenNo, go away.
17:18:46AxiomaticAgain the Bridge of Confusion gives from its bounty...
17:18:51disrupteklol
17:24:18FromDiscord<Jahoskie> Slotterey shit
17:35:10*arecacea1 quit (Remote host closed the connection)
17:35:34*arecacea1 joined #nim
17:36:07*luismanfroni joined #nim
17:48:39*opal joined #nim
17:54:04*lritter quit (Ping timeout: 256 seconds)
17:56:27*bung quit (Quit: Lost terminal)
18:02:55FromDiscord<lqdev> ~bridgebots is the Discord channel is bridged to IRC. the bot users you are seeing are controlled by a webhook that sends messages from IRC onto Discord, so those are actual users.
18:02:56disbotbridgebots: 11the Discord channel is bridged to IRC. the bot users you are seeing are controlled by a webhook that sends messages from IRC onto Discord, so those are actual users.
18:07:11FromDiscord<Rika> who the hell were those two
18:07:25*tane joined #nim
18:07:31Zevvand who sent them
18:09:45FromDiscord<Nim> oh
18:11:13FromDiscord<Recruit_main707> so now we have python and nim
18:13:28disrupteki've had a python for decades.
18:14:17disruptekclyybber: we'll try removing the trailing _ but i'm pretty sure someone will puke on it.
18:29:15*vivus quit (Quit: Leaving)
18:41:13*luismanfroni quit (Ping timeout: 272 seconds)
18:49:50FromDiscord<shashlick> @dom96 / @leorize - please review the choosenim PR if any other feedback - https://github.com/dom96/choosenim/pull/238
18:49:51disbotโžฅ Linux build, windows init.sh fixes
18:50:17FromDiscord<shashlick> meanwhile, i'll continue saying bye bye mentally to travis - https://twitter.com/genotrance/status/1319709620420620290
18:55:18supakeenOh PMunch isn't here.
18:55:40ForumUpdaterBotNew post on r/nim by shujidev: How does to do type inference on proc return?, see https://www.reddit.com/r/nim/comments/jgtbbn/how_does_to_do_type_inference_on_proc_return/
19:03:55*landerlo joined #nim
19:09:30FromDiscord<alehander42> HAHAHAH
19:09:40Zevvyou ok?
19:09:48FromDiscord<alehander42> sorry man
19:10:00FromDiscord<nikki> i'm actually really into how nim generates c bc. i can go see the generated c and see all of the calling that happens... esp. nice with `--gc:arc` and `-d:danger` . c is a nice IR that doesn't have much 'invisible control flow'
19:10:16FromDiscord<alehander42> i liked
19:10:19FromDiscord<alehander42> the llvm comments
19:10:22supakeenSay I want to test some non exported functions from a package, can I somehow get at them without *?
19:10:31FromDiscord<alehander42> yeah i like generating C as well
19:10:34FromDiscord<alehander42> it's simple
19:10:40Zevvalehander42: a bit slow today, right
19:10:47FromDiscord<alehander42> i got off work
19:10:50Zevvsupakeen: nope
19:10:52FromDiscord<alehander42> i try to
19:10:54FromDiscord<alehander42> skip nim
19:10:58FromDiscord<alehander42> on work
19:11:03supakeenZevv: How do you deal with it, just exporting them?
19:11:10FromDiscord<Clyybber> supakeen: you could include the file
19:11:13Zevvor put the tests in the source file
19:11:14FromDiscord<nikki> @alehander42 how do u manage to do that, must be hard
19:11:17FromDiscord<alehander42> today i tried to understand load factors in rust
19:11:28FromDiscord<alehander42> interesting ways to override that
19:11:30Zevvor include
19:11:33supakeenThanks I'll look at the include.
19:11:38Zevvinclude might your best bet yeah
19:11:51FromDiscord<Clyybber> @alehander42 What is that?
19:11:59Zevvyeah, rust, what is that?
19:12:16FromDiscord<Clyybber> yeah rust, what?
19:12:23supakeenYea, I like the include works without reorganizing :)
19:12:28FromDiscord<alehander42> i mean
19:12:34FromDiscord<alehander42> changing the load facrtor
19:12:36FromDiscord<nikki> is that like crust without the c
19:12:39FromDiscord<alehander42> when resizing a vec
19:12:48FromDiscord<alehander42> interesting if languages offer stuff like this
19:13:07FromDiscord<alehander42> probably just
19:13:09FromDiscord<Clyybber> oh, you mean the growth factor?
19:13:27FromDiscord<alehander42> yes
19:13:30FromDiscord<alehander42> maybe a custom method
19:13:33FromDiscord<nikki> load factor is percentage of stuff that is not filled
19:13:34FromDiscord<alehander42> is easiest usually
19:13:45FromDiscord<nikki> growth factor is newcap/oldcap i guess
19:13:52ForumUpdaterBotNew post on r/nim by shujidev: How to do type inference on proc return?, see https://www.reddit.com/r/nim/comments/jgtogh/how_to_do_type_inference_on_proc_return/
19:14:02FromDiscord<alehander42> ahhh thanks
19:14:08FromDiscord<alehander42> this makes sense
19:14:16FromDiscord<alehander42> well they are related
19:14:17FromDiscord<alehander42> i guess
19:14:19FromDiscord<Clyybber> @alehander42 Rust itself doesn't make strong guarantees about the internal growth factor, does it?
19:14:31FromDiscord<alehander42> well its impl defind i think
19:14:39FromDiscord<alehander42> currently 2.0 for most cases in vec!
19:14:39FromDiscord<Clyybber> yeah
19:14:44FromDiscord<nikki> definitely related -- if you are at capacity, then the growth factor - 1 is the load factor after resize
19:14:44FromDiscord<alehander42> but not for the first one
19:14:47FromDiscord<alehander42> i think it makes it 8b
19:14:47reversem3Is there such thing as an Asynchronous input stream yet ?
19:15:05FromDiscord<alehander42> but its cool to think
19:15:07FromDiscord<alehander42> e.g. i didnt know
19:15:10FromDiscord<alehander42> shrink can reallocate
19:15:13FromDiscord<alehander42> like dude
19:15:16FromDiscord<alehander42> srsly
19:15:18FromDiscord<alehander42> but it makes sense
19:15:22FromDiscord<alehander42> because fragmentation
19:15:22FromDiscord<nikki> i've only seen 'load factor' mentioned more for eg. hash tables than vectors
19:15:49FromDiscord<nikki> yeah in eg. c++ -- removing elems doesn't relocate, but you can call `.shrink_to_fit` to make it do that
19:15:51FromDiscord<alehander42> depends on allocator it seems
19:15:54FromDiscord<nikki> reallocate
19:15:56FromDiscord<nikki> that too
19:16:02FromDiscord<alehander42> but my understanding is rust's
19:16:08FromDiscord<alehander42> shrink_to_fit can lead to realloc
19:16:10FromDiscord<alehander42> eventually
19:16:14Zevvit should
19:16:15FromDiscord<alehander42> i might be wrong
19:16:15FromDiscord<nikki> yeah
19:16:18supakeenWew, I'm almost setup enough to start implementing the npeg bits in my project Zevv :)
19:16:23FromDiscord<nikki> also it's better to shrink only when you go below 0.25, if you expand on 2
19:16:30FromDiscord<nikki> altho 2 is not a good growth factor IMO bc. you can never reuse old mem
19:16:35FromDiscord<alehander42> hm, it makes sense to be able
19:16:38Zevvsupakeen: sweet. what ya parsing again?
19:16:38FromDiscord<alehander42> to generic those
19:16:48FromDiscord<nikki> like if you keep allocating 1, 2, 4, 8 -- every new array can't reuse old memory. you will keep growing your page
19:16:53FromDiscord<alehander42> e.g. Vec<Growth=1.5, Shrink=0.5>
19:16:56*landerlo quit (Remote host closed the connection)
19:16:57supakeenZevv: Command lines, I just setup the re-assemble and properly quote argv so I can start feeding it into parsers.
19:17:09FromDiscord<alehander42> but i can see how this might be unexpectd
19:17:13FromDiscord<nikki> bc. size_i > sum_{j < i} size_j
19:17:16supakeenGoing to define a few flavours of parsing and then write some things so you can define 'this is exclusive with that' and such :)
19:17:24Zevvsupakeen: cool, keep me informed of your progress
19:17:29supakeenWill do!
19:18:00FromDiscord<Clyybber> @alehander42 if they are generic params are they convertible?
19:18:30FromDiscord<nikki> https://github.com/facebook/folly/blob/master/folly/docs/FBVector.md#memory-handling
19:18:43FromDiscord<nikki> > This was not a good choice: it can be mathematically proven that a growth factor of 2 is rigorously the worst possible because it never allows the vector to reuse any of its previously-allocated memory.
19:18:44FromDiscord<alehander42> good question
19:18:58FromDiscord<alehander42> not sure
19:19:12FromDiscord<nikki> > remarkable equality
19:19:16FromDiscord<nikki> lol, word
19:19:29FromDiscord<alehander42> but they should be like with `::<>`
19:19:41FromDiscord<alehander42> i guess on theory
19:20:04FromDiscord<alehander42> but you wouldn't want to mix them too much
19:20:07FromDiscord<alehander42> i think
19:20:25FromDiscord<Clyybber> it won't cause incorrect behaviour but it might invalidate your expectations
19:20:38FromDiscord<Clyybber> but if you don't have them convertible you have to specialize everything
19:20:48FromDiscord<Clyybber> and end up with tons of code
19:20:54FromDiscord<alehander42> eh it can be just
19:20:59FromDiscord<alehander42> a constructor thing then
19:21:06FromDiscord<alehander42> Vec::new_with_growth(..)
19:21:10FromDiscord<alehander42> but this might be worse
19:21:15FromDiscord<Clyybber> then its a runtime value :D
19:21:20FromDiscord<alehander42> in nim
19:21:24FromDiscord<alehander42> hm
19:21:28FromDiscord<alehander42> i want to see concepts !
19:21:29FromDiscord<alehander42> now
19:21:36FromDiscord<alehander42> with all the traits it seems so easy
19:21:42FromDiscord<alehander42> to specify custom behavior that way
19:21:55FromDiscord<alehander42> e.g. Error Deref Try
19:22:21FromDiscord<nikki> i like nim
19:22:22FromDiscord<alehander42> Try makes it so your custom type can use the `a?()` early err return thing
19:22:46FromDiscord<nikki> in nim ufcs kinda just makes that work right?
19:22:52FromDiscord<alehander42> well, not sure
19:23:06FromDiscord<alehander42> it's more about, how to make sure my type can be X
19:23:20FromDiscord<alehander42> i guess i can just overload a method / macro / function for it
19:23:32FromDiscord<alehander42> but what exactly is it: easiest to read that in a concept
19:23:45FromDiscord<alehander42> and be able to see Type implment Iterable, Try etc
19:23:59FromDiscord<alehander42> probably this is my newbie rust feel speaking, so i
19:24:02FromDiscord<nikki> yea for sure
19:24:06FromDiscord<alehander42> want to see what better alternatives there are
19:24:11FromDiscord<nikki> i was addessing rusty traits
19:24:15FromDiscord<nikki> concepts make sense to me
19:24:16FromDiscord<alehander42> typeclasses in haskell?
19:24:28FromDiscord<nikki> but depends on whether you mean "compiles(<any expr>)"
19:24:59Zevvso, what's on the roadmap for 1.6 by the way
19:25:43FromDiscord<alehander42> in nim tho
19:36:41disruptek1.6 is ic and orc, baby.
19:36:51Zevvsweet sweet
19:36:56disruptekand hopefully, not nil.
19:37:00reversem3can you use threads:on in inim ?
19:38:20FromDiscord<djazz> ic?
19:38:34Prestigeincremental compilation
19:38:39FromDiscord<haxscramper> ~ic
19:38:40disbotno footnotes for `ic`. ๐Ÿ™
19:38:44FromDiscord<djazz> ah sweet
19:39:39FromDiscord<djazz> i saw something about getting rid of nil
19:40:55disruptekblame alehander for that.
19:41:38FromDiscord<Clyybber> not nil should not be rushed
19:42:09FromDiscord<Clyybber> we have to come up with a good design that also considers z3 and the like
19:44:30Zevvhow's that, we can't go forcing z3 on regular compilation, right?
19:44:36disruptekit might be gated, but it should still be in 1.6.
19:45:07ZevvI mean, disruptek has been working his ass of to get compilation fast as hell, and now we're slowing it down by a factor 30 by pulling in Z3 to prove my refs are not nil?
19:45:19FromDiscord<Clyybber> yeah exactly
19:45:22disruptekhah, i'm pretty sure my shit will slow down compilation.
19:45:27FromDiscord<Clyybber> its not a simple problem
19:45:48FromDiscord<Clyybber> and not nil should be general IMO
19:45:54FromDiscord<haxscramper> ~ic is an incremental compilation; It allows to cache compilation results, removing need to recompile all modules in project and speeding up recomilation. For relevant RFC see https://github.com/nim-lang/RFCs/issues/46
19:45:55disbotic: 11an incremental compilation; It allows to cache compilation results, removing need to recompile all modules in project and speeding up recomilation. For relevant RFC see https://github.com/nim-lang/RFCs/issues/46
19:45:55FromDiscord<Clyybber> so as to allow for int not 0
19:46:03FromDiscord<Clyybber> aka `T not value`
19:46:50Zevvwait what.
19:47:05Zevvhow would you express that, that's something completely different
19:47:20FromDiscord<Clyybber> its just a generalization
19:47:27FromDiscord<haxscramper> Dependent types?
19:47:32ZevvSo, would you be able to say 'int no 0 but also not 5' ?
19:47:57disruptekit's more like T not default(T) but i think he's mad.
19:48:01ZevvI'm no type doctor, but I think a ref pointing nowhere is something completely different then an int being 0
19:48:07disruptekagree.
19:48:07supakeenHuh maybe I should turn my PEG design upside down mrm.
19:48:21Zevvsupakeen: show me your stuff
19:48:25Zevvand I'll show you mine
19:49:07supakeenZevv: I'm currently just thinking about it. My current plan is that a bunch of parsers exist which all parse to the same structure. Then I have a separate bit where the user can define constraints like mutual exclusivity.
19:49:14FromDiscord<Clyybber> Zevv: its exactly the same
19:49:17supakeenBut then I thought what if you define it and then make it part of the grammar.
19:49:19FromDiscord<haxscramper> > I'm no type doctor, but I think a ref pointing nowhere is something completely different then an int being 0โ†ต@Zevv I'm not an expert on a subject, but to me it seems like something /technically related/. All of this is probably amounts to constraints that you can put on z3
19:49:30FromDiscord<haxscramper> And information that you can get from conrol flow graph etc.
19:49:43FromDiscord<Clyybber> Zevv: it only gets hard once you allow operations on the type :D
19:50:08disruptektrue; operations on the type make me hard.
19:50:34FromDiscord<haxscramper> If we get this and drnim it would be awesome
19:51:07supakeenI'll write some code first so it's easier to reason about than just words.
19:51:24FromDiscord<Clyybber> I think about it this way: not nil is simple and binary, should be pretty usable without z3; using crude pessimistic analysis
19:51:47disruptekbut clyyber, there is already implicit x = default.
19:51:53FromDiscord<Clyybber> not 0 is not much usable without z3 since our crude pessmistic analysis will prohibit much stuff
19:52:22FromDiscord<Clyybber> disruptek: Yeah?
19:52:44disruptekwhat meaning do you think you can presume about uninit value types?
19:52:48FromDiscord<Clyybber> Obviously T not default(T) can't be implicitly intialized like that
19:52:59Zevvbut really, slurping in Z3 for a lint-like thingy I can see happening, but are we really considering putting a theorem prover into the compiler itself?
19:53:01disruptekwell... fine for new code i guess.
19:53:03FromDiscord<Clyybber> just like a not nil ref type can't
19:53:10disruptekZevv: it's already done.
19:53:33FromDiscord<Clyybber> disruptek: What? This is only about new code, your old code doesn't have not 0 anywhere
19:53:51Zevvdisruptek: "grep -r z3 Nim/compiler" gives me zero results
19:53:59FromDiscord<Clyybber> drnim
19:54:02disruptekZevv: drnim is a compiler with a prover in it.
19:54:11disruptekyeah, i'm fine with new code.
19:54:30Zevvdisruptek: sure, but that will not work for everyday usage, will it
19:54:32Zevvit's like linting
19:54:40disruptekyes, but so what?
19:54:53Zevvbut is "not nil" not something you'd want in your everyday usage
19:55:02disruptekwhy not?
19:55:08FromDiscord<alehander42> hey
19:55:22Zevvno, not "not", I mean "yes", I want that in my normal compiler
19:55:22FromDiscord<Clyybber> it would be cool if z3 could give a time estimate
19:55:55FromDiscord<alehander42> clyybber i agre and i dont
19:55:58disrupteklol
19:56:01ZevvI've played with z3, and in my experence it's pretty much exponentially slower when your input grows linearly complex
19:56:04FromDiscord<alehander42> but i am very biased
19:56:04FromDiscord<alehander42> like
19:56:13FromDiscord<alehander42> enum A{B}
19:56:16FromDiscord<alehander42> seems better than not 0
19:56:18FromDiscord<alehander42> to me
19:56:22FromDiscord<alehander42> more obvious generalization
19:56:25disrupteklalala ic lalala
19:56:54FromDiscord<alehander42> and
19:56:54Zevvlet's all sing the ic song
19:57:03FromDiscord<alehander42> many languages have it inside
19:57:09FromDiscord<alehander42> i dont want to offload it to a z3 tool
19:57:19FromDiscord<alehander42> that is not even a part of the compiler
19:57:34FromDiscord<Clyybber> I don't want to either; but I wonder how we can properly integrate it
19:57:43Zevvsupakeen: yes, that's usually a good idea. first write some code :)
19:57:47FromDiscord<alehander42> and speed is important
19:57:51FromDiscord<Clyybber> yeah
19:57:55disruptekclyybber: it goes in the compiler server.
19:57:59FromDiscord<alehander42> i am not sure if calling to z3 for all not nil would be same speed
19:58:04FromDiscord<Clyybber> disruptek: not a bad idea
19:58:08FromDiscord<alehander42> and our stuff
19:58:14FromDiscord<Clyybber> no, of course not
19:58:18Zevvcompiler server
19:58:19FromDiscord<alehander42> seems to already almost work (depending on how far you want to go)
19:58:21FromDiscord<Clyybber> thats not what I meant
19:58:38FromDiscord<Clyybber> I want the normal linear analysis to stay
19:58:45FromDiscord<Clyybber> and be used
19:59:02FromDiscord<Clyybber> I'm just wondering how we can integrate z3 into this
19:59:23disruptekclyybber: it goes in the compiler server.
19:59:29Zevvcompiler server
19:59:38disruptekdeja vu.
19:59:44Zevvis that a thing or a concept?
19:59:50FromDiscord<Clyybber> concept
20:00:16FromDiscord<Clyybber> I guess you could compile your code then, and wait for later for the compiler to assure you its safe
20:00:20FromDiscord<nikki> lmao
20:00:21FromDiscord<nikki> sent a code paste, see https://play.nim-lang.org/#ix=2BLz
20:00:22FromDiscord<alehander42> also
20:00:35FromDiscord<alehander42> i actually prefer better integration of syntax shortcuts for invariants
20:00:39FromDiscord<alehander42> but maybe Araq is right
20:00:47FromDiscord<alehander42> and just having the standard pragmas is smart
20:00:50Zevvnikki: yeah ar4q has opinions on unix
20:01:34disruptekthe compiler server is the only way to z3.
20:01:55*luismanfroni joined #nim
20:02:00FromDiscord<Clyybber> doesn't even have to be a server;
20:02:08Zevvdid you work with z3 yet disruptek
20:02:17disruptekyeah, it sucks.
20:02:22Zevvall of it
20:02:33disruptekwell, no, the concept is fine but it's boring.
20:02:36FromDiscord<Clyybber> just the compiler compiling your code, even if it can't prove it with z3 yet, and then running further until it can
20:02:59FromDiscord<Clyybber> yeah magic is boring
20:02:59disruptekyes, but the server allows it to run subsequent solving in real time.
20:03:10FromDiscord<Clyybber> what does that mean
20:03:38disruptekit can already have checked everything but your change; so it merely vets the update.
20:03:44FromDiscord<nikki> if it keeps running it holds previous state in mem
20:04:07FromDiscord<Clyybber> does z3 support that?
20:04:49disrupteki don't know, but there's really no other way to make it work. it's too expensive otherwise, imo.
20:04:58Zevvright that's my point
20:05:05disrupteklike, i would sooner rearchitect compilation.
20:05:21disruptekchange the language if necessary.
20:05:42Zevvjust take out the refs
20:05:43disrupteki'm sure that's a super unpopular position, of course.
20:06:11FromDiscord<Clyybber> disruptek: well if you don't make it concrete yeah
20:06:56FromDiscord<nikki> sent a code paste, see https://play.nim-lang.org/#ix=2BLA
20:07:01FromDiscord<Clyybber> yep
20:07:03FromDiscord<nikki> and then gradually reintroduce what types i want to be copyable
20:07:06FromDiscord<Clyybber> oh
20:07:11FromDiscord<Clyybber> eh, no
20:07:14FromDiscord<Clyybber> I don't think so
20:07:18FromDiscord<nikki> kk
20:07:20FromDiscord<Clyybber> but try it :D
20:07:40FromDiscord<nikki> just sez `signature for '=copy' must be proc[T: object](x: var T; y: T)`
20:07:48supakeenZevv: Does this need a , in the README: `peg("pairs" userdata: Dict)`?
20:08:03FromDiscord<nikki> which afaict is the same but also i haven't gotten to the generics part of dom's book yet; still learning lol
20:08:33FromDiscord<nikki> maybe i mostly want to do it for strings anyways bc. the automatic string copying everywhere is getting to me
20:08:59disruptekso fix it.
20:09:13FromDiscord<alehander42> disruptek
20:09:14Zevvsupakeen: there's a , in there?
20:09:16FromDiscord<alehander42> that's what i want
20:09:22FromDiscord<alehander42> change the language
20:09:29FromDiscord<alehander42> and reacrhcitect compilation
20:09:30disrupteknim is basically the sum of everyone's annoyances.
20:09:36FromDiscord<alehander42> so it's not unpopular maybe
20:09:42FromDiscord<alehander42> but .. a bit idealistic ๐Ÿ˜„
20:09:47FromDiscord<djazz> ๐Ÿ‘
20:09:47Zevvsupakeen: you mean in https://github.com/zevv/npeg#passing-state, right?
20:09:50disruptekwell, there are two of us at least.
20:10:04FromDiscord<alehander42> i mean probably Araq also wants it in the way of "if i could write nim again"
20:10:05FromDiscord<nikki> is this the process of discovering what those fixes are, or is there another one
20:10:08supakeen"README fix" 31 seconds ago, nice.
20:10:13FromDiscord<alehander42> but practicality is another thing
20:10:33FromDiscord<nikki> i think the main thing is the lang seems flexible enough to let you get what you want in your own little space
20:10:34FromDiscord<Clyybber> disruptek @alehander42 maybe say something concrete once in a while :P
20:10:54Zevvc'mon, it's friday evening, let them
20:10:54FromDiscord<alehander42> we need a compilerdev repo rfc ๐Ÿ˜„
20:10:57FromDiscord<haxscramper> > and reacrhcitect compilationโ†ตJust a question from not-really-a-compiler-developer, how complicated would it be to separate compiler into set of libraries
20:11:04FromDiscord<alehander42> MAKE NIM PASCAL AGAIN ๐Ÿ˜„
20:11:06FromDiscord<haxscramper> That can be used completely independently
20:11:08FromDiscord<Clyybber> rearchitect compilation by changing the lang is not an idea
20:11:15FromDiscord<haxscramper> Like parser + sempass + other things
20:11:18FromDiscord<Clyybber> concrete
20:11:19FromDiscord<alehander42> no clyybber
20:11:32disrupteki would design the compilation first and see how much of the lang i could fit into it.
20:11:38FromDiscord<alehander42> exactly !
20:11:43FromDiscord<alehander42> that's what i wanted with my project
20:11:46FromDiscord<Clyybber> I said concrete
20:11:54FromDiscord<Clyybber> lol
20:11:55FromDiscord<alehander42> i wanted to start with proc/types/generics and basic macros
20:12:04FromDiscord<alehander42> and then you just see what else works and what not
20:12:11FromDiscord<alehander42> i had a plan for the compilation
20:12:12Zevvend you end up with an unusable crap language
20:12:17FromDiscord<Clyybber> yeah
20:12:20FromDiscord<alehander42> eh ..
20:12:22Zevvnim is what it is now for a reason
20:12:25FromDiscord<haxscramper> Error logging separate from everyhing else, wrap compiler core into something like cligen or embed it into some other program
20:12:27FromDiscord<Clyybber> not crap, but esoteric
20:12:28FromDiscord<haxscramper> Things like that
20:12:29FromDiscord<alehander42> not necesarrily
20:12:33FromDiscord<Clyybber> esoteric langs are exactly that
20:12:37disruptekwell, i don't want this half-baked compile-time mode. i just want layers of compile->run->compile->run.
20:12:38FromDiscord<nikki> does what's going on with zig's compilation recently count toward an architecture y'all would be into?
20:12:49Zevvnim solves problems. the compiler is not the goal.
20:12:51FromDiscord<Clyybber> its not hard to make a neat language that can do everything
20:12:52FromDiscord<nikki> eg. you can patch part of the output binary to just recompile one func that changed
20:12:55FromDiscord<alehander42> yeah it can be done in a cleaner way
20:13:01FromDiscord<alehander42> but .. it can still be nim
20:13:08FromDiscord<alehander42> you don't need 100% of the stuf
20:13:10FromDiscord<alehander42> to be nim
20:13:14FromDiscord<Clyybber> all talk no concrete
20:13:21FromDiscord<alehander42> man
20:13:24FromDiscord<Clyybber> :p
20:13:27FromDiscord<alehander42> it's not smarter to put 1000 hours
20:13:31FromDiscord<alehander42> into something not thought out
20:13:32FromDiscord<alehander42> ๐Ÿ˜„
20:13:43FromDiscord<Clyybber> how come you think nim is not thought out?
20:13:44FromDiscord<alehander42> so dont push us ๐Ÿ˜„
20:13:48FromDiscord<alehander42> no i am talking about
20:13:57FromDiscord<alehander42> our "ideas"
20:14:01FromDiscord<Clyybber> oh :D
20:14:02FromDiscord<alehander42> nim is well thought out
20:14:21Zevvalehander42, what's wrong with your enter key, is it loose or trigger happy?
20:14:25disruptekyes.
20:14:32FromDiscord<alehander42> that's how i am dude
20:14:41Zevv"loose and trigger happy"
20:14:44FromDiscord<alehander42> my mind is enter happy
20:14:49FromDiscord<Clyybber> restarting or recreating something doesn't magically fix problems though
20:14:52disruptekit takes him three lines to sign his name.
20:14:53FromDiscord<nikki> it's a more direct brain-to-everyone-else connection
20:15:10FromDiscord<alehander42> exactly ๐Ÿ˜„
20:15:30FromDiscord<alehander42> ok
20:15:34disrupteki can tell you what i don't like and i have some ideas on how to change it but i don't want to start another FUD fight.
20:15:44FromDiscord<Clyybber> no, say it
20:15:45Zevvanyway, what are we talking about actually? I'm doing my part, but I'm not sure about the subject
20:15:48FromDiscord<alehander42> sorry, i'll try to be more precise. I also have a plan, and a md somewhere
20:15:48FromDiscord<Clyybber> FUD is not saying it
20:15:54FromDiscord<djazz> ๐Ÿฟ
20:15:55FromDiscord<alehander42> but i probably forgot it.
20:16:09FromDiscord<nikki> as long as it's constructive; seems useful disruptek
20:16:17FromDiscord<alehander42> just to be able to compile modules to some kinf of "cache files" is enough for me
20:16:41FromDiscord<nikki> also can you use the `asm " "` stuff for indirect goto rn... lolz
20:16:44FromDiscord<alehander42> this gives you something like basic IC, gives you paralel
20:16:51FromDiscord<alehander42> compilation
20:17:01FromDiscord<alehander42> and way to even distribute compilation files
20:17:17FromDiscord<nikki> another thing i've noticed is in langs -- the way people want things to be differs across library devs vs. application devs
20:17:24supakeenWill you look at this, babbies first parser actually does something :D
20:17:29FromDiscord<alehander42> but this might be a problem for compile time
20:17:46FromDiscord<nikki> which isn't a strong categorization; but still some authors tend to spend more attn on libraries for others to use; while others spend more attn using the lang + libs to make end-user-facing applications
20:18:00FromDiscord<alehander42> because know you have separate state for each "compilation set" ๐Ÿ™‚
20:18:07FromDiscord<Clyybber> @alehander42 the current compiler can be parallelized too, it doesn't have to start anew IMO
20:18:09FromDiscord<alehander42> compile time state
20:18:14FromDiscord<alehander42> @Clyybber how ?
20:18:19FromDiscord<alehander42> i am talking about the same project
20:18:25FromDiscord<alehander42> a single big project
20:18:32FromDiscord<Clyybber> hmm?
20:18:35FromDiscord<Clyybber> I don't understand
20:18:39FromDiscord<alehander42> how would you parallelize it
20:18:48FromDiscord<Clyybber> how I would parallelize nim?
20:18:58FromDiscord<alehander42> a single compilation
20:19:00FromDiscord<alehander42> of nim
20:19:04disruptekalmost any tree can be parallelized.
20:19:08*krux02 quit (Remote host closed the connection)
20:19:20FromDiscord<Clyybber> you look for independent parts and fork them
20:19:21FromDiscord<Clyybber> basically
20:19:29FromDiscord<alehander42> ok, but this is the same with IC
20:19:33FromDiscord<alehander42> it seems easy
20:19:37FromDiscord<alehander42> but it's not trivial ..
20:19:38FromDiscord<Clyybber> its not easy
20:19:47FromDiscord<alehander42> and it's easier if you are able
20:19:53FromDiscord<alehander42> to just compile a part of your project
20:19:55disrupteki may be naive but it does feel pretty easy so far.
20:19:56FromDiscord<alehander42> and just reuse it
20:20:23FromDiscord<Clyybber> no you are not naive
20:21:01Zevvyou can call disruptek a lot of things, but naive is not one of those
20:21:18disruptekafter ic i plan to cps up individual chunks and thread them out.
20:21:34FromDiscord<alehander42> but e.g.
20:21:50FromDiscord<alehander42> you can't really sccache artifacts
20:21:54FromDiscord<alehander42> between projects
20:22:03FromDiscord<alehander42> oh man!
20:22:09disruptekwhy is this so important to you?
20:22:10FromDiscord<alehander42> for example CI and rebuild
20:22:17FromDiscord<alehander42> how would you cache between builds
20:22:20supakeenZevv: Is it possible to 'delay' a capture; for example I have a `>key * ('=' | ' ') * >value` but `key` is defined as `key <- ('-' * Alnum) | ("--" * +Alnum)` and I'd like my captures to be without `-/--`.
20:22:22FromDiscord<alehander42> without actual files with cache
20:22:31disruptekwho said we wouldn't have files?
20:22:33FromDiscord<alehander42> because what i 've seen in the world
20:22:39FromDiscord<alehander42> is such cases
20:22:55FromDiscord<alehander42> ok, so we'd have files ๐Ÿ˜ฎ
20:22:55Zevvsupakeen: order matters
20:22:59FromDiscord<Clyybber> alehander92: You have so many assumptions about what nim can't or doesn't have :D
20:23:13FromDiscord<alehander42> i am not sure about the IC righ tnow
20:23:18FromDiscord<alehander42> and how exactly would it work
20:23:28FromDiscord<alehander42> i know that it can do stuff on theory
20:23:31FromDiscord<alehander42> but not of this works right now
20:23:32disruptekyou can look at the code. i've explained it several times, but it's really quite simple.
20:23:50FromDiscord<alehander42> you're right, but so does it produce files
20:24:05disruptekit gets a top-level chunk of ast. it clones the module graph and compiles it. then it caches all the mutations to the graph.
20:24:16Zevvsupakeen: pegs are happy when they find a match, and then abandon all other choices. So make sure your ordering reflects what you want to match
20:24:17disruptekif it gets a chunk and it has it cached, it merely applies the mutations.
20:24:25disruptekit's that simple.
20:24:39supakeenSi, will play with it some more. They're very nice!
20:24:43FromDiscord<alehander42> ok, so how can we parallelize it
20:24:51FromDiscord<Clyybber> trivial
20:25:01FromDiscord<alehander42> on the first build?
20:25:07FromDiscord<Clyybber> yes?
20:25:13Zevvsupakeen: oh wait, I didn't understand your question I guess. You want to capture the keys without the leading dashes, right?
20:25:15FromDiscord<alehander42> i dont think its trivial
20:25:18FromDiscord<djazz> what would nim code look like without nil?
20:25:22FromDiscord<alehander42> to make the current compiler parallel
20:25:29FromDiscord<Clyybber> why not?
20:25:31FromDiscord<alehander42> like, share all this confg and graph changes
20:25:35FromDiscord<alehander42> in 8 threads
20:25:38supakeenZevv: Correct so I was thinking if I can maybe define a capture in the key group.
20:25:40FromDiscord<Clyybber> so lock it?
20:25:47FromDiscord<alehander42> yes but this is not trivial ๐Ÿ˜„
20:25:48FromDiscord<Clyybber> the config
20:25:50FromDiscord<Clyybber> it is
20:25:54FromDiscord<alehander42> it requires a lot of changes to the compiler
20:25:58FromDiscord<alehander42> and assumptions
20:26:00FromDiscord<Clyybber> the compiler isn't that big
20:26:05disrupteki guess less changes than you think.
20:26:09FromDiscord<alehander42> eh this is not trivial
20:26:10FromDiscord<alehander42> maybe not hard
20:26:17disruptekif the input is immutable, then it's pretty straightforward.
20:26:20FromDiscord<alehander42> but requires a lot of stuff
20:26:26disruptekinstead of compiling one chunk, you compile 8 chunks.
20:26:27FromDiscord<Clyybber> oh sure, and it gets trivial if you write the compiler anew :D
20:26:31FromDiscord<alehander42> trivial means super easy
20:26:40*luismanfroni quit (Quit: Leaving)
20:26:44Zevvsupakeen: so, you can use explicit '>' capturing, or split up your grammar in smaller pieces. I like to do the latter, it usually makes it more readable. Let me whip up an example
20:26:49disruptekyou just can't fuck around with order, but there is a lot of independent code.
20:26:51FromDiscord<alehander42> but
20:26:59FromDiscord<alehander42> ok then if i compile A
20:27:00FromDiscord<alehander42> once
20:27:06FromDiscord<alehander42> can i make sure i dont need to recompile it
20:27:10supakeenI think I'll do the latter, I have to solve quoting still.
20:27:13FromDiscord<alehander42> nim can always load it from a file, right?
20:27:17supakeenBut I have my initial blurp working!
20:27:18disruptekif you can't, then ic won't work anyway, right?
20:27:39supakeenZevv: https://bpa.st/raw/UWQQ might give some idea of what I'm trying to do.
20:27:43FromDiscord<alehander42> and if I just pass the same cache files to nim
20:27:49FromDiscord<alehander42> on another compatible env
20:27:58FromDiscord<alehander42> it should just work?
20:28:02disruptekwhy not?
20:28:06supakeenAlso these railroad diagrams are pure love.
20:28:07FromDiscord<alehander42> cool
20:28:15FromDiscord<alehander42> @haxscramper yeah on theory
20:28:20FromDiscord<alehander42> making it more modular might make sense
20:28:48disruptekit smells like someone needs to brush their teeth.
20:28:54FromDiscord<haxscramper> I don't have enough brainpower to discuss any complicated implementation details, but compile error reporting is just killing me
20:29:22FromDiscord<alehander42> you do have, pattern matching is just simialr to compilation
20:29:31FromDiscord<alehander42> disruptek well
20:29:34FromDiscord<alehander42> indeed man
20:29:36disruptekafaik, no one has made a proper effort to speed up the compiler in a long time.
20:29:39FromDiscord<alehander42> thanks for reminding me
20:29:51FromDiscord<alehander42> why speed up when you can run it on 8 cores
20:29:51Zevvsupakeen: something like this (not tested): https://play.nim-lang.org/#ix=2BLH
20:29:57disrupteki don't even think it has been properly profiled in, like, maybe a couple years.
20:30:00FromDiscord<alehander42> kidding
20:30:21supakeenZevv: Thanks bud, I'll take a look at that and solving quoting :)
20:30:51Zevvgood. quoting is not that hard, but you can steal it from the examples
20:31:02supakeenAh I see what you mean with the shorter definitions yea that's a good plan.
20:31:16FromDiscord<Clyybber> disruptek whats about your layers?
20:31:26disruptekwhat about them?
20:31:28disruptekthey are slow.
20:31:40FromDiscord<Clyybber> what did you want to say
20:31:50FromDiscord<Clyybber> you said compiler->run->compiler->run
20:31:52disrupteki want to thank my parents and the academy.
20:31:59FromDiscord<Clyybber> not something I can parse
20:32:02Zevvsupakeen: https://github.com/zevv/npeg/blob/master/tests/examples.nim#L94 shows the quoting for json. It's overkill with the unicode escapes etc, but it shows the idea
20:32:24disruptekwell, the new ir opens up a lot of opportunity to exploit speed.
20:32:56FromDiscord<Clyybber> well earlier you and alehander both said you had ideas that would require changing the language
20:33:12FromDiscord<Clyybber> I don't see them
20:33:22Zevvtalk talk. I'm off to bed. Nightynight ppl
20:33:28disruptekg'nite zevv.
20:33:29supakeenZevv: Is there any example where the quoting is optional, I'm currently only quoting when there's unsafe in there: https://github.com/supakeen/clip/blob/master/src/clip.nim#L10
20:33:30FromDiscord<Clyybber> Zevv: nighty
20:33:37supakeennn
20:33:39supakeenI'll figure it out!
20:33:43disruptekno, i said i would change the compiler and then see what has to be removed from the language.
20:34:02FromDiscord<Clyybber> what makes you think anything has to be removed?
20:34:14FromDiscord<Clyybber> if you would develop that way jsonutils would be long nuked :D
20:34:24Zevvsupakeen: sure. If your string starts with a ", you quote and escape and all that. If it doesn't, you eat up to the white space
20:34:29disruptekthe sooner it's nuked, the better.
20:34:52supakeen+
20:35:02FromDiscord<Clyybber> the chad dev; doesn't care about tests; nukes them; fuck the spec I change it
20:35:25FromDiscord<Clyybber> vs the virgin dev; boring; adheres to spec; suffers from red CIs
20:35:30disrupteki would rather not have macros1->macros2->ast1->ast2->backend.
20:35:34FromDiscord<Clyybber> waits until tests pass
20:35:51FromDiscord<Clyybber> disruptek: What instead?
20:36:03disruptekast1->ast2->backend
20:36:09FromDiscord<Clyybber> no macros
20:36:12FromDiscord<Clyybber> lol?
20:36:12disruptekno.
20:36:14*tribly quit (Ping timeout: 258 seconds)
20:36:47disrupteki told you it'd be unpopular.
20:36:52*ForumUpdaterBot quit (Read error: Connection reset by peer)
20:37:06FromDiscord<Clyybber> well, it amounts to saying "I can write a toy language and it will be simple"
20:37:07*^Q-Master^ quit (Read error: Connection reset by peer)
20:37:12FromDiscord<Clyybber> which is ture
20:37:14*Q-Master joined #nim
20:50:40*NimBot joined #nim
20:50:48FromDiscord<nikki> js is actually ok if you want to use the web stuff for ui
20:51:20FromDiscord<nikki> lots of fun things to try in nim
20:51:40*letto quit (Max SendQ exceeded)
20:51:47*theelous3 joined #nim
20:52:16*letto joined #nim
20:53:43FromDiscord<alehander42> yes
20:53:46FromDiscord<alehander42> i used a lot of it
20:53:58FromDiscord<alehander42> maybe ~3 years working with the javascript backend
20:54:13FromDiscord<alehander42> that's why i dont agree with @disruptek ๐Ÿ˜ฆ
20:54:22FromDiscord<alehander42> treeform also does a lot with it
20:54:22FromDiscord<alehander42> iirc
20:56:45FromDiscord<djazz> im a web dev but i've never used the js backend heh
21:01:25disruptekyou don't have to agree with me as long as you admit you're wrong.
21:03:01FromDiscord<ElegantBeef> I mean the nimVM is easy to interop with natively now, so i dont like the JS vm abuse
21:03:27FromDiscord<nikki> does the nimvm run natively in people's web browsers?
21:03:34FromDiscord<ElegantBeef> No cause that's dumb
21:03:51FromDiscord<nikki> maybe that's why everyone's using it
21:04:11FromDiscord<ElegantBeef> > i feel like a good way to vm nim is to compile to js then run in a js vm lolโ†ตIs what i'm responding to
21:04:41FromDiscord<nikki> yeah i explained later that on ios, it's the only way to get jit, if you want that
21:04:54FromDiscord<nikki> if you don't then you can use the nimvm, sure
21:05:05FromDiscord<ElegantBeef> I'm very much in the party of "eh, you dont need speed if you're using the nimVM"
21:05:16*krux02 joined #nim
21:05:30FromDiscord<nikki> right, so if you need speed then you're not using the nimvm
21:05:42FromDiscord<ElegantBeef> Exactly, just call native code from the VM
21:05:42FromDiscord<nikki> so far in my benchmarks, for non-jit perf luajit's vm has actually done the best
21:05:44FromDiscord<ElegantBeef> It's super easy
21:05:57FromDiscord<ElegantBeef> It's so easy i've wrapped it to make it painless ๐Ÿ˜›
21:06:48FromDiscord<nikki> it's mostly for if you want to test your changes to the app quickly or if you want to let user-developed mods for a game etc.
21:06:57FromDiscord<nikki> (speaking about my use cases)
21:06:58FromDiscord<ElegantBeef> Yea so use nimscripter ๐Ÿ˜„
21:07:14FromDiscord<ElegantBeef> JIT isnt needed for that stuff since the heavy operations are done inside native code
21:08:25FromDiscord<nikki> yeah i think it's a sensible approach for sure
21:09:13FromDiscord<nikki> a big q is also about the use of it for ui though; and it's nice to get the dom through eg. karax in js
21:09:22FromDiscord<nikki> but yeah that's a different thing than the pure nim mod aspect
21:10:27FromDiscord<ElegantBeef> You can also support plugin based mods, if you want to have support mods that can do native code, but it's obviously not cross platform if the mod creator doesnt release for all platforms
21:10:41FromDiscord<nikki> yeah it also doesn't quite work on ios cuz you can't just download a '.so' and run it in the app ๐Ÿ˜
21:10:48FromDiscord<nikki> it's a bit sandboxed
21:10:51FromDiscord<ElegantBeef> Yea but i mean who the fuck is going to mod ios games
21:10:58FromDiscord<ElegantBeef> It's a very very niche environment
21:11:12FromDiscord<nikki> it's niche because no one does it now
21:11:15FromDiscord<nikki> not because it's a bad idea
21:11:22FromDiscord<ElegantBeef> No it's it's niche cause they're ios games
21:11:32FromDiscord<ElegantBeef> Mobile games almost all suck and it's not due to lacking mod support
21:12:02FromDiscord<nikki> i think having a creative interactive environment for mobile could help people make stuff
21:12:02FromDiscord<ElegantBeef> It's due to shitty stores which cater to microtransactions and unfun games that generate revenue
21:12:17FromDiscord<nikki> and discover that they like making that stuff
21:12:47FromDiscord<ElegantBeef> If that's the point just use the NimVM directly, since learning means performance isnt too critical ๐Ÿ˜›
21:13:02FromDiscord<nikki> it depends. it's pretty easy to make a for loop, then crank up the loop limit to 1000000
21:13:12FromDiscord<nikki> like add some physics particles. then make it be 100000 particles. it's not hard
21:13:28FromDiscord<nikki> for ctx https://www.twitch.tv/videos/779422009 is the thing i'd been working on for a while -- it's a ui-based mobile creation tool for games etc.
21:13:31FromDiscord<ElegantBeef> I'd imagine for the most part you're controlling objects that are native
21:13:40FromDiscord<nikki> yeah def. the physics engine is box2d which is native.
21:14:06FromDiscord<nikki> u can kinda skip around the vid and get the idea: is a visual editor + logic editor + art editor
21:14:27FromDiscord<ElegantBeef> I assume you've seen the scripting stuff i've been working on, even for UI you could use it, i've tested it with fidget ๐Ÿ˜„
21:14:39FromDiscord<nikki> yeah i've seen that ๐Ÿ˜„
21:14:41FromDiscord<ElegantBeef> There are some issues with fidget due to it's heavy usage of templates
21:15:01FromDiscord<nikki> re: scripting auto binds i once did that for C with luajit by using this weird macro trick
21:15:04FromDiscord<nikki> https://github.com/nikki93/cgame/blob/master/src/sprite.h eg. in this file
21:15:25FromDiscord<nikki> the `SCRIPT` macro basically stringifies its argument, which luajit can parse to generate FFI to lol
21:15:44FromDiscord<nikki> no marshaling overhead on that one bc. luajit's ffi system actually understands C layouts
21:16:28FromDiscord<nikki> right now the thing in that twitch stream is mostly lua+love2d-based for the engine itself, and the app ui etc. is react native lol
21:16:39FromDiscord<nikki> plus c++ stuff here and there
21:17:12FromDiscord<ElegantBeef> The marshalling is a slight issue, but hey nimscript has templates/macros, and can always be plopped inside the code for performance
21:17:39FromDiscord<nikki> yeah also i think marshaling isn't a user-facing / api-breaking thing to optimize later. like you can make them just use shared mem or w/e later and stuff still works the same way
21:18:03FromDiscord<nikki> do nimvm types have the same in-mem layout as their C versions? maybe not...
21:18:17FromDiscord<ElegantBeef> As i understand it, no
21:19:53FromDiscord<nikki> i also wanna try impl'ing a VM in nim some time ๐Ÿค” https://godbolt.org/z/G1nonq was p fun. would be interesting to see how that nan-tagging / indirect goto stuff would work in nim
21:20:52FromDiscord<nikki> it got a huge speedup by making the stack a local that i close over, vs. a member of the c++ class ยฏ\_(ใƒ„)_/ยฏ
21:21:51FromDiscord<nikki> this bit https://media.discordapp.net/attachments/371759389889003532/769309638172213269/unknown.png
21:22:03FromDiscord<ElegantBeef> No, dont make me attempt to read that
21:22:21FromDiscord<nikki> it's probably quicker to write it xD
21:22:47FromDiscord<ElegantBeef> Well considering the amount of time i've spent in C/C++ is like < 10 hours, no
21:24:32*xet7 joined #nim
21:27:24FromDiscord<nikki> it's basically an array on the stack, and then the rest of it is lambdas that close over that. and that's what i'm using for the vm's stack there
21:50:04*solitudesf quit (Ping timeout: 272 seconds)
21:55:36*Vladar quit (Quit: Leaving)
22:17:27*rockcavera quit (Remote host closed the connection)
22:25:11FromDiscord<19> void Memory;โ†ตuint8 Row = (uint8)Memory;โ†ตwhat is the equivalent of this in nim?
22:27:06FromDiscord<Recruit_main707> `var Memory: pointer`โ†ต`var Row: ptr uint8 = cast[ptr uint8](Memory)`
22:27:38FromDiscord<19> thatโ€™s what i wrote but the debugger says Row is null
22:28:03FromDiscord<19> weird
22:28:18FromDiscord<19> thanks anyway @Recruit_main707
22:31:56FromDiscord<Rebel> Are there any nimble packages that implement AES encryption with support for padding? At least PKCS7. Very surprised that nimAES and nimcrypto don't โ†ตas that is a very basic component of any block-based crypto system...
22:34:49FromDiscord<Recruit_main707> Row is null because Memory is null
22:35:01FromDiscord<Recruit_main707> you are missing something else
22:44:32*a_chou joined #nim
22:46:07FromDiscord<neow> wait, is there a nimdep cli?
22:46:16FromDiscord<neow> I remember generating the png of dependencies
22:46:48FromDiscord<neow> I don't remember how I did it though ๐Ÿค”
22:47:17*oprypin_ is now known as oprypin
22:49:25*a_chou quit (Client Quit)
22:49:59*tane quit (Quit: Leaving)
22:56:04*mbomba joined #nim
23:12:01FromDiscord<19> Memory is not null https://media.discordapp.net/attachments/371759389889003532/769337360621240350/unknown.png
23:16:30FromDiscord<Clyybber> set Row again, it surely is null right after `var Memory: pointer`
23:17:44FromDiscord<Gyllou> heya
23:18:46FromDiscord<19> @Clyybber i dont understand.
23:19:44FromDiscord<19> virtual alloc returns a void, then i can just cast it no?
23:22:27FromDiscord<19> bitmapMemory = VirtualAlloc( nil, cast[SIZE_T](bitmapMemorySize), MEM_COMMIT, PAGE_READWRITE )โ†ตvar row:ptr uint8 = cast[ptr uint8](bitmapMemory)
23:23:21FromDiscord<Clyybber> sup
23:23:25FromDiscord<Clyybber> @19 yeah
23:23:32*arecacea1 quit (Read error: Connection reset by peer)
23:23:57*arecacea1 joined #nim
23:29:57*TomDotTom quit (Quit: Leaving)
23:32:13*manjaroi3 joined #nim
23:32:52*manjaroi3 quit (Client Quit)
23:34:05*TomDotTom joined #nim
23:39:23*xet7 quit (Quit: Leaving)
23:48:56*arecacea1 quit (Remote host closed the connection)
23:50:21*arecacea1 joined #nim