<< 17-12-2020 >>

00:03:58*ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
00:28:43FromGitter<gogolxdong> Which vscode plugin is better for Nim? nimsuggest exhausts memory so I have to disable.
00:29:28FromDiscord<Clyybber> disruptek: I don't think typed as a return type for a macro makes much sense
00:29:37FromDiscord<Clyybber> or rather typed meaning "don't check this its okay"
00:30:03FromDiscord<Clyybber> maybe untyped should mean "don't check this immediately"
00:30:57FromDiscord<Rika> vscode plugins use nimsuggest
00:34:09FromDiscord<trippleA> In a hypothetical scenario, where would one go about hiring nim programmers? This is not an offer, just wondering how I would reach out to one outside of the discord.
00:34:51FromDiscord<Rika> probably posting here is fine? im not too sure but ive seen job offer posts here already, or maybe my memory fails me
00:43:01FromDiscord<InventorMatt> Status has done a job posting here before
00:43:57*lritter quit (Ping timeout: 268 seconds)
00:52:55FromDiscord<juan_carlos> I need to wrap a JS function that takes whatever function as argument, whats the best argument type for that?, I tried `proc`, `{.closure.}`, `T`, etc but keeps complaining about the proc not having the correct type, but the JS takes whatever function.
01:00:06*vsantana quit (Ping timeout: 272 seconds)
01:14:09*Tanger joined #nim
01:21:28FromDiscord<ElegantBeef> @juan_carlos the lazy part of me says to wrap a `proc yourProcInternal(passedProc: JSObject)` with a `template yourProc(a: proc: T{.closure.})` which calls `toJs` on the proc though idk if that'd work
01:23:06FromDiscord<juan_carlos> No, I tried, also emit+template, `T`, `any`, `proc`, `func`, `{.closure.}`, `auto`.
01:24:50*hnOsmium0001 quit (*.net *.split)
01:24:51*supakeen quit (*.net *.split)
01:24:51*Fish-Face quit (*.net *.split)
01:24:51*Jjp137 quit (*.net *.split)
01:24:51*gangstacat quit (*.net *.split)
01:24:51*hpyc9 quit (*.net *.split)
01:24:51*hoek quit (*.net *.split)
01:24:51*d10n-work quit (*.net *.split)
01:24:51*euantorano quit (*.net *.split)
01:24:51*r4vi quit (*.net *.split)
01:24:51*skelett quit (*.net *.split)
01:27:07*Jesin quit (Ping timeout: 246 seconds)
01:28:20FromDiscord<juan_carlos> Would be nice to have some kind of `type Callable = proc or func or any or nil` for JS only.
01:30:11*hnOsmium0001 joined #nim
01:30:11*supakeen joined #nim
01:30:11*Fish-Face joined #nim
01:30:11*Jjp137 joined #nim
01:30:11*gangstacat joined #nim
01:30:11*hpyc9 joined #nim
01:30:11*hoek joined #nim
01:30:11*d10n-work joined #nim
01:30:11*euantorano joined #nim
01:30:11*r4vi joined #nim
01:30:11*skelett joined #nim
01:32:32miprihttps://play.nim-lang.org/#ix=2ImH T seems to work here.
01:33:57*hnOsmium0001 quit (Ping timeout: 260 seconds)
01:33:58*hoek quit (Ping timeout: 260 seconds)
01:33:58*d10n-work quit (Ping timeout: 260 seconds)
01:35:32*d10n-work joined #nim
01:35:33*hoek joined #nim
01:37:04*hnOsmium0001 joined #nim
01:44:15disruptekclyybber: right; untyped can't be checked right away.
01:45:46FromDiscord<juan_carlos> Thanks, yeah, I know some stuff is not callable like nil etc but still Js is just like that, I will add a comment it must be a proc only.
01:49:21miprioh, that you can enforce
01:50:58mipri[T: proc] works
01:51:24FromDiscord<juan_carlos> ty
02:02:26*klaufir_ joined #nim
02:05:38*klaufir quit (Ping timeout: 256 seconds)
02:15:03*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
02:15:10*njoseph joined #nim
02:18:36*abm quit (Read error: Connection reset by peer)
02:21:48FromDiscord<acek7> hey nerds
02:22:10FromDiscord<Rika> hello nerd
02:22:34FromDiscord<acek7> how are the fellow nerds of the world
02:36:10FromDiscord<Rika> Am learning C89 for fun
02:36:26FromDiscord<Rika> Things really were simpler back then
02:38:08*klaufir_ quit (Ping timeout: 260 seconds)
02:39:35FromDiscord<acek7> im still tryna learn nim
02:39:41FromDiscord<acek7> and programming in general
02:39:43FromDiscord<acek7> been busy with work
02:40:33disruptekC89 was pretty fun, honestly.
02:42:41FromDiscord<acek7> what does C89 look like
02:45:49FromDiscord<Rika> Kinda like normal c but not really
02:45:56FromDiscord<Rika> There's a few major differences
02:47:39FromDiscord<acek7> what are you making with it
02:50:12disruptekcompiler errors.
02:58:15FromDiscord<Rika> Lol
02:58:18FromDiscord<Rika> Random stuff
03:05:42ForumUpdaterBotNew thread by Deech: Macro for working with bitmasks and enums, see https://forum.nim-lang.org/t/7258
03:07:17*muffindrake quit (Ping timeout: 272 seconds)
03:08:57FromDiscord<Gyllou> anybody ever use any of the intel xeon phi line? coprocessor or otherwise?
03:09:03*muffindrake joined #nim
03:11:18FromDiscord<Gyllou> i know, taboo to mention the p word, but still jw
03:17:04FromDiscord<Daniel> i think there are 2 many programming languages today, its a jungle
03:22:38FromDiscord<Gyllou> agreed, i wish people would put more work into existing languages rather than makign a new one
03:23:11FromDiscord<Gyllou> im betting we abandon python in another 8-10 years if nobody ever fixes the GIL clusterfuck
03:23:49disruptek10 years seems like a long time. i think i started with python in 98.
03:23:51disrupteki can't really imagine going back to it.
03:24:24FromDiscord<Gyllou> i think that the schism between SE peeps and data science types will persist for a bit longer and thatll keep python alive
03:24:41FromDiscord<Gyllou> dask, numba, occasionally cython keep python going for the rest of us
03:24:53disruptekyou're probably right.
03:25:21*Jesin joined #nim
03:25:23FromDiscord<Gyllou> i know alot of people in data science that think learning java would be like the most monumental undertaking
03:25:36FromDiscord<Gyllou> and thats java
03:25:48FromDiscord<Gyllou> but they are short changing themselves
03:25:56disrupteki'm not sure nim is different enough from rust to ever made headway there.
03:26:15FromDiscord<Gyllou> yea im concerned about that, i really am not a fan of rust though
03:26:37FromDiscord<Gyllou> i would probably just fall back on C at that point
03:27:06disruptekeh it's annoying but it's not as bad as C was.
03:27:28disrupteki see modern C and it's pretty tolerable, but still... the new languages bring a lot to the table.
03:27:41FromDiscord<Rika> idk lifetimes are just way too much for me
03:28:04FromDiscord<Gyllou> yea, crystal looked promising, but idk if itll survive the night so to speak
03:28:09FromDiscord<Gyllou> what do you mean?
03:28:29FromDiscord<Rika> too much brain power needed to think about lifetime annotations
03:28:35FromDiscord<Gyllou> ohhh
03:29:12FromDiscord<Gyllou> idk it seems like the trend is just to layer more and more abstractions and compilation levels onto stuff and I hate it.
03:29:29FromDiscord<Gyllou> soon we will have a vm that compiles to the jvm that compiles to machine code
03:29:50FromDiscord<Gyllou> bc apparently the jvm is too hard for people
03:30:03disrupteki feel that, but abstractions let us fracture the tech and specialize optimizations, etc.
03:30:06FromDiscord<Rika> ~~llvm~~
03:31:02FromDiscord<Gyllou> abstractions are good i agree, i just think that there is sometimes abstraction that loses more than it gains
03:31:44FromDiscord<Gyllou> (edit) "is" => "are"
03:31:55FromDiscord<Gyllou> i havent messed with llvm much tbh
03:32:14FromDiscord<Gyllou> i did back when i didnt know wth i was even using
03:33:08FromDiscord<Gyllou> derp i have used it, just without realizing
03:33:55FromDiscord<Gyllou> i wish i had a cloud access to a xeon phi to test out the avx 512 performance on it
03:34:03FromDiscord<Gyllou> i dont wanna buy one
03:34:31disruptekwhy can't you rent one?
03:35:11FromDiscord<Gyllou> i suppose i could find a vendor for that, couldnt find cloud access tho
03:35:32disruptekkinda surprising.
03:35:42FromDiscord<speckledlemon> are you aware that the Xeon Phi is a dead platform?
03:35:46FromDiscord<Gyllou> i didnt give it a good try though
03:35:51FromDiscord<Gyllou> lol yes im very aware
03:35:58FromDiscord<speckledlemon> ok, just making sure
03:36:07FromDiscord<speckledlemon> they do seem very, very cool though
03:36:12FromDiscord<Gyllou> yea, dead or not i wouldnt need any "support" from them anyways
03:36:43FromDiscord<Gyllou> yea, i wish they would have continued it to some extent
03:36:52FromDiscord<speckledlemon> you're probably best off finding one on eBay...I'm still thinking about it
03:36:57FromDiscord<Gyllou> now that market will be taken up by arm and SVE2
03:37:34FromDiscord<Gyllou> yea it is hard to find compatible motherboards apparently because they were mostly oem.
03:37:39*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
03:38:00FromDiscord<Gyllou> avx 512 is like the only thing intel has going for it right now
03:38:40*pbb joined #nim
03:39:11FromDiscord<Daniel> you know already avx512 isnt rly wide used, altho not sure why
03:39:14FromDiscord<Daniel> probably expensive
03:39:36FromDiscord<Gyllou> yea, from my exerience with avx2 its not user friendly
03:39:50FromDiscord<speckledlemon> mratsim can probably comment but the benchmarks for avx512 are not good
03:40:21FromDiscord<Gyllou> we have a specific algorithm that would perform well on some avx512 enabled boards
03:40:30FromDiscord<Gyllou> otherwise yea, meh
03:40:34FromDiscord<Gyllou> gimme dem cores
03:40:45FromDiscord<Daniel> altera will
03:40:57FromDiscord<Gyllou> yea thats another option
03:41:15FromDiscord<Gyllou> once sve 2 comes out, ill consider going that way if the benches are good enough
03:41:40FromDiscord<Gyllou> 2048 vector lengths? yes, i think i will have a scoop of that
03:41:53disruptekheh
03:42:23FromDiscord<Gyllou> but mainly its the variable length thats nice, because then you dont have to stretch or chop it to fit
03:42:41FromDiscord<Gyllou> we'll see though, don't want to speak to soon
03:42:49FromDiscord<Gyllou> (edit) "to" => "too"
03:43:40FromDiscord<Gyllou> i have to design a space tentacle
03:43:46FromDiscord<Gyllou> im excited about it
03:44:29FromDiscord<Gyllou> i should probably get back to doing my cad fml tho
03:49:07disrupteka what?
03:49:18disruptekmanipulator arm?
03:53:12FromGitter<awr1> is there even any consumer-level arm hardware with SVE
03:53:48FromGitter<awr1> the only stuff i've seen with SVE is like the Fujitsu A64FX which is exclusively being sold for the HPC market as far as i'm aware
03:57:06*rockcavera quit (Remote host closed the connection)
04:02:20*vsantana joined #nim
04:06:01*supakeen quit (Quit: WeeChat 2.9)
04:06:32*supakeen joined #nim
04:09:44*Cthalupa quit (Ping timeout: 260 seconds)
04:10:16*Cthalupa joined #nim
04:42:01*NimBot joined #nim
04:51:52*narimiran joined #nim
04:59:04*mbomba joined #nim
05:07:28*Tanger quit (Remote host closed the connection)
05:07:57*Tanger joined #nim
05:08:53*Tanger quit (Remote host closed the connection)
05:10:49*Tanger joined #nim
05:23:53*disruptek throbs.
05:25:27*waleee-cl quit (Quit: Connection closed for inactivity)
05:26:43*kungtotte quit (Read error: Connection reset by peer)
05:27:55*kungtotte joined #nim
05:52:31Prestigedisruptek: hello.
05:53:29disrupteksup chucklehead
05:54:08Prestigewriting a talk about OO for work, you?
05:56:20Prestigethrobbing, I suppose
06:06:01*habamax joined #nim
06:18:16*audiofile joined #nim
06:25:31*a_chou joined #nim
06:25:48FromDiscord<mratsim> The first Status Nim developers got hired through Reddit. Which is also a very good story to tell :p
06:26:55FromDiscord<mratsim> @Gyllou AVX512 support was very messy as well: https://github.com/flame/blis/issues/352
06:26:56disbotWorkstation SKX is mis-identified
06:38:24*a_chou quit (Quit: a_chou)
06:44:10*fanta1 joined #nim
06:46:07ForumUpdaterBotNew thread by Serge: Working on a "Pindent" for Nim : gathering suggestions, see https://forum.nim-lang.org/t/7259
07:06:05*audiofile73 joined #nim
07:07:31*audiofile quit (Ping timeout: 256 seconds)
07:14:35*audiofile73 quit (Quit: Connection closed)
07:16:03*leorize quit (Ping timeout: 240 seconds)
07:16:57*leorize joined #nim
07:18:43Zevvdisruptek: we still have the non-cpsable for loop, right?
07:30:11*klaufir_ joined #nim
07:31:22FromDiscord<mratsim> aha: this papers mention that the Cilk multithreading runtime is continuatio-passing: https://github.com/disruptek/cps/blob/master/papers/cpc.pdf↵↵And Weave does work similar to Cilk, though Cilk has a trick, it builds a function twice, one with the C calling convention and one with a special Cilk convention as any thread can resume at a suspended point.
07:34:20FromDiscord<mratsim> (edit) aha: this papers mention that the Cilk multithreading runtime is continuatio-passing: https://github.com/disruptek/cps/blob/master/papers/cpc.pdf↵↵And Weave does work similar to Cilk, though Cilk has a trick, it builds a function twice, one with the C calling convention and one with a special Cilk convention as any thread can resume at a suspended point.
07:36:23*leorize quit (Ping timeout: 240 seconds)
07:37:09*leorize joined #nim
07:38:31FromDiscord<mratsim> CPS function still have color right?↵↵> With the signle exception of cpc_spawn, which is allowed in any context, CPC statements and call to CPS functions are only allowed in a CPS context.
07:39:53*^Q-Master^ quit (Quit: Ушел)
07:40:18FromDiscord<ElegantBeef> We're getting really colourful now, i really dont like that i'm going to be the schmuck that makes the defaults for this 😄 https://media.discordapp.net/attachments/371759389889003532/789034218218324018/unknown.png
07:41:33FromDiscord<Rika> nice
07:42:52FromDiscord<mratsim> @Araq do you think it would ever be possible to have a way to know if a return value escapes the caller? Maybe lent return value overloading?↵↵it would be very useful for continuations/Flowvar/Futures as we could use alloca instead of full blown heap allocation (https://reviews.llvm.org/D23245)
07:44:44FromDiscord<mratsim> And it would be necessary if we want those to be usable on embedded.
07:55:22*Q-Master joined #nim
08:01:44FromDiscord<mratsim> @Zevv does cpsMutant has any advantage?
08:02:16FromDiscord<Ricky Spanish> whats the best editor to use for nim currently on windows? trying to use visual studio code but recently a process keeps exploding and using 99% cpu with the nim add-on
08:03:41FromDiscord<mratsim> open the extension and deactivate nimsuggest
08:03:51FromDiscord<Ricky Spanish> ah ok will try thanks @mratsim
08:04:01FromDiscord<mratsim> and complain here: https://github.com/nim-lang/RFCs/issues/300
08:04:02disbotDeveloper tooling
08:06:48FromDiscord<mratsim> Unfortunately I think you are in kind of the Nim valley of tooling death: you're on windows so vim/nvim is ieither unpractical or a mythic beast to tame. You know enough Nim that your programs might trigger nimsuggest bad behaviour, and suggestions are very helpful for your workflow.
08:06:50FromDiscord<Ricky Spanish> ok it seems to be a process called "rg" and nim suggest thast are the issues
08:07:19FromDiscord<mratsim> rg is ripgrep it's what VScode use to grep the code, it shouldn't be long lived.
08:07:41FromDiscord<Ricky Spanish> yeh it pops up and dissappears but both are consuming around 20-40% cpu so the result is it randomly explodes
08:07:52FromDiscord<Ricky Spanish> mostly after i save it happens
08:08:17FromDiscord<mratsim> your experience in that thread would be valuable.
08:08:28FromDiscord<Ricky Spanish> ok ill write a post thanks
08:11:52FromDiscord<mratsim> @Zevv, @disruptek, there is something I am missing, the continuation is just a proc, where is the environment context? Something that we need to add by deriving "ref object of Continuation"?
08:16:22FromDiscord<Ricky Spanish> actually im not sure anymore, iv been monitoring a bunch now it seems solely a problem of rg not nimsuggest, nimsuggest kind of works as expected and only spikes during big modifications and rg just seems to explode to 70-80% everytime i save but if rg isnt part of the nim extension then its not nims problem?
08:16:32FromDiscord<ElegantBeef> @Ricky Spanish you can try the nimlsp addon which uses the LSP with nimsuggest instead of rg
08:16:45FromDiscord<ElegantBeef> (edit) "rg" => "straight nimsuggest"
08:17:08FromDiscord<mratsim> Yeah rg is part of core vscode.
08:17:23FromDiscord<Ricky Spanish> ok thanks will give that a try but yeh atleast its not the nim extension then
08:38:51Zevvmratsim: IIRC the mutant was about creating a fresh continuation to pass every time, or mutating the one passed before passing it on. The latter is the way to go of course
08:40:39ZevvThe environment is in the concept; the continuation is an inheritable ref object with a member .fn that is a continuationProc[Continuation]
08:41:08Zevvso right, the CPS code creates the environment from lifted locals
08:41:34FromDiscord<mratsim> sent a long message, see http://ix.io/2Ios
08:41:47Zevvyes
08:42:00FromDiscord<mratsim> so I assume the environment is not mentioned becaue it can be empty.
08:43:03FromDiscord<mratsim> so while waiting for isolated, to make them threadsafe I would change them to ptr object of RootObj.
08:43:57Zevvhm fair enough, but for all the other use cases where we do not want or need threading when using CPS we likely just want it to be ref
08:43:58FromDiscord<mratsim> or just plain object and leave the allocation details to the scheduler
08:44:07ZevvThe latter
08:44:24FromDiscord<mratsim> but plain object means we need to MaxSize the environment
08:44:45ZevvHm that is not nice as well
08:44:45FromDiscord<mratsim> I assume Araq would want those to work on embedded as well, we can't with ref objects.
08:44:59Zevvwhy not?
08:45:16Zevvoh embedded-without-heap
08:45:22FromDiscord<mratsim> dynamic allocation is often only allowed at program startup.
08:45:34Zevvno, but calling that "embedded" is a bit 90's :)
08:46:11ZevvCould we make stuff hibrid so it will run with ptr and/or ref?
08:46:26Zevvso defined the concept as `ptr object or ref object`
08:46:38FromDiscord<mratsim> I think we can.
08:46:49Zevvbecause for a *lot* of the CPS use cases I will be using it for, I really want to have the benefit of the normal ref
08:47:19FromDiscord<mratsim> not sure about the "ref object of RootObj" though.
08:47:38Zevvwe had various implementation of this, and a lot of discussion
08:48:07FromDiscord<mratsim> I mean, not sure if we can use foo is ref object of RootObj or foo is ptr
08:48:23ZevvIMHO the environments we build for the split-off procs should all have a very similar layout as the original stack frame at these positions in the original function
08:48:41FromDiscord<mratsim> Then for multithreading, i think I only need to replace trampoline
08:48:57Zevvright, that is the whole point. Note that CPS does not know or care what a trampoline is
08:49:08Zevvdisruptek is a stubborn guy and put all that stuff in this repo
08:49:11Zevvbut it should _not_ be here
08:49:22ZevvCPS does not call, trampiline, schedule, yield, or whatever
08:49:27FromDiscord<mratsim> that's OK, it gives a bird eye vie
08:50:14Zevvbut in general, yes. The only place where you would interface with CPS is by doing the trampolining in the way you think is right
08:50:27FromDiscord<mratsim> btw, did you read on the Kotlin coroutines implementation, it's quite interesting: https://github.com/Kotlin/KEEP/blob/master/proposals/coroutines.md#implementation-details
08:50:37Zevvunfortunately, not yet
08:51:10FromDiscord<mratsim> i like there comparison with async/await vs suspend/resume
08:51:14FromDiscord<mratsim> their
08:51:36ZevvI'll try to make some time for that
08:51:45Zevvbut I'm getting slurped into a lot of work these days
08:52:28FromDiscord<mratsim> yep, will look into it more later.
08:54:31FromDiscord<mratsim> what's the overhead on the semaphore btw?
08:55:03Zevvwhat semaphore?
08:55:57FromDiscord<mratsim> https://github.com/disruptek/cps/blob/73761e36452d85315b802237772bb7cc20536f1d/cps/semaphore.nim#L4-L9
08:56:33ZevvI have no clue what he was thinking or doing there
08:57:01FromDiscord<mratsim> in the CPC paper they talk about semaphores
08:57:10FromDiscord<mratsim> for synchronization
08:57:18ZevvI think it's also not part of the CPS part itself
08:57:24FromDiscord<mratsim> but not sure why it's part of the core
08:57:37Zevvthat directory mostly contains disrupteks event loop, scheduler, trampolines, etc
08:57:40Zevvmine are all in stash/
08:57:51Zevvwe had a bit of a funny workflow in this repo
08:58:14ZevvAll my stash/ stuff is truly standalone, it only uses CPS and no evenloops, I/O wrappers, etc
08:58:43FromDiscord<mratsim> research is messy
08:58:52Zevvmany fun things in life are
08:59:03FromDiscord<mratsim> I need to learn more about managing FD and kernel IO
08:59:30FromDiscord<mratsim> anyway the repo is clean and easy to follow even though it's messy 😉
08:59:41Zevvyeah. Nim has this ioselector abstraction, which I personally do not like at all
08:59:59Zevvbut I see it has to do with abstracting away posix vs windows of course
09:00:26*Ekho quit (Quit: CORE ERROR, SYSTEM HALTED.)
09:01:36*Cthalupa quit (Ping timeout: 268 seconds)
09:02:21*Cthalupa joined #nim
09:02:22FromDiscord<mratsim> personally I'm worried about everything that use ref objects for such lowlevel primitives
09:03:43FromDiscord<mratsim> because in likely case you want those to be unique ptr. And also for our async / IO story to have good appeal it needs to support a wide range of devices
09:03:47*Ekho joined #nim
09:04:02*ehmry joined #nim
09:04:10FromDiscord<mratsim> that said, embedded requires to be different anyway so maybe it's not worth it going all the way to no alloc?
09:05:09FromDiscord<mratsim> and for threading also you need to avoid ref.
09:05:24Araqas I wrote on the forum, the cost of ref over unique_ptr is a memory fetch
09:05:53AraqIME not worth the trouble, if you can avoid the 'ref' altogether that's much better
09:06:09FromDiscord<mratsim> I'm talking about avoiding ref altogether.
09:06:15Araqbut replacing 'ref' with 'unique_ptr' never makes enough of a difference to bother
09:06:23FromDiscord<mratsim> but then you have those stackful/stackless concerns
09:06:56FromDiscord<mratsim> the nice thing about unique ptr is that they are very easy to memory pool instead of using Nim GC
09:07:29Zevvbut this will add limitations that will all make other uses of CPS more cumbersome, right
09:07:48Zevvyou can't just make yourself a quick iterator without going through all the bookkeeping
09:08:02AraqI don't see much value in memory pools either
09:08:14ZevvI just want arc to manage my memory, all the way
09:08:18FromDiscord<mratsim> I think you can avoid bookkeeping
09:08:20Zevvthat's what it does best
09:08:25FromDiscord<mratsim> Weave does a lot of bookkeeping underneath
09:08:30Araqevery allocator that is alive is heavily optimized for the "pooling" case already
09:09:04FromDiscord<mratsim> yet I get 2x (multithreaded) to 5x faster (single threaded) with Weave vs malloc.
09:09:53FromDiscord<mratsim> so no they aren't. When you know the exact details of your application and memory usage pattern, you can heavily optimize this case.
09:10:20FromDiscord<mratsim> anyway
09:10:32FromDiscord<mratsim> since those are concepts, the actual scheduler can fill in the blank
09:10:36Araqok, can't argue against your numbers
09:10:50AraqI do wonder why you get these though
09:11:27FromDiscord<mratsim> sent a long message, see http://ix.io/2IoE
09:12:11FromDiscord<mratsim> you can nim c -r -d:danger this file to reproduce: https://github.com/mratsim/weave/blob/master/weave/memory/memory_pools.nim#L876-L891
09:13:19AraqI don't understand your question well enough to have a reply
09:13:33Araqescape analysis for 'dest = f()'?
09:14:17FromDiscord<mratsim> assume we have someone who does `let f = spawn(f(a, b))`
09:14:45FromDiscord<mratsim> spawn will return a future/flowvar or can be a continuation
09:15:04FromDiscord<mratsim> if f escapes its scope (used as a return value) we have to heap allocate.
09:15:21FromDiscord<mratsim> if it does not, we can `alloca` it
09:15:48FromDiscord<mratsim> which significantly reduce overhead for very short function say an IO read that happens to be already available.
09:18:48*PMunch joined #nim
09:20:12Araqseems easy enough to have
09:20:20Araqbut I worry about alloca
09:20:38Araqyou can always run out of stack space and p
09:20:49Araqa large part of async's point is to nuke the stacks
09:21:37FromDiscord<mratsim> because continuation are tail calls, when you continue you replace the previous one
09:22:12FromDiscord<mratsim> Zevv has even a version of continuation that mutate in place
09:23:08FromDiscord<mratsim> and for multithreading, in Weave I have a global switch to use alloca https://github.com/mratsim/weave/blob/master/weave/datatypes/flowvars.nim#L109↵↵and I can handle trillions of them (fibonacci(40)) twice faster than with heap.
09:24:10FromDiscord<mratsim> Note that the overhead completely disappears for task that are a bit more fleshed out. But almots empty tasks are way more common for IO I think hence it's more important for CPS.
09:24:19*Tanger quit (Remote host closed the connection)
09:24:58*hyiltiz quit (Quit: hyiltiz)
09:25:03Zevvmratsim: the idea was that for the continuation we do one single alloc before the initial call
09:25:21Zevvthat contains the lifted locals as they come and go, potentially re-using the same memory locations
09:25:29Zevvjust as the stack would have if the function was not CPS'ed
09:25:40Zevvthe same memory block lives as long as the continuations are "in flight"
09:25:59Zevvand only gets discarded if the original function terminates
09:26:09*hyiltiz joined #nim
09:26:09*hyiltiz quit (Changing host)
09:26:09*hyiltiz joined #nim
09:26:17FromDiscord<mratsim> ah I see. But if continuations can be moved across threads i have to think it over.
09:26:38ZevvCPS itself does not care if this block is a ref or a ptr
09:26:57Zevvbut for a lot of CPS uses, I'd prefer to have this as a ref and let arc do the work for me
09:28:25FromDiscord<mratsim> but how do you resize your frame with ARC?
09:29:00FromDiscord<mratsim> doesn't it always alloc a new one instead of reusing the same because the locals are different?
09:29:01FromDiscord<ElegantBeef> For my colourful error messages i've got to ask, would it be silly, to have the nim config file store them, or is it more sane to make a secondary `colours` file that stores the `TMsgKind: color`?
09:31:29FromDiscord<nikki> does nim identifier matching also consider colour and color equal
09:31:58FromDiscord<ElegantBeef> Lol
09:32:16FromDiscord<ElegantBeef> I'm Canadian i use the proper spelling as much as i can 😛
09:33:12PMunch@nikki, I wish it did..
09:33:54FromDiscord<ElegantBeef> any case of `or` is equal to `our` would mean `if a our b` is valid 😛
09:35:18FromDiscord<lqdev> uncle stalin would be proud
09:35:38FromDiscord<ElegantBeef> Shit lq i didnt know you had georgian ancestry
09:37:45FromDiscord<lqdev> possibly
09:39:15*hnOsmium0001 quit (Quit: Connection closed for inactivity)
09:42:08*DrWhax quit (Ping timeout: 256 seconds)
09:42:35*mbomba quit (Quit: WeeChat 3.0)
09:47:20FromDiscord<mratsim> I use color but I tend to write behaviour ...
09:49:06FromDiscord<ElegantBeef> I've got an american accent i have to use Canadian english to distance myself
09:56:53PMunchHaha, smart
10:00:19FromDiscord<lqdev> analogue
10:03:29FromDiscord<ElegantBeef> Centre
10:12:50AraqI prefer the American spellings too, less bullshit
10:13:36Araq"behaviour", it's like they tried to enumerate all the vowels they have
10:15:32*waleee-cl joined #nim
10:16:04narimiranlol
10:21:27FromDiscord<ElegantBeef> Oh cmon if metre and centre arent the most comical way to spell them idk what is
10:23:34*Vladar joined #nim
10:24:40FromDiscord<lqdev> i always read "centre" as if i was reading french or something
10:24:47FromDiscord<lqdev> centré
10:31:19*abm joined #nim
10:38:56FromDiscord<dom96> that's cool, but are they using Nim there?
10:39:38FromDiscord<mratsim> first Status Nim developers = coffeepots, zahary, yuriy and me
10:40:35FromDiscord<dom96> oh, wow, I way misread
10:40:40FromDiscord<dom96> Never mind lol
10:40:46FromDiscord<dom96> it's too early in the morning
10:41:09FromDiscord<mratsim> https://www.reddit.com/r/nim/comments/7i3n8y/hiring_nim_devs_for_ethereum_implementation/
10:41:15FromDiscord<mratsim> This was the post
10:41:56FromDiscord<mratsim> made on Thursday Dev 7, 2017
10:42:00FromDiscord<mratsim> dec
10:43:25FromDiscord<dom96> alloca for async/await would be cool
10:43:48FromDiscord<dom96> maybe you could even get some gains by simply having a chunk of memory pre-allocated for these operations that complete immediately
10:46:36FromDiscord<dom96> So what can I do to convince people to improve async/await instead of spending time on CPS for a questionable amount of impact/effort ratio?
10:48:35*lum quit (Quit: Lum: Bye!)
10:49:41FromDiscord<mratsim> for Weave I have a memory pool or raw malloc and if a flowvar never outlives its caller, you can compile with "lazyFutures" to use alloca
10:49:53FromDiscord<mratsim> the gains are indeed extremely significant for short-lived function
10:50:00*lum joined #nim
10:50:17FromDiscord<mratsim> but in CPU-bound multithreading you can get away with malloc most of the time because function are usually costly.
10:51:12FromDiscord<mratsim> regarding async/await, to be honest I wanted to try async/await ala Rust, since there is this zero-cost, no alloc that makes it appealing for both embedded usage and multithreading.
10:51:32FromDiscord<mratsim> but since Zevv and Disruptek put a lot of work on CPS, I want to make sure we give it a srious try as well.
10:51:43*lum quit (Client Quit)
10:52:05FromDiscord<mratsim> caveat: it's zero cost except for IOCP as those requires to own a buffer.
10:52:27FromDiscord<dom96> afaik Rust's implementation being "zero-cost" is a misnomer
10:52:43*lum joined #nim
10:52:57FromDiscord<Clyybber> CPS is improving async
10:53:03FromDiscord<dom96> but yes, I wanted to explore that path too
10:53:04FromDiscord<mratsim> wouldn't surprise me, their "data-race free" slogan is wrong as well.
10:53:21FromDiscord<Clyybber> and right now we are in the fix compiler bugs that block cps phase
10:53:48FromDiscord<dom96> @Clyybber how is it improving async? It's a brand new implementation
10:54:19FromDiscord<mratsim> also one thing that is very interesting is that you can remove all the closure iterators code from Nim and replace by the cps primitives.
10:55:13FromDiscord<mratsim> and maybe the inline iterator as well as inline iterator don't escape and we can then avoid the heap at all.
10:55:38FromDiscord<mratsim> so this might remove code from the compiler.
10:56:59FromDiscord<dom96> to me the CPS primitives are just a reimplementation of closure iterators
10:57:25FromDiscord<dom96> I'd rather improve the compiler to make custom allocators possible and you'd get the same advantages of this custom implementation
10:58:37FromDiscord<mratsim> there are a couple difference I see. CPS properties are supported by theory.
10:59:46FromDiscord<mratsim> It's dispatcher/executor agnostic and so you can use an event loop, a threadpool on top
11:01:14FromDiscord<mratsim> the thing about theory is important in terms of maintenance, the type system that we have with generics and static is adhoc and as our needs grow we have static, generics, typedescs that makes sigmatch and semchecks huge monters.
11:01:44FromDiscord<mratsim> if we have primitives that are proved to be sufficient to implement all else, this removes this risk of adhoc patching in the core primitives.
11:02:01FromDiscord<dom96> You could say that closure iterators are backed by theory too, they are a form of coroutines after all
11:02:57FromDiscord<mratsim> sure, then I don't know the internals of closure iterators so I can't tell you how they fall short.
11:03:23FromDiscord<dom96> The advantage that closure iterators have right now is that they also work in practice and have worked for quite some time
11:03:36FromDiscord<mratsim> I know that currently they suffer from 2 problems from a user perspective: very bad ergonomics, and slow due to allocation.
11:03:54FromDiscord<mratsim> from an implementer's perspective, I suppose Araq should detailed that in a RFC
11:04:12FromDiscord<dom96> Well, I'd love to see benchmarks that show they are slow and for which use cases.
11:04:32FromDiscord<dom96> I'm also not sure what is so bad about their ergonomics?
11:04:42FromDiscord<mratsim> https://github.com/mratsim/nim-project-euler/blob/master/src/lib/functional.nim#L26-L46
11:05:15FromDiscord<mratsim> the function signature and how you declare the result is very cumbersome and prone to error
11:05:50FromDiscord<mratsim> and it's also slow compared to a for loop.
11:06:06FromDiscord<mratsim> iirc it wasn't just 2 or 3x slower.
11:06:54FromDiscord<dom96> I think it's important to do these evaluations in terms of async/await specifically
11:07:10FromDiscord<dom96> their ergonomics are largely hidden away and are just an implementation detail
11:07:21FromDiscord<dom96> as for the speed, we'd need a real IO use case to benchmark
11:08:55FromDiscord<dom96> That being said, I would prefer to go the explicit async IO route rather than the Go-style CSP route which CPS implies. I think that for a systems programming language it is the right approach as it gives explicit control over the async runtime
11:09:26FromDiscord<dom96> But in order to go for zero-cost abstractions I would like to see some benchmarks that show the current implementation being too slow
11:09:27FromDiscord<mratsim> I think IO is certainly 70% of the story, but FP and chaining iterators is important as well
11:10:08FromDiscord<mratsim> The zero-cost I'm not sure. As soon as you need to allow a future to escape the caller you need heap alloc.
11:10:25FromDiscord<mratsim> I don't think CPS mandates CSP.
11:11:04FromDiscord<mratsim> what's the explicit async IO?
11:11:17FromDiscord<dom96> right, but FP/chaining iterators should be a separate consideration. I'm not sure if even CPS can be used as a replacement here. We should improve closure iterators in Nim to make them more user-friendly for those use cases.
11:11:36FromDiscord<mratsim> disruptek as an example in the repo.
11:11:40FromDiscord<mratsim> has
11:11:48FromDiscord<dom96> in the context of CSP, with CSP your IO/threading is largely hidden away from you.
11:12:10FromDiscord<dom96> And as far as I have heard the push is towards CSP
11:12:19FromDiscord<dom96> hence the talk of function colors
11:12:29FromDiscord<mratsim> https://github.com/disruptek/cps/blob/master/stash/iteratorT.nim#L18-L41 this implements lazy infinite iterator ala Haskell.
11:13:25FromDiscord<mratsim> so you mean an executor model, with ex.spawn fn(a, b, c) or ex.async fn(a, b, c)
11:13:26FromDiscord<dom96> yeah, I would much rather push to improve the existing closure iterators
11:13:39FromDiscord<dom96> don't see why we have to start fresh to get nicer FP/chaining
11:14:22FromDiscord<mratsim> coroutines and cps can be implemented (?) each in terms of the other I think
11:14:29FromDiscord<dom96> It would be nice to explore the Rust model, where futures are explicitly polled.
11:14:29FromDiscord<mratsim> at least that's in the paper
11:16:44FromDiscord<mratsim> sent a long message, see http://ix.io/2Ipi
11:18:46FromDiscord<dom96> Nice set of articles. Interesting insight about cancellation.
11:19:01FromDiscord<dom96> Indeed, I would say that cancellation and future streams are the two things missing from Nim's async/await implementation
11:19:38FromDiscord<dom96> (a nice-to-have would also be the ability to await a spawned thread)
11:20:23FromDiscord<dom96> (and/or channel)
11:23:03FromDiscord<mratsim> but that can be solved with any channel providing `tryRecv` and a `poll()` loop around.
11:23:48FromDiscord<dom96> that's not efficient though
11:23:56FromDiscord<mratsim> tryRecv returns true if there is a result and gets it, and returns false if the result is not available and so a recv would block.
11:23:59FromDiscord<dom96> ideally you want an FD you can epoll
11:24:20FromDiscord<dom96> there were efforts to implement this by @Zachary Carter IIRC
11:25:17FromDiscord<dom96> but yeah, these facts make me really skeptical about putting work into CPS/CSP and I'm hoping someone can convince me otherwise.
11:25:23FromDiscord<Zachary Carter> I think it was maybe someone else
11:25:51FromDiscord<mratsim> What I mean is, we know we can solve that and it should cause problems in the type system, existing code, etc.
11:26:19FromDiscord<dom96> oh yeah, sorry, it was rayman22201
11:26:26FromDiscord<Zachary Carter> np!
11:26:54FromDiscord<dom96> what do you mean " it should cause problems in the type system, existing code, etc."?
11:27:51FromDiscord<mratsim> it's an AsyncChannel type that is isolated from the rest of the issues.
11:28:22FromDiscord<mratsim> async/await, coroutines, cps require suer program transformation
11:29:16FromDiscord<mratsim> while AsyncChannel are blackboxes that can do anything without having to worry about the user code in their scope since there is no user code inside.
11:29:25FromDiscord<mratsim> user program transformation
11:30:24FromDiscord<dom96> Okay, I feel like I'm missing a wider point you're trying to make 🙂
11:31:16FromDiscord<mratsim> that we have less things to worry about for async channel
11:31:59FromDiscord<mratsim> File descriptor + buffer + synchronization primitives (+ some way to tie in to the dispatcher?)
11:32:28FromDiscord<dom96> ahh, sure, but in my mind the current Channel[T] in nim's stdlib is the synchronization primitive + buffer
11:32:41FromDiscord<dom96> we could wrap an AsyncChannel around it that is just Channel[T] + fd
11:32:44FromDiscord<mratsim> Nim channel needs a heavy facelifting
11:33:02FromDiscord<mratsim> but Araq is doing it this week i think
11:33:21FromDiscord<dom96> Oh really, cool
11:33:30FromDiscord<dom96> Then why not get integration with async while we're at it
11:33:37FromDiscord<mratsim> He asled me about my channel implementation on Monday
11:33:50FromDiscord<dom96> Do you think an FD per channel would work?
11:33:57FromDiscord<mratsim> there are differing concern, we need channel + async channel
11:34:12FromDiscord<dom96> AFAIK the complexity arose because we wanted to save FDs
11:34:13FromDiscord<mratsim> the basic threadpool does not need async but needs channel.
11:34:30FromDiscord<dom96> yep
11:35:11FromDiscord<mratsim> I have to learn way more about FD and kernel IO, that's my next task, otherwise I'll have trouble helping on async beyond just evaluating if it can be made multithreaded/threadsafe and the dispatcher.
11:37:17FromDiscord<dom96> I'm tempted to write an RFC for those three things I've mentioned above. Hopefully that will yield some good reasons why I'm wrong and we should all focus on CPS/CSP.
11:37:46FromDiscord<dom96> did chronos get cancellation?
11:43:17FromDiscord<dom96> it looks like it did
11:44:53*lritter joined #nim
12:01:20*kenran joined #nim
12:02:17*rockcavera joined #nim
12:06:01*supakeen quit (Quit: WeeChat 2.9)
12:06:35*supakeen joined #nim
12:09:12FromDiscord<mratsim> sent a long message, see http://ix.io/2IpD
12:09:23FromDiscord<mratsim> and yes cancellation.
12:09:48FromDiscord<mratsim> maybe completion vs readiness based futures.
12:17:00ForumUpdaterBotNew thread by Hotcore: Help neede with IUP in Nim, see https://forum.nim-lang.org/t/7261
12:21:58FromDiscord<mratsim> Ah and also to make sure, is CPS replacing closure iterators, because in that cause it's not about async vs CPS but closure itarators vs CPS
12:25:07narimiranNIM COMMUNITY SURVEY 2020: https://forms.gle/kEWvEeVyfxSHq9Uj8
12:28:58PMunchDamn, next year I'll be in the 5 years + club :)
12:29:01ForumUpdaterBotNew thread by Miran: Nim Community Survey 2020, see https://forum.nim-lang.org/t/7262
12:33:05*Cthalupa quit (Ping timeout: 240 seconds)
12:33:56FromDiscord<sealmove> "What features, tools, or libraries would you like Nim to have?" toughy
12:33:57*Cthalupa joined #nim
12:35:19FromDiscord<mratsim> easy coffee machine
12:35:49FromDiscord<sealmove> do we have anything for NoSQL similar to hadoop?
12:36:01FromDiscord<haxscramper> narimiran: what about https://github.com/nim-lang/Nim/issues/15855
12:36:02disbotNim community survey questions about compilation errors
12:36:21FromDiscord<haxscramper> Or it was decided to be not important enough?
12:36:25narimirani haven't seen that issue until now
12:36:33FromDiscord<haxscramper> oh
12:37:05PMunch@sealmove Couchbase Lite has Nim wrappers
12:37:40PMunchhttps://github.com/couchbaselabs/couchbase-lite-C/tree/master/bindings/nim
12:37:49FromDiscord<haxscramper> well, I guess no error-related statistics then
12:37:54narimiransorry
12:40:34PMunch"What learning resources, if any, did you use to learn Nim?" well that's a tough one, most of those didn't even exist when I started :P
12:40:39FromDiscord<sealmove> It's hard to answer this question because of course everyone would like more things in Nim? These "things" though are sometimes large and need a whole company behind them to be built/maintained.
12:41:28PMunchCrap, I hit back on my mouse to go to the previous page, and it wiped my answers -_-
12:41:48FromDiscord<sealmove> you use a mouse?
12:42:08FromDiscord<sealmove> (joke)
12:43:27PMunchFor clicking boxes on a website? Yes :P
12:43:38PMunch"If you are not using it at work yet, do you plan to in 2021?" - what if I do use Nim at work
12:43:56FromDiscord<sealmove> maybe it allows you to leave it blank
12:44:51FromDiscord<sealmove> as learning resources really I only used Nim Manual, which is not listed
12:45:03FromDiscord<sealmove> it's not only nice for reference
12:58:31ForumUpdaterBotNew post on r/nim by digitalcraftsman_: Launching the 2020 Nim Community Survey, see https://nim-lang.org/blog/2020/12/17/community-survey-2020.html
13:02:46FromDiscord<sealmove> can a tuple def be recursive? (one of its field be of the same type)?
13:03:04ForumUpdaterBotNew thread by FabienPRI: Dividing duration, see https://forum.nim-lang.org/t/7263
13:03:57narimiranPMunch: you can skip all the questions that don't apply to you
13:04:04PMunchYeah I realised
13:16:57*dddddd quit (Quit: dddddd)
13:17:13*dddddd joined #nim
13:22:25FromDiscord<Gyllou> Whats everyone's thoughts on avx 512?
13:23:18FromDiscord<Gyllou> im going to making some hard ware purchases in the next couple months and I'm wondering if its worth waiting on intel to finally release some pcie gen 4 supported chips
13:23:29FromDiscord<Gyllou> otherewise ill stick with epyc
13:23:36FromDiscord<Gyllou> (edit) "otherewise" => "otherwise"
13:28:11FromDiscord<Rika> deep pockets i assume...
13:36:30*lum quit (Quit: Lum: Bye!)
13:39:05*lum joined #nim
13:40:08*lum quit (Client Quit)
13:41:27*lum joined #nim
13:42:00FromDiscord<William_CTO> One of the best surveys I’ve filled out. Good job folks
13:45:00FromDiscord<haxscramper> This code doesn't work on nim 1.2.6 and 1.0.10 (works fine on 1.4.2) - https://play.nim-lang.org/#ix=2Iq9
13:45:18*fanta1 quit (Quit: fanta1)
13:45:45FromDiscord<haxscramper> Is there any reason as to why? I can just workaround for this with version checking, but I'd rather use it on all versions
13:46:10FromDiscord<mratsim> @Gyllou use AVX2 + Ryzen
13:46:44FromDiscord<mratsim> Intel chip will have unknown delays, not sure what's the state of downclocking on ice lake but on Skylake it's pretty bad
13:47:17*fanta1 joined #nim
13:47:22FromDiscord<mratsim> I need to downclock by 600Mhz despite watercooling: https://github.com/numforge/laser/blob/master/benchmarks/system_profile_i9-9980XE.md
13:47:58FromDiscord<mratsim> Ryzen will give you way more core for the price and they caught up on IPC.
13:48:21FromDiscord<mratsim> only issue is poor MKL support but I think BLIS is not too bad.
13:51:14ForumUpdaterBotNew thread by Serge: If I use Nigui to build an app on a Mac, how do I distribute it ?, see https://forum.nim-lang.org/t/7264
13:54:25FromDiscord<haxscramper> If someone manages to answer this question we will get custom object unpackers for pattern matching in older nim versions.
13:55:22FromDiscord<mratsim> macro would work
13:55:47FromDiscord<mratsim> pretty sure I use that in Weave
13:57:39FromDiscord<haxscramper> If I remove `static` everything works, but the problem is - I need it to be `static`
13:58:57FromDiscord<mratsim> what if you use a macro instead of a template?
13:59:27*Q-Master quit (Ping timeout: 268 seconds)
14:01:27PMunch@haxscramper, this works: https://play.nim-lang.org/#ix=2Iqj
14:09:41FromDiscord<haxscramper> Yes, it worked at start, but then failed in some instane combination of `static` contexts, with ``Error: cannot evaluate at compile time: ridx`gensym557934``
14:12:53FromDiscord<shadow.> does this challenge happen procedurally like the last game of life one?
14:14:45*rockcavera quit (Remote host closed the connection)
14:16:44FromDiscord<trippleA> How reliable is the official iup package?
14:23:12FromDiscord<shadow.> welp today's aoc was kinda easy
14:26:11*FromGitter quit (Remote host closed the connection)
14:26:11*oprypin quit (Quit: Bye)
14:26:27*oprypin joined #nim
14:26:40*FromGitter joined #nim
14:27:30*Q-Master joined #nim
14:30:21FromDiscord<dom96> it hurts having to pick the next age group in the survey D:
14:31:30FromDiscord<lqdev> is being old really as bad as they say?
14:32:37*Q-Master quit (Ping timeout: 264 seconds)
14:33:16FromDiscord<dom96> it's just sad more than anything, at least for me
14:35:03Zevvlqdev: actually, it's great. You can just whine and shout all day and everybody is going "meh, just let the sucker"
14:35:28ZevvAnd I'm getting better at keeping my mouth shut? You think 1 and 1 makes 3? Sure, good luck and have a nice day.
14:35:37FromDiscord<mratsim> You need a bar open for that to happen
14:37:21FromDiscord<mratsim> what? https://forum.nim-lang.org/t/7263 int64 division is not supported? What is this sorcery?
14:39:25Zevvwho needs int64 division anyway
14:39:32ZevvI only store primes in there
14:39:39PMunchZevv, unfortunately we're not old enough yet that people just chalk our behaviour up to being a weird old man :P
14:40:06ZevvI have a great idea. I'll greate a distint type that can only hold primes
14:40:13Zevvand then add an `/` operator for it
14:40:15FromDiscord<shadow.> oo survey time
14:40:21Zevvand ask on the forum why it doesn't work
14:40:25Zevvshadow.: What do we survey?
14:40:30FromDiscord<shadow.> wdym
14:40:33FromDiscord<shadow.> i just saw the link
14:40:35FromDiscord<shadow.> so im going to do it lol
14:40:40FromDiscord<mratsim> Real men store primes in an enum.
14:40:43PMunchZevv, oh if you do that the first thing I'll try is `let biggest = ZevvsPrime.high`
14:40:44FromDiscord<shadow.> shit how did i discover nim im actually forgetting
14:41:10FromDiscord<mratsim> I know I do, I store primes in an enum and access them by macro :p
14:42:05FromDiscord<mratsim> People in FP community are all after dependent types. In Nim I have dependent primes.
14:42:39FromDiscord<shadow.> lol pmunch have you done aoc yet
14:42:46PMunchNope
14:42:48FromDiscord<shadow.> i think you'll get a good laugh out of my solution
14:42:56FromDiscord<shadow.> ooo
14:43:00FromDiscord<shadow.> you streaming today or na
14:43:00PMunchI won't be able to do it until this evening :(
14:43:11PMunchI'll probably still stream it
14:43:14FromDiscord<shadow.> in how many hours?
14:43:17PMunchBut it will be pretty late
14:43:33PMunch~5 hours probably
14:43:33disbotno footnotes for `5`. 🙁
14:43:36FromDiscord<shadow.> im guessing im around 5-6 hours before you so
14:43:38FromDiscord<shadow.> yeah
14:43:41FromDiscord<shadow.> that's like 2pm here
14:43:44FromDiscord<shadow.> perfect 👌
14:43:51FromDiscord<shadow.> 2-3pm nvm
14:47:06FromDiscord<shadow.> feelsbadman https://media.discordapp.net/attachments/371759389889003532/789141625968001045/unknown.png
14:47:22FromDiscord<sealmove> shadow really?
14:47:32FromDiscord<shadow.> yes
14:47:43FromDiscord<sealmove> wow you are still in school
14:47:46FromDiscord<shadow.> high school
14:47:46FromDiscord<shadow.> lol
14:47:49*DrWhax joined #nim
14:47:54FromDiscord<shadow.> im guessing <18 is a minority in this server
14:48:05FromDiscord<shadow.> somewhere like python that's probably average lol
14:48:08FromDiscord<sealmove> when did you start programming?
14:48:13FromDiscord<shadow.> about a year ago
14:48:21FromDiscord<shadow.> when i was like 13 lmao
14:48:26FromDiscord<shadow.> im 15 in 2 months
14:49:10Zevvdude
14:49:22ZevvI could be your gramp
14:49:23FromDiscord<shadow.> ye?
14:49:23FromDiscord<haxscramper> I always wondered how people start programming in like 13 or something.
14:49:27FromDiscord<shadow.> lmao
14:49:29FromDiscord<haxscramper> When I was around this age
14:49:40FromDiscord<haxscramper> Actually I have total blackout about this time
14:49:44PMunchI started when I was 10 :P
14:49:48Zevvhaxscramper: when you were about that age what?
14:49:53FromDiscord<shadow.> well i started it like 4 months before covid started and at that point i was just messing around w pentesting
14:49:55FromDiscord<shadow.> then i picked up python
14:50:01FromDiscord<shadow.> and during covid i kinda went on a spree of like
14:50:02ZevvI started at 6
14:50:15ZevvThe Apple // BASIC manual on my lap
14:50:15FromDiscord<shadow.> py -> c++ -> java -> c#, and now nim
14:50:18Zevv10 print "zevv"
14:50:20Zevv20 goto 10
14:50:31FromDiscord<shadow.> shheesh
14:50:49PMunch@shadow., you've been through a lot of languages in such a short time
14:50:54FromDiscord<shadow.> well
14:50:56FromDiscord<shadow.> i didnt exactly
14:51:02Zevvyeah, you might want to stick with this one though :)
14:51:03FromDiscord<shadow.> fall in love with java or c# lmao
14:51:11FromDiscord<shadow.> java felt verbose and clunky
14:51:23*Guest35837 joined #nim
14:51:27FromDiscord<shadow.> and c# didn't really feel like it had any points that stood out to me?
14:51:37FromDiscord<shadow.> i use to just mess around w scripting like discord bots n stuff with python
14:51:45PMunchI have to use C# for work at the moment
14:51:51FromDiscord<shadow.> but ive gotten into some lower level programming and nim is great for that
14:51:58PMunchLet's just say I'm less than thrilled..
14:52:01FromDiscord<shadow.> lmfao yeha
14:52:02FromDiscord<shadow.> (edit) "yeha" => "yeah"
14:52:12FromDiscord<shadow.> i made a repo of making the same program in like 11 languages and let me just say...
14:52:12FromDiscord<sealmove> you are all geniuses, I feel bad >_<
14:52:25FromDiscord<shadow.> https://media.discordapp.net/attachments/371759389889003532/789142963934593084/unknown.png
14:52:28FromDiscord<shadow.> accurate verbosity measure
14:52:32FromDiscord<shadow.> the fact that nim isnt even on there is good
14:52:33FromDiscord<shadow.> lmfao
14:52:48PMunch@sealmove, you should take it as an indication that you've come by the best language ;)
14:52:49FromDiscord<sealmove> @Zevv nice try to lure shadow into sticking to Nim :p
14:52:50FromDiscord<shadow.> this is the full collection https://media.discordapp.net/attachments/371759389889003532/789143068552200202/unknown.png
14:53:05FromDiscord<shadow.> gotta say nim was the most fun to write out of these
14:53:10FromDiscord<shadow.> and yeah, im sticking with it
14:53:22FromDiscord<shadow.> it kinda solves my general complaints with interpreted languages, and my other complaints w compiled ones
14:53:30FromDiscord<shadow.> php is like the opposite of that
14:53:31FromDiscord<shadow.> lmfao
14:53:32FromDiscord<trippleA> Is there a native library for working with win32 in nim?
14:54:03PMunch@trippleA, winim?
14:54:10FromDiscord<sealmove> yes Nim is best lang, I have no doubt about this anymore ^^
14:54:46FromDiscord<shadow.> same lol
14:55:28FromDiscord<sealmove> I have to use Java most of the time 😐
14:55:38FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2IqE
14:56:01FromDiscord<trippleA> Which is better: winim or winlean?
14:56:10FromDiscord<shadow.> i wouldn't say better per se
14:56:12FromDiscord<shadow.> depends on what you need
14:56:18FromDiscord<shadow.> but i find winim to be quite nice
14:57:20PMunch@shadow, or you know: toSeq(lines("dictionary.txt")).filterIt(it.isValid)
14:57:26FromDiscord<shadow.> smh
14:57:31FromDiscord<shadow.> filter(isValid)
14:57:39FromDiscord<shadow.> but that's slower
14:57:45FromDiscord<shadow.> that iterates and turns into a seq
14:57:45PMunchIs it?
14:57:49FromDiscord<shadow.> then iterates again and filters
14:57:54FromDiscord<shadow.> you needa construct twice
14:57:59PMunchFair
14:58:05FromDiscord<shadow.> microoptimizations but still
14:58:17PMunchBut yeah, still so much shorter in Nim
14:58:23FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2IqF
14:58:30PMunchAnd the fun part is, you can still do it the verbose Java way if you want to
14:58:36FromDiscord<shadow.> exactly yeah
14:58:39FromDiscord<shadow.> using `streams` or something
14:59:30PMunchOh well, I've gotta run
14:59:33*PMunch quit (Quit: leaving)
14:59:42FromDiscord<shadow.> i should probably try writing that program in like elixir, haskell, or f# because it's kinda made for fp, but still
14:59:45FromDiscord<shadow.> ah, have fun!
14:59:58FromDiscord<dom96> I started using Nim when I was like 14, that was 11 years ago 😄
14:59:59*e_ joined #nim
15:00:08FromDiscord<shadow.> same
15:00:09FromDiscord<shadow.> that was uh
15:00:11FromDiscord<shadow.> a month ago
15:00:14FromDiscord<shadow.> lol
15:00:43PrestigeI consistently forget Nim isn't a super new language
15:00:48*e__ joined #nim
15:00:52*Guest35837 quit (Ping timeout: 246 seconds)
15:01:01FromDiscord<shadow.> it's actually quite old yeah
15:01:09FromDiscord<shadow.> i mean nimrod has been around since what, like 2004?
15:01:12FromDiscord<shadow.> and then nim was 2006?
15:01:14FromDiscord<shadow.> or am i remembering wrong
15:01:20Prestige2005 I thought, could be wrong
15:01:32FromDiscord<dom96> It wasn't public until 2008
15:01:37PrestigeAh
15:04:38*e_ quit (Ping timeout: 256 seconds)
15:05:44FromDiscord<trippleA> Does my nimble project have to be on github to be used with the nimble package manager?
15:06:20FromDiscord<mratsim> no
15:06:27FromDiscord<mratsim> any git works
15:06:33FromDiscord<mratsim> some are on Gitlab
15:06:55FromDiscord<dom96> you can also use mercurial
15:11:42FromDiscord<trippleA> If I made a program in nim, how portable is that across linux distros?
15:13:35*xet7 quit (Quit: Leaving)
15:13:44FromDiscord<dom96> Depends on what your program is doing, if it's not depending on external DLLs then the only problem you will have is with glibc
15:13:59FromDiscord<dom96> so you will support whatever distros have a newer glibc than the one you're building on
15:14:30FromDiscord<trippleA> So I should intentionally build my nim programs on a old linux distro?
15:15:11FromDiscord<dom96> Yeah, you can do that or build statically with musl
15:15:29FromDiscord<dom96> we do that for choosenim https://github.com/dom96/choosenim
15:17:32*xet7 joined #nim
15:18:35*Q-Master joined #nim
15:20:34FromDiscord<lqdev> or uh
15:20:45FromDiscord<lqdev> just include this header in your project 😂 https://github.com/liquid600pgm/memrecall/blob/master/src/ext/force_link_glibc_2.23.h
15:20:53FromDiscord<lqdev> works for me™
15:21:27FromDiscord<mratsim> there is this "old linux distro" that Snaps package (or AppImage?) use to make sur ethat the snap works on all distros
15:21:58FromDiscord<dom96> even if you build on older glibc's though, you will still run into those that are running musl-based distros
15:22:14FromDiscord<dom96> Linux is a minefield 😄
15:22:35FromDiscord<mratsim> musl-based distro? whaaaaaat?
15:22:37FromDiscord<trippleA> musl-based are so uncommon that it's not something to worry about. glibc is the de-facto standard.
15:23:42FromDiscord<dom96> depends entirely on your use case
15:23:46FromDiscord<dom96> for choosenim it was a problem https://github.com/dom96/choosenim/issues/216
15:23:46FromDiscord<mratsim> we have started to distribute our precompiled application to hundreds (thousands?) of people in November December, for now we don't have any compat issues
15:23:47disbotchoosenim does not work on Linux with musl ; snippet at 12https://play.nim-lang.org/#ix=2zpU
15:30:24*abm quit (Quit: Leaving)
15:34:12FromDiscord<trippleA> What does nim do with the donations it gets? Is the spending made public?
15:40:54*tane joined #nim
15:42:13*e__ quit (Ping timeout: 264 seconds)
15:44:39FromDiscord<mratsim> it pays for 3 core devs full-time
15:45:05FromDiscord<mratsim> well at least the Status donations
15:45:18FromDiscord<mratsim> not sure about the individual ones.
15:45:37FromDiscord<mratsim> I assume part of Fosdem expenses.
15:46:04*e__ joined #nim
15:46:10*Jesin quit (Ping timeout: 256 seconds)
15:48:11Zevvall the beers
15:48:15Zevvprosit guys, well deserved
15:51:15FromDiscord<dom96> opencollective makes what happens to donations public
15:51:46FromDiscord<dom96> the rest is likely spent on one-off bounties for features here and there, but Araq would need to answer that
15:52:19FromDiscord<dom96> Personally I would like to see more transparency, but that might just be me
15:59:09FromDiscord<dom96> Thoughts welcome, I decided to keep it short. Feel free to post the questions you've written above @mratsim .↵https://github.com/nim-lang/RFCs/issues/304
15:59:10disbotCompleting the Nim async/await implementation
16:00:11FromDiscord<mratsim> Na people paid for their own beers though some offered for the table.
16:00:35FromDiscord<mratsim> I gues this year we save on the swag budget as well
16:01:41FromDiscord<dom96> Still amazes me when I remember that that FOSDEM was this year
16:02:01FromDiscord<dom96> Feels like it couldn't have happened this year, we really got in there just before the shit really hit the fan
16:08:52ZevvThere were the first few people with masks in the halls already
16:09:03*e__ quit (Remote host closed the connection)
16:09:28*e__ joined #nim
16:17:16*mipri left #nim (#nim)
16:31:00*rockcavera joined #nim
16:55:32*habamax_ joined #nim
16:56:01*habamax_ quit (Client Quit)
16:58:11*regreg joined #nim
16:59:48FromDiscord<shadow.> wait who are the 3 core devs?
16:59:52FromDiscord<shadow.> im going to assume one is araq lmao
17:00:27*natrys joined #nim
17:03:13FromDiscord<exelotl> ar1q, ar2q and ar3q
17:04:53FromDiscord<shadow.> oh right of course
17:05:33FromDiscord<shadow.> `(1..3).mapIt("ar" & $it & "q)`
17:06:00FromDiscord<shadow.> (edit) ""q)`" => ""q")`"
17:06:21FromDiscord<bark> alpine and void
17:06:36FromDiscord<bark> (edit) "void" => "some void-based builds"
17:06:46FromDiscord<bark> (edit) "alpine and some void-based builds ... " added "and probably some gentoo guys and LFS guys too"
17:06:59FromDiscord<bark> (edit) "and" => "(and" | "(andprobably some gentoo guys and LFS guys too ... " added "who will want to install your program from source anyways)"
17:07:28FromDiscord<bark> I wonder if alpine based docker containers are running musl 🤔
17:08:42FromDiscord<Vindaar> but even in void (a distribution that actively promotes musl as an alternative option) the percentage of void users is really small I think
17:11:15FromDiscord<bark> they still build all packages for musl too tho
17:12:30FromDiscord<bark> so wait, if I build something with musl, it'll run on glibc systems?
17:18:02*oprypin quit (Quit: Bye)
17:22:18*FromGitter quit (Remote host closed the connection)
17:25:37*oprypin joined #nim
17:25:49*FromGitter joined #nim
17:27:25FromDiscord<Vindaar> if you statically link musl it'll run, because then it doesn't have any dynamic runtime dependencies
17:27:47FromDiscord<Vindaar> static linking is just easier for musl than for glibc afaik
17:39:57FromDiscord<Clyybber> 😂
17:43:16*e__ quit (Ping timeout: 265 seconds)
17:44:08*Gustavo6046 quit (Ping timeout: 258 seconds)
17:44:36*Jesin joined #nim
17:45:21disruptekmratsim: there's no re-alloc of cps's stack; its various states are computed at compile-time and folded together into a single type. there's code to separate the types according to need, but i think it's a bad idea to impl that "optimization" in this particular way.
17:46:43*Gustavo6046 joined #nim
17:47:49*rockcavera quit (Remote host closed the connection)
17:48:24*rockcavera joined #nim
17:49:57*rockcavera quit (Remote host closed the connection)
17:50:48disruptekobjectively speaking, it probably /does/ make sense to move closure iterators out of the compiler.
17:51:26FromDiscord<Quibono> How hard would it be to make a superset of Nim that was dynamically typed?
17:51:39disruptekdom96: if you think CPS is of dubious value, that's kinda on you. i doubt many people are going to try to convince you otherwise.
17:51:49*regreg quit (Remote host closed the connection)
17:52:17*regreg joined #nim
17:52:31*rockcavera joined #nim
17:58:59*abm joined #nim
17:59:11FromDiscord<shadow.> @Quibono
17:59:16FromDiscord<shadow.> `sudo apt-get install python3.9`
18:00:05FromDiscord<shadow.> then just use nimport
18:00:05FromDiscord<shadow.> LOL
18:06:53*e__ joined #nim
18:07:26*mipri joined #nim
18:09:07*e joined #nim
18:09:30*e is now known as Guest3603
18:10:56*e__ quit (Ping timeout: 240 seconds)
18:13:49FromDiscord<haxscramper> It should be fairly trivial to provide some dynamically typed wrapper on top of an application core implemented in nim - something like https://github.com/kanaka/mal/blob/master/impls/nim/types.nim#L16, and each wrapped proc would implement conversion from dynamically typed objects into nim ones
18:15:36FromDiscord<Recruit_main707> is it me or pushing sometimes doesnt work?
18:15:40FromDiscord<haxscramper> Though I'm not sure if this can be called a proper "superset", even if you reuse all parsing code, semantics would be really different
18:15:42FromDiscord<Recruit_main707> pushing pragmas
18:17:21FromDiscord<Recruit_main707> sent a code paste, see https://play.nim-lang.org/#ix=2IrV
18:17:24disrupteki've been meaning to figure out why i cannot push off conversion-to-self pragmas.
18:26:20FromGitter<bung87> I see some parser module accept stream as input, I have a source that provide async apis , but stream need implements sync methods
18:28:46FromGitter<bung87> guess I need maping parser's sync calls to async call
18:32:40*mbomba joined #nim
18:42:08*Jesin quit (Quit: Leaving)
18:43:31*Jesin joined #nim
18:54:02*vsantana quit (Quit: leaving)
18:58:23ZevvPff man, I find this years survey pretty hard. I tried to cheat and look at narimirans or pmuncha answers,
18:58:42Zevvbut theyre not up yet. guess they are stuck too
18:59:02mipritry dynamic programming
19:00:39FromDiscord<haxscramper> Rough prototype for enum thing from yesterday - https://gist.github.com/haxscramper/558f470dff55dbb3b09fce7cf92e2e74
19:02:38*hnOsmium0001 joined #nim
19:08:21*e_ joined #nim
19:12:13*Guest3603 quit (Ping timeout: 264 seconds)
19:17:08*voidpi quit (Remote host closed the connection)
19:22:06narimiranZevv: pro tip: if you take "i don't use nim" path, the questions are much easier (and fewer)
19:22:44*habamax quit (Ping timeout: 272 seconds)
19:24:04Zevvoooh dang. you are one *smart* man, I never would have made that up myself
19:29:08FromDiscord<mratsim> the "I never donated to Nim but i will" and "I never donated to Nim and I won't ever" are missing a "I never thought about it" :p
19:29:42Zevv"I choose to never think about it"
19:30:27disruptek"what would make your company adopt nim?"
19:30:33disruptek"my company adopting me."
19:31:14FromDiscord<sealmove> hahah good one
19:31:57disruptekmy nephew just asked if i'm envious that he has a copy of cyberpunk.
19:31:58FromDiscord<sealmove> @mratsim indeed, I thought the same
19:32:13FromDiscord<sealmove> and you replied?
19:32:21disruptekgo fuck yourself, douchebag.
19:32:29FromDiscord<sealmove> :< harsh
19:34:13disrupteki'm just kidding.
19:34:25disruptekhe used the word `jealous` incorrectly.
19:36:47disruptekwhat am i missing here?
19:36:49disruptek!rfc effects
19:36:50disbotquery failed 😢
19:36:54disruptek!rfc effect
19:36:54disbotquery failed 😢
19:36:59disruptekc'mon...
19:37:43disruptekhttps://github.com/nim-lang/RFCs/issues/302
19:37:45disbotEffect System: Tags that are disallowed by default, and blocking tag propagation ; snippet at 12https://play.nim-lang.org/#ix=2Isn
19:39:33Araqit's one of these days...
19:39:46Araqstrs_v2.nim, tested to death, right?
19:39:57Araqturns out it's buggy
19:40:23Araqembarrassing code
19:40:47disruptekour tests aren't very good, honestly.
19:40:57disruptekthey don't test real programs.
19:41:10Araqwe're getting there
19:41:23Araqand I remember how hard it was to get tstrutils to work with valgrind
19:41:24disruptekonly by creating real programs and adding them to the test suite.
19:41:34disruptekmy libgit2 wrapper doesn't work with cpp+arc.
19:41:44disruptekit doesn't work with clang.
19:41:50Araqyou know my answer
19:42:00disruptek it doesn't solve the problem with compiler codegen.
19:42:32Araqcpp+arc is a special snowflake
19:44:47*regreg quit (Ping timeout: 272 seconds)
19:46:10disruptekthat's what my README says: if you're on osx or using arc+cpp, you're sol.
19:47:34ZevvAraq: you can throw it all out, except for my lines.
19:48:07AraqZevv, yeah, I already fired the guy who wrote it
19:48:19Zevvaw.
19:48:24Zevvand seqs_v2?
19:48:26Araq(I'm kidding, I did this to myself)
19:48:39Zevv(I know)
19:48:52Araqseqs_v2 is not affected
19:48:57Zevvgood
19:49:11Zevvthey share the same genes
19:49:15Zevvsome
19:49:33Araqmaybe I was drunk when I wrote it
19:49:40Zevvwhy, it's not *that* bad
19:49:55Araqmaybe I should drink something so that I can understand my former thoughts
19:50:05ZevvI've heard good stories about absynth
19:50:37Zevvbut what will take its place then?
19:50:51AraqI'm patching it
19:51:04Araqdisruptek, my araq-ic4 branch is now in devel
19:51:14Araqtime to rebase your branch once again
19:51:31Araqand ideally you only add code that isn't used so that all tests are green
19:51:33Araq:P
19:53:16*vicfred quit (Ping timeout: 240 seconds)
20:00:06*Q-Master quit (Ping timeout: 272 seconds)
20:10:37disrupteknah.
20:10:49disrupteki don't care about ic anymore.
20:11:26disruptekyou have my work product; if it helps, great.
20:12:48*antranigv quit (Quit: ZNC 1.8.2 - https://znc.in)
20:13:14FromDiscord<lqdev> ooh cool new IC progress
20:13:38FromDiscord<lqdev> Araq: any news on when it'll be ready for testing on devel? i'm quite excited
20:14:14FromDiscord<bark> is there any place where I can view other AoC submissions from the past in nim and compare mine 🤔
20:14:19FromDiscord<bark> maybe there should be a repo
20:14:26*antranigv joined #nim
20:14:28FromDiscord<bark> that people fork and add their aoc's to
20:15:05FromDiscord<trippleA> Is using the x11 library required if I want to make a GUI?
20:15:17Araqlqdev: I'll let you know. I hoped to have something showable for Christmas
20:15:36FromDiscord<kodkuce> https://media.discordapp.net/attachments/371759389889003532/789224295938654238/2020-12-17_211517.png
20:15:40Araqbut the progress was slower than anticipated, as usual
20:15:51FromDiscord<kodkuce> is game dave desktop programs( gui ) xD
20:15:53Araqand the lockdown doesn't help, children around me, crying
20:15:55FromDiscord<lqdev> yeah i know that almost too well :p
20:16:07Araqwell, not crying.
20:16:09Araqscreaming.
20:16:10FromDiscord<lqdev> the slower than expected development part
20:16:43FromDiscord<lqdev> i only have an older sister at home, though my younger cousing might come during christmas so i'll have to cope with that.
20:16:50FromDiscord<lqdev> wait not older
20:16:52FromDiscord<lqdev> younger
20:17:09FromDiscord<lqdev> my brain is not working anymore, i should just go to sleep.
20:17:37FromDiscord<lqdev> anyways, good luck with IC
20:17:43FromDiscord<haxscramper> No, there are cross-platform GUI toolkits - see https://github.com/nim-lang/Nim/wiki/Curated-Packages#gui
20:18:22FromDiscord<haxscramper> ~gui
20:18:23disbotno footnotes for `gui`. 🙁
20:18:35FromDiscord<haxscramper> ~gui is https://github.com/nim-lang/Nim/wiki/Curated-Packages#gui
20:18:35disbotgui: 11https://github.com/nim-lang/Nim/wiki/Curated-Packages#gui
20:19:16disruptek~gui is a useful starting point for investigation Nim GUI options
20:19:17disbotgui: 11https://github.com/nim-lang/Nim/wiki/Curated-Packages#gui
20:19:17disbotgui: 11a useful starting point for investigation Nim GUI options
20:19:28disruptek~gui is a useful starting point for investigating Nim GUI options
20:19:29disbotgui: 11https://github.com/nim-lang/Nim/wiki/Curated-Packages#gui
20:19:29disbotgui: 11a useful starting point for investigating Nim GUI options
20:20:15FromDiscord<haxscramper> Is to possible to get list of all available footnotes?
20:20:27disruptek~disbot
20:20:28disbotdisbot: 11a bot that will message you usage instructions if you say `~help`. if you're on discord or gitter, you're shit outta luck -- get a real client. -- disruptek
20:20:46disruptekthere's a disbot data repo.
20:20:49disruptek!repo disruptek/disbot
20:20:49disbothttps://github.com/disruptek/disbot -- 9disbot: 11disbot data 15 0⭐ 0🍴
20:21:03*haxscramper joined #nim
20:21:05disruptekit stores the footnotes.
20:21:06haxscramper~help
20:22:02FromDiscord<trippleA> Can making a web browser in nim be possible?
20:22:13disrupteksure, but it's pointless.
20:23:17Araqwhat does [backport] mean? backport to every version that makes sense. or backport to latest release?
20:23:34FromDiscord<haxscramper> I think GTK has webview, so you could probably create something like `qutebrowser`
20:24:10FromDiscord<haxscramper> Not chome/firefox level though, at least not as a single-sane-person project
20:24:52FromDiscord<trippleA> Would it be possible to make a nim compiler in nim?
20:25:00FromDiscord<haxscramper> we have one
20:25:15FromDiscord<haxscramper> !repo nim
20:25:16disbothttps://github.com/nim-lang/Nim -- 9Nim: 11Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority). 15 10518⭐ 1121🍴 7& 29 more...
20:26:46*regreg joined #nim
20:27:18ZevvWait what
20:27:25disruptekyou're blowin' my mind right now.
20:27:35disrupteklook at all that cutlery.
20:27:42Zevv:)
20:27:42disruptekhow come i've never seen this before?
20:27:51haxscramperWhat
20:28:04*Q-Master joined #nim
20:28:31FromDiscord<Daniel> http://ssalewski.de/gtkprogramming.html
20:29:59ZevvThat is one elaborate writeup
20:32:04ForumUpdaterBotNew thread by Ward: Nim interact with Windows .NET Frameworks, see https://forum.nim-lang.org/t/7265
20:33:01FromDiscord<ajusa> does anyone here use vim with nim along with the quickfix window? I can't get it to parse the nim errors for some reason
20:33:30*Q-Master quit (Ping timeout: 268 seconds)
20:42:25FromDiscord<ajusa> https://github.com/zah/nim.vim/issues/63 appears to be what I'm dealing with, but it doesn't have a solution 😦
20:42:26disbotQuickfix Formatting for Jumping to Errors
20:43:18FromDiscord<Daniel> what are assemblies? ...assembly code?
20:43:28FromDiscord<trippleA> Evaluating as nimscript file failed with error: undecared identifier 'name'
20:46:40disruptekajusa: use neovim and alaviss/nim.nvim
20:47:51FromDiscord<pietroppeter> In the forum AoC mega thread you will see link to past mega threads which contain links to repos with solutions for past years
20:47:56FromDiscord<Daniel> (edit) what are assemblies? ...assembly code?↵In context of "Loads assemblies in .dll or .exe: OK"
20:49:37*fanta1 quit (Remote host closed the connection)
20:50:52FromDiscord<ajusa> disruptek: I am using neovim (didn't specify that earlier) and will try that plugin, thanks!
20:53:07miprihttps://docs.microsoft.com/en-us/dotnet/standard/assembly/
20:56:28*narimiran quit (Ping timeout: 246 seconds)
20:58:31FromDiscord<trippleA> How would I go about making command line options where the program does certain things depending on how you started it?
21:01:12mipriimport os; paramStr, etc. If you're not doing anything unusual though, use cligen
21:01:46FromDiscord<mratsim> cligen or confutils
21:06:09FromDiscord<bark> oh really cool
21:10:54FromDiscord<trippleA> How can I get a value from a function and then assign it to a variable?
21:11:22miprilet v = f()
21:12:03FromDiscord<trippleA> Thank you
21:18:41*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
21:18:49*Q-Master joined #nim
21:18:59*pbb joined #nim
21:31:32FromDiscord<shadow.> do you need the result to be mutable?
21:31:53FromDiscord<shadow.> `var` - mutable variable↵`let` - immutable variable↵`const` - compile time constant
21:38:21*lritter quit (Quit: Leaving)
21:47:34*natrys quit (Ping timeout: 246 seconds)
21:52:26*regreg quit (Ping timeout: 268 seconds)
21:55:49*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
21:57:02*pbb joined #nim
21:57:03FromDiscord<haxscramper> To wrap default function arguments from C++ I would have to generate two overloads - direct wrapping for C++ one (no values, `importcpp`) and second is nim wrapper that has all necessary default values specified
21:57:10FromDiscord<haxscramper> Or there is a better way to do this
22:00:22*natrys joined #nim
22:00:57disruptekyou can't do this using the import patterns?
22:01:45FromDiscord<Sendell> is there a way to build a const variable without using a named proc ? example : https://play.nim-lang.org/#ix=2Ith
22:02:04FromDiscord<Sendell> i tried with a block: but it's not working :/
22:02:59FromDiscord<sealmove> compiletime pragma?
22:03:09disruptekall consts are compileTime.
22:03:17FromDiscord<Sendell> yeah i know
22:03:23*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
22:03:31disrupteki don't have the bandwidth for the playground. what exactly is the problem?
22:03:46*pbb joined #nim
22:04:23FromDiscord<sealmove> Sendell for your example there is the collect macro
22:04:24FromDiscord<Sendell> what i'm looking for is a syntactical trick to initialise a complex const field without having to use a named function
22:04:26FromDiscord<sealmove> from sugar module
22:04:49FromDiscord<Sendell> "variable" not "field"
22:05:02FromDiscord<sealmove> https://nim-lang.org/docs/sugar.html#collect.m%2Cuntyped%2Cuntyped
22:05:24haxscramperdisruptek: what exactly do you mean? I though about something like `std::unordered_set(#, std::hasher())`, but I'm pretty sure this is not going to work
22:05:34disruptekso why can't you use a block?
22:05:36haxscramperAnd I have no other ideas
22:05:51disruptekhttps://play.nim-lang.org/#ix=2Itk
22:05:55FromDiscord<Sendell> that's what i first thought of, but didnt work
22:05:59FromDiscord<Sendell> maybe i did something wrong
22:06:16FromDiscord<InventorMatt> @Sendell is this what you are thinking of https://play.nim-lang.org/#ix=2Itl
22:06:27FromDiscord<Sendell> oh that's exactly what I want
22:06:35FromDiscord<Sendell> Don't know what i did wrong when i tried
22:06:37FromDiscord<Sendell> thanks guys
22:06:51FromDiscord<Sendell> happy to know it should work 🙂
22:06:54*kenran quit (Quit: leaving)
22:07:28FromDiscord<Sendell> nice hint too, didn't know about it
22:07:44disruptekhaxscramper: i dunno, exactly; i think the pattern syntax for cpp is pretty comprehensive, but maybe i've overlooked something.
22:08:05haxscramperThe easies way would be to leave handling of default arguments for backend, but then it means I either need to provide one overload for each default argument, but that means you can't use `arg = value()` from nim anymore
22:09:00disrupteki think you probably do want to wrap the proc so that you can use named arguments from nim even for unnamed arguments. if that makes sense.
22:09:11disruptekie. there are subtle semantics that you want to capture automatically.
22:09:40haxscramperSo I need to somehow make `void cpp_func(int a = 12, int b = 2)` be callable as `cpp_func(12, 3)`, `cpp_func(b = 2)`, `cpp_func(12)` and so on.
22:11:13haxscramperhttps://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/include/bits/unordered_set.h#L221
22:11:18haxscramperAnd the like
22:17:12FromDiscord<Sendell> I found what was wrong but it seems weird. If the const is inside a proc/func scope, then i can't use a block to initialise it. example: https://play.nim-lang.org/#ix=2Itt
22:17:44haxscramperI guess the best option would be to just wrap things as-is - e.g. create default arguments on nim side, without any additional overloads.
22:17:52FromDiscord<Sendell> this does not work, while this https://play.nim-lang.org/#ix=2Itu do work
22:18:14FromDiscord<shadow.> disruptek you should rly get your wifi fixed if you dont have enough bandwidth for github or playground lmfao
22:18:30disruptekthanks.
22:19:18FromGitter<jrfondren> Sendell: https://github.com/nim-lang/Nim/issues/12172
22:19:20disbotError in const block inside proc ; snippet at 12https://play.nim-lang.org/#ix=2Itw
22:20:59FromDiscord<Sendell> oh ok
22:21:17FromDiscord<Sendell> so is it like a 1 year old bug ? or expected behavior ?
22:22:23haxscramperThough for this particular case it seems like I would have to figure out how to wrap function objects and deal with default template values on top of that.
22:23:18haxscramperCould someone please go back in time and tell Bjarne that he'd better implement nim instead of C++
22:24:21FromDiscord<Sendell> We're blessed that Andreas did implement Nim instead of C+++ 🙂
22:24:41FromDiscord<exelotl> Every now and then I see a video in my recs that's like "Why I invented C++"
22:24:54FromDiscord<exelotl> And I'm just like, why Bjarne
22:24:59FromDiscord<exelotl> Why did you do it
22:25:28haxscramperI think that nim is what C++ should've been from the start - instead of piling shit on top of C, with abstraction just **flooding** everywhere
22:26:02haxscramperLike, conflating arrays with pointers, or this horrible macro system
22:26:06haxscramperAnd so on
22:26:26FromGitter<awr1> @trippleA should be relatively portable
22:27:59FromGitter<awr1> the issue i've sometimes had with getting the same library under different name to work sometimes in C/C++, which is sometimes solved by autoconf. in nim if you run into the same issues you can tweak with the dynlib searching
22:31:30FromGitter<awr1> i feel like nim couldn't have gotten started without being informed by the advancements and issues other languages had faced
22:31:54FromGitter<awr1> c++ had to struggle for nim to be able to fly
22:32:08disruptekif it's so great, where are the users?
22:32:42FromGitter<awr1> that's the unfortunate end of it
22:32:53FromGitter<awr1> C++ was attractive for people used to C
22:33:26*e__ joined #nim
22:34:10FromGitter<awr1> now the industry is dominated by it and even the most successful C++ "competitors" are still kinda pushed aside
22:35:30*e joined #nim
22:35:50FromDiscord<Recruit_main707> most people tell me they thing nim is not bad, but theyd rather learn c++ or something else they might use in the future for working
22:35:53*e is now known as Guest97173
22:35:54FromDiscord<Recruit_main707> think
22:36:14disruptekexactly. it's not better enough.
22:37:14FromDiscord<Recruit_main707> socialism is bad and people still think its the solution :P , sometimes, its about the people and not the quality
22:37:16*e_ quit (Ping timeout: 246 seconds)
22:37:58disruptekso what's your point? nim is the right language at the wrong time?
22:38:05*e__ quit (Ping timeout: 240 seconds)
22:38:55haxscramperWell, I don't think it is realistically possible to actually compete with C++
22:38:57haxscramperBut
22:39:04FromDiscord<Recruit_main707> thats a way of seeing it, its not the perfect one, its better than the current options
22:39:13haxscramperWhat **is** possible is to try and take advantage of it's ecosystem
22:39:39FromDiscord<Recruit_main707> embrace the failure and move one
22:39:42disrupteksure, but there are more popular languages that can do that.
22:39:46haxscramperLike, if you say to someone "let's rewrite this in nim", they are most likely say something like "and why"
22:40:02haxscramperBut if you are able to just plug-in nim on top of your C++ code
22:40:15disruptekthen you have to manage two languages instead of one.
22:40:33haxscramperWell, otherwise I have to manage one language from scratch
22:40:43disruptekyou had to manage it, anyway.
22:41:23haxscramperThere is no such thing that doesn't have to be managed
22:42:02haxscramperBut my point is - if it is simple enough to add Nim to C++ codebase, then chances are better
22:42:38disruptekno doubt. but the cost of using two languages is not zero. and the cost of using a less-used language is clearly greater than that of a well-used language.
22:42:42haxscramperI mean, C++ devs are already jumping around this whole ecosystem made out of dozens of build/configuration systems, each having their own semantics etc.
22:42:50disruptekFFI is not the hard part.
22:43:02haxscramperFFI is the easy part, yes
22:44:33haxscramperBut my idea with clang is exacly this - not just 'wrap for FFI' and be done with it. This is basic and unavoidable necessity
22:44:58FromDiscord<Recruit_main707> The hard part is the people that think brackets add readability and that semicolons are useful, etc, etc, and those who don’t like these things, but will use c++ anyway
22:45:13haxscramperBut I hope to extract as much semantics information from C++ code, and reuse it to make transition to nim seamless.
22:45:23haxscramperas seamless as possible*
22:45:30disruptekyes, but why?
22:46:04disruptekif i'm making a purchasing decision, i would rather have rust & c++ than nim & c++.
22:46:14disrupteki don't give a single fuck about FFI ease.
22:46:34FromDiscord<Recruit_main707> Current Nim users will find it useful, even if no c++ users consider it another reason to switch to Nim
22:46:55haxscramperrust & C++ as in 'we had C++ codebase and decided to adopt rust in addition to that'?
22:47:00FromDiscord<Recruit_main707> Why rust & c++
22:47:13disruptekbecause it's an obvious choice over nim & c++.
22:47:24haxscramperQuestionable statement
22:47:36haxscramperActually, let me rephrase
22:47:37FromDiscord<Recruit_main707> Bc people use it so it must me good I guess then
22:47:57disruptekpeople use it, so it's an acceptable product.
22:48:15disruptekcoders are available. i don't care how hard it is for them. more will be minted soon enough.
22:48:26FromDiscord<exelotl> > the cost of using a less-used language is clearly greater than that of a well-used language.↵This is why I still haven't finished the Nim survey
22:48:32FromDiscord<exelotl> It's hard to find a helpful answer to "How could we help make Nim more accepted at your company?"
22:48:55FromDiscord<Recruit_main707> Create your own company, there ya go
22:48:58haxscramperThe statement has just as much as answer to abstract question of'what language is better'. But if we are consideding rust ecosystem vs nim ecosystem
22:49:11FromDiscord<exelotl> lol I'm getting there x)
22:49:12haxscramperThen yes, the question is obvious
22:50:18disruptekthe point is, you cannot merely compare these languages on their technical merits or comfort.
22:50:24*Vladar quit (Ping timeout: 268 seconds)
22:50:28haxscramperYes, nobody questions that
22:50:28disruptekso what if nim is nicer to use? "i don't care."
22:50:29FromDiscord<Recruit_main707> disruptek, since you are representing the problematic business man who doesn’t give a shit about the language, there is no way of arguing against c++ then
22:50:50disruptekno, c++ is an easier language for rust to compete against.
22:51:13disrupteknim is simply not /better enough/.
22:51:42disrupteki'm not sure it ever will be.
22:52:47haxscramperThen we need to increase number of developers that know nim, especially ones that came from C++.
22:52:50haxscramperFor example
22:53:02FromDiscord<Recruit_main707> That’s debatable, it is good enough if a company would make the trade off of learning curve - efficiency when coding and ease of maintenance
22:53:13haxscramperWe can decrease learning curve
22:53:38haxscramperBy putting more efford to sway C++ developers on the nim side
22:54:30disruptekthe resources aren't there. the programmers aren't there. the ecosystem isn't there. the tooling isn't there. the performance is comparable. the safety is comparable. the power is comparable. the portability is comparable.
22:54:41haxscramperI'm not sure, but rust was probably first adopted by enthusiasts and only then by other companies. But this is just a speculation
22:54:55disruptekit doesn't really matter.
22:55:29FromDiscord<Recruit_main707> haxcramper, afaik, it started with Firefox directly
22:55:31haxscramperIt matters a little, but not that much, I can agree with that
22:55:51disruptekour quality is worse. this is a major detractor.
22:56:11FromDiscord<Recruit_main707> I think the ecosystem is there
22:56:12haxscramperBut programmers are result result of tooling, resources etc.
22:56:23disrupteksure, but i don't care.
22:56:23haxscramperObviously
22:58:15haxscramperBut convenient C++ interop is still a plus on tooling side
22:58:41FromDiscord<Recruit_main707> AND the ecosystem
22:58:51disruptekit's not better enough.
22:58:52haxscramperYeah, EEE approach on C++
22:59:01disruptekand the ecosystem is worse, obviously.
22:59:10haxscramperdisruptek: yes and yes
22:59:59disruptekyou know what i'm dealing with right now?
23:00:17disrupteka template that i inexplicably cannot inject a variable into.
23:00:28*tane quit (Quit: Leaving)
23:01:01disruptekthe stuff just needs to work. when it doesn't work, i need some help from something that can tell me why.
23:01:09*natrys quit (Quit: natrys)
23:01:42disruptekmetaprogramming only makes sense when the abstraction is tight.
23:01:46disruptekotherwise, it's a lie.
23:02:20disruptekotherwise, i cannot use it.
23:02:36disruptekotherwise, it's a risk.
23:02:37FromDiscord<Recruit_main707> How can the ecosystem be worse when you can access the whole c++ ecosystem + the Nim one
23:02:52haxscramperEcosystem is not only amount of features
23:02:56disruptekbecause with rust, you get the same benefits plus a broader, deeper ecosystem.
23:03:21haxscramperIt is a combination of features, stability guarantees, community etc.
23:03:33disruptekyou get a package manager that works well enough that tools frequently can have hundreds of dependencies safely. reliably. robustly.
23:03:45disruptekno one worries about dependencies in rust.
23:03:59FromDiscord<Recruit_main707> Do we in nim?
23:04:05disruptekno one gives a shit that the compiler is slow, really. it's not a hindrance to adoption.
23:04:18disruptekyou think anyone gives a fuck about IC in the rustbelt?
23:04:23disrupteknaw, dawg.
23:04:24haxscramperAs disruptek said above - in two of three week I would be able to just wrap any C++ shit that is layin on github, but this worth nothing
23:04:31haxscramperIf things just blow up on you
23:05:07disruptekwe do worry about dependencies in nim.
23:05:14disruptekyou know why? because they are burdensome.
23:05:25Zevvunderstatement
23:05:42haxscramperHaven't had any major issues
23:05:58haxscramperThough I only depend on my own trash mountain
23:06:00disruptekthat's because my code is one of your few dependencies.
23:06:53FromDiscord<Recruit_main707> Neither have I, do you mean they affect compilation times, disk space, or that they are plain garbage
23:07:30disruptekintroducing dependencies is unreliable.
23:07:57disruptekone cannot rely upon them working, getting pulled in correctly, getting specified correctly, getting into the build correctly, and so on.
23:08:13disruptekit's all the same shit; i cannot restate it in many new ways...
23:10:06disruptekrecruit: when you compile your largest project, how many lines of nim does the compiler say it built?
23:10:17FromDiscord<Recruit_main707> A ton
23:10:25disruptekthat many?
23:10:34FromDiscord<Recruit_main707> I can’t check rn
23:10:39disruptekguess.
23:11:31Zevv100k
23:11:32FromDiscord<Recruit_main707> i really don’t know, I can be off by thousands
23:11:53FromDiscord<Recruit_main707> If zevv’s 100k I’ll say 20k
23:12:19haxscramperI don't know which one is the largest, but nimtrs has 190K for one tests
23:12:52haxscramperOh, 270K
23:13:15FromDiscord<Recruit_main707> (As a side comment, we had a conversation about package managers, you preferred the go way of doing things? Or that was kurx)
23:13:24miprinever even noticed that line count.
23:13:39FromDiscord<speckledlemon> the point is that the LOC is huge, no?
23:13:58haxscramperAnd `hcparse` I'm working on compiles half a million lines
23:14:30FromDiscord<Recruit_main707> LOC? (I’m shutting down as we speak, bare with me)
23:14:37disruptekkinky.
23:14:45FromDiscord<speckledlemon> lines of code, sorry
23:14:53FromDiscord<Recruit_main707> Thx
23:16:03FromDiscord<Quibono> Disruptek what was the point, just that you’ve coded more
23:16:10mipricomically my day 1 Advent of Code program is the largest at 45k LOC compiled. re, strutils, strformat, os. strutils is pretty much the only module I kept using out of those
23:16:22disrupteki'm just curious what these opinions are based upon.
23:17:28haxscramperAbout necessity of IC?
23:17:51FromDiscord<Recruit_main707> There is something I don’t understand, if Nim has all this issues, that make it so useless compared to c++ and rust, why does t the all mighty disruptek use those Langs instead, whose ecosystem is so much better (and that’s not sarcastic, I think you are an excellent programmer)
23:18:06disrupteki would rather write nim.
23:18:17FromDiscord<Recruit_main707> Why though
23:18:33disruptekbecause i'm not very good at this shit and i find nim easier to read.
23:18:45disruptekthat's important to me, because i rarely know what the fuck is going on.
23:19:16mipri88k here... 704k LOC for moe, the vi-like editor...
23:19:37FromDiscord<Quibono> So how do we fix imports in Nim?
23:19:54FromDiscord<Recruit_main707> You can’t say you are not very good nor that you don’t know what’s going on when your libs are some of the best ones out there
23:20:05disruptekas hard as it is to write code, i want to write less of it and read more of it, understanding all of it.
23:20:09mipridisruptek says there's some kind of unreliability in them getting imported at all.
23:20:30disrupteki challenge you to find a lib of mine that someone uses.
23:20:35disruptekother than scramper, of course.
23:20:54disruptekhe got hoodwinked by gram.
23:21:16miprinobody uses frosty?
23:22:30FromDiscord<Recruit_main707> I have used golden
23:22:31disruptekone person, to my knowledge, uses frosty.
23:22:32disruptekaside from myself, i mean.
23:23:11haxscramperActually, to be hones, it would help to put things on nimble, however bad it might be
23:23:18mipria 'depending on maintainer' view would be a nice addition to nimble.directory, although looks like most of your stuff isn't on nimble.
23:23:26FromDiscord<Recruit_main707> I would use frosty if I needed it, or json, but right now I need flatbuffers
23:23:27disruptekgolden is defunct afaic, but okay; it's not a library and hyperfine is a superior impl of essentially the same concept. golden never met its goals.
23:23:38FromDiscord<Recruit_main707> jason
23:23:41FromDiscord<Clyybber> disruptek: put it on nimble then it will get users
23:24:03disruptekif you can't find my work or it doesn't help you, i'm fine with that.
23:24:12disrupteki'm not getting paid for this shit.
23:24:27FromDiscord<Clyybber> are you also fine with a PR adding your pks to nimble?
23:24:31disruptekthere's no fucking way that i'm going to help promote nimble, of course.
23:24:51disruptekyou can add my shit to nimble, of course; that's your right.
23:25:21disruptekanyone that is merely looking in nimble to find packages really shouldn't be using my stuff.
23:25:28disruptekit's not designed for that level of programmer.
23:25:29FromDiscord<Recruit_main707> > So how do we fix imports in Nim?
23:25:51FromDiscord<Clyybber> disruptek: I'm calling it nimble but I'm referring to the pkglist
23:25:57disrupteki know.
23:25:59FromDiscord<Clyybber> which is not tied to nimble
23:26:07FromDiscord<shadow.> i use frosty for sockets disruptek
23:26:10disruptekyeah, it's a stupid idea.
23:26:24disruptekshadow.: for what?
23:26:34disrupteki don't even have socket tests. would you like to PR some?
23:26:37leorize[m]you should really write an rfc for a better package manager at one point
23:26:44disrupteki mean, really...
23:26:49FromDiscord<shadow.> i was making a remote desktop thingy in nim and sending the mouse coordinates and whatnot over netty was really easy with frosty
23:27:01FromDiscord<shadow.> just freeze and thaw
23:27:07disruptekif you use netty, don't you think you should use flatty?
23:27:11FromDiscord<shadow.> ehhh
23:27:31FromDiscord<shadow.> idk
23:27:31FromDiscord<shadow.> lol
23:27:33FromDiscord<shadow.> i saw frosty first
23:27:57disruptekmaybe i should just make cargo work for nim and call it good.
23:28:01*Guest97173 quit (Ping timeout: 268 seconds)
23:28:30disruptekhow hard could it be?
23:28:46FromDiscord<speckledlemon> that is preferable
23:28:46FromDiscord<Recruit_main707> I’m gonna say a lot
23:28:52FromDiscord<Recruit_main707> I’m surprised the main/only reason you use Nim is readibilty
23:29:01disruptekshadow.: so, two people use frosty in a capacity that it is untested. 😁
23:29:01FromDiscord<Quibono> Disruptek isn’t criterion yours or currently maintained by you?
23:29:08*haxscramper left #nim ("ERC (IRC client for Emacs 27.1)")
23:29:11disruptekyes.
23:29:14FromDiscord<Recruit_main707> I’ll check cargo to see what makes it so special compared to nimble
23:29:23FromDiscord<shadow.> oh right i also use jason
23:29:34FromDiscord<Quibono> I use criterion
23:29:42disruptekblame lemonboy.
23:29:56disrupteki've never seen his equal, in terms of programming talent.
23:30:02disruptekthat fucking guy /gets it/.
23:30:09FromDiscord<shadow.> jason is spicy as well just saying
23:30:16FromDiscord<shadow.> ive also tried dim it was very easy to pick up
23:30:23disruptektrue that.
23:30:30*lmariscal joined #nim
23:30:35disrupteki've heard it's among the easiest languages to learn.
23:30:42FromDiscord<shadow.> the fact that dim has more stars than any of my repos is quite humbling
23:30:52FromDiscord<shadow.> to be fair i havent made a single useful repo so
23:30:55FromDiscord<shadow.> i guess it makes sense lol
23:30:56mipricargo has a website (and also a good website: lib.rs) with an API, and you can push newly developed crates to it from the command line. the PR system of adding packages to nimble is weird and slow, although at least you can use unpublished modules just fine.
23:31:20FromDiscord<shadow.> https://github.com/shadowninja55/integer-compression↵i suppose this was kinda cool albeit sort of niche
23:31:23*lmariscal quit (Client Quit)
23:31:36disruptekrecruit: why do you use nim?
23:32:37disruptekdon't get me wrong: cargo is merely the best of the worst package managers.
23:33:00disruptekbut as such, it has a lot to teach nim.
23:33:25FromDiscord<Quibono> So how does one make a package manager?
23:33:27FromDiscord<Quibono> Let’s do dis
23:34:01disrupteki've written a lot about what you have to do.
23:34:31disruptekabout 5k lines, i guess.
23:34:32*lmariscal joined #nim
23:34:49*lmariscal quit (Client Quit)
23:35:06FromDiscord<shadow.> didn't you make nimph?
23:35:08*mfiano quit (Ping timeout: 256 seconds)
23:35:11FromDiscord<shadow.> last i checked that was doing well
23:35:17disruptekoh yeah, real good.
23:35:35FromDiscord<shadow.> didnt you say build failing was only bc of github being stupid
23:36:00disrupteknah, it's some nimterop bullshit as per usual.
23:36:10FromDiscord<shadow.> ahh rip
23:36:27disruptekit works for some people. doesn't work in my weird cloud environment.
23:36:46FromDiscord<Quibono> So if you’ve written a good package manager what’s the problem with Nim?
23:36:57disruptekscroll up.
23:36:57FromDiscord<Recruit_main707> disruptek, I essentially wanted a statically typed, compiled python, found Nim, which met that requirement at first glance, and I really like the way it did most things, found out a lot of python features I was used to weren’t necessary for me
23:37:09FromDiscord<Clyybber> @Quibono he's just in a mood
23:37:34disruptek"the problem with nim"
23:37:49FromDiscord<Quibono> @Clyybber he’s always in a /mood/ but this is like someone is peeing in his Cheerios while he eats them.
23:38:02*lmariscal joined #nim
23:38:09FromDiscord<Clyybber> yeah, but its just :disruptek: : )
23:38:13disruptekwe were talking about the survey and why people don't use nim.
23:38:17*lmariscal quit (Client Quit)
23:38:26disrupteki'm making comparisons to rust.
23:38:45FromDiscord<Recruit_main707> From an average biased point of view
23:39:02disruptekof course i'm biased.
23:39:15disrupteki have some intimacy with nim's compiler and none with rust's.
23:39:29disrupteki have some intimacy with a nim package manager and i'm merely a happy user of rust's.
23:39:30FromDiscord<Quibono> Lol I’m a new Nim user, there just aren’t any like big libraries to make me be like “oh dang I can use X” if I use Nim
23:39:40disrupteki have some intimacy with nim's ecosystem and i'm merely a happy user of rust's.
23:39:50disruptekdo you see where i'm going with this?
23:40:20FromDiscord<Recruit_main707> I meant the arguments you were saying against using nim were the ones a person that knows little about Nim would say
23:40:31disruptekhow do you figure?
23:40:35disruptekgive me an example.
23:40:39FromDiscord<Quibono> That you’re happy when you’re not intimate?
23:40:41FromDiscord<Recruit_main707> (edit) "saying" => "giving"
23:40:44mipriQuibono: and that, rather than package managers or IC or whatever the long C++ bashing was about, is what you want if you want more Nim users. Make stuff.
23:41:15disruptekmaking stuff isn't enough.
23:41:18FromDiscord<Quibono> Mipri I’m making a wrapper for alpaca for that reason already.
23:41:40disruptekpeople have made stuff for crystal, and you know what? i don't give a shit about that, either.
23:41:57mipriwhat have people made for Crystal?
23:42:01disruptekwho cares?
23:42:08FromDiscord<Recruit_main707> lol
23:42:10FromDiscord<Clyybber> disruptek: damn, stupidly stripping the .typ makes it trip too
23:42:11mipriyou shouldn't have to care. If someone made something, you'd know.
23:42:23PrestigeIs there a way with nimble or nymph to install specific package versions as deps? Like, different versions of the same package, for different projects
23:42:24disruptekclyybber: that's too simple a fix, anyway.
23:42:37disruptekprestige: no, for "reasons."
23:42:41PrestigeSomething that's seen and used in the js world
23:42:43FromDiscord<Clyybber> disruptek: Yeah, but I mean I'm already excluding sym and literals
23:42:46Prestigereasons?
23:42:55FromDiscord<Clyybber> disruptek: The issue is I'm stripping it from a call
23:42:57disruptekreasons of diamond dependency breaking.
23:42:59FromDiscord<Clyybber> which is what should be done
23:43:03mipriRuby - puppet, Rails (rip). Python - ML and big data libraries, Django (rip). JS - every website framework. the MEAN stack (please rip already)
23:43:22Prestigedisruptek: ah. I think that would be something useful in the future, users would ask for
23:43:22FromDiscord<Clyybber> disruptek: But unfortunately that causes expected x but got void
23:43:33disruptekmipri: we have arraymancer and weave and no one gives a shit.
23:43:42disruptekit's not /better enough/.
23:43:44FromDiscord<Clyybber> you don't give one
23:43:50FromDiscord<Clyybber> never talk for others
23:43:57disruptekfine.
23:44:02FromDiscord<Recruit_main707> I don’t know what puppet nor rails is
23:44:11disruptekyou're not missing anything.
23:44:50disruptekdespite arraymancer and weave existing, i have not noticed a huge uptick in adoption.
23:45:03disrupteki'm speaking for myself, here.
23:45:33disruptekclyybber: why doesn't it get sem'd?
23:45:54FromDiscord<Clyybber> disruptek: digging into it as we speak
23:46:00FromDiscord<Recruit_main707> disruptek, I’m not saying you don’t have a point with all of this, but you are expecting too much from a small project driven by enthusiasts, Nim needs time to mature, it has reached its 1.0 version relatively recently, it won’t become the trend in just a year or two
23:46:03disruptekprestige: it's poor engineering practice. not something we want to promote.
23:46:36PrestigeTo not allow certain versions for dependencies?
23:46:41disrupteki'm just telling it like it is. i'm not sharing any expectation at all.
23:47:03disruptekwe don't want to permit multiple versions of the same package in a single project.
23:47:21disruptekwe want a flat namespace and a single version per dependency.
23:47:29Prestigenah, not the same project
23:47:53disruptekwell, nimph lets you do the same operators for package versions as cargo.
23:48:06PrestigeI mean if package foo is used in two different projects, but allow to use foo 1.0 or foo 1.2
23:48:07disruptekdepend on tags, branches, refs, versions, whatever the fuck.
23:48:10FromDiscord<Recruit_main707> Then yeah, nim in its current state it’s not ready to substitute c++ at a big scale
23:48:16PrestigeNice, that's good to hear
23:48:50disruptekprestige: that's merely "localdeps" in nimble. nimph supports any number of nimblePath specifications, local deps, whatever you want.
23:49:36disruptekbut let's not talk about nimph, unless it's to discuss nimph-3.0.
23:49:40disrupteki don't want mipri to feel bad.
23:50:12FromDiscord<Recruit_main707> I still don’t see a major difference between nimble and cargo, except the package uploading
23:50:30disrupteki'm sure a lot of people feel that way.
23:50:41mipri*shrug*, multiple versions in the same project is going to have to happen at some point, there's just too much friction in denying it as dependency trees get more complex, but it's not a big problem right now.
23:51:26Prestigeidek a use case for multiple versions in the same project, seems very weird
23:51:29disruptekit can be done in a safe way but whether it /should/ be done is an open area for research, afaic.
23:51:59disruptekit's not an issue at present because no one is willing to suffer dependencies in the first place.
23:52:19mipriPrestige: you use BigLibrary. BigLibrary uses Little1 and Little2. Both of those libraries depend on CrapUtils. CrapUtils has breaking updates on occasion and Little2, a regularly updated library, tracks them. Little1, a rarely updated library, lags in the version of CrapUtils that it can compile with.
23:52:37leorizego solved this pretty nicely tbh
23:52:37mipriPrestige: the simple solution is that Little1 and Little2 get their own CrapUtils and neither BigLibrary nor your code cares.
23:52:49disruptekyes, nimph-3 will be pragma-based, only.
23:52:52Prestigemipri: ah, that is a good point
23:53:22disruptekit's "simple" until you have semantic differences between identical types.
23:53:55leorizego just forces incompatible versions to take on different names
23:54:09disruptekthis doesn't solve the type problem.
23:54:21leorizeit does
23:54:26disruptekespecially when, as we expect, the future brings symbols that follow types.
23:54:33leorizepkg_v1.A != pkg_v2.A
23:54:46disruptekwe don't have any way to do this in the compiler.
23:54:59leorizewell I'm just saying how go does it
23:55:04leorizeforcing different names
23:55:17disruptekyeah, go gets packaging correct as far as that goes. so to speak.
23:55:50FromDiscord<Quibono> Okay guys let’s move to go
23:55:58Prestigegod no lol
23:56:07disruptekit gets shit on a lot here, but there's a lot to like.
23:56:21FromDiscord<dom96> Rust handles this scenario too. I think Nim will need to eventually too.
23:56:38FromDiscord<Clyybber> go's handling makes sense
23:56:58FromDiscord<Clyybber> and nim could already do it afaik
23:57:01FromDiscord<Clyybber> (edit) "afaik" => "afaict"
23:57:07FromDiscord<Clyybber> no compiler changes required
23:57:25leorizewell go strapped the compiler and the package manager together
23:57:29leorizemaybe that's the way to go
23:57:29disruptekno, because type identity is signature-based and signatures don't include versions or even symbol names.
23:58:01disruptekwhatfer generic compression reasons and FFI.
23:58:42disruptekbut anyway, we talked about building the pm into the compiler but araq is in favor of keeping it separate and, in particular, it has to be network-connectivity-agnostic.
23:58:47disruptekso, that's annoying.
23:58:56FromDiscord<Clyybber> its not annoying its sane
23:59:07disruptekwhy have a separate executable?
23:59:36disruptekthat's all i mean by that.
23:59:39FromDiscord<dom96> The compiler could use a better awareness of what a package is. But otherwise a separate tool is the way to go.
23:59:46disruptekbecause why?