00:00:04FromGitter<singularperturbation> https://irclogs.nim-lang.org/23-04-2019.html#19:30:56 think that what I want to do is currently not possible with system.default
00:01:32*krux02 quit (Ping timeout: 244 seconds)
00:01:34disruptekor maybe i'm forgetting something.
00:02:14outtabwzif i mutate a parameter var within a func it actually mutates global variables of the same name
00:03:27FromDiscord<Varriount> outtabwz: Can you post a link to an example?
00:03:36disruptekj$: you're right; i use a macro to solve that.
00:03:54outtabwzVarriount: gimme a couple minutes please
00:04:00disruptekmacro enumValues(e: typed): untyped = newNimNode(nnkCurly).add(e.getType[1][1..^1])
00:04:19disrupteksee usage in gittyup.
00:04:21disruptek!repo gittyup
00:04:22disbot12https://github.com/disruptek/gittyup -- 9gittyup: 11higher-level git bindings that build upon nimgit2 15 2⭐ 1🍴
00:04:33*SenasOzys quit (Ping timeout: 256 seconds)
00:14:57outtabwzVarriount: https://paste.call-cc.org/paste?id=ead7702d403e164aedf32f2a2c520834f9e30a25
00:15:13outtabwzIt's definitely not what I would expect.
00:17:17disruptekwhy not?
00:18:07disruptekyou passed it the variable and then you mutated it.
00:18:48FromDiscord<j$> feels bad, seems like there's a uint16 size limit to tables
00:19:08outtabwzI don't expect a func parameter var to represent the same memory location as a global var
00:19:20disruptekthen don't pass a global to it.
00:19:45outtabwzmaybe it shouldn't be called a function if it can change global state
00:19:47disruptekyou can have millions of entries in tables.
00:19:57disruptekouttabwz: there's an rfc about this.
00:20:09outtabwzsure, i'll read
00:20:12disruptekactually, i think the change might be in devel already.
00:21:04disruptekremove the var keyword from the proc param and set result instead.
00:21:15disbot9manual: 11the Nim Manual is https://nim-lang.org/docs/manual.html -- 7disruptek
00:21:48disrupteki agree that `func` should break on that code.
00:29:32FromDiscord<j$> seems like enum values can only range of 0 to 65535?
00:30:01FromDiscord<j$> okay so that's my issues with this macro
00:30:24disruptekwhat are you trying to do? besides the obvious.
00:34:04FromDiscord<j$> Trying to make a list of sdl keycodes. They are stored in an non ordinal enum so I cant loop through it, but the range of possible values exceeds that range, but I think I'll just try something else. I'm stepping into xy problem territory
00:35:03disruptekyou can use intsets if you care about combinations, else... they are just integers, right?
00:35:17FromDiscord<j$> yeah
00:35:23disrupteki wouldn't overthink it.
00:35:30disrupteki mean, i would, but i wish i wouldn't.
00:35:41FromDiscord<j$> yeah I need to eat, so I'll probably comeback to it
00:39:48FromDiscord<Zachary Carter> is there any proc for converting the result of `1 shl 2` to hex?
00:40:04FromDiscord<Elegant Beef> strutils has tohex iirc
00:40:21FromDiscord<Elegant Beef> Unless you mean as a hex number 😄
00:40:30FromDiscord<Zachary Carter> yeah I mean as a hex number not a hex string
00:40:59FromDiscord<Zachary Carter> at the end of the day it doesn't matter - but I'm generating bindings so if I wanted the values to match the C code
00:41:12FromDiscord<Zachary Carter> meh screw it - it's not worth the trouble
00:41:17FromDiscord<Zachary Carter> (1 shl 2) works fine
00:41:41disruptekbeen awhile since there was a bug in it.
00:41:50disruptekbut actually, there /was/ a bug in it.
00:41:55disruptekwell, for int128.
00:55:04FromDiscord<Kiloneie> @Araq Btw for your future laptop purchase, get one with at least 6 cores from AMD.↵Check this link(i can't read german but i figured it out how to filter for you) https://geizhals.at/?cat=nb&bpmin=600&bpmax=1200&v=e&hloc=de&fcols=6751&sort=t&bl1_id=30&xf=10929_FreeDOS%7E1482_AMD
00:59:35FromDiscord<Kiloneie> Also 4XXX series cpus, get the one with one of those.
01:02:06*tiorock joined #nim
01:02:06*rockcavera is now known as Guest58241
01:02:06*tiorock is now known as rockcavera
01:03:55PrestigePMunch has been gone far too long
01:04:05disruptek!last pmunch
01:04:06disbot9PMunch quit 73 weeks ago and last spoke 73 weeks ago
01:05:42FromDiscord<Elegant Beef> He's on vacation, but i agree
01:05:47*Guest58241 quit (Ping timeout: 240 seconds)
01:14:10*maier joined #nim
01:14:49*apahl_ quit (Ping timeout: 272 seconds)
01:16:16*apahl joined #nim
01:19:08*maier quit (Ping timeout: 256 seconds)
01:32:12FromDiscord<Zachary Carter> do I really have to write a proc signature here to borrow `or` ?
01:32:12FromDiscord<Zachary Carter> https://play.nim-lang.org/#ix=2sPs
01:32:43*lritter joined #nim
01:33:26FromDiscord<Zachary Carter> or is there a simpler way of doing this?
01:33:31Prestigeor cast to int maybe?
01:34:35FromDiscord<Zachary Carter> well yeah but that's even more annoying
01:35:16FromDiscord<Zachary Carter> I guess I'll just generate a converter for all of these
01:41:21*krux02_ quit (Remote host closed the connection)
02:00:26disruptekZevv: look at this: http://ix.io/2sPz/nim
02:04:41disrupteki mean, i had no idea it was even possible.
02:08:26ForumUpdaterBotNew thread by Oyster: Hard to load this forum, see https://forum.nim-lang.org/t/6627
02:08:43disruptekZevv: here's a working version that demonstrates the problem nonetheless: http://ix.io/2sPB/nim
02:09:23disruptekor maybe it's just a rendering "feature"?
02:16:14*audiofile joined #nim
02:18:23*vicfred quit (Read error: Connection reset by peer)
02:42:11*lritter quit (Ping timeout: 240 seconds)
02:43:03*lritter joined #nim
02:48:53FromDiscord<Zachary Carter> shashlick: think I found another issue with nimterop
02:49:01FromDiscord<Zachary Carter> trying to wrap: https://github.com/zeux/volk
02:50:37FromDiscord<Zachary Carter> https://gist.github.com/zacharycarter/adfb3940a3b8357655671ffe9626bbbb
02:51:55shashlickwhat's the error
02:52:30FromDiscord<Zachary Carter> actually one moment
02:52:34FromDiscord<Zachary Carter> I might just be missing another define
02:54:03FromDiscord<Zachary Carter> Error: undeclared identifier: 'PFN_vkAllocateCommandBuffers'
02:54:06FromDiscord<Zachary Carter> (edit) 'Error:' => '`Error:' | ''PFN_vkAllocateCommandBuffers'' => ''PFN_vkAllocateCommandBuffers'`'
02:54:12FromDiscord<Zachary Carter> adding the define didn't help
02:54:58shashlickits not defined anywhere in the code
02:55:12FromDiscord<Zachary Carter> well it is in the header file
02:55:26FromDiscord<Zachary Carter> oh I see
02:55:52FromDiscord<Zachary Carter> I probably need to also include vulkan.h, let me give that a shot
02:57:35shashlickwhat version of nimterop do you have - I get that error - ERROR: vulkan/vulkan.h: No such file or directory
02:57:52*theelous3 quit (Read error: Connection reset by peer)
02:58:07*audiofile quit (Quit: Default Quit Message)
03:01:02FromDiscord<Zachary Carter> 0.6.6
03:01:10FromDiscord<Zachary Carter> but I think this is because that header relies on symbols defined in vulkan
03:01:16FromDiscord<Zachary Carter> which you need installed on your machine
03:01:20FromDiscord<Zachary Carter> like the sdk
03:02:25FromDiscord<Zachary Carter> the thing is though - I don't want to have nimterop wrap vulkan too
03:02:29*muffindrake quit (Ping timeout: 272 seconds)
03:02:37FromDiscord<Zachary Carter> so maybe I should just build a static library and link it
03:02:47*Tlanger joined #nim
03:02:52FromDiscord<Zachary Carter> that's probably the easiest way to go about this
03:04:12*muffindrake joined #nim
03:04:55*Tongir quit (Ping timeout: 246 seconds)
03:05:03shashlickyou can exclude stuff now
03:05:38FromDiscord<Zachary Carter> yeah but do I have to be explicit about what exclude? or can I exclude an entire header file?
03:05:51shashlickan entire header works
03:10:57FromDiscord<j$> how would I make a macro have default parameter value, used as a block?
03:12:50FromDiscord<Varriount> Nim parameters support default values, though I've never seen them used with a macro
03:15:03*maier joined #nim
03:18:31FromDiscord<Zachary Carter> hmm shashlick: still a bit confused here - I need to `cImport` the file so that the symbols in the other file which reference them are able to resolve
03:18:46FromDiscord<Zachary Carter> however then the header gets generated - and I tried `cExclude` but it doesn't seem to help in this scenario
03:18:58FromDiscord<Zachary Carter> I don't think there's a good answer here
03:19:15shashlickAre the types defined separately
03:19:18FromDiscord<Zachary Carter> it's like I need to import a third party Nim module
03:19:23shashlickOr all together
03:20:03FromDiscord<Zachary Carter> I guess separately - since `PFN_vkAllocateCommandBuffer` doesn't exist anywhere in that codebase apparently
03:20:03*maier quit (Ping timeout: 256 seconds)
03:20:32shashlickYou can also do -s in flags
03:20:45shashlickThat way toast will create stubs for all these types
03:20:55FromDiscord<Zachary Carter> hmm okay I can give that a shot
03:21:32shashlickWhat I do is generate a wrapper with stubs then pick and choose the ones I really need in cOverride
03:21:44*waleee-cl quit (Quit: Connection closed for inactivity)
03:22:36FromDiscord<Zachary Carter> oh...
03:22:42FromDiscord<Zachary Carter> it is actually defined in this library, it's an alias
03:22:42FromDiscord<Zachary Carter> https://github.com/zeux/volk/blob/79c7627887a9de3775fe80fc316dfb716c226c70/volk.h#L595
03:25:40FromDiscord<Zachary Carter> so this indeed seems like a bug
03:25:51shashlickThat's not a type definition
03:26:13shashlickThat's a var
03:27:00FromDiscord<Zachary Carter> oh shit you're right, my bad
03:27:01FromDiscord<Zachary Carter> ugh
03:33:30*def- quit (Quit: -)
03:39:39*NimBot joined #nim
03:40:26*casaca quit (Remote host closed the connection)
04:06:02*supakeen quit (Quit: WeeChat 2.8)
04:06:41*supakeen joined #nim
04:14:57*casaca joined #nim
05:08:33*narimiran joined #nim
05:15:57*maier joined #nim
05:21:16*maier quit (Ping timeout: 265 seconds)
05:34:35*def- joined #nim
05:35:05*Tlanger quit (Quit: Leaving)
05:49:28FromDiscord<Zachary Carter> well shashlick: I think I have a better understanding of the problem
05:49:44FromDiscord<Zachary Carter> the header I'm wrapping expects symbols to be defined in another header file
05:49:55FromDiscord<Zachary Carter> and in my case they're defined in another wrapped library
05:50:56FromDiscord<Zachary Carter> using stubs & cOverride doesn't make sense here - because there are a lot of dependent symbols
05:51:14FromDiscord<Zachary Carter> I'll have to mess with trying to import or include the dependent module in the wrapper and see what happens
06:18:11*solitudesf joined #nim
06:44:09*zacts quit (Quit: WeeChat 2.8)
06:44:48*narimiran quit (Quit: leaving)
06:58:21*zacts joined #nim
06:58:35zactsis much of the nim language implemented in nim itself?
06:58:43zacts(kind of like lisp in this sense maybe)
06:58:55zactsraku is like this. I'm looking for a language like this.
06:59:18zactsaltho I realize that nim has totally different aims than raku
07:01:09FromDiscord<Yardanico> Yes, all of the Nim compiler is in Nim
07:01:13zactsoh nice
07:01:28FromDiscord<Yardanico> And all of the stdlib (although some modules are wrappers over other libraries)
07:01:34FromDiscord<Yardanico> But most of the stdlib is pure Nim
07:01:36zactsI'll definitely put nim on my list of languages to check out for some future project ideas of mine.
07:02:12zactsI like how nim seems to be more lightweight than Rust
07:02:54zactsoh I see this too https://nim-lang.org/docs/nimc.html
07:03:39zactsnim is kind of what I'm looking for I think
07:05:04*zacts quit (Quit: WeeChat 2.8)
07:12:26*SenasOzys joined #nim
07:17:20*maier joined #nim
07:19:38*Guest14718 quit (Ping timeout: 260 seconds)
07:21:58*maier quit (Ping timeout: 260 seconds)
07:24:25voltistZevv: Did you see that gist I sent with the broken FITS reader?
07:24:30*letto quit (Quit: Konversation terminated!)
07:28:29*letto joined #nim
07:29:31ForumUpdaterBotNew thread by Jasonfi: Which version of OpenSSL to get QuickJWT linking?, see https://forum.nim-lang.org/t/6628
07:35:48*endragor joined #nim
07:48:37FromDiscord<Varriount> Anyone have an idea of how much memory Nim tends to consume when building something like Nimble?
07:48:49FromDiscord<Varriount> (on linux)
07:50:43FromDiscord<Rika> i was able to build it on a raspberry pi 4 with 2gb of ram
08:04:43*endragor quit (Remote host closed the connection)
08:12:21*endragor joined #nim
08:42:57*nikita` joined #nim
09:23:25*solitudesf quit (Ping timeout: 265 seconds)
09:50:44FromDiscord<Yardanico> no one's here, everyone's sleeping or relaxing? 🤔
09:50:49Oddmongeris it possible to call a function when a seq assignation is asked ?
09:50:53supakeenWhat is a nice way to include examples in my repository so they can be built easily.
09:51:02FromDiscord<Yardanico> lol
09:51:11supakeenYardanico: You asked for it ;)
09:51:29FromDiscord<Yardanico> @oddmonger you mean overload a[x] = y ?
09:51:44FromDiscord<Yardanico> That's the []= operator
09:51:49Oddmongerlike this: var mytype.list == @[ … ]
09:52:05Oddmongeryes overload, but only for a type
09:52:08FromDiscord<Yardanico> What would that mean?
09:52:09Oddmongerthat's not clear for me
09:52:14Oddmongeras you see :)
09:52:31Oddmongeri try to explain better
09:53:08Oddmongeri have a «constructor»: let mytype = Mytype( … )
09:53:19Oddmongerin this type, there is a seq
09:53:31*Ven`` joined #nim
09:53:48FromDiscord<Yardanico> Yeah, so?
09:53:49Oddmongerwhich could (in the best way) initilized by the assignation
09:54:07Oddmongerbut i didn't found how to initialize
09:54:31FromDiscord<Yardanico> You don't have to initialize seqs if you mean that
09:54:33Oddmongerso i'm trying the next step: overloading the [] actces
09:54:44FromDiscord<Yardanico> And if you want to assign a seq when constructing it's simple
09:54:52*endragor quit (Remote host closed the connection)
09:55:01FromDiscord<Yardanico> let f = MyType(myseq: @[1, 2, 3])
09:55:05*endragor joined #nim
09:55:07FromDiscord<Yardanico> Where myseq is a field in MyType
09:55:29Oddmongeryes but i have to compute the seq
09:55:52FromDiscord<Yardanico> Based on other fields in a type? Or what?
09:55:53Oddmongermyseq is derivated from a value given at construction
09:56:16FromDiscord<Yardanico> Why not just create your custom constructor then? Like initFoo or newFoo
09:56:18Oddmongerso i have to call a constructor (a real i mean, cannot assign it directly)
09:56:48Oddmongeri'm doing my homework in fact, i cannot control the flow :)
09:57:04Oddmongerthe test is called like this:
09:57:22Oddmonger let allergies = Allergies(score: 3)
09:57:34Oddmonger check allergies.lst == @["eggs", "peanuts"]
09:58:01Oddmongerso there is a «lst» which i defined as a seq in
09:58:38FromDiscord<Yardanico> Exercism?
09:58:40OddmongerAllergies, but you see, i must either overload @[] access, or populate «lst» when assigning allergies
09:58:49FromDiscord<Yardanico> Can you show the test code
09:58:50Oddmongeryes it's exercism
10:00:08*endragor quit (Remote host closed the connection)
10:00:43FromDiscord<Yardanico> I can uncover a deep secret for you
10:00:43Oddmongerand my work: http://ix.io/2sR0
10:00:51FromDiscord<Yardanico> lst can be just an ordinary proc
10:00:56FromDiscord<Yardanico> Remember UFCS
10:01:00FromDiscord<Yardanico> And command syntax
10:01:05Oddmongerohhhhh /o\
10:01:18Oddmongerok thank you :)
10:01:22supakeenWhat does `saterm` sound like to you?
10:01:28FromDiscord<Yardanico> ?
10:01:34Oddmongersat ?
10:01:38FromDiscord<Yardanico> Terminal emulator?
10:02:15Oddmongeri think he is speaking of grammar
10:02:35*rockcavera quit (Ping timeout: 240 seconds)
10:02:39Oddmongeri remember having read this in the lua book «programming in lua» when they define the grammar
10:03:28Oddmongerbut it was «SAT» if i remember well
10:03:37supakeenYardanico: That's close enough yes. It's a ploy on saturn but instead it's a terminal.
10:03:49supakeenWell, not a terminal it's a 'port' of urwid to nim.
10:04:05Oddmonger(or was it AST :þ)
10:07:13FromDiscord<Yardanico> Yeah I know what you mean by a SAT
10:10:25Zevvyeah last thing I saw was he was on a boat
10:11:06*Vladar joined #nim
10:11:26Zevvirc/2020/07/10:21:41 #nim: < PMunch> Apparently the internet out here is a bit flaky though..
10:11:30Zevvlast we ever heard
10:20:27FromGitter<alehander92> he merged a PR several days ago
10:20:36FromGitter<alehander92> so he' still out there
10:24:37*krux02 joined #nim
11:25:04*waleee-cl joined #nim
11:31:46*audiofile joined #nim
11:33:32*maier joined #nim
11:38:25*maier quit (Ping timeout: 240 seconds)
11:41:52*noonien joined #nim
11:44:32*lritter quit (Quit: Leaving)
11:53:37Zevvso the rumours go
11:58:13supakeenIt's handy that you are on all the chat clients so I can at least tab-complete your name Yardanico.
11:58:42YardanicoWell I use Quassel (so I'm 24/7 online in IRC) and I rarely turn off my PC anyway
12:02:59Oddmongerso with $ i can convert enum to string, but can i convert a string to enum value ? I read « use strutils », but it doesn't see to do that
12:03:08Yardanicofrom strutils
12:03:42OddmongerYardanico , you answers are such fast i suspect you to be an AI trained with Nim index
12:03:48Oddmongerthank you
12:05:25ZevvYardanico, built on GPT-3
12:05:43YardanicoI just happen to remember most of the (used) stdlib modules
12:05:47YardanicoWhich is quite handy
12:06:02*supakeen quit (Quit: WeeChat 2.8)
12:06:02Yardanicobut I still read module docs for more complex procs or for the ones I didn't use myself
12:06:39*supakeen joined #nim
12:07:52Yardanicoand my answers are fast because when I'm on the PC Quassel is on my second display
12:08:00Yardanicoso I notice new messages with my peripheral vision
12:08:08Yardanicoeven when I'm focused on the main display
12:18:43FromDiscord<Recruit_main707> There are a few rare bugs with dlls —noMain and —threads.↵It’s being hard to find all of them
12:19:07Yardanicowith arc?
12:19:16Yardanico--threads:on might be hard to properly manage with the default GC
12:19:20Yardanicowith --noMain and stuff
12:19:23Oddmongerord(enu.truc) -> ok
12:19:29FromDiscord<Recruit_main707> It doesn’t seem to be specific to arc
12:19:31Oddmongerord (enu.truc) -> cryptic error
12:19:48Oddmonger(ordinal type expected)
12:20:12Yardanicowell can you show more code?
12:20:13Oddmonger/o\ 20mn before retyping all without spaces
12:20:30Yardanico"ord (Tata.truc)" might mean call ord with a tuple in some cases
12:20:36Yardanicoit's better to just not use parens in this case
12:20:58YardanicoI use UFCS quite a lot, but I rarely add spaces in calls like that :P
12:21:14Oddmonger# return (ord ( parseEnum[enumAllergies]( name)) and this.score) > 0
12:21:30Oddmonger return (ord(parseenum[enumAllergies](name)) and this.score) > 0
12:21:47Oddmongerthe commented one is refused with «ordinal type expected»
12:22:22Oddmongerbut even with a simple enum access, it's the same error
12:22:37Oddmongerhum… no
12:26:03FromDiscord<Shucks> > There are a few rare bugs with dlls —noMain and —threads.↵> It’s being hard to find all of them↵@Recruit_main707 just got issues with arc in that case
12:26:15Yardanicowell report them then :)
12:26:15FromDiscord<Shucks> thats why I was asking if arc supports threads
12:26:20Yardanicoit does just fine
12:26:26Yardanicolook at how Nim makes a DllMain itself
12:26:34Yardanicoso you can do it in a similar way yourself
12:27:19FromDiscord<Shucks> Well as you might know we're coding injectable libraries. Hard to tell what exactly happens
12:27:41FromDiscord<Shucks> Crashes the main process. Debugging doesn't gives usable information
12:28:40Yardanicotry to inject into your own process for a test :)
12:28:44Yardanicothe one you compiled in full debug mode
12:29:35FromDiscord<Shucks> That might be a solution yea
12:40:37Oddmongerarrrrrhh disjoints enums
12:42:43Yardanicodon't use enums with holes :((
12:42:45Yardanicoholes are dangerous
12:42:49Yardanicoyou can fall into them
12:43:23Oddmongercannot climb with succ ?
12:47:36Oddmongernak, works only with no holes too
13:01:38Oddmongerdon't believe i'm proud of this, but it works with very few lines: http://ix.io/2sRA
13:01:52Yardanicofirst tip: you can have one type section here :)
13:02:18Oddmongerah yes, no need to object
13:02:41Yardanicoalso, if you only need one proc from some module, no need to add a comment like that
13:02:50Oddmongermaybe i could have a cleaner result by generating the table with preprocessor
13:02:50Yardanicoyou can just do from strutils import parseEnum
13:02:59Yardanicoand your enum seems to be a bitflag one
13:03:09Yardanicoalso I don't like the space placement personally (I like the usual nim style, e.g. what nimpretty would give you)
13:03:16Yardanicono need for "return result" in lst :)
13:03:32YardanicoSee https://nim-lang.org/docs/manual.html#set-type-bit-fields
13:03:40Yardanico"Note how the set turns enum values into powers of 2."
13:06:12Oddmongerah need to read about set then
13:07:51Oddmongeri think i understand, it's nice
13:08:27Oddmongerdon't even need parseenum with that
13:09:41FromDiscord<Shucks> Well I'm not able to reproduce that threads & gc error: https://media.discordapp.net/attachments/371759389889003532/739107587944874014/injecttest.rar
13:09:56FromDiscord<Shucks> works how expected
13:12:12YardanicoOddmonger: I'm also a mentor on exercism for the Nim track btw, but I rarely review solutions :D
13:13:01FromDiscord<haxscramper> Is it possible to get original source code line from `NimNode` without getting line index using `lineInfoObj` and reading whole file again?
13:13:42YardanicoI don't really think it is, since otherwise it would take quite a lot of memory
13:13:57OddmongerYardanico: i've written that i've been helped in the source, and included original work
13:14:06Yardanicono it's fine
13:14:08Oddmongereven if it doesn't count for the exam :)
13:14:11YardanicoI didn't mean it this way
13:14:27Oddmongeryes, no problem :)
13:14:38Oddmongeri had understood don't worry
13:28:27Araqplan for the holidays is to remove the VM from Nim :-)
13:30:36Araqdisruptek, https://github.com/disruptek/sigv4 fails for my PR :-(
13:30:47disbot➥ 3fixes #15130
13:30:48YardanicoAraq: the VM thing sounds.. crazy
13:30:56Yardanicogenius I mean :P
13:30:58AraqYardanico, holidays! :P
13:31:10Yardanicobut what will you replace it with?
13:31:11Yardaniconim itself?
13:31:29Araqyeah, produce C code and staticExec the code
13:34:21*maier joined #nim
13:36:27YardanicoAraq: I will have a short look on sigv4 with your PR to try to see why it fails
13:41:41FromDiscord<Chapl> Hi! Somebody mind helping me out with macros and pragmas? I'd like to play with 'em a bit but encountered an issue that I cannot get resolved by myself, be it because of lacking documentation or something else.
13:44:13FromDiscord<Chapl> See the `{.toggle.}` and `{.with.}` right there, declared with the fields? I'd like them to generate "builder methods" for me, at compile time. Now, I think this would work by implementing a macro that I'd call like this `populateBuilderFunctions(Configuration)`, but I'd like to it without calling some function. https://media.discordapp.net/attachments/371759389889003532/739116275774783528/unknown.png
13:44:52FromDiscord<Chapl> (edit) 'See the `{.toggle.}` and `{.with.}` right there, declared with the fields? I'd like them to generate "builder methods" for me, at compile time. Now, I think this would work by implementing a macro that I'd call like this `populateBuilderFunctions(Configuration)`, but I'd like to ... it' => 'See the `{.toggle.}` and `{.with.}` right there, declared with the fields? I'd like them to generate "builder methods" for me, at compile time.
13:46:01FromDiscord<Chapl> So, `whitelistEnabled* {.toggle.}: bool` would technically result in a func looking like this `func toggleWhitelistEnabled(c: var Configuration, b: bool): var Configuration`
13:50:59*outtabwz left #nim (#nim)
13:55:01*NimBot joined #nim
13:57:30Araqdon't return things you already know just because you like chaining. use 'with' for chaining
13:59:07FromDiscord<Chapl> Cool hint but that's not the problem I described.
13:59:08YardanicoAraq: so far it's https://gist.github.com/Yardanico/6457d94ed01c5af17a5bc3810c21e5ea
14:06:41Yardanicooh I'm near
14:08:34YardanicoAraq: only json left https://gist.github.com/Yardanico/7d46844e887ae0f166a61a6cd585866d
14:08:50Yardanicoit's probably because stuff in tt
14:09:31FromDiscord<Recruit_main707> Yardanico: I already import the dll as normal and inject it into dummy processes for testing
14:09:51Yardanicoohh I know what I should try
14:10:22Yardanicoyeah easy
14:11:26YardanicoAraq: final one :) https://gist.github.com/Yardanico/accf95a2dc3162fe0b3a7188ab9d7932
14:11:43Yardanicoit just doesn't crash with strings because literal strings with arc are static
14:11:51Yardanicoso it doesn't destroy them and there's no crash (so I used seqs which are on heap)
14:14:28Araqwell optimizing string literals was the initial motivation for cursor inference :-)
14:15:08*vicfred joined #nim
14:15:13AraqChap1: sure, now what's your problem again?
14:15:20Yardanico@Chapl ^
14:17:09disruptekAraq: i guess your pr is incomplete. 😉
14:18:07disrupteki hope to fixup mangling before you get back.
14:18:51*theelous3 joined #nim
14:19:34FromDiscord<Chapl> sent a long message, see http://ix.io/2sRY
14:20:08shashlickAraq: why remove the vm? What's the motivation
14:20:11FromDiscord<Chapl> It is just a practice for me to get used to macros and templates. I'm not really trying to get func/proc chaining to work.
14:20:25Yardanicoshashlick: no need to maintain yet another implementation of nim? idk
14:22:17disruptekwithout a vm, all operations at runtime are available at compile-time.
14:22:24shashlickThat's the obvious answer but still curious cause it could have been done with static exec initially as well but wasn't for some reason
14:23:18Araqshashlick, it wasn't because back then I had fun writing a bytecode VM
14:24:11Araqnow it's just another legacy subsystem. Also, I'm not sure I was aware of the idea, macros came earlier than staticExec and making it work with staticExec is a complex task too
14:25:36shashlickGot it
14:29:09FromGitter<alehander92> whatr about
14:29:11FromGitter<alehander92> nlvm
14:29:17FromGitter<alehander92> and other possible nim impl-s
14:29:35FromGitter<alehander92> would the spec require stuff like C evaluation on CT
14:29:52Araqsame story, nlvm can use its own backend for evaluation
14:32:23FromGitter<alehander92> but we need CT to be independent off backend
14:32:24*vicfred quit (Quit: Leaving)
14:32:33Yardanicoit would be
14:32:43Yardanicoeven for JS backend the CT will probably use the C backend
14:33:09FromGitter<alehander92> but e.g. if my code executes c calls to some lib
14:33:13FromGitter<alehander92> or emits C
14:33:20FromGitter<alehander92> is this supposed to be idiomatic / supported
14:33:24Yardanicoso what's the problem?
14:33:56Yardanicowonder what will happen with "nim secret" though :P
14:34:00YardanicoI guess it'll be gone away for good?
14:34:07FromGitter<alehander92> well, the problem is should my custom nim support that on CT
14:34:23FromGitter<alehander92> because that's an additional requirement compared to runtime availability
14:34:41FromGitter<alehander92> usually if i see macros i think "this works everywhere"
14:34:50Yardanicoyes, that won't change as far as I can see it
14:34:54Yardanicomacros don't emit C code or call C libraries
14:35:04FromGitter<alehander92> ok
14:35:05Yardanicosince FFI in the VM was never a stable feature
14:35:12FromGitter<alehander92> i mean : it's useful
14:35:14FromGitter<alehander92> to be able to do ffi
14:35:20FromGitter<alehander92> i am not saying it's not a good thing
14:35:27FromGitter<alehander92> just wondering how standard it is
14:37:59shashlickSo the js backend will also need a C compiler installed
14:38:53shashlickOur will the new compile time run on js
14:49:32Araqthat's a good question. 'static: os.copyFile(...)' means the JS backend needs the C backend for 'static' blocks :P
14:51:51FromDiscord<Chapl> Why is everything in the Nim world just 50% solution instead of a 90% or a 100% solution. So excited about Nim and every single time I work with either Nim or the Nim community I get busted in the balls.
14:52:08FromDiscord<Clyybber> @Chapl you could put the generating call in your module
14:52:16FromDiscord<Clyybber> and make it generate exported procs
14:52:26Yardanicoyou can always ask on the forums, real time chat is not good for big questions which would require big explanations :)
14:52:46Araqchap1: the 'norm' package does comparable things, please check it out
14:53:14YardanicoAraq: it's l btw, not 1 :D
14:53:39Araqas for your question, features start in the state "not implemented" and then slowly reach 50%, 80%, 99%
14:56:37*Ven`` quit (Quit: Textual IRC Client: www.textualapp.com)
14:56:50Yardanicoand 100% is not realistically possible for anything really :)
15:22:08FromDiscord<Clyybber> Araq: Btw addressed the review comment and undrafted https://github.com/nim-lang/Nim/pull/15123
15:22:08disbot➥ 3Better semiStmtList parsing
15:22:41*rockcavera joined #nim
15:24:55disruptekchapl: it's because you have big balls. i have the same problem.
15:25:30disruptekAraq: feel free to pr sigv4.
15:25:37Yardanicodisruptek: it's not a sigv4 problem :)
15:25:41Yardanicoand he already fixed it
15:25:43disruptek!last zevv
15:25:44disbot9Zevv spoke in 12#nim 73 hours ago 12https://irclogs.nim-lang.org/01-08-2020.html#12:05:25
15:26:23ZevvI mean, good morning disruptek.
15:26:34disruptekcan we just nail down the spec and then i can produce working code?
15:26:39disrupteki mean, howdy, zevv
15:26:49Yardanicodisruptek: relax :)
15:27:17Zevvdisruptek: sure
15:27:21disruptekgermans make the best pants.
15:28:27disruptekmore like federhosen.
15:28:33disruptekthis company, alberto.
15:28:43disruptekuse an italian fabric.
15:29:17disrupteki've beat the shit out of these pants and they are incredible.
15:29:29Zevvis that german?
15:30:11disruptekwhich part?
15:30:25Zevvanyway, the spec
15:30:34Zevvtell me, what problems were in your V1 which you want to solve in V2
15:31:07ZevvI know the implementation was shitty and needs a rewrite, but what needs to change?
15:31:12disruptekthe call convention is a major one.
15:31:25Zevvright. So, all I ask is to make that end-user centric
15:31:51disrupteki want c.next, c.next(), and c.next(43)
15:32:02Zevvso you will pass c to cps procs?
15:32:37disruptekwhat else?
15:32:51Zevvhide that
15:33:14Zevvyou hid it in v1
15:33:21disruptekthat was a dumb idea.
15:33:31Zevvtrue, just checking
15:33:47Zevvwas *my* idea, never forget
15:34:05Zevvso, what is the problem, you can just get c.foo, c.foo() and c.foo(arg, arg), right?
15:34:15ZevvI don't care for the first really, but I think it comes naturally
15:34:49disruptekwhat is the first?
15:34:56Zevvwithout the ()
15:35:00disruptekyes, but what does it mean?
15:35:05Zevvsame as c.foo()
15:35:13disruptekwell, this is a problem.
15:35:21*dadada joined #nim
15:35:45*dadada is now known as Guest37688
15:35:56Zevvbecause of the callOperator
15:35:57disruptekmaybe () is compositional but command syntax yields the result?
15:36:40Zevvso, just leave it out then
15:36:52Zevvwhy do *you* want those three
15:37:28disruptekbecause if people have access to the continuation, we need to understand how they use it.
15:37:53ZevvI'd say, make it opaque.
15:37:55Zevvit's just a handle
15:38:03disrupteki want those because i want to get the result, i want to chain continuations, and i want to pass args to them.
15:38:48Zevvok, but you're talking about continuations as if the user needs to know what that are
15:39:03disrupteki don't care what you build. that's your problem.
15:39:05Zevvthe initial idea of this whole thing is to hide all that
15:39:15disruptekbut it would be helpful if you built some stuff that we can test against.
15:39:23Zevvsure, ready when you are
15:39:31disruptekmaybe that's done already; i just realized that stash is a directory. 🤣
15:40:02Zevvthere's a little iterator. a little http server. a little goto and a little trycatch
15:40:13Zevvall without using any external event queues
15:40:57Zevvand performance.nim telling me nim closure iterators are 6.111 times faster
15:41:47disruptekoh, i'm not up-to-date i guess.
15:41:53Zevvis that news
15:42:16disruptekah, this is neat.
15:43:21Zevvso basically, I'm reasonably happy with the V1 api, altough I need one more thing
15:43:33Zevvwhich is your 'data' in the new continuation type
15:43:52disrupteki don't get it.
15:44:37Zevvlook at https://github.com/disruptek/cps/blob/master/stash/trycatch.nim
15:44:54Zevvthere's this global vars because I can't put that anywhere else. "err" "msg" and "where"
15:45:29Zevvthe example is kind of silly, but it's a kind of exceptions
15:45:50disruptekokay, but i think continuations should be so conceptual that they don't define fields.
15:46:21disruptekthat means that you can compose them from anything you want.
15:46:47Zevvright. I dont need that or see why I would, but it doesn't hurt to do it like that
15:47:01Zevvit will probably bring great power one day
15:47:43disruptekwhat is `setLen(x: seq[T], 10): seq[T]` but a call to a continuation around `seq[T]` with a constant, adjacent value `10`?
15:48:13*Vladar quit (Ping timeout: 264 seconds)
15:48:56Zevvsure. I see that, but it's just that I don't *need* that now
15:49:03ZevvI have a few clear pracical goals
15:49:15disruptekwhat are they?
15:50:07Zevvlua-style coroutines, if possible getting a return value from a cps magic call, and async like in the http server
15:50:29disrupteki don't really know lua, i just hack it.
15:50:38ZevvI do, so i have your back
15:50:55disruptekbut what does it mean? x.next; x.next; x.next?
15:50:56FromDiscord<Recruit_main707> @dom96 where does the choosenim intaller install everything?
15:51:07disruptekrecruit: `which nim`
15:51:30disruptekZevv: like python generators?
15:51:37FromDiscord<dom96> @Recruit_main707 ~/.choosenim
15:51:40Zevvdisruptek: you mean the lua coros?
15:52:26FromDiscord<Recruit_main707> its just that i deleted everything i could find in my pc, but choosenim still apears when i try to run `nim` on cmd
15:53:40Zevvdisruptek: you create a coroutine and resume() it to start it.
15:53:52ZevvYou can pass data into resume(), which is the avaialble in the coro proc.
15:54:13ZevvThe coro runs until it yields. It can pass data into yield(), which becomes the result of the resume() proc that resumed the coro
15:54:39Zevvwhat the proc yields() is return value of resume(), and what you pass to resume() becomse the return value of the next yield()
15:54:52Zevvit's amazingly simple and powerful
15:55:22ZevvThe good thing is that it doesn't have colored functions. That's something we can not really do for now tho
15:55:31disruptekwhat you pass... is the same type as what you receive back.
15:55:47Zevvlua is typeless, so it doesn't really map.
15:56:13ZevvBut I guess I can make it so that you provide T1 for the one way, and T2 for the other way
15:56:23disruptekvar x = newCoro(); assert x.resume(43) == 44; assert x.resume("43") == "44"; right?
15:56:37*maier quit (Ping timeout: 264 seconds)
15:57:05Zevvclose enough
15:57:16Zevvanyway, these are the kind of things I want to try to build
15:57:34Zevvand also just the simple async stuff
15:57:40Zevvwhich I want to go use on tiny embedded things
15:58:16disrupteklike parasites? i have a lot of those.
15:58:54Zevvsymbiotic evolution for millions of years, you'll be just fine
15:59:26disruptekits only been 18 months and these worms on my back are driving me crazy.
16:00:43Zevvanyway, practically speaking, V1 was pretty close
16:01:03Zevvbut like I said, I need a way to pass data among my cpsMagic procs, which I could not yet do
16:01:39disruptekwell, let x = mycont.foo(43) is just a return statement where the continuation resumes with a new x value in scope. no big deal.
16:01:51Zevvno big deal
16:01:59Zevvso indeed, look at stash/
16:02:03disruptekmycont.foo(43) is more interesting to me, because it lets the user put values adjacent.
16:03:02disruptekthe question is, does the user tell us to merge those values into the continuation? or do we always do so? or never? or do we infer this?
16:03:16Zevvhow is that differetn from what we already had? You could do `cps sleep(3)`
16:03:59disruptekour code was storing the 3 twice.
16:04:37Zevvright. But the semantics are the same.
16:04:40Zevvand you really need that
16:04:44Zevvto be able to do that
16:07:00*ForumUpdaterBot quit (Remote host closed the connection)
16:07:08*ForumUpdaterBot joined #nim
16:08:20disruptekwhat is cpsMagic to you and why do you need it?
16:08:49ZevvI don't need the macro, but the concept. Its a thing that gets called to do the "magic" stuff
16:08:55Zevvthe internals. Like the magic CPC functions in the paper
16:09:06Zevvthe things that store continuations in event queue bookkeeping
16:09:13Zevvthey have full access and knowledge of the C type
16:09:36Zevvthey implement 'sleep' and
16:10:43disruptekwell, it turns out that all primitives are the same. and if primitives are also the same as user code, it helps everyone.
16:11:07Zevvright, if so, all the better
16:11:47disruptekso what the rewrite does is to make control flow more natural.
16:12:00disruptekthat's the only purpose.
16:12:10Zevvbut I thnink I want to be able to do some level of isolation. middleware can do everything, but users of the middlewere should not be bothered by any of this
16:12:22Zevvthat is the only purpose
16:12:26disruptekmiddleware abstraction is your problem.
16:12:26Zevvi want to write 'normal' nim
16:13:10Zevvi was just speaking in v1 terms
16:13:43ZevvI want to be able to do https://github.com/disruptek/cps/blob/master/stash/goto.nim without the global 'labels
16:13:51Zevvthat should live somewhere in the chain of continuations
16:13:56Zevvall very practical stuff
16:15:16disruptekcont.foo probably has to be the result.
16:17:12disruptek() is next, so (43) is next(43).
16:18:31disruptekwhy don't you have labels on the continuation object?
16:20:02Zevvhow do you mean?
16:20:19Zevvoh in the goto
16:20:20disruptekin the goto example; why do they have to be global?
16:20:36Zevvehm maybe I was just doing stupid stuff, I'll take a good look in an hour or so
16:20:44Zevvfirst grillin da portabellos
16:20:52disruptekheh okay.
16:27:04FromGitter<alehander92> goto goto
16:36:09disruptek`[]`() is a macro that lets you cont[n] = 43 # set symbol `n` inside the continuation to value 43.
16:44:12disruptekmight have to start showering again.
16:44:22disruptekit's annoying to have to floss my comb.
16:58:36*superbia1 joined #nim
17:00:03Zevvdisruptek: I cant store my labels inside the continuation object because it gets lost and I have not place to initialize. Initialization could be done with some `if nil` snartness, but the passing around breaks it.
17:00:24ZevvI'll have to go and see which of the `when declaredInScope` branches is taken for each proc
17:01:25*superbia quit (Ping timeout: 246 seconds)
17:04:47Zevvalso related to yesterdays question: why do we even bother to return a C all the time, if we can just mutate it in plcae
17:16:30Zevvwut wut
17:16:45Zevvok, forget the last remark
17:16:52Zevvabout gettign my 'goto' labels into C, right
17:17:08Yardanicowat wut wat?
17:17:13Zevvso I do http://ix.io/2sSz
17:17:25Zevvseems ok, if CPS would do the right thing. But V1 doesn't
17:17:33ZevvSo c.labels is not the same c.labels next time
17:19:26Zevvwhich is funny, because from the cpsDebug output i'd expect the same continuation to be moved around all of the time
17:19:33disrupteki don't understand.
17:19:52Zevvok, one step back
17:20:30Zevvgoto example, moved labels back to globals. I add one 'int' to my Conte type
17:20:35Zevvwhich on every 'goto' I echo and inc
17:20:37Zevvwhat should happen?
17:21:08Zevvthe idea is that C is a pointer to the same contuniation all of the time
17:21:09Zevvbut it isn't
17:21:16disruptekwhy not?
17:21:38Zevvbeacsue something is broken. I still allocs new C's
17:21:54disrupteki didn't even know cps was compiling.
17:22:04ZevvTalking current master
17:22:10Zevvwith my stash/ stuff
17:22:15Zevvthose work
17:22:35disruptekmy branch is different, i guess.
17:22:44disrupteklet's look at the rewrite.
17:22:52disrupteki can't read anything interesting here.
17:23:01disruptekcan you paste it for us?
17:23:01Zevvthe rewrite is doin these two level nasty 'when' things
17:23:04Zevvso it's hard to follow
17:23:15disruptekyeah, but i'm the author of that garbage.
17:24:08Zevvso start at foo. no 'continuation' in scope so it makes a new one. and puts in 'after_14400250'
17:24:15disruptekit's clearly creating a new object.
17:24:27Zevvyeah, the first foo() call, and it should
17:24:57Zevvbut after that it keeps going at after_14400250 only
17:26:01disruptekwe should just call Tc on the env types, i guess.
17:26:23disruptekit's surprising that we're wrong about Tc().
17:26:51Zevvin the 'when' branches, it should take the one where it reuses the current continuation and only updates 'fn', right?
17:27:24ZevvI don't think it does
17:27:58disruptek`is` is not as smart as you thought.
17:28:09ZevvI never thought that
17:28:22disruptekoh, well, uh.
17:28:31Zevvjust that 'it worked for me'
17:28:48Zevvare you sure it's taking the right branch at 'declaredInScope'
17:29:00disrupteklet's start with verifying that Tc() doesn't do a copy.
17:29:31Zevvwell, we shouldn't even return, is my point
17:29:35Zevvwe can just update the passed Tc
17:30:09disruptektrue, but we return because the rewrite is shit.
17:30:29Zevvfair enough. But I mean: These proc's do not even have to return a continuation
17:30:39disruptekhow do you figure?
17:30:41ZevvThey can modify the one they got passed, update the fn
17:30:49Zevvand pass it on
17:31:05ZevvWhy make a new Tc?
17:31:08Zevvyou already have one
17:31:27disruptekyes, but does that hold for every continuation?
17:31:42ZevvAs far as I can tell
17:31:51Zevvit's serial
17:31:56disruptekit doesn't hold for an immutable object type.
17:31:58Zevvthere is always *one* active, and there is never any backtracking
17:32:09Zevvno, but it's a ref
17:32:15Zevvyou pass the ref to the continuation
17:32:18disruptekhere it is, but not everywhere.
17:32:23Zevvthen make it so
17:32:27Zevvit's worth it
17:32:32ZevvBecause Tc() *is* doing a copy
17:32:48ZevvLet me rewrite that rewrite
17:33:03disruptekfine, but we can just use Tc() on the other paths.
17:33:23disruptekor, more usefully, cast.
17:33:23Zevvwhy would you even want that?
17:33:34disruptekbecause then there's no copy in the after().
17:33:48Zevvwho is copying then?
17:33:53disruptekyou said Tc().
17:33:58disruptektry cpsCast.
17:34:04ZevvWell, or your 'when' is taking the wrong turn
17:34:17disruptekeither way.
17:34:26Zevvand I'm wrong, Tc() is just a conversion
17:34:27Zevvit's not a copy
17:34:32Zevvso it must be the when then?
17:34:36disruptekTc() runs on the env. so it's the `is`.
17:34:53Zevvput some echos in there for me
17:34:57Zevvto see which one of the tree it takes
17:35:33disruptekomg i can't rebase.
17:35:38Zevvyou can't git
17:35:39Zevvhaa haa
17:35:43Zevvdisruptak can't git
17:36:01disrupteki don't get it; this is my own commit.
17:36:09Zevvlast commit is mine
17:36:24Zevvdo 'git pull --rebase'
17:36:28disrupteki did.
17:37:42disruptekthere's literally zero difference in the code, too.
17:38:36Zevvthe fun
17:39:12disruptekgoto runs for me.
17:39:18Zevvok cool
17:39:26Zevvso do the others in stash, afaik
17:39:29disruptekis it a test?
17:39:37disruptekie. does it fail when it's broken? looks like no.
17:39:52disruptekit just outputs `one`.
17:40:33disruptekyeah, the rewrite is completely broken.
17:40:41Zevvno it outputs one two three two three two three
17:40:43Zevvuntil ever
17:40:56disruptekwell, not in my branch. 😁
17:40:57Zevvthat what it does for me at commit e6be78d5e5d0383bd009201fc1ff6a6ff0bde0fe
17:41:02Zevvso you broke it after that
17:41:08disruptekokay, lemme roll.
17:41:20disruptekokay, good.
17:42:23disruptekso `is` is not going to work.
17:43:02Zevvsure that's it
17:43:05Zevvthat *is* it
17:43:20disruptekbut that's a huge problem.
17:43:39Zevvare you sure it's this
17:43:43Zevvand not the declaredInScope
17:43:57disrupteki will add your echos and see.
17:44:37Zevvotoh, why would you still need that? There is only one more kind of env left
17:44:39Zevvyou flattened it out
17:45:00disruptekonly in this case.
17:45:10Zevvah ok, I thought you always went flat
17:45:24disruptekno, it does what it can.
17:46:39disruptekno echos.
17:46:52Zevvwell, where did you put'em
17:47:20disruptekdeclaredInScope is not true for this code.
17:47:28Zevvso it's not the is, is it
17:47:42disruptekwell, i will test that, too.
17:48:01disruptekbut also, wtf.
17:50:33disruptekwe can template it as result if it's not declared, but we need to have a way to do that which actually works.
17:51:04disruptekthis is why i wanted to just put the rewrite in its own proc.
17:51:17disruptekbut still, wtf.
17:51:29Zevvso, do we either hack on this a bit more so it works semantically as we think it should
17:51:37Zevvor is everything going out and start from scratch already
17:51:42Zevvbecause I feel this is pretty close
17:51:58ZevvI can even forgive you the triple and quadriple returns
17:52:15disruptekwell, that's why i want to nail the spec.
17:52:28ZevvI always nail specs by writing something that works good enough to run
17:52:30Zevvand then see if I like it
17:52:32*maier joined #nim
17:53:56disruptekone thing i can't decide if i like... cont.foo is result but cont() is typeof(cont).
17:54:24Zevvis this something that has to be set in stone at this moment?
17:54:40disruptekwhat else is there?
17:54:57ZevvI don't know. But in practice, how would this matter to the end user? They never see what's under the hood
17:55:02Zevvthey just provide their little foo()
17:55:19Oddmongeri was sure it was possible to comment large portions of code with syntax like #ifdef / #endif
17:55:34disrupteki want you to be able to write middlware that can be built upon and doesn't need to be rewritten as we improve the impl.
17:55:34ZevvOddmonger: you can `when false:`
17:55:55Zevvdisruptek: fair enough. But I don't care if that happens for the first few iterations
17:55:57disruptek#[ is a comment block ]#
17:56:12Zevvoh yeah that's better, you don't need to indend. use that Oddmonger
17:56:26*vicfred joined #nim
17:56:32disruptekso stash is our proof-of-concept? is there anything missing from it that you want?
17:56:37Zevvdisruptek: I really don't care for that now. I'd be happy to rewrite stuff as we go. I only know if I hate or love it when I work with it
17:56:58disruptekright, but those are easy.
17:57:23OddmongerZevv: of course i know comment on multiline, but `when` keep the syntax colorization
17:57:23ZevvIf there is zero copy of continuations, stash is fine with me
17:57:25*maier quit (Ping timeout: 240 seconds)
17:57:36ZevvOddmonger: fair enough
17:57:47Zevvdisruptek: tell me, did you really not know about stash/ and the working things in there?
17:58:10disrupteki saw some commits and i thought you were commiting the git stash.
17:58:17Zevvbad naming :)
17:58:38disruptekgit stash is a weird thing.
17:58:44Zevvthere's no coros in there yet
18:00:06Zevvbut these are pretty much the same as the iterator
18:01:06Zevvif you decide to go for a rewrite, could we support cps: blocks from the start, next to the cps procs?
18:01:14Zevvsemantics like in the CPC paper
18:01:25Zevvor is that nasty
18:01:32disruptekyes, but we support them, now.
18:01:41disruptekcps Cont:
18:01:50Zevvyeah but then a proc must go in
18:01:57ZevvI mean cps'ing only a part of a proc
18:01:58Zevvor does that work?
18:02:15disruptekif it doesn't work it's only because of assertions or whatever.
18:02:21Zevvoh that'd be cool
18:02:42Zevvgimme a sec, this is where I'd like to go with the async stuff (write write)
18:02:56disrupteki just don't even want that. i just want `.` and `()` to invert control-flow.
18:04:59Zevvsomething along these lines
18:05:56disruptekwhy would you want this?
18:06:02Zevvit's cool as hell
18:06:11disruptekcallback hell, you mean.
18:06:47Zevvno callbacks. It's just saying 'start a new "thread" from here'
18:06:54Zevvthis is what the CPC paper does. exactly this
18:07:59disrupteki am fine with blocks but i want to be rvalues.
18:08:46disrupteklike, i see no point to the second block.
18:09:09Zevvwell, the second block needs a separate "thread"
18:09:28Zevvthe outer 'while' should keep running to acccept new clients, and you want to spawn a new 'thread' for each client
18:09:32Zevvthat's kind of the point
18:09:49disruptekright, but `spawn` is a primitive you can write.
18:10:08Zevvjust saying, I want to be able to make things like this
18:10:29disruptekthe key takeaway for me is that `cps io` is a statement.
18:10:38Zevvso, as your user #1, these are my requirements
18:10:42Zevvwhere do I send the sponsor money?
18:10:59disrupteklet's think about how blocks work.
18:11:26disruptekcan we simply say `cps:` anywhere?
18:11:57disruptekisn't that what we want?
18:12:05Zevvbut you need a type
18:12:15Zevvcps C:
18:12:23disruptekwhy do i need a type?
18:12:43Zevvit's a block handled by the async or the iterator or the coro continuation type
18:12:58Zevvjust like your procs get a cps:C
18:13:01Zevvit's no different
18:13:16ZevvOnly there's no outer proc, you just get a StmtList right away
18:13:46disruptekbut at line 0, it's as if there is nothing. can i not perform rewrite without a type?
18:14:37ZevvHmm and let nim fix that.
18:14:43Zevvc.whatever(), and you don't care in your rewrite
18:14:58Zevvthere just needs to be a `proc whatever(c: Cont)` somewhere
18:14:59disruptekcan i not say: `let c: MyType = cps:`? my `=` can rewrite it.
18:15:12ZevvI guess so, but not yet sure
18:15:45Zevvno you need that, otherwise you don't know what to do when calling a cps primitive
18:17:22disrupteknot convinced.
18:17:29Zevvme neither
18:17:46disruptekyou can do a lot of logic without knowing anything about the types.
18:17:46Zevvwhy can't we just write this out?
18:18:02Zevvwe just take these stash/ exmpales and write the Nim as it should come out in the end by hand
18:18:17disruptekmaybe that's better.
18:18:23Zevvstill one thing I do not see
18:18:41Zevvnow, in user code, we do `cps sleep()`, right
18:18:49Zevvhow do you want to do this in V2
18:19:10ZevvBut for the user there *is* no c
18:19:24disruptekwhy not?
18:19:36disruptekcps as c: c.sleep()
18:19:37Zevvlook at my https://github.com/disruptek/cps/blob/master/stash/iterator.nim, line 37
18:19:49Zevvcounter has `lo` and `hi`, but there is no `c`
18:20:02disruptekyes, but we insert one, even now.
18:20:16Zevvright. But it's not there. If you go typed, it won't compile
18:20:21Zevvbecasue there is no 'c'
18:20:29disruptekthis is one of the reasons we didn't go typed. 😉
18:20:33Zevvso it has to be made explicit
18:20:38disruptekbut it will be made to be there.
18:21:00disrupteki don't have a problem with that for middleware.
18:21:09disruptekit's not a big ask, imo.
18:21:10Zevvnot for middlewere. But for end users that can't be
18:21:27disruptekit's not, for end users.
18:21:35Zevvit is. This iterator proc is an end user proc
18:21:50disruptekthen you're doing it wrong.
18:22:07Zevvno, the 'iterator' *implementation* is middleware
18:22:12Zevvthis is how you *use* it
18:22:32disruptekthen you're doing it wrong.
18:22:33Zevveverythign from line 33 and down is "user"
18:22:36Zevvabove is "middleware"
18:22:49Zevvok, tell me how I should do it then
18:22:57disruptekobviously not, because you have users talking about cps.
18:23:11Zevvok, I can introduce one tiny macro called "Iterator"
18:23:15disruptekyou need a level of indirection.
18:23:18Zevvand make that proc a {.Iterator.} proc instead
18:23:41disruptekmacro? just an object that holds the iterator that users can interact with.
18:24:16Zevvwhat's in that object?
18:24:22Zevvbecause there is no object. It's cps all the way down
18:24:24disruptekyou have produce() which seems perfectly fine.
18:24:45Zevvproduce is cpsMagic
18:24:52Zevvits in the Iterator implementation
18:25:14disruptekit doesn't look magical to me.
18:25:33Zevvok, then again. I have a piece of *user* code. This user code wants to do 'jield'
18:25:44disruptekthat's not user code, then, is it?
18:26:03Zevvit is. 'jield' is an iterator thing, not a CPS thing
18:26:10Zevvok, other subject. async I/O
18:26:16ZevvThe user wants to do an async recv()
18:26:22Zevvhow does she call that?
18:26:28Zevvwhat does the call look like?
18:26:51disruptekprobably has a socketish thing and does recv on it.
18:27:07*audiophile joined #nim
18:27:19Zevvok, fair enough, so then the socketish thing is the clue to cps
18:27:45Zevvanother one: the 'gotos'
18:28:02ZevvI do a 'goto' or a 'label', but there is nothing to do that "on"
18:28:48disruptekwell, make a thing.
18:28:55Zevvok, I think I can live with that
18:29:00Zevvlet's go with that
18:29:15Zevvis that something we want to do in the current codebase still?
18:29:29disrupteki think there's no alternative.
18:30:08*audiofile quit (Ping timeout: 256 seconds)
18:30:10disrupteklook, your recv() cannot work without an event loop, right?
18:30:14*audiophile is now known as audiofile
18:30:16Zevvsure, for recv that's true
18:30:21disruptekand you don't want cps to provide it.
18:30:26disruptekso the middle does.
18:30:28Zevvand probably for a lot of other things. But like iterators, what is the 'iterator' thingy?
18:30:34disruptekit's state.
18:30:40disruptekit is state. its state.
18:30:47Zevvok, I'll try to see if I can make this fit in what is now here
18:31:07disrupteksleep is a better proxy for async.recv
18:31:21disrupteknoop is a better proxy for yield.
18:31:23ZevvI'm afk for bit, reading time; tonights subject is gravity, this'll be fun
18:31:37disrupteki mean, i've heard of it.
18:31:58disruptekhave you been following this blbbt thing?
18:32:05Zevvreading something like Brysons "short history of nearly everything" for 10yos
18:32:06disruptekbhbbt, i mean.
18:32:24Zevvdon't know what that is?
18:33:39disruptekthe theory that there wasn't a single big bang (sbb) but that every black hole translates spacetime into an /analogous/ (not equivalent) universe as its output.
18:39:44*theelous3 quit (Ping timeout: 265 seconds)
18:41:44Zevvah, that's just one of the many multiverse theories. I forgot the name but read a book the other day about all kind of variants on multiverses. Big fun and all, but hard to prove any of those right
18:42:31disruptekhey man, we're working on it. just need a long quantum string to dangle in a nearby sbh.
18:47:46FromDiscord<Ricky Spanish> is there an overhead for using oop in nim vs ignoring it completely?
18:48:33disruptekif you mean methods, yes.
18:48:59Yardanicobut you have to remember that in other languages with methods you accept that overhead by default
18:49:04Yardanicobut in nim it's optional :)
18:49:24Araqand with --gc:arc the overhead is currently terrible :-)
18:49:30Yardanicooh yeah, right
18:49:31Araqbut I know how to fix it
18:49:35FromDiscord<Ricky Spanish> yeh i guess thats why im broadly asking, im quite uh confused by nim coming from c++ but also using go im somehwat used to being forced
18:51:03*narimiran joined #nim
18:51:04disruptekricky, are you related to susan spanish?
18:53:38Zevvok disruptek, what can I do for you at this time?
18:54:08disruptekhow is your arabic?
18:55:44Araqguys, time to say goodbye
18:55:57Araqwon't be online tomorrow. don't do things I wouldn't do
18:56:05disruptekhave fun, araq.
18:56:10Yardanicookay, good luck :)
18:56:47Araqand be friendlier to newcomers than I am
18:58:11disruptek"lightly pasteurized" milk is bullshit.
18:58:15disruptekso to speak.
18:59:04ZevvAraq: have a nice time!
18:59:13*Senketsu joined #nim
18:59:27ZevvLuckily we have Disruptek to make a good first impression on the newcomers
19:00:13disruptekfriendlier than araq is a pretty low bar.
19:00:21disrupteknot sure i can meet it.
19:00:23YardanicoZevv: exactly /s
19:00:47ZevvI loved the nice interaction a few days. "Stranger: Hey arak, how are you doing? Arak: I don't know you."
19:02:55disruptekZevv: you know what the problem is?
19:02:58disruptekit's so obvious.
19:03:12Zevvtell me about the polka dotted elephant
19:04:10disruptekZevv: have you been drinking?
19:04:15Zevvnot today
19:08:09Zevvwhat Zevv: have you been drinking
19:10:44Zevvdisruptek: I'm still waiting man
19:12:02FromDiscord<haxscramper> Assigning result of macro expansion to `const` hangs compilation. If I just copy-paste generated code to `const val = <my code>` everything works as expected. If I do `let val = macroCall()` there are no problems either. What can possibly cause this?
19:12:40disrupteka bug, most likely.
19:13:40disruptekZevv: i was thinking the `when` didn't work because of out-of-phase eval but that makes no sense.
19:15:22Zevvno that's just so silly
19:19:14disruptek`is` clause doesn't work, either.
19:19:33Zevvall these crappy tools
19:24:21disruptekcompiles() works.
19:24:28disruptekbut without `is`...
19:25:14disruptekhow about this idea:
19:25:43disruptekwe do the conversion in the trampoline.
19:26:06ZevvI've been playing with that, but I feel it adds a lot of complexity
19:27:00disruptekwe already have the complexity of inheritance in v1. maybe we should use it.
19:27:24Zevvbut not in the trampoline. It's just wrong
19:27:31ZevvI thought of creating an initial boostrap proc
19:27:40Zevvthat does the conversion of the initial call with args into a continuation
19:27:46Zevvafter that, all split procs only have continuations
19:27:57disruptekyes, i mentioned that earlier.
19:28:01disruptekbut it doesn't solve this problem.
19:28:13Zevvit solves the problem of all the funny 'when's
19:28:35Zevvthere's always a 'continuation'
19:28:40disruptekthat's one when.
19:28:43disruptekone of two.
19:29:10ZevvWe generate the procs and the envs, right?
19:29:16Zevvhow can you ever call a proc with the wrong env?
19:29:18disrupteklast i checked.
19:29:29Zevvso why the "is" anyway?
19:29:35Zevvyou *know* it is safe to convert to that type
19:29:38Zevvthere is no other way
19:30:48Zevvno, there is no other way
19:30:51disruptekbecause i need to be able to create a new continuation in the body and then return a different type.
19:31:26*superbia1 is now known as superbia
19:31:44FromDiscord<dom96> Araq: I was just about to review that lol
19:32:01FromDiscord<dom96> Why are you merging things on holidays anyway? 🙂
19:32:15disruptekyou're right about one thing, though.
19:32:26disruptekwe /could/ create as many procs as we have subtypes.
19:32:54Zevvalso, asking again: Why do we even return
19:32:59Zevvthrow that out
19:33:06Zevvyou still didn't say why not
19:33:19disruptekwhy do we even return?
19:33:23disruptekas opposed to what?
19:33:23Zevvno, return a value
19:33:33Zevvwhy return a continuation
19:33:41disruptekbecause it might be of a different type.
19:33:54Zevvok, but we want those to live in the same buffer
19:33:55*Senketsu quit (Read error: Connection reset by peer)
19:34:08Zevvconverting indeed will not work in this case, but this is where you can do your casting
19:34:25Zevvremembery my earlier writup about re-inventing stack frames
19:34:27disruptekwhat i hear you saying is that you want me to cast. 😁
19:34:30disruptekbut why?
19:34:38Zevvok, bear with me.
19:34:53*disruptek takes his pants off.
19:35:14ZevvIn the original proc there is a few places where we would split. At these places, when running the original proc, you would have your stack frames
19:35:30Zevvthese stack frames share the same stuff for outer scopes, but might differ for inner scopes.
19:35:43Zevvstacks grow, shrink back a bit, grow again a bit differently
19:35:45Zevvwith me?
19:36:09Zevvwe create an object type for each of these places in the original proc that is basically the same as the stack frame would have been
19:36:40Zevvthese are not mutualy-convertable
19:36:49Zevvyou can convert from a smaller to a deeper, but not between to deeper
19:36:59Zevvwhat you can do is *cast* among them
19:37:13Zevvif you know you don't need the old "tail" but want to put stuff in for the next scope
19:37:24Zevvyou cast your the continuation you received to the next one
19:37:28Zevvadd the new stuff
19:37:31Zevvupdate the fn
19:37:32Zevvand you're set
19:37:34Zevvjust 'return'
19:37:38disruptekwell, yes, but at the moment we just fold all types together.
19:37:49Zevvsure, then you don't even need the cast
19:37:54Zevvyou can just update the 'fn' and return
19:38:08Zevvthe trampoline does not do "c = c.fn(c)", it just does "c.fn()"
19:38:28disruptekc.fn(c) but no.
19:38:39disruptekbecause it needs to return an arbitrary type in response.
19:38:58disrupteki don't think it should be a side-effect of the impl.
19:39:08Zevvok, that's fair enough
19:39:09disruptekyou're making too great a concession here.
19:39:24Zevvbut the c we return will always be the exact same c?
19:39:26disruptekright now, the type is not merely as large as the largest frame.
19:39:35Zevvit's a new ref to the same thing
19:39:39disruptekit's as large as anything ever put on the stack in any frame.
19:40:01Zevvbut that will cahnge, right
19:40:04disruptekthe c won't always be the same.
19:40:23Zevvwhy not? It's the same alloced block
19:40:26disruptekit's just a side-effect of the current optimization.
19:40:37Zevvwe *want* it to use the same memory block
19:41:00Zevvshouldn't we move to a different channel by the way.
19:41:00disruptekyou always want to consume all that memory? for every continuation?
19:41:14Zevvno, we're talking two differetn things dude
19:41:14disrupteknah, fuck these nerds.
19:41:43Zevv1) we want to do one alloc for the whole continuation chain
19:41:59disruptekokay, i'm not 100% sure about that.
19:42:10disruptekfirst of all, zero'ing it out isn't free.
19:42:19Zevvyou don't have to zero out.
19:42:25ZevvIf you want you can do a low level alloc() instead of a new
19:43:02disruptektechnically true, but that means we have to issue default() sets for variables in the scope.
19:43:21Zevvok, anyway, that was assumption #1. As few allocs as possible
19:43:23disruptekit's not the worst idea, i guess.
19:43:36disrupteki mean, you've had worse ideas. that's what i'm trying to say.
19:43:40*disruptek 🤣
19:43:45Zevvnumber #2 is this two ways of making envs. Either you 'unfold' every possible continuation and put it all in one object
19:43:57Zevvor we make one-per-proc with the specific stack frame at that point
19:44:09Zevvif you go for the first, stuff is easy, because *all* procs take the same type
19:44:13Zevvno casts, no conversions
19:44:36Zevvthat is, all procs ensaftened from the same source proc
19:44:57disruptekyes, it's true, but it's a big concession.
19:45:04Zevvok. It eats more mem then needed
19:45:13Zevvso: #3: we make one object per split-proc
19:45:34Zevvyou receive one, use and update what you need, and on your way out cast it to the next type
19:46:01Zevvthese casts are 'safe' because of the nature of these things.
19:46:10Zevvbecause in the flow of things, it will just look like a stack frame
19:46:27Zevvwhen you exit a scope, all the stuff coming after that is no longer relevant
19:46:52disrupteki see 3 numbers and at least two are the same. but let's do this:
19:47:14disruptekwe'll impl it as a single alloc because that's how the rest of the code optimizes it, today.
19:47:20disruptekwe can reimpl it later.
19:48:32Zevvok, another thing to settle
19:48:48Zevvwhat is your feeling about these top-level templates for accessing env contents instead of rewriting the body
19:49:04*Senketsu joined #nim
19:49:18Zevvtemplate i = env(c).i_54857395
19:49:25disruptekthey seem fine but iirc my impl is broken.
19:49:32Zevvbecuase I made something neat for that: I made a template that inserts all those templates
19:49:41Zevvso you only need to call the 'injectlocals' template at the top of each proc
19:49:45disrupteki don't like the way the syntax highlight looks; it's creepy.
19:49:58disruptekbut the approach makes some sense.
19:50:15Zevvok, then one more
19:50:18Zevvwhen introducing a new variable
19:50:19*solitudesf joined #nim
19:50:20Zevvino a scope
19:50:28Zevvyour original code goes "var i = 42"
19:50:45disruptekyes, that has to change.
19:50:47Zevvthen, in the end before going out, you need to make sure to put this new 'i' into the environment
19:51:02disruptekit will have to template it at the definition point.
19:51:07Zevvwhat if you from the start already instert the 'template i = env(c).i_15125'
19:51:16Zevvand rewrite 'var i =42' to 'i = 42'
19:51:35disruptekwell, i only want to template it in the scope where it is defined.
19:51:45Zevvdoes it hurt to have it before? No one is accessing it?
19:51:49Zevvit's just a template
19:51:52disrupteki'd like `declaredInScope` to work.
19:52:01Zevvno, that's messy
19:52:07Zevvwhat is wrong with 'i' existing earlier
19:52:13Zevvguarenteed there is no one using it
19:52:14disruptekit could break someone's code.
19:52:26disruptekwho guaranteed it?
19:52:40Zevvwe know, right?
19:52:52Zevvoh, wait, there could be two scopes both using an 'i'
19:53:03disruptekmy new scopes only know what they don't know, ironically.
19:53:13disruptekie. you cannot query them for local scope.
19:53:15Zevvok, so rewrite 'var i = 42' to 'template i = env(c).i_123123; i = 42'
19:53:22*maier joined #nim
19:53:52FromDiscord<Varriount> disruptek: Are you re-implementing lambda lifting in a macro?
19:53:55Zevvare we just stupid or is just still pretty hard all
19:54:11disrupteki think we're just dumb.
19:54:17disruptekbut, i think this approach is dumb, too.
19:54:31disruptekwe've made it harder than it needs to be. probably by an order of magnitude or more.
19:54:40disruptekbut that's okay. we need experience using it.
19:54:48FromDiscord<Varriount> What do you mean by "approach"?
19:54:48disruptekit's hard to use software that hasn't been written.
19:55:01disruptekthis impl sucks a big donkey dick.
19:55:07ZevvVarriount: well, it's just the current implementation
19:55:23Zevvdisruptek made something that kind of works but is hacky all the way
19:55:38Zevvso now we're looking to see what was learned from that approach, considering use cases and see how we can make it better
19:55:56Zevvbut over the last 3 days he was too stoned to have proper conversations and went into type and lambda limbo
19:56:00Zevvluckily he's back now
19:57:33disrupteki was watching teevee.
19:57:38Zevvand playing wow.
19:57:53Zevvdon't watch teevee man. just don't.
19:57:55disrupteki finally hooked it up so bentley could bark at animals /inside/ the rv.
19:58:05*maier quit (Ping timeout: 240 seconds)
19:58:09ZevvI threw mine out 20 years ago.
19:58:23disrupteki've had periods where i quit for a few years.
19:58:45ZevvI think it was one of the best decisions in my life. The time saved and spent on other things is amazing
19:59:02disruptektrue, but modern telly isn't the same as it was.
19:59:10FromDiscord<Varriount> So I did some (likely naive) benchmarking for EC2 instances last night
19:59:20ZevvI'm an old fart, but somehow I'm ahead of most of the new kids on the block, still. I know I'm not much smarter, so it must be because I spent more time doing things that make me *look* smarter
19:59:35skrylar[m]my teevee hasn't had a coax connection for years :3
19:59:47FromDiscord<Varriount> apparently the new A instances have the most processing power per $
20:00:53disrupteknow goto doesn't crash. also, it doesn't goto.
20:03:02disruptekyour goto is nuts, btw.
20:04:47disruptekwell, it doesn't make any sense.
20:05:02disruptekyou store a ref and then you return the same object.
20:05:11disruptekyou should be storing the fn.
20:05:37Zevvno, the whole continuation. Fn + data
20:05:44Zevvthat's what a continuation is.
20:06:09disruptekbut if the continuation doesn't change, what's the point?
20:06:16Zevvthere is no point
20:06:29disruptekit's a ref that you're storing. it can never go anywhere.
20:06:54Zevvah, throw it out then, it was never ment to go in
20:07:18disrupteklet's just store it by value.
20:10:44disrupteknow i have to figure out git again.
20:12:10disrupteki guess you want to cherry pick that.
20:12:29disruptekor see my goats branch.
20:16:06FromDiscord<Recruit_main707> when i try to compile with `--cpu:i386` i get this:↵`error: size of array 'Nim↵_and_C_compiler_disagree_on_target_architecture' is negative`↵any idea on how to fix it?
20:16:58disruptekZevv: performance says Nim closure iterators are 2.051700488716445 times faster
20:18:11disruptekonly about 20% slower on markAndSweep.
20:19:25FromDiscord<Yardanico> @Recruit_main707 what's your C compiler?
20:19:38FromDiscord<Yardanico> First try this
20:19:50Zevvdisruptek: \o/
20:19:54FromDiscord<Yardanico> --passC:-m32 --passL:-m32
20:20:06FromDiscord<Yardanico> Add this after the CPU thing
20:20:37Zevvthat's more like it
20:20:58Zevvand I guess that is because we split too often, still
20:21:01disruptekwe are still doing extra copies, though, until the tail template goes in.
20:21:07disruptekyes, that too.
20:21:16disruptekthat stuff might be optimized out, though.
20:25:49disruptekwe could probably add some inline hints to generated procs, too.
20:27:02Zevvwe should do experiments one day with true tail calls
20:27:08Zevvso how the C compiler handles that
20:27:20Zevvone day
20:27:43FromDiscord<Chapl> I'd like to escape the ast of the type and gen a top level statement but I just can't or the compiler just won't let me do it. <https://hastebin.com/areqolexex.cs> <https://hastebin.com/oqukonocex.php>
20:28:44disruptekyou can't go "up".
20:28:55FromDiscord<Chapl> ffs
20:29:14disruptekit wouldn't make any sense, compositionally.
20:29:20disruptekwhat are you trying to do?
20:29:31FromDiscord<Chapl> Do I really have to declare a `static:` block in order to populate the according builder functions?
20:29:35disruptekif, "merely find the edge of the envelope", well, you found it.
20:29:40FromDiscord<Chapl> (edit) 'Do I really have to declare a `static:` block in order to ... populate' => 'Do I really have to declare a `static:` block in order toscan the type for the pragmas and'
20:30:11disruptekyou can put your type under some other macro, right?
20:30:17disruptekthen simply edit it and return it. boom.
20:30:19FromDiscord<Chapl> wdym
20:30:21disruptekyou're at top-level.
20:30:37disruptekbuildsomething: type Config = ...
20:30:51FromDiscord<Chapl> that's what I'd like to avoid because this looks like real crap.
20:31:20disruptekwell, nim is software for solving problems. if you tell us what the problem is, maybe we can help.
20:31:36disrupteki see a lot of boilerplate. nim isn't great at writing lots of verbosity.
20:31:43disruptekif you are looking for that, try java or c#.
20:32:50FromDiscord<lqdev> @Chapl you can always call the macro afterwards as a regular statement `builder(MyType)` and use getTypeImpl on the sym you get
20:33:00FromDiscord<lqdev> just keep in mind the param to the macro must be `typed` in that case
20:33:11disruptekwell, it would be, already.
20:33:42*audiophile joined #nim
20:34:54FromDiscord<Yardanico> @lqdev I think for some reason Chapl doesn't want to call it explicitly at all
20:35:04FromDiscord<Chapl> 100 points to Yardanico
20:35:15FromDiscord<Chapl> Sorry, a bigillion points
20:35:18FromDiscord<Yardanico> But I think it's weird really
20:35:20disruptekwell, he lost me at .toggle.
20:35:31FromDiscord<Yardanico> And not really possible since you can't go up, you're in a type block
20:35:41disruptekchapl: don't i remember you from my stream?
20:35:48FromDiscord<Yardanico> You can't just insert a proc there
20:36:01disruptekwell, technically, you can.
20:36:08disruptekbut never mind. 😉
20:36:24FromDiscord<Yardanico> Well you can but it wouldn't committee
20:36:27FromDiscord<Yardanico> Compile*
20:36:30*audiofile quit (Ping timeout: 256 seconds)
20:36:38*audiophile is now known as audiofile
20:36:40FromDiscord<Chapl> sent a long message, see http://ix.io/2sTL
20:37:43*narimiran quit (Ping timeout: 246 seconds)
20:38:14disruptekif you have questions about what you've read in the manual, this is a good place to ask.
20:38:20FromDiscord<Yardanico> Well as we said, you can do that if you call the macro after the type. You could even just call it without any arguments (and store the fields in a compile time seq)
20:38:44FromDiscord<Yardanico> For your builder funcs
20:38:45disruptekor pass the type section as an argument, as i suggested.
20:38:51FromDiscord<Yardanico> Yeah
20:39:15disruptekor put a macro on the object definition.
20:39:25disruptekyour macro is on the symbol.
20:39:30FromDiscord<Yardanico> Also there's really not a lot of ways to *document* macros
20:39:42FromDiscord<Chapl> Just tell me: I can't avoid `static: <br> composeBuilderFunctions(Configuration)` and call it at top level
20:39:45FromDiscord<Yardanico> The macro module tells you the AST representation for most types of symbols
20:39:49FromDiscord<Chapl> (edit) 'and call' => 'orcall'
20:39:51disruptekof course you can.
20:40:13disruptektypes are always compile-time.
20:40:29FromDiscord<Yardanico> You don't need static
20:40:34disruptektype goatse = object {.buildme.} ...
20:40:38FromDiscord<Yardanico> But you need to somehow call your macro somewhere
20:40:52FromDiscord<Yardanico> Because you can't insert funcs right in the type definition
20:40:57FromDiscord<Chapl> https://media.discordapp.net/attachments/371759389889003532/739221149053091860/unknown.png
20:40:59FromDiscord<Yardanico> If wouldn't make sense
20:41:47FromDiscord<Chapl> > Because you can't insert funcs right in the type definition↵I do not want to declare funcs or procs in a type's space. I'd like to gen the ast for the funcs/procs in top level.
20:41:47FromDiscord<Yardanico> So you need some other place to insert the funcs in
20:42:05FromDiscord<Yardanico> Yes, but you can't "go up" really as Disruptek said
20:42:23FromDiscord<Yardanico> You can't go to the module AST level from the object field, no AST does that
20:42:29FromDiscord<Yardanico> AST is not circular
20:42:36*Guest37688 is now known as dadada
20:43:10FromDiscord<Chapl> Please please please walk me through how to implement the idea I have because I'm starting to lose it all
20:44:05disruptekdid you ever see this movie?
20:44:20FromDiscord<Chapl> I wouldn't assume that AIIIEEEE is a movie at all.
20:44:33FromDiscord<Chapl> I wouldn't even assume that AIIIEEEE is a movie *
20:44:40disruptekWHEN ANIMALS ATTACK!
20:44:49FromDiscord<Yardanico> Keep all your fields annotated just like now, but either put the type block under the macro call like mymacro: \newline type ...↵or after the block call your macro as mymacro(mytype), again, no need for the static block
20:44:56FromDiscord<Yardanico> Anyways sorry, I'm going to sleep now
20:44:57FromDiscord<Chapl> Because this looked like you were smashing your head on the keyboard and swiped it forth and back pressing random keys
20:46:29disruptekmy advice is not to practice.
20:46:33disruptekdo, or do not.
20:47:39disruptekif you need some examples of what not to do, check my repos. i think i've published something like 130k loc.
20:48:08FromDiscord<Chapl> sent a long message, see http://ix.io/2sTO
20:48:37disrupteki have no idea what that means.
20:48:52FromDiscord<Chapl> You don't.
20:48:57FromDiscord<Chapl> Have to understand
20:49:34disrupteki know how to answer this part: "Am I right?"
20:49:39disruptekthe answer is, "Nope."
20:49:55FromDiscord<Varriount> Chapl: Can you post a link to an example of what you're trying to achieve?
20:50:21FromDiscord<Chapl> I tried to explain it like three times. I won't. Simple version: Java's Lombok but with Nim Macros.
20:50:43disruptekah, see.
20:50:46FromDiscord<Varriount> Yes, but often it's much easier to understand an example, rather than a description.
20:50:52disrupteklombok is a boilerplate generator for java.
20:51:14FromDiscord<Chapl> There's not much to it to explain. Look up Java Lombok and you'll understand in an instant.
20:52:17FromDiscord<Chapl> I agree with Araq that builders are not necessarily needed because you can do the `with:` thingy or just assign the fields. BUT, I'd like to get to know Nim's "killer feature"
20:53:04FromDiscord<Chapl> And I figured this would be good way to practice the macro ast gen
20:53:07disruptekwell, you're not exactly impressing us with your open mind.
20:53:08FromDiscord<Varriount> So, generating procedures from a pragma in a type definition isn't possible, but generating procedures from a pragma in a procedure is
20:53:24FromDiscord<Chapl> > your open mind.↵please elaborate
20:53:26disruptekthat's not true, either.
20:53:38disruptekit's certainly possible to generate procs from a pragma in a typedef.
20:54:08disruptekif you want to be sure that you cannot use the type unless it is processed, then that's certainly as option as well.
20:54:20disruptekbut, there is a reason these things work the way they do.
20:54:23FromDiscord<Chapl> > well, you're not exactly impressing us with your open mind.↵wdym. I'd like to know
20:54:29FromDiscord<Varriount> disruptek: You could be a bit less inflammatory.
20:54:43disruptekyou might not understand the rationale behind the reasoning, but that doesn't mean it doesn't exist.
20:54:58disruptekit's worth making an investment to understand the perspective that brought about these designs.
20:55:03FromDiscord<Varriount> disruptek: How? A function implementation cannot be present in a type definition
20:55:13disruptekit would help you to better leverage the technology if you could concede its origin story.
20:55:29disruptekvarriount: it certainly can.
20:55:32disruptekbut also, who cares?
20:56:01disruptekexpress the problem, then express the solution in nim.
20:56:58disruptekthere are problems in java which just don't exist in nim, and the converse is true, of course.
20:57:34disrupteki don't bring problems from other languages to my problem-solving language, i bring solutions.
20:57:55disrupteki love the way concurrency works in javascript, but i don't want to replicate the js ecosystem in nim.
20:58:12FromDiscord<Rika> i think what disruptek is essentially saying is that this idea isnt a good practice idea for nim macros
20:58:12disrupteki love the elegance of python but i don't want to replicate the performance in nim.
20:58:57disrupteki love the power of c but i don't want to replicate its macros or oop system.
21:00:25FromDiscord<Varriount> disruptek: How would you generate a function implementation in a type definition?
21:01:06disruptekuntyped ast doesn't need to compile.
21:02:04FromDiscord<Varriount> But that would require passing the entire type block into a macro. I was talking about using a pragma in a standard type definition block.
21:02:33disruptekit cannot be done.
21:02:54FromDiscord<Varriount> Which is what I said
21:02:56disruptekwell, except as a lambda, maybe.
21:03:12FromDiscord<Chapl> > i think what disruptek is essentially saying is that this idea isnt a good practice idea for nim macros↵I'm not trying to bring this builder pattern nor the idea into Nim. I was saying that I figured it being a good way to practice Nim macros.
21:03:17disruptekbut it doesn't need to compile.
21:03:54disruptekwhat have you written in nim thus far?
21:04:25*oriba joined #nim
21:04:37FromDiscord<Chapl> Who're you talking to? Me?
21:04:51disrupteki don't care what these other bozos have written.
21:05:06disruptekespecially rika.
21:05:08FromDiscord<Chapl> Nothing production- or library-wise.
21:05:15disruptekbut what?
21:06:04FromDiscord<Rika> lol
21:06:09FromDiscord<Chapl> Nothing, I've been playing with Nim here and there. I found myself after some good long time installing Nim in my WSL installation and thought about playing with it.
21:06:12*maier joined #nim
21:06:41disruptekmy advice is to tackle macros last.
21:07:01FromDiscord<Varriount> sent a code paste, see https://play.nim-lang.org/#ix=2sTU
21:07:45*nikita` quit (Quit: leaving)
21:08:06disrupteki dunno, but is this really the best we can do with discord pastes?
21:08:09disruptekbecause it sucks.
21:08:57FromDiscord<Varriount> Here: https://gist.github.com/Varriount/583a12051d9c0cfe9fdc64d3466a082c
21:09:02FromDiscord<Yardanico> Tell IRC people to define special types of messages for code psstes :)
21:09:16disruptekjust fucking put it in a command block.
21:09:46disruptekvarriount: i have no idea how that would work.
21:09:56disrupteki would use a pragma on the typedef.
21:10:24*sagax quit (Quit: Konversation terminated!)
21:10:40*sagax joined #nim
21:10:40*sagax quit (Read error: Connection reset by peer)
21:11:24disruptekchapl: find something (else) that annoys you and fix it with nim. the smallest thing you can think of. success will embolden you to achieve greater things.
21:11:30*maier quit (Ping timeout: 265 seconds)
21:11:49FromDiscord<Varriount> By "typedef", do you mean inside the definition of "TwoType"?
21:11:51disruptekalso, pay no attention to me.
21:12:47disruptekyes, on the type itself.
21:14:02FromDiscord<haxscramper> How can I use `getTypeImpl` for `ref` objects? I.e. I have `A = ref object` and when I use `getTypeImpl` I'm stuck with `nnkSym` node and cannot get the actual definition AST.
21:14:47FromDiscord<Varriount> disruptek: Like this? https://gist.github.com/Varriount/4d4358d352c2a26bd0f6ba3ae25cbab1
21:15:16disrupteksure, but why is it on two lines, weirdo?
21:16:10FromDiscord<Varriount> How would the macro emit the function definition though? As far as I know, the compiler won't accept a function definition AST in a type definition block AST
21:16:10disruptekanyway, the point is that you can't process this stuff except from above. and why would you want to?
21:16:36disruptekof course, but as it is untyped, it can be composed from below if you're a sadist.
21:18:14FromDiscord<Varriount> Where does 'untyped' come into play? I'm aware that a macro's parameters can be untyped, but it's output has to be a "correct" AST if it's emitting code at the module-level (not inside another macro).
21:18:43disrupteki just told you.
21:19:42FromDiscord<haxscramper> Just save AST via `toStrLit()` to separate file, copy all project to separate directory, launch another compiler process via `staticExec`, compile code and then kill original compiler process. Now you can emit anything from any position in AST.
21:21:10FromDiscord<Varriount> disruptek: You may have told me, but I'm telling you that I don't understand your explanation, so could you please be a bit more descriptive.
21:21:51disruptekthe macro would emit the function definition by teasing it from the type section.
21:21:51Zevvhow do I iterate over object members again?
21:22:28Zevvcould I also iterate over fields of a Type instead of a value?
21:22:36disrupteki will permit it.
21:22:40Zevvthank you
21:23:26disruptekare you going to do the tail templates?
21:23:27FromDiscord<Elegant Beef> Where would we be without your permission disruptek
21:23:31Zevvno the head templates
21:23:52disruptekwe already have those, no?
21:23:52ZevvI'm making a complete mock manual transferred proc
21:23:52Zevvto discuss
21:23:52ZevvI want to automate more
21:23:53Zevvless clutter
21:24:15Zevvbut I want to iterate over *type* fields
21:24:36disrupteki just want to warn you that the type may not be finalized when you do this.
21:24:45disruptekjust consider that possibility.
21:25:47Zevvwe will go *so* *very* typed on this
21:26:27disruptekwell, you can try.
21:30:30*NimBot joined #nim
21:30:31Zevvdude this is cumbersome and tedious
21:30:34*solitudesf quit (Ping timeout: 246 seconds)
21:30:36Zevvdoing all that transform stuff by hand
21:30:48disruptekoh yeah?
21:30:59disruptekin two weeks we get to start over.
21:31:32disruptekwithout macros. 😈
21:38:34Zevvtell me
21:38:36ZevvI have a ref object T
21:38:42Zevvsizeof(T) is now the size of the ref
21:38:47Zevvhow do I get the size of the T
21:38:52Zevvsizeof(T[]) is not valid
21:40:13disruptekthat would be a cool idea.
21:40:22ZevvI need that
21:40:24Zevvand I need it now
21:40:35disruptekyou have to getType and unwrap the ref() around it.
21:41:20ZevvI'm not in a macro
21:41:24Zevvanyway, nevermind
21:41:49ZevvI have now this
21:41:51disruptekoh, then you're fucked.
21:42:08Zevvit creates an Env type for each split proc
21:42:14Zevvand these use the stack frame philosophy
21:42:28Zevvso note that in Env_foo_6 and onwards, 'j' changed into a string
21:42:37Zevvno buts
21:42:48disruptekthis is what we started with.
21:42:48Zevvok, *tiny* buts
21:43:00ZevvI know I know
21:43:07Zevvbut it's a bit bigger
21:43:15Zevvand now I want to know what we want to change
21:43:17Zevvthis is the starting point
21:43:45disruptekwell, if you may the env produce unique types, you will find that it outputs them.
21:44:15disruptekit only outputs one right now because of isWritten(): bool.
21:44:29Zevvbut looking at that snippet. What do we want to change about this
21:44:51disrupteki would change two things that will make it more useful to us:
21:45:00Zevvnote that it's not quite what we started with
21:45:14disruptekmake sleep return nil, and make it take a constant argument.
21:45:32disruptekthen impl noop(c: C): C = c
21:45:52disruptekit's useful to have a way to test the scope.
21:46:26Zevvbut the transformation
21:46:27disruptekwhat's nice about inheritance is that we can make assumptions about the location of values in scope.
21:46:41Zevvwhat's nice about this is that we reuse space
21:46:51disruptekif you want to move forward with your stack accretion concept, that's a nice assumption to be able to make.
21:48:40Zevvthis can be inherited as well I guess, but then it will be a real trie structure
21:48:45Zevvlet me rework this
21:48:57disruptekwell, that cast doesn't work, for example.
21:49:08Zevvwhich cast
21:49:13Zevvall of them?
21:49:58Zevvthis works
21:50:05disruptekyou don't know the position of the var unless you add every var to every type, right?
21:50:20Zevvnot if you inherit, it boils down to the same stuff
21:50:22Zevvow wait packing
21:50:29disruptekif you inherit, it's fine.
21:50:33disrupteknot elsewise.
21:50:37Zevvnow it's fine
21:50:51Zevvvars from outer scopes go in top, and are always at the same place
21:50:56Zevvoredering matters
21:51:05Zevvbut could also be inherited i guess
21:51:14disruptekand it is. 😁
21:52:02Zevvok, works as well
21:52:32Zevvand it's cleaner to read, you can see what comes in new where
21:53:56Zevvbut it's harder to lift like this
21:53:58Zevvbro do you even
21:55:43disrupteknow you can stop casting.
21:56:15disrupteki really have my doubts that lifting is even a thing.
21:56:39Zevvstill need to cast. Can't convert from 5 to 6
21:56:45Zevv'j' gets a new type
21:57:20disruptekso how would your cast work?
21:57:30Zevvthe old 'j' from 5 falls out of scope
21:57:32Zevvthat was an int
21:57:36Zevvthen we go to scope 6
21:57:41Zevvthere happens to be a new variable
21:57:44Zevvalso accidentally called j
21:57:46Zevvbut now it is a string
21:57:51Zevv5 contunues to 6
21:57:59Zevvint j can go out
21:58:00Zevvbut now string j comes in
21:58:10Zevvcontnuation needs to go from type 5 to type 6
21:58:28Zevvyou can't convert horizontally over a tree of inherited types, only vertically
21:58:41disruptekyes, but if it's gensym'd, it doesn't need a cast.
21:58:49disruptekit already has a unique name and type.
21:59:08Zevvno, it's about the layout of the underlying C struct.
21:59:13ZevvIt goes from 'int int int' to 'int int string'
21:59:19Zevvthat's not convertible
22:00:09disruptekthe code we have today goes `int int int string`, right?
22:00:15disruptekso what's the problem?
22:00:23Zevvof the code we have today?
22:00:35Zevvthe extra storage, that's all
22:00:44Zevvif that is no problem, stuff is simpler
22:01:05Zevvand I'm making things more complicated then needed
22:01:16ZevvI don't know either. This is where we friggin started!
22:01:22disruptekwell, you told me you wanted one alloc. 🤣
22:01:31Zevvyes but this ix example is 1 alloc!
22:01:38Zevvthis is as optimal as it can get
22:01:45Zevvit is 1 alloc, as small as possible
22:02:10disrupteksure, but...
22:02:35Zevvthis is like as if we put the stack on the heap
22:02:53disruptekthe impression i got is that you wanted all calls to operate on the same type.
22:03:16disruptekwhatfer alloc frag reasons or something.
22:03:34Zevvwell, they do now, basicaly. Excepty for the casting to get stuff out :)
22:03:43Zevvbut this is literally what I just say: The stack is now on the heap
22:03:54Zevvit grows, it shrinks. We just moved that to the heap.
22:04:02disruptekthe original impl worked like this 2sU2 i'm looking at.
22:04:26Zevvbut it alloced a new frame for each call
22:04:30Zevvthat was baaad mkah
22:04:52Zevvthis has 1 alloc. It's just a blob of memory. It adds variables as the come into scope, drops them if they move out
22:04:58Zevvbut it's all the same block. It is a *stack*
22:06:01Zevvthe whole point: if you want have multiple threads of something, you need each one to have it's own stack. And after two feeks of fiddling, what I just wrote is just that
22:06:08Zevvis this good or is this bad or a friggin waste of time?!
22:06:12ZevvI don't know
22:06:15Zevvreinventing wheels
22:06:57disruptekwell, it seems self-evident that it's both correct and minimal.
22:07:09Zevvthat's quite a relief :)
22:07:27disruptekbut i personally don't care for the concession to memory usage.
22:07:44Zevvok, fair enough
22:07:51Zevvso for sake of simplicity, all the envs drop into 1
22:07:54disruptekie. just because it's as good as it was doesn't excite me.
22:08:07disruptektechnically, it could be better.
22:08:21disruptekie. we can drop from the stack that which we no longer need.
22:08:55FromDiscord<Elegant Beef> @treeform in fidget is there a way to get non character inputs from the keyboard?
22:09:18FromDiscord<Elegant Beef> arrows/return and the like
22:10:53Zevvdisruptek: so we get http://ix.io/2sUa/nim
22:11:10disruptekZevv: it's not simplicity that governs our current design now, it's the whens.
22:11:12Zevvoh wait
22:11:46disrupteki mean, i'm not bothering to run this stuff. am i supposed to?
22:11:59disruptekit's okay if it doesn't work.
22:12:05Zevvwe get this. All envs in one big blob
22:12:08Zevvno casts, not magic
22:12:40Zevvso can we make this from what we have now
22:12:44Zevvdrop all the funny when stuff
22:12:55Zevvclean up, maybe get the octuple returns out
22:14:46disruptekthe when stuff is gone, right?
22:15:08disruptekso you just don't want double returns?
22:15:25disruptekand rm var/let sections.
22:15:39Zevvthe double returns is just whining of course
22:15:50Zevvbut what you have is pretty close to this stuff I just dumped
22:15:51disrupteki don't want them, either.
22:15:54Zevvso why throw it all out
22:16:13disruptekthey are an artifact. i'm not trying to throw stuff away.
22:16:39disrupteki do want free goto, though.
22:16:39Zevvno I mean, why start from scratch, if what you have now is pretty close to what seems to be obviously correct and minimal
22:16:55Zevvthe problem was mostly in the allocs
22:17:02disruptekit doesn't have to be from scratch.
22:17:43ZevvI know you want to get rid of the env implementation
22:18:04disruptekhere's a question.
22:18:26disruptekdoes adding a name to the current scope create a new scope holding that name, or does it change the existing scope?
22:19:02Zevvit grows the scope, because all the other stuff that were in the previous scope are also in the new scope
22:19:29Zevvso it grows the existing scope
22:21:12Zevvbut all this practical stuff - it is far from the philosophical musings you had the last few days
22:21:12disruptekso the reason i want to change the env impl is that i get clash handling "for free" as a side-effect of the semantics of scope-based, uh, scope tracking.
22:21:41disruptekwell, i still want my simpler compositions and syntax.
22:21:54Zevvbut that doesn't bite
22:22:02Zevv(Btw, https://github.com/disruptek/cps/blob/master/talk-talk/manual2.nim is the ix, just checked it in)
22:22:25Zevvyou need to make some diner right
22:22:39Zevvi need some sleep
22:22:46disrupteksleep tight, zevv.
22:22:54Zevvsame dude, laters!
22:41:26*vicfred quit (Quit: Leaving)
22:51:37*leorize quit (Remote host closed the connection)
22:52:08*leorize joined #nim
23:03:09FromGitter<gogolxdong> Any project
23:05:41FromGitter<gogolxdong> Does anyone know any well-known project written in Nim?
23:07:05*maier joined #nim
23:07:42FromGitter<gogolxdong> https://github.com/nim-lang/Nim/wiki/Companies-using-Nim Is this enough?
23:11:45*maier quit (Ping timeout: 240 seconds)
23:12:18leorizethe Nim compiler is a well-known one :P
23:12:39leorizethere's also nimbus, the etherium 2 implementation
23:12:59leorizealso nitter, a privacy frontend for twitter
23:17:25*dadada quit (Ping timeout: 240 seconds)
23:19:30*dadada joined #nim
23:19:37disruptekshallow people are impressed by vim cubed.
23:19:46disruptekthousands of 'em.
23:19:53*dadada is now known as Guest9637
23:21:21*vicfred joined #nim
23:21:25*Senketsu quit (Read error: Connection reset by peer)
23:24:37shashlickNim is probably a secret weapon for some companies, who knows
23:25:23federico3that list is so sad :(
23:25:40disruptekthere's no accounting for taste.
23:26:17disruptekit's probably because our community is so toxic to new folks.
23:27:11FromDiscord<Ricky Spanish> yep that list is way shorter than deserved, community size on discord too to be fair, iv only been using a few days but iv found it atleast as useable and useful as vlang, golang and rust with the exception being the number of learning materials isnt as great as rust....i disagree about the community...i actually liked the people i spoke to here...
23:27:40disrupteki'm just teasing varriount.
23:28:11FromDiscord<Ricky Spanish> ah my bad just jumped in at the end 😆
23:28:36disrupteki mean, it's a good report and it's nice to hear.
23:33:55disruptekfor some people, a rusty tool doesn't matter.
23:33:59disruptekfor the rest of us, there's nim.
23:34:49*Guest9637 is now known as dadada
23:39:51FromDiscord<Ricky Spanish> sent a long message, see http://ix.io/2sUq
23:40:35FromDiscord<Ricky Spanish> when i re-found nim...it was very clear it was for systems
23:41:29FromDiscord<Varriount> disruptek: Now that I think about it, is there any technical reason a macro couldn't be able to modify the AST tree *ahead* of its call site?
23:42:24FromDiscord<Varriount> It can't modify already processed nodes, beecause they're... already processed, but nodes "ahead" of it haven't been processed yet.
23:42:52FromDiscord<Varriount> *ahead of it and it's parents
23:51:37FromDiscord<Elegant Beef> @Ricky Spanish Yea i've actually had to point out that nim isnt an intepreted language a few times when i evangalized it 😄
23:54:40FromDiscord<Varriount> Also, people seem to think that GC == slow (which is probably why Go calls references "pointers", to throw people off the scent)
23:55:19FromGitter<binhonglee> Hi all, I have a question about compiling a macos binary from linux
23:55:49FromDiscord<Elegant Beef> I mean varriount i recently spoke to someone that said "ARC is always slower than GC"
23:55:55FromDiscord<Elegant Beef> So im super confused why nim's ARCis so fast
23:56:00FromDiscord<Elegant Beef> (edit) 'ARCis' => 'ARC is'
23:56:12FromDiscord<Varriount> It depends on what you mean by "fast"
23:56:40FromDiscord<Elegant Beef> Well the benchmarks that were shown off at nimconf seems to indicate it's vastly faster than the GC options
23:56:46FromDiscord<Elegant Beef> In those cases
23:56:53FromDiscord<Ricky Spanish> well im a little guilty on the gc front tbh, but atleast nim has the option to disable it giving me the option for each project so having the option to learn a language and trusting me to decide whats right as i need seems revolutionary to me
23:56:56FromDiscord<Varriount> The garbage collectors that Java and C# tend to use are "fast" in that they allow allocating memory very quickly
23:57:08FromGitter<binhonglee> I have a file that only have 1 line : `import httpClient` ⏎ ⏎ and compiling it like this: ⏎ `nim c --os:macosx -d:emscripten -d:ssl --cpu:amd64 -t:-m64 -l:-m64 x.nim` ⏎ ... [https://gitter.im/nim-lang/Nim?at=5f26015403d73b60ee5e7ead]
23:58:10*krux02_ joined #nim
23:58:37FromDiscord<Varriount> This might yield some answers. Looks like a missing library or header path? https://stackoverflow.com/questions/58741942/event-h-no-such-file-or-directory-even-when-libevent-dev-is-installed
23:59:33FromDiscord<Varriount> @binhonglee What OS are you using?
23:59:36*oriba quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)