00:03:58 | * | ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
00:28:43 | FromGitter | <gogolxdong> Which vscode plugin is better for Nim? nimsuggest exhausts memory so I have to disable. |
00:29:28 | FromDiscord | <Clyybber> disruptek: I don't think typed as a return type for a macro makes much sense |
00:29:37 | FromDiscord | <Clyybber> or rather typed meaning "don't check this its okay" |
00:30:03 | FromDiscord | <Clyybber> maybe untyped should mean "don't check this immediately" |
00:30:57 | FromDiscord | <Rika> vscode plugins use nimsuggest |
00:34:09 | FromDiscord | <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:51 | FromDiscord | <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:01 | FromDiscord | <InventorMatt> Status has done a job posting here before |
00:43:57 | * | lritter quit (Ping timeout: 268 seconds) |
00:52:55 | FromDiscord | <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:28 | FromDiscord | <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:06 | FromDiscord | <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:20 | FromDiscord | <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:32 | mipri | https://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:15 | disruptek | clyybber: right; untyped can't be checked right away. |
01:45:46 | FromDiscord | <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:21 | mipri | oh, that you can enforce |
01:50:58 | mipri | [T: proc] works |
01:51:24 | FromDiscord | <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:48 | FromDiscord | <acek7> hey nerds |
02:22:10 | FromDiscord | <Rika> hello nerd |
02:22:34 | FromDiscord | <acek7> how are the fellow nerds of the world |
02:36:10 | FromDiscord | <Rika> Am learning C89 for fun |
02:36:26 | FromDiscord | <Rika> Things really were simpler back then |
02:38:08 | * | klaufir_ quit (Ping timeout: 260 seconds) |
02:39:35 | FromDiscord | <acek7> im still tryna learn nim |
02:39:41 | FromDiscord | <acek7> and programming in general |
02:39:43 | FromDiscord | <acek7> been busy with work |
02:40:33 | disruptek | C89 was pretty fun, honestly. |
02:42:41 | FromDiscord | <acek7> what does C89 look like |
02:45:49 | FromDiscord | <Rika> Kinda like normal c but not really |
02:45:56 | FromDiscord | <Rika> There's a few major differences |
02:47:39 | FromDiscord | <acek7> what are you making with it |
02:50:12 | disruptek | compiler errors. |
02:58:15 | FromDiscord | <Rika> Lol |
02:58:18 | FromDiscord | <Rika> Random stuff |
03:05:42 | ForumUpdaterBot | New 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:57 | FromDiscord | <Gyllou> anybody ever use any of the intel xeon phi line? coprocessor or otherwise? |
03:09:03 | * | muffindrake joined #nim |
03:11:18 | FromDiscord | <Gyllou> i know, taboo to mention the p word, but still jw |
03:17:04 | FromDiscord | <Daniel> i think there are 2 many programming languages today, its a jungle |
03:22:38 | FromDiscord | <Gyllou> agreed, i wish people would put more work into existing languages rather than makign a new one |
03:23:11 | FromDiscord | <Gyllou> im betting we abandon python in another 8-10 years if nobody ever fixes the GIL clusterfuck |
03:23:49 | disruptek | 10 years seems like a long time. i think i started with python in 98. |
03:23:51 | disruptek | i can't really imagine going back to it. |
03:24:24 | FromDiscord | <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:41 | FromDiscord | <Gyllou> dask, numba, occasionally cython keep python going for the rest of us |
03:24:53 | disruptek | you're probably right. |
03:25:21 | * | Jesin joined #nim |
03:25:23 | FromDiscord | <Gyllou> i know alot of people in data science that think learning java would be like the most monumental undertaking |
03:25:36 | FromDiscord | <Gyllou> and thats java |
03:25:48 | FromDiscord | <Gyllou> but they are short changing themselves |
03:25:56 | disruptek | i'm not sure nim is different enough from rust to ever made headway there. |
03:26:15 | FromDiscord | <Gyllou> yea im concerned about that, i really am not a fan of rust though |
03:26:37 | FromDiscord | <Gyllou> i would probably just fall back on C at that point |
03:27:06 | disruptek | eh it's annoying but it's not as bad as C was. |
03:27:28 | disruptek | i see modern C and it's pretty tolerable, but still... the new languages bring a lot to the table. |
03:27:41 | FromDiscord | <Rika> idk lifetimes are just way too much for me |
03:28:04 | FromDiscord | <Gyllou> yea, crystal looked promising, but idk if itll survive the night so to speak |
03:28:09 | FromDiscord | <Gyllou> what do you mean? |
03:28:29 | FromDiscord | <Rika> too much brain power needed to think about lifetime annotations |
03:28:35 | FromDiscord | <Gyllou> ohhh |
03:29:12 | FromDiscord | <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:29 | FromDiscord | <Gyllou> soon we will have a vm that compiles to the jvm that compiles to machine code |
03:29:50 | FromDiscord | <Gyllou> bc apparently the jvm is too hard for people |
03:30:03 | disruptek | i feel that, but abstractions let us fracture the tech and specialize optimizations, etc. |
03:30:06 | FromDiscord | <Rika> ~~llvm~~ |
03:31:02 | FromDiscord | <Gyllou> abstractions are good i agree, i just think that there is sometimes abstraction that loses more than it gains |
03:31:44 | FromDiscord | <Gyllou> (edit) "is" => "are" |
03:31:55 | FromDiscord | <Gyllou> i havent messed with llvm much tbh |
03:32:14 | FromDiscord | <Gyllou> i did back when i didnt know wth i was even using |
03:33:08 | FromDiscord | <Gyllou> derp i have used it, just without realizing |
03:33:55 | FromDiscord | <Gyllou> i wish i had a cloud access to a xeon phi to test out the avx 512 performance on it |
03:34:03 | FromDiscord | <Gyllou> i dont wanna buy one |
03:34:31 | disruptek | why can't you rent one? |
03:35:11 | FromDiscord | <Gyllou> i suppose i could find a vendor for that, couldnt find cloud access tho |
03:35:32 | disruptek | kinda surprising. |
03:35:42 | FromDiscord | <speckledlemon> are you aware that the Xeon Phi is a dead platform? |
03:35:46 | FromDiscord | <Gyllou> i didnt give it a good try though |
03:35:51 | FromDiscord | <Gyllou> lol yes im very aware |
03:35:58 | FromDiscord | <speckledlemon> ok, just making sure |
03:36:07 | FromDiscord | <speckledlemon> they do seem very, very cool though |
03:36:12 | FromDiscord | <Gyllou> yea, dead or not i wouldnt need any "support" from them anyways |
03:36:43 | FromDiscord | <Gyllou> yea, i wish they would have continued it to some extent |
03:36:52 | FromDiscord | <speckledlemon> you're probably best off finding one on eBay...I'm still thinking about it |
03:36:57 | FromDiscord | <Gyllou> now that market will be taken up by arm and SVE2 |
03:37:34 | FromDiscord | <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:00 | FromDiscord | <Gyllou> avx 512 is like the only thing intel has going for it right now |
03:38:40 | * | pbb joined #nim |
03:39:11 | FromDiscord | <Daniel> you know already avx512 isnt rly wide used, altho not sure why |
03:39:14 | FromDiscord | <Daniel> probably expensive |
03:39:36 | FromDiscord | <Gyllou> yea, from my exerience with avx2 its not user friendly |
03:39:50 | FromDiscord | <speckledlemon> mratsim can probably comment but the benchmarks for avx512 are not good |
03:40:21 | FromDiscord | <Gyllou> we have a specific algorithm that would perform well on some avx512 enabled boards |
03:40:30 | FromDiscord | <Gyllou> otherwise yea, meh |
03:40:34 | FromDiscord | <Gyllou> gimme dem cores |
03:40:45 | FromDiscord | <Daniel> altera will |
03:40:57 | FromDiscord | <Gyllou> yea thats another option |
03:41:15 | FromDiscord | <Gyllou> once sve 2 comes out, ill consider going that way if the benches are good enough |
03:41:40 | FromDiscord | <Gyllou> 2048 vector lengths? yes, i think i will have a scoop of that |
03:41:53 | disruptek | heh |
03:42:23 | FromDiscord | <Gyllou> but mainly its the variable length thats nice, because then you dont have to stretch or chop it to fit |
03:42:41 | FromDiscord | <Gyllou> we'll see though, don't want to speak to soon |
03:42:49 | FromDiscord | <Gyllou> (edit) "to" => "too" |
03:43:40 | FromDiscord | <Gyllou> i have to design a space tentacle |
03:43:46 | FromDiscord | <Gyllou> im excited about it |
03:44:29 | FromDiscord | <Gyllou> i should probably get back to doing my cad fml tho |
03:49:07 | disruptek | a what? |
03:49:18 | disruptek | manipulator arm? |
03:53:12 | FromGitter | <awr1> is there even any consumer-level arm hardware with SVE |
03:53:48 | FromGitter | <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:31 | Prestige | disruptek: hello. |
05:53:29 | disruptek | sup chucklehead |
05:54:08 | Prestige | writing a talk about OO for work, you? |
05:56:20 | Prestige | throbbing, I suppose |
06:06:01 | * | habamax joined #nim |
06:18:16 | * | audiofile joined #nim |
06:25:31 | * | a_chou joined #nim |
06:25:48 | FromDiscord | <mratsim> The first Status Nim developers got hired through Reddit. Which is also a very good story to tell :p |
06:26:55 | FromDiscord | <mratsim> @Gyllou AVX512 support was very messy as well: https://github.com/flame/blis/issues/352 |
06:26:56 | disbot | ➥ Workstation SKX is mis-identified |
06:38:24 | * | a_chou quit (Quit: a_chou) |
06:44:10 | * | fanta1 joined #nim |
06:46:07 | ForumUpdaterBot | New 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:43 | Zevv | disruptek: we still have the non-cpsable for loop, right? |
07:30:11 | * | klaufir_ joined #nim |
07:31:22 | FromDiscord | <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:20 | FromDiscord | <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:31 | FromDiscord | <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:18 | FromDiscord | <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:33 | FromDiscord | <Rika> nice |
07:42:52 | FromDiscord | <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:44 | FromDiscord | <mratsim> And it would be necessary if we want those to be usable on embedded. |
07:55:22 | * | Q-Master joined #nim |
08:01:44 | FromDiscord | <mratsim> @Zevv does cpsMutant has any advantage? |
08:02:16 | FromDiscord | <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:41 | FromDiscord | <mratsim> open the extension and deactivate nimsuggest |
08:03:51 | FromDiscord | <Ricky Spanish> ah ok will try thanks @mratsim |
08:04:01 | FromDiscord | <mratsim> and complain here: https://github.com/nim-lang/RFCs/issues/300 |
08:04:02 | disbot | ➥ Developer tooling |
08:06:48 | FromDiscord | <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:50 | FromDiscord | <Ricky Spanish> ok it seems to be a process called "rg" and nim suggest thast are the issues |
08:07:19 | FromDiscord | <mratsim> rg is ripgrep it's what VScode use to grep the code, it shouldn't be long lived. |
08:07:41 | FromDiscord | <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:52 | FromDiscord | <Ricky Spanish> mostly after i save it happens |
08:08:17 | FromDiscord | <mratsim> your experience in that thread would be valuable. |
08:08:28 | FromDiscord | <Ricky Spanish> ok ill write a post thanks |
08:11:52 | FromDiscord | <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:22 | FromDiscord | <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:32 | FromDiscord | <ElegantBeef> @Ricky Spanish you can try the nimlsp addon which uses the LSP with nimsuggest instead of rg |
08:16:45 | FromDiscord | <ElegantBeef> (edit) "rg" => "straight nimsuggest" |
08:17:08 | FromDiscord | <mratsim> Yeah rg is part of core vscode. |
08:17:23 | FromDiscord | <Ricky Spanish> ok thanks will give that a try but yeh atleast its not the nim extension then |
08:38:51 | Zevv | mratsim: 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:39 | Zevv | The environment is in the concept; the continuation is an inheritable ref object with a member .fn that is a continuationProc[Continuation] |
08:41:08 | Zevv | so right, the CPS code creates the environment from lifted locals |
08:41:34 | FromDiscord | <mratsim> sent a long message, see http://ix.io/2Ios |
08:41:47 | Zevv | yes |
08:42:00 | FromDiscord | <mratsim> so I assume the environment is not mentioned becaue it can be empty. |
08:43:03 | FromDiscord | <mratsim> so while waiting for isolated, to make them threadsafe I would change them to ptr object of RootObj. |
08:43:57 | Zevv | hm 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:58 | FromDiscord | <mratsim> or just plain object and leave the allocation details to the scheduler |
08:44:07 | Zevv | The latter |
08:44:24 | FromDiscord | <mratsim> but plain object means we need to MaxSize the environment |
08:44:45 | Zevv | Hm that is not nice as well |
08:44:45 | FromDiscord | <mratsim> I assume Araq would want those to work on embedded as well, we can't with ref objects. |
08:44:59 | Zevv | why not? |
08:45:16 | Zevv | oh embedded-without-heap |
08:45:22 | FromDiscord | <mratsim> dynamic allocation is often only allowed at program startup. |
08:45:34 | Zevv | no, but calling that "embedded" is a bit 90's :) |
08:46:11 | Zevv | Could we make stuff hibrid so it will run with ptr and/or ref? |
08:46:26 | Zevv | so defined the concept as `ptr object or ref object` |
08:46:38 | FromDiscord | <mratsim> I think we can. |
08:46:49 | Zevv | because 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:19 | FromDiscord | <mratsim> not sure about the "ref object of RootObj" though. |
08:47:38 | Zevv | we had various implementation of this, and a lot of discussion |
08:48:07 | FromDiscord | <mratsim> I mean, not sure if we can use foo is ref object of RootObj or foo is ptr |
08:48:23 | Zevv | IMHO 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:41 | FromDiscord | <mratsim> Then for multithreading, i think I only need to replace trampoline |
08:48:57 | Zevv | right, that is the whole point. Note that CPS does not know or care what a trampoline is |
08:49:08 | Zevv | disruptek is a stubborn guy and put all that stuff in this repo |
08:49:11 | Zevv | but it should _not_ be here |
08:49:22 | Zevv | CPS does not call, trampiline, schedule, yield, or whatever |
08:49:27 | FromDiscord | <mratsim> that's OK, it gives a bird eye vie |
08:50:14 | Zevv | but 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:27 | FromDiscord | <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:37 | Zevv | unfortunately, not yet |
08:51:10 | FromDiscord | <mratsim> i like there comparison with async/await vs suspend/resume |
08:51:14 | FromDiscord | <mratsim> their |
08:51:36 | Zevv | I'll try to make some time for that |
08:51:45 | Zevv | but I'm getting slurped into a lot of work these days |
08:52:28 | FromDiscord | <mratsim> yep, will look into it more later. |
08:54:31 | FromDiscord | <mratsim> what's the overhead on the semaphore btw? |
08:55:03 | Zevv | what semaphore? |
08:55:57 | FromDiscord | <mratsim> https://github.com/disruptek/cps/blob/73761e36452d85315b802237772bb7cc20536f1d/cps/semaphore.nim#L4-L9 |
08:56:33 | Zevv | I have no clue what he was thinking or doing there |
08:57:01 | FromDiscord | <mratsim> in the CPC paper they talk about semaphores |
08:57:10 | FromDiscord | <mratsim> for synchronization |
08:57:18 | Zevv | I think it's also not part of the CPS part itself |
08:57:24 | FromDiscord | <mratsim> but not sure why it's part of the core |
08:57:37 | Zevv | that directory mostly contains disrupteks event loop, scheduler, trampolines, etc |
08:57:40 | Zevv | mine are all in stash/ |
08:57:51 | Zevv | we had a bit of a funny workflow in this repo |
08:58:14 | Zevv | All my stash/ stuff is truly standalone, it only uses CPS and no evenloops, I/O wrappers, etc |
08:58:43 | FromDiscord | <mratsim> research is messy |
08:58:52 | Zevv | many fun things in life are |
08:59:03 | FromDiscord | <mratsim> I need to learn more about managing FD and kernel IO |
08:59:30 | FromDiscord | <mratsim> anyway the repo is clean and easy to follow even though it's messy 😉 |
08:59:41 | Zevv | yeah. Nim has this ioselector abstraction, which I personally do not like at all |
08:59:59 | Zevv | but 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:22 | FromDiscord | <mratsim> personally I'm worried about everything that use ref objects for such lowlevel primitives |
09:03:43 | FromDiscord | <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:10 | FromDiscord | <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:09 | FromDiscord | <mratsim> and for threading also you need to avoid ref. |
09:05:24 | Araq | as I wrote on the forum, the cost of ref over unique_ptr is a memory fetch |
09:05:53 | Araq | IME not worth the trouble, if you can avoid the 'ref' altogether that's much better |
09:06:09 | FromDiscord | <mratsim> I'm talking about avoiding ref altogether. |
09:06:15 | Araq | but replacing 'ref' with 'unique_ptr' never makes enough of a difference to bother |
09:06:23 | FromDiscord | <mratsim> but then you have those stackful/stackless concerns |
09:06:56 | FromDiscord | <mratsim> the nice thing about unique ptr is that they are very easy to memory pool instead of using Nim GC |
09:07:29 | Zevv | but this will add limitations that will all make other uses of CPS more cumbersome, right |
09:07:48 | Zevv | you can't just make yourself a quick iterator without going through all the bookkeeping |
09:08:02 | Araq | I don't see much value in memory pools either |
09:08:14 | Zevv | I just want arc to manage my memory, all the way |
09:08:18 | FromDiscord | <mratsim> I think you can avoid bookkeeping |
09:08:20 | Zevv | that's what it does best |
09:08:25 | FromDiscord | <mratsim> Weave does a lot of bookkeeping underneath |
09:08:30 | Araq | every allocator that is alive is heavily optimized for the "pooling" case already |
09:09:04 | FromDiscord | <mratsim> yet I get 2x (multithreaded) to 5x faster (single threaded) with Weave vs malloc. |
09:09:53 | FromDiscord | <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:20 | FromDiscord | <mratsim> anyway |
09:10:32 | FromDiscord | <mratsim> since those are concepts, the actual scheduler can fill in the blank |
09:10:36 | Araq | ok, can't argue against your numbers |
09:10:50 | Araq | I do wonder why you get these though |
09:11:27 | FromDiscord | <mratsim> sent a long message, see http://ix.io/2IoE |
09:12:11 | FromDiscord | <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:19 | Araq | I don't understand your question well enough to have a reply |
09:13:33 | Araq | escape analysis for 'dest = f()'? |
09:14:17 | FromDiscord | <mratsim> assume we have someone who does `let f = spawn(f(a, b))` |
09:14:45 | FromDiscord | <mratsim> spawn will return a future/flowvar or can be a continuation |
09:15:04 | FromDiscord | <mratsim> if f escapes its scope (used as a return value) we have to heap allocate. |
09:15:21 | FromDiscord | <mratsim> if it does not, we can `alloca` it |
09:15:48 | FromDiscord | <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:12 | Araq | seems easy enough to have |
09:20:20 | Araq | but I worry about alloca |
09:20:38 | Araq | you can always run out of stack space and p |
09:20:49 | Araq | a large part of async's point is to nuke the stacks |
09:21:37 | FromDiscord | <mratsim> because continuation are tail calls, when you continue you replace the previous one |
09:22:12 | FromDiscord | <mratsim> Zevv has even a version of continuation that mutate in place |
09:23:08 | FromDiscord | <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:10 | FromDiscord | <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:03 | Zevv | mratsim: the idea was that for the continuation we do one single alloc before the initial call |
09:25:21 | Zevv | that contains the lifted locals as they come and go, potentially re-using the same memory locations |
09:25:29 | Zevv | just as the stack would have if the function was not CPS'ed |
09:25:40 | Zevv | the same memory block lives as long as the continuations are "in flight" |
09:25:59 | Zevv | and 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:17 | FromDiscord | <mratsim> ah I see. But if continuations can be moved across threads i have to think it over. |
09:26:38 | Zevv | CPS itself does not care if this block is a ref or a ptr |
09:26:57 | Zevv | but 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:25 | FromDiscord | <mratsim> but how do you resize your frame with ARC? |
09:29:00 | FromDiscord | <mratsim> doesn't it always alloc a new one instead of reusing the same because the locals are different? |
09:29:01 | FromDiscord | <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:29 | FromDiscord | <nikki> does nim identifier matching also consider colour and color equal |
09:31:58 | FromDiscord | <ElegantBeef> Lol |
09:32:16 | FromDiscord | <ElegantBeef> I'm Canadian i use the proper spelling as much as i can 😛 |
09:33:12 | PMunch | @nikki, I wish it did.. |
09:33:54 | FromDiscord | <ElegantBeef> any case of `or` is equal to `our` would mean `if a our b` is valid 😛 |
09:35:18 | FromDiscord | <lqdev> uncle stalin would be proud |
09:35:38 | FromDiscord | <ElegantBeef> Shit lq i didnt know you had georgian ancestry |
09:37:45 | FromDiscord | <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:20 | FromDiscord | <mratsim> I use color but I tend to write behaviour ... |
09:49:06 | FromDiscord | <ElegantBeef> I've got an american accent i have to use Canadian english to distance myself |
09:56:53 | PMunch | Haha, smart |
10:00:19 | FromDiscord | <lqdev> analogue |
10:03:29 | FromDiscord | <ElegantBeef> Centre |
10:12:50 | Araq | I prefer the American spellings too, less bullshit |
10:13:36 | Araq | "behaviour", it's like they tried to enumerate all the vowels they have |
10:15:32 | * | waleee-cl joined #nim |
10:16:04 | narimiran | lol |
10:21:27 | FromDiscord | <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:40 | FromDiscord | <lqdev> i always read "centre" as if i was reading french or something |
10:24:47 | FromDiscord | <lqdev> centré |
10:31:19 | * | abm joined #nim |
10:38:56 | FromDiscord | <dom96> that's cool, but are they using Nim there? |
10:39:38 | FromDiscord | <mratsim> first Status Nim developers = coffeepots, zahary, yuriy and me |
10:40:35 | FromDiscord | <dom96> oh, wow, I way misread |
10:40:40 | FromDiscord | <dom96> Never mind lol |
10:40:46 | FromDiscord | <dom96> it's too early in the morning |
10:41:09 | FromDiscord | <mratsim> https://www.reddit.com/r/nim/comments/7i3n8y/hiring_nim_devs_for_ethereum_implementation/ |
10:41:15 | FromDiscord | <mratsim> This was the post |
10:41:56 | FromDiscord | <mratsim> made on Thursday Dev 7, 2017 |
10:42:00 | FromDiscord | <mratsim> dec |
10:43:25 | FromDiscord | <dom96> alloca for async/await would be cool |
10:43:48 | FromDiscord | <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:36 | FromDiscord | <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:41 | FromDiscord | <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:53 | FromDiscord | <mratsim> the gains are indeed extremely significant for short-lived function |
10:50:00 | * | lum joined #nim |
10:50:17 | FromDiscord | <mratsim> but in CPU-bound multithreading you can get away with malloc most of the time because function are usually costly. |
10:51:12 | FromDiscord | <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:32 | FromDiscord | <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:05 | FromDiscord | <mratsim> caveat: it's zero cost except for IOCP as those requires to own a buffer. |
10:52:27 | FromDiscord | <dom96> afaik Rust's implementation being "zero-cost" is a misnomer |
10:52:43 | * | lum joined #nim |
10:52:57 | FromDiscord | <Clyybber> CPS is improving async |
10:53:03 | FromDiscord | <dom96> but yes, I wanted to explore that path too |
10:53:04 | FromDiscord | <mratsim> wouldn't surprise me, their "data-race free" slogan is wrong as well. |
10:53:21 | FromDiscord | <Clyybber> and right now we are in the fix compiler bugs that block cps phase |
10:53:48 | FromDiscord | <dom96> @Clyybber how is it improving async? It's a brand new implementation |
10:54:19 | FromDiscord | <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:13 | FromDiscord | <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:38 | FromDiscord | <mratsim> so this might remove code from the compiler. |
10:56:59 | FromDiscord | <dom96> to me the CPS primitives are just a reimplementation of closure iterators |
10:57:25 | FromDiscord | <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:37 | FromDiscord | <mratsim> there are a couple difference I see. CPS properties are supported by theory. |
10:59:46 | FromDiscord | <mratsim> It's dispatcher/executor agnostic and so you can use an event loop, a threadpool on top |
11:01:14 | FromDiscord | <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:44 | FromDiscord | <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:01 | FromDiscord | <dom96> You could say that closure iterators are backed by theory too, they are a form of coroutines after all |
11:02:57 | FromDiscord | <mratsim> sure, then I don't know the internals of closure iterators so I can't tell you how they fall short. |
11:03:23 | FromDiscord | <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:36 | FromDiscord | <mratsim> I know that currently they suffer from 2 problems from a user perspective: very bad ergonomics, and slow due to allocation. |
11:03:54 | FromDiscord | <mratsim> from an implementer's perspective, I suppose Araq should detailed that in a RFC |
11:04:12 | FromDiscord | <dom96> Well, I'd love to see benchmarks that show they are slow and for which use cases. |
11:04:32 | FromDiscord | <dom96> I'm also not sure what is so bad about their ergonomics? |
11:04:42 | FromDiscord | <mratsim> https://github.com/mratsim/nim-project-euler/blob/master/src/lib/functional.nim#L26-L46 |
11:05:15 | FromDiscord | <mratsim> the function signature and how you declare the result is very cumbersome and prone to error |
11:05:50 | FromDiscord | <mratsim> and it's also slow compared to a for loop. |
11:06:06 | FromDiscord | <mratsim> iirc it wasn't just 2 or 3x slower. |
11:06:54 | FromDiscord | <dom96> I think it's important to do these evaluations in terms of async/await specifically |
11:07:10 | FromDiscord | <dom96> their ergonomics are largely hidden away and are just an implementation detail |
11:07:21 | FromDiscord | <dom96> as for the speed, we'd need a real IO use case to benchmark |
11:08:55 | FromDiscord | <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:26 | FromDiscord | <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:27 | FromDiscord | <mratsim> I think IO is certainly 70% of the story, but FP and chaining iterators is important as well |
11:10:08 | FromDiscord | <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:25 | FromDiscord | <mratsim> I don't think CPS mandates CSP. |
11:11:04 | FromDiscord | <mratsim> what's the explicit async IO? |
11:11:17 | FromDiscord | <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:36 | FromDiscord | <mratsim> disruptek as an example in the repo. |
11:11:40 | FromDiscord | <mratsim> has |
11:11:48 | FromDiscord | <dom96> in the context of CSP, with CSP your IO/threading is largely hidden away from you. |
11:12:10 | FromDiscord | <dom96> And as far as I have heard the push is towards CSP |
11:12:19 | FromDiscord | <dom96> hence the talk of function colors |
11:12:29 | FromDiscord | <mratsim> https://github.com/disruptek/cps/blob/master/stash/iteratorT.nim#L18-L41 this implements lazy infinite iterator ala Haskell. |
11:13:25 | FromDiscord | <mratsim> so you mean an executor model, with ex.spawn fn(a, b, c) or ex.async fn(a, b, c) |
11:13:26 | FromDiscord | <dom96> yeah, I would much rather push to improve the existing closure iterators |
11:13:39 | FromDiscord | <dom96> don't see why we have to start fresh to get nicer FP/chaining |
11:14:22 | FromDiscord | <mratsim> coroutines and cps can be implemented (?) each in terms of the other I think |
11:14:29 | FromDiscord | <dom96> It would be nice to explore the Rust model, where futures are explicitly polled. |
11:14:29 | FromDiscord | <mratsim> at least that's in the paper |
11:16:44 | FromDiscord | <mratsim> sent a long message, see http://ix.io/2Ipi |
11:18:46 | FromDiscord | <dom96> Nice set of articles. Interesting insight about cancellation. |
11:19:01 | FromDiscord | <dom96> Indeed, I would say that cancellation and future streams are the two things missing from Nim's async/await implementation |
11:19:38 | FromDiscord | <dom96> (a nice-to-have would also be the ability to await a spawned thread) |
11:20:23 | FromDiscord | <dom96> (and/or channel) |
11:23:03 | FromDiscord | <mratsim> but that can be solved with any channel providing `tryRecv` and a `poll()` loop around. |
11:23:48 | FromDiscord | <dom96> that's not efficient though |
11:23:56 | FromDiscord | <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:59 | FromDiscord | <dom96> ideally you want an FD you can epoll |
11:24:20 | FromDiscord | <dom96> there were efforts to implement this by @Zachary Carter IIRC |
11:25:17 | FromDiscord | <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:23 | FromDiscord | <Zachary Carter> I think it was maybe someone else |
11:25:51 | FromDiscord | <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:19 | FromDiscord | <dom96> oh yeah, sorry, it was rayman22201 |
11:26:26 | FromDiscord | <Zachary Carter> np! |
11:26:54 | FromDiscord | <dom96> what do you mean " it should cause problems in the type system, existing code, etc."? |
11:27:51 | FromDiscord | <mratsim> it's an AsyncChannel type that is isolated from the rest of the issues. |
11:28:22 | FromDiscord | <mratsim> async/await, coroutines, cps require suer program transformation |
11:29:16 | FromDiscord | <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:25 | FromDiscord | <mratsim> user program transformation |
11:30:24 | FromDiscord | <dom96> Okay, I feel like I'm missing a wider point you're trying to make 🙂 |
11:31:16 | FromDiscord | <mratsim> that we have less things to worry about for async channel |
11:31:59 | FromDiscord | <mratsim> File descriptor + buffer + synchronization primitives (+ some way to tie in to the dispatcher?) |
11:32:28 | FromDiscord | <dom96> ahh, sure, but in my mind the current Channel[T] in nim's stdlib is the synchronization primitive + buffer |
11:32:41 | FromDiscord | <dom96> we could wrap an AsyncChannel around it that is just Channel[T] + fd |
11:32:44 | FromDiscord | <mratsim> Nim channel needs a heavy facelifting |
11:33:02 | FromDiscord | <mratsim> but Araq is doing it this week i think |
11:33:21 | FromDiscord | <dom96> Oh really, cool |
11:33:30 | FromDiscord | <dom96> Then why not get integration with async while we're at it |
11:33:37 | FromDiscord | <mratsim> He asled me about my channel implementation on Monday |
11:33:50 | FromDiscord | <dom96> Do you think an FD per channel would work? |
11:33:57 | FromDiscord | <mratsim> there are differing concern, we need channel + async channel |
11:34:12 | FromDiscord | <dom96> AFAIK the complexity arose because we wanted to save FDs |
11:34:13 | FromDiscord | <mratsim> the basic threadpool does not need async but needs channel. |
11:34:30 | FromDiscord | <dom96> yep |
11:35:11 | FromDiscord | <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:17 | FromDiscord | <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:46 | FromDiscord | <dom96> did chronos get cancellation? |
11:43:17 | FromDiscord | <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:12 | FromDiscord | <mratsim> sent a long message, see http://ix.io/2IpD |
12:09:23 | FromDiscord | <mratsim> and yes cancellation. |
12:09:48 | FromDiscord | <mratsim> maybe completion vs readiness based futures. |
12:17:00 | ForumUpdaterBot | New thread by Hotcore: Help neede with IUP in Nim, see https://forum.nim-lang.org/t/7261 |
12:21:58 | FromDiscord | <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:07 | narimiran | NIM COMMUNITY SURVEY 2020: https://forms.gle/kEWvEeVyfxSHq9Uj8 |
12:28:58 | PMunch | Damn, next year I'll be in the 5 years + club :) |
12:29:01 | ForumUpdaterBot | New 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:56 | FromDiscord | <sealmove> "What features, tools, or libraries would you like Nim to have?" toughy |
12:33:57 | * | Cthalupa joined #nim |
12:35:19 | FromDiscord | <mratsim> easy coffee machine |
12:35:49 | FromDiscord | <sealmove> do we have anything for NoSQL similar to hadoop? |
12:36:01 | FromDiscord | <haxscramper> narimiran: what about https://github.com/nim-lang/Nim/issues/15855 |
12:36:02 | disbot | ➥ Nim community survey questions about compilation errors |
12:36:21 | FromDiscord | <haxscramper> Or it was decided to be not important enough? |
12:36:25 | narimiran | i haven't seen that issue until now |
12:36:33 | FromDiscord | <haxscramper> oh |
12:37:05 | PMunch | @sealmove Couchbase Lite has Nim wrappers |
12:37:40 | PMunch | https://github.com/couchbaselabs/couchbase-lite-C/tree/master/bindings/nim |
12:37:49 | FromDiscord | <haxscramper> well, I guess no error-related statistics then |
12:37:54 | narimiran | sorry |
12:40:34 | PMunch | "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:39 | FromDiscord | <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:28 | PMunch | Crap, I hit back on my mouse to go to the previous page, and it wiped my answers -_- |
12:41:48 | FromDiscord | <sealmove> you use a mouse? |
12:42:08 | FromDiscord | <sealmove> (joke) |
12:43:27 | PMunch | For clicking boxes on a website? Yes :P |
12:43:38 | PMunch | "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:56 | FromDiscord | <sealmove> maybe it allows you to leave it blank |
12:44:51 | FromDiscord | <sealmove> as learning resources really I only used Nim Manual, which is not listed |
12:45:03 | FromDiscord | <sealmove> it's not only nice for reference |
12:58:31 | ForumUpdaterBot | New 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:46 | FromDiscord | <sealmove> can a tuple def be recursive? (one of its field be of the same type)? |
13:03:04 | ForumUpdaterBot | New thread by FabienPRI: Dividing duration, see https://forum.nim-lang.org/t/7263 |
13:03:57 | narimiran | PMunch: you can skip all the questions that don't apply to you |
13:04:04 | PMunch | Yeah I realised |
13:16:57 | * | dddddd quit (Quit: dddddd) |
13:17:13 | * | dddddd joined #nim |
13:22:25 | FromDiscord | <Gyllou> Whats everyone's thoughts on avx 512? |
13:23:18 | FromDiscord | <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:29 | FromDiscord | <Gyllou> otherewise ill stick with epyc |
13:23:36 | FromDiscord | <Gyllou> (edit) "otherewise" => "otherwise" |
13:28:11 | FromDiscord | <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:00 | FromDiscord | <William_CTO> One of the best surveys I’ve filled out. Good job folks |
13:45:00 | FromDiscord | <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:45 | FromDiscord | <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:10 | FromDiscord | <mratsim> @Gyllou use AVX2 + Ryzen |
13:46:44 | FromDiscord | <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:22 | FromDiscord | <mratsim> I need to downclock by 600Mhz despite watercooling: https://github.com/numforge/laser/blob/master/benchmarks/system_profile_i9-9980XE.md |
13:47:58 | FromDiscord | <mratsim> Ryzen will give you way more core for the price and they caught up on IPC. |
13:48:21 | FromDiscord | <mratsim> only issue is poor MKL support but I think BLIS is not too bad. |
13:51:14 | ForumUpdaterBot | New 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:25 | FromDiscord | <haxscramper> If someone manages to answer this question we will get custom object unpackers for pattern matching in older nim versions. |
13:55:22 | FromDiscord | <mratsim> macro would work |
13:55:47 | FromDiscord | <mratsim> pretty sure I use that in Weave |
13:57:39 | FromDiscord | <haxscramper> If I remove `static` everything works, but the problem is - I need it to be `static` |
13:58:57 | FromDiscord | <mratsim> what if you use a macro instead of a template? |
13:59:27 | * | Q-Master quit (Ping timeout: 268 seconds) |
14:01:27 | PMunch | @haxscramper, this works: https://play.nim-lang.org/#ix=2Iqj |
14:09:41 | FromDiscord | <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:53 | FromDiscord | <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:44 | FromDiscord | <trippleA> How reliable is the official iup package? |
14:23:12 | FromDiscord | <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:21 | FromDiscord | <dom96> it hurts having to pick the next age group in the survey D: |
14:31:30 | FromDiscord | <lqdev> is being old really as bad as they say? |
14:32:37 | * | Q-Master quit (Ping timeout: 264 seconds) |
14:33:16 | FromDiscord | <dom96> it's just sad more than anything, at least for me |
14:35:03 | Zevv | lqdev: actually, it's great. You can just whine and shout all day and everybody is going "meh, just let the sucker" |
14:35:28 | Zevv | And 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:37 | FromDiscord | <mratsim> You need a bar open for that to happen |
14:37:21 | FromDiscord | <mratsim> what? https://forum.nim-lang.org/t/7263 int64 division is not supported? What is this sorcery? |
14:39:25 | Zevv | who needs int64 division anyway |
14:39:32 | Zevv | I only store primes in there |
14:39:39 | PMunch | Zevv, unfortunately we're not old enough yet that people just chalk our behaviour up to being a weird old man :P |
14:40:06 | Zevv | I have a great idea. I'll greate a distint type that can only hold primes |
14:40:13 | Zevv | and then add an `/` operator for it |
14:40:15 | FromDiscord | <shadow.> oo survey time |
14:40:21 | Zevv | and ask on the forum why it doesn't work |
14:40:25 | Zevv | shadow.: What do we survey? |
14:40:30 | FromDiscord | <shadow.> wdym |
14:40:33 | FromDiscord | <shadow.> i just saw the link |
14:40:35 | FromDiscord | <shadow.> so im going to do it lol |
14:40:40 | FromDiscord | <mratsim> Real men store primes in an enum. |
14:40:43 | PMunch | Zevv, oh if you do that the first thing I'll try is `let biggest = ZevvsPrime.high` |
14:40:44 | FromDiscord | <shadow.> shit how did i discover nim im actually forgetting |
14:41:10 | FromDiscord | <mratsim> I know I do, I store primes in an enum and access them by macro :p |
14:42:05 | FromDiscord | <mratsim> People in FP community are all after dependent types. In Nim I have dependent primes. |
14:42:39 | FromDiscord | <shadow.> lol pmunch have you done aoc yet |
14:42:46 | PMunch | Nope |
14:42:48 | FromDiscord | <shadow.> i think you'll get a good laugh out of my solution |
14:42:56 | FromDiscord | <shadow.> ooo |
14:43:00 | FromDiscord | <shadow.> you streaming today or na |
14:43:00 | PMunch | I won't be able to do it until this evening :( |
14:43:11 | PMunch | I'll probably still stream it |
14:43:14 | FromDiscord | <shadow.> in how many hours? |
14:43:17 | PMunch | But it will be pretty late |
14:43:33 | PMunch | ~5 hours probably |
14:43:33 | disbot | no footnotes for `5`. 🙁 |
14:43:36 | FromDiscord | <shadow.> im guessing im around 5-6 hours before you so |
14:43:38 | FromDiscord | <shadow.> yeah |
14:43:41 | FromDiscord | <shadow.> that's like 2pm here |
14:43:44 | FromDiscord | <shadow.> perfect 👌 |
14:43:51 | FromDiscord | <shadow.> 2-3pm nvm |
14:47:06 | FromDiscord | <shadow.> feelsbadman https://media.discordapp.net/attachments/371759389889003532/789141625968001045/unknown.png |
14:47:22 | FromDiscord | <sealmove> shadow really? |
14:47:32 | FromDiscord | <shadow.> yes |
14:47:43 | FromDiscord | <sealmove> wow you are still in school |
14:47:46 | FromDiscord | <shadow.> high school |
14:47:46 | FromDiscord | <shadow.> lol |
14:47:49 | * | DrWhax joined #nim |
14:47:54 | FromDiscord | <shadow.> im guessing <18 is a minority in this server |
14:48:05 | FromDiscord | <shadow.> somewhere like python that's probably average lol |
14:48:08 | FromDiscord | <sealmove> when did you start programming? |
14:48:13 | FromDiscord | <shadow.> about a year ago |
14:48:21 | FromDiscord | <shadow.> when i was like 13 lmao |
14:48:26 | FromDiscord | <shadow.> im 15 in 2 months |
14:49:10 | Zevv | dude |
14:49:22 | Zevv | I could be your gramp |
14:49:23 | FromDiscord | <shadow.> ye? |
14:49:23 | FromDiscord | <haxscramper> I always wondered how people start programming in like 13 or something. |
14:49:27 | FromDiscord | <shadow.> lmao |
14:49:29 | FromDiscord | <haxscramper> When I was around this age |
14:49:40 | FromDiscord | <haxscramper> Actually I have total blackout about this time |
14:49:44 | PMunch | I started when I was 10 :P |
14:49:48 | Zevv | haxscramper: when you were about that age what? |
14:49:53 | FromDiscord | <shadow.> well i started it like 4 months before covid started and at that point i was just messing around w pentesting |
14:49:55 | FromDiscord | <shadow.> then i picked up python |
14:50:01 | FromDiscord | <shadow.> and during covid i kinda went on a spree of like |
14:50:02 | Zevv | I started at 6 |
14:50:15 | Zevv | The Apple // BASIC manual on my lap |
14:50:15 | FromDiscord | <shadow.> py -> c++ -> java -> c#, and now nim |
14:50:18 | Zevv | 10 print "zevv" |
14:50:20 | Zevv | 20 goto 10 |
14:50:31 | FromDiscord | <shadow.> shheesh |
14:50:49 | PMunch | @shadow., you've been through a lot of languages in such a short time |
14:50:54 | FromDiscord | <shadow.> well |
14:50:56 | FromDiscord | <shadow.> i didnt exactly |
14:51:02 | Zevv | yeah, you might want to stick with this one though :) |
14:51:03 | FromDiscord | <shadow.> fall in love with java or c# lmao |
14:51:11 | FromDiscord | <shadow.> java felt verbose and clunky |
14:51:23 | * | Guest35837 joined #nim |
14:51:27 | FromDiscord | <shadow.> and c# didn't really feel like it had any points that stood out to me? |
14:51:37 | FromDiscord | <shadow.> i use to just mess around w scripting like discord bots n stuff with python |
14:51:45 | PMunch | I have to use C# for work at the moment |
14:51:51 | FromDiscord | <shadow.> but ive gotten into some lower level programming and nim is great for that |
14:51:58 | PMunch | Let's just say I'm less than thrilled.. |
14:52:01 | FromDiscord | <shadow.> lmfao yeha |
14:52:02 | FromDiscord | <shadow.> (edit) "yeha" => "yeah" |
14:52:12 | FromDiscord | <shadow.> i made a repo of making the same program in like 11 languages and let me just say... |
14:52:12 | FromDiscord | <sealmove> you are all geniuses, I feel bad >_< |
14:52:25 | FromDiscord | <shadow.> https://media.discordapp.net/attachments/371759389889003532/789142963934593084/unknown.png |
14:52:28 | FromDiscord | <shadow.> accurate verbosity measure |
14:52:32 | FromDiscord | <shadow.> the fact that nim isnt even on there is good |
14:52:33 | FromDiscord | <shadow.> lmfao |
14:52:48 | PMunch | @sealmove, you should take it as an indication that you've come by the best language ;) |
14:52:49 | FromDiscord | <sealmove> @Zevv nice try to lure shadow into sticking to Nim :p |
14:52:50 | FromDiscord | <shadow.> this is the full collection https://media.discordapp.net/attachments/371759389889003532/789143068552200202/unknown.png |
14:53:05 | FromDiscord | <shadow.> gotta say nim was the most fun to write out of these |
14:53:10 | FromDiscord | <shadow.> and yeah, im sticking with it |
14:53:22 | FromDiscord | <shadow.> it kinda solves my general complaints with interpreted languages, and my other complaints w compiled ones |
14:53:30 | FromDiscord | <shadow.> php is like the opposite of that |
14:53:31 | FromDiscord | <shadow.> lmfao |
14:53:32 | FromDiscord | <trippleA> Is there a native library for working with win32 in nim? |
14:54:03 | PMunch | @trippleA, winim? |
14:54:10 | FromDiscord | <sealmove> yes Nim is best lang, I have no doubt about this anymore ^^ |
14:54:46 | FromDiscord | <shadow.> same lol |
14:55:28 | FromDiscord | <sealmove> I have to use Java most of the time 😐 |
14:55:38 | FromDiscord | <shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2IqE |
14:56:01 | FromDiscord | <trippleA> Which is better: winim or winlean? |
14:56:10 | FromDiscord | <shadow.> i wouldn't say better per se |
14:56:12 | FromDiscord | <shadow.> depends on what you need |
14:56:18 | FromDiscord | <shadow.> but i find winim to be quite nice |
14:57:20 | PMunch | @shadow, or you know: toSeq(lines("dictionary.txt")).filterIt(it.isValid) |
14:57:26 | FromDiscord | <shadow.> smh |
14:57:31 | FromDiscord | <shadow.> filter(isValid) |
14:57:39 | FromDiscord | <shadow.> but that's slower |
14:57:45 | FromDiscord | <shadow.> that iterates and turns into a seq |
14:57:45 | PMunch | Is it? |
14:57:49 | FromDiscord | <shadow.> then iterates again and filters |
14:57:54 | FromDiscord | <shadow.> you needa construct twice |
14:57:59 | PMunch | Fair |
14:58:05 | FromDiscord | <shadow.> microoptimizations but still |
14:58:17 | PMunch | But yeah, still so much shorter in Nim |
14:58:23 | FromDiscord | <shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2IqF |
14:58:30 | PMunch | And the fun part is, you can still do it the verbose Java way if you want to |
14:58:36 | FromDiscord | <shadow.> exactly yeah |
14:58:39 | FromDiscord | <shadow.> using `streams` or something |
14:59:30 | PMunch | Oh well, I've gotta run |
14:59:33 | * | PMunch quit (Quit: leaving) |
14:59:42 | FromDiscord | <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:45 | FromDiscord | <shadow.> ah, have fun! |
14:59:58 | FromDiscord | <dom96> I started using Nim when I was like 14, that was 11 years ago 😄 |
14:59:59 | * | e_ joined #nim |
15:00:08 | FromDiscord | <shadow.> same |
15:00:09 | FromDiscord | <shadow.> that was uh |
15:00:11 | FromDiscord | <shadow.> a month ago |
15:00:14 | FromDiscord | <shadow.> lol |
15:00:43 | Prestige | I 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:01 | FromDiscord | <shadow.> it's actually quite old yeah |
15:01:09 | FromDiscord | <shadow.> i mean nimrod has been around since what, like 2004? |
15:01:12 | FromDiscord | <shadow.> and then nim was 2006? |
15:01:14 | FromDiscord | <shadow.> or am i remembering wrong |
15:01:20 | Prestige | 2005 I thought, could be wrong |
15:01:32 | FromDiscord | <dom96> It wasn't public until 2008 |
15:01:37 | Prestige | Ah |
15:04:38 | * | e_ quit (Ping timeout: 256 seconds) |
15:05:44 | FromDiscord | <trippleA> Does my nimble project have to be on github to be used with the nimble package manager? |
15:06:20 | FromDiscord | <mratsim> no |
15:06:27 | FromDiscord | <mratsim> any git works |
15:06:33 | FromDiscord | <mratsim> some are on Gitlab |
15:06:55 | FromDiscord | <dom96> you can also use mercurial |
15:11:42 | FromDiscord | <trippleA> If I made a program in nim, how portable is that across linux distros? |
15:13:35 | * | xet7 quit (Quit: Leaving) |
15:13:44 | FromDiscord | <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:59 | FromDiscord | <dom96> so you will support whatever distros have a newer glibc than the one you're building on |
15:14:30 | FromDiscord | <trippleA> So I should intentionally build my nim programs on a old linux distro? |
15:15:11 | FromDiscord | <dom96> Yeah, you can do that or build statically with musl |
15:15:29 | FromDiscord | <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:34 | FromDiscord | <lqdev> or uh |
15:20:45 | FromDiscord | <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:53 | FromDiscord | <lqdev> works for me™ |
15:21:27 | FromDiscord | <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:58 | FromDiscord | <dom96> even if you build on older glibc's though, you will still run into those that are running musl-based distros |
15:22:14 | FromDiscord | <dom96> Linux is a minefield 😄 |
15:22:35 | FromDiscord | <mratsim> musl-based distro? whaaaaaat? |
15:22:37 | FromDiscord | <trippleA> musl-based are so uncommon that it's not something to worry about. glibc is the de-facto standard. |
15:23:42 | FromDiscord | <dom96> depends entirely on your use case |
15:23:46 | FromDiscord | <dom96> for choosenim it was a problem https://github.com/dom96/choosenim/issues/216 |
15:23:46 | FromDiscord | <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:47 | disbot | ➥ choosenim 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:12 | FromDiscord | <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:39 | FromDiscord | <mratsim> it pays for 3 core devs full-time |
15:45:05 | FromDiscord | <mratsim> well at least the Status donations |
15:45:18 | FromDiscord | <mratsim> not sure about the individual ones. |
15:45:37 | FromDiscord | <mratsim> I assume part of Fosdem expenses. |
15:46:04 | * | e__ joined #nim |
15:46:10 | * | Jesin quit (Ping timeout: 256 seconds) |
15:48:11 | Zevv | all the beers |
15:48:15 | Zevv | prosit guys, well deserved |
15:51:15 | FromDiscord | <dom96> opencollective makes what happens to donations public |
15:51:46 | FromDiscord | <dom96> the rest is likely spent on one-off bounties for features here and there, but Araq would need to answer that |
15:52:19 | FromDiscord | <dom96> Personally I would like to see more transparency, but that might just be me |
15:59:09 | FromDiscord | <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:10 | disbot | ➥ Completing the Nim async/await implementation |
16:00:11 | FromDiscord | <mratsim> Na people paid for their own beers though some offered for the table. |
16:00:35 | FromDiscord | <mratsim> I gues this year we save on the swag budget as well |
16:01:41 | FromDiscord | <dom96> Still amazes me when I remember that that FOSDEM was this year |
16:02:01 | FromDiscord | <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:52 | Zevv | There 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:48 | FromDiscord | <shadow.> wait who are the 3 core devs? |
16:59:52 | FromDiscord | <shadow.> im going to assume one is araq lmao |
17:00:27 | * | natrys joined #nim |
17:03:13 | FromDiscord | <exelotl> ar1q, ar2q and ar3q |
17:04:53 | FromDiscord | <shadow.> oh right of course |
17:05:33 | FromDiscord | <shadow.> `(1..3).mapIt("ar" & $it & "q)` |
17:06:00 | FromDiscord | <shadow.> (edit) ""q)`" => ""q")`" |
17:06:21 | FromDiscord | <bark> alpine and void |
17:06:36 | FromDiscord | <bark> (edit) "void" => "some void-based builds" |
17:06:46 | FromDiscord | <bark> (edit) "alpine and some void-based builds ... " added "and probably some gentoo guys and LFS guys too" |
17:06:59 | FromDiscord | <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:28 | FromDiscord | <bark> I wonder if alpine based docker containers are running musl 🤔 |
17:08:42 | FromDiscord | <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:15 | FromDiscord | <bark> they still build all packages for musl too tho |
17:12:30 | FromDiscord | <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:25 | FromDiscord | <Vindaar> if you statically link musl it'll run, because then it doesn't have any dynamic runtime dependencies |
17:27:47 | FromDiscord | <Vindaar> static linking is just easier for musl than for glibc afaik |
17:39:57 | FromDiscord | <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:21 | disruptek | mratsim: 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:48 | disruptek | objectively speaking, it probably /does/ make sense to move closure iterators out of the compiler. |
17:51:26 | FromDiscord | <Quibono> How hard would it be to make a superset of Nim that was dynamically typed? |
17:51:39 | disruptek | dom96: 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:11 | FromDiscord | <shadow.> @Quibono |
17:59:16 | FromDiscord | <shadow.> `sudo apt-get install python3.9` |
18:00:05 | FromDiscord | <shadow.> then just use nimport |
18:00:05 | FromDiscord | <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:49 | FromDiscord | <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:36 | FromDiscord | <Recruit_main707> is it me or pushing sometimes doesnt work? |
18:15:40 | FromDiscord | <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:42 | FromDiscord | <Recruit_main707> pushing pragmas |
18:17:21 | FromDiscord | <Recruit_main707> sent a code paste, see https://play.nim-lang.org/#ix=2IrV |
18:17:24 | disruptek | i've been meaning to figure out why i cannot push off conversion-to-self pragmas. |
18:26:20 | FromGitter | <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:46 | FromGitter | <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:23 | Zevv | Pff man, I find this years survey pretty hard. I tried to cheat and look at narimirans or pmuncha answers, |
18:58:42 | Zevv | but theyre not up yet. guess they are stuck too |
18:59:02 | mipri | try dynamic programming |
19:00:39 | FromDiscord | <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:06 | narimiran | Zevv: 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:04 | Zevv | oooh dang. you are one *smart* man, I never would have made that up myself |
19:29:08 | FromDiscord | <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:42 | Zevv | "I choose to never think about it" |
19:30:27 | disruptek | "what would make your company adopt nim?" |
19:30:33 | disruptek | "my company adopting me." |
19:31:14 | FromDiscord | <sealmove> hahah good one |
19:31:57 | disruptek | my nephew just asked if i'm envious that he has a copy of cyberpunk. |
19:31:58 | FromDiscord | <sealmove> @mratsim indeed, I thought the same |
19:32:13 | FromDiscord | <sealmove> and you replied? |
19:32:21 | disruptek | go fuck yourself, douchebag. |
19:32:29 | FromDiscord | <sealmove> :< harsh |
19:34:13 | disruptek | i'm just kidding. |
19:34:25 | disruptek | he used the word `jealous` incorrectly. |
19:36:47 | disruptek | what am i missing here? |
19:36:49 | disruptek | !rfc effects |
19:36:50 | disbot | query failed 😢 |
19:36:54 | disruptek | !rfc effect |
19:36:54 | disbot | query failed 😢 |
19:36:59 | disruptek | c'mon... |
19:37:43 | disruptek | https://github.com/nim-lang/RFCs/issues/302 |
19:37:45 | disbot | ➥ Effect System: Tags that are disallowed by default, and blocking tag propagation ; snippet at 12https://play.nim-lang.org/#ix=2Isn |
19:39:33 | Araq | it's one of these days... |
19:39:46 | Araq | strs_v2.nim, tested to death, right? |
19:39:57 | Araq | turns out it's buggy |
19:40:23 | Araq | embarrassing code |
19:40:47 | disruptek | our tests aren't very good, honestly. |
19:40:57 | disruptek | they don't test real programs. |
19:41:10 | Araq | we're getting there |
19:41:23 | Araq | and I remember how hard it was to get tstrutils to work with valgrind |
19:41:24 | disruptek | only by creating real programs and adding them to the test suite. |
19:41:34 | disruptek | my libgit2 wrapper doesn't work with cpp+arc. |
19:41:44 | disruptek | it doesn't work with clang. |
19:41:50 | Araq | you know my answer |
19:42:00 | disruptek | it doesn't solve the problem with compiler codegen. |
19:42:32 | Araq | cpp+arc is a special snowflake |
19:44:47 | * | regreg quit (Ping timeout: 272 seconds) |
19:46:10 | disruptek | that's what my README says: if you're on osx or using arc+cpp, you're sol. |
19:47:34 | Zevv | Araq: you can throw it all out, except for my lines. |
19:48:07 | Araq | Zevv, yeah, I already fired the guy who wrote it |
19:48:19 | Zevv | aw. |
19:48:24 | Zevv | and seqs_v2? |
19:48:26 | Araq | (I'm kidding, I did this to myself) |
19:48:39 | Zevv | (I know) |
19:48:52 | Araq | seqs_v2 is not affected |
19:48:57 | Zevv | good |
19:49:11 | Zevv | they share the same genes |
19:49:15 | Zevv | some |
19:49:33 | Araq | maybe I was drunk when I wrote it |
19:49:40 | Zevv | why, it's not *that* bad |
19:49:55 | Araq | maybe I should drink something so that I can understand my former thoughts |
19:50:05 | Zevv | I've heard good stories about absynth |
19:50:37 | Zevv | but what will take its place then? |
19:50:51 | Araq | I'm patching it |
19:51:04 | Araq | disruptek, my araq-ic4 branch is now in devel |
19:51:14 | Araq | time to rebase your branch once again |
19:51:31 | Araq | and ideally you only add code that isn't used so that all tests are green |
19:51:33 | Araq | :P |
19:53:16 | * | vicfred quit (Ping timeout: 240 seconds) |
20:00:06 | * | Q-Master quit (Ping timeout: 272 seconds) |
20:10:37 | disruptek | nah. |
20:10:49 | disruptek | i don't care about ic anymore. |
20:11:26 | disruptek | you have my work product; if it helps, great. |
20:12:48 | * | antranigv quit (Quit: ZNC 1.8.2 - https://znc.in) |
20:13:14 | FromDiscord | <lqdev> ooh cool new IC progress |
20:13:38 | FromDiscord | <lqdev> Araq: any news on when it'll be ready for testing on devel? i'm quite excited |
20:14:14 | FromDiscord | <bark> is there any place where I can view other AoC submissions from the past in nim and compare mine 🤔 |
20:14:19 | FromDiscord | <bark> maybe there should be a repo |
20:14:26 | * | antranigv joined #nim |
20:14:28 | FromDiscord | <bark> that people fork and add their aoc's to |
20:15:05 | FromDiscord | <trippleA> Is using the x11 library required if I want to make a GUI? |
20:15:17 | Araq | lqdev: I'll let you know. I hoped to have something showable for Christmas |
20:15:36 | FromDiscord | <kodkuce> https://media.discordapp.net/attachments/371759389889003532/789224295938654238/2020-12-17_211517.png |
20:15:40 | Araq | but the progress was slower than anticipated, as usual |
20:15:51 | FromDiscord | <kodkuce> is game dave desktop programs( gui ) xD |
20:15:53 | Araq | and the lockdown doesn't help, children around me, crying |
20:15:55 | FromDiscord | <lqdev> yeah i know that almost too well :p |
20:16:07 | Araq | well, not crying. |
20:16:09 | Araq | screaming. |
20:16:10 | FromDiscord | <lqdev> the slower than expected development part |
20:16:43 | FromDiscord | <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:50 | FromDiscord | <lqdev> wait not older |
20:16:52 | FromDiscord | <lqdev> younger |
20:17:09 | FromDiscord | <lqdev> my brain is not working anymore, i should just go to sleep. |
20:17:37 | FromDiscord | <lqdev> anyways, good luck with IC |
20:17:43 | FromDiscord | <haxscramper> No, there are cross-platform GUI toolkits - see https://github.com/nim-lang/Nim/wiki/Curated-Packages#gui |
20:18:22 | FromDiscord | <haxscramper> ~gui |
20:18:23 | disbot | no footnotes for `gui`. 🙁 |
20:18:35 | FromDiscord | <haxscramper> ~gui is https://github.com/nim-lang/Nim/wiki/Curated-Packages#gui |
20:18:35 | disbot | gui: 11https://github.com/nim-lang/Nim/wiki/Curated-Packages#gui |
20:19:16 | disruptek | ~gui is a useful starting point for investigation Nim GUI options |
20:19:17 | disbot | gui: 11https://github.com/nim-lang/Nim/wiki/Curated-Packages#gui |
20:19:17 | disbot | gui: 11a useful starting point for investigation Nim GUI options |
20:19:28 | disruptek | ~gui is a useful starting point for investigating Nim GUI options |
20:19:29 | disbot | gui: 11https://github.com/nim-lang/Nim/wiki/Curated-Packages#gui |
20:19:29 | disbot | gui: 11a useful starting point for investigating Nim GUI options |
20:20:15 | FromDiscord | <haxscramper> Is to possible to get list of all available footnotes? |
20:20:27 | disruptek | ~disbot |
20:20:28 | disbot | disbot: 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:46 | disruptek | there's a disbot data repo. |
20:20:49 | disruptek | !repo disruptek/disbot |
20:20:49 | disbot | https://github.com/disruptek/disbot -- 9disbot: 11disbot data 15 0⭐ 0🍴 |
20:21:03 | * | haxscramper joined #nim |
20:21:05 | disruptek | it stores the footnotes. |
20:21:06 | haxscramper | ~help |
20:22:02 | FromDiscord | <trippleA> Can making a web browser in nim be possible? |
20:22:13 | disruptek | sure, but it's pointless. |
20:23:17 | Araq | what does [backport] mean? backport to every version that makes sense. or backport to latest release? |
20:23:34 | FromDiscord | <haxscramper> I think GTK has webview, so you could probably create something like `qutebrowser` |
20:24:10 | FromDiscord | <haxscramper> Not chome/firefox level though, at least not as a single-sane-person project |
20:24:52 | FromDiscord | <trippleA> Would it be possible to make a nim compiler in nim? |
20:25:00 | FromDiscord | <haxscramper> we have one |
20:25:15 | FromDiscord | <haxscramper> !repo nim |
20:25:16 | disbot | https://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:18 | Zevv | Wait what |
20:27:25 | disruptek | you're blowin' my mind right now. |
20:27:35 | disruptek | look at all that cutlery. |
20:27:42 | Zevv | :) |
20:27:42 | disruptek | how come i've never seen this before? |
20:27:51 | haxscramper | What |
20:28:04 | * | Q-Master joined #nim |
20:28:31 | FromDiscord | <Daniel> http://ssalewski.de/gtkprogramming.html |
20:29:59 | Zevv | That is one elaborate writeup |
20:32:04 | ForumUpdaterBot | New thread by Ward: Nim interact with Windows .NET Frameworks, see https://forum.nim-lang.org/t/7265 |
20:33:01 | FromDiscord | <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:25 | FromDiscord | <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:26 | disbot | ➥ Quickfix Formatting for Jumping to Errors |
20:43:18 | FromDiscord | <Daniel> what are assemblies? ...assembly code? |
20:43:28 | FromDiscord | <trippleA> Evaluating as nimscript file failed with error: undecared identifier 'name' |
20:46:40 | disruptek | ajusa: use neovim and alaviss/nim.nvim |
20:47:51 | FromDiscord | <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:56 | FromDiscord | <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:52 | FromDiscord | <ajusa> disruptek: I am using neovim (didn't specify that earlier) and will try that plugin, thanks! |
20:53:07 | mipri | https://docs.microsoft.com/en-us/dotnet/standard/assembly/ |
20:56:28 | * | narimiran quit (Ping timeout: 246 seconds) |
20:58:31 | FromDiscord | <trippleA> How would I go about making command line options where the program does certain things depending on how you started it? |
21:01:12 | mipri | import os; paramStr, etc. If you're not doing anything unusual though, use cligen |
21:01:46 | FromDiscord | <mratsim> cligen or confutils |
21:06:09 | FromDiscord | <bark> oh really cool |
21:10:54 | FromDiscord | <trippleA> How can I get a value from a function and then assign it to a variable? |
21:11:22 | mipri | let v = f() |
21:12:03 | FromDiscord | <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:32 | FromDiscord | <shadow.> do you need the result to be mutable? |
21:31:53 | FromDiscord | <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:03 | FromDiscord | <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:10 | FromDiscord | <haxscramper> Or there is a better way to do this |
22:00:22 | * | natrys joined #nim |
22:00:57 | disruptek | you can't do this using the import patterns? |
22:01:45 | FromDiscord | <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:04 | FromDiscord | <Sendell> i tried with a block: but it's not working :/ |
22:02:59 | FromDiscord | <sealmove> compiletime pragma? |
22:03:09 | disruptek | all consts are compileTime. |
22:03:17 | FromDiscord | <Sendell> yeah i know |
22:03:23 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
22:03:31 | disruptek | i don't have the bandwidth for the playground. what exactly is the problem? |
22:03:46 | * | pbb joined #nim |
22:04:23 | FromDiscord | <sealmove> Sendell for your example there is the collect macro |
22:04:24 | FromDiscord | <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:26 | FromDiscord | <sealmove> from sugar module |
22:04:49 | FromDiscord | <Sendell> "variable" not "field" |
22:05:02 | FromDiscord | <sealmove> https://nim-lang.org/docs/sugar.html#collect.m%2Cuntyped%2Cuntyped |
22:05:24 | haxscramper | disruptek: 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:34 | disruptek | so why can't you use a block? |
22:05:36 | haxscramper | And I have no other ideas |
22:05:51 | disruptek | https://play.nim-lang.org/#ix=2Itk |
22:05:55 | FromDiscord | <Sendell> that's what i first thought of, but didnt work |
22:05:59 | FromDiscord | <Sendell> maybe i did something wrong |
22:06:16 | FromDiscord | <InventorMatt> @Sendell is this what you are thinking of https://play.nim-lang.org/#ix=2Itl |
22:06:27 | FromDiscord | <Sendell> oh that's exactly what I want |
22:06:35 | FromDiscord | <Sendell> Don't know what i did wrong when i tried |
22:06:37 | FromDiscord | <Sendell> thanks guys |
22:06:51 | FromDiscord | <Sendell> happy to know it should work 🙂 |
22:06:54 | * | kenran quit (Quit: leaving) |
22:07:28 | FromDiscord | <Sendell> nice hint too, didn't know about it |
22:07:44 | disruptek | haxscramper: i dunno, exactly; i think the pattern syntax for cpp is pretty comprehensive, but maybe i've overlooked something. |
22:08:05 | haxscramper | The 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:00 | disruptek | i 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:11 | disruptek | ie. there are subtle semantics that you want to capture automatically. |
22:09:40 | haxscramper | So 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:13 | haxscramper | https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/include/bits/unordered_set.h#L221 |
22:11:18 | haxscramper | And the like |
22:17:12 | FromDiscord | <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:44 | haxscramper | I 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:52 | FromDiscord | <Sendell> this does not work, while this https://play.nim-lang.org/#ix=2Itu do work |
22:18:14 | FromDiscord | <shadow.> disruptek you should rly get your wifi fixed if you dont have enough bandwidth for github or playground lmfao |
22:18:30 | disruptek | thanks. |
22:19:18 | FromGitter | <jrfondren> Sendell: https://github.com/nim-lang/Nim/issues/12172 |
22:19:20 | disbot | ➥ Error in const block inside proc ; snippet at 12https://play.nim-lang.org/#ix=2Itw |
22:20:59 | FromDiscord | <Sendell> oh ok |
22:21:17 | FromDiscord | <Sendell> so is it like a 1 year old bug ? or expected behavior ? |
22:22:23 | haxscramper | Though 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:18 | haxscramper | Could someone please go back in time and tell Bjarne that he'd better implement nim instead of C++ |
22:24:21 | FromDiscord | <Sendell> We're blessed that Andreas did implement Nim instead of C+++ 🙂 |
22:24:41 | FromDiscord | <exelotl> Every now and then I see a video in my recs that's like "Why I invented C++" |
22:24:54 | FromDiscord | <exelotl> And I'm just like, why Bjarne |
22:24:59 | FromDiscord | <exelotl> Why did you do it |
22:25:28 | haxscramper | I 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:02 | haxscramper | Like, conflating arrays with pointers, or this horrible macro system |
22:26:06 | haxscramper | And so on |
22:26:26 | FromGitter | <awr1> @trippleA should be relatively portable |
22:27:59 | FromGitter | <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:30 | FromGitter | <awr1> i feel like nim couldn't have gotten started without being informed by the advancements and issues other languages had faced |
22:31:54 | FromGitter | <awr1> c++ had to struggle for nim to be able to fly |
22:32:08 | disruptek | if it's so great, where are the users? |
22:32:42 | FromGitter | <awr1> that's the unfortunate end of it |
22:32:53 | FromGitter | <awr1> C++ was attractive for people used to C |
22:33:26 | * | e__ joined #nim |
22:34:10 | FromGitter | <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:50 | FromDiscord | <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:54 | FromDiscord | <Recruit_main707> think |
22:36:14 | disruptek | exactly. it's not better enough. |
22:37:14 | FromDiscord | <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:58 | disruptek | so what's your point? nim is the right language at the wrong time? |
22:38:05 | * | e__ quit (Ping timeout: 240 seconds) |
22:38:55 | haxscramper | Well, I don't think it is realistically possible to actually compete with C++ |
22:38:57 | haxscramper | But |
22:39:04 | FromDiscord | <Recruit_main707> thats a way of seeing it, its not the perfect one, its better than the current options |
22:39:13 | haxscramper | What **is** possible is to try and take advantage of it's ecosystem |
22:39:39 | FromDiscord | <Recruit_main707> embrace the failure and move one |
22:39:42 | disruptek | sure, but there are more popular languages that can do that. |
22:39:46 | haxscramper | Like, if you say to someone "let's rewrite this in nim", they are most likely say something like "and why" |
22:40:02 | haxscramper | But if you are able to just plug-in nim on top of your C++ code |
22:40:15 | disruptek | then you have to manage two languages instead of one. |
22:40:33 | haxscramper | Well, otherwise I have to manage one language from scratch |
22:40:43 | disruptek | you had to manage it, anyway. |
22:41:23 | haxscramper | There is no such thing that doesn't have to be managed |
22:42:02 | haxscramper | But my point is - if it is simple enough to add Nim to C++ codebase, then chances are better |
22:42:38 | disruptek | no 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:42 | haxscramper | I 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:50 | disruptek | FFI is not the hard part. |
22:43:02 | haxscramper | FFI is the easy part, yes |
22:44:33 | haxscramper | But 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:58 | FromDiscord | <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:13 | haxscramper | But I hope to extract as much semantics information from C++ code, and reuse it to make transition to nim seamless. |
22:45:23 | haxscramper | as seamless as possible* |
22:45:30 | disruptek | yes, but why? |
22:46:04 | disruptek | if i'm making a purchasing decision, i would rather have rust & c++ than nim & c++. |
22:46:14 | disruptek | i don't give a single fuck about FFI ease. |
22:46:34 | FromDiscord | <Recruit_main707> Current Nim users will find it useful, even if no c++ users consider it another reason to switch to Nim |
22:46:55 | haxscramper | rust & C++ as in 'we had C++ codebase and decided to adopt rust in addition to that'? |
22:47:00 | FromDiscord | <Recruit_main707> Why rust & c++ |
22:47:13 | disruptek | because it's an obvious choice over nim & c++. |
22:47:24 | haxscramper | Questionable statement |
22:47:36 | haxscramper | Actually, let me rephrase |
22:47:37 | FromDiscord | <Recruit_main707> Bc people use it so it must me good I guess then |
22:47:57 | disruptek | people use it, so it's an acceptable product. |
22:48:15 | disruptek | coders are available. i don't care how hard it is for them. more will be minted soon enough. |
22:48:26 | FromDiscord | <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:32 | FromDiscord | <exelotl> It's hard to find a helpful answer to "How could we help make Nim more accepted at your company?" |
22:48:55 | FromDiscord | <Recruit_main707> Create your own company, there ya go |
22:48:58 | haxscramper | The 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:11 | FromDiscord | <exelotl> lol I'm getting there x) |
22:49:12 | haxscramper | Then yes, the question is obvious |
22:50:18 | disruptek | the 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:28 | haxscramper | Yes, nobody questions that |
22:50:28 | disruptek | so what if nim is nicer to use? "i don't care." |
22:50:29 | FromDiscord | <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:50 | disruptek | no, c++ is an easier language for rust to compete against. |
22:51:13 | disruptek | nim is simply not /better enough/. |
22:51:42 | disruptek | i'm not sure it ever will be. |
22:52:47 | haxscramper | Then we need to increase number of developers that know nim, especially ones that came from C++. |
22:52:50 | haxscramper | For example |
22:53:02 | FromDiscord | <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:13 | haxscramper | We can decrease learning curve |
22:53:38 | haxscramper | By putting more efford to sway C++ developers on the nim side |
22:54:30 | disruptek | the 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:41 | haxscramper | I'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:55 | disruptek | it doesn't really matter. |
22:55:29 | FromDiscord | <Recruit_main707> haxcramper, afaik, it started with Firefox directly |
22:55:31 | haxscramper | It matters a little, but not that much, I can agree with that |
22:55:51 | disruptek | our quality is worse. this is a major detractor. |
22:56:11 | FromDiscord | <Recruit_main707> I think the ecosystem is there |
22:56:12 | haxscramper | But programmers are result result of tooling, resources etc. |
22:56:23 | disruptek | sure, but i don't care. |
22:56:23 | haxscramper | Obviously |
22:58:15 | haxscramper | But convenient C++ interop is still a plus on tooling side |
22:58:41 | FromDiscord | <Recruit_main707> AND the ecosystem |
22:58:51 | disruptek | it's not better enough. |
22:58:52 | haxscramper | Yeah, EEE approach on C++ |
22:59:01 | disruptek | and the ecosystem is worse, obviously. |
22:59:10 | haxscramper | disruptek: yes and yes |
22:59:59 | disruptek | you know what i'm dealing with right now? |
23:00:17 | disruptek | a template that i inexplicably cannot inject a variable into. |
23:00:28 | * | tane quit (Quit: Leaving) |
23:01:01 | disruptek | the 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:42 | disruptek | metaprogramming only makes sense when the abstraction is tight. |
23:01:46 | disruptek | otherwise, it's a lie. |
23:02:20 | disruptek | otherwise, i cannot use it. |
23:02:36 | disruptek | otherwise, it's a risk. |
23:02:37 | FromDiscord | <Recruit_main707> How can the ecosystem be worse when you can access the whole c++ ecosystem + the Nim one |
23:02:52 | haxscramper | Ecosystem is not only amount of features |
23:02:56 | disruptek | because with rust, you get the same benefits plus a broader, deeper ecosystem. |
23:03:21 | haxscramper | It is a combination of features, stability guarantees, community etc. |
23:03:33 | disruptek | you get a package manager that works well enough that tools frequently can have hundreds of dependencies safely. reliably. robustly. |
23:03:45 | disruptek | no one worries about dependencies in rust. |
23:03:59 | FromDiscord | <Recruit_main707> Do we in nim? |
23:04:05 | disruptek | no one gives a shit that the compiler is slow, really. it's not a hindrance to adoption. |
23:04:18 | disruptek | you think anyone gives a fuck about IC in the rustbelt? |
23:04:23 | disruptek | naw, dawg. |
23:04:24 | haxscramper | As 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:31 | haxscramper | If things just blow up on you |
23:05:07 | disruptek | we do worry about dependencies in nim. |
23:05:14 | disruptek | you know why? because they are burdensome. |
23:05:25 | Zevv | understatement |
23:05:42 | haxscramper | Haven't had any major issues |
23:05:58 | haxscramper | Though I only depend on my own trash mountain |
23:06:00 | disruptek | that's because my code is one of your few dependencies. |
23:06:53 | FromDiscord | <Recruit_main707> Neither have I, do you mean they affect compilation times, disk space, or that they are plain garbage |
23:07:30 | disruptek | introducing dependencies is unreliable. |
23:07:57 | disruptek | one cannot rely upon them working, getting pulled in correctly, getting specified correctly, getting into the build correctly, and so on. |
23:08:13 | disruptek | it's all the same shit; i cannot restate it in many new ways... |
23:10:06 | disruptek | recruit: when you compile your largest project, how many lines of nim does the compiler say it built? |
23:10:17 | FromDiscord | <Recruit_main707> A ton |
23:10:25 | disruptek | that many? |
23:10:34 | FromDiscord | <Recruit_main707> I can’t check rn |
23:10:39 | disruptek | guess. |
23:11:31 | Zevv | 100k |
23:11:32 | FromDiscord | <Recruit_main707> i really don’t know, I can be off by thousands |
23:11:53 | FromDiscord | <Recruit_main707> If zevv’s 100k I’ll say 20k |
23:12:19 | haxscramper | I don't know which one is the largest, but nimtrs has 190K for one tests |
23:12:52 | haxscramper | Oh, 270K |
23:13:15 | FromDiscord | <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:24 | mipri | never even noticed that line count. |
23:13:39 | FromDiscord | <speckledlemon> the point is that the LOC is huge, no? |
23:13:58 | haxscramper | And `hcparse` I'm working on compiles half a million lines |
23:14:30 | FromDiscord | <Recruit_main707> LOC? (I’m shutting down as we speak, bare with me) |
23:14:37 | disruptek | kinky. |
23:14:45 | FromDiscord | <speckledlemon> lines of code, sorry |
23:14:53 | FromDiscord | <Recruit_main707> Thx |
23:16:03 | FromDiscord | <Quibono> Disruptek what was the point, just that you’ve coded more |
23:16:10 | mipri | comically 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:22 | disruptek | i'm just curious what these opinions are based upon. |
23:17:28 | haxscramper | About necessity of IC? |
23:17:51 | FromDiscord | <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:06 | disruptek | i would rather write nim. |
23:18:17 | FromDiscord | <Recruit_main707> Why though |
23:18:33 | disruptek | because i'm not very good at this shit and i find nim easier to read. |
23:18:45 | disruptek | that's important to me, because i rarely know what the fuck is going on. |
23:19:16 | mipri | 88k here... 704k LOC for moe, the vi-like editor... |
23:19:37 | FromDiscord | <Quibono> So how do we fix imports in Nim? |
23:19:54 | FromDiscord | <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:05 | disruptek | as 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:09 | mipri | disruptek says there's some kind of unreliability in them getting imported at all. |
23:20:30 | disruptek | i challenge you to find a lib of mine that someone uses. |
23:20:35 | disruptek | other than scramper, of course. |
23:20:54 | disruptek | he got hoodwinked by gram. |
23:21:16 | mipri | nobody uses frosty? |
23:22:30 | FromDiscord | <Recruit_main707> I have used golden |
23:22:31 | disruptek | one person, to my knowledge, uses frosty. |
23:22:32 | disruptek | aside from myself, i mean. |
23:23:11 | haxscramper | Actually, to be hones, it would help to put things on nimble, however bad it might be |
23:23:18 | mipri | a '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:26 | FromDiscord | <Recruit_main707> I would use frosty if I needed it, or json, but right now I need flatbuffers |
23:23:27 | disruptek | golden 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:38 | FromDiscord | <Recruit_main707> jason |
23:23:41 | FromDiscord | <Clyybber> disruptek: put it on nimble then it will get users |
23:24:03 | disruptek | if you can't find my work or it doesn't help you, i'm fine with that. |
23:24:12 | disruptek | i'm not getting paid for this shit. |
23:24:27 | FromDiscord | <Clyybber> are you also fine with a PR adding your pks to nimble? |
23:24:31 | disruptek | there's no fucking way that i'm going to help promote nimble, of course. |
23:24:51 | disruptek | you can add my shit to nimble, of course; that's your right. |
23:25:21 | disruptek | anyone that is merely looking in nimble to find packages really shouldn't be using my stuff. |
23:25:28 | disruptek | it's not designed for that level of programmer. |
23:25:29 | FromDiscord | <Recruit_main707> > So how do we fix imports in Nim? |
23:25:51 | FromDiscord | <Clyybber> disruptek: I'm calling it nimble but I'm referring to the pkglist |
23:25:57 | disruptek | i know. |
23:25:59 | FromDiscord | <Clyybber> which is not tied to nimble |
23:26:07 | FromDiscord | <shadow.> i use frosty for sockets disruptek |
23:26:10 | disruptek | yeah, it's a stupid idea. |
23:26:24 | disruptek | shadow.: for what? |
23:26:34 | disruptek | i don't even have socket tests. would you like to PR some? |
23:26:37 | leorize[m] | you should really write an rfc for a better package manager at one point |
23:26:44 | disruptek | i mean, really... |
23:26:49 | FromDiscord | <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:01 | FromDiscord | <shadow.> just freeze and thaw |
23:27:07 | disruptek | if you use netty, don't you think you should use flatty? |
23:27:11 | FromDiscord | <shadow.> ehhh |
23:27:31 | FromDiscord | <shadow.> idk |
23:27:31 | FromDiscord | <shadow.> lol |
23:27:33 | FromDiscord | <shadow.> i saw frosty first |
23:27:57 | disruptek | maybe i should just make cargo work for nim and call it good. |
23:28:01 | * | Guest97173 quit (Ping timeout: 268 seconds) |
23:28:30 | disruptek | how hard could it be? |
23:28:46 | FromDiscord | <speckledlemon> that is preferable |
23:28:46 | FromDiscord | <Recruit_main707> I’m gonna say a lot |
23:28:52 | FromDiscord | <Recruit_main707> I’m surprised the main/only reason you use Nim is readibilty |
23:29:01 | disruptek | shadow.: so, two people use frosty in a capacity that it is untested. 😁 |
23:29:01 | FromDiscord | <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:11 | disruptek | yes. |
23:29:14 | FromDiscord | <Recruit_main707> I’ll check cargo to see what makes it so special compared to nimble |
23:29:23 | FromDiscord | <shadow.> oh right i also use jason |
23:29:34 | FromDiscord | <Quibono> I use criterion |
23:29:42 | disruptek | blame lemonboy. |
23:29:56 | disruptek | i've never seen his equal, in terms of programming talent. |
23:30:02 | disruptek | that fucking guy /gets it/. |
23:30:09 | FromDiscord | <shadow.> jason is spicy as well just saying |
23:30:16 | FromDiscord | <shadow.> ive also tried dim it was very easy to pick up |
23:30:23 | disruptek | true that. |
23:30:30 | * | lmariscal joined #nim |
23:30:35 | disruptek | i've heard it's among the easiest languages to learn. |
23:30:42 | FromDiscord | <shadow.> the fact that dim has more stars than any of my repos is quite humbling |
23:30:52 | FromDiscord | <shadow.> to be fair i havent made a single useful repo so |
23:30:55 | FromDiscord | <shadow.> i guess it makes sense lol |
23:30:56 | mipri | cargo 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:20 | FromDiscord | <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:36 | disruptek | recruit: why do you use nim? |
23:32:37 | disruptek | don't get me wrong: cargo is merely the best of the worst package managers. |
23:33:00 | disruptek | but as such, it has a lot to teach nim. |
23:33:25 | FromDiscord | <Quibono> So how does one make a package manager? |
23:33:27 | FromDiscord | <Quibono> Let’s do dis |
23:34:01 | disruptek | i've written a lot about what you have to do. |
23:34:31 | disruptek | about 5k lines, i guess. |
23:34:32 | * | lmariscal joined #nim |
23:34:49 | * | lmariscal quit (Client Quit) |
23:35:06 | FromDiscord | <shadow.> didn't you make nimph? |
23:35:08 | * | mfiano quit (Ping timeout: 256 seconds) |
23:35:11 | FromDiscord | <shadow.> last i checked that was doing well |
23:35:17 | disruptek | oh yeah, real good. |
23:35:35 | FromDiscord | <shadow.> didnt you say build failing was only bc of github being stupid |
23:36:00 | disruptek | nah, it's some nimterop bullshit as per usual. |
23:36:10 | FromDiscord | <shadow.> ahh rip |
23:36:27 | disruptek | it works for some people. doesn't work in my weird cloud environment. |
23:36:46 | FromDiscord | <Quibono> So if you’ve written a good package manager what’s the problem with Nim? |
23:36:57 | disruptek | scroll up. |
23:36:57 | FromDiscord | <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:09 | FromDiscord | <Clyybber> @Quibono he's just in a mood |
23:37:34 | disruptek | "the problem with nim" |
23:37:49 | FromDiscord | <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:09 | FromDiscord | <Clyybber> yeah, but its just :disruptek: : ) |
23:38:13 | disruptek | we were talking about the survey and why people don't use nim. |
23:38:17 | * | lmariscal quit (Client Quit) |
23:38:26 | disruptek | i'm making comparisons to rust. |
23:38:45 | FromDiscord | <Recruit_main707> From an average biased point of view |
23:39:02 | disruptek | of course i'm biased. |
23:39:15 | disruptek | i have some intimacy with nim's compiler and none with rust's. |
23:39:29 | disruptek | i have some intimacy with a nim package manager and i'm merely a happy user of rust's. |
23:39:30 | FromDiscord | <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:40 | disruptek | i have some intimacy with nim's ecosystem and i'm merely a happy user of rust's. |
23:39:50 | disruptek | do you see where i'm going with this? |
23:40:20 | FromDiscord | <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:31 | disruptek | how do you figure? |
23:40:35 | disruptek | give me an example. |
23:40:39 | FromDiscord | <Quibono> That you’re happy when you’re not intimate? |
23:40:41 | FromDiscord | <Recruit_main707> (edit) "saying" => "giving" |
23:40:44 | mipri | Quibono: 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:15 | disruptek | making stuff isn't enough. |
23:41:18 | FromDiscord | <Quibono> Mipri I’m making a wrapper for alpaca for that reason already. |
23:41:40 | disruptek | people have made stuff for crystal, and you know what? i don't give a shit about that, either. |
23:41:57 | mipri | what have people made for Crystal? |
23:42:01 | disruptek | who cares? |
23:42:08 | FromDiscord | <Recruit_main707> lol |
23:42:10 | FromDiscord | <Clyybber> disruptek: damn, stupidly stripping the .typ makes it trip too |
23:42:11 | mipri | you shouldn't have to care. If someone made something, you'd know. |
23:42:23 | Prestige | Is 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:24 | disruptek | clyybber: that's too simple a fix, anyway. |
23:42:37 | disruptek | prestige: no, for "reasons." |
23:42:41 | Prestige | Something that's seen and used in the js world |
23:42:43 | FromDiscord | <Clyybber> disruptek: Yeah, but I mean I'm already excluding sym and literals |
23:42:46 | Prestige | reasons? |
23:42:55 | FromDiscord | <Clyybber> disruptek: The issue is I'm stripping it from a call |
23:42:57 | disruptek | reasons of diamond dependency breaking. |
23:42:59 | FromDiscord | <Clyybber> which is what should be done |
23:43:03 | mipri | Ruby - puppet, Rails (rip). Python - ML and big data libraries, Django (rip). JS - every website framework. the MEAN stack (please rip already) |
23:43:22 | Prestige | disruptek: ah. I think that would be something useful in the future, users would ask for |
23:43:22 | FromDiscord | <Clyybber> disruptek: But unfortunately that causes expected x but got void |
23:43:33 | disruptek | mipri: we have arraymancer and weave and no one gives a shit. |
23:43:42 | disruptek | it's not /better enough/. |
23:43:44 | FromDiscord | <Clyybber> you don't give one |
23:43:50 | FromDiscord | <Clyybber> never talk for others |
23:43:57 | disruptek | fine. |
23:44:02 | FromDiscord | <Recruit_main707> I don’t know what puppet nor rails is |
23:44:11 | disruptek | you're not missing anything. |
23:44:50 | disruptek | despite arraymancer and weave existing, i have not noticed a huge uptick in adoption. |
23:45:03 | disruptek | i'm speaking for myself, here. |
23:45:33 | disruptek | clyybber: why doesn't it get sem'd? |
23:45:54 | FromDiscord | <Clyybber> disruptek: digging into it as we speak |
23:46:00 | FromDiscord | <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:03 | disruptek | prestige: it's poor engineering practice. not something we want to promote. |
23:46:36 | Prestige | To not allow certain versions for dependencies? |
23:46:41 | disruptek | i'm just telling it like it is. i'm not sharing any expectation at all. |
23:47:03 | disruptek | we don't want to permit multiple versions of the same package in a single project. |
23:47:21 | disruptek | we want a flat namespace and a single version per dependency. |
23:47:29 | Prestige | nah, not the same project |
23:47:53 | disruptek | well, nimph lets you do the same operators for package versions as cargo. |
23:48:06 | Prestige | I mean if package foo is used in two different projects, but allow to use foo 1.0 or foo 1.2 |
23:48:07 | disruptek | depend on tags, branches, refs, versions, whatever the fuck. |
23:48:10 | FromDiscord | <Recruit_main707> Then yeah, nim in its current state it’s not ready to substitute c++ at a big scale |
23:48:16 | Prestige | Nice, that's good to hear |
23:48:50 | disruptek | prestige: that's merely "localdeps" in nimble. nimph supports any number of nimblePath specifications, local deps, whatever you want. |
23:49:36 | disruptek | but let's not talk about nimph, unless it's to discuss nimph-3.0. |
23:49:40 | disruptek | i don't want mipri to feel bad. |
23:50:12 | FromDiscord | <Recruit_main707> I still don’t see a major difference between nimble and cargo, except the package uploading |
23:50:30 | disruptek | i'm sure a lot of people feel that way. |
23:50:41 | mipri | *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:26 | Prestige | idek a use case for multiple versions in the same project, seems very weird |
23:51:29 | disruptek | it can be done in a safe way but whether it /should/ be done is an open area for research, afaic. |
23:51:59 | disruptek | it's not an issue at present because no one is willing to suffer dependencies in the first place. |
23:52:19 | mipri | Prestige: 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:37 | leorize | go solved this pretty nicely tbh |
23:52:37 | mipri | Prestige: the simple solution is that Little1 and Little2 get their own CrapUtils and neither BigLibrary nor your code cares. |
23:52:49 | disruptek | yes, nimph-3 will be pragma-based, only. |
23:52:52 | Prestige | mipri: ah, that is a good point |
23:53:22 | disruptek | it's "simple" until you have semantic differences between identical types. |
23:53:55 | leorize | go just forces incompatible versions to take on different names |
23:54:09 | disruptek | this doesn't solve the type problem. |
23:54:21 | leorize | it does |
23:54:26 | disruptek | especially when, as we expect, the future brings symbols that follow types. |
23:54:33 | leorize | pkg_v1.A != pkg_v2.A |
23:54:46 | disruptek | we don't have any way to do this in the compiler. |
23:54:59 | leorize | well I'm just saying how go does it |
23:55:04 | leorize | forcing different names |
23:55:17 | disruptek | yeah, go gets packaging correct as far as that goes. so to speak. |
23:55:50 | FromDiscord | <Quibono> Okay guys let’s move to go |
23:55:58 | Prestige | god no lol |
23:56:07 | disruptek | it gets shit on a lot here, but there's a lot to like. |
23:56:21 | FromDiscord | <dom96> Rust handles this scenario too. I think Nim will need to eventually too. |
23:56:38 | FromDiscord | <Clyybber> go's handling makes sense |
23:56:58 | FromDiscord | <Clyybber> and nim could already do it afaik |
23:57:01 | FromDiscord | <Clyybber> (edit) "afaik" => "afaict" |
23:57:07 | FromDiscord | <Clyybber> no compiler changes required |
23:57:25 | leorize | well go strapped the compiler and the package manager together |
23:57:29 | leorize | maybe that's the way to go |
23:57:29 | disruptek | no, because type identity is signature-based and signatures don't include versions or even symbol names. |
23:58:01 | disruptek | whatfer generic compression reasons and FFI. |
23:58:42 | disruptek | but 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:47 | disruptek | so, that's annoying. |
23:58:56 | FromDiscord | <Clyybber> its not annoying its sane |
23:59:07 | disruptek | why have a separate executable? |
23:59:36 | disruptek | that's all i mean by that. |
23:59:39 | FromDiscord | <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:46 | disruptek | because why? |