00:01:46 | * | dadada__ joined #nim |
00:14:28 | * | pbb quit (Ping timeout: 246 seconds) |
00:15:28 | * | pbb joined #nim |
00:24:58 | * | dadada__ quit (Ping timeout: 246 seconds) |
00:27:19 | * | lritter quit (Quit: Leaving) |
00:31:45 | * | dadada joined #nim |
00:32:09 | * | dadada is now known as Guest38675 |
00:46:49 | * | abm quit (Read error: Connection reset by peer) |
00:47:12 | zacharycarter | is it possible to define a task in nimscript that accepts args? |
00:47:26 | zacharycarter | I have a task that invokes another task and then a proc |
00:48:05 | zacharycarter | but the first nested task isn't executing the command I set with `setCommand` - only the command set inside the proc is executing |
00:48:21 | zacharycarter | I'm wondering if that's because it's a proc and not a task |
00:55:25 | * | Guest38675 quit (Ping timeout: 246 seconds) |
00:59:58 | zacharycarter | Meh I just used exec instead of setCommand |
01:01:47 | * | dadada__ joined #nim |
01:02:52 | leorize | zacharycarter: look at task source code |
01:02:56 | leorize | it's rather simple |
01:07:01 | zacharycarter | thanks |
01:08:18 | FromDiscord | <InventorMatt> if you have a seq like seq[parentclass] can it be used to store children classes and then call functions from the stored children? |
01:10:38 | leorize | I |
01:10:44 | leorize | I'm pretty sure we don't have classes |
01:10:55 | leorize | but I know what you meant, and the answer is yes |
01:12:33 | FromDiscord | <InventorMatt> yeah, I meant types. I've tried it but when I index the first position of the sequence and use that for the proc it says it is of the parent type and not the child type |
01:12:56 | leorize | you need to use `method` for dynamic dispatching |
01:18:20 | FromDiscord | <InventorMatt> yes, that solved it. thank you |
01:22:34 | * | exelotl quit (Ping timeout: 240 seconds) |
01:25:20 | * | dadada__ quit (Ping timeout: 256 seconds) |
01:26:39 | * | exelotl joined #nim |
01:31:42 | * | dadada joined #nim |
01:32:05 | * | dadada is now known as Guest33414 |
01:38:48 | FromGitter | <kaushalmodi> zacharycarter: β β > is it possible to define a task in nimscript that accepts args β β Yes [https://gitter.im/nim-lang/Nim?at=5eb609a75cd4fe50a3fba455] |
01:38:55 | FromGitter | <kaushalmodi> Did you already find a solution for that? |
01:39:14 | * | chemist69_ joined #nim |
01:41:19 | zacharycarter | kaushalmodi: no I just used a task and exec |
01:41:58 | zacharycarter | which is fine |
01:42:13 | * | chemist69 quit (Ping timeout: 264 seconds) |
01:55:27 | * | Guest33414 quit (Ping timeout: 260 seconds) |
02:01:02 | * | dddddd quit (Ping timeout: 256 seconds) |
02:01:43 | * | dadada__ joined #nim |
02:12:18 | * | mono joined #nim |
02:15:08 | * | monokrom quit (Ping timeout: 256 seconds) |
02:17:45 | * | muffindrake quit (Ping timeout: 240 seconds) |
02:20:07 | * | muffindrake joined #nim |
02:21:28 | FromGitter | <gogolxdong> what's the equivalent of union |
02:25:10 | * | dadada__ quit (Ping timeout: 260 seconds) |
02:26:47 | * | avatarfighter quit (Ping timeout: 244 seconds) |
02:28:47 | * | blueberrypie7 quit (Quit: leaving) |
02:31:48 | * | dadada joined #nim |
02:32:12 | * | dadada is now known as Guest23347 |
02:35:42 | shashlick | There's a union pragma |
02:41:00 | * | theelous3 quit (Read error: Connection reset by peer) |
02:47:28 | FromDiscord | <Rika> technically you can say an object variant can be a union |
02:48:26 | * | blueberrypie7 joined #nim |
02:50:25 | * | blueberrypie7 quit (Client Quit) |
02:51:26 | leorize | not really, an union don't have any memory protection |
02:51:30 | leorize | object variants do |
02:52:00 | * | jwm224 quit (Quit: WeeChat 2.9-dev) |
02:53:47 | * | jwm224 joined #nim |
02:55:13 | FromDiscord | <Rika> i mean yeah but theyre almost functionally equivalent if you only need function |
02:55:47 | * | blueberrypie joined #nim |
02:58:43 | * | avatarfighter joined #nim |
02:59:36 | * | zacharycarter quit (Quit: Lost terminal) |
03:04:58 | FromDiscord | <KingDarBoja> Hi Rika π |
03:14:16 | FromDiscord | <Broadwell> https://play.nim-lang.org/#ix=2ll5 |
03:15:34 | FromDiscord | <Broadwell> Python 3.8-style walrus operator |
03:16:36 | FromDiscord | <Rika> both arguments should be typed |
03:16:43 | FromDiscord | <Rika> you cant set an untyped variable anyway |
03:19:17 | FromDiscord | <Broadwell> https://github.com/broad-well/dimscommander/commit/3457ba514dd5223451fe25bd0eb997676846feb4 |
03:22:59 | FromDiscord | <KingDarBoja> Ah, the walrus |
03:23:26 | FromDiscord | <Broadwell> tbh I miss `if let` from Rust and Swift a little in this particular use case |
03:25:40 | * | zacharycarter joined #nim |
03:25:45 | zacharycarter | https://www.twitch.tv/zachary_carter streaming |
03:27:52 | FromDiscord | <Never Listen To Beef> Are you intentionally not streaming your entire screen? |
03:28:02 | zacharycarter | no lol |
03:28:07 | zacharycarter | hmm |
03:28:24 | zacharycarter | let me try to fix I'll bring the stream down for a sec |
03:32:49 | FromDiscord | <KingDarBoja> Let's see what u streaming |
03:32:58 | FromDiscord | <Never Listen To Beef> Seems it's how to obs |
03:33:25 | leorize[m] | @Broadwell: if (let a = expr(); a) <- that's Nim version |
03:33:26 | zacharycarter | obs is super annoying on macos apparently |
03:33:35 | FromDiscord | <Never Listen To Beef> ah |
03:34:04 | FromDiscord | <Never Listen To Beef> Is you stream output set to a 16:9 resolution? |
03:34:07 | FromDiscord | <Never Listen To Beef> Is your stream output set to a 16:9 resolution? |
03:34:21 | zacharycarter | let me check |
03:35:24 | FromDiscord | <Rika> @Broadwell passthrough ping `if (let a = expr(); a) <- that's Nim version` |
03:35:46 | FromDiscord | <Never Listen To Beef> Secondly you want to ensure your source is position properly and scaled to fit the obs recording window |
03:35:59 | FromDiscord | <Rika> obs is super buggy on anything that isnt windows |
03:36:10 | FromDiscord | <Never Listen To Beef> I find it runs smooth on linux so idk |
03:36:19 | FromDiscord | <Rika> i get flickering on mine |
03:36:32 | leorize | hmm, I need to benchmark I/O via async and I/O via threads |
03:36:34 | FromDiscord | <Never Listen To Beef> I've never streamed, so idk if streaming is bad |
03:36:36 | FromDiscord | <Rika> lmao that screen |
03:36:48 | leorize | what are the metrics should I take note on? |
03:37:23 | zacharycarter | it'd be nice if there was a way to preview what it'd look like on stream |
03:37:28 | FromDiscord | <Never Listen To Beef> there is |
03:37:40 | FromDiscord | <Never Listen To Beef> Unless mac doesnt have it |
03:38:04 | zacharycarter | alright hopefully this fixes it |
03:38:12 | FromDiscord | <Never Listen To Beef> Yea it's proper now |
03:38:17 | FromDiscord | <Never Listen To Beef> *Sorry i pointed it out* π |
03:38:37 | zacharycarter | lol thanks for doing so |
03:38:45 | FromDiscord | <Broadwell> leorize: I mean also unwrapping an Option[T] in the process |
03:38:53 | zacharycarter | now my machine is laggy af |
03:39:03 | zacharycarter | probably need to downsample more |
03:39:12 | FromDiscord | <Rika> is it me or is your screen stretched |
03:39:24 | FromDiscord | <Rika> your screen's prolly one of those imacs with non 19:9 |
03:39:29 | zacharycarter | yeah I scaled it let me fix it |
03:39:31 | FromDiscord | <Rika> 16* |
03:39:43 | FromDiscord | <Never Listen To Beef> Yea might explain the original issue |
03:39:49 | zacharycarter | I think it's 16:10 |
03:40:36 | zacharycarter | okay that's better |
03:40:51 | zacharycarter | but I just messed up the stream again lol |
03:40:52 | zacharycarter | sec |
03:40:52 | FromDiscord | <Never Listen To Beef> The stream is like 3 minutes behind π |
03:41:13 | FromDiscord | <KingDarBoja> woa, your viewport is big |
03:41:44 | zacharycarter | lol |
03:43:22 | FromDiscord | <Rika> how big is your monitor |
03:43:31 | FromDiscord | <Never Listen To Beef> About that big |
03:43:43 | FromDiscord | <Rika> ah i see |
03:43:46 | FromDiscord | <Rika> mm |
03:48:53 | FromDiscord | <KingDarBoja> RIP stream |
03:49:02 | FromDiscord | <Never Listen To Beef> Im a terrible person |
03:49:07 | FromDiscord | <Never Listen To Beef> I regret everything |
03:49:30 | FromDiscord | <Rika> F |
03:50:14 | FromDiscord | <Never Listen To Beef> We're live with fullscreen blackbars |
03:50:18 | FromDiscord | <Never Listen To Beef> That's good enough! |
03:50:37 | zacharycarter | lol |
03:50:41 | zacharycarter | okay |
03:50:53 | zacharycarter | let me kill this browser tab it's destroying my cpu |
03:51:10 | FromDiscord | <Never Listen To Beef> *What a poster for owning a mac* |
03:51:12 | zacharycarter | hopefully this is better |
03:51:18 | zacharycarter | it was free at least |
03:51:19 | FromDiscord | <Rika> > We're live with fullscreen blackbars |
03:51:19 | FromDiscord | <Rika> well i mean he uses a non-16:9 screen so thats natura |
03:51:49 | FromDiscord | <Rika> are you running at like 1 fps? |
03:51:53 | zacharycarter | I dunno if I google retina resolution for this size mbp it's like 2880x something but still 16:10 |
03:52:01 | zacharycarter | I probably need to turn down encoding now |
03:53:30 | FromDiscord | <Rika> its in output |
03:53:48 | zacharycarter | is 2500kb/s even high? |
03:53:53 | FromDiscord | <Never Listen To Beef> Does mac not have gpu based encoding? |
03:53:56 | zacharycarter | kbps* |
03:54:08 | zacharycarter | apparently not... |
03:54:25 | FromDiscord | <Never Listen To Beef> Only CPU under Encoder? |
03:54:31 | zacharycarter | yeah :/ |
03:55:34 | zacharycarter | well this seems better at least |
03:55:41 | zacharycarter | maybe |
03:55:44 | FromDiscord | <Rika> 2.5k is very high |
03:55:47 | FromDiscord | <Rika> especially for coding |
03:55:52 | zacharycarter | okay what should I set it at? |
03:55:56 | FromDiscord | <Rika> coding can prolly go away with something like 1.5k |
03:56:07 | zacharycarter | alright let me see if that's workable |
03:56:08 | FromDiscord | <Rika> or even 1k if you dont switch tabs often |
03:56:24 | zacharycarter | if not fuck this and I'll set up my desktop tomorrow |
03:56:28 | FromDiscord | <Rika> oof |
03:56:35 | FromDiscord | <Rika> @Never Listen To Beef i blame you lol (i kid0 |
03:56:49 | FromDiscord | <Never Listen To Beef> Good i accept blame |
03:56:59 | FromDiscord | <Gary M> I appear too hello |
03:57:03 | zacharycarter | hmm |
03:57:10 | zacharycarter | well it's much more responsive on my end |
03:57:20 | FromDiscord | <Rika> looks good |
03:57:34 | zacharycarter | cool |
03:57:37 | FromDiscord | <Gary M> I blame Rika to be honest |
03:57:49 | FromDiscord | <Rika> smh |
03:58:05 | zacharycarter | ooph audio is crushing my cpu |
03:58:08 | FromDiscord | <Rika> you havent even been here for a few minutes today how could you blame me |
03:58:10 | FromDiscord | <Never Listen To Beef> Know what the best part is? Im heading off now |
03:58:15 | zacharycarter | lol |
03:58:23 | FromDiscord | <Rika> what kinda weak ass cpu do you have lmao |
03:58:26 | zacharycarter | night thanks for the *cough* help *cough* |
03:58:26 | FromDiscord | <Gary M> See what you caused rika |
03:58:44 | zacharycarter | whatever a 2019 15 inch macbook pro comes with |
03:58:47 | zacharycarter | a free from work one |
03:58:49 | FromDiscord | <Never Listen To Beef> Well zach once frag works on linux you can repay the help |
03:59:01 | zacharycarter | :D |
03:59:19 | FromDiscord | <Gary M> No help with my Vulkan stuff first |
03:59:33 | zacharycarter | fuck vulkan |
03:59:35 | zacharycarter | don't use it |
03:59:41 | FromDiscord | <Gary M> That's the spirit, now come help out |
03:59:50 | FromDiscord | <Gary M> :) |
04:00:12 | FromDiscord | <Gary M> I'm at least 5% of the way towards rendering a triangle |
04:00:45 | zacharycarter | https://twitch.tv/zachary_carter I will yell at you aboult vulkan there |
04:01:04 | FromDiscord | <Gary M> Right now? |
04:01:12 | zacharycarter | sure |
04:01:14 | zacharycarter | I'm streaming now |
04:01:28 | FromDiscord | <Gary M> Once you get done yelling you should join my repo and help me thread this shit |
04:01:46 | zacharycarter | I will help you - stop using vulkan |
04:01:49 | zacharycarter | you don't need it |
04:01:51 | zacharycarter | just use OpenGL |
04:01:51 | FromDiscord | <Gary M> Lol |
04:01:54 | zacharycarter | or sokol or something |
04:02:03 | zacharycarter | if you really want vulkan use bgfx |
04:02:07 | FromDiscord | <Gary M> graphics.h really |
04:02:11 | zacharycarter | then at least you don't have to worry about vulkan |
04:02:29 | FromDiscord | <Gary M> Nim bgfx isn't working on Linux |
04:02:40 | zacharycarter | well that's probably easy enough to fix |
04:02:59 | zacharycarter | I just don't use bgfx anymore or linux |
04:03:05 | zacharycarter | but I bet it's due to linking bullshit |
04:03:22 | zacharycarter | that's pretty much what every shared library issue boils down to on linux |
04:03:51 | FromDiscord | <Gary M> Well I got sdl and Vulkan basically working on windows and Linux so far |
04:04:07 | FromDiscord | <Gary M> Just very basic shit, enumerating devices and getting queues |
04:04:41 | FromDiscord | <Gary M> Oh and loading a compute shader that I haven't been able to try yet |
04:04:45 | zacharycarter | yeah and once you get to managing memory you'll want to jump out of a window |
04:05:02 | zacharycarter | why do you need vulkan? |
04:05:09 | zacharycarter | that's the question to ask yourself |
04:05:19 | zacharycarter | unless you just are trying to learn it |
04:05:20 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
04:05:26 | zacharycarter | and in that case maybe use clyybber's bindings |
04:06:01 | * | supakeen quit (Quit: WeeChat 1.9.1) |
04:06:39 | * | supakeen joined #nim |
04:07:52 | FromDiscord | <Gary M> I am using clyybbers bindings |
04:08:08 | zacharycarter | well still ask yourself that question |
04:08:17 | zacharycarter | if it's just for learning cool - if it's because you want to actually make a game |
04:08:20 | FromDiscord | <Gary M> The nimsl bindings are wrong in at least a few places |
04:08:27 | zacharycarter | nimsl? |
04:08:39 | FromDiscord | <Gary M> Uh whatever the Nim opengl stuff was hold on |
04:08:59 | FromDiscord | <Gary M> Sorry nimgl |
04:09:02 | FromDiscord | <Gary M> https://github.com/nimgl/vulkan |
04:09:12 | FromDiscord | <Gary M> Some things like incorrect bit flags |
04:09:37 | zacharycarter | oh yeah I dunno I don't use any of these libraries |
04:09:50 | FromDiscord | <Gary M> But no I'm not in it to make a game right now. |
04:10:07 | FromDiscord | <Gary M> I actually really like real-time rendering techniques |
04:10:46 | FromDiscord | <Gary M> I go nuts over a good PBR shader but @Elegant Beef hardly sees the reason for anything more than unlit |
04:11:52 | zacharycarter | well just use my engine when it's done :P |
04:12:01 | FromDiscord | <Gary M> No just use mine when it's done |
04:12:03 | zacharycarter | it will have hot reloading of shaders via reflection |
04:12:04 | zacharycarter | heh |
04:12:10 | zacharycarter | mine is a lot further along than yours |
04:12:19 | zacharycarter | I'm rendering a cube |
04:12:21 | FromDiscord | <Gary M> Yeah well come help on mine |
04:12:23 | zacharycarter | a rotating one at that |
04:12:28 | zacharycarter | nooooo |
04:12:29 | FromDiscord | <Gary M> I'm rendering text to a terminal |
04:12:36 | FromDiscord | <KingDarBoja> You truly code like a hacker π π |
04:12:39 | zacharycarter | I already have a fiber based job system and hot code reloading |
04:12:54 | FromDiscord | <Gary M> Nim has hot code reloading built in though |
04:12:57 | zacharycarter | and multi threaded command buffers |
04:13:01 | zacharycarter | I have working hot code reloading |
04:13:14 | FromDiscord | <Gary M> Well come shove that into my superior Vulkan framework |
04:13:16 | zacharycarter | jump on the stream I'll show you |
04:13:20 | zacharycarter | I don't want to use vulkan lol |
04:13:24 | zacharycarter | it's needlessly complicated |
04:13:24 | FromDiscord | <Gary M> Once I can spin a cuboid around |
04:13:30 | shashlick | Sounds trollish |
04:14:02 | FromDiscord | <Gary M> Trollish? I'm joking about him helping because he clearly doesn't like Vulkan, but I am definitely working with sdl2 and Vulkan in Nim. |
04:14:11 | * | narimiran joined #nim |
04:14:35 | FromDiscord | <Gary M> Main thing is I'm not 100% on translating the whole C multithreading stuff over to Nim |
04:15:19 | FromDiscord | <Gary M> Sdl2 is working well enough, and the bindings are well documented |
04:15:48 | FromDiscord | <Gary M> https://github.com/Vladar4/sdl2_nim Vladar's bindings, anyways |
04:16:04 | zacharycarter | yeah |
04:16:10 | zacharycarter | I just use sokol it's a single header and does what I need |
04:16:16 | zacharycarter | no dynamic linking |
04:16:18 | * | narimiran quit (Client Quit) |
04:16:27 | yumaikas | Anyone have any recommendations as far as image resizing in Nim goes? Building a Chore Management system for my wife and I in Jester, and was thinking it'd be cool to be able to upload pictures of the various plants we're taking care of, but don't want to be downloading hi-rez images all the time |
04:16:56 | yumaikas | The only google search I came across talked about wrappers around DevIL? |
04:17:49 | FromDiscord | <Gary M> Are you handling input polling with sokol too? |
04:17:52 | zacharycarter | maybe stb img |
04:18:05 | zacharycarter | yeah it handles that for you as well |
04:19:12 | FromDiscord | <Gary M> I actually wanted to get some sort of bindings working for diligent engine which is like modern bgfx |
04:19:23 | FromDiscord | <Gary M> But boyo I am not smart enough to get any of that working with nim |
04:19:24 | zacharycarter | I'd just use bgfx |
04:19:42 | zacharycarter | or whatever that other library is |
04:19:50 | zacharycarter | but I mean dilligent and the one I'm referring to are C++ |
04:20:17 | zacharycarter | or magnum |
04:20:31 | FromDiscord | <Gary M> Yes but the diligent DLL's have a C api too |
04:22:11 | zacharycarter | oh |
04:22:19 | zacharycarter | well bgfx is probably still more mature |
04:22:31 | zacharycarter | I dunno what makes dilligent engine better than bgfx |
04:23:31 | zacharycarter | https://github.com/ConfettiFX/The-Forge |
04:23:34 | zacharycarter | that's the one I was thinking of |
04:23:40 | zacharycarter | no C api yet though as far as I'm aware |
04:23:43 | zacharycarter | not a first party one anyway |
04:24:03 | FromDiscord | <Gary M> Yeah that's a good one but there's so much built into it |
04:24:18 | FromDiscord | <Gary M> It would be easier to just work with c++ with that |
04:24:54 | FromDiscord | <Gary M> Diligent Engine does have a direct "why not bgfx" thing on their homepage |
04:25:19 | FromDiscord | <Gary M> Basically better abstractions and multithreaded yada yada, bad paraphrasing |
04:35:24 | yumaikas | So, no recommendations for image resizing? |
04:35:34 | zacharycarter | yumaikas I said stb image |
04:35:45 | yumaikas | ah |
04:38:49 | FromDiscord | <flywind> !repo imageman |
04:38:50 | disbot | https://github.com/SolitudeSF/imageman -- 9imageman: 11Image manipulation library 15 34β 3π΄ |
04:40:25 | * | Guest23347 quit (Ping timeout: 256 seconds) |
04:44:36 | * | dadada joined #nim |
04:45:00 | * | dadada is now known as Guest30031 |
04:52:06 | * | ptdel joined #nim |
05:07:20 | yumaikas | Thanks for the recommedation, flywind |
05:08:28 | yumaikas | (Imageman + a copy of libjpeg/libpng from my red eclipse 2 install, and I'm off to the races) |
05:08:37 | * | Guest30031 quit (Ping timeout: 264 seconds) |
05:11:18 | * | exelotl quit (Ping timeout: 260 seconds) |
05:16:46 | * | dadada__ joined #nim |
05:25:35 | * | Romanson joined #nim |
05:40:37 | * | dadada__ quit (Ping timeout: 260 seconds) |
05:46:48 | * | dadada joined #nim |
05:47:12 | * | dadada is now known as Guest7950 |
05:49:15 | * | ertp07 joined #nim |
05:50:25 | * | rockcavera quit (Remote host closed the connection) |
06:03:54 | * | kungtotte quit (Read error: Connection reset by peer) |
06:03:57 | * | avatarfighter quit (Ping timeout: 260 seconds) |
06:05:06 | * | kungtotte joined #nim |
06:10:52 | * | Guest7950 quit (Ping timeout: 256 seconds) |
06:12:21 | FromDiscord | <Yardanico> Also see https://github.com/treeform/flippy |
06:12:42 | zacharycarter | no |
06:13:52 | * | terps joined #nim |
06:16:40 | * | dadada__ joined #nim |
06:17:08 | zacharycarter | Yardanico: I was streaming but I'ma bout to go to sleep I think |
06:18:32 | FromDiscord | <Yardanico> I just woke up |
06:19:01 | zacharycarter | good morning! |
06:19:08 | zacharycarter | it's 1:19am here - I'll probably stay up until 2 |
06:25:56 | skrylar[m] | walrus operator? |
06:26:13 | zacharycarter | ??? |
06:26:44 | skrylar[m] | its in chat history |
06:26:58 | zacharycarter | oh haha |
06:27:56 | skrylar[m] | oh its the assignment operator |
06:28:22 | zacharycarter | seems pretty useless to me |
06:28:27 | skrylar[m] | tsk. the best part about 'get what youre given' languages is they either never have all the stuff you need or the spec inevitably plumes to depths that would make constitutional lawyers weep. |
06:28:58 | skrylar[m] | nim is getting a bit long in the tooth in some ways but, eh. |
06:31:26 | FromDiscord | <Rika> bruh, i'm shooting myself in the foot with nim because i dont know what im doing (using c library) lmao |
06:31:54 | zacharycarter | just use zig |
06:32:06 | zacharycarter | trying to turn this into a meme |
06:32:15 | skrylar[m] | mov [zig], mov [zig], for great justice take off every zig! |
06:32:23 | FromDiscord | <Rika> xd no thanks, zig wouldnt fix what shit i'm doing |
06:32:36 | zacharycarter | yeah but it can cross compile your shit |
06:33:11 | skrylar[m] | i found zig uninspiring ._. |
06:33:48 | zacharycarter | it inspired you enough to decide you were uninspired about it |
06:33:59 | FromDiscord | <Rika> ive said this before and zig is basically inverse nim isnt it? |
06:34:15 | skrylar[m] | eh i've used basically everything. nim isn't like "WOW SO HYPE" but it .. doesn't suck, and everything just mostly works, and thats good enough. |
06:34:18 | zacharycarter | Zig is supposed to be a better C |
06:34:34 | zacharycarter | so maybe eventually Zig becomes a backend for Nim |
06:34:49 | zacharycarter | but it's not really apples to apples with Nim |
06:35:10 | FromDiscord | <Rika> so are you implying zig sucks, skry? |
06:35:10 | skrylar[m] | for me the 'no fun allowed' requirement killed it. i like to overload operators. |
06:35:29 | FromDiscord | <Rika> that's the point of zig though isnt it |
06:35:33 | skrylar[m] | yes |
06:35:40 | skrylar[m] | the point of zig is not to have any fun |
06:35:44 | skrylar[m] | the point of ruby is to have much fun |
06:35:50 | FromDiscord | <Rika> lmao |
06:35:56 | zacharycarter | I actually enjoy writing Zig |
06:36:24 | zacharycarter | I don't enjoy that the language is so immature and so much is still missing |
06:36:32 | zacharycarter | but I think it has a bright future |
06:38:01 | skrylar[m] | i think v has a better idea in conceding nobody wants to write vector_add(a, vector_add(b, c)) |
06:38:15 | zacharycarter | v is vaporware |
06:38:34 | skrylar[m] | vaporware that you can download and use and has active commits :thonkang: |
06:38:44 | zacharycarter | it's just a giant scam - nothing should be compared to V because V is just a giant scam |
06:38:45 | skrylar[m] | i suppose your favorite toolchain is jai then |
06:38:57 | zacharycarter | V is about as useful as Jai |
06:39:07 | skrylar[m] | v actually works tho. |
06:39:13 | zacharycarter | does it? |
06:39:20 | zacharycarter | have you written anything in V? |
06:39:25 | skrylar[m] | i've downloaded and tested it, so yes. |
06:39:45 | skrylar[m] | jai has no toolchain at all and its been 5+ years of "JOHNATHAN BLOW IS GONNA BLOW YOUR SOCKS OFF someday" |
06:39:57 | zacharycarter | yeah and V is essentially the same shit |
06:39:58 | * | exelotl joined #nim |
06:40:07 | zacharycarter | very little that the author of the language claims to exist actually does |
06:40:10 | skrylar[m] | except you can download a v compiler, code with it and the code runs |
06:40:15 | zacharycarter | it didn't even have an AST until late 2019 |
06:40:22 | * | dadada__ quit (Ping timeout: 272 seconds) |
06:40:32 | * | Hideki joined #nim |
06:40:38 | zacharycarter | the V compiler wasn't really a compiler and still isn't really |
06:40:39 | * | solitudesf joined #nim |
06:40:49 | skrylar[m] | :okay: |
06:40:55 | * | Hideki is now known as Guest82081 |
06:41:02 | FromGitter | <sheerluck> zacharycarter I tried to install Zig but it wants me to recompile llvm with *all* LLVM_TARGETS enabled and I refuse to do it :( |
06:41:12 | FromDiscord | <Yardanico> You don't need do |
06:41:19 | FromDiscord | <Yardanico> You can just download the latest archive |
06:41:22 | zacharycarter | I just don't think we need to rehash the V discussion |
06:41:35 | zacharycarter | anyone who has followed V's development for a while knows how shady that project is |
06:41:39 | zacharycarter | or should know anyway |
06:42:18 | FromDiscord | <Rika> my opinion on V is that i think its sketch, but i also think that the image of it being sketch is sketch |
06:42:40 | skrylar[m] | my opinion is based purely on what i downloaded and ran |
06:43:13 | zacharycarter | it is basically a C transpiler |
06:43:33 | skrylar[m] | i still haven't gotten beef to work due to chicanery |
06:43:35 | zacharycarter | for a long time it didn't do any type analysis and have an AST |
06:43:50 | zacharycarter | it can compile doom *clap* |
06:44:36 | skrylar[m] | this conversation is more mind numbing than porting hashes |
06:44:38 | * | Guest82081 quit (Remote host closed the connection) |
06:45:04 | zacharycarter | should port some to V |
06:46:38 | * | ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
06:46:44 | * | dadada joined #nim |
06:47:08 | * | dadada is now known as Guest5491 |
06:47:14 | skrylar[m] | one can only wonder what problems Rika was having |
06:51:57 | FromDiscord | <Rika> skrylar: i'm trying to figure out how to use liblzma and i'm just fucking up so much i accidentally allocate a few gigabytes of ram in seconds |
06:52:46 | Yardanico | if you only need decompression you can look into my osureplay |
06:52:56 | FromDiscord | <Rika> https://github.com/kobolabs/liblzma/blob/master/doc/examples/02_decompress.c#L149-L161 trying to figure this out |
06:53:01 | Yardanico | I just embed easylzma in nim and wrap two compress/decompress procs |
06:53:05 | FromDiscord | <Rika> Yardanico: but i wanna figure this out |
06:54:37 | Yardanico | what's the problem? |
06:54:57 | Yardanico | the C code you linked just does buffered decompression |
06:55:05 | FromDiscord | <Rika> i know |
06:55:11 | FromDiscord | <Rika> i dont understand how to repeat that in nim |
06:55:20 | Yardanico | what part exactly? |
06:55:26 | FromDiscord | <Rika> the whole thing i linked |
06:55:30 | FromDiscord | <Rika> it has highlighted lines |
06:55:41 | Yardanico | well I don't understand what's the issue really |
06:55:52 | Yardanico | yo need to wrap lzma_stream in nim side |
06:55:56 | Yardanico | and then just do the same as the C code |
06:56:04 | Yardanico | you can also use fwrite directly |
06:56:19 | FromDiscord | <Rika> `just do the same as the C code` is the part i cannot figure out.. |
06:56:22 | FromDiscord | <Rika> w/e |
06:56:26 | FromDiscord | <Rika> disregard |
06:56:33 | FromDiscord | <Rika> ill figure this out somehow |
06:56:48 | skrylar[m] | the highlighted lines just copy from a buffer tho |
06:56:59 | FromDiscord | <Rika> ***i know*** |
06:57:03 | Yardanico | I was too lazy so I just wrapper easylzma https://github.com/Yardanico/nim-osureplay/blob/master/src/lzma.nim |
06:57:08 | FromDiscord | <Rika> christ stop trying to help me |
06:57:23 | Yardanico | well don't link stuff if you don't expect help :P |
06:57:25 | Yardanico | or comments |
06:57:33 | FromDiscord | <Rika> i expected help i get jack shit |
06:57:44 | skrylar[m] | oh dear. |
06:57:49 | FromDiscord | <Rika> just stop |
06:58:11 | zacharycarter | I didn't know robots needed help |
06:58:16 | zacharycarter | robot clones I mean |
06:58:19 | skrylar[m] | i'm going to uh, come back tomorrow. |
06:58:53 | zacharycarter | maybe V will have mutability working by then |
06:59:19 | Yardanico | wait what LMAO |
06:59:29 | Yardanico | zacharycarter: I was streaming for 14 hours |
06:59:34 | Yardanico | basically disruptek's stream page |
06:59:43 | zacharycarter | lol |
06:59:50 | Yardanico | 14 hours 40 minutes |
07:00:27 | zacharycarter | syndication |
07:01:02 | Yardanico | and I got two twitch achievements |
07:01:08 | zacharycarter | lol |
07:02:59 | FromDiscord | <Rika> agfbhgs i just forgot to translate a line apparently |
07:03:07 | FromDiscord | <Rika> sorry |
07:03:09 | FromDiscord | <Never Listen To Beef> You're welcome |
07:03:16 | FromDiscord | <Rika> programming can get irritating at times |
07:06:00 | * | avatarfighter joined #nim |
07:06:23 | Yardanico | I'm gonna stream anyway (nobody will watch me tho), some random Nim stuff but with a mic and moosic just like disrupt_k |
07:07:11 | zacharycarter | I think I'm doing that now |
07:07:14 | zacharycarter | but I have no idea |
07:07:16 | zacharycarter | obs says I am |
07:07:40 | zacharycarter | make sure you do yours in a dump truck |
07:08:16 | Yardanico | sure |
07:08:26 | zacharycarter | niceeee |
07:10:35 | * | Guest5491 quit (Ping timeout: 256 seconds) |
07:14:37 | Yardanico | ~ystream |
07:14:37 | disbot | ystream: 11stream at https://www.twitch.tv/yardanico, voice chat at mumble://uberalles.mumbl.io/ -- Yardanico |
07:14:38 | Yardanico | :D |
07:15:11 | zacharycarter | ~zstream |
07:15:12 | disbot | no footnotes for `zstream`. π |
07:15:16 | zacharycarter | lameeeeee |
07:16:44 | * | dadada__ joined #nim |
07:23:40 | FromDiscord | <Rika> make one, `~zstream is (enter text)` |
07:26:16 | * | zacharycarter quit (Quit: Lost terminal) |
07:36:37 | shashlick | some more easy reading https://github.com/nimterop/nimterop/blob/pragmas/README.md#header-vs-dynlib |
07:40:32 | * | dadada__ quit (Ping timeout: 272 seconds) |
07:46:46 | * | dadada joined #nim |
07:47:09 | * | dadada is now known as Guest8188 |
07:57:06 | FromGitter | <sheerluck> off-topic "breaking news" slowpoke style: GCC-10 has been released. |
08:10:19 | * | terps quit (Ping timeout: 258 seconds) |
08:10:28 | * | Guest8188 quit (Ping timeout: 246 seconds) |
08:16:47 | * | dadada__ joined #nim |
08:17:00 | FromGitter | <bung87> !repo datetime_parse |
08:17:01 | disbot | https://github.com/bung87/datetime_parse -- 9datetime_parse: 11datetime parse in Nim 15 0β 0π΄ |
08:37:58 | FromDiscord | <Rika> nim has no datetime parsing? |
08:38:12 | FromGitter | <Bennyelg> any easy way to patch module so I can mock the component? |
08:38:47 | * | avatarfighter quit (Ping timeout: 244 seconds) |
08:38:56 | Yardanico | @Rika it does |
08:39:14 | FromDiscord | <Rika> ah, bung87's package just detects format automatically |
08:39:30 | FromDiscord | <Rika> wonder if it can also do japanese time format eg. 16ζ09ε51η§ |
08:39:58 | * | idf joined #nim |
08:40:34 | * | dadada__ quit (Ping timeout: 246 seconds) |
08:41:44 | * | konvertex joined #nim |
08:42:37 | FromGitter | <bung87> I tried Numbers convert material's datetime it cant cover all case, so I wrote this |
08:43:01 | FromGitter | <bung87> excel on windows may also does like this. |
08:43:25 | * | livcd joined #nim |
08:44:06 | FromGitter | <bung87> and it is also a npm package, so when js developer check the repo url , they will see this repo 98% write in Nim |
08:45:41 | FromGitter | <bung87> it may surprise them :) |
08:46:43 | * | dadada joined #nim |
08:47:06 | * | dadada is now known as Guest97466 |
08:47:19 | FromDiscord | <Rika> nice |
08:53:37 | * | ertp07 quit (Ping timeout: 264 seconds) |
08:53:53 | * | ertp07 joined #nim |
08:54:08 | * | gangstacat quit (Quit: Δis!) |
08:58:21 | * | ertp07 quit (Read error: Connection reset by peer) |
08:58:58 | * | ertp07 joined #nim |
09:00:46 | * | ertp07 quit (Read error: Connection reset by peer) |
09:01:06 | * | ertp07 joined #nim |
09:03:43 | * | Hideki joined #nim |
09:04:06 | * | Hideki is now known as Guest86670 |
09:08:29 | Yardanico | btw, if someone has clang on linux, I made a simple script to compile the compiler with PGO (no LTO because PGO+LTO breaks the compiler for some reason) |
09:08:30 | Yardanico | https://github.com/Yardanico/nim-snippets/blob/master/compile_nim_pgo.sh |
09:08:39 | Yardanico | it uses arraymancer, npeg and compiler itself to get profiling data |
09:09:21 | FromDiscord | <Rika> is pgo better than lto? |
09:09:34 | Yardanico | they're different |
09:09:42 | FromDiscord | <Rika> i mean, for their use |
09:09:50 | Yardanico | they can be used together |
09:09:54 | FromDiscord | <Rika> okay |
09:10:01 | Yardanico | PGO makes optimizations based on runtime profiling |
09:10:44 | * | Guest97466 quit (Ping timeout: 256 seconds) |
09:11:51 | Yardanico | LTO analyzes the whole program (on linker stage) and does stuff like inlining and other, I'm not really a pro at that |
09:12:20 | Yardanico | but with PGO the compler (when you compile the final version based on PGO profiling) will actually _know_ which functions are used the most, which code paths are the most hot ones |
09:12:25 | Yardanico | and do inlining or other optimizations based on that info |
09:13:14 | * | Guest86670 quit (Remote host closed the connection) |
09:13:15 | Yardanico | like CPython does PGO too, they run the whole test suite to get PGO data |
09:13:57 | Yardanico | but even for nim you can get ~20-25% compiler perf boost with PGO |
09:14:16 | Yardanico | for Nim compiler stage (not C compiler stage) |
09:14:28 | Yardanico | although I didn't do --compileOnly so PGO could analyze the codegen backends too |
09:15:13 | * | ertp07 quit (Ping timeout: 264 seconds) |
09:16:44 | * | dadada__ joined #nim |
09:17:10 | Yardanico | well it will vary, but mostly projects which use a lot of macros, generics, static will benefit I think |
09:18:21 | FromDiscord | <Rika> oh i see |
09:19:41 | Yardanico | I'm testing different projects and I see 10-20% diff (time to do nim c -d:danger --compileOnly) |
09:20:18 | Yardanico | and you get it for free (no need to optimize the compiler itself), although as c-blake pointed out on the forum, the way C code made by nim compiler is structured may help PGO/LTO |
09:23:26 | * | ertp07 joined #nim |
09:40:32 | * | dadada__ quit (Ping timeout: 256 seconds) |
09:46:53 | * | dadada joined #nim |
09:47:16 | * | dadada is now known as Guest60858 |
09:53:19 | * | waleee-cl joined #nim |
09:55:45 | FromGitter | <Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5eb67e21b6dd230697b6a833] |
09:56:15 | Yardanico | we need context :) |
09:56:17 | FromDiscord | <Rika> ? |
09:56:18 | FromDiscord | <Rika> yeah |
09:57:33 | FromDiscord | <Rika> Bennyelg, uh, can you give us code or something? type definitions, proc definitions, etc |
10:00:00 | FromGitter | <Bennyelg> Fixed, thanks, next time Ill post more code <# |
10:00:01 | FromGitter | <Bennyelg> <3 |
10:11:01 | * | Guest60858 quit (Ping timeout: 264 seconds) |
10:13:14 | * | krux02 joined #nim |
10:16:47 | * | dadada__ joined #nim |
10:29:23 | skrylar[m] | so this newruntime stuff. is that still happening or is it a weird parallel world |
10:32:09 | * | ertp07 quit (Ping timeout: 258 seconds) |
10:32:31 | Yardanico | skrylar[m]: arc and destructors are there |
10:34:28 | * | ertp07 joined #nim |
10:35:52 | Yardanico | skrylar[m]: https://forum.nim-lang.org/t/5814#36054 |
10:35:59 | Yardanico | "--gc:arc ~~ shared_ptr done right" "--newruntime ~~ unique_ptr done right" |
10:39:05 | skrylar[m] | that thread seems to say i should continue to ignore it entirely |
10:40:24 | dom96 | hmm, seems the playground just died |
10:40:39 | Yardanico | hmm yeah |
10:40:44 | Yardanico | rip |
10:40:56 | Yardanico | how stable is the playground btw? |
10:41:01 | * | dadada__ quit (Ping timeout: 264 seconds) |
10:41:06 | Yardanico | and the forum |
10:41:25 | dom96 | no idea about playground, that's PMunch's responsibility :P |
10:41:28 | dom96 | the forum is very stable |
10:41:42 | dom96 | better uptime than Github I bet |
10:42:05 | Yardanico | haha |
10:42:46 | skrylar[m] | too bad reset password sitll doesn't work for 2 years now |
10:43:02 | Yardanico | dom96: is there any ETA for when we'll get the next forum update? |
10:43:24 | Yardanico | I know categories are already merged, but the frontend itself has a JS file made in 2018 |
10:43:36 | Yardanico | with nim 0.18.1 :D |
10:43:59 | dom96 | skrylar[m], oh? in what way does it not work? |
10:44:10 | dom96 | Yardanico, my game takes priority :P |
10:44:28 | skrylar[m] | dom96: it sends me a token to reset, accepts a new password, then doesn't let you log in with the new password |
10:46:40 | * | dadada joined #nim |
10:47:03 | * | dadada is now known as Guest82102 |
10:47:08 | * | Hideki joined #nim |
10:47:31 | * | Hideki is now known as Guest90612 |
10:48:18 | dom96 | skrylar[m], hrm, true, just tested it. Did you make a bug report? |
10:50:11 | skrylar[m] | i've told you about this directly several times now ΰ² _ΰ² |
10:50:46 | dom96 | lol |
10:51:05 | dom96 | Make a bug report next time |
10:53:21 | skrylar[m] | make an account somewhere else to report a bug to be able to log in to an account on a site trying to be used in the first place |
10:53:30 | skrylar[m] | god help anyone who gets socked with your sense of UX |
10:54:30 | skrylar[m] | xxhash32 and xxhash64 ported. need to clean up the user facing api a little and look for some test vectors |
10:54:52 | dom96 | That's a side effect of this being an open source project |
10:55:24 | dom96 | If you spent half as much time contributing as complaining then things might just be a little bit better for all of us |
10:55:51 | * | solitudesf- joined #nim |
10:56:29 | skrylar[m] | oh i'm sorry. i hadn't realized all of the code i've been releasing apparently didn't exist |
10:56:38 | * | solitudesf quit (Ping timeout: 260 seconds) |
10:56:49 | FromDiscord | <Rika> o_o |
10:59:10 | * | solitudesf- is now known as solitudesf |
10:59:17 | Yardanico | solitudesf: poor dash |
11:00:17 | dom96 | Yeah, that's great and all, now try again with projects you don't actually want to work on. |
11:02:44 | * | fredrikhr joined #nim |
11:02:49 | skrylar[m] | you are clearly set to be a prat, and i'm sure you will regret that in time |
11:04:28 | dom96 | You're the one who's complaining about the poor UX as if I am personally responsible for all the problems with nimforum. |
11:06:13 | * | exelotl quit (Ping timeout: 264 seconds) |
11:06:14 | * | Guest82102 quit (Ping timeout: 240 seconds) |
11:07:26 | skrylar[m] | literally a siteop, so yes. |
11:08:12 | * | dadada__ joined #nim |
11:09:21 | dom96 | Are you under the impression that I am employed to do this? |
11:12:05 | skrylar[m] | well if "literally unusable" is you standard, then id frankly be glad to hear you aren't |
11:12:19 | skrylar[m] | which it is, so i have nothing more to say on the matter |
11:19:39 | FromGitter | <Bennyelg> this is so cool https://www.nushell.sh/ |
11:21:07 | Yardanico | seems like only useful if you really do a lot of stuff with data (like sorting, etc) |
11:22:34 | FromGitter | <Bennyelg> i dont think so, its usefull for any since its simplify shell commands |
11:22:55 | Yardanico | meh |
11:27:49 | FromDiscord | <Rika> looks interesting |
11:28:05 | FromDiscord | <RaycatWhoDat> Definitely. |
11:28:14 | FromDiscord | <Rika> BUT you can prolly do that with special executable commands |
11:28:21 | FromDiscord | <Rika> on any shell |
11:28:35 | Yardanico | yeah thats my point too |
11:29:09 | FromDiscord | <RaycatWhoDat> I would be surprised if there wasn't a utility that did exactly this |
11:29:24 | FromDiscord | <RaycatWhoDat> All you'd have to do is pipe into it |
11:30:00 | FromDiscord | <RaycatWhoDat> But the concept of the shell automatically doing it does have merit |
11:31:02 | * | exelotl joined #nim |
11:39:57 | * | exelotl quit (Ping timeout: 260 seconds) |
11:46:42 | FromGitter | <Bennyelg> Do procs also inheritance when inheritance from type? |
11:46:57 | Yardanico | if you need runtime dispatch, you need methods |
11:47:11 | FromGitter | <Bennyelg> great - this is what i needed:D |
11:48:07 | FromGitter | <Bennyelg> (https://files.gitter.im/nim-lang/Nim/NmVi/image.png) |
11:48:14 | FromGitter | <Bennyelg> what does it mean : |
11:48:30 | Yardanico | you need to define a base method for the type your types inherit from |
11:48:40 | Yardanico | also your base type should inherit from RootObj for inheritance |
11:48:52 | * | krux02 quit (Remote host closed the connection) |
11:49:36 | FromGitter | <Bennyelg> do we have an example somewhere ? |
11:49:39 | Yardanico | also you might need https://nim-lang.org/docs/manual.html#multiminusmethods , I don't know what your code looks like |
11:49:43 | Yardanico | yeah see ^ |
11:52:00 | skrylar[m] | nushell seems neat on first glance |
11:56:14 | FromDiscord | <Rika> what makes it unneat? |
11:58:46 | FromGitter | <Bennyelg> @Yardanico so this is the only option to call parent method ? |
11:58:51 | FromGitter | <Bennyelg> (https://files.gitter.im/nim-lang/Nim/ObPi/image.png) |
11:59:06 | FromDiscord | <Rika> its not required |
11:59:08 | Yardanico | idk probably |
11:59:18 | Yardanico | I generally don't do methods in Nim so I don't know a lot of stuff about them :) |
11:59:28 | FromDiscord | <Rika> you dont need to call base method |
11:59:34 | FromDiscord | <Rika> (usually you should) |
11:59:36 | Yardanico | well maybe he wants to |
11:59:56 | FromDiscord | <Rika> well im just saying its not a requirement |
12:00:02 | FromGitter | <Bennyelg> I have like interface which the parent has almost everything and the rest are extending it |
12:00:52 | FromGitter | <Bennyelg> If we will look at the image above, I just want to Unit to have the m method for free |
12:02:54 | Yardanico | generally you can do OOP in Nim but it's not the preferred method most of the time :) |
12:03:43 | FromGitter | <Bennyelg> I understand, well ok |
12:03:47 | FromGitter | <Bennyelg> I'll figure this one out |
12:05:26 | * | Guest90612 quit (Remote host closed the connection) |
12:06:02 | * | supakeen quit (Quit: WeeChat 1.9.1) |
12:06:03 | * | Hideki joined #nim |
12:06:25 | * | Hideki is now known as Guest22322 |
12:06:44 | * | supakeen joined #nim |
12:14:55 | Yardanico | hmm I wonder how hard it is to set up nimforum, gonna try it on my vps |
12:16:33 | * | liblq-dev joined #nim |
12:16:50 | Yardanico | ah seems easy enough, gonna do it lol |
12:18:11 | * | zagani joined #nim |
12:19:32 | * | someunknownuser joined #nim |
12:22:31 | skrylar[m] | you could use something that actually works ^^ |
12:23:06 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
12:33:16 | Yardanico | nice it works |
12:33:20 | Yardanico | it was easy to set it up |
12:34:30 | * | zagani quit (Quit: Leaving) |
12:38:50 | dadada__ | it's so annoying to have to deal with FOSS licensing conflicts |
12:38:55 | Yardanico | dadada__: wdym? |
12:39:54 | Yardanico | btw it kinda works https://forum.my-toolbox.xyz/ you can't register because I didn't set up the email thing properly though :D and need to understand how to create categories |
12:40:09 | dom96 | ooh, nice |
12:40:56 | dadada__ | wanted to use crc32 in my code, juan carlos put some nim code for it on github and licensed it under MIT, but he copied it from rosettacode, so he isn't really allowed to set his own license as you will know when you read the FAQ from rosettacode, you have to use the GFDL, and that's not compatible with just any FOSS license, as you would hope, the FAQ says so, will anybody complain when I do the same as |
12:41:02 | dadada__ | juan? probably not, but technically you have to ask the contributors of rosettacode for permission |
12:41:30 | * | dadada__ is now known as dadada |
12:41:39 | Yardanico | dadada__: isn't it really easy to implement? |
12:42:25 | * | NimBot joined #nim |
12:42:51 | skrylar[m] | there are some magic numbers, but you could probably find many liberal implementations |
12:43:02 | dadada | Yardanico: it's very short code, yes, but who likes reinventing the wheel, even if it takes me 20 minutes, I'll regret having to spend this time when 100000 people have done it before me, I'd rather spend my time on new stuff |
12:43:15 | Yardanico | dadada: then why use Nim? :DDDDD |
12:43:45 | Yardanico | dom96: btw I didn't figure it out at first, but nimforum seems to work with recaptcha v2, not v3 |
12:44:03 | Yardanico | I initially created v3 version and wondered why recaptcha said invalid site key :P |
12:44:05 | * | filcuc joined #nim |
12:44:32 | dom96 | Yardanico, please update readme to mention this :) |
12:45:04 | skrylar[m] | rika: should be able to use this if you still need it https://git.sr.ht/~skrylar/skyhash/tree/master/src/skyhash/xxhash.nim |
12:45:07 | Yardanico | once I figure it out I might leave it running because it doesn't use a lot of resources anyway |
12:45:34 | Yardanico | and most of the RAM on my 4gb VPS is free (although only 2 vCPU but that's enough) |
12:48:01 | Yardanico | also it didn't compile at first with nim 1.2, but worked fine when I installed latest Karax |
12:48:06 | Yardanico | (1.1.2) |
12:50:01 | * | Hideki_ joined #nim |
12:53:37 | * | Guest22322 quit (Ping timeout: 264 seconds) |
12:54:17 | Yardanico | and yes I installed from source :P |
12:54:28 | Yardanico | (I mean the forum, not the old release) |
13:04:50 | * | exelotl joined #nim |
13:06:26 | * | lritter joined #nim |
13:10:25 | * | Hideki_ quit (Remote host closed the connection) |
13:11:00 | Yardanico | actually I made it compile with orc and --threads:on lol |
13:11:01 | * | Hideki_ joined #nim |
13:11:49 | * | Hideki__ joined #nim |
13:12:27 | * | Hideki_ quit (Read error: Connection reset by peer) |
13:12:42 | Yardanico | (by wrapping the code in {.gcsafe.}: in 3 adds starting on jester.nim:1252) |
13:12:53 | Yardanico | since with arc/orc gcasfe still will produce warnings/errors right now |
13:15:03 | * | leorize quit (Ping timeout: 240 seconds) |
13:16:26 | * | Hideki__ quit (Ping timeout: 256 seconds) |
13:17:05 | FromGitter | <Bennyelg> Hey, and easy way to run over my modules and figure out what imports are not in use ? |
13:17:17 | Yardanico | compile the code |
13:18:15 | Yardanico | about forum - seems like it leaks hella lot memory with orc (probably due to async), by hitting F5 for 15 seconds I got it to 213mb |
13:18:20 | skrylar[m] | more specifically its one of the hints that is on by default |
13:20:01 | Yardanico | it crashed when I stress-tested it with wrk though, due to orc I guess |
13:20:28 | Yardanico | cyclicrefs_bacon.nim(102) unregisterCycle ye |
13:21:32 | * | rockcavera joined #nim |
13:22:08 | Yardanico | with arc it doesn't crash (expected I guess) but memory just grows because there's nothing to collect cycles :P |
13:22:26 | Yardanico | but it actually uses multiple threads as far as I can see |
13:23:01 | Yardanico | 1000% cpu (10 full threads), 16k reqs/second to open main forum page |
13:24:21 | dom96 | fun |
13:24:27 | dom96 | do threads work with orc? |
13:24:36 | Yardanico | dom96: idk really, they should I guess |
13:24:49 | Yardanico | but as I said with orc the forum crashes if I stress-test it |
13:24:51 | Yardanico | in orc code |
13:26:02 | * | solitudesf quit (Read error: Connection reset by peer) |
13:26:09 | Yardanico | with asynchttpserver hello world orc doesn't crash, although leaks memory it seems |
13:26:14 | * | solitudesf joined #nim |
13:26:21 | Yardanico | let's try just jester but with threads |
13:26:38 | FromDiscord | <clyybber> Yardanico: What error does it say? |
13:26:40 | FromDiscord | <clyybber> The crash? |
13:26:45 | Yardanico | @clyybber ok I'll show |
13:26:51 | FromDiscord | <clyybber> oh, nevermind, see it |
13:26:58 | Yardanico | but first maybe I could replicate it without nimforum :) |
13:27:13 | Yardanico | ye |
13:27:14 | Yardanico | easy |
13:27:18 | Yardanico | can replicate |
13:27:22 | FromDiscord | <clyybber> if you manage to minimize this then.. Good job!! |
13:27:26 | Yardanico | with jester |
13:27:30 | FromDiscord | <clyybber> ha, nice |
13:27:38 | Yardanico | lemme try without threads |
13:27:56 | FromDiscord | <clyybber> it fails in line 102 ? |
13:27:57 | Yardanico | it doesn't crash without threads on :( |
13:28:01 | FromDiscord | <clyybber> hmm |
13:28:01 | disruptek | asynchttpserver leaks with orc? |
13:28:04 | Yardanico | disruptek: yes |
13:28:08 | Yardanico | as far as I can see |
13:28:12 | FromDiscord | <clyybber> leaks? |
13:28:16 | FromDiscord | <clyybber> I thought it just crashed? |
13:28:18 | Yardanico | how often does cycle collector get invoked? |
13:28:24 | Yardanico | @clyybber asynchttpserver works but memory grows |
13:28:28 | FromDiscord | <clyybber> ah ok |
13:28:33 | Yardanico | jester with threads (uses httpbeast) crashes |
13:28:49 | disruptek | !memory |
13:28:49 | disbot | total: 290 Megabytes; free: 50 Megabytes; owned: 229 Megabytes; max: 290 Megabytes |
13:29:03 | Yardanico | @clyybber full stack trace https://gist.github.com/Yardanico/d54aad2de9536ce9e896d9594d684725 |
13:29:03 | FromDiscord | <clyybber> Yardanico: Can you try with GC_fullcollect? |
13:29:09 | FromDiscord | <clyybber> just intersperse them a bit |
13:29:13 | Yardanico | is orc supposed to work with threads? |
13:29:21 | FromDiscord | <clyybber> not sure |
13:29:24 | FromDiscord | <clyybber> think so |
13:29:34 | disruptek | it should. |
13:29:43 | FromDiscord | <clyybber> Yardanico: Did you build with debug? |
13:29:50 | FromDiscord | <clyybber> Then it should say container empty I think |
13:30:29 | Yardanico | I built without danger/release |
13:30:37 | Yardanico | and now I rebuilt with -d:debug but it's still the same stack trace |
13:30:50 | FromDiscord | <clyybber> Hmm, ok |
13:31:23 | FromDiscord | <clyybber> Oh, yeah. Makes sense that this occurs with threads on |
13:31:51 | FromDiscord | <clyybber> The roots seq is probably modified concurrently |
13:31:59 | Yardanico | need locks? |
13:32:04 | Yardanico | yeah it seems to work without threads with jester, I'll try adding fullcollect to asyncdispatch example |
13:32:26 | Yardanico | doing full gc collect on each request isn't ok but for testing it's okay I guess :D |
13:32:32 | FromDiscord | <clyybber> yeah :D |
13:32:46 | Yardanico | yeah now it stays on same 1148kb |
13:32:48 | Yardanico | flat |
13:32:52 | Yardanico | ah wait |
13:32:52 | Yardanico | no |
13:33:00 | Yardanico | it still increases :/ |
13:33:08 | Yardanico | even if I do GC_fullcollet() on each request |
13:33:22 | FromDiscord | <clyybber> how about other gcs ? |
13:33:28 | * | Hideki_ joined #nim |
13:33:44 | Yardanico | with refc it increases too, but by a much smaller amount |
13:34:01 | disruptek | orc's breaker needs to break more stuff, i guess. |
13:34:08 | FromDiscord | <clyybber> hmm |
13:34:10 | FromDiscord | <clyybber> not sure |
13:34:12 | Yardanico | @clyybber to replicate https://gist.github.com/Yardanico/daef5e8da185f5c5600ba64668aad7cc |
13:34:17 | Yardanico | run with --gc:orc -d:danger |
13:34:23 | Yardanico | and stress test with wrk -t15 -c500 -d30s http://127.0.0.1:8080/ |
13:34:35 | Yardanico | and check memory usage :) |
13:34:36 | dom96 | works with default gc right? |
13:34:39 | FromDiscord | <clyybber> Yardanico, dom96: Could it be the selectors seq growing? |
13:34:48 | FromDiscord | <clyybber> dom96: It also leaks, just slower |
13:34:54 | Yardanico | dom96: works but even with refc it also leaks but much slower |
13:34:58 | Yardanico | I mean asynchttpserver |
13:35:16 | Yardanico | after 50k requests memory usage is 7.2mb from 2mb |
13:35:27 | dom96 | hrm, I dunno whether that can be considered a leak |
13:35:43 | dom96 | 7mb seems reasonable |
13:36:05 | Yardanico | ah right it seems to stay at 10.5mb even if I stress test it a lot |
13:36:08 | Yardanico | (with refc) |
13:36:15 | Yardanico | ah nvm, it still grows but really rare |
13:36:21 | Yardanico | mostly it's stable so yeah it's fine |
13:36:41 | Yardanico | if you don't need to run a service which does hundreds of thousands of requests each day and needs to run non-stop :P |
13:37:23 | FromDiscord | <clyybber> dom96: Do you know why it happens? |
13:37:32 | dom96 | no idea |
13:38:02 | dom96 | what you can do to debug though is grab prometheus and set up logging with my prometheus package |
13:38:09 | dom96 | it can log which types are taking up memory |
13:38:13 | Yardanico | okay |
13:38:36 | dom96 | (likely only works with default gc though) |
13:38:49 | dom96 | dunno if orc has the same instrumentation support |
13:39:18 | Yardanico | this one for gc? https://github.com/dom96/prometheus/blob/master/tests/tregistry.nim#L64 |
13:39:46 | dom96 | yep |
13:39:53 | dom96 | all you need to do is expose a jester route |
13:40:01 | dom96 | like: get "/stats": resp generateLatest() |
13:44:12 | * | filcuc quit (Ping timeout: 256 seconds) |
13:47:04 | Yardanico | dom96: yeah I set it up |
13:47:51 | Yardanico | nim_gc_mem_object_usage_bytes{type="anon ref object from /home/dian/.nim/lib/pure/asyncmacro.nim(246, 33)"} 1876248.0 |
13:47:59 | Yardanico | nim_gc_mem_object_usage_bytes{type="string"} 1892441.0 |
13:48:04 | Yardanico | (total 22mb usage) |
13:49:14 | Yardanico | full output https://gist.github.com/Yardanico/ebae8d71235662001eb767834fb23477 |
13:49:18 | Yardanico | that's with asynchttpserver |
13:51:02 | Yardanico | nim_gc_mem_object_count{type="anon ref object from /home/dian/.nim/lib/pure/asyncmacro.nim(246, 33)"} 13995.0 |
13:51:02 | Yardanico | lol |
13:51:14 | Yardanico | and nim_gc_mem_object_count{type="string"} 42800.0 |
13:53:04 | * | someunknownuser quit (Quit: someunknownuser) |
13:53:12 | FromGitter | <t1273446_twitter> Hi all. Is it possible to do something like this? &"""content{if cond: "a" else: "b"}content""" β Or do I have to accept the verbosity of concatenating multiple strings? |
13:53:50 | Yardanico | that's not possible |
13:53:58 | Yardanico | and there's not a lot of "verbosity" really |
13:54:11 | Yardanico | you can do |
13:54:18 | dom96 | t1273446_twitter: have you tried wrapping the if stmt in parenthesis? |
13:54:30 | Yardanico | dom96: doesn't work |
13:54:45 | Yardanico | strformat doesn't really allow for any nim expressions inside I guess |
13:55:08 | FromGitter | <t1273446_twitter> It does add with multiple lines |
13:55:39 | Yardanico | because : in strformat is a special character |
13:56:02 | FromGitter | <t1273446_twitter> Exactly |
13:57:43 | * | filcuc joined #nim |
13:57:43 | Yardanico | well you can workaround it |
13:58:21 | dom96 | ahh of course |
13:58:28 | dom96 | yeah, I would just create a variable for this |
13:58:49 | Yardanico | 1-line template though |
13:59:05 | Yardanico | sorry 2-line |
13:59:10 | Yardanico | template chooseOne(a, aval, bval: untyped): untyped = (newline)if a: aval else: bval |
13:59:27 | Yardanico | and then you can just do echo fmt"{chooseOne(5 > 0, true, false)}" |
14:01:33 | FromGitter | <t1273446_twitter> Thanks I will do that |
14:09:24 | * | ertp07 quit (Ping timeout: 272 seconds) |
14:10:40 | * | ertp07 joined #nim |
14:13:19 | * | filcuc quit (Ping timeout: 256 seconds) |
14:14:28 | * | solitudesf- joined #nim |
14:17:04 | * | solitudesf quit (Ping timeout: 256 seconds) |
14:27:31 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
14:28:22 | * | pbb joined #nim |
14:30:13 | * | ertp07 quit (Ping timeout: 264 seconds) |
14:31:04 | dadada | nim can store time in nanoseconds? but what platforms actually provide this level of resolution? |
14:31:21 | dadada | I can't assume this to work everywhere, right? |
14:33:01 | FromGitter | <bung87> yeah ,that's right, you even not need this |
14:33:27 | Yardanico | well JS doesn't |
14:33:31 | Yardanico | @bung87 there are use-cases for it |
14:34:23 | FromGitter | <bung87> I get it, js date no nanoseconds |
14:35:08 | Yardanico | win/mac/linux all support nanosecond resolution afaik |
14:35:08 | * | ertp07 joined #nim |
14:36:36 | FromGitter | <bung87> this topic remind me of nanolog |
14:38:42 | dadada | Yardanico: yeah, but what about Linux running on embedded systems, do MIPS/ARM and so forth also support that? it would be handy if there was a table that lists on what arch/OS combos this works/doesn't work ... |
14:41:45 | FromDiscord | <Rika> I don't see why they wouldn't be able to store time in nanoseconds |
14:41:51 | Yardanico | it's not about storing |
14:41:56 | dadada | Rika: it's about measuring |
14:41:59 | Yardanico | it's about having the system clock count up to nanosecond precision |
14:42:00 | FromDiscord | <Rika> I do see why they wouldn't be able to measure them at that resolution |
14:42:07 | Yardanico | it's not that easy |
14:42:45 | FromDiscord | <Rika> It depends on the system's rtc I'm guessing |
14:43:54 | dadada | hmm, according to my googling WASI timestamps do have nanosecond resolution, as JS can interact with WASM code, does this mean we could get nanosecond resolution in JS due to this? |
14:44:13 | Yardanico | JS is not wasm though :P |
14:44:36 | dadada | wasm will creep into everything according to my estimates ... so the line will be blurred |
14:46:51 | * | fredrikhr quit (Read error: Connection reset by peer) |
14:48:32 | FromDiscord | <clyybber> dadada: You can't get nanosecond resolution in browsers |
14:48:41 | FromDiscord | <clyybber> you could, but now you cant |
14:48:47 | FromDiscord | <clyybber> to prevent against spectre |
14:49:44 | dadada | clyybber, it's understable, ... but why do we have to make sacrifices to black hats, I wish there was something smarter to prevent those attacks |
14:50:09 | dadada | and I hope Intel/AMD/... learn something and this doesn't repeat a 1000 times |
14:50:41 | FromDiscord | <clyybber> dadada: If you really want to you can disable the protections |
14:50:46 | FromDiscord | <clyybber> In your browser |
14:51:28 | FromDiscord | <clyybber> Also, yeah you may get nanosecond timestamps with WASM but they will be deliberately inaccurate |
14:51:44 | dadada | clyybber: good to know, yet it means that it will be of limited use in production code, I mean you can't expect users to change such flags |
14:52:03 | * | Hideki_ quit (Remote host closed the connection) |
14:52:47 | * | Hideki_ joined #nim |
14:53:23 | * | PMunch joined #nim |
14:54:50 | FromDiscord | <clyybber> yeah, its also made really hard in most browsers |
14:54:59 | FromDiscord | <clyybber> and it makes your website seem extremely fishy |
14:55:06 | Yardanico | yeah, since wasm is compiled |
14:55:14 | Yardanico | and who knows what you're doing in your wasm code |
14:55:20 | Yardanico | hmm I wonder how arc+os any works with wasm |
14:55:23 | Yardanico | gonna test lol |
14:55:57 | skrylar[m] | wasm is okay |
14:57:06 | * | terps joined #nim |
15:00:46 | * | Hideki_ quit (Ping timeout: 256 seconds) |
15:01:29 | * | okcy joined #nim |
15:01:38 | * | okcy quit (Client Quit) |
15:06:37 | * | filcuc joined #nim |
15:10:32 | dadada | I don't see it clearly stated on https://nim-lang.org/docs/times.html that Time.seconds is stored in seconds since the Unix epoch, but what else would it be? |
15:11:00 | dadada | there are a few procs where it is stated, but they are for conversion, so it's unclear if it's converted into something else for Time.seconds |
15:13:19 | PMunch | Yay, doubled my RAM today :) |
15:13:26 | Yardanico | PMunch: cool! |
15:13:48 | PMunch | And hit the "OC" button in my BIOS, so now I'm running a slight overclock as well :P |
15:14:30 | FromDiscord | <Rika> Dadada, it's in Unix epoch |
15:15:07 | dadada | Rika: yeah, it should be mentioned with a doc comment on the time object |
15:15:25 | * | gangstacat joined #nim |
15:28:02 | * | Hideki_ joined #nim |
15:36:28 | * | terps quit (Ping timeout: 256 seconds) |
15:36:51 | * | dddddd joined #nim |
15:39:35 | * | sagax quit (Quit: Konversation terminated!) |
15:39:57 | * | sagax joined #nim |
15:47:52 | * | Hideki_ quit (Ping timeout: 260 seconds) |
15:49:09 | * | filcuc_ joined #nim |
15:49:51 | * | filcuc quit (Ping timeout: 260 seconds) |
15:54:21 | * | terps joined #nim |
16:08:46 | * | terps quit (Ping timeout: 256 seconds) |
16:09:42 | * | tane joined #nim |
16:09:50 | * | filcuc_ quit (Ping timeout: 256 seconds) |
16:17:29 | * | krux02 joined #nim |
16:26:14 | * | ptdel joined #nim |
16:36:50 | * | sagax quit (Ping timeout: 260 seconds) |
16:40:45 | * | waleee-cl joined #nim |
16:53:22 | * | Romanson quit (Quit: Connection closed for inactivity) |
17:07:29 | FromDiscord | <Tristan> Playing around with winim, trying to write a memory scanner. In CPP it's relatively simple to call an exported function, curious how I'd go about this in Nim? |
17:07:31 | FromDiscord | <Tristan> https://hastebin.com/equfiwuriv.cpp |
17:09:01 | FromDiscord | <Rika> make a proc with the same signature and the pragma `{.cdecl, dynlib: "ntdll.dll", importc: "NtQueryVirtualMemory".}`, i think |
17:13:00 | FromGitter | <bung87> !repo psutil-nim |
17:13:01 | disbot | https://github.com/johnscillieri/psutil-nim -- 9psutil-nim: 11Port of python psutil to nim 15 22β 9π΄ 7& 1 more... |
17:13:45 | FromDiscord | <Rika> im lazy, has anyone ported bisect to nim? |
17:14:01 | PMunch | bisect? |
17:14:24 | disruptek | !search bisect |
17:14:25 | disbot | https://github.com/juancarlospaco/nimbug/issues/8 -- 3bisect bot 7& 29 more... |
17:14:36 | disruptek | !repo bisect |
17:14:38 | disbot | https://github.com/knutin/bisect -- 9bisect: 11Ordered fixed-size binary dictionary in Erlang 15 63β 18π΄ 7& 29 more... |
17:14:49 | FromDiscord | <Rika> F |
17:14:53 | FromDiscord | <Rika> oops, here |
17:14:57 | FromDiscord | <Rika> https://docs.python.org/3.8/library/bisect.html |
17:15:17 | FromDiscord | <Rika> i'd port it myself but i am lazy as ive said |
17:15:20 | FromDiscord | <Rika> maybe i will tomorrow |
17:15:27 | disruptek | ~stream |
17:15:28 | disbot | stream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek |
17:22:46 | * | Hideki_ joined #nim |
17:27:13 | * | Hideki_ quit (Ping timeout: 264 seconds) |
17:27:15 | * | PMunch quit (Quit: leaving) |
17:49:10 | * | krux02 quit (Remote host closed the connection) |
17:52:36 | * | solitudesf- is now known as solitudesf |
17:55:25 | * | exelotl quit (Ping timeout: 264 seconds) |
17:59:33 | liblq-dev | how can I mark an import as used? |
17:59:55 | liblq-dev | I can't just plop `when nimHasUsed: {.used.}` into the imported module as it's not my lib |
18:06:29 | * | Senketsu joined #nim |
18:21:10 | * | terps joined #nim |
18:26:03 | * | exelotl joined #nim |
18:27:20 | * | Senketsu quit (Quit: WeeChat 2.8) |
18:38:52 | * | Senketsu joined #nim |
18:43:23 | * | Hideki joined #nim |
18:43:46 | * | Hideki is now known as Guest58149 |
18:45:21 | Yardanico | I wonder if https://github.com/nim-lang/Nim/issues/9867 (at the bottom) if issue related to Nim really |
18:45:23 | disbot | β₯ Long-lived application occasionally dies with SIG_PIPE when calling httpclient.request ; snippet at 12https://play.nim-lang.org/#ix=2aMk |
18:45:43 | Yardanico | basically if I call a nimpy-compiled module from a Django view and then stress-test it with wrk and exit wrk with Ctrl+C I get these SIGPIPE things a bit |
18:46:56 | FromDiscord | <Anuke> Does Nim have any good libraries for embedded scripting, e.g. with JS? I know there are Duktape bindings, but Duktape has very limited/missing support for JS features (like arrow functions) |
18:47:00 | * | trui joined #nim |
18:47:10 | FromGitter | <deech> Can anyone recommend an XML parser lib? I don't need to generate, just read. |
18:47:16 | Yardanico | stdlib |
18:47:45 | livcd | I have used this https://nim-lang.org/docs/parsexml.html |
18:47:49 | Yardanico | you'll need https://nim-lang.org/docs/xmlparser.html and https://nim-lang.org/docs/xmltree.html |
18:48:00 | * | Guest58149 quit (Ping timeout: 256 seconds) |
18:48:15 | Yardanico | or parsexml, yeah |
18:48:17 | FromGitter | <deech> I know. I just wondered if there as a full featured on that supported XPATH and the like ... |
18:48:25 | FromGitter | <deech> And XSLT |
18:48:30 | Yardanico | not that I know of |
18:48:36 | Yardanico | nimquery supports CSS selectors though |
18:48:57 | Yardanico | it's for html but maybe you can adapt it for XML (it should not require a lot of changes really) https://github.com/GULPF/nimquery |
18:49:00 | FromGitter | <deech> This isn't for the DOM but for SVG. |
18:49:08 | Yardanico | no |
18:49:15 | Yardanico | well I mean it doesn't really matter |
18:59:10 | * | Senketsu quit (Quit: WeeChat 2.8) |
19:00:43 | * | Senketsu joined #nim |
19:02:44 | * | Senketsu quit (Client Quit) |
19:29:52 | * | terps quit (Ping timeout: 256 seconds) |
19:31:24 | Prestige | just saw <//> in lists.nim, what is that or where is it defined? |
19:32:55 | Zevv | it's in system.nim but not defined |
19:33:24 | FromDiscord | <Rika> it's `owned` |
19:33:26 | FromDiscord | <Rika> afaik |
19:33:43 | Zevv | yeah I remember something like that, but it was dropped because it is a bit silly |
19:34:08 | Zevv | or was it |
19:34:39 | * | terps joined #nim |
19:35:25 | Yardanico | Zevv: yeah now it's actual owned ref |
19:35:31 | Yardanico | it was old syntax iirc |
19:35:35 | Zevv | right |
19:49:54 | * | exelotl quit (Ping timeout: 240 seconds) |
19:55:19 | * | zagani joined #nim |
19:55:34 | * | sagax joined #nim |
19:56:25 | * | chemist69_ quit (Ping timeout: 240 seconds) |
19:57:05 | * | zagani left #nim (#nim) |
19:57:34 | * | zagani joined #nim |
19:57:45 | * | chemist69 joined #nim |
20:00:45 | * | zagani quit (Quit: Leaving) |
20:01:53 | * | mjsir911 quit (Quit: Goodbye, World!) |
20:02:49 | * | j4nvkvc joined #nim |
20:12:32 | FromDiscord | <Rika> TIL you cant float divide two int64s |
20:12:53 | Yardanico | also see https://nim-lang.org/docs/lenientops.html |
20:12:57 | FromDiscord | <Rika> prolly needs lenientops |
20:12:58 | FromDiscord | <Rika> yeah |
20:12:59 | FromDiscord | <Rika> i know |
20:13:53 | FromDiscord | <Rika> not even with lenientops... |
20:14:03 | FromDiscord | <Rika> thats weird |
20:16:16 | FromDiscord | <exelotl> @Anuke not sure if there are nim bindings but this is what you want to use: https://bellard.org/quickjs/ |
20:21:25 | * | PMunch joined #nim |
20:22:16 | * | drewr joined #nim |
20:23:09 | FromGitter | <bung87> started from 2019, pretty new js engine |
20:23:27 | Yardanico | that doesn't mean it's bad |
20:23:32 | Yardanico | "Passes nearly 100% of the ECMAScript Test Suite tests when selecting the ES2020 features." |
20:23:36 | Yardanico | "Fast interpreter with very low startup time: runs the 69000 tests of the ECMAScript Test Suite in about 95 seconds on a single core of a desktop PC. The complete life cycle of a runtime instance completes in less than 300 microseconds." |
20:25:11 | FromDiscord | <Rika> looks cool |
20:25:39 | FromDiscord | <Rika> though the "nearly" part sounds uber vague |
20:25:46 | Yardanico | https://en.wikipedia.org/wiki/Fabrice_Bellard |
20:25:47 | FromDiscord | <Rika> is 90% nearly to them or 99%? |
20:25:53 | Yardanico | it's the guy who made FFmpeg, QEMU and tcc btw |
20:25:56 | FromGitter | <bung87> developer just need more confident |
20:26:44 | FromDiscord | <Rika> oh |
20:26:54 | FromDiscord | <Rika> if he made ffmpeg then i'm more trustworthy of that project now |
20:27:01 | FromGitter | <bung87> heard of οΌhe make of many popular projects |
20:27:39 | FromDiscord | <Rika> ffmpeg is really good, used basically anywhere that needs video processing, and sometimes image and audio processing |
20:27:44 | Yardanico | yep |
20:27:54 | Yardanico | and qemu is used everywhere for virtualisation ;) |
20:28:28 | FromDiscord | <Rika> that too |
20:28:41 | FromDiscord | <Rika> like holy shit his works are super impressive |
20:28:58 | FromGitter | <bung87> so he actually help lot of bussiness software |
20:29:28 | Yardanico | well it's not "business software" |
20:29:36 | Yardanico | but it's certainly high quality open source software |
20:30:20 | FromGitter | <bung87> I should add word indirectly |
20:31:36 | FromGitter | <bung87> what's the time there? |
20:44:22 | FromDiscord | <mratsim> I hate multithreading :/ |
20:44:31 | FromDiscord | <mratsim> it's a mess to debug |
20:44:55 | FromDiscord | <Anuke> @exelotl thanks, that library looks like what I need |
20:45:19 | PMunch | @mratsim, yeah it's a pain.. |
20:45:52 | FromGitter | <bung87> destribution too but you cant refuse.. |
20:45:57 | FromDiscord | <Anuke> looks like there's https://github.com/ImVexed/quickjs4nim too |
20:45:59 | Yardanico | @mratsim I saw your commits and issues, you're really so smart I'm kinda jealous :P |
20:46:05 | Yardanico | like all of this formal verification stuff |
20:46:12 | Yardanico | so cool |
20:48:17 | FromDiscord | <mratsim> I'm stuck implementing my own though :/ I have graphs and data structure on a paper but then I need to arrange them in a functional program |
20:48:29 | FromGitter | <bung87> plus me and someone I knew |
20:49:12 | FromDiscord | <mratsim> but the C++ memory model is quite complex, I need an execution graph, a store->load graph, take into account compiler reordering :/ |
20:50:54 | FromGitter | <bung87> tough day |
20:56:25 | * | ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
20:57:31 | FromDiscord | <Avahe> g |
21:10:48 | * | solitudesf quit (Ping timeout: 256 seconds) |
21:11:27 | * | krux02 joined #nim |
21:12:59 | * | Jesin quit (Quit: Leaving) |
21:14:08 | * | ertp07 quit (Ping timeout: 256 seconds) |
21:15:16 | * | terps quit (Ping timeout: 256 seconds) |
21:15:18 | * | ertp07 joined #nim |
21:15:30 | * | exelotl joined #nim |
21:16:43 | * | terps joined #nim |
21:17:06 | * | terps quit (Client Quit) |
21:19:59 | * | Jesin joined #nim |
21:23:16 | FromDiscord | <__ibrahim__> https://play.nim-lang.org/#ix=2lsB |
21:23:16 | FromDiscord | <__ibrahim__> hello, is it possible to omit the parameters in the add function on line 7? |
21:23:34 | Yardanico | wdym "omit" |
21:23:45 | FromDiscord | <__ibrahim__> just write add |
21:23:54 | FromDiscord | <__ibrahim__> without (a, b) |
21:24:36 | Yardanico | not really |
21:26:24 | FromDiscord | <__ibrahim__> ok cool |
21:27:22 | FromDiscord | <__ibrahim__> what are a and b anyway, i cant write x and y |
21:27:40 | Yardanico | a and b are the arguments foldl inserts |
21:27:57 | Yardanico | https://nim-lang.org/docs/sequtils.html#foldl.t%2Cuntyped%2Cuntyped |
21:28:01 | Yardanico | "The operation parameter should be an expression which uses the variables a and b for each step of the fold" |
21:28:12 | Yardanico | https://github.com/nim-lang/Nim/blob/version-1-2/lib/pure/collections/sequtils.nim#L821 |
21:28:19 | Yardanico | it's a pretty simple template |
21:28:36 | * | lritter quit (Quit: Leaving) |
21:28:44 | Yardanico | I mean you could do something like |
21:29:26 | Yardanico | https://play.nim-lang.org/#ix=2lsK |
21:29:49 | FromDiscord | <__ibrahim__> oh nice |
21:30:30 | FromDiscord | <__ibrahim__> that's very cool |
21:30:58 | Yardanico | well templates are mostly just code substitutions so you can do stuff like that :P |
21:31:16 | Yardanico | to call + you can do something like foldls(list, `+`) / list.len() |
21:31:29 | Yardanico | backticks because it's being called as op(a, b) and not "a op b" |
21:31:45 | Yardanico | for the first one with operators you need to use backticks |
21:32:20 | FromDiscord | <__ibrahim__> backticks are for operator stuff right? thats how u make custom operators |
21:32:33 | Yardanico | they're for escaping your code kinda |
21:32:46 | Yardanico | if you want to use a keyword as an identifier, for operators and for calling operators as procedures |
21:33:19 | FromDiscord | <__ibrahim__> that's really cool for functional stuff |
21:33:53 | Yardanico | proc `+++`(a, b: int): int = a + b + a (newline) var `if` = "hello" (newline) echo `+++`(3, 5) |
21:34:15 | Yardanico | https://play.nim-lang.org/#ix=2lsM |
21:34:55 | FromDiscord | <__ibrahim__> wow :D |
21:35:12 | Yardanico | also it's used in places like quote do (for macros) to insert nodes from the macro itself |
21:35:15 | Yardanico | like interpolation |
21:35:40 | FromDiscord | <__ibrahim__> i didn't get into macros yet, but ill keep an eye out |
21:45:28 | FromDiscord | <mratsim> Ah, I think I solved 90% of the hanging threads issue in this PR |
21:56:39 | * | idf quit (Ping timeout: 260 seconds) |
21:57:52 | * | arecaceae quit (Remote host closed the connection) |
21:58:14 | * | arecaceae joined #nim |
22:02:45 | * | PMunch quit (Quit: leaving) |
22:04:23 | * | liblq-dev quit (Quit: WeeChat 2.8) |
22:29:44 | * | exelotl quit (Ping timeout: 272 seconds) |
22:33:44 | * | tane quit (Quit: Leaving) |
23:07:47 | FromDiscord | <kodkuce> whats that pastebin i can curl to, i reinstalled OS frogot to backup my bashrc |
23:13:02 | * | dddddd quit (Ping timeout: 260 seconds) |
23:15:14 | * | Hideki joined #nim |
23:15:38 | * | Hideki is now known as Guest76944 |
23:18:56 | Yardanico | ix.io |
23:21:40 | * | dadada quit (Ping timeout: 272 seconds) |
23:31:42 | * | dadada joined #nim |
23:32:06 | * | dadada is now known as Guest8600 |
23:41:49 | * | krux02 quit (Remote host closed the connection) |
23:46:08 | rockcavera | Could someone explain why code 2 doesn't work? Or is it a bug? https://play.nim-lang.org/#ix=2ltK |
23:47:06 | FromDiscord | <KingDarBoja> fmt is not escaping the `'` afaik |
23:47:47 | FromDiscord | <KingDarBoja> Wait |
23:48:25 | rockcavera | that's not the problem |
23:48:25 | FromDiscord | <KingDarBoja> Nope, no idea what is the issue π€ |
23:48:44 | FromDiscord | <KingDarBoja> Never used template before |
23:50:01 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
23:55:52 | * | Guest8600 quit (Ping timeout: 272 seconds) |
23:59:07 | nisstyre | if I do `a == b` where a is cstring and b is string, is Nim converting b to a cstring behind the scenes to do the comparison? |
23:59:27 | nisstyre | b is a literal, actually |
23:59:34 | nisstyre | so I'm curious what it does there |