00:01:20 | * | tklohna quit (Ping timeout: 276 seconds) |
00:05:01 | * | krux02_ joined #nim |
00:07:37 | * | krux02 quit (Ping timeout: 250 seconds) |
00:10:32 | * | krux02_ quit (Quit: Leaving) |
00:16:09 | skrylar[m] | hrmm. seems like long doubles are a trouble when it comes to wrappers |
00:33:39 | madprops | is proc order really important? seems i have to move my procs in the code a lot |
00:35:23 | disruptek | only if you want it to work. |
00:46:24 | madprops | what's the proper way to round to two decimal numbers? |
00:51:30 | madprops | ok i have to use format |
00:52:53 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
01:05:12 | * | Kevin5 joined #nim |
01:22:07 | madprops | how do i iterate over a list and expose the index at the same time? |
01:26:15 | zedeus | for i, elem in list |
01:26:55 | madprops | oh cool |
01:28:18 | FromGitter | <gogolxdong> Does QUIC protocol in Nim go well? |
01:29:17 | zedeus | theres a WIP here https://github.com/xflywind/windx |
01:29:40 | zedeus | oh barely has any code, ignore that |
01:32:04 | * | endragor joined #nim |
01:34:47 | madprops | how can i join all except last item in a list? |
01:35:54 | madprops | i guess i could make a clone and remove the item |
01:36:10 | zedeus | list[0 .. ^2].join() |
01:36:29 | madprops | hmm |
01:37:40 | zedeus | or `list.toOpenArray(0, list.high - 1).join()` for better memory effiency (i think?) |
01:38:31 | madprops | is there a shortcut to get the last item? |
01:38:49 | madprops | .last() doesn't work |
01:38:49 | zedeus | ^1, backwards index |
01:38:58 | zedeus | list[^1] |
01:39:10 | madprops | yeah that works |
01:39:29 | madprops | im impressed by how easy it was to start doing something with nim |
01:42:52 | madprops | how can i split a long string into various lines? |
01:43:42 | disruptek | splitLines |
01:43:43 | * | seni quit (Quit: Leaving) |
01:44:14 | madprops | but i mean, in the code itself? |
01:44:45 | disruptek | just make a new line after a , |
01:45:11 | disruptek | most expressions can be interrupted with a newline. |
01:45:14 | FromGitter | <gogolxdong> latest version is 24 |
01:53:57 | * | a_b_m quit (Quit: Leaving) |
02:02:42 | * | jva joined #nim |
02:02:53 | * | jva quit (Remote host closed the connection) |
02:12:37 | disruptek | i love it when a plan comes together. |
02:26:49 | * | mipri joined #nim |
02:36:44 | Kevin5 | https://www.techempower.com/benchmarks/ |
02:37:15 | Kevin5 | when I look this benchmarks, haven't seen any Nim webframework |
02:37:44 | nisstyre | what is the best way to cast a uint32 to something I can concatenate to a string? the equivalent of (unsigned char*)my_int in C basically |
02:38:09 | nisstyre | or is there a better way of doing this maybe? |
02:46:17 | mipri | it sounds like you want https://nim-lang.org/docs/marshal.html |
02:46:39 | FromGitter | <kaushalmodi> !eval "abc" & $char(100) |
02:46:42 | NimBot | Compile failed: /usercode/in.nim(1, 7) Error: expression '"abcd"' is of type 'string' and has to be discarded |
02:47:32 | FromGitter | <kaushalmodi> eval echo("abc" & $char(100)) |
02:48:01 | nisstyre | mipri: yes, I hadn't seen that module yet |
02:48:07 | FromGitter | <kaushalmodi> !eval echo("abc" & $char(100)) |
02:48:10 | NimBot | abcd |
02:48:53 | FromGitter | <kaushalmodi> nisstyre: ^ |
02:49:13 | nisstyre | awesome, thanks |
02:50:00 | * | Romanson joined #nim |
02:50:27 | FromGitter | <kaushalmodi> Though, this will only be for uint8 |
02:50:40 | mipri | !eval echo("abc" & 100.char) |
02:50:44 | NimBot | abcd |
02:51:05 | nisstyre | I could probably unroll it to 4 bytes |
02:52:12 | * | GordonBGood joined #nim |
02:52:56 | * | lritter quit (Ping timeout: 276 seconds) |
02:53:11 | * | lritter joined #nim |
02:58:09 | mipri | !eval let a: int16 = 0x6869; let b = cast[ptr array[0..1, char]](unsafeAddr(a)); echo b[1] & b[0] & " there" |
02:58:11 | NimBot | hi there |
03:02:09 | * | uu91 quit (Read error: Connection reset by peer) |
03:02:27 | * | uu91 joined #nim |
03:03:03 | nisstyre | mipri: that works, I just tried doing each byte individually with "var b1 : uint8 = cast[uint8](lengthLe and 0xff000000'u32)" and so on but it's ugly as hell |
03:03:35 | * | FromGitter quit (Remote host closed the connection) |
03:03:53 | * | FromGitter joined #nim |
03:03:59 | mipri | although bitwise math is uglier, it does save you from having to care about endianness |
03:04:18 | nisstyre | also true |
03:04:29 | nisstyre | I was already converting it to little endian, but if I do it that way it won't even matter I guess |
03:08:56 | * | rockcavera quit (Remote host closed the connection) |
03:30:48 | * | cwaydt left #nim ("The Lounge - https://thelounge.chat") |
03:58:47 | Kevin5 | https://www.youtube.com/watch?v=VY26cNDeaKk |
04:24:35 | * | Kevin5 quit (Ping timeout: 276 seconds) |
04:47:21 | * | chemist69 quit (Ping timeout: 246 seconds) |
04:48:16 | * | nsf joined #nim |
04:49:26 | * | chemist69 joined #nim |
05:08:25 | * | Romanson quit (Quit: Connection closed for inactivity) |
05:10:37 | madprops | first nim program https://github.com/madprops/nimbars |
05:25:52 | * | dddddd quit (Remote host closed the connection) |
05:33:27 | snowolf | That'd be pretty cool as a library, madprops |
05:43:11 | * | nif quit (Quit: ...) |
05:43:21 | * | nif joined #nim |
06:18:35 | * | krux02 joined #nim |
06:28:10 | * | narimiran joined #nim |
06:39:47 | * | uu91 quit (Ping timeout: 276 seconds) |
06:40:01 | * | uu91 joined #nim |
06:42:36 | * | uu91 quit (Read error: Connection reset by peer) |
06:42:50 | * | uu91 joined #nim |
06:44:18 | * | uu91 quit (Read error: Connection reset by peer) |
06:44:35 | * | uu91 joined #nim |
06:55:34 | * | Kevin5 joined #nim |
07:11:08 | * | jjido joined #nim |
07:18:24 | * | solitudesf joined #nim |
07:18:31 | * | PMunch joined #nim |
07:22:04 | * | solitudesf quit (Client Quit) |
07:22:42 | * | solitudesf joined #nim |
07:35:17 | * | Kevin5 quit (Ping timeout: 268 seconds) |
07:47:59 | FromGitter | <zacharycarter> PMunch: nevermind about my question about binaryparse from last night - I'm going to use memfiles for writing and parsing my maps |
07:48:01 | * | Kevin5 joined #nim |
07:53:55 | PMunch | Oh sorry, I haven't even seen your question :P |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:00:32 | FromGitter | <zacharycarter> haha no worries - I was asking whether binaryparse would handle endianness for me |
08:00:37 | FromGitter | <zacharycarter> but I think memory mapped files are easier |
08:01:06 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:01:26 | * | Kevin5 quit (Remote host closed the connection) |
08:03:11 | PMunch | Ah, binaryparse only does one endianess |
08:04:47 | * | gmpreussner joined #nim |
08:11:43 | * | ponyride1 joined #nim |
08:12:44 | * | ponyrider quit (Ping timeout: 276 seconds) |
08:13:43 | FromGitter | <zacharycarter> gotcha |
08:22:01 | FromGitter | <zacharycarter> https://play.nim-lang.org/#ix=21wB - is nice, didn't realize how easy this would be to do with mem mapped files |
08:30:17 | * | lritter quit (Ping timeout: 276 seconds) |
08:31:52 | PMunch | Yeah binaryparse is more intended to read weird wire-formats |
08:32:29 | PMunch | Things like this field is 3 bits long, this one is 8, this one has the length of the last 3 bit field, etc. |
08:39:00 | * | salewski joined #nim |
08:46:09 | salewski | narimiran, maybe remove the spam links in https://forum.nim-lang.org/t/5488 |
08:46:15 | * | salewski quit (Quit: WeeChat 2.5) |
08:48:02 | narimiran | done |
08:48:44 | narimiran | dom96: we should limit allowed editing time of a post to 5 minutes or so |
08:51:53 | zedeus | that would solve a rare problem while preventing followups/edits that can save people time from reading outdated info |
08:54:28 | Araq | zedeus, people can ask for moderation on outdated info |
08:54:57 | Araq | outdated info is by design though, the forum is old and can also be seen as an archive |
09:00:29 | * | Vladar joined #nim |
09:03:38 | FromGitter | <mratsim> Is there a hidden LLVM backend? https://github.com/nim-lang/Nim/pull/12643/files#diff-8af935b2312d6a0974d7f32b58bda4f2R6468 |
09:04:08 | FromGitter | <mratsim> @narimiran, why limit editing to 5 min? |
09:04:16 | FromGitter | <mratsim> sometimes I edit after a day |
09:04:45 | FromGitter | <mratsim> also I would like to be able to edit titles for years, in the old forum I could change my Arraymancer topic title with the latest version |
09:04:47 | narimiran | because we have spammers posting seemingly normal post and then after some time they change it into the one containing spammy links and similar |
09:06:20 | FromGitter | <mratsim> can we restrict old edit to only be able to link within the nim-lang.org domain or github/gitlab then? |
09:07:42 | Araq | not really because some spammers are not concerned with links |
09:21:13 | FromGitter | <alehander92> does anybody |
09:21:15 | FromGitter | <alehander92> use musl |
09:21:16 | FromGitter | <alehander92> with nim |
09:21:35 | FromGitter | <alehander92> @mratsim nlvm is |
09:21:37 | FromGitter | <alehander92> the llvm backend |
09:23:17 | FromGitter | <mratsim> But why is it mentioned in that commit? |
09:23:28 | FromGitter | <mratsim> ah, it's part of the test suite? |
09:23:38 | FromGitter | <alehander92> well, i think they try to think of |
09:23:39 | FromGitter | <alehander92> nlvm |
09:23:43 | FromGitter | <alehander92> when they add some features |
09:23:54 | FromGitter | <alehander92> ah i dont know if its really relevant there |
09:24:19 | FromGitter | <alehander92> well, its not implemented |
09:24:48 | FromGitter | <alehander92> for nlvm, its a good question, i dont know if the manual otherwise talks about nlvm |
09:32:22 | * | Kevin5 joined #nim |
09:36:15 | FromGitter | <gogolxdong> Does Nim is self-contained means Nim implements bootstrapping? What's the difference? |
09:37:59 | * | leorize quit (Remote host closed the connection) |
09:38:00 | * | ng0 quit (Remote host closed the connection) |
09:39:38 | * | ng0 joined #nim |
09:39:54 | * | floppydh joined #nim |
09:39:54 | zedeus | self-contained means the compiler is written in Nim |
09:40:32 | zedeus | I think, maybe I got it mixed up |
09:41:00 | zedeus | might refer to dependency-free executables |
09:41:09 | * | leorize joined #nim |
09:41:21 | FromGitter | <alehander92> nim is bootstrapped |
09:41:32 | FromGitter | <alehander92> but i am also not sure if self-contained means the same |
09:50:41 | lqdev[m] | I'm pretty sure self-contained == dependency-free |
09:52:53 | FromGitter | <gogolxdong> is it the same with dependency-free== self-contained? |
09:53:45 | lqdev[m] | dunno, really |
09:55:03 | Araq | it used to mean "depends only on the OS and libc" and then allmighty go came along and changed the meaning to "depends only on the OS" and it stuck |
09:56:12 | Araq | so you need to link against musl to claim it for Nim. Silly nonsense. |
09:56:44 | * | filcuc joined #nim |
09:57:10 | Araq | so yeah, let's pretend you don't have libc lying around. Much like you can pretend not to have a heap. Or maybe a CPU? |
09:57:19 | * | tane joined #nim |
10:02:33 | * | clyybber joined #nim |
10:03:55 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
10:12:23 | PMunch | Why doesn't this work: https://play.nim-lang.org/#ix=21wK |
10:13:12 | Araq | give it a return type |
10:13:45 | FromGitter | <mratsim> might as well pretend you don't have GCC or LLVM |
10:13:53 | PMunch | Oh wait.. |
10:14:27 | PMunch | Of course |
10:15:36 | FromDiscord | <itmuckel> @PMunch https://github.com/PMunch/nimlsp/pull/34 <-- I fixed it up ^^ |
10:17:03 | FromDiscord | <alehander42> Araq |
10:17:23 | FromDiscord | <alehander42> well, nim doesnt depend on glibc explicitly |
10:17:24 | FromDiscord | <alehander42> right |
10:17:57 | FromDiscord | <alehander42> it depends on the c/posix standards, which should be implemented in some % by the different libc-s like musl |
10:18:00 | PMunch | itmuckel, use the `/` procedure from os to combine directories: https://nim-lang.org/docs/os.html#%2F%2Cstring%2Cstring |
10:18:06 | PMunch | That way it will work on both Windows and Linux |
10:18:24 | PMunch | So getTempDir() / "nimlsp" |
10:18:51 | FromDiscord | <alehander42> mratsim well, i'd like if there is a third option |
10:19:02 | FromDiscord | <alehander42> (there are of course, like tcc) |
10:19:51 | Araq | alehander42: sure and we also have workarounds and seek to avoid FILE* in later versions |
10:20:47 | Araq | mratsim: https://www.researchgate.net/publication/2394127_Combining_Analyses_Combining_Optimizations fyi |
10:22:34 | clyybber | for a doctor of philosophy |
10:22:36 | clyybber | interesting |
10:22:48 | * | ponyride1 quit (Ping timeout: 245 seconds) |
10:23:22 | * | ng0 joined #nim |
10:23:41 | * | ponyrider joined #nim |
10:24:13 | FromGitter | <mratsim> thanks |
10:24:59 | FromGitter | <mratsim> I'm pretty sure I can skip most of those concerns with my DSLs, my biggest unknown at the moment is loop boundaries |
10:26:14 | FromDiscord | <itmuckel> @PMunch path join operator. How cool is that? |
10:26:15 | FromDiscord | <itmuckel> https://cdn.discordapp.com/attachments/371759389889003532/643758441592258561/iu.png |
10:27:01 | PMunch | itmuckel, haha yeah it's pretty neat |
10:28:52 | FromDiscord | <alehander42> Araq nice |
10:29:06 | FromDiscord | <itmuckel> Okay, should be good now.^^ |
10:29:12 | FromGitter | <mratsim> Also I have this thought of turning the thread-local worker in Picasso into Finite State Machine, potentially using the evil undocumented {.goto.} pragma :P |
10:29:39 | Araq | you're a good boy. |
10:29:43 | FromDiscord | <alehander42> btw have you ever planned having a pure assembly backend even just for fun |
10:29:51 | FromDiscord | <alehander42> it doesnt make sense today at all probably |
10:30:01 | Araq | dom96 played with one |
10:30:02 | * | vesper quit (Ping timeout: 240 seconds) |
10:30:13 | Araq | it's much fun indeed |
10:30:38 | FromDiscord | <alehander42> it shouldn't be too hard to make one |
10:30:54 | FromGitter | <mratsim> debugging would be a pain though |
10:30:56 | FromDiscord | <alehander42> but probably its much more work to support different archs |
10:31:01 | FromDiscord | <alehander42> mratsim why |
10:31:04 | * | tklohna joined #nim |
10:31:07 | Zevv | you'll miss out on all of 2019's excellent c compiler optimizations as well |
10:31:08 | FromDiscord | <alehander42> thats how most compiler work |
10:31:16 | FromDiscord | <alehander42> Zevv, absolutely |
10:31:17 | * | vesper11 joined #nim |
10:31:35 | FromGitter | <mratsim> Did you read about x86 SIB and modRM encoding? |
10:31:42 | FromDiscord | <alehander42> i'd be hoenst |
10:31:49 | FromDiscord | <alehander42> it was egoistic i was thinking of osdev |
10:31:59 | FromDiscord | <alehander42> and the fact self-hosting nim currently requires |
10:32:06 | FromDiscord | <alehander42> one to also write/port a c compiler |
10:33:02 | FromDiscord | <alehander42> but i'd say an os without at least a kinda ok c compiler doesnt make much sense |
10:33:13 | FromGitter | <mratsim> Once you get it, it's not too hard but it took me a good amount of time to understand for the amount of LOC required to generate correct machine code: https://github.com/numforge/laser/blob/d1e6ae6106564bfb350d4e566261df97dbb578b3/laser/photon_jit/x86_64/x86_64_base.nim#L119-L200 |
10:35:40 | FromDiscord | <alehander42> well, with nim you have to know how to generate both the correct c code and the correct machine code |
10:35:51 | * | ponyrider quit (Quit: WeeChat 2.6) |
10:42:34 | * | Araq sighs |
10:42:45 | Araq | all you really have to do is to look at the machine code |
10:42:55 | FromGitter | <mratsim> "Error: Sorry, your pltform (linux_arm) is not supported by choosenim. :/ |
10:44:03 | Araq | otherwise you can argue that you also need to understand every LLVM code transformation too if you want to write an OS |
10:46:44 | FromDiscord | <alehander42> Araq well, there is some kind of correlation probably |
10:46:59 | FromDiscord | <alehander42> if i use a llvm backend, probably sometimes i'd look at the llvm bytecode, sometimes at the machine code |
10:47:26 | FromDiscord | <alehander42> i dont say its a problem at all, just thats how it is |
10:47:43 | FromDiscord | <alehander42> i also even prefer c backends a bit |
10:47:48 | Araq | but it's not "how it is", Linus doesn't look at GIMPLE |
10:48:04 | Araq | he looks at the produced assembler. There is really nothing more to it. |
10:48:25 | FromDiscord | <alehander42> well, i often look at the c code |
10:48:28 | FromDiscord | <alehander42> of my nim code |
10:48:29 | FromDiscord | <alehander42> is that wrong |
10:48:53 | FromGitter | <mratsim> @narimiran, regarding this: https://github.com/status-im/nim-stint/issues/99 should I test on your miran-unsigned-colors branch or version-1-0 branch? |
10:49:09 | FromDiscord | <alehander42> it's like, if i can figure out by looking at the c code, good, otherwise maybe look at the assembly (i am not sure if i ever actually used the assembly) |
10:49:14 | Araq | it's a rather incomplete picture, alehander |
10:49:43 | FromDiscord | <yewpad> Is it theoretically possible to use GraalVM with Nim? Like having a server written in Nim and people can write plugins in say Java and GraalVM bunches everything together? |
10:50:35 | FromDiscord | <alehander42> Araq, yes but |
10:50:39 | Araq | GraalVM is all about theory, so yes. It's very possible. :P |
10:50:40 | FromDiscord | <alehander42> often its useful |
10:50:56 | FromDiscord | <alehander42> i usually dont need super optimizations |
10:51:02 | FromGitter | <mratsim> I prefer to look into the assembly code than the C code, provided I have a good profiler that let me jump in the functions. GDB is too clunky |
10:51:04 | FromDiscord | <yewpad> Araq: GraalVM is all about theory |
10:51:04 | FromDiscord | <yewpad> 😆 |
10:51:08 | FromDiscord | <alehander42> just to see quickly how stuff happens on lower level |
10:51:37 | FromDiscord | <alehander42> e.g. "this nim code is expanded to this loop calling readdir" |
10:51:50 | FromDiscord | <alehander42> i'd say assembly is not productive for this |
10:52:01 | FromDiscord | <alehander42> of course, for math optimizations its different |
10:52:06 | FromGitter | <mratsim> but asembly when what you do is dominated by IO is not really useful |
10:52:33 | FromDiscord | <alehander42> mratsim tried lldb? |
10:52:37 | FromGitter | <mratsim> for VM, crypto, big int and numerical computing it is |
10:52:43 | FromGitter | <mratsim> yes |
10:52:56 | FromGitter | <mratsim> but maybe I'm to young but I prefer GUI :P |
10:53:07 | FromDiscord | <alehander42> well, there are good ui-s for gdb |
10:53:15 | FromDiscord | <alehander42> e.g. gdbgui |
10:53:40 | FromDiscord | <alehander42> or our perl6-like always-"coming soon" ui 😦 🙂 |
10:53:44 | FromGitter | <mratsim> it's a pain to set breakpoint in gdb, though I use them when I need to debug stuff, it's always reluctantly |
10:53:54 | FromDiscord | <alehander42> hm, why is it a pain |
10:54:07 | FromDiscord | <alehander42> need to solve pain points in our project |
10:54:09 | Araq | I use if condition: writeStackTrace() |
10:54:13 | FromGitter | <mratsim> b "foo.nim:256" |
10:54:29 | FromDiscord | <alehander42> ah manually, yeah, its a bit slow |
10:54:34 | FromGitter | <mratsim> you need to do that for all function you want to inspect |
10:54:35 | Araq | debuggers suck at conditional breakpoints anyway so I never missed one |
10:54:37 | FromDiscord | <alehander42> but gdb also has to work with the vscode debugger |
10:54:55 | FromDiscord | <alehander42> mratsim we did set it up once with @bobeff i think even using the nim-gdb |
10:54:57 | FromDiscord | <alehander42> by krux02 |
10:55:17 | FromDiscord | <alehander42> Araq, yeah conditions are pretty important |
10:55:24 | narimiran | @mratsim version-1-0 branch now removed runnableExamples and returned to ..code-block:: |
10:55:54 | FromGitter | <mratsim> so which branch should I test? or is it not needed anymore? |
10:55:54 | FromDiscord | <alehander42> gdb has conditional breakpioints |
10:56:03 | FromDiscord | <alehander42> but i guess the problem is that you need to write some kind of c expression ? |
10:56:04 | FromGitter | <mratsim> compiling on a Pi is super slow :/ |
10:56:08 | narimiran | and my branch has several (potential) fixes applied to it |
10:57:04 | Araq | alehander42: I need to write some C yes, but worse, it's also super slow |
10:57:11 | FromDiscord | <alehander42> we do solve this in a way, in our setup you can write something like conditional breakpoints with nim expressions |
10:57:11 | narimiran | i think the best you could do is to test it either on the tagged v1.0.2 commit or to checkout HEAD~5 (both on version-1-0 branch) |
10:57:29 | FromDiscord | <alehander42> and even interpret templates like mdbg |
10:57:43 | FromDiscord | <alehander42> but the speed is never super fast i guess after all |
10:58:25 | FromDiscord | <alehander42> actually with a tracepoint its fast enough: as you dont need to recompile your code |
10:58:28 | FromDiscord | <alehander42> manually its very slow |
10:58:50 | Araq | in fact, simply setting up gdb foobar.exe and saying 'run' is already too much for me |
10:59:07 | Araq | and then it doesn't remember the breakpoints I setup the last time |
10:59:23 | FromDiscord | <alehander42> but if you could add different "if condition: echo stuff" |
10:59:27 | FromDiscord | <alehander42> to your program |
10:59:31 | FromDiscord | <alehander42> and running them without recompiling |
10:59:38 | FromDiscord | <alehander42> would that be worth it |
11:00:49 | * | uu91 quit (Read error: Connection reset by peer) |
11:01:03 | * | uu91 joined #nim |
11:01:25 | krux02 | Araq: gdb is cumbersome, but you you don't quit gdb, the breakpoints are not discarded. |
11:01:49 | krux02 | just call `run` again and it will execute the fresh build with the old breakpoints. |
11:02:04 | Araq | ah, good to know |
11:02:09 | FromDiscord | <alehander42> or use `rr` and just reverse-continue |
11:02:16 | FromDiscord | <alehander42> but yeah, you probably use windows |
11:02:48 | clyybber | I like gdb |
11:02:56 | clyybber | and theres nothing better anyways |
11:03:14 | Araq | clyybber, Visual Studio? |
11:03:18 | FromGitter | <mratsim> so krux02, what's this mystery LLVM comment in your alignas PR? |
11:03:53 | clyybber | Araq: Is it better? |
11:04:11 | Araq | it's not comparable |
11:04:37 | * | Kevin5 quit (Remote host closed the connection) |
11:05:02 | krux02 | What I don't like about gdb is that it is so tough to understand using it. Modern IDEs have such a trivial to use debugger integrated, yet gdb is this thing that is completely useless to you if you didn't spend hours learning it. |
11:05:23 | krux02 | mratsim: what do you mean with LLVM comment? |
11:05:44 | krux02 | I did not implement any LLVM backend support for the alignas pragma. |
11:05:50 | FromDiscord | <alehander42> clyybber `rr` is using `gdb`, it just adds very fast `reverse-` commands to it |
11:05:54 | krux02 | meaning the pragma is ignored on thet backend. |
11:06:01 | FromDiscord | <alehander42> (the gdb ones are not really comparable) |
11:06:02 | FromGitter | <mratsim> but we don't have a LLVM backend? |
11:06:28 | krux02 | I just mentioned it, because the other pragmas also have a comment about the LLVM backend. |
11:06:31 | clyybber | alehander42: Oh, I see. Nice |
11:06:50 | clyybber | Also for debugging code you didn't write (why?) radare2 is really nice |
11:07:07 | krux02 | gdb also has some support for undo that is based on fork. |
11:07:08 | clyybber | though you also have to spend hours learning it |
11:07:10 | FromDiscord | <alehander42> clyybber its good, because it reproduced your run each time, so you dont get different stuff when you `run` again |
11:07:14 | FromDiscord | <alehander42> krux02 but many editor-s have UI plugins which just call `gdb` internally |
11:07:46 | krux02 | you can fork the process at any point in time, continue, and then resume by quitting the process and continuing the other branch of the fork. |
11:07:50 | * | Vladar quit (Quit: Leaving) |
11:07:52 | krux02 | works only on Linux |
11:07:52 | FromDiscord | <alehander42> krux02 this `undo` support is much much weaker iirc |
11:07:59 | FromDiscord | <alehander42> it really isnt comparable |
11:08:41 | krux02 | yea I didn't investigate rr yet. |
11:12:07 | FromDiscord | <alehander42> otherwise i thought people use |
11:12:12 | FromDiscord | <alehander42> the vscode debugger |
11:12:21 | FromDiscord | <alehander42> is it not compatible enough? |
11:14:41 | FromDiscord | <alehander42> debugger ui* |
11:14:49 | krux02 | yea |
11:15:45 | FromDiscord | <alehander42> hm, but i ran it fine with your nim-gdb.py printers |
11:19:51 | * | ponyrider joined #nim |
11:29:19 | * | rockcavera joined #nim |
11:30:26 | Araq | Warning: GC_ref is a no-op in JavaScript [User] |
11:30:30 | Araq | hmmm |
11:30:39 | Araq | that doesn't sound right for --gc:arc :D |
11:36:42 | * | vsantana joined #nim |
11:38:51 | * | tklohna quit (Ping timeout: 265 seconds) |
11:41:42 | FromDiscord | <alehander42> what is gc:arc |
11:42:12 | Araq | same as --gc:destructors |
11:42:23 | Araq | got tired of writing this long word for testing things |
11:44:01 | FromGitter | <mratsim> @narimiran, I confirm colors runnableExamples work |
11:44:38 | narimiran | then i even less understand what's wrong with travis |
11:44:45 | FromGitter | <mratsim> soon it will be expanded into arc --> arac --> arak |
11:45:09 | FromGitter | <mratsim> should I tested the commit before this https://github.com/nim-lang/Nim/commit/e2aa1d6d84aeb000070a0d2fcb5796a0c58246f7 ? |
11:45:18 | FromGitter | <mratsim> Travis has 32-bit arch? |
11:45:27 | * | tklohna joined #nim |
11:45:32 | narimiran | even that one fails |
11:45:38 | narimiran | yes |
11:45:44 | FromGitter | <mratsim> uh? |
11:46:17 | narimiran | yes, we test 32-bit on travis and azure pipelines; even that commit failed on travis |
11:46:37 | FromGitter | <mratsim> ah, via multilib |
11:46:54 | FromGitter | <mratsim> I thought it was native |
11:47:13 | FromGitter | <mratsim> testing 32-bit via multilib might create more trouble though |
11:59:12 | Araq | bah, ugh, damn |
11:59:20 | Araq | var copiedData = data |
11:59:20 | Araq | GC_ref(copiedData) # we need to protect data until send operation is completed |
11:59:20 | Araq | # or failed. |
11:59:39 | Araq | ^ but I don't have a refcount on strings anymore |
12:00:11 | * | vsantana quit (Quit: leaving) |
12:00:12 | * | dddddd joined #nim |
12:01:14 | livcd | treeform: yes html scraping. Also how do you deal with JS ? |
12:01:30 | livcd | What is the chance the JS backend will be dropped? |
12:02:05 | * | vsantana joined #nim |
12:02:25 | Araq | unlikely I'll drop it. maybe if wasm is widely supported and has really good DOM access |
12:02:40 | Araq | in about 5 years? who knows |
12:08:41 | * | theelous3 joined #nim |
12:16:08 | Zevv | we need more backends. jvm, ODEX, wasm, x86_64! |
12:20:16 | FromDiscord | <alehander42> python! |
12:20:22 | FromDiscord | <alehander42> and .net IR |
12:20:49 | FromDiscord | <alehander42> and a cranelift backend |
12:21:19 | FromDiscord | <alehander42> (cranelift is cool tho 🙂 ) |
12:38:46 | * | TheManiac[m] quit (Write error: Connection reset by peer) |
12:38:47 | * | swisscowbell[m] quit (Remote host closed the connection) |
12:38:47 | * | Demos[m] quit (Remote host closed the connection) |
12:38:47 | * | isaac[m] quit (Write error: Connection reset by peer) |
12:38:47 | * | shashlick[m] quit (Read error: Connection reset by peer) |
12:38:48 | * | yglukhov[m] quit (Write error: Connection reset by peer) |
12:38:53 | * | salotz[m] quit (Write error: Connection reset by peer) |
12:38:57 | * | xomachine[m] quit (Remote host closed the connection) |
12:38:59 | * | skrylar[m] quit (Read error: Connection reset by peer) |
12:39:00 | * | LEdoian[m] quit (Read error: Connection reset by peer) |
12:39:02 | * | k0mpjut0r quit (Write error: Connection reset by peer) |
12:39:08 | * | macsek1911[m] quit (Remote host closed the connection) |
12:39:09 | * | pigmej quit (Read error: Connection reset by peer) |
12:39:09 | * | d-nice2[m] quit (Write error: Connection reset by peer) |
12:39:13 | * | Manny8888 quit (Read error: Connection reset by peer) |
12:39:13 | * | muxueqz[m] quit (Read error: Connection reset by peer) |
12:39:15 | * | GitterIntegratio quit (Write error: Connection reset by peer) |
12:39:15 | * | M948e5[m] quit (Remote host closed the connection) |
12:39:15 | * | MrAxilus quit (Read error: Connection reset by peer) |
12:39:16 | * | lasso[m] quit (Write error: Connection reset by peer) |
12:39:17 | * | narimiran[m] quit (Read error: Connection reset by peer) |
12:39:18 | * | planetis[m] quit (Read error: Connection reset by peer) |
12:39:18 | * | Balu[m] quit (Read error: Connection reset by peer) |
12:39:18 | * | nc-x[m] quit (Read error: Connection reset by peer) |
12:39:18 | * | Miguelngel[m] quit (Read error: Connection reset by peer) |
12:39:20 | * | nergal[m] quit (Read error: Connection reset by peer) |
12:39:21 | * | Connor[m] quit (Remote host closed the connection) |
12:39:21 | * | lqdev[m] quit (Remote host closed the connection) |
12:39:22 | * | leorize[m] quit (Remote host closed the connection) |
12:39:22 | * | BitPuffin quit (Remote host closed the connection) |
12:39:25 | * | Asbrn[m] quit (Remote host closed the connection) |
12:39:25 | * | joachimschmidt55 quit (Remote host closed the connection) |
12:39:30 | * | meff[m] quit (Remote host closed the connection) |
12:39:30 | * | zielmicha[m]1 quit (Remote host closed the connection) |
12:39:31 | * | spymasterd[m] quit (Remote host closed the connection) |
12:49:12 | rockcavera | Is it possible to declare a variable type at runtime? Example: if x greater than 8 declares type uint16, if less than uint8 ... |
12:49:17 | PMunch | http://ix.io/21xc/nim <- getmac.nim(60, 14) Error: illegal capture 'ip' because ':anonymous' has the calling convention: <inline> |
12:49:17 | disbot | ^ play at https://play.nim-lang.org/#ix=21xc 😏 |
12:49:37 | PMunch | Any idea why this fails when I cross-compile for Windows but not when I compile it for Linux? |
12:50:51 | * | endragor quit (Remote host closed the connection) |
12:51:47 | FromDiscord | <alehander42> rockcavera you can do it on compile time |
12:52:31 | FromDiscord | <alehander42> or with using a generic eventually |
12:52:41 | rockcavera | At compile time I know it is possible. |
12:52:44 | FromDiscord | <alehander42> but it depends on the exact usecase |
12:53:02 | FromDiscord | <alehander42> it isnt really possible generally |
12:53:21 | clyybber | rockcavera: You can't. Types are static assertions for a program, so they are a compile time construct. |
12:53:32 | FromDiscord | <alehander42> yes |
12:53:47 | FromDiscord | <alehander42> if you want to just make sure stuff is done on uint8, you can make a generic |
12:53:48 | clyybber | (OO with methods stores types at runtime) |
12:53:49 | FromDiscord | <alehander42> function |
12:54:02 | PMunch | Hmm, it appears like it is the ?. operator that does the illegal capture |
12:54:06 | FromDiscord | <alehander42> and call it with uint8 when its <8 |
12:54:45 | rockcavera | thanks |
12:54:55 | FromDiscord | <alehander42> but basically you have to explicitly say which type would be used in each branch |
12:55:43 | PMunch | This is the implementation of ?. by the way: https://github.com/PMunch/nim-optionsutils/blob/master/src/optionsutils.nim#L139-L187 |
12:55:49 | PMunch | Nothing Windows specific there.. |
13:00:32 | * | JustASlacker joined #nim |
13:18:31 | FromDiscord | <alehander42> hm i get a similar error |
13:18:36 | FromDiscord | <alehander42> with a simple example |
13:18:46 | * | theelous3 quit (Ping timeout: 268 seconds) |
13:18:51 | FromDiscord | <alehander42> http://ix.io/21xg |
13:18:51 | disbot | ^ play at https://play.nim-lang.org/#ix=21xg 😏 |
13:19:14 | FromDiscord | <alehander42> it seems to me its just a inline limitation |
13:26:47 | * | clyybber quit (Quit: WeeChat 2.6) |
13:27:15 | FromDiscord | <alehander42> http://joeduffyblog.com/2015/11/03/a-tale-of-three-safeties/ interesting, so this is kinda a much more real example of what i hoped for in my small kernel |
13:28:35 | * | Vladar joined #nim |
13:32:32 | * | nsf quit (Quit: WeeChat 2.6) |
13:35:59 | * | LEdoian[m] joined #nim |
13:35:59 | * | lqdev[m] joined #nim |
13:35:59 | * | k0mpjut0r joined #nim |
13:35:59 | * | nergal[m] joined #nim |
13:36:00 | * | BitPuffin joined #nim |
13:36:00 | * | isaac[m]1 joined #nim |
13:36:00 | * | M948e5[m] joined #nim |
13:36:00 | * | TheManiac[m] joined #nim |
13:36:00 | * | GitterIntegratio joined #nim |
13:36:00 | * | swisscowbell[m] joined #nim |
13:36:01 | * | planetis[m] joined #nim |
13:36:01 | * | MrAxilus joined #nim |
13:36:01 | * | Demos[m] joined #nim |
13:36:01 | * | leorize[m] joined #nim |
13:36:05 | * | skrylar[m] joined #nim |
13:36:05 | * | Connor[m] joined #nim |
13:36:05 | * | d-nice2[m] joined #nim |
13:36:05 | * | Balu[m] joined #nim |
13:36:06 | * | meff[m] joined #nim |
13:36:06 | * | zielmicha[m]1 joined #nim |
13:36:06 | * | spymasterd[m] joined #nim |
13:36:06 | * | pigmej joined #nim |
13:36:06 | * | Miguelngel[m] joined #nim |
13:36:06 | * | macsek1911[m] joined #nim |
13:36:06 | * | Manny8888 joined #nim |
13:36:06 | * | joachimschmidt55 joined #nim |
13:36:06 | * | nc-x[m] joined #nim |
13:36:07 | * | salotz[m] joined #nim |
13:36:07 | * | xomachine[m] joined #nim |
13:36:07 | * | shashlick[m] joined #nim |
13:36:07 | * | yglukhov[m] joined #nim |
13:36:07 | * | lasso[m] joined #nim |
13:36:07 | * | muxueqz[m] joined #nim |
13:36:07 | * | Asbrn[m] joined #nim |
13:36:08 | * | narimiran[m] joined #nim |
13:46:22 | * | hed0n1st joined #nim |
13:46:52 | * | hed0n1st quit (Client Quit) |
13:57:50 | * | disbot quit (Remote host closed the connection) |
14:05:51 | * | xace quit (Quit: leaving) |
14:07:01 | Araq | GordonBGood, are you around? |
14:07:47 | GordonBGood | Yeah, still around |
14:09:14 | Araq | so ... it occured to me if we mark new() / ObjectRef() as 'owned' explicitly when we want it, we could make this feature opt-in |
14:09:41 | Araq | maybe it always was obvious to you ;-) |
14:10:06 | Araq | once I opted into ownership, ownership can only be moved around |
14:11:13 | GordonBGood | Yes, that was along the lines of what I was thinking, but I've never really written it up as a RFC or made it more concrete than just a shape of an idea |
14:12:11 | GordonBGood | It seems some months ago that we were moving well beyond what B/C conceived, and thus shouldn't be bound by their limitations |
14:12:31 | Araq | and we could require ownership when moving refs to a different thread |
14:12:36 | * | xace joined #nim |
14:12:57 | GordonBGood | But I couldn't really test it without compiler help, so stepped back to see what would end up working |
14:13:02 | Araq | and then we can make all RC ops non-atomic. maybe |
14:13:34 | GordonBGood | Yes, that's the shred of B/D I keep hanging onto |
14:14:04 | Araq | on a related note, I think I know why my closures are still buggy |
14:14:21 | Araq | I overlooked an aspect of their implementation |
14:14:48 | GordonBGood | I've been testing your latest devel commits, and it's closures that keep being the snag |
14:14:48 | Araq | so hopefully we're closer to "stable" than we think ;-) |
14:15:05 | Araq | yeah, refs are fine as far as I can tell |
14:15:17 | * | Vladar quit (Quit: Leaving) |
14:16:05 | GordonBGood | What aspect of their implementation, the aspect of their automatic lifting of values from the stack to the heap when it is detected they are going to be used outside the scope of the local proc? |
14:16:46 | Araq | we pass them around as 'nkClosure' which we treat as a tuple but it doesn't get assignments/destructions assigned to it properly |
14:17:00 | Araq | other tuples seem to be fine |
14:17:27 | Araq | anyway, can you post your example program once again please? |
14:17:50 | GordonBGood | Yes, that's exactly what I've had to work around in bypassing the closure bug. |
14:18:56 | GordonBGood | Sure, I think you mean the "hammings" one? And it's quite a good test for this as it pushed closures pretty hard, although it doesn't do a lot of ref counting |
14:19:18 | Araq | hammings, yeah |
14:19:35 | Araq | ideally without your custom =sink/=destroy hacks :P |
14:20:46 | GordonBGood | The one with custom hacks is the one I use to try to bypass what isn't working in --gc:arc |
14:21:11 | GordonBGood | This is the one that works with default GC and I hope will soon work with --gc:arc: https://wandbox.org/permlink/vZIUDOyygNxh7FOb |
14:22:16 | GordonBGood | It's a little bit complex as it is also a benchmark, but no "hooks" |
14:23:01 | GordonBGood | If you want something a little more directed just to test closures, I can boil something down for that too |
14:23:52 | Araq | whatever you think is best for fixing these bugs |
14:24:24 | GordonBGood | This Hammings algorithm is something that Swift can't do, as it can't consume the LazyList due to stack overflow |
14:24:45 | Araq | uh oh, don't want to deal with that |
14:25:10 | GordonBGood | And Rust can do it, but it is really hard to make the closures hook up, fighting the ownership system all the way |
14:25:20 | Araq | ref destruction queueing is for a later version... |
14:26:02 | GordonBGood | I don't think we are going to have the stack problem - Swift deferres all automatic destruction to the end of the proc but putting finalizers on the stack, or they did last I checked |
14:27:13 | GordonBGood | We'll have to be careful how we implement it - but last I checked, the Swift people were only starting to consider how to use copy/move semantics |
14:27:46 | tane | given two seqs `a = newSeq[int](5)` and `b = @[1,2,3,4,5]`, what does `a = b` actually do? |
14:28:50 | GordonBGood | what does it actually do for us? |
14:29:09 | GordonBGood | As currently impleented? |
14:29:25 | GordonBGood | legacy seqs or seqsv2 |
14:29:27 | GordonBGood | ? |
14:29:37 | tane | I don't know? I'm using the nim 1.0.0 compiler |
14:29:58 | tane | does it allocate? does it overwrite? |
14:31:14 | * | tklohna quit (Ping timeout: 240 seconds) |
14:33:37 | GordonBGood | tane: for version 1.0.X, default behavior is it creates a copy of b to a, overwriting the old seq that was a, seq payloads are allocated on the heap |
14:33:45 | Araq | tane, it copies. |
14:34:03 | tane | so, how can i just copy the contents? i.e. arrayCopy |
14:34:06 | Araq | GordonBGood, it copies. Copies can be optimized into moves but please don't concern beginners with this |
14:34:16 | GordonBGood | Okay |
14:34:31 | Araq | tane, it copies the contents too |
14:35:40 | tane | there's no proc for: `for (i, v) in b.pairs(): a[i] = v` then? |
14:36:20 | Araq | it's just '=' |
14:39:40 | tane | sorry, no |
14:40:10 | tane | if the target sequenceh as enough memory to contain the values of the source sequence, I could simply memcpy |
14:40:22 | tane | most of my use-cases come with that guarantee, that's what I'm asking here |
14:40:39 | tane | I just confirmed it uses new memory by printing repr(unsafeAddr(a[0])) |
14:40:49 | * | disruptek_ quit (Quit: Bye) |
14:40:49 | * | disruptek quit (Quit: Bye) |
14:40:51 | tane | which it obviously doesn't if I copy via for-loop |
14:41:00 | Araq | in the new seq implementation we do what you suggest ;-) |
14:41:08 | tane | ok, I like that :) |
14:41:32 | tane | just trying to get a feeling for the costs incurred by various operations, thanks |
14:42:03 | Araq | that's currently a weak point as the costs are all about to change quite a bit :-/ |
14:42:17 | tane | as long as they're decreasing.. :) |
14:43:12 | tane | although I have to say, it's performing really well already, passing LTO to the compiler/linker seems to work as well |
14:44:06 | * | Vladar joined #nim |
14:44:16 | * | tklohna joined #nim |
14:44:29 | Araq | decreasing except for 'ref' which is turning into atomic ref counting |
14:44:55 | Araq | at least we'll be faster than shared_ptr oh well |
14:45:14 | * | disbot joined #nim |
14:46:08 | * | disruptek joined #nim |
14:47:36 | tane | Araq, do you happen to know whether there will be some nim talks at fosdem'20? |
14:48:21 | narimiran | PMunch: ^ |
14:48:53 | * | clyybber joined #nim |
14:49:15 | GordonBGood | Araq, I have to get some sleep. If you want more simpler tests for closures, post sometihing, and I'll have them ready for you in the morning your time... |
14:49:20 | PMunch | tane, we certainly hope so :) |
14:49:22 | GordonBGood | gn8 |
14:49:26 | Araq | bye |
14:49:50 | PMunch | We have created a developer room with the minimalistic languages people and are accepting talks at the moment |
14:49:56 | tane | ah nice |
14:50:11 | tane | I actually heard 1st about fosdem in this channel, planning on going next year |
14:50:49 | PMunch | Talks will be preffered to be short 15-20 minutes things, so I hope that we'll at least have a couple Nim talks. I know there are certainly enough cool projects around in the community to talk about :) |
14:51:22 | PMunch | FOSDEM is a great conference, so I hope we'll see you there .) |
14:51:40 | Araq | can't we organize a Nim conference instead |
14:51:44 | tane | looking forward to it :) |
14:52:06 | clyybber | GordonBGood: gn8 |
14:52:09 | PMunch | Araq, if you can fill up our talk slots for FOSDEM I'll consider helping you :P |
14:52:32 | PMunch | So far there haven't been an exceptional amount of proposed talks |
14:54:21 | * | GordonBGood quit (Ping timeout: 268 seconds) |
14:58:09 | * | clyybber quit (Quit: WeeChat 2.6) |
15:00:34 | * | floppydh quit (Quit: WeeChat 2.6) |
15:05:35 | * | PMunch quit (Quit: Leaving) |
15:07:43 | disruptek | zevv should do a talk on optimizing npeg. |
15:13:13 | * | JustASlacker quit (Remote host closed the connection) |
15:44:09 | FromDiscord | <alehander42> Araq this was an idea but it seemed easier to just combine it with fosdem |
15:44:41 | FromDiscord | <alehander42> i am not coming to fosdem btw, so i played myself |
15:45:34 | * | NimBot joined #nim |
15:45:45 | FromDiscord | <alehander42> that's good |
15:46:09 | FromGitter | <mratsim> I don't want to do slides :p |
15:46:52 | disruptek | that one's going in my Araq.fortune collection. |
15:46:57 | FromDiscord | <alehander42> otherwise i always promoted the bulgaria-conf idea 😛 |
15:49:32 | * | tklohna quit (Ping timeout: 246 seconds) |
15:49:59 | * | tklohna joined #nim |
15:54:22 | * | nsf joined #nim |
16:23:40 | Zevv | how much free slots are there for nim then? |
16:32:18 | * | hoijui joined #nim |
16:35:21 | disruptek | enough. |
16:56:56 | federico3 | mratsim: you don't need slides |
17:00:45 | * | hoijui quit (Quit: Leaving) |
17:06:19 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
17:06:36 | * | pbb joined #nim |
17:13:22 | FromDiscord | <Clyybber> your repos are an presentation for themselves |
17:14:38 | * | jxy joined #nim |
17:22:54 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
17:23:09 | * | pbb joined #nim |
17:25:48 | * | donpdonp joined #nim |
17:26:31 | donpdonp | ive been using nim over the last month for a personal project. its been great to use. |
17:27:30 | donpdonp | i try lots of unusual languages and nim is nice for its c-interop obviously, but also the syntax feels 'forgiving' or less rigid than others. |
17:28:19 | donpdonp | and why doesnt everyone use "ptr type" thats much more readable than "*type" |
17:28:37 | FromDiscord | <Clyybber> Is there something that is an os thread type? Which is pthread on unix and so on? |
17:33:58 | FromDiscord | <Clyybber> Ah, got it |
17:34:21 | FromDiscord | <Generic> donpdonp: do you mean something* in Nim? |
17:35:13 | FromDiscord | <Clyybber> Uh, yeah. Nevermind I got it, I was searching for something that expands to the OS's pthread in the generated C code. |
17:35:20 | FromDiscord | <Clyybber> Which is SysThread |
17:35:26 | FromDiscord | <Clyybber> Or posix/PThread |
17:35:29 | donpdonp | Generic: ah yes, a few different syntaxes get mixed up in my head :) |
17:35:45 | * | krux02 quit (Remote host closed the connection) |
17:35:46 | FromDiscord | <Generic> something* means that it's exported |
17:35:56 | FromDiscord | <Generic> it has nothing to do with pointers |
17:36:00 | FromDiscord | <Clyybber> Oh, lol, thought you were referring to me |
17:36:14 | * | clyybber joined #nim |
17:36:40 | FromDiscord | <Generic> haha |
17:38:28 | donpdonp | Generic: actually whatI meant was *type in other languages, as an example of something that is less readable than 'ptr type' |
17:39:04 | FromDiscord | <Generic> oh, my bad |
17:39:46 | donpdonp | no prob. judging by all the participants thus far are coming from "FromDiscord" bot, that discord is more popular than irc here. :) |
17:40:04 | FromDiscord | <Generic> well the core devs are all on IRC |
17:40:08 | FromDiscord | <Generic> or some |
17:43:17 | Araq | I could switch if it helps anybody |
17:46:18 | * | vsantana quit (Remote host closed the connection) |
17:51:16 | rockcavera | What is the best current GUI package from Nim? |
17:56:46 | FromGitter | <topcheese> Hi, I'm new and I've discovered Nim a few days ago. This is what I found when looking for a GUI, https://matthiashager.com/gui-options-for-nim https://peterme.net/cross-platform-guis-and-nim-macros.html |
17:57:10 | rockcavera | What would be the best? would be the one that features better ease, cross-platform, more features ... |
17:58:37 | FromDiscord | <Generic> afaik there's unfortunately no one fits all solution |
17:58:48 | FromDiscord | <Generic> gui's are a pity |
17:59:27 | FromDiscord | <Generic> it depends on what you're trying to archieve |
17:59:55 | FromGitter | <topcheese> I've played around with NimX, but I'm not sure if I want to be tied into sdl2. |
18:00:14 | FromDiscord | <Generic> nimx is for example not native |
18:01:11 | FromDiscord | <Generic> libui is native on all three big OSes is limited |
18:02:14 | FromGitter | <topcheese> I was actually looking at a couple of other gui libraries I was thinking of trying to port over. Libui seems like a good one. |
18:03:21 | FromGitter | <topcheese> The other libraries are https://github.com/reubenscratton/oaknut |
18:03:42 | FromGitter | <topcheese> https://github.com/gammasoft71/xtd |
18:04:15 | Zevv | libui is stale and far from complete IIRC |
18:04:40 | FromDiscord | <Generic> yes, certain widgets are simply missing |
18:04:56 | FromDiscord | <Generic> like tree views or list boxes |
18:05:18 | Zevv | It is pretty compact though. I made the lua binding a few years ago, and that was only an evening or two of work. |
18:05:25 | Zevv | oh /a/ lua binding, there's more I see |
18:08:06 | * | vsantana joined #nim |
18:08:30 | FromGitter | <topcheese> SDL2 is very portable, so I'd say Nimx is a good choice. |
18:10:27 | * | gangstacat quit (Quit: Ĝis!) |
18:13:09 | FromDiscord | <Generic> a non native gui has it's problems |
18:13:47 | FromDiscord | <Generic> just to pull something from my head, it doesn't work with screen readers |
18:14:32 | FromDiscord | <Generic> besides the obvious one of it never/rarely getting to native look and feel |
18:17:20 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
18:17:34 | * | pbb joined #nim |
18:18:20 | * | theelous3 joined #nim |
18:19:57 | * | muxueqz[m] quit (Quit: User has been idle for 30+ days.) |
18:20:26 | * | gangstacat joined #nim |
18:20:44 | FromGitter | <topcheese> Isn't there a nim project that also uses HTML5 gui? I thought I ran across one. |
18:22:25 | Mister_Magister | can you simply crosscompile to arm? |
18:24:17 | FromGitter | <topcheese> Maybe it was this, but I'm not sure. https://github.com/juancarlospaco/nim-html-tools |
18:27:05 | livcd | zeev: you made lua bindings for libui? |
18:32:19 | FromGitter | <Willyboar> Probably you here about this https://github.com/treeform/fidget |
18:33:36 | Zevv | livcd: long ago |
18:34:06 | Zevv | https://github.com/zevv/libuilua |
18:36:50 | FromGitter | <topcheese> Thanks @Willyboar that's it, I like that one. I ran across it yesterday and forgot to save the link. |
18:41:15 | * | swisscowbell[m] left #nim ("Kicked by @appservice-irc:matrix.org : User has been idle for 30+ days.") |
18:41:24 | FromGitter | <Willyboar> We are waiting for the results :) |
18:48:22 | FromDiscord | <exelotl> iup is good, people sleep on it and I don't know why |
18:52:59 | FromDiscord | <exelotl> The other day I needed to add a file open/save prompt and a text input dialog to a small graphical app I was working on |
18:53:14 | FromGitter | <topcheese> No Mac support afaik. |
18:53:45 | FromDiscord | <exelotl> Tried a few options and iup was the only one that didn't give me any headache |
18:54:45 | FromGitter | <topcheese> oops, wrong lib. Yeah iup's not bad. |
18:55:31 | FromDiscord | <exelotl> Oh |
18:56:14 | * | uu91 quit (Ping timeout: 276 seconds) |
18:57:08 | madprops | does nim send things as reference when needed? what happens when i send an object for instance? |
18:57:14 | madprops | to a proc |
18:57:15 | * | uu91 joined #nim |
18:58:19 | Araq | madprops: exactly |
19:04:49 | * | clyybber quit (Quit: WeeChat 2.6) |
19:12:50 | FromDiscord | <kodkuce> @treeform duno if i am retarded or what but i am getting expression 'close(wss)' has no type (or is ambiguous) , am porting form old niv ws, hmm |
19:14:18 | FromDiscord | <kodkuce> proc close accepts WebSocket so hmm duno wtf, i checked name so should not be ambiguous if i get what that means xD |
19:16:23 | FromDiscord | <kodkuce> expression 'close(magic)' has no type (or is ambiguous) |
19:16:43 | FromDiscord | <kodkuce> hmm or meybe its taking close proc from some other lib |
19:18:24 | FromDiscord | <kodkuce> hmm |
19:18:52 | FromDiscord | <treeform> So wss ws secure socket? |
19:18:59 | FromDiscord | <treeform> or web socket server? |
19:19:35 | disruptek | former. |
19:19:56 | FromDiscord | <kodkuce> var magic = await newWebSocket(req) |
19:20:01 | FromDiscord | <kodkuce> and its atm magic |
19:20:06 | FromDiscord | <treeform> ok |
19:20:14 | FromDiscord | <kodkuce> cuz was not sure wtf is ambigoues |
19:20:46 | FromDiscord | <kodkuce> form what i see it accpets proc close*(ws: WebSocket) = and i am giving it WebSocket so duno whats wrong |
19:21:13 | FromDiscord | <treeform> its a pretty simple proc? |
19:21:14 | FromDiscord | <treeform> https://github.com/treeform/ws/blob/master/src/ws.nim#L429 |
19:21:33 | FromDiscord | <kodkuce> ye just saw |
19:21:33 | FromDiscord | <treeform> Instead of close does hangup work? |
19:22:00 | FromDiscord | <treeform> I think the websocket either not my websocket or the close is not my close? |
19:22:09 | FromDiscord | <kodkuce> Error: expression 'hangup(magic)' has no type (or is ambiguous) |
19:22:46 | FromDiscord | <kodkuce> worst thing even vscode shows me autocomplete for your proc |
19:23:07 | FromDiscord | <treeform> It feels like you still have some stuff using niv nad some stuff using mine |
19:23:15 | FromDiscord | <treeform> and its crossing some how |
19:23:37 | FromDiscord | <kodkuce> hmm but i am not importing anymore websockets or whatewer is niv one called |
19:23:40 | FromDiscord | <treeform> did you try nim -f to force a full recompile |
19:23:43 | FromDiscord | <kodkuce> can unistall to try |
19:23:48 | FromDiscord | <kodkuce> nah |
19:23:55 | FromDiscord | <kodkuce> dident think of that |
19:24:16 | FromDiscord | <kodkuce> meybe cuz same folder but its a new file i leaft old one |
19:25:33 | Araq | compile with --noNimblePath |
19:25:38 | FromDiscord | <kodkuce> hmm unistalling niv websocket didnet help, hmm will try some more myself and if donset work wil lcry again |
19:25:46 | FromDiscord | <kodkuce> ok |
19:26:15 | FromDiscord | <kodkuce> im(2, 8) Error: cannot open file: ws |
19:26:25 | FromDiscord | <kodkuce> that should be normal if not using nible path |
19:26:42 | FromDiscord | <kodkuce> cuz i instlled treeform ws with nimble |
19:26:46 | FromDiscord | <treeform> https://gist.github.com/treeform/8662b651335a0adf703bb7601752d3f2 |
19:26:56 | FromDiscord | <treeform> Here is a simple close example, does it work for you? |
19:27:31 | FromDiscord | <kodkuce> tough i cna copy paste it in dir and try, or even better first try this simple example myebe i broken it somwer myself |
19:28:40 | FromDiscord | <kodkuce> ok so simple one worked |
19:28:48 | FromDiscord | <kodkuce> so guess i broken it with some import or something |
19:28:52 | FromDiscord | <kodkuce> exploring |
19:29:01 | FromDiscord | <treeform> so now you need to remove stuff till your program looks like my example? |
19:29:47 | FromDiscord | <kodkuce> yep will figure it out |
19:30:42 | FromDiscord | <kodkuce> i think i found |
19:30:45 | FromDiscord | <kodkuce> what was issue |
19:31:03 | FromDiscord | <treeform> you can also call `ws.close(webSocket)` to make sure it picks up my function |
19:31:22 | FromDiscord | <treeform> what was the issue? |
19:31:48 | FromDiscord | <kodkuce> sec just want to see if i was that much dumb |
19:32:53 | FromDiscord | <kodkuce> lol Niv ones close proc returns Future your does not i just removed await |
19:33:07 | FromDiscord | <kodkuce> or discard duno what i putet there |
19:33:15 | FromDiscord | <kodkuce> duno how i dident see it earyler xD |
19:34:00 | FromDiscord | <treeform> oh yeah, errors around async are kind of bad. |
19:36:36 | * | GordonBGood joined #nim |
19:41:44 | * | GordonBGood quit (Ping timeout: 276 seconds) |
20:08:03 | madprops | can i sort var files: seq[(string, times.Time)] with sortedByIt ? |
20:08:19 | madprops | im trying files.sortedByIt(it[1]) |
20:08:51 | madprops | or maybe i should make an object for this |
20:10:32 | FromGitter | <Vindaar> @madprops: in principle `sortedByIt` works for that. But the type that's actually compared must have `<`, `==` procs defined. Not sure if that's the case for `Time` |
20:13:21 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
20:13:35 | * | pbb joined #nim |
20:19:06 | * | sschwarzer joined #nim |
20:19:11 | sschwarzer | Hi :) |
20:19:29 | sschwarzer | Is there a way to prevent inlining of an iterator (for debugging)? |
20:22:16 | Araq | no, sorry. |
20:22:40 | sschwarzer | Thanks |
20:23:40 | sschwarzer | What do you think about such a feature? Do you think it would make sense or are there reasons it shouldn't be in Nim (apart from the additional effort)? |
20:24:44 | Araq | well if you wrote the iterator you can annotate it with .closure |
20:25:09 | sschwarzer | By the way, I worked around it by temporarily changing the iterator to a proc that returns a seq. |
20:25:21 | Araq | good choice |
20:25:35 | sschwarzer | Araq: Good to know. Yes, it's an iterator of my own. |
20:27:36 | FromDiscord | <alehander42> sschwarzer what kind of debugging |
20:28:01 | FromDiscord | <alehander42> iirc there are some possible improvements related to iterator stepping debug info |
20:28:07 | sschwarzer | Although the "final" version of the iterator allows in-place modification of the data structure that is iterated over. But to test/debug the general functionality the seq workaround was ok. |
20:28:32 | sschwarzer | alehander: With gdb |
20:28:35 | FromDiscord | <alehander42> yes |
20:29:24 | sschwarzer | alehander: the instruction pointer jumped to nonsensical places. I haven't looked at the generated C code, but I assume the problem was because of the inlining. |
20:29:32 | FromDiscord | <alehander42> i think usually |
20:29:35 | FromGitter | <s0kil> Is there an filesystem watcher for Nim V1? ⏎ I have tried `https://github.com/FedericoCeratto/nim-fswatch` & `https://github.com/Vindaar/fsmonitor2` & `https://github.com/nim-lang/graveyard/tree/master/fsmonitor` without any luck. |
20:29:37 | FromDiscord | <alehander42> it jumps to the iteration original code |
20:29:47 | FromDiscord | <alehander42> which is sensible but not really useful for most simple `items` |
20:29:52 | FromDiscord | <alehander42> one option is to add a debug flag |
20:30:15 | FromDiscord | <alehander42> which makes nim generate a nonsensical lineinfo for iterator lines |
20:30:37 | FromDiscord | <alehander42> or to just generate the `for` callsite lineinfo for all of them |
20:31:01 | FromDiscord | <alehander42> the downside is that for some more complicated iterators its useful to be able to step inside |
20:31:39 | * | jjido joined #nim |
20:32:24 | FromDiscord | <alehander42> btw finally the nim small kernel kinda works |
20:32:39 | FromDiscord | <alehander42> the guys from #osdev helped me a lot with my qemu issues |
20:33:21 | FromDiscord | <alehander42> and after a lot of playing with the nim code and a c tutorial which its kinda based on, i realized i miss __asm__ __violatile__ sti |
20:33:29 | FromDiscord | <alehander42> so now keyboard input is working |
20:33:40 | FromDiscord | <alehander42> which is like super quality software |
20:37:03 | Araq | wow nice |
20:38:22 | * | filcuc quit (Ping timeout: 252 seconds) |
20:46:05 | * | nsf quit (Quit: WeeChat 2.6) |
20:50:01 | * | sschwarzer quit (Quit: leaving) |
21:00:43 | * | lritter joined #nim |
21:01:14 | * | narimiran quit (Ping timeout: 240 seconds) |
21:08:03 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:15:11 | * | jjido joined #nim |
21:16:56 | * | nif quit (Quit: ...) |
21:17:05 | FromDiscord | <alehander42> i plan on maybe moving this code to a lib, so one can make toy kernels more easily |
21:17:06 | * | nif joined #nim |
21:17:12 | FromDiscord | <alehander42> most of the code isnt mine anyway |
21:17:22 | * | Joco223 joined #nim |
21:19:50 | Araq | +1 |
21:21:31 | Joco223 | Hello everyone! I just wanted to ask, I've gotten a hang of Nim and I'd like to contribute to it. I've read the contribution guidelines, but I am wondering on what issues should I go for first? |
21:23:36 | Araq | Joco223: hi, welcome |
21:23:41 | disruptek | maybe a pr that adds a test that demonstrates a bug. |
21:23:53 | * | abm joined #nim |
21:24:04 | Araq | depends on your skills and interests |
21:24:41 | Araq | the --gc:regions bugs are a bit embarrassing but then I never announced the feature and it's moribund so ... |
21:26:56 | Joco223 | Well I've come from Cpp and I've made a few things with Nim, nothing too big. Some stuff that I've made in Cpp which is relevant to this is a VM, simple programming language based on the VMs (I've had multiple version) |
21:27:13 | Araq | VM bugs is it then :P |
21:27:18 | disruptek | lol |
21:27:29 | Araq | what the heck is a "No Unit Production Speedrun" ? |
21:28:00 | disruptek | oh, you mean NUPS |
21:28:07 | Araq | how can you even solve all the missions without producing any units |
21:28:54 | skrylar[m] | im just gonna.. use an importc to deal with this long double nonsense |
21:37:41 | * | Joco223 quit (Remote host closed the connection) |
21:43:20 | * | tane quit (Quit: Leaving) |
21:45:36 | * | GordonBGood joined #nim |
21:48:10 | * | ltriant joined #nim |
21:55:25 | donpdonp | for source files in the same project, when do i 'import' vs 'include'? |
21:55:50 | disruptek | include is an escape hatch. don't use it unless you need to escape. |
21:55:55 | FromGitter | <zetashift> One rarely use includes |
21:57:07 | donpdonp | ok thx |
21:57:28 | GordonBGood | One of the main reasons that includes are used in the Nim code base is that pragmas can't be inported |
21:57:49 | GordonBGood | So if a pragma has been created, the file needs to be included |
21:58:05 | donpdonp | types and fields are almost always public* since they'll be imported by other source files? |
21:59:22 | GordonBGood | If you are writing a library to be used by others, you can choose what to exposed; if it is for your own use, then of course it is entirely up to you |
21:59:44 | * | GordonBGood quit (Read error: Connection reset by peer) |
21:59:54 | donpdonp | i mean other source files in the same project. |
22:00:25 | * | GordonBGood joined #nim |
22:02:09 | GordonBGood | There is no real reason to expose types and fields that are only used within the file and not part of you "library"'s API |
22:02:58 | GordonBGood | Exposing everything pollutes the name space of your other files and kind of defeats the purpose of dividing up you project |
22:03:12 | donpdonp | a.nim and b.nim need type T, so I made types.nim and import it from a and b. if type T is not public*, nim says T is declared and not used |
22:03:37 | donpdonp | i guess that is just a Hunt |
22:03:39 | donpdonp | Hint |
22:03:45 | dom96 | GordonBGood, pragmas can be imported |
22:03:48 | madprops | im liking the case insensitivity. it's feels more forgiving, even though i've had to adjust some code like config var against Config object, but no biggie |
22:03:56 | dom96 | at least macros which can be invoked as pragmas can |
22:04:32 | dom96 | GordonBGood, to be honest, if there are cases which cannot be imported then I would consider that a bug |
22:05:39 | donpdonp | import just throws the proc and types into the namespace of the file doing the import? what if a.nim imports b and c, and a proc name is the same in b and c? |
22:06:27 | Araq | madprops: always nice to hear :-) |
22:06:59 | Araq | donpdonp: try it or read a tutorial about it |
22:07:05 | GordonBGood | I'm pretty sure I saw in the doc's that pragmas couldn't be imported, but I can't find it now |
22:07:09 | Araq | it doesn't work as you think it does. |
22:07:37 | Araq | GordonBGood: yeah, there is no {.pragma*: ...} in Nim |
22:10:02 | * | Vladar quit (Quit: Leaving) |
22:11:27 | donpdonp | Araq: good point :) |
22:11:47 | donpdonp | is a third file the usual way to resolve a circular dependency? |
22:12:15 | GordonBGood | dom96, Araq: Yeah, I was remembering this: https://nim-lang.org/docs/manual.html#pragmas-pragma-pragma |
22:18:13 | FromDiscord | <kodkuce> @treeform you alive, does header get updated via ws or i not gething this, am talking about protocol one, duno if its issue with godot ws client or mybrain or you lib |
22:18:23 | FromDiscord | <kodkuce> with old niv ws it worked np |
22:18:54 | FromDiscord | <kodkuce> but now if i use protocol it shoots me error E 0:00:01:0910 _verify_headers: Condition ' !headers.has("sec-websocket-protocol") ' is true. returned: false |
22:19:11 | FromDiscord | <kodkuce> https://github.com/godotengine/godot/blob/master/modules/websocket/wsl_client.cpp#L140 |
22:19:22 | FromDiscord | <kodkuce> https://github.com/treeform/ws/blob/master/tests/echo.nim |
22:19:34 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:19:59 | FromDiscord | <kodkuce> in niv you pedefind protocol but form what i see in ws you do it dynamicly on client request or i got it worng? |
22:20:23 | dom96 | kodkuce: what limitations are you running into with niv's? |
22:20:29 | FromDiscord | <treeform> are you connecting to `localhost: 9001/ws` or just `localhost: 9001/` |
22:20:47 | FromDiscord | <treeform> are you connecting to `localhost:9001/ws` or just `localhost:9001/` |
22:20:58 | FromDiscord | <kodkuce> just localhost |
22:21:07 | FromDiscord | <treeform> thats for regular html pages |
22:21:08 | FromDiscord | <kodkuce> :8080 in my case |
22:21:10 | FromDiscord | <treeform> remove |
22:21:17 | FromDiscord | <treeform> if req.url.path == "/ws": |
22:21:23 | FromDiscord | <kodkuce> i allread did |
22:21:34 | donpdonp | how does a nim developer keep straight the imports that are local source files and the imports that are nimble packages |
22:21:56 | FromDiscord | <kodkuce> can make minimal |
22:22:31 | madprops | what's the most straightforward way to replace part of the string, in a case insensitive manner? |
22:23:54 | FromDiscord | <treeform> @kodkuce I do send back a protocol: https://github.com/treeform/ws/blob/master/src/ws.nim#L89 |
22:23:57 | FromDiscord | <kodkuce> @treeform tought i added this if wsconn.protocol != "": echo wsconn.protocol and it echos the protocol godot client send/requested, so meyeb its client issue tought like i say it worked in niv version, probbaly cuz in niv it was preset on wsserver creation |
22:24:00 | FromDiscord | <treeform> Maybe the C++ version does not lower case it? |
22:24:49 | FromDiscord | <kodkuce> possible |
22:25:09 | FromDiscord | <treeform> can you edit the ws.nim and make header lower case and see if it works for you? |
22:25:21 | FromDiscord | <treeform> same case as `ERR_FAIL_COND_V(!headers.has("sec-websocket-protocol"), false);` |
22:25:41 | FromDiscord | <kodkuce> ye am doing that atm |
22:26:57 | FromDiscord | <treeform> do you need to use "protocol" thing at all? |
22:27:25 | FromDiscord | <kodkuce> nah |
22:27:33 | FromDiscord | <kodkuce> but was just testing 🙂 |
22:27:42 | FromDiscord | <treeform> does it work without the protocol? |
22:27:42 | FromDiscord | <kodkuce> hmm for some reason still dosent work |
22:27:52 | FromDiscord | <kodkuce> ye whiuto protocol it works |
22:28:46 | FromDiscord | <kodkuce> i go check how niv did it meybe i get it myself |
22:28:49 | FromDiscord | <kodkuce> have time anyway |
22:32:17 | FromDiscord | <kodkuce> nivs was too result.add("Sec-Websocket-Protocol: upecase so its not that |
22:32:44 | FromDiscord | <treeform> just write a quick tests, works for me 🙂 |
22:33:12 | FromDiscord | <treeform> https://gist.github.com/treeform/1f28dafa53925ba6c56d698a999c5f7a |
22:33:20 | FromDiscord | <treeform> But I don't have the Godot side. |
22:34:15 | FromDiscord | <treeform> Can you put `echo`s around https://github.com/treeform/ws/blob/master/src/ws.nim#L77 and see what protocol do you actually send? |
22:34:35 | FromDiscord | <kodkuce> sure |
22:36:36 | FromDiscord | <treeform> maybe your protocol has like a ":" in it or like a \c\L ? |
22:37:16 | * | krux02 joined #nim |
22:38:02 | FromDiscord | <treeform> looks likes nivs version does transforms like to lowercase on the protocol: https://github.com/niv/websocket.nim/blob/master/websocket/server.nim#L80 |
22:38:10 | FromDiscord | <treeform> maybe that is helping your thing run? |
22:38:26 | FromDiscord | <kodkuce> i think i found issue |
22:38:30 | FromDiscord | <kodkuce> if not ws.protocol.len == 0: |
22:38:42 | FromDiscord | <kodkuce> i put 1 echo under it and it dident write i think |
22:39:22 | FromDiscord | <kodkuce> tough echoing ws.protocol shows my protocol |
22:40:43 | FromDiscord | <treeform> what if you do `if ws.protocol.len > 0:` |
22:42:54 | FromDiscord | <kodkuce> this is some uber magic |
22:42:56 | FromDiscord | <kodkuce> Prot len is: 15 |
22:43:02 | FromDiscord | <treeform> you right there is some thing iffy with the `not ==` line |
22:44:03 | dom96 | you're probably getting: (not ws.protocol.len) == 0 |
22:44:09 | dom96 | i.e. bitwise not |
22:44:15 | FromDiscord | <treeform> ouch |
22:44:21 | FromDiscord | <treeform> thats probably right |
22:44:35 | FromDiscord | <kodkuce> yep now it works |
22:44:41 | FromDiscord | <kodkuce> with if ws.protocol.len > 0: |
22:44:52 | FromDiscord | <treeform> thank you for finding this bug |
22:44:57 | FromDiscord | <treeform> i'll whip up a use case for it |
22:45:10 | FromDiscord | <treeform> I don't use protocols, so I did not test it as well... |
22:45:22 | FromDiscord | <treeform> i'll whip up a test case for it |
22:46:06 | FromDiscord | <kodkuce> i personaly duno for what protocols are even xD dident read RFC |
22:46:35 | FromDiscord | <treeform> I think they are kind of stupid .. you can just do them in user land with your json or binary blobs |
22:46:46 | FromDiscord | <treeform> I don't know why they are included |
22:47:43 | FromDiscord | <kodkuce> duno now i must read rfc so meybe i know xD |
22:49:07 | FromDiscord | <kodkuce> or can you short spoon me, do they split like chat rooms or what? |
22:49:51 | FromDiscord | <treeform> not really |
22:49:52 | FromDiscord | <kodkuce> searching protocol in https://tools.ietf.org/html/rfc6455#section-5.2 gives me 270 entirs |
22:49:54 | FromDiscord | <kodkuce> xD |
22:50:03 | FromDiscord | <treeform> websocket is a protocol |
22:50:06 | FromDiscord | <treeform> and it has a sub protocol |
22:50:45 | FromDiscord | <treeform> you are looking for this: https://tools.ietf.org/html/rfc6455#page-59 |
22:51:03 | FromDiscord | <treeform> "This enables scripts to both select a subprotocol and be |
22:51:03 | FromDiscord | <treeform> sure that the server agreed to serve that subprotocol." |
22:51:09 | FromDiscord | <treeform> thats basically what you would use it for |
22:51:35 | FromDiscord | <treeform> you can use it for versioning etc... |
22:51:40 | FromDiscord | <kodkuce> oh |
22:51:48 | FromDiscord | <kodkuce> i think i get it now |
22:51:58 | FromDiscord | <treeform> https://tools.ietf.org/html/rfc6455#section-1.9 |
22:53:23 | * | solitudesf quit (Ping timeout: 246 seconds) |
22:53:34 | madprops | is there an example of how i can make a custom sub on .replace to make case insensitive replacements? |
22:53:35 | FromDiscord | <kodkuce> so if i have 2 diferent way of handling comm betwin server clients, example old and new, and basicly if i use json or binary blob i can just put first in json version:old or version:new and just process it diferently |
22:53:49 | FromGitter | <deech> Has anyone implemented immutable datastructures for Nim that share nodes efficiently? |
22:53:59 | FromDiscord | <treeform> @kodkuce yeah thats what I do too. |
22:54:04 | * | nif quit (Quit: ...) |
22:54:10 | FromDiscord | <treeform> But you could use this for that. |
22:54:14 | * | nif joined #nim |
22:54:37 | FromDiscord | <kodkuce> ok got it ty 🙂 |
22:56:50 | Araq | deech: I vaguely remember some Nimble package(s) about it |
22:58:31 | FromDiscord | <treeform> @kodkuce I have shipped 0.3.3 version of `ws` that should fix your issue. |
22:58:41 | FromDiscord | <treeform> can you verify that it works for you? |
23:00:00 | FromDiscord | <kodkuce> sure |
23:02:18 | FromDiscord | <kodkuce> @treeform yep it works |
23:02:32 | FromDiscord | <kodkuce> did nimble unsitall ws , then nible install ws |
23:02:40 | FromDiscord | <treeform> 👌 |
23:02:51 | FromDiscord | <treeform> perfect |
23:06:08 | * | vsantana quit (Remote host closed the connection) |
23:22:02 | lqdev[m] | @kodkuce FYI you can omit the uninstall step |
23:23:45 | FromDiscord | <kodkuce> it will oweride cuz new version right? |
23:24:03 | FromDiscord | <kodkuce> ye i dident think about that |