<< 12-08-2020 >>

00:02:02disruptekballs.
00:05:01*krux02_ quit (Remote host closed the connection)
00:08:50disruptekleorize: nimsuggest crashes on my testes.
00:08:53disruptekmy cps testes.
00:09:20disruptekprobably because this code makes no sense.
00:12:19*Kaivo quit (Quit: thunderstorm!)
00:13:58*tiorock joined #nim
00:13:58*tiorock quit (Changing host)
00:13:58*tiorock joined #nim
00:13:58*rockcavera is now known as Guest76266
00:13:58*tiorock is now known as rockcavera
00:17:24*Guest76266 quit (Ping timeout: 256 seconds)
00:30:51FromDiscord<--HA--> Can I give a .c file to compile as a compiler argument instead of the compile pragma in a .nim file?
00:33:59*audiophile joined #nim
00:34:30FromDiscord<Elegant Beef> Why/how would that benefit you?
00:35:23*arecacea1 quit (Remote host closed the connection)
00:36:17FromDiscord<--HA--> Then I can remove the pragma from the file and only call it in my nimble task when I need it.
00:36:42*arecacea1 joined #nim
00:37:25*audiofile quit (Ping timeout: 264 seconds)
00:37:32*audiophile is now known as audiofile
00:37:50FromDiscord<Elegant Beef> But where would the proc point to then? I mean i really should just shush cause idk what im talking about, but this doesnt seem like it makes much sense to me
00:39:51FromDiscord<Rika> youre making sense
00:39:57FromDiscord<--HA--> It is not linked to any proc. I just have it at the top to compile sqlite.c for static linking. But I also don't know enough about what I'm doing 😉
00:40:15FromDiscord<--HA--> Anyway it works behind a when defined clause so I can live with that
00:41:04FromDiscord<Elegant Beef> If you dont have any reference to the c file, why do you have it?
00:41:17FromDiscord<Elegant Beef> like you have to have a cimport or something like that to use it in nim, no?
00:42:10FromDiscord<Elegant Beef> Thanks rika for confirming im occasionally sensible btw 😄
00:42:59*audiofile quit (Ping timeout: 240 seconds)
00:43:23FromDiscord<--HA--> No, it is only being compiled. The code I wrote does not use it directly. The db_sqlite module somehow does I guess... It is for static linking as mentioned.
01:16:12*gangstacat quit (Ping timeout: 260 seconds)
01:58:07*apahl quit (Ping timeout: 240 seconds)
02:00:14*apahl joined #nim
02:14:17leorizedisruptek: do you have reproducible snippets?
02:16:32*gangstacat joined #nim
02:23:29*theelous3 quit (Read error: Connection reset by peer)
02:25:05*ForumUpdaterBot quit (Remote host closed the connection)
02:25:12*ForumUpdaterBot joined #nim
02:40:32*muffindrake quit (Ping timeout: 260 seconds)
02:42:40*muffindrake joined #nim
03:25:57YardanicoWill {.nodestroy.} be available in the foreseeable future?
03:26:10YardanicoI'm asking because right now I'm thinking of abusing it for Sciter bindings
03:27:00Yardanicobasically Sciter provides a VALUE type, and I wrote a custom destructor for it so it deallocates the VALUE properly. However, if a procedure returns a VALUE (which is passed to the Sciter side), Nim side shouldn't destroy the value
03:27:09Yardanicobecause (as far as I know) it'll be freed by Sciter's own GC
03:31:03leorizeso just add a flag in the object to not destroy it?
03:31:12Yardanicobut I want to destroy it in most cases
03:31:42leorizebut you also have to deal with this gc-managed pointer
03:31:56Yardanicowell actually I don't know if it's GC'd
03:31:57Yardanicomaybe not
03:32:09Yardanicomaybe yes :D
03:32:23leorizehow does that pointer thing even work?
03:32:34leorizegc doesn't just magically work without any sort of callbacks
03:33:18Yardanicoright now I just use destructors
03:33:22Yardanicosciter has a ValueClear function
03:33:32Yardanicowhich clears the value
03:33:41Yardanicobut anyway, I asked on the sciter forum already, so I can understand it more ;)
03:34:47YardanicoI tried to understand how the Rust binding does it, but didn't get it yet :P
03:35:09Yardanicohttps://github.com/sciter-sdk/rust-sciter
03:35:50leorizerust isn't the only RAII thing out there
03:36:09Yardanicowell they have official C++ wrapping but I'm not sure if it does destruction automatically
03:36:25leorizehave you looked at go?
03:36:31Yardanicono :D time to
03:36:42Yardanicohttps://github.com/sciter-sdk/go-sciter
03:36:55Yardanicoit's apparently the most popular Sciter binding
03:37:07Yardanicoby stars count (which isn't the best thing for measuring, I know)
03:37:24Yardanicohttps://github.com/sciter-sdk/go-sciter/blob/master/value.go
03:37:40Yardanico"runtime.SetFinalizer(v, (*Value).finalize)"
03:38:00Yardanicowhich calls clear which calls ValueClear
03:38:10leorizeafaict the rust one doesn't do automatic destruction
03:38:19leorizesimilar to the go bindings
03:38:28Yardanicowdym?
03:38:30YardanicoI think they both do
03:38:46leorizefor go you have to call Release(), no?
03:38:52leorizeand for rust they export the `clear()`
03:39:06Yardanicobut no example uses it
03:39:14Yardanicoonly tests
03:39:24Yardanicowait actually
03:39:33Yardanicowhat's the canonical Rust name for a "destruction" function?
03:39:38Yardanicoand in Go, as I said, they set a finalizer
03:39:52Yardanicohttps://github.com/sciter-sdk/go-sciter/blob/master/value.go#L47
03:40:41leorize[m]https://github.com/sciter-sdk/Sciter-Dport/blob/master/source/sciter/sciter_value.d#L89
03:40:50leorize[m]here's what D does, just call ValueClear
03:41:21Yardanicoyes, but does D or Go call a finalizer for return values?
03:41:21leorizeI think ValueClear also take care of GC and stuff that you might be wary off
03:41:23Yardaniconim does
03:41:31leorizeD does RAII
03:41:44leorizeGo use Nim-like finalizers
03:42:30Yardanicoah wait I'm just stupid I think
03:42:34Yardanicoreally stupid
03:42:41Yardanicowell kinda
03:43:04leorize[m]this is rust: https://github.com/sciter-sdk/rust-sciter/blob/master/src/value.rs#L794
03:43:07Yardanicoso because I didn't yet wrap native callbacks for Sciter I use the raw VALUE type as a return type, right?
03:43:15leorize[m]so yea, you really just have to ValueClear()
03:43:19Yardanicobut
03:43:27YardanicoI already have a high-level SciterVal wrapping
03:43:44Yardanicoso I do stuff like "let res = newValue(); result = res.impl"
03:43:49Yardanicowhere res.impl is the actual raw pointer
03:44:11leorize[m]why would you casually break the abstraction like that :P
03:44:13Yardanicowell but still wonder how rust/go handle these callback thingies
03:44:29Yardanicoleorize[m]: I'm not breaking it, I just don't have high-level stuff for that yet :P
03:44:34leorize[m]https://github.com/sciter-sdk/rust-sciter/blob/master/src/value.rs#L812
03:44:36leorize[m]ValueCopy()
03:44:46*rockcavera quit (Remote host closed the connection)
03:45:12leorize[m]it appears that all Value* stuff work directly on the built-in ref counter
03:45:15*rockcavera joined #nim
03:45:24leorize[m]so you don't need to bother too much
03:45:40Yardanicooh I think I understood
03:45:47YardanicoI might just do "discard ValueCopy(addr result, res.impl)" then?
03:46:04leorizeseems to be it
03:47:39Yardanicook now it seems to work, although I'm not sure if it's 100% correct
03:47:58leorizedo you have sciter own documentation on these APIs?
03:48:06Yardanicoit' pretty scarse, I'll try to find it :)
03:48:45Yardanicobut at least my calculator example (which defines a nim-side callback which returns a sciter VALUE) doesn't seem to leak
03:50:01leorize[m]https://sciter.com/sdk/doc.api/html/value_8h.html
03:50:07leorize[m]good ol' doxygen have it all
03:50:29Yardanicothere's no documentation there :P
03:51:08leorizewhat are you talking about? it's all in there :P
03:51:24Yardanicoalso apparently my sciter example crashes with ARC
03:51:27Yardanicoit didn't before..
03:51:42leorize[m]https://sciter.com/sdk/doc.api/html/value_8hpp_source.html
03:51:48Yardanicoand doesn't seem to related to destructors at all
03:51:51leorize[m]there you go, the canonical CPP source
03:52:13Yardanicoyeah I know about that one
03:52:46leorizeas long as you follow that you should be fine
03:53:02YardanicoI mean I can technically don't have a nim object
03:53:07Yardanicobut a direct alias for "VALUE"
03:53:19Yardanicobut i think that it'd be unsafer
03:53:23leorizejust use the object for the encapsulation
03:53:39Yardanicoyeah it's literally SciterValObj* = object impl: ptr SCITER_VALUE
03:54:07leorizeyou may now call it `Value` :P
03:54:16YardanicoI also have = and =sink
03:54:35Yardanico=sink is just destroing the old one and copying new pointer into old one
03:54:43Yardanicoleorize[m]: well I can't :D
03:54:56leorizewhy?
03:55:04Yardanicowell maybe I can actually
03:55:12YardanicoSciter API for some reason defines SCITER_VALUE* = Value
03:55:13Yardanicojust an alias
03:55:33Yardanico"typedef VALUE SCITER_VALUE"
03:55:34ForumUpdaterBotNew thread by Salient: How to pass multiple parameters into proc - not varargs, see https://forum.nim-lang.org/t/6668
03:55:36leorizedon't you control the wrapper?
03:55:41YardanicoI do, yeah
03:55:41leorizeyou can just control where everything goes
03:55:43YardanicoI just didn't notice it before
03:56:00Yardanicobut "Value" name might conflict with some other stuff, or it's fine?
03:56:07leorizeit's fine
03:56:16leorizewe have qualifiers if conflicting is ever a problem
03:57:20Yardanicowell at this point I get conflicts because I import everything from the low-level interface
03:57:23Yardanicoah right I can just rename VALUE
03:57:52leorizeor you can just separate the low-level stuff to a separated file
03:57:59Yardanicoyes, I plan to do that
03:57:59*dadada joined #nim
03:58:23*dadada is now known as Guest72535
03:58:50Yardanicoleorize[m]: lol
03:59:00YardanicoAndrew ( the creator of Sciter) replied almost like you about the ValueCopy
03:59:01Yardanicohttps://sciter.com/forums/topic/a-question-about-sciters-value-type/#post-66848
04:03:35leorizethe API is pretty straightforward for that one
04:03:37leorizeunlike gtk :P
04:03:42Yardanicohehe
04:04:11YardanicoSciter provides both ways of doing things - wrapping _everything_ natively, or just the logical side of things
04:04:19Yardanicokeeping the UI (with events) to TiScript which is much more natural there
04:04:28Yardanicothan in native sequential code
04:04:50YardanicoI mean things like handling OnKeyPress, etc
04:05:58leorizedo the native thing
04:06:01*supakeen quit (Quit: WeeChat 2.8)
04:06:14Yardanicowell I'll try to :)
04:06:26YardanicoSciter seems nice, and the author said he had plans for open-sourcing it
04:06:37*supakeen joined #nim
04:06:45Yardanicoalthough it's not easy since there's quite a big codebase already
04:06:49Yardanicobut at least it's self contained
04:06:57leorizethen you slap a nice DSL on top and bam you have a cool Nim thing
04:07:05Yardanicoto flex on those electron kids /s
04:07:18leorizeI'll use sciter once it's actually open sourced :P
04:07:37leorize(I use musl libc and, uh, proprietary thing just doesn't work here)
04:07:44Yardanicooh right
04:07:53YardanicoSciter uses GTK for the native windows on Linux
04:08:00Yardanicobut it also has a windowless mode
04:10:23*waleee-cl quit (Quit: Connection closed for inactivity)
04:20:26*unai_ joined #nim
04:21:34FromDiscord<drsensor👹> Hi, is it okay to use `distinct string` type as a key on `Table`?↵do I need ot extend it so it can be hashed?
04:22:01leorizeyes, you can use distinct string as a key
04:22:13leorizehowever you'd need to implement your own hashing
04:22:31leorizewell you don't have to, just import hashes and write a wrapper for the regular hash :P
04:22:44*unai_ quit (Client Quit)
04:23:01*unihernandez22 joined #nim
04:23:32leorizebasically: `proc hash(s: YourString) = hash(s.string)`
04:23:35leorizethen it will just work
04:25:39FromDiscord<Rika> cant you do `proc hash(s: YourString) {.borrow.}`
04:25:48leorizeoh yea, that too
04:27:42*unihernandez22 quit (Client Quit)
04:27:51FromDiscord<drsensor👹> nice, thanks
04:28:25leorize[m]anyone feeling like writing better wikipedia pages? :P https://en.wikipedia.org/wiki/Nim_(programming_language)
04:33:22*D_ quit (Ping timeout: 260 seconds)
04:34:39*D_ joined #nim
04:35:29*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
04:35:42*njoseph joined #nim
04:36:38*njoseph quit (Client Quit)
04:36:39FromDiscord<drsensor👹> what's wrong with the wiki?
04:36:46*njoseph joined #nim
04:36:54Yardanicothat page is quite incomplete
04:45:57FromDiscord<drsensor👹> sent a code paste, see https://play.nim-lang.org/#ix=2tX1
04:47:27leorizeyou need to borrow the `==` operator too
04:47:54leorizeso ```proc `==`(x, y: Event): bool {.borrow.}```
04:50:17*rockcavera quit (Remote host closed the connection)
04:50:41FromDiscord<drsensor👹> thanks, it works
04:51:40*mbuchel quit (Ping timeout: 256 seconds)
04:53:07voltistVindaar: My FITS image reader is now up
04:53:16voltist!disbot dizzyliam/astroNimy
04:53:26leorizeit's !repo
04:53:41voltistWhoops
04:53:57voltist!repo dizzyliam/astroNimy
04:53:58disbothttps://github.com/dizzyliam/astroNimy -- 9astroNimy: 11A Nim library for astronomical image processing 15 3⭐ 0🍴
04:54:01voltistWhey!
04:55:34FromDiscord<drsensor👹> ah yes, how do I print `distinct` type?
04:56:13leorizeborrow the `$` :)
04:56:33leorize```proc `$`(e: Event): string {.borrow.}```
04:56:54FromDiscord<drsensor👹> right forgot there is a dollar symbol 😂
04:57:54leorizethat symbol have a history of triggering PTSD for bash users :P
05:00:53voltistFish user represent!
05:01:04voltistusers*
05:02:07FromDiscord<drsensor👹> anyone use nushell as their daily driver?
05:02:31FromDiscord<Rika> fish users still need to use $ symbol tho :ThonkDumb:
05:04:53voltist@Rika Do we?
05:05:27FromDiscord<Rika> yeah i dont remember not using the $ symbol in fish
05:05:36Yardanicouh wat
05:06:21Yardanicoah well
05:06:30Yardanicoyou need it for the variable substitution, yes
05:06:36Yardanicobut not for evaluation of commands like in bash
05:07:54FromDiscord<Rika> ah yes
05:15:50*vicfred quit (Quit: Leaving)
05:39:35Zevvdisruptek: so, typed is not going to work, right?
05:43:36Yardanicois LPCWSTR the same as ptr UncheckedArray[uint16] ?
05:45:33leorizeyes, or WideCString in Nim
05:45:49leorizewell maybe not WideCString in old runtime
05:48:33*solitudesf joined #nim
05:58:54Zevvleorize: you once told me how to do quote do with a custom escape char
06:00:19Yardanicohrm
06:00:23Zevvquote do: <block> do: "quoting op"
06:00:29Zevvbut can't get the syntax right it seems
06:00:35Yardanicoso I'm fighting some strange arc-only widecstring thing
06:00:58Yardanicoif I do "var ws: WideCString" and then pass it to a function which expects a ptr LPCWSTR as cast[ptr LPCWSTR](addr ws) - it works in refc
06:00:59Yardanicobut doesn't in arc
06:01:24Yardanicowell I mean that function returns stuff
06:01:33Yardanico(sets stuff I mean, via the pointer)
06:01:40Yardanicobut $ for WideCString for arc does something weird
06:02:03ZevvYardanico: if you are brave enough, minimize your example, compile with -d:danger --gc:arc and look at the C source
06:02:14*apahl quit (Ping timeout: 246 seconds)
06:02:29Yardanicohrm it's really weird indeed
06:02:48Yardanicoeven in $ for WideCString itself (when echoing separate string eentities) it prints valid stuff
06:03:26Yardanicoanother arc bug? XD
06:03:27*apahl joined #nim
06:03:32Zevvsure why not
06:08:42*snowolf quit (Remote host closed the connection)
06:10:30*snowolf joined #nim
06:11:12FromDiscord<tomck> sent a code paste, see https://play.nim-lang.org/#ix=2tXg
06:11:29Yardanicovar T is not a first-class type
06:11:35Yardanicoit's used in routine arguments
06:11:52Yardanicowhen you want to mutate the passed argument (so it would be visible)
06:11:54FromDiscord<tomck> i see, so is `ref T` always a pointer to a mutable T? I can't have a const T ptr?
06:11:59Yardanicono
06:12:16Yardanicobut strictFuncs was introduced recently, which introduces deep immutability for refs in funcs
06:12:19FromDiscord<tomck> interesting, ok
06:12:56FromDiscord<tomck> So if i have a non-var `T` which is an object that contains a `ref Foo` , can I mutate that Foo despite the `T` being immut?
06:13:29Yardanicono
06:13:53Yardanicoif you have "let myvar = T(...)" and then try to mutate "myvar.val = 3" it won't work
06:13:58Yardanicoor I misunderstood you
06:14:21leorizeZevv: didn't we end up with a template in the end?
06:14:23Yardanicoif T is an object type of course
06:14:26Yardaniconot a ref object
06:14:41FromDiscord<tomck> Yes, but what if `T.val` is a ref object
06:14:48Yardanicobut T is not a ref object
06:15:00Yardanicoimmutability works just as you would expect for "object" types
06:15:40FromDiscord<tomck> sent a code paste, see https://play.nim-lang.org/#ix=2tXh
06:15:49Yardanicono, as I said
06:15:51FromDiscord<tomck> but, it WOULD be valid if the top-level T was a ref?
06:15:55Yardanicoyes
06:16:03FromDiscord<Rika> huh? really?
06:16:06FromDiscord<tomck> what?
06:16:11Yardanico?
06:16:16Yardanico"object" is a value type
06:16:26Yardanicoif it's declared with "let", it's immutable
06:16:41FromDiscord<tomck> sent a code paste, see https://play.nim-lang.org/#ix=2tXi
06:16:49Yardanicono
06:16:52Yardanicoyou misunderstand me
06:16:57Yardanicowell actually
06:17:19Yardanicoyes you can do that
06:17:20FromDiscord<Rika> yardanico: objects only are immutable at the first level, refs in objects can still be mutated
06:17:24Yardanicoyes
06:17:27YardanicoI was confused :P
06:17:29FromDiscord<tomck> okay i see
06:17:37FromDiscord<tomck> alright ta
06:26:01Zevvleorize: yes, but I also can't get *that* to work anymore :)
06:26:33Zevvjust that it came up on the forum: https://forum.nim-lang.org/t/6663
06:32:03*snowolf quit (Remote host closed the connection)
06:34:10*snowolf joined #nim
06:39:39*Vladar joined #nim
06:41:31*abm joined #nim
06:49:51*abm quit (Quit: Leaving)
06:53:53*PMunch joined #nim
07:09:24*abm joined #nim
07:18:03*aenesidemus_ quit (Read error: Connection reset by peer)
08:02:53*krux02 joined #nim
08:15:16PMunchkrux02, found a little issue with the negative stack thing
08:15:45PMunchJust something that might seem a bit unintuitive
08:15:49krux02no overloading
08:15:58PMunch200 100 -
08:16:04PMunchReturns 100
08:16:08PMunch200 - 100
08:16:12PMunchReturns -100
08:16:44PMunchWell my implementation can have overloading
08:16:50krux02ok
08:17:01alehander92hey
08:17:11PMunchThey're implemented as coroutines that just gets blocked waiting for more stack elements to appear
08:17:47PMunchSo in the 200 - 100 example it first pops the 200, then the 100. Which would be equivalent to a stack like 100 200 -
08:20:53FromDiscord<Doongjohn> I'm trying to make a "try nim online" feature in my hobby website. Is nim-playground open to send request?
08:21:10PMunchYup
08:21:18PMunchJust look at how NimBot does it
08:21:39FromDiscord<Doongjohn> what's NimBot?
08:21:52FromDiscord<lqdev> !eval echo "this is nimbot"
08:21:52NimBotCompile failed: <no output>
08:21:52PMunch!eval echo "Hello, I'm NimBot!"
08:21:52NimBotCompile failed: <no output>
08:22:01PMunchHmm, that's not good
08:22:06FromDiscord<lqdev> wut
08:22:06FromDiscord<Doongjohn> oh
08:22:13FromDiscord<lqdev> seems like it's broken
08:22:42FromDiscord<lqdev> playground returns a 502 bad gateway
08:22:47FromDiscord<lqdev> via cloudflare
08:22:52PMunchYeah I can see that
08:22:58PMunchThe server appears to be running though..
08:23:30FromDiscord<lqdev> hmm the main website works just fine
08:23:41PMunchOh
08:23:46PMunchIt's out of disk again..
08:24:27FromDiscord<lqdev> are you storing all programs people input?
08:24:39PMunchI'm trying my best to delete them..
08:24:43PMunchBut Docker is a mess
08:24:49FromDiscord<lqdev> well docker™️
08:24:59FromGitter<gogolxdong> How to get the nanosecond presentation in Nim?
08:25:06FromDiscord<lqdev> i wonder what went wrong
08:25:16PMunchWhat do you mean?
08:25:24PMunchIt just doesn't properly clean up after itself
08:25:47PMunchI guess I should just create a cron job to run `docker system prune -a` or something
08:26:07FromDiscord<lqdev> @gogolxdong std/monotimes has getMonoTime(). you can get two of them and subtract one from the other and get a Duration which has nanosecond precision
08:26:49FromGitter<gogolxdong> something like time.time_ns() in python.
08:30:08*Vladar quit (Remote host closed the connection)
08:31:16*JustASlacker joined #nim
08:31:57*Vladar joined #nim
08:34:55PMunchWell shit..
08:35:08PMunchI cleared some space from the drive, updated the machine, and rebooted
08:35:14PMunchBut it doesn't seem to come up..
08:35:33PMunchdom96, do you have a moment to check out the playground server?
08:49:54Zevv< PMunch> But Docker is a mess. See, now you agree with me
08:50:08Zevvwasn't that _my_ point
08:50:14PMunchHaha, fair enough
08:50:23PMunchI guess I like what docker offers, but not docker itself
08:50:47Zevvsuure, could't agree more.
08:50:56FromDiscord<Varriount> PMunch: How is docker a mess?
08:51:24FromDiscord<Varriount> Also, how's your NPeg grammar going?
08:52:40PMunchWell it just filled up the playground server hard-drive despite my best efforts of getting it to not do that, and now it won't start up again..
08:52:51PMunchOh I completed that the other day
08:53:01ZevvMy docker experience can be described as "bleeding to death by a thousand paper cuts"
08:53:15PMunchI really only wanted to add support for " delimited strings to what is essentially splitWhitespace
08:55:23FromDiscord<Varriount> PMunch: "docker system prune -v" didn't work?
08:57:38PMunch-v?
08:58:10FromDiscord<Varriount> Removes volumes
08:58:17PMunchI did a -a now, but I don't want to run a prune every time someone enters code. That could end up with one person deleting a container of someone else before it was done..
08:58:45FromDiscord<tomck> can i get the nth element of an inline iterator?
08:58:46FromDiscord<Varriount> prune doesn't remove running containers, afaik
08:59:05PMunchI guess I should just set up a prune as a cron job, I mean it's about half a year or something since the last issue like this
08:59:08FromDiscord<tomck> (without iterating over it and 'searching' for the index i want, which is a bit silly)
08:59:25PMunchtomck, that isn't possible unfortunately
08:59:51FromDiscord<Varriount> tomk: Not really. An iterator works on the concept that it is called repeatedly
08:59:52PMunchSince iterators are just a procedure that you can call over and over and it will give you different values every time (not quite, but close enough)
09:00:41*Zambyte[m] quit (Quit: Idle for 30+ days)
09:01:05FromDiscord<lqdev> @gogolxdong there's times.getTime()
09:01:36FromDiscord<tomck> alright, shame
09:05:39*BitPuffin quit (Quit: killed)
09:05:39*GitterIntegratio quit (Quit: killed)
09:05:39*codic quit (Quit: killed)
09:05:41*reversem3 quit (Quit: killed)
09:05:46*planetis[m] quit (Quit: killed)
09:05:46*lnxw37d4 quit (Quit: killed)
09:05:46*hnOsmium0001[m] quit (Quit: killed)
09:05:46*leorize[m] quit (Quit: killed)
09:05:53*skrylar[m] quit (Quit: killed)
09:05:53*Zoom[m] quit (Quit: killed)
09:05:53*silvernode[m] quit (Quit: killed)
09:05:54*ee7[m] quit (Quit: killed)
09:05:55*unclechu quit (Quit: killed)
09:05:56*rridley[m] quit (Quit: killed)
09:05:56*jklhyd[m] quit (Quit: killed)
09:05:57*swamptest1[m] quit (Quit: killed)
09:06:00*darrion_oakenbow quit (Quit: killed)
09:06:03*j4nvkvc quit (Quit: killed)
09:06:03*guelosk[m] quit (Quit: killed)
09:06:03*einichi quit (Quit: killed)
09:06:03*MTRNord[m] quit (Quit: killed)
09:14:31*skrylar[m] joined #nim
09:15:20*hnOsmium0001 quit (Quit: Connection closed for inactivity)
09:45:57*planetis[m] joined #nim
09:45:57*unclechu joined #nim
09:45:57*BitPuffin joined #nim
09:45:57*guelosk[m] joined #nim
09:45:57*leorize[m] joined #nim
09:45:57*lnxw37d4 joined #nim
09:45:57*darrion_oakenbow joined #nim
09:45:57*MTRNord[m] joined #nim
09:45:57*hnOsmium0001[m] joined #nim
09:45:58*einichi joined #nim
09:45:58*GitterIntegratio joined #nim
09:45:58*j4nvkvc joined #nim
09:45:58*codic joined #nim
09:45:58*reversem3 joined #nim
09:45:58*Zambyte[m] joined #nim
09:46:03*Zoom[m] joined #nim
09:46:03*jklhyd[m] joined #nim
09:46:04*silvernode[m] joined #nim
09:46:04*ee7[m] joined #nim
09:46:04*rridley[m] joined #nim
09:46:04*swamptest1[m] joined #nim
09:51:35ForumUpdaterBotNew thread by Lum: HTTPS requests in Nim, see https://forum.nim-lang.org/t/6670
10:13:15FromDiscord<tomck> Hmmm, any way I can get the element type of an iterator?
10:14:04FromDiscord<tomck> sent a code paste, see https://play.nim-lang.org/#ix=2tY0
10:14:21FromDiscord<tomck> (edit) 'https://play.nim-lang.org/#ix=2tY0' => 'https://play.nim-lang.org/#ix=2tY1'
10:14:37FromDiscord<tomck> (can't get the type of 'default' because default might be `nil`)
10:15:43FromDiscord<tomck> or i guess i can't because `iter` is untyped
10:16:01FromDiscord<tomck> how can i get the 'last' element in the iterator otherwise then?
10:19:49FromDiscord<Vindaar> is `iter` an actual iterator or just something that defines an `items` iterator, e.g. a collection?
10:20:02FromDiscord<tomck> it's an inline iterator
10:21:43FromDiscord<Vindaar> how do you want to handle `var x = default` for a `nil` case?
10:22:22FromDiscord<Vindaar> is `x` supposed to be some `ref` object in that case?
10:25:05FromDiscord<lqdev> typeof(iter) is a thing
10:25:11FromDiscord<flywind> `testament all` will only test something like `tests/*/t1.nim`, but `tests/t1.nim` won't be tested. Is it intended behaviour?
10:25:55FromDiscord<Recruit_main707> is `--newRuntime` stable?
10:26:10FromDiscord<lqdev> it was superseded by --gc:arc
10:31:09FromDiscord<tomck> that's why you have the option of a `default` @Vindaar , for when nil isn't an option
10:31:22FromDiscord<tomck> @lqdev does typeof(iter) return the type of the iterator element, or another type?
10:31:41FromDiscord<lqdev> yeah, it returns the iterator's yield type
10:31:46FromDiscord<tomck> col!
10:31:49FromDiscord<tomck> (edit) 'col!' => 'cool!'
10:31:56FromDiscord<lqdev> see this https://nim-lang.org/docs/manual.html#special-types-typeof-operator
10:31:59FromDiscord<Vindaar> sent a code paste, see https://play.nim-lang.org/#ix=2tY8
10:32:08FromDiscord<tomck> oh
10:32:21FromDiscord<tomck> confusion
10:32:25FromDiscord<tomck> let me just try it
10:33:15FromDiscord<tomck> typeof(iter) seems to return the yield type, rather than the 'container' type, so we're all good
10:33:37FromDiscord<Vindaar> weird, it does not for me?
10:34:06FromDiscord<Vindaar> sent a code paste, see https://play.nim-lang.org/#ix=2tY9
10:34:32FromDiscord<tomck> yes
10:35:32FromDiscord<lqdev> @Vindaar pretty sure that is because you're passing in a *closure* iterator
10:35:37FromDiscord<lqdev> and not an inline iterator
10:35:43FromDiscord<Vindaar> oh
10:35:56FromDiscord<lqdev> so it's getting the type of variable a
10:36:02FromDiscord<lqdev> which is `iterator (): float {.closure.}`
10:36:06FromDiscord<Vindaar> that makes sense yeah
10:38:54FromDiscord<Vindaar> for some reason I thought that was what tomck wanted, hah
10:41:56*arecacea1 quit (Remote host closed the connection)
10:43:59*arecacea1 joined #nim
10:50:46PMunchReally annoying that the playground is down..
10:50:59PMunchEspecially since I'm not able to do anything about it
10:53:54*Northstrider[m] quit (Quit: killed)
10:56:20*Northstrider[m] joined #nim
11:05:29Zevvwho can?
11:08:41*lritter joined #nim
11:10:47*slackytude[m] joined #nim
11:17:46*solitudesf quit (Ping timeout: 265 seconds)
11:20:13*solitudesf joined #nim
11:24:33*solitudesf quit (Remote host closed the connection)
11:41:14*mbuchel joined #nim
11:59:42*solitudesf joined #nim
12:06:02*supakeen quit (Quit: WeeChat 2.8)
12:06:38*supakeen joined #nim
12:09:36*theelous3 joined #nim
12:14:50*rockcavera joined #nim
12:27:29*dulsi_ joined #nim
12:30:19*dulsi quit (Ping timeout: 256 seconds)
12:37:20*rockcavera quit (Killed (kornbluth.freenode.net (Nickname regained by services)))
12:37:20*rockcavera joined #nim
12:40:52*kitech1 quit (Quit: ZNC 1.7.5 - https://znc.in)
12:41:09*kitech1 joined #nim
12:42:00PMunchZevv, dom96
12:44:50ZevvPMunch
12:45:13PMunchZevv+
12:45:16PMunch?*
12:45:50Zevv>+PMunch
12:46:02PMunchYou asked me who could fix the playground :P
12:46:15Zevvooh
12:46:29PMunchAlmost two hours ago I just realised..
12:47:37*solitudesf quit (Ping timeout: 264 seconds)
12:51:11*solitudesf joined #nim
12:58:59*dulsi__ joined #nim
13:01:23*dulsi_ quit (Ping timeout: 240 seconds)
13:18:41Zevv#nim has stalled because of the heat wave I guess
13:20:11*Jesin quit (Ping timeout: 240 seconds)
13:21:29*apahl quit (Ping timeout: 244 seconds)
13:23:41*apahl joined #nim
13:24:20PMunchHeat wave?
13:26:30Zevvdude
13:26:48FromDiscord<haxscramper> If code passed as argument to macro raises exception traceback shows position of `quote do` and not original macro. How can I correct this?
13:27:37PMunchZevv, I keep saying this, move to Norway :P
13:27:39FromDiscord<haxscramper> E.g if I have `quote do: somecode` I get part of traceback pointing to `quote do:` and not `somecode`
13:27:51PMunchHere it's sunny, but nice and cool
13:28:33FromDiscord<haxscramper> I tried creating new nim node using `newNimNode` with `lineInfoFrom` set to argument node but it didn't work
13:29:01Zevvguess I'm 20 years too old to get a higly skilled migrant permit :)
13:29:15Zevvand I'm not highly skilled enought, of course
13:33:25*Kaivo joined #nim
13:36:51PMunchI don't think it's that hard to move here :P
13:37:01PMunchYou're even in the EU, so it's probably even easier
13:37:06PMunchhttp://ix.io/2tYy/nim
13:37:11PMunchWhat am I doing wrong here?
13:37:27PMunchI want to have two parsers, one that ignores whitespace, and one that includes it
13:38:05PMunchSo that "100 200 +" would be parsed as either "100", "200", "+" or "100", " ", "200", " ", "+"
13:38:15PMunchBut the second one stops if I have more than one space..
13:38:35PMunchOh..
13:38:36PMunchDurr
13:38:39PMunch?' '
13:47:58*JustASlacker quit (Ping timeout: 260 seconds)
13:57:43FromDiscord<Kiloneie> > Is there some kind of application that Nim's singular inheritance cannot solve, but a multi one can ?
13:59:23PMunchI mean, considering you can solve any application without inheritance at all I'd say no
13:59:28PMunchBut some things might be more ergonomic
14:00:33*PMunch quit (Quit: Leaving)
14:02:56*JustASlacker joined #nim
14:06:45FromDiscord<Kiloneie> I know that for games inheritance is very nice(probably why Nim even has oop), but i haven't come across a reason why to use multi inheritance. I did think of it, in game design terms for enemies and such, but it's not really needed, like you said.
14:08:22*JustASlacker quit (Ping timeout: 256 seconds)
14:12:15FromDiscord<lqdev> i personally prefer composition over inheritance in gamedev
14:12:22FromDiscord<lqdev> inheritance causes a few problems in the long run
14:12:35*gogoprog joined #nim
14:14:54FromDiscord<Kiloneie> i've read a bit on that, will have to cover that after im done with my current plan for object videos.
14:17:18FromDiscord<Kiloneie> And when i mean i read a bit, i can't even remember what i read xD...↵I did find online(especially reddit) that most people say to use composition over multiple inheritance like you said
14:19:19ZevvPMunch: you need help still?
14:21:10FromDiscord<Kiloneie> Where can i find details on composition in Nim ? Manual has 0 results for that word and nim tut part 2 has 2 mentions with no real explanation or examples(maybe dom's book has it... brb)
14:22:34FromDiscord<lqdev> you don't need special language features to have composition
14:22:46FromDiscord<lqdev> it's literally just putting objects inside of other objects
14:22:52FromDiscord<lqdev> rather than inheriting objects from objects
14:23:21FromDiscord<lqdev> a good example of composition is the component pattern: https://gameprogrammingpatterns.com/component.html
14:23:40FromDiscord<lqdev> maybe this can illustrate it better
14:25:28FromDiscord<Kiloneie> it's painful to read c++ code O,O
14:25:58FromDiscord<Kiloneie> i can't understand why i prefered this curly bracket spagheti for so long
14:26:59*theelous3 quit (Ping timeout: 240 seconds)
14:28:10FromDiscord<Kiloneie> Spaghetti https://media.discordapp.net/attachments/371759389889003532/743113600150929488/spagheti_code.PNG
14:32:37*Guest72535 quit (Ping timeout: 264 seconds)
14:34:07*dadada joined #nim
14:34:31*dadada is now known as Guest32962
14:36:48*bung joined #nim
14:40:59FromDiscord<Kiloneie> Yeah, this is all logical design, i've actually done this in Game Maker(however you can in Game Maker lol), by making different kinds of controller objects for different system parts to be able to just plug and play idk debug info, audio, etc.
14:41:09FromDiscord<Kiloneie> Good read though.
14:50:08*def- quit (Quit: -)
15:00:02*arecacea1 quit (Remote host closed the connection)
15:00:37*arecacea1 joined #nim
15:01:47Oddmongerwhy cannot do include values in a set with a loop ?
15:01:49Oddmongeri can do:
15:01:59OddmongermySet:set[int16]
15:02:07OddmongermySet.incl( 1)
15:02:10Oddmongerbut cannot
15:02:17Oddmongerfor i in 1..10:
15:02:23Oddmonger mySet.incl( 1)
15:02:26Oddmongerwait a minute
15:02:33Oddmongerah because of int vs int16 i bet
15:05:46*vicfred joined #nim
15:07:15disruptekZevv: i saved that identifier bug for ya.
15:08:29FromDiscord<benash> sent a long message, see http://ix.io/2tYY
15:09:06*dulsi__ is now known as dulsi
15:09:30*JustASlacker joined #nim
15:11:19FromDiscord<lqdev> sent a long message, see http://ix.io/2tZ1
15:11:58FromDiscord<Kiloneie> You don't need any language as a pre requisite for Nim
15:12:06FromDiscord<Kiloneie> only a little bit of C for FFI
15:12:20FromDiscord<Kiloneie> (interfacing with C libraries)
15:13:21FromDiscord<benash> That's what I figured, but then I looked at the source for some package that wrapped a C library and was rather taken aback
15:13:45FromDiscord<Kiloneie> https://nim-lang.org/learn.html here is a ton of learning material in case you missed it(i've got some video tuts on Nim on my channel as well if you aren't that advanced)
15:14:30FromDiscord<kodkuce> why nim suggest keeps crashing for me all time in vscode
15:14:56FromDiscord<Kiloneie> @kodkuce you mean no suggestions popping up ?
15:15:50FromDiscord<benash> @lqdev got it, I'm looking forward to trying macros out. Seems like such a cool idea. Helpful to know there might be a learning curve.
15:16:21FromDiscord<Kiloneie> there is also Nim in Action book if you are interested(costs about 30 dollars or so) it's really good.
15:16:28FromDiscord<lqdev> @benash macros are easy if you're only *constructing* AST but *introspecting* AST from symbols can be a bit of a pain
15:16:29FromDiscord<Kiloneie> it covers macros too
15:16:41FromDiscord<lqdev> so it depends on your needs
15:18:25*lbart quit (Ping timeout: 240 seconds)
15:18:57FromDiscord<kodkuce> sent a code paste, see https://play.nim-lang.org/#ix=2tZ2
15:19:25*JustASlacker quit (Ping timeout: 240 seconds)
15:19:25FromDiscord<Kiloneie> No clue D:
15:19:31FromDiscord<Kiloneie> never happened to me
15:19:43*lbart joined #nim
15:19:43*lbart quit (Changing host)
15:19:43*lbart joined #nim
15:19:46FromDiscord<benash> @lqdev So e.g. syntax sugar would fall into the easier category?
15:19:53FromDiscord<lqdev> yeah
15:19:55FromDiscord<kodkuce> meybe cuz i am using vscodium
15:19:58FromDiscord<benash> got it
15:20:13FromDiscord<Kiloneie> maybe, it just might be the ide
15:20:35FromDiscord<Kiloneie> idk VS code even runs on my dual core 10 year old laptop lol, give it a try
15:20:55FromDiscord<Kiloneie> wait
15:21:04FromDiscord<kodkuce> i have realativly good pc its not about that its about this extension
15:21:13FromDiscord<kodkuce> i think i tryed all 4 and all crash
15:21:20FromDiscord<Kiloneie> hmm i've never heard of this fork of vs code, interesting
15:21:21FromDiscord<kodkuce> nim, nim alt, nim lsp
15:21:30FromDiscord<haxscramper> If I wrap macro body in `block` statement (named or unnamed) all unnamed `break`s inside jump to it. Is it possible to somehow detect `break` triggering inside macro body, or break two scopes at a time (or explicitly break out of `while/for`)? It is possible to just rewrite body to set some kind of `breakHappened` flag, but that's just annoying to implement.
15:21:33FromDiscord<kodkuce> its just vscode whiout microsoft boat
15:21:35FromDiscord<kodkuce> (edit) 'boat' => 'bloat'
15:21:46FromDiscord<Kiloneie> idk try plain microsoft vs code or some other IDE
15:22:06*fredrikhr quit (Read error: Connection reset by peer)
15:22:40FromDiscord<Kiloneie> allthought im not sure why this would have problems based on it's description it's just vs code without tracking stuff
15:24:18FromDiscord<Kiloneie> it might be some dependency problem though
15:25:20Zevvdisruptek: so whats the status
15:27:58FromDiscord<kodkuce> ok got it working i think, at least no more crash
15:28:12FromDiscord<kodkuce> head to manuly install vscode c++ extension
15:28:34FromDiscord<kodkuce> to run offical nim plug
15:28:52FromDiscord<kodkuce> for lsp one i did not sow it need this dep
15:28:57FromDiscord<kodkuce> anyway now no error
15:31:27FromDiscord<Kiloneie> huh, is c++ extension required by Nim ? I don't think it is...
15:34:09FromGitter<tim-st> Should the following output `1,2,3` or `3,2,1`?
15:34:11FromGitter<tim-st> proc main() = ⏎ for i in 1..3: ⏎ ⏎ ```defer: ⏎ echo i``` ⏎ ... [https://gitter.im/nim-lang/Nim?at=5f340bf24a53c832173554c4]
15:34:47FromDiscord<Kiloneie> default iterator is from low to high...
15:34:59FromDiscord<lqdev> 1, 2, 3
15:35:08FromGitter<tim-st> defer has no effect here?
15:35:35FromGitter<tim-st> https://play.golang.org/p/Pauo8iHAZK3
15:35:40FromDiscord<Kiloneie> not like that no...
15:35:54FromGitter<tim-st> ok, thanks
15:36:00disruptekdefer is a try/finally under the hood.
15:36:17FromGitter<tim-st> ok
15:36:19FromDiscord<Kiloneie> i don't know Go, but that defer is something completely different
15:36:22disruptekbut, try not to use defer.
15:36:34disruptekit's something with very limited, albeit valid, use-cases.
15:36:41disruptekit's code smell, generally.
15:36:50FromGitter<tim-st> just wondered if something was broken
15:37:09disrupteknot in that example. (i didn't look at the example.) 😉
15:37:43FromDiscord<Kiloneie> sometimes same named stuff in one language is completely different in another...
15:38:15FromGitter<tim-st> but not often, I think
15:38:39disruptek!rfc author:disruptek try
15:38:40disbothttps://github.com/nim-lang/RFCs/issues/218 -- 3try/except scope -- should it be a thing?
15:43:26FromDiscord<Kiloneie> I prefer try with finally syntax, defer makes my head freeze
15:46:32FromDiscord<Danny Hpy> uh how can I compile something for an another architecture?
15:46:42FromDiscord<Danny Hpy> x86_64 -> powerpc for instance?
15:47:33FromDiscord<Kiloneie> this should help you: https://nim-lang.org/docs/nimc.html
15:48:00disruptekput a little sugar in my bowl.
15:49:41FromDiscord<Danny Hpy> I tried but https://media.discordapp.net/attachments/371759389889003532/743134113652801546/unknown.png
15:50:14FromDiscord<Danny Hpy> it doesn't seem to be supported at all
15:51:24FromDiscord<lqdev> you also need to have a separate C compiler for powerpc
15:51:32FromDiscord<lqdev> and specify that in nim.cfg
15:52:00disrupteklooks like you are specifying -march=x86-64
15:52:15FromDiscord<Danny Hpy> oh thanks, i'll take a look lqdev
15:56:02FromDiscord<XxDiCaprioxX> What do I have to write into my nim.cfg file if I want -d:ssl done automatically?
15:56:07*sepples quit (Quit: Bye)
15:56:36disruptekZevv: i'm picturing tubes as forming a rendezvous between a continuation representing a producer and a continuation representing a consumer.
15:56:44disruptekdicaprio: try -d:ssl
15:57:05FromDiscord<XxDiCaprioxX> is that all I have to put in the file?
15:57:09FromDiscord<lqdev> yup
15:57:24disruptekpersonally, i prefer --define:ssl
15:58:26disruptekZevv: iteration simply sucks values from the producer until the trampoline fails.
15:59:37FromDiscord<XxDiCaprioxX> And for a bot, what do I have to do with the .exe?
15:59:45disruptekinvoke it.
15:59:55FromDiscord<XxDiCaprioxX> what does that mean?
16:00:07disruptekexecute it.
16:00:15FromDiscord<XxDiCaprioxX> but a discord bot
16:00:18FromDiscord<XxDiCaprioxX> I meant that
16:00:35disrupteki don't know.
16:00:55FromDiscord<XxDiCaprioxX> Okay thanks regardless
16:03:30FromDiscord<Danny Hpy> @XxDiCaprioxX Execute it?
16:03:47FromDiscord<XxDiCaprioxX> For a discord bot?
16:03:53FromDiscord<Danny Hpy> yes
16:04:07FromDiscord<Danny Hpy> bots are like any other software after all
16:04:19FromDiscord<XxDiCaprioxX> okay
16:04:49FromDiscord<Varriount> Helloooo Nimland
16:05:13FromDiscord<XxDiCaprioxX> It did nothing
16:05:29FromDiscord<XxDiCaprioxX> The bot is offline
16:05:41FromDiscord<Danny Hpy> Did you have a token?
16:05:48FromDiscord<Danny Hpy> execute it from the command line to have an output
16:05:55FromDiscord<XxDiCaprioxX> okay
16:05:59FromDiscord<XxDiCaprioxX> and yes it does
16:11:56disruptekclyybber: i'm an idiot. my mangling tests were only testing stdlib. 🤦
16:19:51*endragor quit (Read error: Connection reset by peer)
16:20:17*endragor joined #nim
16:26:37*endragor quit (Ping timeout: 264 seconds)
16:31:45*gogoprog quit (Read error: Connection reset by peer)
16:32:34*gogoprog joined #nim
16:34:50*rockcavera quit (Remote host closed the connection)
16:40:59Zevvdisruptek: think of it as you like. for me it's just putting the stack on the heap :)
16:42:00ForumUpdaterBotNew thread by Gabbhack: Play.nim-lang.org has been down for several hours, see https://forum.nim-lang.org/t/6671
16:43:48*fredrikhr joined #nim
16:44:32*rockcavera joined #nim
16:51:15*JustASlacker joined #nim
16:51:47Oddmongerwhy only 8192 values in a set[int16] ?
16:52:00Oddmongerisn't 2^16 ?
16:53:34disruptekZevv: we're way beyond that.
16:53:44disruptekwhen are you going to fix typed, anyway?
16:55:52Zevvno no you got it wrong
16:56:03ZevvI did my part yesterday because you were so called "blocked"
16:56:05Zevvyou are unblocked now
16:56:07Zevvyour turn
16:56:10Zevvit takes two to salsa
16:57:15*superbia2 joined #nim
16:57:26Zevvthis clyybberization, did it make things better?
16:58:45*JustASlacker quit (Ping timeout: 240 seconds)
16:59:45*superbia1 quit (Ping timeout: 240 seconds)
17:01:20*waleee-cl joined #nim
17:02:22*Trustable joined #nim
17:04:57*liblq-dev joined #nim
17:09:13Zevvdidn't we decide not to let the trampoline run the continuation?
17:12:45*vicfred quit (Quit: Leaving)
17:13:36*natrys joined #nim
17:20:32disruptekwhat?
17:20:35Zevvman typed macros are nasty
17:20:48disruptekclyybberization is a solution to only part of the problem.
17:21:18disruptekthere doesn't have to be only one trampoline.
17:21:33disruptekand, yes, typed macros are a clusterfuck.
17:21:45Zevveverything I try gets barfed on
17:22:11disrupteki just deleted my first effort on dust.
17:22:41Zevvthe number of typed macros in the stdlib is discourigingly low
17:22:47disruptekpretty rare that i delete anything, no matter how terrible. usually i just publish it and then try to get other people to use it. 😁
17:23:27Zevvyou know what mr A will say when we complain, right
17:23:34Zevv"make a compiler plugin"
17:23:47disruptekwell, ima shelve mangling until i can talk to the boss.
17:24:00*tane joined #nim
17:24:11disrupteki don't know if i want to tackle csp before cps.
17:24:33Zevvok, so, typed is a hurdle we probably don't want to spend time on
17:24:40Zevvso either we go into the compiler
17:24:41disruptekhe wants it in the compiler so it's more of a technical moat.
17:24:53Zevvor further mold the untyped version until it is all we can make of it
17:25:55disrupteki wouldn't rule out typed.
17:26:10*liblq-dev quit (Quit: WeeChat 2.9)
17:27:54Zevvwell, i can't even seem to figure out how to assign something to 'result', because hwatever I do it tells me that I'm trying to redefine the symbol
17:28:32disruptekis this head?
17:28:39disruptektyped?
17:28:51Zevvno, I'm just fiddling in that
17:29:03Zevvand makeing some t.nims
17:29:13disruptektaste test says undeclared identifier: continuation.
17:30:05disruptekah, the ast is bad.
17:30:27disruptekwho wrote this crap?
17:30:36disruptekabsolute 💩
17:30:50Zevvoh I
17:30:54Zevvwasn't even looking at that yet
17:32:23Zevvoh wait
17:32:28Zevvso I just learned something
17:32:35Zevvin a typed macro, you get typed ast
17:32:43disruptekyou're kidding.
17:32:45Zevvbut the ast you need to generate in there, must be of the untyped kind
17:32:50Zevvwhich I did not realize
17:32:50disruptekokay, pull my fix.
17:33:16Zevvis that right ^^
17:33:19Zevvwhat I typed there?
17:33:23Zevvor am I 2 years behind again?
17:33:31disruptekwell, you won't create symbols but you can create idents that have the same strVal.
17:33:48FromDiscord<Recruit_main707> so essentially, yes
17:33:55Zevvyeah but stuff like "nnkHiddenSubConv.newTree"
17:33:57disruptekyou can reuse symbols, though.
17:33:57Zevvwhat is that?
17:34:00*JustASlacker joined #nim
17:34:13disruptekshow me?
17:34:50*kungtotte quit (Read error: Connection reset by peer)
17:35:03Zevvthis is a typed proc doing `result = env0(fn: t)`
17:35:07Zevvhttp://ix.io/2tZK
17:35:41disruptekyou wrote this?
17:35:51Zevvno this comes out of a macro doing a astGenRepr
17:35:51disruptekor are you dumping it somehow?
17:35:55Zevvyeah
17:36:02*kungtotte joined #nim
17:36:05Zevvanyway, nevermind, this new info might help
17:36:06disruptekwell, i don't do that.
17:36:27disrupteki mean, i don't use it because i don't understand it.
17:36:35Zevvright
17:36:38*Trustable quit (Remote host closed the connection)
17:36:44Zevvok, so what test do you run now with your recent fix?
17:37:04disrupteknothing yet.
17:37:04Zevvlike in, what file
17:37:07Zevvok
17:37:18disrupteki am taste testing.
17:37:56disruptektreeRepr is really the only way to fly.
17:38:27Zevveah
17:38:41Zevvok, so what happens now it seems, is that the 'fn' we want to set in the env picks up the wrong one of the two
17:38:47Zevvit gets the bootstrap
17:38:51disruptekright.
17:38:59disruptekbecause we're not calling it with an argument.
17:40:22Zevvit's not about calling - it's about assigning it to 'fn'
17:40:25Zevvwhich is proc(c: C): C
17:40:39Zevvthere *is* a proc with that signature
17:41:00Zevvoh no it's assigning t() not t_clyybber()
17:41:04disruptekoh, but it's not foo.
17:41:04Zevvsure
17:41:05disruptekyeah.
17:41:14disruptekdamn clyybber.
17:42:54disruptekyay, i did the first test.
17:44:18Zevvand it failed
17:44:28disruptekwhy?
17:44:33Zevvjust a guess?
17:44:36Zevvdid it pass?
17:44:39disrupteksure.
17:44:44Zevvpush that shizzle
17:44:54ZevvI was still searching for the ObjConstr
17:45:03disruptekoh, it's the rootResult call.
17:45:21disruptekbut now we get to deal with deprecated cpsMagic.
17:46:24disrupteki forget how we were gonna solve this.
17:47:08Zevvwhat was the problem
17:47:28disruptekjield() is not valid input for the typed macro.
17:47:49Zevvright
17:48:00Zevvagain, what test file are you running
17:48:03Zevvso we look at the same stuff
17:48:12disruptektaste.nim
17:48:20Zevvdude
17:48:22ZevvI can't run that
17:48:22Zevvwhy
17:48:28disruptekpull now.
17:48:33disruptekwhy?
17:48:43Zevvbecause of dpendency hell the other day
17:48:59disrupteki mean...
17:49:07Zevvtrying agan
17:49:25Zevv Error: Cannot satisfy the dependency on cligen 1.1.0 and cligen 0.9.41
17:49:36disruptekoh this is a nimble thing?
17:49:40Zevvreally, I'm too stupid to use *any* kind of package manager
17:49:53ZevvI don't know, I do 'bootsrtap.sh'
17:49:57disruptekjust put testes and cutelog and bump in a directory.
17:50:08disruptekthen --path="/some/where/testes/"
17:50:16Zevvsigh
17:50:16Zevvok
17:50:18disruptekthen --path="/some/where/bump/"
17:50:24disruptekthen --path="/some/where/cutelog/"
17:50:40disruptekpm is stupid anyway.
17:52:11Zevvnow you've done it
17:52:11ZevvSIGSEGV: Illegal storage access. (Attempt to read from nil?)
17:52:13Zevvon the compiler
17:52:21disruptekyeah, that's a feature.
17:52:37disrupteksome call it, "Clyybber's Revenge"
17:52:45disruptekuse cpp
17:53:03Zevvno luck
17:53:23disruptekare you trying to use arc?
17:53:27Zevvnope
17:53:31ZevvI don't dare
17:53:38disruptekoh, use --define:release too.
17:53:53disruptekyou have to because of my testes.
17:54:02Zevvyay
17:54:09disruptekmy testes crash the compiler.
17:54:16Zevvwhen you are not looking I will rip out all of that stuff from this repo
17:54:18Zevvand your event queue
17:54:22disrupteki know.
17:54:39Zevv\o/ jield complaints
17:54:40Zevvsoo
17:54:43Zevvlet us ponder
17:55:05disruptekwe can reintroduce cpsMagic untyped. then compose the differing procs with the same names.
17:55:16disruptekbut i just hate to do this.
17:56:44disruptekwhat does your puzzler say?
17:56:59ZevvCannot predict now.
18:00:07*JustASlacker quit (Ping timeout: 256 seconds)
18:00:54Oddmongerfor profiling , should i do something more than: «import profiler» , and compiling with «--stacktrace:on --profiler:on» ?
18:01:22disruptekis that all the docs say to do?
18:01:24Oddmongerprofile_results.txt is empty
18:01:39Oddmongerdisruptek: i have read https://nim-lang.org/blog/2017/10/02/documenting-profiling-and-debugging-nim-code.html
18:02:01FromDiscord<lqdev> it's `import nimprof` not `import profiler`
18:02:55FromDiscord<lqdev> and --stacktrace:on is default
18:03:13Oddmongeryes import nimprof (it was correct in the source)
18:03:16Zevvfwiw: if you are on linux, you might want to do your profiling with `perf` instead - that usually gives me better results then the nim profiler
18:03:19Zevvymmv
18:03:39disruptekperf is tried-and-true.
18:04:29Oddmongerwell it was just quick test between set[int16] and IntSet
18:05:27Oddmongerhttp://ix.io/2tZR
18:05:36disruptekhttps://github.com/disruptek/criterion
18:06:07Oddmongerwell anyway i guess the cast will spoil the generic set incl
18:07:11Oddmongerok disruptek , i will try it
18:08:22disruptekZevv: so.
18:08:25Zevvdisruptek: we make a macro "whatever" that does nothing
18:08:32Zevvand we do "whatever jield()"
18:08:40Zevvthen it's valid enough to get through the first pass
18:09:00*hnOsmium0001 joined #nim
18:09:02disruptekbut whatever will have to produced typed ast.
18:09:24Zevvwould it
18:09:37disruptekit will if it's inside .cps.
18:10:15disruptekwe just put magic back in for now.
18:10:47Zevvbah but sure
18:11:35*krux02_ joined #nim
18:12:05*skelett1 joined #nim
18:12:16disruptekhmm, i forget how to handle sleep's many forms.
18:12:35Zevvso explain to me again, because I am again stupid
18:12:45*zielmicha___ joined #nim
18:12:58Zevvyield() needs to do continuation.yield()
18:13:04Zevvbut continuation does not yet exist
18:13:08disruptekright.
18:13:23disruptekand yield() also has a return value...
18:13:32Zevvright
18:14:08disruptekokay, i patched it. pull.
18:15:25*vicfred joined #nim
18:15:56disruptekremoved the cps prefix from taste calls. you can pull this, too.
18:16:12disrupteknow we get a more interesting defect.
18:16:53disruptekkinda ridiculous that my testes crashes the compiler.
18:17:36disruptekbentley is on a hunger strike to protest youth in asia.
18:18:01disrupteki don't understand it, either.
18:20:31*Northstrider[m] quit (*.net *.split)
18:20:32*darrion_oakenbow quit (*.net *.split)
18:20:32*guelosk[m] quit (*.net *.split)
18:20:33*skrylar[m] quit (*.net *.split)
18:20:34*krux02 quit (*.net *.split)
18:20:34*zielmicha__ quit (*.net *.split)
18:20:34*skelett quit (*.net *.split)
18:20:34*FromGitter quit (*.net *.split)
18:20:35*zielmicha___ is now known as zielmicha__
18:20:53Zevvhe has problems with youth in asia?
18:20:56*FromGitter joined #nim
18:21:16disrupteki think that's what he said.
18:21:28disruptekhis accent is kinda thick when he's been drinking.
18:21:29*leorize[m] quit (Remote host closed the connection)
18:21:29*hnOsmium0001[m] quit (Remote host closed the connection)
18:21:29*codic quit (Remote host closed the connection)
18:21:30*BitPuffin quit (Read error: Connection reset by peer)
18:21:31*ee7[m] quit (Read error: Connection reset by peer)
18:21:33Zevvwell, free country and all that, right
18:21:33*planetis[m] quit (Remote host closed the connection)
18:21:33*MTRNord[m] quit (Remote host closed the connection)
18:21:35*unclechu quit (Read error: Connection reset by peer)
18:21:36*silvernode[m] quit (Read error: Connection reset by peer)
18:21:39*Zambyte[m] quit (Write error: Connection reset by peer)
18:21:40*lnxw37d4 quit (Remote host closed the connection)
18:21:43*j4nvkvc quit (Remote host closed the connection)
18:21:43*GitterIntegratio quit (Read error: Connection reset by peer)
18:21:45*slackytude[m] quit (Remote host closed the connection)
18:21:45*jklhyd[m] quit (Remote host closed the connection)
18:21:45*swamptest1[m] quit (Remote host closed the connection)
18:21:47*Zoom[m] quit (Read error: Connection reset by peer)
18:21:47*rridley[m] quit (Remote host closed the connection)
18:21:47*einichi quit (Write error: Connection reset by peer)
18:21:47*reversem3 quit (Read error: Connection reset by peer)
18:21:47disrupteki guess. fuck'im.
18:22:32*Northstrider[m] joined #nim
18:22:50Zevvso, up to sleep_magic things run
18:22:55Zevvwhich is already pretty impressive
18:23:37disrupteksleep_magic?
18:23:54disruptekoh, well these trampolines shouldn't exist, right?
18:25:21disrupteklol look at that error.
18:25:43FromDiscord<Kiloneie> sent a long message, see http://ix.io/2tZZ
18:26:56disruptekoh, i think we are ready to remove untyped hacks.
18:28:28*OMGOMG quit (Ping timeout: 256 seconds)
18:29:18*ee7[m] joined #nim
18:29:51disruptekyay, it works.
18:30:01*OMGOMG joined #nim
18:38:08Zevvno man
18:38:12Zevvcant be
18:38:14Zevvtoo easy
18:38:22Zevvoh suns down, imma outside!
18:43:27Yardanicobtw, playground is down for a few hours already
18:46:54jkenDo you guys typically have one types.nim file you import around your codebase, or do you have types spread throughout your modules/
18:47:14Yardanicowell it always depends
18:47:25Zevvso disruptek now how does the Cont get into the magic procs? because you throw that argument out, right
18:47:35Yardanicoif you have loosely coupled parts of your program you might not need a single types.nim but rather types in different parts
18:48:12Zevvjken: you cant make mutualle recursive types out of one type block
18:48:27Zevvits a thing i hated since day 1, but its a deliberate choice
18:48:38*def- joined #nim
18:50:18jkenI am not sure what mutualle recursive types are, so probably don't need to worry about that for now
18:50:29Yardanicotype A = ref object field: B
18:50:33jkenI ask because I put all my types in one file at one point and dont recall exactly why
18:50:34Yardanicotype B = ref object field: A
18:50:39jkenah
18:51:00ZevvmutuallY
18:51:01Zevvtypo
18:53:48*lritter quit (Ping timeout: 256 seconds)
18:55:17mbuchelis there a way to see if a number is a proper enumeration?
18:57:17Yardanicowdym?
18:57:23Yardaniconumbers and enum mebers are different things
18:57:59mbuchelso i have an enum that can hold various values like 2 4 5 6 8
18:58:18mbucheli want to have a variable x which i can easily check if it is an enumeration or not
18:58:26Yardanicoare you by any chance doing bitflags?
18:58:32Yardanicolike when interfacing with C
18:58:33mbuchelnope
18:58:39mbuchelnot bitflags
18:58:41Yardanicois the enum with holes or not?
18:58:57mbuchelyes it has holes
18:59:04mbuchelwell it is supposed to
19:00:20mbuchelhttps://0x0.st/iYPO.nim
19:00:25mbuchelhere is an example code
19:00:35FromDiscord<drsensor👹> Hi, anyone know a pretty print versions of `echo`?↵kinda hard squeeze my eyes for inspecting data structure in one line 😂
19:00:44mbuchelthe issue is a value that should not exist is being treated as such an enumeration
19:01:04Yardanico@drsensor for what data structure exactly?
19:01:13Yardanicoyou can always define your own $ for your own datastructure
19:01:17Yardanicoand do all the prettyp rinting you want
19:01:18mbucheldrsensor: do you mean $?
19:02:06Yardanicombuchel: well one simple way is to just define a set of all enum members (even as a constant)
19:02:20Yardanicoand then check like "CombustibleLemon(23) in myset"
19:02:45mbuchelyep i know that way, and tried that way before but i want to know if there is a better way of doing it
19:02:55FromDiscord<drsensor👹> sent a code paste, see https://play.nim-lang.org/#ix=2u0d
19:02:56Yardanicowell, I'm not sure for the enum with holes
19:03:09mbuchelwhat if the enum does not have holes?
19:03:10Yardanicoe.g. you can't iterate over it safely
19:03:19Yardanicobut you can over normal enums
19:03:43Yardanico@drsensor (http://ix.io/2u0d) and what's your problem there?
19:04:03Yardanicodid you import the tables module in this module?
19:04:18*superbia2 is now known as superbia
19:04:19Yardanicoyou can always do custom traversal if you want pretty-printing
19:05:13YardanicoIt's really not simple to make a generic solution which will pretty-print all different data structures
19:05:20Yardanicobecause they can be very different, contain cycles, etc
19:06:15FromDiscord<drsensor👹> I mean if there is something similiar to `dbg` macro in nimlang. (it does do pretty printing)↵https://doc.rust-lang.org/std/macro.dbg.html
19:06:45Yardanicohow does it to pretty-printing for types like hashmaps?
19:07:14Yardanicoa thing like that was added to strformat in devel, but it does not do "pretty-printing", it just shows a human-readable output
19:07:24Yardanicoyou can always make your own dbg easily in nim
19:08:45mbuchelalso is there a way to fill an array using the Haskell format?
19:08:50Yardanicowhat haskell format? :P
19:09:01Yardanicothere's https://nim-lang.org/docs/algorithm.html#fill%2CopenArray%5BT%5D%2CT
19:09:05Yardanicoand https://nim-lang.org/docs/algorithm.html#fill%2CopenArray%5BT%5D%2CNatural%2CNatural%2CT
19:10:07*reversem3 joined #nim
19:10:07*MTRNord[m] joined #nim
19:10:07*j4nvkvc joined #nim
19:10:07*Zambyte[m] joined #nim
19:10:07*hnOsmium0001[m] joined #nim
19:10:07*codic joined #nim
19:10:07*unclechu joined #nim
19:10:07*guelosk[m] joined #nim
19:10:07*GitterIntegratio joined #nim
19:10:08*planetis[m] joined #nim
19:10:08*einichi joined #nim
19:10:08*darrion_oakenbow joined #nim
19:10:08*rridley[m] joined #nim
19:10:08*BitPuffin joined #nim
19:10:08*lnxw37d4 joined #nim
19:10:08*leorize[m] joined #nim
19:10:13*swamptest1[m] joined #nim
19:10:13*Zoom[m] joined #nim
19:10:14*slackytude[m] joined #nim
19:10:14*silvernode[m] joined #nim
19:10:14*skrylar[m] joined #nim
19:10:16*jklhyd[m] joined #nim
19:11:28FromDiscord<lqdev> @drsensor👹 https://nim-lang.org/docs/sugar.html#dump.m%2Ctyped
19:11:38Yardanicoit doesn't return the value itself
19:11:43Yardanicolike that rust dbg macro
19:11:49Yardanicobut it's easy to reimplement
19:11:54Yardanicowith just nim templates
19:12:35mbuchel[[p * p, p * p + 2 * p..] | p <- tail primes]
19:12:38mbuchelsomething like this
19:13:00Yardaniconot sure that's what supposed to mean :P
19:13:08Yardanicomaybe you just want the fill from algorithm >?
19:13:14YardanicoI linked it already
19:13:40mbuchelyep i saw it and that is not what i want, i want to have a formula i can use
19:13:59Yardanico@drsensor https://tio.run/##PY6xDoMwDET3fMWpSiVoq0rQTkh8QOd2QwwBTBspJIiYoV9PHYYuvrPPera307bZaQ4LI/KysnVRKaZpdoYJQ/fO@jBQhdXzd6Yh/zvUUEAffGTYVOpdjGdr2Ab/8GPIcllxxFgoSp5IMqD@E3BodFHpsoW@SaLvBxzRJMB1tI68megCvffOevEm8is8ednfySUTZCswEaXSCSOYcneduPS4wQlljjOKbfsB
19:14:06Yardanicoyou can easily reimplement that rust macro with a nim template
19:14:24FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2u0f
19:14:33mbuchelso what that format says is create a list with the elements following formula a, where the local variables are given on the right hand side of the |
19:14:49mbuchelformula a is on the left hand side of the |
19:14:52YardanicoI think you can just use a simple for loop. no? :P
19:14:58YardanicoI'm not aware of anything like this
19:15:03Yardanicomaybe you can do it with mapIt
19:15:14mbuchelyou could, but i would like to have it during the compilation time
19:15:23Yardanicohave what exactly?
19:15:29Yardanicomost of nim code works at compile-time just fine
19:15:35mbuchelcreating the array
19:15:41Yardanicoyes, you can do it at compile-time
19:16:27FromDiscord<Rika> wrap it in a static block
19:16:59mbuchelya i know about static blocks here but i am just curious if there was any sugar syntax that was made to do the same thing
19:17:04mbuchelso it is more readable
19:17:06YardanicoI don't think so
19:17:09Yardanicoyou can always make one :P
19:17:22FromDiscord<Rika> it would probably be less readable if you omit the static block
19:18:09mbuchelconst x = [x | x <- zip([0..10], [10..20])]
19:18:18mbuchelthis seems a bit more readable if you ask me
19:18:27Yardanicowe have a collect macro
19:18:36Yardanicohttps://nim-lang.org/docs/sugar.html#collect.m%2Cuntyped%2Cuntyped
19:18:41FromDiscord<Rika> looks horrible to me; anyway, this is opinionated so
19:18:43Yardanicoit's the nim alternative to python list comprehensions :)
19:19:35Yardanicowhere was the lc macro but it worked worse and was deprecated and removed
19:20:08mbuchelyes the lc macro was what i was thinking of
19:20:18Yardanicowhy not collect?
19:20:21mbuchelthat was from earlier nim like 0.18?
19:20:27Yardanicoit's much more readable
19:21:01Yardanicombuchel: you can find it in https://github.com/nim-lang/graveyard/blob/master/lc/src/lc.nim
19:21:17FromDiscord<Rika> basically, we dont have the same standard of "readability" as you so
19:21:21mbuchellike i will use collect for this, but it seems to be focused on only sequences
19:21:28FromDiscord<Rika> not saying anyone's is better but its just not the same
19:21:31mbuchelSHHHHHH i am not autistic
19:21:35Yardanicombuchel: well, you want an array?
19:21:41FromDiscord<Rika> hey i didnt say that 😦
19:21:43Yardanicoyou can always just do a little bit of work to make it an array
19:22:04FromDiscord<Rika> yardanico: cant you use an array with collect?
19:22:18Yardanicobut you wouldn't really easily know the length of an array
19:22:23Yardanicoand idk if you can
19:22:25mbuchelya i will eventually, i been busy at my work once i am finished with some things i likely will work on updating some tools that i am already using
19:22:51disruptekZevv: how does Cont get into magic? you write your magical procs to take Cont as an argument.
19:23:05FromDiscord<Rika> it should be possible, just make a dummy proc that returns an array and you're golden, no?
19:23:29disruptekall my procs are dummies.
19:24:58ForumUpdaterBotNew thread by Kiloneie: Improving Nim for Beginners video series's AUDIO, see https://forum.nim-lang.org/t/6672
19:26:08Zevvdisruptek: then I again dont understand stuff
19:26:19disruptekwhich stuff?
19:26:21FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2u0k
19:26:23Zevvbut Im not behind my computer now so will look into it later
19:26:26disruptekkk
19:26:32Zevvyou call yield(). without the cont.
19:27:57disruptekit should get rewritten to yield(continuation).
19:30:43*Jesin joined #nim
19:32:14*JustASlacker joined #nim
19:35:21Zevvok, but continuation does not exist at the time the macro runs
19:36:43disrupteki guess i'm confused.
19:37:07disruptekwe're talking about code in the .cps. body which gets added to a new proc which is called by the bootstrap, which creates the continuation, right?
19:38:28disrupteki pushed some more.
19:40:18*Vladar quit (Quit: Leaving)
19:41:19*sky70 joined #nim
19:44:30disruptekhmm, the bootstrap is missing the locals now. did i just never impl this?
19:45:42*sky70 quit (Remote host closed the connection)
19:46:33disruptekit's tricky because we have to handle accepting arguments inside and outside of .cps. we're developing a real Clyybber matrix, here.
19:55:14Zevvwe should rename the project to "clyybber"
19:56:14*vicfred quit (Quit: Leaving)
19:56:31disrupteki have three other projects with that name.
19:57:32disrupteki think we just make a tweener that merges arguments into the env.
19:59:20disruptekseems like we had this functionality already sorted out, though.
20:00:24disruptekyeah, the preamble.
20:06:06shashlickhttps://typing-is-hard.ch
20:06:57YardanicoRust uses a variant of HM though
20:07:48Yardanico"undecidable, since evaluation of recursive functions at compile time is possible, thus requiring the compiler to solve the halting problem." for Zig
20:07:53Yardanicoso same for Nim?
20:07:55Yardanicowhat about sound/unsound
20:09:01ZevvI think it's undecidable indeed, for exact that reason
20:09:28Zevv"A type checker is sound if it only accepts correctly typed programs."
20:11:49*abm quit (Quit: Leaving)
20:12:54*skelett1 quit (Quit: WeeChat 2.8)
20:13:08*NimBot joined #nim
20:13:23*skelett joined #nim
20:13:33FromDiscord<dom96> PMunch: you around? https://forum.nim-lang.org/t/6671
20:13:45Yardanicohe's not in IRC :(
20:13:50YardanicoI checked a few hours ago already
20:20:02leorize!seen PMunch
20:20:02disbotPMunch quit 76 hours ago and last spoke 6 hours ago
20:20:59Zevvquitter
20:40:31*gogoprog quit (Read error: Connection reset by peer)
20:41:05Zevvah cpsMagic is still untyped of course
20:41:45*gogoprog joined #nim
20:49:19FromDiscord<drsensor👹> Thanks @lqdev, `dump` is what I'm looking for 🙏
20:49:50Yardanicodid you see the dbg template I sent? :)
20:51:29*JustASlacker quit (Ping timeout: 265 seconds)
20:53:16FromDiscord<drsensor👹> yes, but I think `dump` is more practical 🙂
20:53:29Yardanicowhy? :)
20:53:41Yardanicoyou wanted a rust-like macro, I gave it to you :P
20:53:57FromDiscord<drsensor👹> just want to avoid creating a macro in my code base 😄
20:54:00Yardanicoehm
20:54:03YardanicoI posted a template, not a macro
20:54:15Yardanicothese are different things in Nim
20:54:22FromDiscord<drsensor👹> ah right, didn't notice that
20:54:26Yardanicoand the dump macro itself is 3 lines of code btw
20:55:53Zevvdisruptek: if we make a `proc cps(c: Continuation) = discard`, we could still use the "cps jield()" notation so isCpsCall can tell what's happening
20:56:01Zevvonly problem is that "cps" clashes with the "cps" macro
20:56:30disruptekbut why?
20:57:22Zevvhow else do we tell a cps call
20:57:34disruptekthe call is typed, remember?
20:58:05Zevvyeah, but I still don't see how the 'c' gets back in there :/
20:58:24Zevvyou probly got it working already, right
20:58:39disrupteki have no idea what you mean by `c`.
20:58:43Zevvcontinuation
20:58:44disrupteka continuation?
20:58:55Zevvbecause now `jield()` calls the stripped warning-variant of the proc
20:59:00disruptekwhat happens when you run the testes?
20:59:02Zevvnot the jield(c: Cont): Cont
20:59:50disrupteki just pushed my current stuff.
21:00:33Zevv Error: internal error: environment misses: i
21:01:03Zevvbut am I wrong? jield() calls the warning stub variant, right?
21:02:30disruptekmaybe.
21:02:42disruptekisCpsCall is probably false, right?
21:02:53Zevvyes it has no clue
21:03:07disruptekhm, maybe this is why the env isn't getting built.
21:03:21ZevvI don't see how it can know, even typed
21:04:01disruptekhmm. fair point. 😁
21:04:11Zevvoh well, it's past sesame street already
21:04:35disrupteki will look at it in a bit.
21:04:38Zevvso anyway, I was gettign that part to work by putting in "await jield()"
21:04:43Zevvand let isCpsCall check for "await"
21:04:49disruptekblech.
21:04:57Zevvyeah, or use `!>` instead
21:05:09Zevvbut I never understood how this can ever work
21:05:16Zevvhow we can tell a cps call from a normal call
21:05:27Zevvwithout being explicit
21:05:40disruptekor, should we.
21:05:48disruptekwe had planned to noop(result) or whatever.
21:05:58Zevvwell, it would be cool. But I don't think you can get the type of the thing you're calling, can you?
21:05:59disruptekbut this clyybber matrix... oof.
21:06:21Zevvor if the thing your calling has a certain pragma
21:06:23disruptekwe could also see if has any magical marks on it.
21:06:35Zevvnot sure if we can.
21:06:42disruptekwhy not?
21:06:50disrupteknim has to sem cpsMagic first.
21:06:54ZevvAnd then still still still I do not understand how we are going to put the continuation argument in
21:07:06Zevvanyway, dogs must poop, men must sleep
21:07:07*lritter joined #nim
21:07:13disrupteki am confident.
21:07:17Zevvlittle boys must cry in the night
21:07:23disruptekhey, that's me!
21:07:43Zevvit fills me with dertemination
21:10:28*jeko quit (Quit: Leaving)
21:16:27*liblq-dev joined #nim
21:30:22FromDiscord<Recruit_main707> i might have asked this before, but can you set a compilation setting (for example: inside `module.nims`, `switch("d", "release"`))↵so that when you import `module` in your main file, release is set when compiling?
21:34:32leorizeyou can't
21:36:26*solitudesf quit (Ping timeout: 256 seconds)
21:37:22FromDiscord<Recruit_main707> well, thats pretty shite...
21:40:25Yardanicoyou can't set release in any configs currently FWIW
21:40:28YardanicoFYI*
21:41:24FromDiscord<Recruit_main707> ?
21:41:29FromDiscord<Recruit_main707> why not?
21:41:35Yardanicobecause of the order of evaluation
21:41:39Yardanicouser configs are evaluated the last
21:41:51Yardanicorelease and danger are defined in the main nim config in config/nim.cfg in nim distribution
21:42:22Yardanicoand checks like "@if release" won't trigger in the main config file
21:43:08FromDiscord<Recruit_main707> you are not talking about the same thing as me i think
21:43:22Yardanicoyes, I'm talking about defining release or danger in configs in general
21:43:30YardanicoI know you're talking about module-specific config files when importing them
21:44:18FromDiscord<Recruit_main707> NimRL.nim↵NimRL.nims -> switch("d", "release")↵nim c NimRL
21:44:30FromDiscord<Recruit_main707> ... Release build; ...
21:44:32Yardanicoyes that won't work
21:44:37Yardanicoeven if it says release build
21:44:40Yardanicoit's a debug build :)
21:45:07Yardanicohttps://github.com/nim-lang/Nim/issues/14272
21:45:09disbot-d:release -d:danger don't work as expected in user configs ; snippet at 12https://play.nim-lang.org/#ix=2u0V
21:45:13FromDiscord<Recruit_main707> is that on devel? or in stable?
21:45:16Yardanicoeverywhere
21:45:18FromDiscord<Recruit_main707> or in both?
21:45:21FromDiscord<Recruit_main707> lol
21:45:25Yardanicoit's been like this since nim was created
21:45:33Yardanicowell, not really like that, but for a long time
21:45:38Yardanicosince configs were added I guess :P
21:45:45disruptek#12349
21:45:46disbothttps://github.com/nim-lang/Nim/issues/12349 -- 3nim.cfg danger/release flags honored inconsistently
21:46:02FromDiscord<Recruit_main707> but programs do run faster when using release
21:46:19Yardanicomaybe because you're using some modules which do different things depending on the release switch
21:46:22Yardanico--opt:speed won't be activated
21:46:28Yardanicodisruptek: but your issue is about the different thing
21:46:32Yardanico"The issue is that the compiler shouldn't report that it created a danger build when it hasn't."
21:46:43Yardanico@Recruit try -d:release on cmdline and with the config file and compare
21:47:16Yardanicoalso compare binary size
21:47:20Yardanicoor even simplest thing - stack traces
21:47:25Yardanicowith properly set -d:release you won't see them
21:47:43FromDiscord<Recruit_main707> wtf, this is such a weird error, how is this not fixed yet. 🥴
21:48:13Yardanicobecause it's working as intended :)
21:48:19Yardanicoalmost
21:49:04FromDiscord<Recruit_main707> but that only happens with define (?)
21:49:15Yardanicowell yes, it won't happen with real compiler flags
21:49:21Yardanicobecause they're evaluated by the compiler
21:49:33Yardanicoso one of the proposed solutions is to make --release and --danger proper compiler switches
21:49:38Yardanicoinstead of defines
21:50:03FromDiscord<Recruit_main707> id say defining things in the config file should be possible still
21:50:22Yardanicowell with that solution it will be possible
21:51:12FromDiscord<Recruit_main707> why would it change anything related to definitions to have release or danger flags?
21:51:23Yardanicobecause then they'll become REAL compiler switches
21:51:28Yardanicoand will be evaluated by the compiler
21:51:31Yardaniconot in the config files
21:52:03FromDiscord<Recruit_main707> i am talking about other definitions
21:52:06Yardanicoright now the problem is that main nim.cfg has stuff like "@if danger", but since user configs are evaluated after main configs, that condition will never be true
21:52:13Yardanicodefinitions work just fine
21:52:30Yardanicoit's just about when you check for definitions in a higher (in the "hierarchy") config file
21:52:39Yardanicoand define that definition later in the user config file
21:52:50Yardanicoyou can use -d:myUserDefine in your normal config files just fine
21:52:53Yardanicoand check for them in your code
21:53:01FromDiscord<Recruit_main707> aaaahhh, thanks
21:53:58FromDiscord<Recruit_main707> now everything makes sense :p
21:59:16*natrys quit (Quit: natrys)
22:12:48*lritter quit (Quit: Leaving)
22:23:27*Sembei joined #nim
22:25:59*liblq-dev quit (Quit: WeeChat 2.9)
22:41:00*tane quit (Quit: Leaving)
22:47:56*krux02_ quit (Remote host closed the connection)
23:24:09disruptekdoubtful.
23:26:03*endragor joined #nim
23:26:31*theelous3 joined #nim
23:29:34disruptekwell, i don't think it's a tick, but without a mirror i can't be sure if it's going in or coming out.
23:29:45disruptekoops.
23:35:03mbuchelthat sounds very out of context
23:38:45FromDiscord<Rika> he's like that
23:40:07*endragor quit (Ping timeout: 256 seconds)
23:40:44FromDiscord<Elegant Beef> disruptek is a synonym for lacking of context
23:46:17*JustASlacker joined #nim
23:46:47ForumUpdaterBotNew thread by JPLRouge: Question new symbole after compilation ??, see https://forum.nim-lang.org/t/6673
23:47:09Yardanicook this one even I can't decipher :(