00:00:07 | FromDiscord | <ElegantBeef> No problem, glad my aimless guessing helped |
00:02:18 | FromDiscord | <cabboose> I’ll try add these as notes to the db_mysql docs later to make it more idiot (me) friendly |
00:29:27 | * | Wyvern joined #nim |
00:33:37 | FromDiscord | <Quibono> Random question, what would be the fastest way to do message passing between nim processes? |
00:34:24 | * | Wyvern quit (Remote host closed the connection) |
00:38:54 | FromDiscord | <cabboose> Running in one app? |
00:39:03 | FromDiscord | <cabboose> Or separate apps |
00:42:58 | FromDiscord | <Quibono> I'm not sure, all the programming I've done has been very muchso serial. |
00:43:07 | FromDiscord | <Quibono> I'm trying to make a program that won't be lol. |
00:43:16 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
00:46:54 | FromDiscord | <ElegantBeef> The same standard ways of IPC applies to nim |
00:48:29 | FromDiscord | <Quibono> Lol how does one learn these ways sensei? |
00:48:58 | FromDiscord | <cabboose> Not from anime 🤣 |
00:49:35 | FromDiscord | <Quibono> Lol just you wait if there isn't already a programming anime... |
00:49:51 | FromDiscord | <cabboose> When I get to work I’ll reply |
00:53:03 | FromDiscord | <ElegantBeef> @Quibono https://en.wikipedia.org/wiki/Inter-process_communication |
00:53:37 | FromDiscord | <cabboose> Basically use sockets |
00:53:48 | FromDiscord | <ElegantBeef> I mean there are multiple methods |
00:54:42 | FromDiscord | <cabboose> Redis has battery included methods with pubsub |
00:55:03 | FromDiscord | <ElegantBeef> What'd you call my mother? |
00:55:19 | FromDiscord | <cabboose> Gorgeous |
00:55:54 | FromDiscord | <cabboose> Or I suppose cow if you’re beef |
00:55:58 | FromDiscord | <Quibono> lol |
00:56:24 | FromDiscord | <Quibono> Yeah I do like the idea of it being pubsub, since I've got pretty clear consumers and producers of information |
00:58:04 | FromDiscord | <cabboose> If it’s a protected network I’d use redis to save myself the effort |
01:00:56 | FromDiscord | <cabboose> Either way it’ll usually involve some kind of server client dynamic using sockets (realistically redis is the exact same) |
01:01:02 | FromDiscord | <cabboose> At least that’s from my understanding |
01:01:35 | FromDiscord | <cabboose> I always tend to go to already made tools thus far and made sure that nim had something for redis before I started using nim incase I had to cut corners with IPC 🤣 |
01:02:03 | FromDiscord | <cabboose> If it’s in one app then you could look at channels |
01:02:37 | FromDiscord | <cabboose> Apparently it’s unstable with thread pool but should be fine for Threads if not communicating large amounts of info |
01:03:05 | FromDiscord | <cabboose> If it doesn’t have to be super fast then a standard sql database can suffice |
01:03:41 | FromDiscord | <cabboose> I just suggested redis because it is the fastest and has pubsub included |
01:03:52 | FromDiscord | <cabboose> Or again; sockets 🤣 |
01:04:36 | FromDiscord | <cabboose> You could also find a C library which has the boiler plate done and wrap it |
01:07:19 | FromDiscord | <ElegantBeef> There is also still memorymapped files, pipes, and all the other listed methods on that wikipedia page |
01:07:35 | FromDiscord | <ElegantBeef> Nim does have very easy to use mmap files |
01:07:54 | * | Tanger joined #nim |
01:09:41 | FromDiscord | <Quibono> So whats the difference between something like redis and zeromq? |
01:16:29 | * | j-james joined #nim |
01:23:50 | * | hnOsmium0001 joined #nim |
01:27:38 | Tanger | Hey folks, I'm having some issues with a script. I'm trying to hit an API endpoint by reading LAT/LON coordinates from files, parse the data into a better format and then write each result to a file. See https://play.nim-lang.org/#ix=2FuL |
01:28:07 | Tanger | I suspect I have some kind of file handle remaining open, as I get "Error in get data: Device or resource busy |
01:28:07 | Tanger | Additional info: "System error" |
01:28:07 | Tanger | " after going through a few files |
01:29:13 | mipri | is that the case? strace would show opens without closes. you could pause the program prior to the error (simple way: read from stdin) and check opened files with lsof. |
01:32:03 | Tanger | Hmmm, sure is a lot of TCP connections up, but no files |
01:32:26 | * | NimBot joined #nim |
01:32:59 | mipri | strace might also give you the actual error. that "System error" is pretty useless. |
01:46:47 | Tanger | Yeah, haha |
01:46:55 | Tanger | Thanks, I'll give it a crack |
01:50:03 | * | j-james quit (Remote host closed the connection) |
02:14:24 | * | zedeus quit (Ping timeout: 260 seconds) |
02:16:14 | * | zedeus joined #nim |
02:16:17 | * | abm quit (Quit: Leaving) |
02:25:14 | * | apahl quit (Ping timeout: 264 seconds) |
02:26:58 | * | apahl joined #nim |
03:17:11 | * | Tanger quit (Remote host closed the connection) |
03:19:53 | * | Tanger joined #nim |
03:27:27 | FromDiscord | <Zachary Carter> Quibono: redis isn't just pub sub |
03:27:50 | FromDiscord | <ElegantBeef> Might want to ping them, since that was hours ago |
03:28:01 | FromDiscord | <Zachary Carter> oh @Quibono ^ |
03:32:56 | disruptek | zmq is a protocol, redis is a service. |
03:37:27 | * | rockcavera quit (Remote host closed the connection) |
03:38:09 | FromDiscord | <Zachary Carter> Also I think the author of zmq is now working on: https://nng.nanomsg.org |
03:38:40 | * | lritter quit (Ping timeout: 272 seconds) |
03:41:06 | disruptek | !repo mqtt |
03:41:08 | disbot | https://github.com/zevv/nmqtt -- 9nmqtt: 11Native Nim MQTT client library 15 24⭐ 4🍴 7& 5 more... |
03:52:26 | * | opal quit (Remote host closed the connection) |
03:53:03 | * | opal joined #nim |
03:54:31 | * | opal quit (Remote host closed the connection) |
03:57:51 | * | opal joined #nim |
04:06:01 | * | supakeen quit (Quit: WeeChat 2.9) |
04:06:36 | * | supakeen joined #nim |
04:09:39 | FromDiscord | <cabboose> Memory mapped files is something I’ve never looked into 🤨 now I’ve got something to research |
04:10:36 | * | zedeus quit (Ping timeout: 260 seconds) |
04:12:28 | * | zedeus joined #nim |
04:26:02 | * | apahl quit (Ping timeout: 260 seconds) |
04:26:36 | * | apahl joined #nim |
04:35:45 | * | thomasross quit (Ping timeout: 240 seconds) |
04:50:50 | * | nixfreak joined #nim |
04:59:53 | nixfreak | karax is only for single page javascript right? So how can I create multiple functions of javascript events for multiple pages? |
05:05:52 | FromDiscord | <Rebel> @Quibono memory mapped files or named pipes for IPC communication would be the easiest. |
05:05:58 | FromDiscord | <Rebel> (edit) removed "communication" |
05:12:12 | leorize | nixfreak: I take it that you're trying to do dom manipulation? |
05:12:21 | leorize | then the `dom` module should have all you need |
05:14:43 | * | bung quit (Ping timeout: 256 seconds) |
05:16:42 | nixfreak | ok thanks |
05:44:08 | * | bung joined #nim |
05:45:44 | bung | is there a sugar to take HSlice as upper bound (exclusive)? |
05:54:10 | leorize | `..<` would be what you're looking for |
05:54:51 | bung | I'll use it as `a[tmpSlice]` |
05:55:33 | bung | current I create a inline proc dec slice.b |
06:12:19 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
06:18:36 | * | OldFaithful joined #nim |
06:18:43 | OldFaithful | Nim rocks |
06:18:47 | * | OldFaithful left #nim (#nim) |
06:19:46 | FromDiscord | <Idefau> nim stones too |
06:22:10 | FromDiscord | <ElegantBeef> nim rolls aswell |
06:33:43 | * | leorize quit (Ping timeout: 240 seconds) |
06:42:09 | ForumUpdaterBot | New thread by Domogled: Std/asynchttpserver or httpbeast, see https://forum.nim-lang.org/t/7158 |
06:49:15 | * | narimiran joined #nim |
06:50:20 | * | habamax joined #nim |
06:50:56 | * | nixfreak quit (Ping timeout: 240 seconds) |
07:16:19 | * | a_chou joined #nim |
07:31:31 | FromDiscord | <Rika> nim dirt |
07:40:44 | * | a_chou quit (Quit: a_chou) |
08:04:46 | * | lritter joined #nim |
08:20:59 | FromDiscord | <sheerluck> I found `-fpermissive` in https://github.com/nim-lang/Nim↵I tried to compile Nim without `-fpermissive` and it worked↵`-fpermissive` hides errors↵Do not use `-fpermissive` |
08:37:07 | FromGitter | <binhonglee> Hi all, I have some question about generics. I saw there are a few generic related issues open and this seems somewhat related. Essentially there's a regression for union typed generic initialization with 1.4.0 (it worked on 1.2.8 and before.) ⏎ ⏎ https://play.nim-lang.org/#ix=2FvP ⏎ ⏎ Is this a new issue that needs to be separately created or should it be tagged to an existing issue. |
08:37:07 | FromGitter | ... [https://gitter.im/nim-lang/Nim?at=5fbf6933b12c2622f905aee7] |
08:40:29 | FromGitter | <binhonglee> Hey all, it seems like there is a regression (works on 1.2.8 and before) in regards to union typed generic initialization. I saw there are a few generic related issues open and I wasn't sure if this warrants a new issue or its a known / existing issue. ⏎ ⏎ https://play.nim-lang.org/#ix=2Fw0 |
08:45:17 | Araq | > Do not use `-fpermissive` |
08:45:23 | Araq | well it's generated C code |
08:46:10 | Araq | wrong layer. You might as well care about GCC producing no assembler code that produces warnings |
08:47:02 | FromGitter | <gogolxdong> Is it possible to set up proxy for nimble? |
08:47:22 | Araq | (which probably isn't a thing because GNU asm doesn't even bother with producing warnings) |
08:57:34 | * | Tanger quit (Remote host closed the connection) |
09:03:41 | disruptek | binhonglee: i would create an issue for it. |
09:04:26 | Araq | gogolxdong: yeah, I think so, but I don't know how |
09:05:31 | * | PMunch joined #nim |
09:05:49 | disruptek | arrays with negative length make my pants tight. |
09:11:29 | * | haxscramper joined #nim |
09:12:24 | * | haxscramper left #nim (#nim) |
09:18:46 | * | lritter quit (Ping timeout: 272 seconds) |
09:24:28 | ForumUpdaterBot | New thread by B3liever: Eminim - JSON deserialization macro for Nim, see https://forum.nim-lang.org/t/7159 |
09:30:53 | supakeen | ls -lart |
09:30:57 | supakeen | Ehhh. |
09:31:01 | supakeen | Hi, not my terminal. |
09:32:19 | FromDiscord | <Idefau> sudo rm -rf / |
09:39:50 | Prestige | supakeen: I hope you don't type that every time lol |
09:40:25 | supakeen | I do! |
09:40:30 | supakeen | Automatism. |
09:45:40 | Prestige | I use alias l for that |
09:46:31 | Zoom[m] | Y'know `alias lt='ll -lart --color=tty'` or something like that |
09:46:40 | * | CcxWrk quit (Read error: Connection reset by peer) |
09:47:15 | * | CcxWrk joined #nim |
09:47:28 | Prestige | I just use l, one char aliases are nice |
09:50:46 | Zoom[m] | Anyone uses github.com/madprops/lq ? |
09:52:10 | * | CcxWrk quit (Ping timeout: 256 seconds) |
09:52:29 | Zoom[m] | It's not exa, but a commendable attempt nonetheless |
09:52:55 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
09:55:27 | FromDiscord | <Vindaar> if you want an alternative, use c-blake's: https://github.com/c-blake/lc |
09:58:50 | Zoom[m] | Wow, those screenshots... That's post-modern as hell |
10:01:02 | Araq | "The most obscure of these is likely "multi-dimensional". I mean this in the mathematical "independent coordinate" sense not a Jurassic Park (1993)-esque graphical file tree sense. " |
10:01:18 | Araq | bummer, I want the Jurassic Park experience |
10:21:20 | PMunch | Araq, ask and you shall receive: http://fsv.sourceforge.net/ |
10:23:07 | FromDiscord | <ElegantBeef> Is that website from the year jurssic park released? |
10:26:34 | PMunch | 6 years after |
10:26:38 | PMunch | But pretty close :P |
10:35:32 | * | audiofile joined #nim |
10:48:17 | * | audiophile joined #nim |
10:50:04 | Araq | PMunch, nice |
10:50:31 | Araq | unfortunately it still misses the raptor breaking through my security door |
10:51:10 | * | audiofile quit (Ping timeout: 256 seconds) |
10:51:11 | * | audiophile is now known as audiofile |
10:52:21 | PMunch | That's slightly harder to make I think :P |
10:52:48 | PMunch | Personally I prefer to not be maimed by a raptor while browsing my files, but to each their own |
10:54:58 | FromDiscord | <whisperdev> Hello. How can I do this with the native nim regex? https://play.nim-lang.org/#ix=2FwF |
10:58:14 | PMunch | May I suggest using https://nim-lang.org/docs/os.html#splitPath%2Cstring instead? |
10:59:16 | FromDiscord | <Imperatorn> lol, fsv rox |
10:59:20 | FromDiscord | <lqdev> PMunch: too bad fsv can't be compiled in 2020 |
10:59:42 | FromDiscord | <lqdev> not without a shitton of hassle |
11:00:57 | FromDiscord | <Bimbo> Hello everyone, i'm trying to interact with the X server through the x11 library and i'd like some help as to how to change the name of the root window. Here is the messy code i wrote that doesn't work https://privatebin.net/?a4bc988e4ca97b03#57dYPjEtzPLcGUHtVaxFj4CQ2XNAou1UxkAc8ZsHuBBU |
11:01:39 | FromDiscord | <Bimbo> I know this isn't a nim specific question but i'd like some leads as to how to do it if possible |
11:01:46 | FromDiscord | <whisperdev> @PMunch that did not work |
11:01:58 | PMunch | What do you mean it didn't work? |
11:02:26 | FromDiscord | <whisperdev> It's a windows path and it did not give me the right head and tail |
11:03:15 | PMunch | Hmm, I thought that module was supposed to be OS specific |
11:05:06 | FromDiscord | <whisperdev> I am trying on Playground |
11:05:44 | * | beatmox quit (Read error: Connection reset by peer) |
11:06:20 | FromDiscord | <Imperatorn> @whisperdev what do you want the regex to do? |
11:06:25 | PMunch | Ah, the playground runs linux |
11:07:10 | * | beatmox joined #nim |
11:07:33 | FromDiscord | <Imperatorn> According to RegexBuddy it does this: https://media.discordapp.net/attachments/371759389889003532/781476229404295208/unknown.png |
11:11:37 | FromDiscord | <Imperatorn> Btw, is "asyncnet" the recommended async/await construct in Nim or should I use something else (coming from C#)? |
11:15:01 | PMunch | @Bimbo, not quite sure what you're doing wrong to be honest, but this works: http://ix.io/2FwK |
11:15:14 | PMunch | Basically stitched together from what xsetroot does |
11:16:29 | FromDiscord | <Bimbo> I didn't know XStoreName existed and tried to do it through attributes.. Can confirm this works though |
11:16:40 | FromDiscord | <Bimbo> i didn't want to use xsetroot to get some x11 experience |
11:16:44 | FromDiscord | <Bimbo> thanks a lot |
11:17:02 | PMunch | X11 is quite tricky to work with.. |
11:17:13 | audiofile | anyone use vim to write nim programs? any good plugins that you use |
11:17:56 | FromDiscord | <Bimbo> figured that much.. |
11:18:09 | PMunch | audiofile, I use vim |
11:18:30 | PMunch | With the zah/nim.vim plug-in and LSP |
11:22:14 | FromDiscord | <lqdev> audiofile: alaviss/nim.nvim |
11:23:17 | FromGitter | <matrixbot> `Clonkk` I use neovim with LSP and alaviss/nim.nvim (I just added a ``local foldlevel=99`` to avoid having everything folder by default) |
11:23:44 | FromGitter | <matrixbot> `Clonkk` * I use neovim with LSP and alaviss/nim.nvim (I just added a `setlocal foldlevel=99` to avoid having everything folder by default) |
11:24:25 | FromDiscord | <lqdev> ~matrix |
11:24:26 | disbot | matrix: 11Nim channels on Matrix can be found at +nim:asra.gr (https://matrix.to/#/+nim:asra.gr) |
11:25:23 | * | Clonkk[m] joined #nim |
11:25:31 | audiofile | thanks! just what i was looking for |
11:25:53 | audiofile | do you use anything to compile and run? makefiles? |
11:27:19 | Clonkk[m] | Task defined in nimble files or config.nims. |
11:27:38 | * | audiophile joined #nim |
11:28:42 | PMunch | Or just nim c -r filename |
11:29:07 | Clonkk[m] | If I don't need any flag, I call the compiler directly yes |
11:29:21 | PMunch | But mostly just Ctrl+Z to put vim in the background, then compile-and-run in the terminal, and fg back into vim |
11:29:26 | Clonkk[m] | When I'm lazy I directly do ``nim r filename`` |
11:30:30 | * | audiofile quit (Ping timeout: 272 seconds) |
11:30:32 | * | audiophile is now known as audiofile |
11:34:51 | * | lnxw37d4 quit (Quit: Bridge terminating on SIGTERM) |
11:34:51 | * | L[m] quit (Quit: Bridge terminating on SIGTERM) |
11:34:51 | * | GitterIntegratio quit (Quit: Bridge terminating on SIGTERM) |
11:34:51 | * | unclechu quit (Quit: Bridge terminating on SIGTERM) |
11:34:51 | * | BitPuffin quit (Quit: Bridge terminating on SIGTERM) |
11:34:52 | * | leorize[m] quit (Quit: Bridge terminating on SIGTERM) |
11:34:52 | * | planetis[m] quit (Quit: Bridge terminating on SIGTERM) |
11:34:52 | * | Helios quit (Quit: Bridge terminating on SIGTERM) |
11:34:52 | * | Avatarfighter[m] quit (Quit: Bridge terminating on SIGTERM) |
11:34:52 | * | 94KAAYKUB quit (Quit: Bridge terminating on SIGTERM) |
11:34:54 | * | jonjitsu[m] quit (Quit: Bridge terminating on SIGTERM) |
11:34:54 | * | ache-of-head[m] quit (Quit: Bridge terminating on SIGTERM) |
11:34:55 | * | ee7[m] quit (Quit: Bridge terminating on SIGTERM) |
11:34:55 | * | Jitty[m] quit (Quit: Bridge terminating on SIGTERM) |
11:34:58 | * | pixtum[m] quit (Quit: Bridge terminating on SIGTERM) |
11:34:59 | * | brainbomb[m] quit (Quit: Bridge terminating on SIGTERM) |
11:35:01 | * | guelosk[m] quit (Quit: Bridge terminating on SIGTERM) |
11:35:14 | * | Zoom[m] quit (Quit: Bridge terminating on SIGTERM) |
11:35:15 | * | Clonkk[m] quit (Quit: Bridge terminating on SIGTERM) |
11:35:16 | * | reversem3 quit (Quit: Bridge terminating on SIGTERM) |
11:35:16 | * | MTRNord[m] quit (Quit: Bridge terminating on SIGTERM) |
11:35:17 | * | jrhawley[m] quit (Quit: Bridge terminating on SIGTERM) |
11:42:32 | * | narimiran quit (Ping timeout: 272 seconds) |
11:43:37 | * | narimiran joined #nim |
11:44:39 | * | Zoom[m] joined #nim |
11:50:52 | * | rockcavera joined #nim |
11:53:58 | Zoom[m] | I have my f4 binded to run vim's make, depended on file extension. I should probably make it run compilation in an async window, though |
11:55:53 | * | letto quit (Read error: Connection reset by peer) |
11:56:17 | * | letto joined #nim |
11:58:45 | * | bung quit (Ping timeout: 256 seconds) |
12:06:01 | * | supakeen quit (Quit: WeeChat 2.9) |
12:06:09 | * | Avatarfighter[m] joined #nim |
12:06:09 | * | BitPuffin joined #nim |
12:06:09 | * | brainbomb[m] joined #nim |
12:06:09 | * | Helios joined #nim |
12:06:09 | * | GitterIntegratio joined #nim |
12:06:09 | * | jonjitsu[m] joined #nim |
12:06:09 | * | leorize[m] joined #nim |
12:06:10 | * | leorize[m]1 joined #nim |
12:06:10 | * | lnxw37d4 joined #nim |
12:06:10 | * | MTRNord[m] joined #nim |
12:06:10 | * | planetis[m] joined #nim |
12:06:10 | * | reversem3 joined #nim |
12:06:10 | * | L[m] joined #nim |
12:06:10 | * | unclechu joined #nim |
12:06:15 | * | ache-of-head[m] joined #nim |
12:06:15 | * | jrhawley[m] joined #nim |
12:06:15 | * | ee7[m] joined #nim |
12:06:16 | * | Jitty[m] joined #nim |
12:06:16 | * | Clonkk[m] joined #nim |
12:06:16 | * | pixtum[m] joined #nim |
12:06:23 | * | guelosk[m] joined #nim |
12:06:38 | * | supakeen joined #nim |
12:07:46 | * | tiorock joined #nim |
12:07:46 | * | tiorock quit (Changing host) |
12:07:46 | * | tiorock joined #nim |
12:07:46 | * | rockcavera is now known as Guest47038 |
12:07:46 | * | Guest47038 quit (Killed (rajaniemi.freenode.net (Nickname regained by services))) |
12:07:46 | * | tiorock is now known as rockcavera |
12:09:41 | * | tiorock joined #nim |
12:12:07 | * | rockcavera quit (Ping timeout: 244 seconds) |
12:18:33 | * | Vladar joined #nim |
12:19:54 | * | bung joined #nim |
12:20:08 | FromDiscord | <dom96> yep, asyncnet is the way to go |
12:46:51 | FromGitter | <HJarausch_gitlab> Is there something like Natural8? I need an int8 type (for variable of the builtin set type) but I'like to check the compiler that no negative value is assigned to that variable (like is it the case for variables of type Natural). Is there such a thing? |
12:49:15 | PMunch | uint8? |
12:50:50 | FromDiscord | <lqdev> you can always define one |
12:51:02 | FromDiscord | <lqdev> `type Natural8 = range[low(uint8)..high(uint8)]` |
12:51:20 | FromDiscord | <lqdev> !eval type Natural8 = range[low(uint8)..high(uint8)]; echo Natural8.sizeof |
12:51:23 | NimBot | 1 |
12:56:37 | PMunch | !eval var x: uint8; x = -1 |
12:56:40 | NimBot | Compile failed: /usercode/in.nim(1, 19) Error: type mismatch: got <int literal(-1)> but expected 'uint8' |
12:57:00 | PMunch | Unsigned integers already disallows you to assign negative numbers |
12:57:13 | PMunch | This wasn't always the case though |
12:57:23 | PMunch | So beware if you're using Nim pre 1.0 |
12:59:51 | * | hmmm joined #nim |
12:59:57 | hmmm | hallo :> |
13:02:30 | * | lritter joined #nim |
13:06:36 | Prestige | Sup hmmm |
13:06:36 | FromDiscord | <lqdev> PMunch: yeah but unsigned integers don't do overflow checks |
13:10:03 | PMunch | That's true.. |
13:10:38 | narimiran | hmmm: just three 'm' today? |
13:21:11 | FromDiscord | <lqdev> the nickname reflects his 🤔-level |
13:21:45 | PMunch | I wash I was only three m's today |
13:21:50 | PMunch | I think I'm at a solid 8 |
13:23:06 | * | abm joined #nim |
13:23:06 | FromDiscord | <lqdev> i'm at a solid 0 because my brain is on airplane mode as of late |
13:23:34 | FromDiscord | <shad0w> PMunch: any more test you need done? https://github.com/PMunch/nimlsp/issues/64 |
13:23:35 | disbot | ➥ Lsp server doesn't respond when special characters in filename or path. |
13:23:48 | FromDiscord | <shad0w> (edit) "test" => "tests" |
13:24:05 | FromDiscord | <shad0w> (edit) "PMunch: ... any" added "Hi." |
13:24:45 | PMunch | Hmm, well that's not great.. |
13:26:28 | FromDiscord | <shad0w> does it work for you in other editors ? |
13:26:35 | FromDiscord | <shad0w> (edit) "does it work ... for" added "fine" |
13:28:19 | PMunch | It seems to work fine in Vim |
13:28:38 | PMunch | Created a folder /tmp/test#path/ |
13:28:47 | PMunch | And added a file test.nim |
13:29:58 | FromDiscord | <shad0w> and it doesn't crash after a few seconds of moving around ? |
13:30:26 | FromGitter | <HJarausch_gitlab> @lqdev Many thanks. I've never seen that syntax. |
13:30:30 | PMunch | Seems fine |
13:31:00 | FromDiscord | <lqdev> @HJarausch_gitlab https://nim-lang.org/docs/manual.html#types-subrange-types |
13:31:13 | FromDiscord | <shad0w> could then just be a emacs lsp-mode - nimlsp not playing nice thing |
13:31:21 | FromDiscord | <lqdev> there's a shorter albeit kind of buggy form where you can omit `range[]` and just do eg. `1..10` |
13:31:45 | FromDiscord | <lqdev> it doesn't play well with generics though |
13:31:51 | FromDiscord | <shad0w> i just might give up and start sublime text for this lol |
13:32:28 | PMunch | Hmm, well that's a boring solution |
13:32:46 | FromDiscord | <lqdev> @shad0w i have a nim syntax plugin for rxi/lite if you want to try it out and don't have anything against rather simplistic autocomplete :p |
13:33:05 | PMunch | Then again I never had any issues with this.. |
13:33:22 | FromDiscord | <shad0w> if its stupid, and it works. it's not stupid : P |
13:33:47 | FromDiscord | <shad0w> i just dont want to wander about lsp-mode internals just to get working completions |
13:33:47 | FromDiscord | <zetashift> no emacs users to reproduce this issue with? |
13:34:08 | FromDiscord | <shad0w> that's the thing with emacs users |
13:34:12 | FromDiscord | <shad0w> very few |
13:34:28 | FromDiscord | <zetashift> there are a few here tho! |
13:34:37 | FromDiscord | <shad0w> and then when you find some, they ought to be using same plugins as you |
13:34:37 | FromDiscord | <zetashift> I used it too, albeit that was doom-emacs |
13:34:54 | FromDiscord | <zetashift> but switched to vscode because nim support wasn't....great |
13:35:03 | FromGitter | <gogolxdong> @Araq, are you around, there is an idea about ARC/ORC from my community which I don't quite understand, I think we should discuss a little bit. |
13:35:04 | FromDiscord | <shad0w> sure is |
13:35:15 | FromDiscord | <shad0w> but vscode is just... so.. slow... |
13:35:30 | FromDiscord | <shad0w> no amount of completions are worth that |
13:36:04 | FromDiscord | <shad0w> sublime is a good middle ground with stuff working and it not being a slog |
13:36:18 | FromDiscord | <shad0w> and it has half workable emacs keybindings |
13:36:19 | FromDiscord | <zetashift> there is vim? |
13:36:24 | PMunch | @shad0w, could you enable logging for me in nimlsp? |
13:36:28 | FromDiscord | <zetashift> ah yea I use the spacemacs keybindings |
13:36:29 | PMunch | And send me the log? |
13:36:31 | FromDiscord | <shad0w> you take that back |
13:36:35 | FromDiscord | <zetashift> 🙂 |
13:36:37 | FromDiscord | <zetashift> haha |
13:36:47 | FromDiscord | <zetashift> (edit) "there" => "~~there" | "vim?" => "vim?~~" |
13:36:50 | FromDiscord | <shad0w> i used to be a vimmer fwiw |
13:36:52 | FromDiscord | <shad0w> nty |
13:36:58 | FromDiscord | <lqdev> https://github.com/rxi/lite :) |
13:37:09 | FromDiscord | <lqdev> my fav editor now |
13:37:12 | PMunch | Vim is great :) |
13:37:20 | FromDiscord | <lqdev> you can change literally everything in lit |
13:37:21 | FromDiscord | <lqdev> (edit) "lit" => "lite" |
13:37:38 | FromDiscord | <shad0w> i'll give it a spin |
13:37:42 | FromDiscord | <shad0w> thanks |
13:37:45 | FromDiscord | <lqdev> np |
13:38:08 | FromDiscord | <lqdev> btw i personally use a fork franko/lite-xl which has nicer font rendering and a few bugfixes |
13:38:29 | FromDiscord | <lqdev> as mainstream seems to be abandoned, or the author is on a break |
13:38:41 | FromDiscord | <shad0w> PMunch: logging sure. where do i turn that on ? |
13:39:13 | FromDiscord | <shad0w> that's been going around a lot lately. |
13:41:58 | PMunch | Just run `nimble debug` when you build it |
13:42:11 | PMunch | That turns on all the debugging stuff |
13:42:49 | PMunch | And the file ends up in `getTempDir() / "nimlsp"` |
13:42:58 | PMunch | Wherever that is on Windows :P |
13:43:25 | FromDiscord | <shad0w> i am on linux now : P |
13:45:47 | FromDiscord | <shad0w> https://pastebin.com/KAaNLXRH |
13:46:05 | * | lum quit (Quit: Lum: Bye!) |
13:46:15 | FromDiscord | <shad0w> ^ this is for the case where nimlsp even refuses to start. (linux with spl path name) |
13:46:30 | * | lum joined #nim |
13:48:04 | PMunch | Hmm, that seems like a perfectly fine log to me |
13:48:59 | PMunch | Oh wait |
13:49:03 | PMunch | I see what has gone wrong |
13:50:10 | FromDiscord | <squid> Anyone have some good nim project ideas for a nim beginner? |
13:50:40 | Zevv | depends, Nim is pretty broad, so what are your interests? |
13:50:49 | Zevv | and your experiences with other languages & programming |
13:52:11 | * | Perkol joined #nim |
13:52:11 | FromDiscord | <shad0w> https://pastebin.com/skpLMTpY |
13:52:34 | FromDiscord | <squid> Honestly. I wanna know a language but kinda lose interest and start another one. So my knowledge is broad in languages but pretty basic |
13:52:39 | FromDiscord | <shad0w> ^ this is the log where it dies after a few seconds (linux + valid path, no spl names) |
13:53:49 | FromDiscord | <squid> Zevv, Honestly you got any easy ideas. I made a number guess game |
13:54:38 | PMunch | @shad0w, wait it dies with a non-special path as well? |
13:55:06 | FromDiscord | <shad0w> yes. is a very buggy sense |
13:55:11 | FromGitter | <HJarausch_gitlab> @lqdev Do you know about a plugin language_nim.lua |
13:55:11 | FromDiscord | <Clyybber> @lqdev lite looks nice |
13:55:16 | FromDiscord | <shad0w> (edit) "is" => "in" |
13:55:50 | FromDiscord | <shad0w> it starts, works for a few seconds, i get a few compeltions, then it dies and emacs asks me if i want to restart the lsp server |
13:56:20 | FromDiscord | <shad0w> if i restart the server. it then again works for a few before dying again |
13:56:23 | Clonkk[m] | My first Nim project was implementing FOAAS (https://www.foaas.com/). Handling string, json, http request is usually a good start for SW no matter the industry. |
13:56:38 | Zevv | squid: you could start making the same thing in Nim. You know the problem you're trying to solve and you have an alternative implementation. That allows you to play with the language, feel and see where it differs from what you know |
13:57:12 | PMunch | Hmm, does the emacs lsp plug-in log anything? |
13:58:36 | PMunch | @shad0w, just pushed another update |
13:58:40 | FromDiscord | <shad0w> nothing of use i reckon |
13:58:44 | FromDiscord | <shad0w> but here it is |
13:58:46 | FromDiscord | <shad0w> https://pastebin.com/4nx1hBDh |
13:59:03 | Clonkk[m] | * My first Nim project was implementing FOAAS (https://www.foaas.com/). Handling string, json, http request is usually a good start for SW no matter the industry. I found that working with a pre-existing spec helps when you don't know the language so you don't have to figure out WHAT to do and HOW to do it :) |
13:59:22 | FromDiscord | <lqdev> @HJarausch_gitlab i have an open PR for that https://github.com/rxi/lite-plugins/pull/102 |
13:59:23 | disbot | ➥ Nim syntax |
13:59:37 | PMunch | No that doesn't seem particularly useful |
13:59:48 | FromDiscord | <lqdev> and there's another PR also implementing Nim syntax, but mine is more accurate |
14:00:31 | FromDiscord | <squid> Zevv, I meant i made a number guess game in nim |
14:00:32 | FromDiscord | <shad0w> should i test that out |
14:00:54 | Clonkk[m] | * @squid My first Nim project was implementing FOAAS (https://www.foaas.com/). Handling string, json, http request is usually a good start for SW no matter the industry. I found that working with a pre-existing spec helps when you don't know the language so you don't have to figure out WHAT to do and HOW to do it :) |
14:01:51 | PMunch | @shad0w, yes please |
14:02:21 | PMunch | I had the order of decode/parse the wrong way round |
14:03:25 | FromDiscord | <shad0w> building in release mode now |
14:03:34 | PMunch | Please do debug mode |
14:03:41 | PMunch | I added another debug statement |
14:03:56 | * | hmmm quit (Ping timeout: 240 seconds) |
14:06:58 | * | bung quit (Ping timeout: 246 seconds) |
14:07:25 | FromDiscord | <shad0w> https://pastebin.com/eMxJbJRa |
14:07:40 | FromDiscord | <shad0w> crashing again. tested on the nimlsp.nim src file. |
14:08:15 | FromDiscord | <shad0w> i can see `Unable to parse data as RequestMessage` as a recurring msg in these logs. this relevant ? |
14:08:56 | PMunch | Nah |
14:09:10 | PMunch | It tries to parse as RequestMessage, then it tries to parse as NotificationMessage |
14:09:20 | PMunch | So it's natural that one of those will fail |
14:09:31 | planetis[m] | i need to make sure my input array fills exactly my output (so there aren't any zeros at the end like [1, 2, 3, 0, 0], what defect should I raise? |
14:09:44 | PMunch | It is sending a cancel request though, not sure if that might be what is messing it up |
14:10:09 | PMunch | planetis[m], ValueError is the closest I guess |
14:10:28 | planetis[m] | not RangeDefect? |
14:10:45 | PMunch | Well that might work as well |
14:10:56 | PMunch | It's a bit under-specified which Defect to use for what in Nim |
14:11:02 | PMunch | No real common practice afaik |
14:12:09 | * | tiorock is now known as rockcavera |
14:12:10 | * | rockcavera quit (Changing host) |
14:12:10 | * | rockcavera joined #nim |
14:12:28 | FromDiscord | <shad0w> it seems to be happening just in emacs it seems |
14:12:42 | FromDiscord | <shad0w> could have to do with how it's sending data to nimlsp |
14:12:49 | FromDiscord | <shad0w> and it probaly not liking it |
14:13:09 | * | bung joined #nim |
14:13:28 | FromDiscord | <shad0w> lsp works fine for other lsp servers i use |
14:13:43 | FromDiscord | <shad0w> its definitely a nimlsp + lsp-mode thing |
14:13:57 | PMunch | That is strange though |
14:14:23 | PMunch | Do you have a log for the instant crash? Or was that fixed with my latest update? |
14:14:31 | FromDiscord | <shad0w> lemme see |
14:14:39 | PMunch | Oh by the way, not sure if you noticed, but this is not on the main branch |
14:14:47 | PMunch | Should've probably mentioned that earlier.. |
14:14:47 | * | audiofile quit (Quit: Default Quit Message) |
14:20:32 | PMunch | Ugh, x11 is giving me grief again.. |
14:20:50 | PMunch | Can't for the life of me figure out how to reparent a window properly.. |
14:21:23 | FromDiscord | <shad0w> i copied the file from the pr diff section, i guess that's fine |
14:21:46 | PMunch | Hmm, sure that should work |
14:21:53 | PMunch | As long as you copy the right one :P |
14:24:52 | FromDiscord | <shad0w> https://pastebin.com/7RXm23CK |
14:25:07 | FromDiscord | <shad0w> this seems to have been fixed |
14:25:29 | FromDiscord | <shad0w> weird update:- it seems to be working on smaller test files i make. completion + not crashing |
14:25:42 | FromDiscord | <shad0w> but its crashing on the nimlsp.nim file : / |
14:28:32 | PMunch | The nimlsp file is a bit of a torture test |
14:28:36 | PMunch | It doesn't crash for me though.. |
14:28:42 | PMunch | But it gives a lot of weird errors |
14:28:50 | PMunch | (like nimsuggest errors, not nimlsp ones) |
14:29:18 | FromDiscord | <shad0w> : / |
14:29:53 | FromDiscord | <shad0w> i guess you can merge that to master then ? |
14:31:29 | PMunch | Does it work well with special characters as well? |
14:35:06 | FromDiscord | <shad0w> seems to work with what it wasn't earlier |
14:35:14 | FromDiscord | <shad0w> the `#` char |
14:35:34 | FromDiscord | <shad0w> didnt test with others like % $ etc |
14:35:53 | FromDiscord | <shad0w> seemed to work on windows too, but i'll test it again when i boot into it |
14:36:05 | FromDiscord | <shad0w> (edit) "seemed to work on windows ... too," added "earlier" |
14:45:32 | FromDiscord | <zetashift> @mratsim I'm following Ray Tracing in One Weekend and sometimes I use your code in case I don't really know how to map C++ to Nim, I was wondering why you use a template here and not a func: https://github.com/mratsim/trace-of-radiance/blob/master/trace_of_radiance/primitives/point3s.nim#L39 ? |
14:48:38 | FromDiscord | <mratsim> Because the generated code is "result = p + v" and so creating a `Point3 add(Point3 v, Point3 v){ return p + v;}` in C/C++ codegen is just slowing C parsing/compilation |
14:48:54 | FromDiscord | <mratsim> but yes you can use inline here and perf should be the same. |
14:49:26 | FromDiscord | <zetashift> oh haha, I would've never guessed that! Thanks |
14:50:51 | FromDiscord | <mratsim> mapping the C++ code should be straightforward if you uses inheritance and ref objects and methods |
14:51:02 | FromDiscord | <mratsim> in particular the shared_ptr they use is just a Nim ref |
14:51:14 | PMunch | @shad0w, then I'll push it :) |
14:51:22 | FromDiscord | <squid> Clonkk, What http library should I use? |
14:51:34 | FromDiscord | <mratsim> but you will have issues with multithreading in that case, plus I don't see why they used a shared_ptr in the book. |
14:52:02 | FromDiscord | <squid> What http library should a beginner learn? |
14:52:18 | FromDiscord | <zetashift> I would like to keep it as Nim-ish as possible, I used your distinct usage instead of inheritance |
14:52:44 | FromDiscord | <mratsim> distinct is for Color/Point/Vec, inheritance is for spheres and materials |
14:52:54 | FromDiscord | <shad0w> would that update it on nimble install or i'd have to pull from github ? |
14:52:56 | FromDiscord | <zetashift> @squid just use the one in the stdlib, you'll be fine and I read that devel is using a better API anyway |
14:53:06 | FromDiscord | <zetashift> @mratsim ah I haven't come that far yet |
14:53:18 | FromDiscord | <squid> @zetashift Devel? |
14:53:33 | FromDiscord | <zetashift> the latest non-stable version of Nim |
14:53:45 | PMunch | @shad0w, pushed a new update now. Should replace the old if you do `nimble install nimlsp` |
14:54:29 | FromDiscord | <squid> Ah. I would just think using something from std which says "not for production" is bad if you plan to use another framework later for production |
14:56:09 | FromDiscord | <zetashift> well it's still probably the best bet for a beginner |
14:56:27 | FromDiscord | <flywind> https://nim-lang.github.io/Nim/asynchttpserver.html |
14:57:12 | FromDiscord | <squid> {.async.} could anyone explain this? I know it makes it async but like why {. .} |
14:58:21 | FromDiscord | <zetashift> it's a pragma, it basically let's the compiler know to do some extra stuff |
14:59:10 | FromDiscord | <shad0w> alright, so |
14:59:35 | FromDiscord | <shad0w> it's starting on windows. i can get a few completions before it crashes again |
14:59:52 | FromDiscord | <shad0w> earlier i got no completions. |
15:00:04 | FromDiscord | <shad0w> just need to figure out the crashes here |
15:04:00 | FromGitter | <gogolxdong> anyway ,for those who cares about ARC/ORC, his idea is to add weak ref to ARC to deal with cycle, ORC is less effecient. |
15:05:03 | Araq | mratsim, have you got my message? |
15:05:20 | FromDiscord | <mratsim> no? |
15:06:14 | FromDiscord | <shad0w> PMunch: here's the windows crash and restart log with the new code in debug |
15:06:15 | FromDiscord | <shad0w> https://pastebin.com/80wZLvgG |
15:06:40 | Araq | mratsim: https://github.com/nim-lang/Nim/pull/16058 |
15:06:41 | disbot | ➥ fixes #15836; WIP, [backport:1.4] |
15:07:41 | FromGitter | <gogolxdong> @Araq, please check whether it's helpful, if it is, I will get back to him. |
15:07:52 | FromDiscord | <mratsim> ah, I was off github/code/Nim for 10 days, and i didn't get around to reading the 1000+ notifications i received in that time |
15:09:07 | PMunch | Well it's moving in the right direction at least.. |
15:10:32 | PMunch | @shad0w, could you try running the last "Running equivalent of" command in nimsuggest? That might tell you what is causing the crash.. |
15:10:40 | PMunch | But I have to run now, might be back on later |
15:10:43 | * | PMunch quit (Quit: leaving) |
15:12:34 | * | waleee-cl joined #nim |
15:12:43 | FromDiscord | <shad0w> not sure i follow |
15:12:58 | FromDiscord | <mratsim> it's not a test that fails @Araq, it's a conversion issue: https://github.com/nim-lang/Nim/pull/16058/checks?check_run_id=1430415082#step:11:1064, https://github.com/mratsim/Arraymancer/blob/master/tests/nn_primitives/test_nnp_convolution.nim#L153↵↵I think it's more likely that `=>` in sugar has a regression due to those "auto" change |
15:12:59 | disbot | ➥ fixes #15836; WIP, [backport:1.4] |
15:13:19 | FromDiscord | <shad0w> DM me when you want to get on it next, i need to make some food now : P |
15:14:09 | Araq | mratsim, I know, it's great, it fails at compile-time |
15:14:23 | Araq | but only for arraymancer, all the rest is green |
15:14:32 | Araq | including our tests for sugar.=> etc |
15:14:36 | FromDiscord | <mratsim> but is => tested /used ? |
15:14:42 | FromDiscord | <mratsim> mmm interesting |
15:14:57 | FromDiscord | <mratsim> I'll look into it. |
15:16:42 | Araq | different questsion: does nimbus-eth2 ever allocate 1MB on the stack |
15:16:48 | Araq | in one block |
15:17:19 | Araq | I mean, obviously it does |
15:18:30 | * | CcxWrk joined #nim |
15:19:31 | bung | I remember when I use asynchttpserver it can't use global variable , warnning me is not gc safe? |
15:20:34 | bung | am developing project base on chronos seems no that problem, what happend? |
15:22:53 | Araq | chronos is not asynchttpserver? |
15:24:16 | bung | :( kidding me |
15:24:21 | Clonkk[m] | <FromDiscord "<squid> Clonkk, What http librar"> Squid I used asynchttpserver personnaly. It's good enough for simple purpose. |
15:25:43 | bung | yeah , I know that, now I have my own framework now. |
15:26:36 | * | CcxWrk quit (Ping timeout: 240 seconds) |
15:27:39 | FromDiscord | <flywind> There are some PRs for JS wrappers. They are simple and could reduce the code sizes in JS backend. Couldn't these ship with Nim(stdlib/fusion)? |
15:27:40 | FromDiscord | <flywind> https://github.com/nim-lang/Nim/pull/12531↵https://github.com/nim-lang/Nim/pull/12451/files |
15:27:42 | disbot | ➥ Add jsformdata ; snippet at 12https://play.nim-lang.org/#ix=2Fyg |
15:27:56 | * | CcxWrk joined #nim |
15:27:59 | bung | I cover it all apis, and add more features, dont know what's next step |
15:29:00 | FromDiscord | <squid> Why can you use `string.startsWith("abc")` when the docs says the first argument is supposed to be the string? |
15:30:30 | bung | what do you mean? it's string right |
15:31:16 | Clonkk[m] | ``proc startsWith(s, prefix: string): bool {...}`` so ``mystring.startsWith("abc")`` => ``startsWith(mystring, "abc")`` |
15:31:24 | FromDiscord | <squid> If I check the docs it says `Usage: startsWith(s: string, sub: string)` |
15:31:47 | FromDiscord | <squid> but I can just use it as `foobar.startsWith("substring")` |
15:32:06 | FromDiscord | <squid> I don't understand what .function() does |
15:32:10 | Clonkk[m] | In Nim, calling ``myproc(args)`` is identical to ``args.myproc()`` to ``args.myproc`` |
15:32:12 | bung | foobar is first param |
15:32:32 | FromDiscord | <squid> Oh |
15:32:35 | bung | substring is second, that's nim's proc |
15:32:38 | FromDiscord | <flywind> https://nim-lang.github.io/Nim/manual.html#procedures-method-call-syntax |
15:32:38 | FromDiscord | <squid> And that works on every variable type? |
15:32:42 | Clonkk[m] | * In Nim, calling `myproc(args)` is identical to `args.myproc()` to `args.myproc` (unless we starts playing with generic return type) |
15:32:58 | FromDiscord | <squid> Oh Thank you! |
15:33:22 | bung | so you dont need remenber whether that's a function or a method |
15:34:27 | * | CcxWrk quit (Read error: Connection reset by peer) |
15:36:22 | FromDiscord | <squid> Thats cool |
15:36:22 | * | CcxWrk joined #nim |
15:39:20 | FromGitter | <HJarausch_gitlab> Inim dedent - how to ⏎ I can't enter ⏎ if true : ⏎ echo "true" ⏎ else : ... [https://gitter.im/nim-lang/Nim?at=5fbfcc286ebe7532e6a36ee3] |
15:40:06 | FromDiscord | <squid> Do I need to do `line = line.strip()` or can I do `line.strip()` in that case |
15:44:43 | FromDiscord | <zetashift> strip() returns a new string so `line = line.strip()` |
15:52:05 | * | habamax quit (Quit: leaving) |
15:53:53 | bung | strtabs module needed ? tables is enough I think |
16:08:37 | * | vicfred joined #nim |
16:10:44 | FromDiscord | <squid> What does `in` do? Can I do ` if string_variable in string_sequence:` |
16:11:25 | mipri | it does string_sequence.contains(string_variable) |
16:12:15 | FromDiscord | <squid> So it would work? |
16:12:34 | mipri | yes. if you nimble install inim, you can ask these questions interactively |
16:35:13 | Clonkk[m] | !eval |
16:35:24 | Clonkk[m] | * Can you use !eval on here ? |
16:35:50 | * | hmmmmm joined #nim |
16:35:54 | hmmmmm | hellow |
16:36:34 | mipri | !eval echo "yes" in ["yes", "you", "can"] |
16:36:37 | NimBot | true |
16:37:05 | hmmmmm | what is this sorcery |
16:37:06 | * | ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
16:37:41 | Clonkk[m] | !eval echo("nice") |
16:37:44 | NimBot | nice |
16:38:05 | hmmmmm | !eval echo 7+2 |
16:38:08 | NimBot | 9 |
16:39:03 | * | ehmry joined #nim |
16:42:07 | * | bung quit (Quit: Lost terminal) |
16:49:26 | * | user_784s83472ka joined #nim |
16:50:46 | * | user_784s83472ka left #nim (#nim) |
16:53:17 | Zevv | nimbot can do you homework |
16:55:43 | * | filpAM joined #nim |
16:58:23 | * | lum quit (Quit: Lum: Bye!) |
16:59:06 | * | lum joined #nim |
16:59:39 | * | lum quit (Client Quit) |
16:59:59 | * | lum joined #nim |
17:04:48 | federico3 | but not homework on grammar |
17:11:09 | FromDiscord | <dom96> I used to do my homework using Nim 😄 |
17:11:31 | filpAM | lol |
17:19:04 | * | JPnGscItxkCADVXS joined #nim |
17:19:14 | * | thomasross joined #nim |
17:22:39 | JPnGscItxkCADVXS | How can I hide the fact that I use the Nim programming language in my program? I found a lot of strings in the binary file containing words related to Nim like "os.nim", "fatal.nim", "io.nim", "streams.nim", "-d:nimDebugDlOpen" etc. |
17:23:13 | JPnGscItxkCADVXS | I tried a lot of compiler options, but nothing helped me. |
17:24:57 | filpAM | debugger symbols? |
17:25:05 | filpAM | did you stry stripping the binary? |
17:25:08 | filpAM | try* |
17:27:35 | filpAM | $strip --strip-unneded --strip-debug [your binary here] |
17:27:48 | filpAM | JPnGscItxkCADVXS: ^ I think that is the command |
17:28:18 | filpAM | But there should be a compiler option too, but I don't know what |
17:32:51 | FromDiscord | <exelotl> JPnGscItxkCADVXS: looks like --debuginfo:off is a thing |
17:33:03 | JPnGscItxkCADVXS | Tried "strip --strip-unneded --strip-debug" but it didn't help. |
17:33:21 | JPnGscItxkCADVXS | I run the compiler like this: |
17:33:53 | FromDiscord | <exelotl> also probably there will be less symbols if you compile with -d:release or -d:danger ? |
17:34:10 | * | lum quit (Quit: Lum: Bye!) |
17:34:12 | FromDiscord | <exelotl> symbols/strings |
17:34:46 | * | lum joined #nim |
17:34:52 | JPnGscItxkCADVXS | nim c --opt:size -d:release --checks:off --assertions:off --debuginfo:off --embedsrc:off --lineTrace:off --stackTrace:off program.nim && strip --strip-unneeded --strip-debug program |
17:35:03 | FromDiscord | <exelotl> I'd imagine the strings are there so that you can get a nice stack trace when an exception is raised. |
17:35:26 | FromDiscord | <exelotl> hmm... |
17:36:41 | * | lum quit (Client Quit) |
17:37:36 | * | lum joined #nim |
17:38:06 | * | habamax joined #nim |
17:38:20 | JPnGscItxkCADVXS | exelotl, tried -d:danger but didn't help |
17:43:52 | FromDiscord | <exelotl> could try with --gc:arc ? |
17:44:35 | FromDiscord | <exelotl> other than that, I've got nothing 🤷 |
17:46:41 | JPnGscItxkCADVXS | Tried, but "os.nim", "strutils.nim" are still here. |
17:47:07 | JPnGscItxkCADVXS | and other standart and third-party libraries |
17:47:34 | hmmmmm | hey what's the use of: method `somestuff=` |
17:47:41 | filpAM | JPnGscItxkCADVXS: try strip --strip-all --strip-debug --strip-unnedeed [binary] |
17:47:48 | filpAM | (this time with --strip-all) |
17:49:40 | JPnGscItxkCADVXS | flipAM: tried, no result. I checking my binary with "string -n 5 program" |
17:49:58 | JPnGscItxkCADVXS | "strings -n 5 program" * |
17:52:18 | filpAM | wow |
17:53:09 | Zevv | JPnGscItxkCADVXS: it's not trivial, you might need to obfuscate your generated C sources before throwing then through the C compiler |
17:53:25 | filpAM | I think those aren't symbols , use an obfuscator then. |
17:54:06 | filpAM | binary obfuscator* |
17:54:43 | * | rockcavera quit (Remote host closed the connection) |
17:55:05 | JPnGscItxkCADVXS | So I need to look for obfuscators for C? Thank you very much to those who tried to help me. |
17:57:01 | FromDiscord | <Rebel> Obfuscation can only help you so much lol if someone who knows what they're doing gets a hold of your binary it's toasted |
17:57:48 | FromDiscord | <Rebel> Your best bet would be if you need heavy obfuscation would be to look at LLVM in tree level obfuscation |
17:57:57 | FromDiscord | <Rebel> using something such as YANSOllvm and dumbo obfuscator |
17:58:01 | Zevv | my question is: "Why though?" |
17:58:08 | Clonkk[m] | I know gcc has a ``visibility`` for C++, maybe you can use that ? https://gcc.gnu.org/wiki/Visibility |
17:58:10 | FromDiscord | <Rebel> ¯\_(ツ)_/¯ |
17:59:04 | Clonkk[m] | I'm sure there is a way to translate ``__attribute(...)__`` in Nim |
17:59:40 | JPnGscItxkCADVXS | Thank you, Rebel |
18:00:22 | FromDiscord | <Rebel> np I had a small subsection in Nim in a recent blog post I could send it to you in dms if you want |
18:03:49 | FromDiscord | <Rebel> Is there a scheduler nimble package or module to do distributed task scheduling? Such as celery or airflow? I have code that contains an infinite while loop that will need to be executed on it's own thread so the main program can still execute but every minute I need to check something within the infinite while loop to know if I need to break as well as marshal some data. |
18:04:03 | FromDiscord | <Rebel> (edit) "scheduling?" => "scheduling or pipelining?" | "airflow?" => "airflow or luigi?" |
18:07:01 | * | bung joined #nim |
18:07:19 | FromDiscord | <Rebel> (edit) np I had a small subsection about obfuscation within Nim in a recent blog post, I could send it to you in dms if you want |
18:07:45 | FromDiscord | <Rebel> (edit) using something such as YANSOllvm and dumbo obfuscator might also be worth packing it such as with amber |
18:08:01 | FromDiscord | <Rebel> (edit) using something such as YANSOllvm and dumbo obfuscator might also be worth packing it such as with amber if targeting Windows |
18:08:55 | bung | when I do nim doc got many errors how to avoiding , as my program runs well |
18:19:25 | FromDiscord | <Rebel> (edit) Is there a scheduler nimble package or module to do distributed task scheduling or pipelining? Such as celery or airflow or luigi? I have code that contains an infinite while loop that will need to be executed on it's own thread so the main program can still execute but every minute I need to check something within the infinite while loop to know if I need to break as well as marshal some data. I guess I could execute that task in a |
18:24:54 | * | natrys joined #nim |
18:25:17 | stefantalpalaru | Has anyone used the JSON file created with --compileOnly to generate a Makefile? |
18:36:17 | * | hmmmmm quit (Remote host closed the connection) |
18:40:45 | disruptek | i think only status is principled enough to favor Makefiles over, um, almost anything else. |
18:41:33 | disruptek | rebel: just use a thread. |
18:43:49 | disruptek | narimiran: just curious, is 1.0.10 the last 1.0 release? are you still backporting to version-1-0? |
18:44:22 | Zoom[m] | @squid If you want a project, search github for language:nim, open something which shows any recent activity (aka: not dead) and start fixing bugs or implementing requests :P |
18:44:49 | Zoom[m] | I see you mention RXI. Do we have a wrapper for his https://github.com/rxi/microui ? |
18:44:51 | stefantalpalaru | In this case, it's just pragmatism. GCC will parallelise some of its LTO operations, with "-flto=auto", and it's smart enough to support GNU Make's jobserver, but only if open file descriptors are passed on from its parent. Do you see where this is going? |
18:45:09 | FromDiscord | <squid> Zoom, Good Point. Although might need something on my level but sure |
18:45:11 | disruptek | not really, no. i use ccache. |
18:45:44 | disruptek | i think people that complain about build speeds are silly. it's never the limiting factor in any well-designed ci/cd system. |
18:46:26 | stefantalpalaru | This is not about speed. It's about memory usage and control over the maximum number of running processes. |
18:46:36 | disruptek | okay, buddy. |
18:46:40 | Zoom[m] | We need mentoring for open source Nim projects, when someone with experience steers the noobs to easy tasks |
18:46:45 | stefantalpalaru | BTW, you might want to read ccache stats before and after a Nim-triggered C compilation. |
18:46:48 | disruptek | if you need help parsing json, i can recommend some tutorials. |
18:47:04 | Zoom[m] | Not sure that ever worked anywhere, though |
18:47:12 | disruptek | !repo bump |
18:47:13 | disbot | https://github.com/disruptek/bump -- 9bump: 11a tiny tool to bump nimble versions 🍻 15 18⭐ 2🍴 7& 1 more... |
18:47:22 | disruptek | araq loves this little tool and it has open feature requests. |
18:47:48 | disruptek | the code is heavily commented and while the author is a prick, he is easy to ignore. |
18:54:05 | narimiran | disruptek: probably it is, but you know what they say: predictions are hard. especially about future. |
18:55:22 | narimiran | stefantalpalaru: while you're here. recent commits in nimbus broke it for nim 1.4 |
18:55:46 | FromDiscord | <Rebel> Disruptek I can not use a thread |
18:55:59 | narimiran | nim 1.4 worked before yesterday's new commits |
18:57:29 | FromDiscord | <Rebel> `'spawn'ed function cannot have a 'var' parameter` :/ Is it even possible to make a global variable safe? I know only one thread will be accessing it all times so couldn't I just put a lock on it? Is threadpool trying to do some magic under the hood and I should just using threads module. |
18:57:31 | FromDiscord | <Rebel> (edit) "module." => "module?" |
18:57:42 | FromDiscord | <Rebel> (edit) "safe?" => " threadsafe?" |
19:00:41 | stefantalpalaru | narimiran: I needed to bump the NimYAML submodule to make it work. See this branch: https://github.com/status-im/nimbus-eth2/tree/nim14 |
19:00:53 | narimiran | stefantalpalaru: that's not the problem |
19:01:09 | narimiran | your branch is 10 commits behind master |
19:03:06 | FromDiscord | <Recruit_main707> sent a code paste, see https://play.nim-lang.org/#ix=2Fzv |
19:03:39 | disruptek | i don't understand the question. use a lock if you need a lock. |
19:04:04 | FromDiscord | <Rebel> hmmmmm |
19:04:10 | FromDiscord | <Rebel> it's not a really question more of a conundrum |
19:04:15 | FromDiscord | <Recruit_main707> wait, i think i want to use {.error.} |
19:05:52 | stefantalpalaru | narimiran: those are merge commits, from merging devel into master. Ignore them. This is the important diff: https://github.com/status-im/nimbus-eth2/compare/devel...nim14 |
19:06:55 | narimiran | that's eth2. eth1 is failing because of these commits from yesterday: https://github.com/status-im/nimbus-eth1/commits/master |
19:08:05 | narimiran | stefantalpalaru: "Invalid enum value: Berlin" |
19:08:18 | stefantalpalaru | OK. I haven't tried compiling nimbus-eth1 with Nim-1.4. |
19:08:29 | narimiran | stefantalpalaru: it worked 2 days ago |
19:09:39 | FromDiscord | <Rebel> sent a long message, see http://ix.io/2Fzy |
19:13:15 | Zoom[m] | Why not use a channel? |
19:14:44 | disruptek | just use a lock. |
19:15:02 | FromDiscord | <Rebel> Whichever is easier 😅 |
19:15:06 | FromDiscord | <Rebel> I will just use a lock |
19:15:20 | disruptek | a lock is an import and a single line. |
19:16:37 | * | PMunch joined #nim |
19:19:16 | FromDiscord | <Rebel> Oh I was going to get fancy and use the template so I can use the with keyword |
19:19:26 | FromDiscord | <Rebel> Remember seeing that in a blog post |
19:19:33 | disruptek | go for it. |
19:21:54 | * | hmmm joined #nim |
19:22:43 | * | xet7 quit (Quit: Leaving) |
19:23:31 | FromDiscord | <Rebel> Go for it I shall 😎 |
19:25:04 | Zoom[m] | How about not writing any functions at all? Write just a single template that does different things depending on passed enum. |
19:25:38 | FromDiscord | <Rebel> Keep smoking whatever you have because that is getting you fucked up quite nicely |
19:25:48 | Zoom[m] | I tried that recently and it was pleasantly terrible |
19:26:28 | disruptek | ah, /that's/ what i wanted to do today. |
19:32:56 | * | JPnGscItxkCADVXS quit (Remote host closed the connection) |
19:35:09 | FromDiscord | <Recruit_main707> i wish i could add echo to debug funcs |
19:35:24 | disruptek | debugEcho |
19:35:28 | narimiran | ^ |
19:36:18 | FromDiscord | <Rebel> ` Error: 'myproc' is not GC-safe as it accesses 'globalvar' which is a global using GC'ed memory` I am acquiring the lock before accessing it though? 🤔 Just modeled it off example in docs |
19:36:41 | disruptek | just .gcsafe it. |
19:38:34 | FromGitter | <HJarausch_gitlab> I need some help again |
19:38:54 | FromGitter | <HJarausch_gitlab> type seq8 = seq[int8] ⏎ var GN: (seq8,seq8,seq8) = (@[],@[],@[]) ⏎ let sq= 2 ⏎ GN[sq].add(3.int8) ⏎ ... [https://gitter.im/nim-lang/Nim?at=5fc0044e7850f66b604624f6] |
19:39:34 | FromDiscord | <Rebel> if you change it from |
19:39:51 | FromDiscord | <Rebel> `let sq = 2 ` to `const sq = 2` does it work |
19:40:24 | FromDiscord | <Rebel> psst the answer is yes |
19:40:47 | FromDiscord | <Rebel> Also disruptek It's fine with `{.gcsafe, stdcall.}` but not fine with `{.gcsafe, .thread, stdcall.}` `Error: expression expected, but found '.'` |
19:40:50 | FromDiscord | <Rebel> (edit) "It's" => "it's" |
19:43:17 | FromDiscord | <nikki> remove the . before the thread? |
19:43:23 | FromDiscord | <nikki> that's a syntax thing |
19:43:57 | * | lritter quit (Ping timeout: 260 seconds) |
19:44:18 | FromDiscord | <Recruit_main707> disruptek, thank you, ive beeen wanting this for a long time |
19:44:38 | disruptek | i had nothing to do with it. |
19:44:41 | * | Perkol quit (Quit: Leaving) |
19:44:57 | FromDiscord | <Rebel> oh yeah that worked but I still get the same error lol I'm guessing it's because I didn't make it a threadvar |
19:45:03 | disruptek | i generally contribute to slow development. |
19:45:16 | FromDiscord | <Recruit_main707> well, but you showed me the function |
19:45:21 | FromGitter | <HJarausch_gitlab> But in my real application it isn't known at compile time. It's like a 'const' declaration in C++ , which doesn't need to a compile time constant. It's only constant AFTER the declaration |
19:45:58 | FromDiscord | <dom96> @Rebel if I were you I would strongly consider whether threads are necessary for your application 🙂 |
19:46:34 | FromDiscord | <Recruit_main707> @Rebel you dont need that . before thread :P |
19:46:55 | FromGitter | <haxscramper> @HJarausch_gitlab sorry for nitpicking, but could you please use triple backticks for code formatting - ``` |
19:47:37 | FromGitter | <haxscramper> When sending multiline pastes, otherwise it is quite troublesome to read even if someone opens gitter |
19:48:00 | FromGitter | <HJarausch_gitlab> Thanks for the hint. I didn't know it's working here too. |
19:48:21 | FromGitter | <haxscramper> It should be working ⏎ ⏎ ```proc test(): int = discard``` [https://gitter.im/nim-lang/Nim?at=5fc00685e2abf66ae5966955] |
19:48:27 | FromDiscord | <Rebel> Um well what are the alternatives? |
19:48:48 | FromDiscord | <Rebel> I've never dealt with this kind of problem in all my years of programming |
19:49:00 | FromDiscord | <Rebel> (edit) "problem" => "predicament" |
19:49:11 | FromGitter | <HJarausch_gitlab> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5fc006b634df503cec006417] |
19:49:46 | FromGitter | <HJarausch_gitlab> Another trial ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5fc006dae2abf66ae59669fb] |
19:49:53 | disruptek | rebel: ignore that chucklehead, you're practically done. |
19:50:55 | FromDiscord | <Rebel> lol yeah the thread works but now I just need to add the timer component and really test it out |
19:51:17 | FromDiscord | <Rebel> At least I don't have to deal with the headache known as the GIL |
19:51:39 | FromGitter | <haxscramper> @HJarausch_gitlab - if you want to have *compile-time* constant you need to use `const`. `let` is a *runtime* immutable. Just using `const sq = 2` solves the error |
19:51:54 | FromDiscord | <dom96> @Rebel what are you using threads for? |
19:52:08 | FromDiscord | <Rebel> If you scroll up a tiny bit you will see my conundrum |
19:52:18 | FromDiscord | <Rebel> at 2:09 |
19:52:26 | FromDiscord | <Rebel> well I guess 7:09 for you |
19:53:48 | FromDiscord | <dom96> @Rebel sounds like you can easily do this with pure concurrency (async-only) |
19:54:12 | FromDiscord | <dom96> Just yield to the async dispatcher in your while loop with `await sleepAsync(100)` or similar |
19:54:21 | FromGitter | <HJarausch_gitlab> @haxscramper Yes, and I only want a runtime immutable. It's within a loop, where sq is just an "abbreviation" for an expression. Here is an excerpt of the real code ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ It didn't request an evaluation at compile time, did I? [https://gitter.im/nim-lang/Nim?at=5fc007ed66dcfa77e2a56dce] |
19:54:30 | FromDiscord | <dom96> Still need more details about what you're actually doing though |
19:55:02 | FromDiscord | <dom96> What are these tasks you're trying to run off the main thread? |
19:55:42 | hmmm | anyone knows how to clear an input box in nigui after I captured the input? |
19:55:53 | PMunch | It you want to go with Threads then I'd suggest changing your thread to just write to a channel instead of adding stuff to a sequence if possible |
19:56:23 | FromGitter | <haxscramper> Oh, no, then it is strictly impossible. Generic parameters must be known at compile-time, there are no exceptions. Can you elaborate on what you are trying to do? |
19:58:28 | * | rockcavera joined #nim |
19:58:32 | FromDiscord | <Rebel> sent a long message, see http://ix.io/2FzU |
19:59:18 | FromDiscord | <Rebel> (edit) "http://ix.io/2FzU" => "http://ix.io/2FzV" |
19:59:36 | FromGitter | <HJarausch_gitlab> GN is a tuple of 3 seqs. I just want to extend the sq-th seq in GN |
19:59:39 | * | tane joined #nim |
20:00:17 | FromGitter | <haxscramper> You can use `array[3, YourType]` |
20:00:33 | FromDiscord | <dom96> yeah, those shouldn't block your main thread so should be possible using just async |
20:00:39 | FromGitter | <haxscramper> For runtime indexing, otherwise there is no way to index tuple using runtime position variable |
20:00:48 | disruptek | but it doesn't buy him anything to use async or channels. |
20:01:00 | FromGitter | <HJarausch_gitlab> OK. I'd like to understand why this is impossible with a tuple? |
20:01:03 | PMunch | Yeah, so set it up such that the thread is started and given a channel. It writes to the channel and every 30 seconds your can empty out your channel in your async loop. |
20:01:06 | disruptek | he already has a fast, reliable, safe, simple solution. |
20:01:13 | FromDiscord | <dom96> avoiding threads reduces complexity significantly |
20:01:22 | disruptek | jesus christ. what the fuck do you know about it? |
20:01:46 | FromDiscord | <dom96> ugh |
20:02:02 | disruptek | are you really going to sit there and try to argue that async is simpler? |
20:02:05 | disruptek | give me a fucking break. |
20:02:41 | FromGitter | <haxscramper> @HJarausch_gitlab because that is how language is implemented. You can have `(string, int)` and to get the correct type of the expression `("hello", 12)[0]` it is necessary to have value at compile-time. `(T, T, T)` is not a special case in that regard. |
20:02:42 | PMunch | Well it's a separate concept. And one can argue that one concept is simpler than two |
20:03:25 | FromGitter | <haxscramper> So for your use case `array[3, T]` the same as `(T, T, T)` |
20:05:02 | FromDiscord | <Rebel> Oh maybe I should use a channel that actually seems very useful |
20:05:05 | FromGitter | <haxscramper> But generally speaking you have `(T, T, T) -> array[3, T] -> seq[T] -> seq[WrapperCaseObject] -> seq[WrapperRefObject]` in terms of runtime capabilites and you just need one step up from tuples. |
20:05:36 | PMunch | @Rebel, they are pretty useful for cross-thread communication |
20:05:55 | PMunch | Well, they are made for exactly that purpose, so they ought to be |
20:06:38 | FromDiscord | <Rebel> I only need 1 thread |
20:06:46 | FromDiscord | <Rebel> well I guess 2 |
20:06:50 | FromGitter | <HJarausch_gitlab> @haxscramper OK, I see. One more disappointment about Nim. ⏎ I did "declare" GN: (seq8,seq8,seq8), so the compile could know the type of the tuple's components |
20:06:52 | FromDiscord | <dom96> Unless you're doing something that will block your main thread you shouldn't need to use a separate thread |
20:06:53 | FromDiscord | <Rebel> the main thread and the separate thread to execute this job |
20:07:09 | FromDiscord | <Rebel> One of the jobs does an infinite while loop? |
20:07:31 | FromDiscord | <Rebel> Wouldn't that block the main thread even if it was async |
20:07:39 | FromDiscord | <dom96> Not is you use `await sleepAsync` |
20:07:49 | FromDiscord | <dom96> You've got a `sleep` call in that infinite loop anyway, right? |
20:08:05 | FromDiscord | <Rebel> I didn't get to that part yet was going to whip up a janky asf timer |
20:08:13 | FromDiscord | <dom96> You probably don't even need an infinite loop |
20:08:18 | FromDiscord | <Rebel> but I do..... |
20:08:23 | FromDiscord | <Rebel> I assure you |
20:08:31 | FromDiscord | <Rebel> This job will have an infinite while loop no matter what |
20:08:36 | FromDiscord | <Rebel> It needs to |
20:08:41 | FromDiscord | <dom96> Why? |
20:08:57 | FromDiscord | <Rebel> Because of what it does? |
20:09:05 | FromDiscord | <Rebel> If you really want I could dm you the code |
20:09:08 | FromDiscord | <Rebel> it's in a dev branch atm |
20:09:12 | FromDiscord | <Rebel> maybe that will be much easier to explain |
20:09:17 | FromDiscord | <Rebel> (edit) "that" => "then it" |
20:09:35 | FromDiscord | <dom96> If the tasks have a finish line then they are likely much better implemented as a simple async proc |
20:09:53 | FromDiscord | <Rebel> All tasks have a finish line except this one |
20:09:56 | FromDiscord | <dom96> like: `proc readFilesAndDownloadSomething(): Future[string] {.async.}` |
20:10:20 | FromDiscord | <Rebel> I need to be checking in and sending the data back every x amount of seconds the server tells me when to stop the job |
20:10:36 | FromDiscord | <Rebel> (edit) "I need to be checking in and sending the data back every x amount of seconds the server tells me when to stop the job ... " added "and kill the infinite loop within the thread atm" |
20:10:51 | FromDiscord | <dom96> okay, fine, in that case you can still do it without a separate thread |
20:11:08 | FromDiscord | <dom96> just `while true: await sleepAsync(xAmountOfMilisecs)` |
20:11:09 | PMunch | @HJarausch_gitlab, well the reason is that tuples aren't a thing in C. So Nim tuples wraps a C struct. When we index a tuple in Nim it is rewritten as field access under the hood. This is obviously not something that could work with runtime indices. However you would be able to do it if you wrote a wrapper or a macro that wrote a wrapper for you |
20:11:44 | FromGitter | <haxscramper> @HJarausch_gitlab I'm sorry, but I don't think this a 'disappointment'. You are trying to use `std::tuple<vector<T>, vector<T>, vector<T>>` - which will give you *exactly same error* for *exactly same reasons* ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5fc00c006ebe7532e6a419c0] |
20:11:45 | FromDiscord | <Rebel> ok I will give that a try! Thank you for the help |
20:11:56 | FromDiscord | <Rebel> (edit) "help" => "help, if that doesn't work I will just use a thread" |
20:12:41 | FromDiscord | <dom96> @Rebel sure, let me know if you have any questions about this approach 🙂 |
20:12:43 | FromGitter | <haxscramper> And you should probably something on the level of idris, dependent types etc. to get this information. |
20:13:06 | FromDiscord | <Rebel> Sounds good; although, I think you would laugh at the code quality 😅 |
20:13:06 | disruptek | i really don't know why i bother. |
20:13:43 | FromDiscord | <Rebel> Idk disruptek the code is already fully async and if I don't have to create an external thread that's great |
20:13:47 | FromDiscord | <Rebel> (edit) "code" => "codebase" |
20:14:27 | disruptek | did you tell me it was async already? |
20:14:32 | FromGitter | <haxscramper> E.g you are using wrong language construct for your task |
20:14:55 | FromDiscord | <Daniel> I am reading guys what you all write here, and i am under impression some important nim info gets lost in infinity of discord....i think forum would be much better place some constructive discussion, because it would also be indexed by search engines, which would greatly benefit nim in general as it would level up internet visibility by a magnitude. |
20:15:00 | disruptek | if it's already async, then you've made your bed. go lie in it and die in a fire. |
20:15:16 | FromDiscord | <Daniel> (edit) "I am reading guys what you all write here, and i am under impression some important nim info gets lost in infinity of discord....i think forum would be much better place ... some" added "for" |
20:15:18 | FromDiscord | <Rebel> Wait wut lol what do you have against hot async code 😄 |
20:15:33 | disruptek | nim has a forum. it's a bad place for disruptek to flame, though. |
20:15:39 | FromDiscord | <Daniel> (edit) "a" => "an order of" |
20:16:17 | * | habamax quit (Ping timeout: 256 seconds) |
20:16:24 | disruptek | the only problem i have with async is that it sucks. other than that, it's great. |
20:16:33 | PMunch | @Daniel, that is true, but it's so much easier to just answer questions here |
20:16:59 | FromDiscord | <haxscramper> @Daniel Well, good solution would be to have `#nim-beginners` channel on discord to move at least some part of the message stream from here. Quite common practice on other serves beyond certain size. |
20:17:28 | hmmm | oh I would stalk the hell out of #nim-beginners |
20:17:40 | disruptek | if you like colored functions, macro complexity, memory management issues, poor x-platform support, and code that is rarely allowed to be improved... then async is fine. |
20:18:13 | FromDiscord | <Daniel> Yes, it might be easier to directly respond here on the fly, but in most cases only one individual will benefit from this response....while in comparison if this was happening on the forum, everyone searching about nim or similar situation would benefit, so in the long run, this is a waste of effort. |
20:18:36 | disruptek | that's a silly statement based upon a lack of experience with both the channel(s) and the forum. |
20:18:49 | disruptek | come back when you've hung out in both for a month or two. |
20:18:54 | FromDiscord | <haxscramper> We have logs in `#main` too, which are indexed relatively good by google |
20:19:18 | FromDiscord | <dom96> yeah, IRC/Discord/Gitter gets indexed by google |
20:19:44 | FromDiscord | <exelotl> > if you like [...] then async is fine.↵I hope cps will relieve us from this pain :( |
20:19:45 | FromDiscord | <haxscramper> @dom96, what do you think about separate `#nim-beginners` channel? |
20:20:00 | disruptek | exelotl: go use it. it works. |
20:20:13 | FromDiscord | <dom96> @haxscramper I think I would need to implement support in NimBot to log it 🙂 |
20:20:13 | FromDiscord | <exelotl> oh it like, works works? |
20:20:33 | disruptek | the untyped version has been working for months. |
20:20:55 | FromDiscord | <exelotl> what's the catch? :P |
20:20:56 | FromDiscord | <dom96> The only true thing about this statement is colored functions. |
20:21:52 | disruptek | ask araq whether async is leak-free under async. we were debugging it less than a day ago, but sure, maybe i'm out of the loop. |
20:22:01 | disruptek | er, async is leak-free under orc. |
20:22:23 | disruptek | and remind me why httpbeast doesn't support windows. |
20:23:05 | * | filpAM quit (Ping timeout: 256 seconds) |
20:24:37 | disruptek | exelotl: the catch is that the typed version is much nicer to use. |
20:25:14 | FromDiscord | <dom96> You're kidding me, right? |
20:25:42 | disruptek | no, it really is nicer. |
20:25:46 | disruptek | it's more magical. |
20:25:56 | FromDiscord | <dom96> lol |
20:26:05 | FromDiscord | <dom96> Async works fine under the default Nim GC |
20:26:14 | FromDiscord | <dom96> If it doesn't work under orc then that's orc's problem |
20:26:35 | disruptek | sure, fuck those kids, right? |
20:26:38 | FromDiscord | <dom96> What does httpbeast have to do with async? |
20:26:59 | disruptek | poor timers support means ioselectors don't work. |
20:28:19 | disruptek | you know what works everywhere without colored functions, leaks, or code changes? |
20:28:22 | disruptek | threads. |
20:29:01 | disruptek | rock solid, usable across FFI, working regardless of gc, and never needing bug removal. |
20:29:09 | disruptek | weird, huh? |
20:29:37 | disruptek | no one comes into #nim asking about thread syntax or semantics. |
20:29:54 | disruptek | no one comes in for help with their thread leaks. |
20:30:06 | FromDiscord | <dom96> yeah, because nobody uses them lol |
20:30:22 | FromDiscord | <Rebel> How are you testing for leaks? Valgrind? |
20:30:26 | disruptek | no one had to make a new version of async for themselves because you were too egotistical to accept patches. |
20:30:35 | disruptek | rebel: yes. |
20:31:03 | disruptek | but you don't have to. you can just ask the gc what's in use. |
20:32:09 | FromDiscord | <dom96> > no one had to make a new version of async for themselves because you were too egotistical to accept patches. |
20:32:13 | FromDiscord | <dom96> Which patches did I not accept? |
20:32:21 | FromDiscord | <Rebel> What do you mean by poor x-platform support? My application is eventually going to eventually support macos 🙃 |
20:32:26 | disruptek | i don't have time for this. |
20:32:31 | FromDiscord | <dom96> lol |
20:32:40 | FromDiscord | <dom96> Calls me egotistical and then refuses to back it up |
20:32:55 | disruptek | please. no one needs convincing that you are egotistical. |
20:33:11 | disruptek | rebel: your codebase is already async. embrace the madness. |
20:33:39 | disruptek | xflywind has an ioselectors port with a wheel timer in it that you can use to make it work. |
20:33:52 | FromDiscord | <exelotl> homer simpson disappearing into bush gif |
20:34:11 | disruptek | gonna go fuck a turkey and eat a girl. peace out. |
20:38:28 | FromDiscord | <squid> Some functions change the string provided to it instead of returning a new one |
20:38:32 | FromDiscord | <squid> How do I do that? |
20:38:37 | FromDiscord | <squid> (edit) "that?" => "that myself?" |
20:42:29 | narimiran | proc foo(mystring: var string) |
20:42:36 | FromDiscord | <exelotl> ^ |
20:43:11 | FromDiscord | <squid> Also. How do I make a function not return anything? |
20:43:19 | narimiran | proc foo(mystring: var string) = body |
20:48:45 | ForumUpdaterBot | New thread by B3liever: Output AST in a recursion, using an output parameter or returning, which to prefer?, see https://forum.nim-lang.org/t/7160 |
20:53:18 | FromGitter | <alehander92> hey narimiran |
20:53:32 | narimiran | hey |
20:53:44 | FromGitter | <alehander92> is https://github.com/nim-lang/Nim/pull/15287 ok for review |
20:53:45 | disbot | ➥ Nil type check implementation |
20:53:55 | FromGitter | <alehander92> i got it out of draft |
20:54:12 | narimiran | i'll remind 4raq tomorrow about it |
20:54:14 | FromGitter | <alehander92> not sure if i need to do something more before further comments |
20:54:29 | FromGitter | <alehander92> <3 |
20:54:35 | FromGitter | <alehander92> btw i should talk about nim |
20:54:48 | FromGitter | <alehander92> tomorrow in our job |
20:54:56 | FromGitter | <alehander92> something like a short intro |
20:55:09 | FromGitter | <alehander92> i should learn finally about `arc` :D |
20:55:20 | narimiran | :P |
20:56:26 | FromGitter | <alehander92> they are rust/c/go guys mostly with some other langs as well |
20:56:40 | FromGitter | <alehander92> i guess memory handling + interop + meta might be most interesting |
20:57:05 | * | hmmm quit (Ping timeout: 240 seconds) |
20:57:25 | FromGitter | <alehander92> i wonder if i want to show the case/term rewriting stuff |
20:57:26 | * | filpAM joined #nim |
21:00:39 | FromGitter | <alehander92> what is the special about `orc` & threading? |
21:01:13 | * | narimiran quit (Ping timeout: 260 seconds) |
21:16:15 | FromDiscord | <squid> AsyncNet returns (string, Port) How do I get one of those arguments? |
21:16:19 | FromDiscord | <squid> And what type is that? |
21:16:51 | FromDiscord | <squid> `proc getPeerAddr(socket: AsyncSocket): (string, Port) {...}` |
21:17:38 | * | bung quit (Ping timeout: 244 seconds) |
21:19:20 | FromGitter | <bung87> read manual first,just be patient. |
21:19:53 | * | hnOsmium0001 joined #nim |
21:23:58 | FromDiscord | <squid> I am pretty sure its a tuple |
21:24:44 | * | hmmm joined #nim |
21:25:53 | FromDiscord | <squid> Thanks for your help.. |
21:26:03 | FromDiscord | <squid> foo[0] |
21:26:08 | FromDiscord | <squid> (edit) "foo[0]" => "foo[0], i think" |
21:29:07 | hmmm | wa wa wait backtick procs= are setters? |
21:30:35 | FromDiscord | <Idefau> yeah |
21:32:17 | FromDiscord | <squid> If I have a sequence of strings, How would I format it to string,string,string |
21:32:25 | FromDiscord | <squid> (edit) "string,string,string" => ""string,string,string";" |
21:32:30 | FromDiscord | <squid> (edit) ""string,string,string";" => ""string,string,string"?" |
21:32:54 | FromDiscord | <squid> So I could print it or save it to a file |
21:33:18 | FromDiscord | <hobbledehoy> You can use join |
21:33:21 | FromDiscord | <squid> Basically concatenate every item and add a spacer character |
21:33:43 | FromDiscord | <hobbledehoy> `["hello", "world"].join(",")` |
21:33:48 | FromDiscord | <squid> Oh |
21:33:50 | FromDiscord | <squid> Thank you! |
21:33:57 | FromDiscord | <squid> I was looking around. Couldn't find anything |
21:34:30 | FromDiscord | <hobbledehoy> Make sure to import strutils |
21:41:30 | hmmm | maan this backtick stuff is bonkers it took me two hours to understand why I couldn't find anything to clear an input box on nigui |
21:41:46 | hmmm | I'm almost certain this stuff wasn't in the tutorial |
21:42:10 | disruptek | ~manual |
21:42:11 | disbot | manual: 11the Nim Manual is https://nim-lang.org/docs/manual.html -- disruptek |
21:42:11 | disbot | manual: 11just good to Ctrl+F in cases like this |
21:42:28 | hmmm | hey why are you not doing stuff with your turkey :| |
21:42:45 | disruptek | who says i'm not? |
21:43:02 | hmmm | :o |
21:46:06 | * | filpAM quit (Quit: leaving) |
21:47:03 | * | PMunch quit (Quit: leaving) |
21:48:56 | * | beatmox quit (Quit: ZNC 1.8.0 - https://znc.in) |
21:49:10 | * | beatmox- joined #nim |
21:56:22 | FromGitter | <alehander92> dudee |
21:56:29 | FromGitter | <alehander92> what is thanksgiving about |
21:56:44 | FromGitter | <alehander92> is it american independence |
21:56:48 | FromDiscord | <ElegantBeef> Nope |
21:56:56 | FromGitter | <alehander92> huh |
21:57:04 | disruptek | exploitation. |
21:57:04 | FromDiscord | <ElegantBeef> Canada also has thanksgiving |
21:57:05 | FromGitter | <alehander92> but they only celebrate it a lot in usa |
21:57:16 | disruptek | because there are more racists here. |
21:57:30 | FromGitter | <alehander92> meh |
21:57:48 | FromGitter | <alehander92> did you watch queen gambit |
21:57:51 | FromGitter | <alehander92> i imagine disruptek |
21:57:53 | FromGitter | <alehander92> going to ussr |
21:58:13 | disruptek | do you rub yourself while you picture me? |
21:58:17 | FromGitter | <alehander92> writing in russian prog lang competition fighting for vermont's comp sci |
21:58:19 | FromGitter | <alehander92> cold war |
21:58:20 | disruptek | tell the truth. |
21:58:32 | FromGitter | <alehander92> no, i see you as a friend |
21:59:22 | FromGitter | <alehander92> it would be sad to imagine something like that |
21:59:49 | FromGitter | <alehander92> i admit having cyrillic prog langs being in movies |
21:59:54 | FromGitter | <alehander92> is also not very probable |
22:00:06 | FromGitter | <alehander92> so : i need to talk about nim |
22:00:18 | FromGitter | <alehander92> and q&a with my job office guys |
22:00:30 | FromGitter | <alehander92> what should i tell em about var lent etc |
22:00:39 | FromGitter | <alehander92> i really don't dig so much that part |
22:06:01 | disruptek | tell me more about your disruptek fantasy. i don't care what you tell someone about lent. |
22:06:43 | disruptek | did you know araq started his career as a 3-star michelin chef? |
22:06:52 | FromGitter | <alehander92> :) |
22:06:53 | FromGitter | <alehander92> no |
22:07:16 | disruptek | i heard he wrote nim to win a bet. |
22:07:32 | FromGitter | <alehander92> i thought we focus on you |
22:07:45 | FromGitter | <alehander92> leave Araq eat his 5start cabbage |
22:07:45 | disruptek | we can try, but the territory is so large. |
22:07:54 | FromGitter | <alehander92> and let us focus on carrots |
22:08:20 | FromGitter | <alehander92> i am sorry, vesela made carrot cake and i didn't think of something hipster enough |
22:08:38 | disruptek | carrot cake is hipster enough. |
22:09:08 | FromGitter | <alehander92> disruptek drives his lada through moscow and there is mamonov |
22:09:29 | FromGitter | <alehander92> and he plays with a group of east russia believers |
22:09:45 | disruptek | you lost me at lada. |
22:09:50 | FromGitter | <alehander92> while we move through a valley before ural riding with sheeep |
22:09:52 | disruptek | i would never own such a piece of shit. |
22:10:04 | disruptek | i wouldn't even set fire to one, let along steal it. |
22:10:09 | FromGitter | <alehander92> dude this is you in ussr |
22:10:17 | FromGitter | <alehander92> a bit more humble pls |
22:10:24 | disruptek | i do love me some ural sheep, though. |
22:10:26 | FromGitter | <alehander92> do you want a volga |
22:10:39 | disruptek | i never met a volga i didn't like. |
22:10:41 | FromGitter | <alehander92> you wait for volga you vermont 1827 elo redneck |
22:10:55 | disruptek | i'll wait. |
22:11:12 | FromGitter | <alehander92> and then we go and live into a normal city |
22:11:31 | FromGitter | <alehander92> and work in the factory for old cabels |
22:11:44 | FromGitter | <alehander92> and happily forget any non-goto prog languages |
22:12:01 | disruptek | ah yes, goto programming for the cabal. |
22:12:06 | FromGitter | <alehander92> while teaching in the evening school |
22:12:07 | disruptek | that sounds like me. |
22:12:16 | disruptek | i only teach to pick up chicks. |
22:12:17 | FromGitter | <alehander92> basic C to young soviets |
22:12:25 | FromGitter | <alehander92> and finally reagan |
22:12:28 | FromGitter | <alehander92> comes into your city |
22:12:47 | FromGitter | <alehander92> while fighting to overthrow communism |
22:13:05 | FromGitter | <alehander92> and you remember, a tear appears in your eye, you remember the turkey and the us anthem |
22:13:51 | FromGitter | <alehander92> but oleg , your russian son sits slowly waiting for you to write basic 8kb os-es and carry sheep |
22:13:58 | FromGitter | <alehander92> and you know your future stays |
22:14:00 | FromGitter | <alehander92> in ural |
22:14:41 | disruptek | you just had to bring oleg into this. |
22:14:59 | * | filpAM joined #nim |
22:15:44 | FromGitter | <alehander92> i just like your family in ussr |
22:15:51 | FromGitter | <alehander92> very new-life |
22:16:14 | disruptek | good thing incest is legal there; that oleg has a purty mouth. |
22:16:19 | FromGitter | <alehander92> your russian is very with accent |
22:16:31 | FromGitter | <alehander92> but for your happiness you met yardanicp |
22:16:45 | FromGitter | <alehander92> and he teaches you proper russian history and lang |
22:17:06 | FromGitter | <alehander92> and you realize there is more to life than lakes and cheap internal sensationalism |
22:17:17 | FromGitter | <alehander92> there is something deeper even if futile |
22:17:46 | disruptek | why you always gotta bring up prostate massage? |
22:17:50 | disruptek | this is the nim channel. |
22:18:02 | disruptek | let's talk about lent instead. |
22:18:03 | FromDiscord | <Rebel> Is it possible to pass a vararg within a function pointer? |
22:18:07 | FromGitter | <alehander92> you know this is about the soul |
22:18:27 | disruptek | a pointer only points to one thing at a time. |
22:18:35 | disruptek | you can point to a closure, though. |
22:18:48 | FromDiscord | <Rebel> Sorry meant var param |
22:19:01 | FromDiscord | <Rebel> For example |
22:19:12 | disruptek | func foo(x: var int) is legal, yes. |
22:19:41 | disruptek | anything defined with var is explicitly mutable despite func. |
22:20:03 | FromDiscord | <Rebel> Yeah I think I need to use threads I don't think async will work with what I am doing as Windows will complain |
22:20:09 | FromDiscord | <Rebel> (edit) "Yeah I think I need to use threads I don't think async will work with what I am doing as Windows will complain ... " added "if I do it async" |
22:20:58 | FromDiscord | <Rebel> I don't think it will be happy with me just adding a var param to a `HOOKPROC` and then trying to await it when calling `SetWindowsHookExA` |
22:21:08 | FromDiscord | <Rebel> Won't even compile lol |
22:21:44 | * | beatmox- quit (Ping timeout: 240 seconds) |
22:22:03 | FromDiscord | <Rebel> Whelp guess you were right at the end of the day disruptek |
22:22:16 | disruptek | but think of all the fun you had over the last couple hours. |
22:22:19 | FromGitter | <alehander92> конечно! |
22:22:44 | * | beatmox joined #nim |
22:22:48 | * | qwertfisch_ joined #nim |
22:22:58 | FromDiscord | <dom96> @Rebel `SetWindowsHookExA`? what are you up to with that? 😮 |
22:23:28 | FromDiscord | <dom96> And why does it conflict with async? |
22:25:01 | * | natrys quit (Ping timeout: 246 seconds) |
22:25:53 | * | qwertfisch quit (Ping timeout: 272 seconds) |
22:27:22 | FromDiscord | <Rebel> Well if you check out MSDN docs it's expecting a pointer to the hook procedure and if I modify that hook procedure by adding a var param to it as well as making it async when I actually call SetWindowsHookExA I need to pass in the pointer and can't just await it or pass the var param within it. |
22:27:26 | FromDiscord | <Rebel> Just testing some things out |
22:28:11 | FromGitter | <alehander92> dom96 |
22:28:18 | FromGitter | <alehander92> how do you show nim to your colleagues |
22:28:33 | FromGitter | <alehander92> a project, some kind of intro or just random focus on a feature |
22:28:34 | FromDiscord | <dom96> Windows cannot call an async proc anyway |
22:28:38 | FromDiscord | <Rebel> Yes |
22:28:47 | FromDiscord | <Rebel> plus I think you misinterpreted a crucial part of what I was saying |
22:28:55 | FromDiscord | <Rebel> `sleepAsync` will not work |
22:29:06 | FromDiscord | <Rebel> I still need my job to do work and can not halt execution of it |
22:29:19 | FromDiscord | <Rebel> I just need to collect the results of a growing seq it appends to every x seconds |
22:29:37 | FromDiscord | <Rebel> (edit) "I just need to collect the results ... of" added "clear the seq then ship them off" |
22:30:18 | FromDiscord | <dom96> alehander92: haven't done it in a while, still ask myself the same questions when I think about doing a talk. You can check out what I talked about in the NimConf talk I did |
22:31:04 | FromDiscord | <dom96> @Rebel what work does your job do? |
22:31:05 | FromDiscord | <Rebel> (edit) "to" => "to," |
22:31:26 | FromDiscord | <Rebel> Plays around with low level keyboard hooks |
22:31:40 | FromDiscord | <Rebel> Using windows api |
22:32:11 | * | audiofile joined #nim |
22:32:54 | FromDiscord | <dom96> Anything that does IO and would block the thread? |
22:33:16 | FromDiscord | <dom96> based on what you wrote above it sounds like you're just setting up event hooks |
22:33:26 | * | bung joined #nim |
22:35:04 | FromDiscord | <Rebel> No it would not being IO bound operations within the job at least I don't think it would. I will play around with both the async solution and threading solution once I figure out the timer and just go with whichever one gives me the smallest headache |
22:35:38 | FromDiscord | <Rebel> (edit) "being" => "be doing" |
22:35:45 | Zoom[m] | <disruptek "no one comes into #nim asking ab"> I was going to, but I shall forbear |
22:35:56 | FromDiscord | <dom96> fair enough |
22:36:06 | supakeen | can you please not forbear in public disruptek, thanks |
22:37:52 | * | bung quit (Ping timeout: 265 seconds) |
22:41:20 | FromGitter | <alehander92> do we have zoom now |
22:43:06 | * | tane quit (Quit: Leaving) |
22:44:32 | * | vicfred quit (Quit: Leaving) |
22:44:36 | Zoom[m] | alehander92: Yep, sorry for that |
22:45:10 | disruptek | i will forbear from forbearing in public. |
22:53:32 | Zoom[m] | I got tired of using the same 3000 words and now I fervidly practice my eloquence conversing like a white thrash from some Coen movie |
22:54:04 | disruptek | floridly or fervently, but please, not both. |
22:54:50 | disruptek | mamet is a better choice, anyway. |
22:55:23 | * | NimBot joined #nim |
22:56:16 | disruptek | planetis[m]: you wanna absorb jason into your json parser? |
23:05:39 | * | hmmm quit () |
23:06:34 | FromDiscord | <Imperatorn> @Rebel GetAsyncKeyState is also useful |
23:06:52 | FromDiscord | <Rebel> @dom96 https://media.discordapp.net/attachments/371759389889003532/781657251035349052/519.png |
23:06:58 | FromDiscord | <Rebel> 🤦♂️ |
23:07:24 | FromDiscord | <Rebel> No wonder my while loop was never stopping I forgot to call `PostQuitMessage` async code does work at least in my small example we shall see if it works in the main codebase |
23:08:05 | FromDiscord | <Rebel> Also yeah I know `GetAsyncKeyState ` is pretty hot but I am ~~ripping ~~ borrowing someone else's code from the internet and they already did the work for me 😅 |
23:08:47 | FromDiscord | <dom96> hehe, glad it's working for you 🙂 |
23:09:12 | FromDiscord | <Rebel> Haha yeah time for the real test soon thanks for all the help switching between C#, Python, and Nim things can get funky |
23:09:20 | FromDiscord | <Rebel> Uvloop to Nim when 😄 |
23:10:50 | FromDiscord | <Rebel> Also not sure if you saw but someone asked a few hours ago about the best way to obfuscate Nim as when he does strings mybinary there are strings that indicate he was using nim lol |
23:10:51 | FromDiscord | <dom96> we don't rely on dependencies around these parts 😄 |
23:11:23 | FromDiscord | <Rebel> holy crap yeah you are right coming from Python I am use to like a 20 line requirements.txt |
23:53:14 | * | qwertfisch_ is now known as qwertfisch |
23:57:12 | * | Vladar quit (Quit: Leaving) |