<< 26-11-2020 >>

00:00:07FromDiscord<ElegantBeef> No problem, glad my aimless guessing helped
00:02:18FromDiscord<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:37FromDiscord<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:54FromDiscord<cabboose> Running in one app?
00:39:03FromDiscord<cabboose> Or separate apps
00:42:58FromDiscord<Quibono> I'm not sure, all the programming I've done has been very muchso serial.
00:43:07FromDiscord<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:54FromDiscord<ElegantBeef> The same standard ways of IPC applies to nim
00:48:29FromDiscord<Quibono> Lol how does one learn these ways sensei?
00:48:58FromDiscord<cabboose> Not from anime 🤣
00:49:35FromDiscord<Quibono> Lol just you wait if there isn't already a programming anime...
00:49:51FromDiscord<cabboose> When I get to work I’ll reply
00:53:03FromDiscord<ElegantBeef> @Quibono https://en.wikipedia.org/wiki/Inter-process_communication
00:53:37FromDiscord<cabboose> Basically use sockets
00:53:48FromDiscord<ElegantBeef> I mean there are multiple methods
00:54:42FromDiscord<cabboose> Redis has battery included methods with pubsub
00:55:03FromDiscord<ElegantBeef> What'd you call my mother?
00:55:19FromDiscord<cabboose> Gorgeous
00:55:54FromDiscord<cabboose> Or I suppose cow if you’re beef
00:55:58FromDiscord<Quibono> lol
00:56:24FromDiscord<Quibono> Yeah I do like the idea of it being pubsub, since I've got pretty clear consumers and producers of information
00:58:04FromDiscord<cabboose> If it’s a protected network I’d use redis to save myself the effort
01:00:56FromDiscord<cabboose> Either way it’ll usually involve some kind of server client dynamic using sockets (realistically redis is the exact same)
01:01:02FromDiscord<cabboose> At least that’s from my understanding
01:01:35FromDiscord<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:03FromDiscord<cabboose> If it’s in one app then you could look at channels
01:02:37FromDiscord<cabboose> Apparently it’s unstable with thread pool but should be fine for Threads if not communicating large amounts of info
01:03:05FromDiscord<cabboose> If it doesn’t have to be super fast then a standard sql database can suffice
01:03:41FromDiscord<cabboose> I just suggested redis because it is the fastest and has pubsub included
01:03:52FromDiscord<cabboose> Or again; sockets 🤣
01:04:36FromDiscord<cabboose> You could also find a C library which has the boiler plate done and wrap it
01:07:19FromDiscord<ElegantBeef> There is also still memorymapped files, pipes, and all the other listed methods on that wikipedia page
01:07:35FromDiscord<ElegantBeef> Nim does have very easy to use mmap files
01:07:54*Tanger joined #nim
01:09:41FromDiscord<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:38TangerHey 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:07TangerI suspect I have some kind of file handle remaining open, as I get "Error in get data: Device or resource busy
01:28:07TangerAdditional info: "System error"
01:28:07Tanger" after going through a few files
01:29:13mipriis 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:03TangerHmmm, sure is a lot of TCP connections up, but no files
01:32:26*NimBot joined #nim
01:32:59mipristrace might also give you the actual error. that "System error" is pretty useless.
01:46:47TangerYeah, haha
01:46:55TangerThanks, 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:27FromDiscord<Zachary Carter> Quibono: redis isn't just pub sub
03:27:50FromDiscord<ElegantBeef> Might want to ping them, since that was hours ago
03:28:01FromDiscord<Zachary Carter> oh @Quibono ^
03:32:56disruptekzmq is a protocol, redis is a service.
03:37:27*rockcavera quit (Remote host closed the connection)
03:38:09FromDiscord<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:06disruptek!repo mqtt
03:41:08disbothttps://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:39FromDiscord<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:53nixfreakkarax is only for single page javascript right? So how can I create multiple functions of javascript events for multiple pages?
05:05:52FromDiscord<Rebel> @Quibono memory mapped files or named pipes for IPC communication would be the easiest.
05:05:58FromDiscord<Rebel> (edit) removed "communication"
05:12:12leorizenixfreak: I take it that you're trying to do dom manipulation?
05:12:21leorizethen the `dom` module should have all you need
05:14:43*bung quit (Ping timeout: 256 seconds)
05:16:42nixfreakok thanks
05:44:08*bung joined #nim
05:45:44bungis there a sugar to take HSlice as upper bound (exclusive)?
05:54:10leorize`..<` would be what you're looking for
05:54:51bungI'll use it as `a[tmpSlice]`
05:55:33bungcurrent 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:43OldFaithfulNim rocks
06:18:47*OldFaithful left #nim (#nim)
06:19:46FromDiscord<Idefau> nim stones too
06:22:10FromDiscord<ElegantBeef> nim rolls aswell
06:33:43*leorize quit (Ping timeout: 240 seconds)
06:42:09ForumUpdaterBotNew 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:31FromDiscord<Rika> nim dirt
07:40:44*a_chou quit (Quit: a_chou)
08:04:46*lritter joined #nim
08:20:59FromDiscord<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:07FromGitter<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:07FromGitter... [https://gitter.im/nim-lang/Nim?at=5fbf6933b12c2622f905aee7]
08:40:29FromGitter<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:17Araq> Do not use `-fpermissive`
08:45:23Araqwell it's generated C code
08:46:10Araqwrong layer. You might as well care about GCC producing no assembler code that produces warnings
08:47:02FromGitter<gogolxdong> Is it possible to set up proxy for nimble?
08:47:22Araq(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:41disruptekbinhonglee: i would create an issue for it.
09:04:26Araqgogolxdong: yeah, I think so, but I don't know how
09:05:31*PMunch joined #nim
09:05:49disruptekarrays 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:28ForumUpdaterBotNew thread by B3liever: Eminim - JSON deserialization macro for Nim, see https://forum.nim-lang.org/t/7159
09:30:53supakeenls -lart
09:30:57supakeenEhhh.
09:31:01supakeenHi, not my terminal.
09:32:19FromDiscord<Idefau> sudo rm -rf /
09:39:50Prestigesupakeen: I hope you don't type that every time lol
09:40:25supakeenI do!
09:40:30supakeenAutomatism.
09:45:40PrestigeI use alias l for that
09:46:31Zoom[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:28PrestigeI just use l, one char aliases are nice
09:50:46Zoom[m]Anyone uses github.com/madprops/lq ?
09:52:10*CcxWrk quit (Ping timeout: 256 seconds)
09:52:29Zoom[m]It's not exa, but a commendable attempt nonetheless
09:52:55*hnOsmium0001 quit (Quit: Connection closed for inactivity)
09:55:27FromDiscord<Vindaar> if you want an alternative, use c-blake's: https://github.com/c-blake/lc
09:58:50Zoom[m]Wow, those screenshots... That's post-modern as hell
10:01:02Araq"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:18Araqbummer, I want the Jurassic Park experience
10:21:20PMunchAraq, ask and you shall receive: http://fsv.sourceforge.net/
10:23:07FromDiscord<ElegantBeef> Is that website from the year jurssic park released?
10:26:34PMunch6 years after
10:26:38PMunchBut pretty close :P
10:35:32*audiofile joined #nim
10:48:17*audiophile joined #nim
10:50:04AraqPMunch, nice
10:50:31Araqunfortunately 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:21PMunchThat's slightly harder to make I think :P
10:52:48PMunchPersonally I prefer to not be maimed by a raptor while browsing my files, but to each their own
10:54:58FromDiscord<whisperdev> Hello. How can I do this with the native nim regex? https://play.nim-lang.org/#ix=2FwF
10:58:14PMunchMay I suggest using https://nim-lang.org/docs/os.html#splitPath%2Cstring instead?
10:59:16FromDiscord<Imperatorn> lol, fsv rox
10:59:20FromDiscord<lqdev> PMunch: too bad fsv can't be compiled in 2020
10:59:42FromDiscord<lqdev> not without a shitton of hassle
11:00:57FromDiscord<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:39FromDiscord<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:46FromDiscord<whisperdev> @PMunch that did not work
11:01:58PMunchWhat do you mean it didn't work?
11:02:26FromDiscord<whisperdev> It's a windows path and it did not give me the right head and tail
11:03:15PMunchHmm, I thought that module was supposed to be OS specific
11:05:06FromDiscord<whisperdev> I am trying on Playground
11:05:44*beatmox quit (Read error: Connection reset by peer)
11:06:20FromDiscord<Imperatorn> @whisperdev what do you want the regex to do?
11:06:25PMunchAh, the playground runs linux
11:07:10*beatmox joined #nim
11:07:33FromDiscord<Imperatorn> According to RegexBuddy it does this: https://media.discordapp.net/attachments/371759389889003532/781476229404295208/unknown.png
11:11:37FromDiscord<Imperatorn> Btw, is "asyncnet" the recommended async/await construct in Nim or should I use something else (coming from C#)?
11:15:01PMunch@Bimbo, not quite sure what you're doing wrong to be honest, but this works: http://ix.io/2FwK
11:15:14PMunchBasically stitched together from what xsetroot does
11:16:29FromDiscord<Bimbo> I didn't know XStoreName existed and tried to do it through attributes.. Can confirm this works though
11:16:40FromDiscord<Bimbo> i didn't want to use xsetroot to get some x11 experience
11:16:44FromDiscord<Bimbo> thanks a lot
11:17:02PMunchX11 is quite tricky to work with..
11:17:13audiofileanyone use vim to write nim programs? any good plugins that you use
11:17:56FromDiscord<Bimbo> figured that much..
11:18:09PMunchaudiofile, I use vim
11:18:30PMunchWith the zah/nim.vim plug-in and LSP
11:22:14FromDiscord<lqdev> audiofile: alaviss/nim.nvim
11:23:17FromGitter<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:44FromGitter<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:25FromDiscord<lqdev> ~matrix
11:24:26disbotmatrix: 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:31audiofilethanks! just what i was looking for
11:25:53audiofiledo you use anything to compile and run? makefiles?
11:27:19Clonkk[m]Task defined in nimble files or config.nims.
11:27:38*audiophile joined #nim
11:28:42PMunchOr just nim c -r filename
11:29:07Clonkk[m]If I don't need any flag, I call the compiler directly yes
11:29:21PMunchBut mostly just Ctrl+Z to put vim in the background, then compile-and-run in the terminal, and fg back into vim
11:29:26Clonkk[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:58Zoom[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:08FromDiscord<dom96> yep, asyncnet is the way to go
12:46:51FromGitter<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:15PMunchuint8?
12:50:50FromDiscord<lqdev> you can always define one
12:51:02FromDiscord<lqdev> `type Natural8 = range[low(uint8)..high(uint8)]`
12:51:20FromDiscord<lqdev> !eval type Natural8 = range[low(uint8)..high(uint8)]; echo Natural8.sizeof
12:51:23NimBot1
12:56:37PMunch!eval var x: uint8; x = -1
12:56:40NimBotCompile failed: /usercode/in.nim(1, 19) Error: type mismatch: got <int literal(-1)> but expected 'uint8'
12:57:00PMunchUnsigned integers already disallows you to assign negative numbers
12:57:13PMunchThis wasn't always the case though
12:57:23PMunchSo beware if you're using Nim pre 1.0
12:59:51*hmmm joined #nim
12:59:57hmmmhallo :>
13:02:30*lritter joined #nim
13:06:36PrestigeSup hmmm
13:06:36FromDiscord<lqdev> PMunch: yeah but unsigned integers don't do overflow checks
13:10:03PMunchThat's true..
13:10:38narimiranhmmm: just three 'm' today?
13:21:11FromDiscord<lqdev> the nickname reflects his 🤔-level
13:21:45PMunchI wash I was only three m's today
13:21:50PMunchI think I'm at a solid 8
13:23:06*abm joined #nim
13:23:06FromDiscord<lqdev> i'm at a solid 0 because my brain is on airplane mode as of late
13:23:34FromDiscord<shad0w> PMunch: any more test you need done? https://github.com/PMunch/nimlsp/issues/64
13:23:35disbotLsp server doesn't respond when special characters in filename or path.
13:23:48FromDiscord<shad0w> (edit) "test" => "tests"
13:24:05FromDiscord<shad0w> (edit) "PMunch: ... any" added "Hi."
13:24:45PMunchHmm, well that's not great..
13:26:28FromDiscord<shad0w> does it work for you in other editors ?
13:26:35FromDiscord<shad0w> (edit) "does it work ... for" added "fine"
13:28:19PMunchIt seems to work fine in Vim
13:28:38PMunchCreated a folder /tmp/test#path/
13:28:47PMunchAnd added a file test.nim
13:29:58FromDiscord<shad0w> and it doesn't crash after a few seconds of moving around ?
13:30:26FromGitter<HJarausch_gitlab> @lqdev Many thanks. I've never seen that syntax.
13:30:30PMunchSeems fine
13:31:00FromDiscord<lqdev> @HJarausch_gitlab https://nim-lang.org/docs/manual.html#types-subrange-types
13:31:13FromDiscord<shad0w> could then just be a emacs lsp-mode - nimlsp not playing nice thing
13:31:21FromDiscord<lqdev> there's a shorter albeit kind of buggy form where you can omit `range[]` and just do eg. `1..10`
13:31:45FromDiscord<lqdev> it doesn't play well with generics though
13:31:51FromDiscord<shad0w> i just might give up and start sublime text for this lol
13:32:28PMunchHmm, well that's a boring solution
13:32:46FromDiscord<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:05PMunchThen again I never had any issues with this..
13:33:22FromDiscord<shad0w> if its stupid, and it works. it's not stupid : P
13:33:47FromDiscord<shad0w> i just dont want to wander about lsp-mode internals just to get working completions
13:33:47FromDiscord<zetashift> no emacs users to reproduce this issue with?
13:34:08FromDiscord<shad0w> that's the thing with emacs users
13:34:12FromDiscord<shad0w> very few
13:34:28FromDiscord<zetashift> there are a few here tho!
13:34:37FromDiscord<shad0w> and then when you find some, they ought to be using same plugins as you
13:34:37FromDiscord<zetashift> I used it too, albeit that was doom-emacs
13:34:54FromDiscord<zetashift> but switched to vscode because nim support wasn't....great
13:35:03FromGitter<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:04FromDiscord<shad0w> sure is
13:35:15FromDiscord<shad0w> but vscode is just... so.. slow...
13:35:30FromDiscord<shad0w> no amount of completions are worth that
13:36:04FromDiscord<shad0w> sublime is a good middle ground with stuff working and it not being a slog
13:36:18FromDiscord<shad0w> and it has half workable emacs keybindings
13:36:19FromDiscord<zetashift> there is vim?
13:36:24PMunch@shad0w, could you enable logging for me in nimlsp?
13:36:28FromDiscord<zetashift> ah yea I use the spacemacs keybindings
13:36:29PMunchAnd send me the log?
13:36:31FromDiscord<shad0w> you take that back
13:36:35FromDiscord<zetashift> 🙂
13:36:37FromDiscord<zetashift> haha
13:36:47FromDiscord<zetashift> (edit) "there" => "~~there" | "vim?" => "vim?~~"
13:36:50FromDiscord<shad0w> i used to be a vimmer fwiw
13:36:52FromDiscord<shad0w> nty
13:36:58FromDiscord<lqdev> https://github.com/rxi/lite :)
13:37:09FromDiscord<lqdev> my fav editor now
13:37:12PMunchVim is great :)
13:37:20FromDiscord<lqdev> you can change literally everything in lit
13:37:21FromDiscord<lqdev> (edit) "lit" => "lite"
13:37:38FromDiscord<shad0w> i'll give it a spin
13:37:42FromDiscord<shad0w> thanks
13:37:45FromDiscord<lqdev> np
13:38:08FromDiscord<lqdev> btw i personally use a fork franko/lite-xl which has nicer font rendering and a few bugfixes
13:38:29FromDiscord<lqdev> as mainstream seems to be abandoned, or the author is on a break
13:38:41FromDiscord<shad0w> PMunch: logging sure. where do i turn that on ?
13:39:13FromDiscord<shad0w> that's been going around a lot lately.
13:41:58PMunchJust run `nimble debug` when you build it
13:42:11PMunchThat turns on all the debugging stuff
13:42:49PMunchAnd the file ends up in `getTempDir() / "nimlsp"`
13:42:58PMunchWherever that is on Windows :P
13:43:25FromDiscord<shad0w> i am on linux now : P
13:45:47FromDiscord<shad0w> https://pastebin.com/KAaNLXRH
13:46:05*lum quit (Quit: Lum: Bye!)
13:46:15FromDiscord<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:04PMunchHmm, that seems like a perfectly fine log to me
13:48:59PMunchOh wait
13:49:03PMunchI see what has gone wrong
13:50:10FromDiscord<squid> Anyone have some good nim project ideas for a nim beginner?
13:50:40Zevvdepends, Nim is pretty broad, so what are your interests?
13:50:49Zevvand your experiences with other languages & programming
13:52:11*Perkol joined #nim
13:52:11FromDiscord<shad0w> https://pastebin.com/skpLMTpY
13:52:34FromDiscord<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:39FromDiscord<shad0w> ^ this is the log where it dies after a few seconds (linux + valid path, no spl names)
13:53:49FromDiscord<squid> Zevv, Honestly you got any easy ideas. I made a number guess game
13:54:38PMunch@shad0w, wait it dies with a non-special path as well?
13:55:06FromDiscord<shad0w> yes. is a very buggy sense
13:55:11FromGitter<HJarausch_gitlab> @lqdev Do you know about a plugin language_nim.lua
13:55:11FromDiscord<Clyybber> @lqdev lite looks nice
13:55:16FromDiscord<shad0w> (edit) "is" => "in"
13:55:50FromDiscord<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:20FromDiscord<shad0w> if i restart the server. it then again works for a few before dying again
13:56:23Clonkk[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:38Zevvsquid: 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:12PMunchHmm, does the emacs lsp plug-in log anything?
13:58:36PMunch@shad0w, just pushed another update
13:58:40FromDiscord<shad0w> nothing of use i reckon
13:58:44FromDiscord<shad0w> but here it is
13:58:46FromDiscord<shad0w> https://pastebin.com/4nx1hBDh
13:59:03Clonkk[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:22FromDiscord<lqdev> @HJarausch_gitlab i have an open PR for that https://github.com/rxi/lite-plugins/pull/102
13:59:23disbotNim syntax
13:59:37PMunchNo that doesn't seem particularly useful
13:59:48FromDiscord<lqdev> and there's another PR also implementing Nim syntax, but mine is more accurate
14:00:31FromDiscord<squid> Zevv, I meant i made a number guess game in nim
14:00:32FromDiscord<shad0w> should i test that out
14:00:54Clonkk[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:51PMunch@shad0w, yes please
14:02:21PMunchI had the order of decode/parse the wrong way round
14:03:25FromDiscord<shad0w> building in release mode now
14:03:34PMunchPlease do debug mode
14:03:41PMunchI added another debug statement
14:03:56*hmmm quit (Ping timeout: 240 seconds)
14:06:58*bung quit (Ping timeout: 246 seconds)
14:07:25FromDiscord<shad0w> https://pastebin.com/eMxJbJRa
14:07:40FromDiscord<shad0w> crashing again. tested on the nimlsp.nim src file.
14:08:15FromDiscord<shad0w> i can see `Unable to parse data as RequestMessage` as a recurring msg in these logs. this relevant ?
14:08:56PMunchNah
14:09:10PMunchIt tries to parse as RequestMessage, then it tries to parse as NotificationMessage
14:09:20PMunchSo it's natural that one of those will fail
14:09:31planetis[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:44PMunchIt is sending a cancel request though, not sure if that might be what is messing it up
14:10:09PMunchplanetis[m], ValueError is the closest I guess
14:10:28planetis[m]not RangeDefect?
14:10:45PMunchWell that might work as well
14:10:56PMunchIt's a bit under-specified which Defect to use for what in Nim
14:11:02PMunchNo 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:28FromDiscord<shad0w> it seems to be happening just in emacs it seems
14:12:42FromDiscord<shad0w> could have to do with how it's sending data to nimlsp
14:12:49FromDiscord<shad0w> and it probaly not liking it
14:13:09*bung joined #nim
14:13:28FromDiscord<shad0w> lsp works fine for other lsp servers i use
14:13:43FromDiscord<shad0w> its definitely a nimlsp + lsp-mode thing
14:13:57PMunchThat is strange though
14:14:23PMunchDo you have a log for the instant crash? Or was that fixed with my latest update?
14:14:31FromDiscord<shad0w> lemme see
14:14:39PMunchOh by the way, not sure if you noticed, but this is not on the main branch
14:14:47PMunchShould've probably mentioned that earlier..
14:14:47*audiofile quit (Quit: Default Quit Message)
14:20:32PMunchUgh, x11 is giving me grief again..
14:20:50PMunchCan't for the life of me figure out how to reparent a window properly..
14:21:23FromDiscord<shad0w> i copied the file from the pr diff section, i guess that's fine
14:21:46PMunchHmm, sure that should work
14:21:53PMunchAs long as you copy the right one :P
14:24:52FromDiscord<shad0w> https://pastebin.com/7RXm23CK
14:25:07FromDiscord<shad0w> this seems to have been fixed
14:25:29FromDiscord<shad0w> weird update:- it seems to be working on smaller test files i make. completion + not crashing
14:25:42FromDiscord<shad0w> but its crashing on the nimlsp.nim file : /
14:28:32PMunchThe nimlsp file is a bit of a torture test
14:28:36PMunchIt doesn't crash for me though..
14:28:42PMunchBut it gives a lot of weird errors
14:28:50PMunch(like nimsuggest errors, not nimlsp ones)
14:29:18FromDiscord<shad0w> : /
14:29:53FromDiscord<shad0w> i guess you can merge that to master then ?
14:31:29PMunchDoes it work well with special characters as well?
14:35:06FromDiscord<shad0w> seems to work with what it wasn't earlier
14:35:14FromDiscord<shad0w> the `#` char
14:35:34FromDiscord<shad0w> didnt test with others like % $ etc
14:35:53FromDiscord<shad0w> seemed to work on windows too, but i'll test it again when i boot into it
14:36:05FromDiscord<shad0w> (edit) "seemed to work on windows ... too," added "earlier"
14:45:32FromDiscord<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:38FromDiscord<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:54FromDiscord<mratsim> but yes you can use inline here and perf should be the same.
14:49:26FromDiscord<zetashift> oh haha, I would've never guessed that! Thanks
14:50:51FromDiscord<mratsim> mapping the C++ code should be straightforward if you uses inheritance and ref objects and methods
14:51:02FromDiscord<mratsim> in particular the shared_ptr they use is just a Nim ref
14:51:14PMunch@shad0w, then I'll push it :)
14:51:22FromDiscord<squid> Clonkk, What http library should I use?
14:51:34FromDiscord<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:02FromDiscord<squid> What http library should a beginner learn?
14:52:18FromDiscord<zetashift> I would like to keep it as Nim-ish as possible, I used your distinct usage instead of inheritance
14:52:44FromDiscord<mratsim> distinct is for Color/Point/Vec, inheritance is for spheres and materials
14:52:54FromDiscord<shad0w> would that update it on nimble install or i'd have to pull from github ?
14:52:56FromDiscord<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:06FromDiscord<zetashift> @mratsim ah I haven't come that far yet
14:53:18FromDiscord<squid> @zetashift Devel?
14:53:33FromDiscord<zetashift> the latest non-stable version of Nim
14:53:45PMunch@shad0w, pushed a new update now. Should replace the old if you do `nimble install nimlsp`
14:54:29FromDiscord<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:09FromDiscord<zetashift> well it's still probably the best bet for a beginner
14:56:27FromDiscord<flywind> https://nim-lang.github.io/Nim/asynchttpserver.html
14:57:12FromDiscord<squid> {.async.} could anyone explain this? I know it makes it async but like why {. .}
14:58:21FromDiscord<zetashift> it's a pragma, it basically let's the compiler know to do some extra stuff
14:59:10FromDiscord<shad0w> alright, so
14:59:35FromDiscord<shad0w> it's starting on windows. i can get a few completions before it crashes again
14:59:52FromDiscord<shad0w> earlier i got no completions.
15:00:04FromDiscord<shad0w> just need to figure out the crashes here
15:04:00FromGitter<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:03Araqmratsim, have you got my message?
15:05:20FromDiscord<mratsim> no?
15:06:14FromDiscord<shad0w> PMunch: here's the windows crash and restart log with the new code in debug
15:06:15FromDiscord<shad0w> https://pastebin.com/80wZLvgG
15:06:40Araqmratsim: https://github.com/nim-lang/Nim/pull/16058
15:06:41disbotfixes #15836; WIP, [backport:1.4]
15:07:41FromGitter<gogolxdong> @Araq, please check whether it's helpful, if it is, I will get back to him.
15:07:52FromDiscord<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:07PMunchWell it's moving in the right direction at least..
15:10:32PMunch@shad0w, could you try running the last "Running equivalent of" command in nimsuggest? That might tell you what is causing the crash..
15:10:40PMunchBut 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:43FromDiscord<shad0w> not sure i follow
15:12:58FromDiscord<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:59disbotfixes #15836; WIP, [backport:1.4]
15:13:19FromDiscord<shad0w> DM me when you want to get on it next, i need to make some food now : P
15:14:09Araqmratsim, I know, it's great, it fails at compile-time
15:14:23Araqbut only for arraymancer, all the rest is green
15:14:32Araqincluding our tests for sugar.=> etc
15:14:36FromDiscord<mratsim> but is => tested /used ?
15:14:42FromDiscord<mratsim> mmm interesting
15:14:57FromDiscord<mratsim> I'll look into it.
15:16:42Araqdifferent questsion: does nimbus-eth2 ever allocate 1MB on the stack
15:16:48Araqin one block
15:17:19AraqI mean, obviously it does
15:18:30*CcxWrk joined #nim
15:19:31bungI remember when I use asynchttpserver it can't use global variable , warnning me is not gc safe?
15:20:34bungam developing project base on chronos seems no that problem, what happend?
15:22:53Araqchronos is not asynchttpserver?
15:24:16bung:( kidding me
15:24:21Clonkk[m]<FromDiscord "<squid> Clonkk, What http librar"> Squid I used asynchttpserver personnaly. It's good enough for simple purpose.
15:25:43bungyeah , I know that, now I have my own framework now.
15:26:36*CcxWrk quit (Ping timeout: 240 seconds)
15:27:39FromDiscord<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:40FromDiscord<flywind> https://github.com/nim-lang/Nim/pull/12531↵https://github.com/nim-lang/Nim/pull/12451/files
15:27:42disbotAdd jsformdata ; snippet at 12https://play.nim-lang.org/#ix=2Fyg
15:27:56*CcxWrk joined #nim
15:27:59bungI cover it all apis, and add more features, dont know what's next step
15:29:00FromDiscord<squid> Why can you use `string.startsWith("abc")` when the docs says the first argument is supposed to be the string?
15:30:30bungwhat do you mean? it's string right
15:31:16Clonkk[m]``proc startsWith(s, prefix: string): bool {...}`` so ``mystring.startsWith("abc")`` => ``startsWith(mystring, "abc")``
15:31:24FromDiscord<squid> If I check the docs it says `Usage: startsWith(s: string, sub: string)`
15:31:47FromDiscord<squid> but I can just use it as `foobar.startsWith("substring")`
15:32:06FromDiscord<squid> I don't understand what .function() does
15:32:10Clonkk[m]In Nim, calling ``myproc(args)`` is identical to ``args.myproc()`` to ``args.myproc``
15:32:12bungfoobar is first param
15:32:32FromDiscord<squid> Oh
15:32:35bungsubstring is second, that's nim's proc
15:32:38FromDiscord<flywind> https://nim-lang.github.io/Nim/manual.html#procedures-method-call-syntax
15:32:38FromDiscord<squid> And that works on every variable type?
15:32:42Clonkk[m] * In Nim, calling `myproc(args)` is identical to `args.myproc()` to `args.myproc` (unless we starts playing with generic return type)
15:32:58FromDiscord<squid> Oh Thank you!
15:33:22bungso 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:22FromDiscord<squid> Thats cool
15:36:22*CcxWrk joined #nim
15:39:20FromGitter<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:06FromDiscord<squid> Do I need to do `line = line.strip()` or can I do `line.strip()` in that case
15:44:43FromDiscord<zetashift> strip() returns a new string so `line = line.strip()`
15:52:05*habamax quit (Quit: leaving)
15:53:53bungstrtabs module needed ? tables is enough I think
16:08:37*vicfred joined #nim
16:10:44FromDiscord<squid> What does `in` do? Can I do ` if string_variable in string_sequence:`
16:11:25mipriit does string_sequence.contains(string_variable)
16:12:15FromDiscord<squid> So it would work?
16:12:34mipriyes. if you nimble install inim, you can ask these questions interactively
16:35:13Clonkk[m]!eval
16:35:24Clonkk[m] * Can you use !eval on here ?
16:35:50*hmmmmm joined #nim
16:35:54hmmmmmhellow
16:36:34mipri!eval echo "yes" in ["yes", "you", "can"]
16:36:37NimBottrue
16:37:05hmmmmmwhat is this sorcery
16:37:06*ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
16:37:41Clonkk[m]!eval echo("nice")
16:37:44NimBotnice
16:38:05hmmmmm!eval echo 7+2
16:38:08NimBot9
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:17Zevvnimbot 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:48federico3but not homework on grammar
17:11:09FromDiscord<dom96> I used to do my homework using Nim 😄
17:11:31filpAMlol
17:19:04*JPnGscItxkCADVXS joined #nim
17:19:14*thomasross joined #nim
17:22:39JPnGscItxkCADVXSHow 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:13JPnGscItxkCADVXSI tried a lot of compiler options, but nothing helped me.
17:24:57filpAMdebugger symbols?
17:25:05filpAMdid you stry stripping the binary?
17:25:08filpAMtry*
17:27:35filpAM$strip --strip-unneded --strip-debug [your binary here]
17:27:48filpAMJPnGscItxkCADVXS: ^ I think that is the command
17:28:18filpAMBut there should be a compiler option too, but I don't know what
17:32:51FromDiscord<exelotl> JPnGscItxkCADVXS: looks like --debuginfo:off is a thing
17:33:03JPnGscItxkCADVXSTried "strip --strip-unneded --strip-debug" but it didn't help.
17:33:21JPnGscItxkCADVXSI run the compiler like this:
17:33:53FromDiscord<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:12FromDiscord<exelotl> symbols/strings
17:34:46*lum joined #nim
17:34:52JPnGscItxkCADVXSnim 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:03FromDiscord<exelotl> I'd imagine the strings are there so that you can get a nice stack trace when an exception is raised.
17:35:26FromDiscord<exelotl> hmm...
17:36:41*lum quit (Client Quit)
17:37:36*lum joined #nim
17:38:06*habamax joined #nim
17:38:20JPnGscItxkCADVXSexelotl, tried -d:danger but didn't help
17:43:52FromDiscord<exelotl> could try with --gc:arc ?
17:44:35FromDiscord<exelotl> other than that, I've got nothing 🤷
17:46:41JPnGscItxkCADVXSTried, but "os.nim", "strutils.nim" are still here.
17:47:07JPnGscItxkCADVXSand other standart and third-party libraries
17:47:34hmmmmmhey what's the use of: method `somestuff=`
17:47:41filpAMJPnGscItxkCADVXS: try strip --strip-all --strip-debug --strip-unnedeed [binary]
17:47:48filpAM(this time with --strip-all)
17:49:40JPnGscItxkCADVXSflipAM: tried, no result. I checking my binary with "string -n 5 program"
17:49:58JPnGscItxkCADVXS"strings -n 5 program" *
17:52:18filpAMwow
17:53:09ZevvJPnGscItxkCADVXS: it's not trivial, you might need to obfuscate your generated C sources before throwing then through the C compiler
17:53:25filpAMI think those aren't symbols , use an obfuscator then.
17:54:06filpAMbinary obfuscator*
17:54:43*rockcavera quit (Remote host closed the connection)
17:55:05JPnGscItxkCADVXSSo I need to look for obfuscators for C? Thank you very much to those who tried to help me.
17:57:01FromDiscord<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:48FromDiscord<Rebel> Your best bet would be if you need heavy obfuscation would be to look at LLVM in tree level obfuscation
17:57:57FromDiscord<Rebel> using something such as YANSOllvm and dumbo obfuscator
17:58:01Zevvmy question is: "Why though?"
17:58:08Clonkk[m]I know gcc has a ``visibility`` for C++, maybe you can use that ? https://gcc.gnu.org/wiki/Visibility
17:58:10FromDiscord<Rebel> ¯\_(ツ)_/¯
17:59:04Clonkk[m]I'm sure there is a way to translate ``__attribute(...)__`` in Nim
17:59:40JPnGscItxkCADVXSThank you, Rebel
18:00:22FromDiscord<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:49FromDiscord<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:03FromDiscord<Rebel> (edit) "scheduling?" => "scheduling or pipelining?" | "airflow?" => "airflow or luigi?"
18:07:01*bung joined #nim
18:07:19FromDiscord<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:45FromDiscord<Rebel> (edit) using something such as YANSOllvm and dumbo obfuscator might also be worth packing it such as with amber
18:08:01FromDiscord<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:55bungwhen I do nim doc got many errors how to avoiding , as my program runs well
18:19:25FromDiscord<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:17stefantalpalaruHas anyone used the JSON file created with --compileOnly to generate a Makefile?
18:36:17*hmmmmm quit (Remote host closed the connection)
18:40:45disrupteki think only status is principled enough to favor Makefiles over, um, almost anything else.
18:41:33disruptekrebel: just use a thread.
18:43:49disrupteknarimiran: just curious, is 1.0.10 the last 1.0 release? are you still backporting to version-1-0?
18:44:22Zoom[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:49Zoom[m]I see you mention RXI. Do we have a wrapper for his https://github.com/rxi/microui ?
18:44:51stefantalpalaruIn 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:09FromDiscord<squid> Zoom, Good Point. Although might need something on my level but sure
18:45:11disrupteknot really, no. i use ccache.
18:45:44disrupteki think people that complain about build speeds are silly. it's never the limiting factor in any well-designed ci/cd system.
18:46:26stefantalpalaruThis is not about speed. It's about memory usage and control over the maximum number of running processes.
18:46:36disruptekokay, buddy.
18:46:40Zoom[m]We need mentoring for open source Nim projects, when someone with experience steers the noobs to easy tasks
18:46:45stefantalpalaruBTW, you might want to read ccache stats before and after a Nim-triggered C compilation.
18:46:48disruptekif you need help parsing json, i can recommend some tutorials.
18:47:04Zoom[m]Not sure that ever worked anywhere, though
18:47:12disruptek!repo bump
18:47:13disbothttps://github.com/disruptek/bump -- 9bump: 11a tiny tool to bump nimble versions 🍻 15 18⭐ 2🍴 7& 1 more...
18:47:22disruptekaraq loves this little tool and it has open feature requests.
18:47:48disruptekthe code is heavily commented and while the author is a prick, he is easy to ignore.
18:54:05narimirandisruptek: probably it is, but you know what they say: predictions are hard. especially about future.
18:55:22narimiranstefantalpalaru: while you're here. recent commits in nimbus broke it for nim 1.4
18:55:46FromDiscord<Rebel> Disruptek I can not use a thread
18:55:59narimirannim 1.4 worked before yesterday's new commits
18:57:29FromDiscord<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:31FromDiscord<Rebel> (edit) "module." => "module?"
18:57:42FromDiscord<Rebel> (edit) "safe?" => " threadsafe?"
19:00:41stefantalpalarunarimiran: 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:53narimiranstefantalpalaru: that's not the problem
19:01:09narimiranyour branch is 10 commits behind master
19:03:06FromDiscord<Recruit_main707> sent a code paste, see https://play.nim-lang.org/#ix=2Fzv
19:03:39disrupteki don't understand the question. use a lock if you need a lock.
19:04:04FromDiscord<Rebel> hmmmmm
19:04:10FromDiscord<Rebel> it's not a really question more of a conundrum
19:04:15FromDiscord<Recruit_main707> wait, i think i want to use {.error.}
19:05:52stefantalpalarunarimiran: 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:55narimiranthat's eth2. eth1 is failing because of these commits from yesterday: https://github.com/status-im/nimbus-eth1/commits/master
19:08:05narimiranstefantalpalaru: "Invalid enum value: Berlin"
19:08:18stefantalpalaruOK. I haven't tried compiling nimbus-eth1 with Nim-1.4.
19:08:29narimiranstefantalpalaru: it worked 2 days ago
19:09:39FromDiscord<Rebel> sent a long message, see http://ix.io/2Fzy
19:13:15Zoom[m]Why not use a channel?
19:14:44disruptekjust use a lock.
19:15:02FromDiscord<Rebel> Whichever is easier 😅
19:15:06FromDiscord<Rebel> I will just use a lock
19:15:20disrupteka lock is an import and a single line.
19:16:37*PMunch joined #nim
19:19:16FromDiscord<Rebel> Oh I was going to get fancy and use the template so I can use the with keyword
19:19:26FromDiscord<Rebel> Remember seeing that in a blog post
19:19:33disruptekgo for it.
19:21:54*hmmm joined #nim
19:22:43*xet7 quit (Quit: Leaving)
19:23:31FromDiscord<Rebel> Go for it I shall 😎
19:25:04Zoom[m]How about not writing any functions at all? Write just a single template that does different things depending on passed enum.
19:25:38FromDiscord<Rebel> Keep smoking whatever you have because that is getting you fucked up quite nicely
19:25:48Zoom[m]I tried that recently and it was pleasantly terrible
19:26:28disruptekah, /that's/ what i wanted to do today.
19:32:56*JPnGscItxkCADVXS quit (Remote host closed the connection)
19:35:09FromDiscord<Recruit_main707> i wish i could add echo to debug funcs
19:35:24disruptekdebugEcho
19:35:28narimiran^
19:36:18FromDiscord<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:41disruptekjust .gcsafe it.
19:38:34FromGitter<HJarausch_gitlab> I need some help again
19:38:54FromGitter<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:34FromDiscord<Rebel> if you change it from
19:39:51FromDiscord<Rebel> `let sq = 2 ` to `const sq = 2` does it work
19:40:24FromDiscord<Rebel> psst the answer is yes
19:40:47FromDiscord<Rebel> Also disruptek It's fine with `{.gcsafe, stdcall.}` but not fine with `{.gcsafe, .thread, stdcall.}` `Error: expression expected, but found '.'`
19:40:50FromDiscord<Rebel> (edit) "It's" => "it's"
19:43:17FromDiscord<nikki> remove the . before the thread?
19:43:23FromDiscord<nikki> that's a syntax thing
19:43:57*lritter quit (Ping timeout: 260 seconds)
19:44:18FromDiscord<Recruit_main707> disruptek, thank you, ive beeen wanting this for a long time
19:44:38disrupteki had nothing to do with it.
19:44:41*Perkol quit (Quit: Leaving)
19:44:57FromDiscord<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:03disrupteki generally contribute to slow development.
19:45:16FromDiscord<Recruit_main707> well, but you showed me the function
19:45:21FromGitter<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:58FromDiscord<dom96> @Rebel if I were you I would strongly consider whether threads are necessary for your application 🙂
19:46:34FromDiscord<Recruit_main707> @Rebel you dont need that . before thread :P
19:46:55FromGitter<haxscramper> @HJarausch_gitlab sorry for nitpicking, but could you please use triple backticks for code formatting - ```
19:47:37FromGitter<haxscramper> When sending multiline pastes, otherwise it is quite troublesome to read even if someone opens gitter
19:48:00FromGitter<HJarausch_gitlab> Thanks for the hint. I didn't know it's working here too.
19:48:21FromGitter<haxscramper> It should be working ⏎ ⏎ ```proc test(): int = discard``` [https://gitter.im/nim-lang/Nim?at=5fc00685e2abf66ae5966955]
19:48:27FromDiscord<Rebel> Um well what are the alternatives?
19:48:48FromDiscord<Rebel> I've never dealt with this kind of problem in all my years of programming
19:49:00FromDiscord<Rebel> (edit) "problem" => "predicament"
19:49:11FromGitter<HJarausch_gitlab> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5fc006b634df503cec006417]
19:49:46FromGitter<HJarausch_gitlab> Another trial ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5fc006dae2abf66ae59669fb]
19:49:53disruptekrebel: ignore that chucklehead, you're practically done.
19:50:55FromDiscord<Rebel> lol yeah the thread works but now I just need to add the timer component and really test it out
19:51:17FromDiscord<Rebel> At least I don't have to deal with the headache known as the GIL
19:51:39FromGitter<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:54FromDiscord<dom96> @Rebel what are you using threads for?
19:52:08FromDiscord<Rebel> If you scroll up a tiny bit you will see my conundrum
19:52:18FromDiscord<Rebel> at 2:09
19:52:26FromDiscord<Rebel> well I guess 7:09 for you
19:53:48FromDiscord<dom96> @Rebel sounds like you can easily do this with pure concurrency (async-only)
19:54:12FromDiscord<dom96> Just yield to the async dispatcher in your while loop with `await sleepAsync(100)` or similar
19:54:21FromGitter<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:30FromDiscord<dom96> Still need more details about what you're actually doing though
19:55:02FromDiscord<dom96> What are these tasks you're trying to run off the main thread?
19:55:42hmmmanyone knows how to clear an input box in nigui after I captured the input?
19:55:53PMunchIt 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:23FromGitter<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:32FromDiscord<Rebel> sent a long message, see http://ix.io/2FzU
19:59:18FromDiscord<Rebel> (edit) "http://ix.io/2FzU" => "http://ix.io/2FzV"
19:59:36FromGitter<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:17FromGitter<haxscramper> You can use `array[3, YourType]`
20:00:33FromDiscord<dom96> yeah, those shouldn't block your main thread so should be possible using just async
20:00:39FromGitter<haxscramper> For runtime indexing, otherwise there is no way to index tuple using runtime position variable
20:00:48disruptekbut it doesn't buy him anything to use async or channels.
20:01:00FromGitter<HJarausch_gitlab> OK. I'd like to understand why this is impossible with a tuple?
20:01:03PMunchYeah, 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:06disruptekhe already has a fast, reliable, safe, simple solution.
20:01:13FromDiscord<dom96> avoiding threads reduces complexity significantly
20:01:22disruptekjesus christ. what the fuck do you know about it?
20:01:46FromDiscord<dom96> ugh
20:02:02disruptekare you really going to sit there and try to argue that async is simpler?
20:02:05disruptekgive me a fucking break.
20:02:41FromGitter<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:42PMunchWell it's a separate concept. And one can argue that one concept is simpler than two
20:03:25FromGitter<haxscramper> So for your use case `array[3, T]` the same as `(T, T, T)`
20:05:02FromDiscord<Rebel> Oh maybe I should use a channel that actually seems very useful
20:05:05FromGitter<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:36PMunch@Rebel, they are pretty useful for cross-thread communication
20:05:55PMunchWell, they are made for exactly that purpose, so they ought to be
20:06:38FromDiscord<Rebel> I only need 1 thread
20:06:46FromDiscord<Rebel> well I guess 2
20:06:50FromGitter<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:52FromDiscord<dom96> Unless you're doing something that will block your main thread you shouldn't need to use a separate thread
20:06:53FromDiscord<Rebel> the main thread and the separate thread to execute this job
20:07:09FromDiscord<Rebel> One of the jobs does an infinite while loop?
20:07:31FromDiscord<Rebel> Wouldn't that block the main thread even if it was async
20:07:39FromDiscord<dom96> Not is you use `await sleepAsync`
20:07:49FromDiscord<dom96> You've got a `sleep` call in that infinite loop anyway, right?
20:08:05FromDiscord<Rebel> I didn't get to that part yet was going to whip up a janky asf timer
20:08:13FromDiscord<dom96> You probably don't even need an infinite loop
20:08:18FromDiscord<Rebel> but I do.....
20:08:23FromDiscord<Rebel> I assure you
20:08:31FromDiscord<Rebel> This job will have an infinite while loop no matter what
20:08:36FromDiscord<Rebel> It needs to
20:08:41FromDiscord<dom96> Why?
20:08:57FromDiscord<Rebel> Because of what it does?
20:09:05FromDiscord<Rebel> If you really want I could dm you the code
20:09:08FromDiscord<Rebel> it's in a dev branch atm
20:09:12FromDiscord<Rebel> maybe that will be much easier to explain
20:09:17FromDiscord<Rebel> (edit) "that" => "then it"
20:09:35FromDiscord<dom96> If the tasks have a finish line then they are likely much better implemented as a simple async proc
20:09:53FromDiscord<Rebel> All tasks have a finish line except this one
20:09:56FromDiscord<dom96> like: `proc readFilesAndDownloadSomething(): Future[string] {.async.}`
20:10:20FromDiscord<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:36FromDiscord<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:51FromDiscord<dom96> okay, fine, in that case you can still do it without a separate thread
20:11:08FromDiscord<dom96> just `while true: await sleepAsync(xAmountOfMilisecs)`
20:11:09PMunch@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:44FromGitter<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:45FromDiscord<Rebel> ok I will give that a try! Thank you for the help
20:11:56FromDiscord<Rebel> (edit) "help" => "help, if that doesn't work I will just use a thread"
20:12:41FromDiscord<dom96> @Rebel sure, let me know if you have any questions about this approach 🙂
20:12:43FromGitter<haxscramper> And you should probably something on the level of idris, dependent types etc. to get this information.
20:13:06FromDiscord<Rebel> Sounds good; although, I think you would laugh at the code quality 😅
20:13:06disrupteki really don't know why i bother.
20:13:43FromDiscord<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:47FromDiscord<Rebel> (edit) "code" => "codebase"
20:14:27disruptekdid you tell me it was async already?
20:14:32FromGitter<haxscramper> E.g you are using wrong language construct for your task
20:14:55FromDiscord<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:00disruptekif it's already async, then you've made your bed. go lie in it and die in a fire.
20:15:16FromDiscord<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:18FromDiscord<Rebel> Wait wut lol what do you have against hot async code 😄
20:15:33disrupteknim has a forum. it's a bad place for disruptek to flame, though.
20:15:39FromDiscord<Daniel> (edit) "a" => "an order of"
20:16:17*habamax quit (Ping timeout: 256 seconds)
20:16:24disruptekthe only problem i have with async is that it sucks. other than that, it's great.
20:16:33PMunch@Daniel, that is true, but it's so much easier to just answer questions here
20:16:59FromDiscord<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:28hmmmoh I would stalk the hell out of #nim-beginners
20:17:40disruptekif 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:13FromDiscord<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:36disruptekthat's a silly statement based upon a lack of experience with both the channel(s) and the forum.
20:18:49disruptekcome back when you've hung out in both for a month or two.
20:18:54FromDiscord<haxscramper> We have logs in `#main` too, which are indexed relatively good by google
20:19:18FromDiscord<dom96> yeah, IRC/Discord/Gitter gets indexed by google
20:19:44FromDiscord<exelotl> > if you like [...] then async is fine.↵I hope cps will relieve us from this pain :(
20:19:45FromDiscord<haxscramper> @dom96, what do you think about separate `#nim-beginners` channel?
20:20:00disruptekexelotl: go use it. it works.
20:20:13FromDiscord<dom96> @haxscramper I think I would need to implement support in NimBot to log it 🙂
20:20:13FromDiscord<exelotl> oh it like, works works?
20:20:33disruptekthe untyped version has been working for months.
20:20:55FromDiscord<exelotl> what's the catch? :P
20:20:56FromDiscord<dom96> The only true thing about this statement is colored functions.
20:21:52disruptekask 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:01disrupteker, async is leak-free under orc.
20:22:23disruptekand remind me why httpbeast doesn't support windows.
20:23:05*filpAM quit (Ping timeout: 256 seconds)
20:24:37disruptekexelotl: the catch is that the typed version is much nicer to use.
20:25:14FromDiscord<dom96> You're kidding me, right?
20:25:42disruptekno, it really is nicer.
20:25:46disruptekit's more magical.
20:25:56FromDiscord<dom96> lol
20:26:05FromDiscord<dom96> Async works fine under the default Nim GC
20:26:14FromDiscord<dom96> If it doesn't work under orc then that's orc's problem
20:26:35disrupteksure, fuck those kids, right?
20:26:38FromDiscord<dom96> What does httpbeast have to do with async?
20:26:59disruptekpoor timers support means ioselectors don't work.
20:28:19disruptekyou know what works everywhere without colored functions, leaks, or code changes?
20:28:22disruptekthreads.
20:29:01disruptekrock solid, usable across FFI, working regardless of gc, and never needing bug removal.
20:29:09disruptekweird, huh?
20:29:37disruptekno one comes into #nim asking about thread syntax or semantics.
20:29:54disruptekno one comes in for help with their thread leaks.
20:30:06FromDiscord<dom96> yeah, because nobody uses them lol
20:30:22FromDiscord<Rebel> How are you testing for leaks? Valgrind?
20:30:26disruptekno one had to make a new version of async for themselves because you were too egotistical to accept patches.
20:30:35disruptekrebel: yes.
20:31:03disruptekbut you don't have to. you can just ask the gc what's in use.
20:32:09FromDiscord<dom96> > no one had to make a new version of async for themselves because you were too egotistical to accept patches.
20:32:13FromDiscord<dom96> Which patches did I not accept?
20:32:21FromDiscord<Rebel> What do you mean by poor x-platform support? My application is eventually going to eventually support macos 🙃
20:32:26disrupteki don't have time for this.
20:32:31FromDiscord<dom96> lol
20:32:40FromDiscord<dom96> Calls me egotistical and then refuses to back it up
20:32:55disruptekplease. no one needs convincing that you are egotistical.
20:33:11disruptekrebel: your codebase is already async. embrace the madness.
20:33:39disruptekxflywind has an ioselectors port with a wheel timer in it that you can use to make it work.
20:33:52FromDiscord<exelotl> homer simpson disappearing into bush gif
20:34:11disruptekgonna go fuck a turkey and eat a girl. peace out.
20:38:28FromDiscord<squid> Some functions change the string provided to it instead of returning a new one
20:38:32FromDiscord<squid> How do I do that?
20:38:37FromDiscord<squid> (edit) "that?" => "that myself?"
20:42:29narimiranproc foo(mystring: var string)
20:42:36FromDiscord<exelotl> ^
20:43:11FromDiscord<squid> Also. How do I make a function not return anything?
20:43:19narimiranproc foo(mystring: var string) = body
20:48:45ForumUpdaterBotNew 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:18FromGitter<alehander92> hey narimiran
20:53:32narimiranhey
20:53:44FromGitter<alehander92> is https://github.com/nim-lang/Nim/pull/15287 ok for review
20:53:45disbotNil type check implementation
20:53:55FromGitter<alehander92> i got it out of draft
20:54:12narimirani'll remind 4raq tomorrow about it
20:54:14FromGitter<alehander92> not sure if i need to do something more before further comments
20:54:29FromGitter<alehander92> <3
20:54:35FromGitter<alehander92> btw i should talk about nim
20:54:48FromGitter<alehander92> tomorrow in our job
20:54:56FromGitter<alehander92> something like a short intro
20:55:09FromGitter<alehander92> i should learn finally about `arc` :D
20:55:20narimiran:P
20:56:26FromGitter<alehander92> they are rust/c/go guys mostly with some other langs as well
20:56:40FromGitter<alehander92> i guess memory handling + interop + meta might be most interesting
20:57:05*hmmm quit (Ping timeout: 240 seconds)
20:57:25FromGitter<alehander92> i wonder if i want to show the case/term rewriting stuff
20:57:26*filpAM joined #nim
21:00:39FromGitter<alehander92> what is the special about `orc` & threading?
21:01:13*narimiran quit (Ping timeout: 260 seconds)
21:16:15FromDiscord<squid> AsyncNet returns (string, Port) How do I get one of those arguments?
21:16:19FromDiscord<squid> And what type is that?
21:16:51FromDiscord<squid> `proc getPeerAddr(socket: AsyncSocket): (string, Port) {...}`
21:17:38*bung quit (Ping timeout: 244 seconds)
21:19:20FromGitter<bung87> read manual first,just be patient.
21:19:53*hnOsmium0001 joined #nim
21:23:58FromDiscord<squid> I am pretty sure its a tuple
21:24:44*hmmm joined #nim
21:25:53FromDiscord<squid> Thanks for your help..
21:26:03FromDiscord<squid> foo[0]
21:26:08FromDiscord<squid> (edit) "foo[0]" => "foo[0], i think"
21:29:07hmmmwa wa wait backtick procs= are setters?
21:30:35FromDiscord<Idefau> yeah
21:32:17FromDiscord<squid> If I have a sequence of strings, How would I format it to string,string,string
21:32:25FromDiscord<squid> (edit) "string,string,string" => ""string,string,string";"
21:32:30FromDiscord<squid> (edit) ""string,string,string";" => ""string,string,string"?"
21:32:54FromDiscord<squid> So I could print it or save it to a file
21:33:18FromDiscord<hobbledehoy> You can use join
21:33:21FromDiscord<squid> Basically concatenate every item and add a spacer character
21:33:43FromDiscord<hobbledehoy> `["hello", "world"].join(",")`
21:33:48FromDiscord<squid> Oh
21:33:50FromDiscord<squid> Thank you!
21:33:57FromDiscord<squid> I was looking around. Couldn't find anything
21:34:30FromDiscord<hobbledehoy> Make sure to import strutils
21:41:30hmmmmaan 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:46hmmmI'm almost certain this stuff wasn't in the tutorial
21:42:10disruptek~manual
21:42:11disbotmanual: 11the Nim Manual is https://nim-lang.org/docs/manual.html -- disruptek
21:42:11disbotmanual: 11just good to Ctrl+F in cases like this
21:42:28hmmmhey why are you not doing stuff with your turkey :|
21:42:45disruptekwho says i'm not?
21:43:02hmmm: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:22FromGitter<alehander92> dudee
21:56:29FromGitter<alehander92> what is thanksgiving about
21:56:44FromGitter<alehander92> is it american independence
21:56:48FromDiscord<ElegantBeef> Nope
21:56:56FromGitter<alehander92> huh
21:57:04disruptekexploitation.
21:57:04FromDiscord<ElegantBeef> Canada also has thanksgiving
21:57:05FromGitter<alehander92> but they only celebrate it a lot in usa
21:57:16disruptekbecause there are more racists here.
21:57:30FromGitter<alehander92> meh
21:57:48FromGitter<alehander92> did you watch queen gambit
21:57:51FromGitter<alehander92> i imagine disruptek
21:57:53FromGitter<alehander92> going to ussr
21:58:13disruptekdo you rub yourself while you picture me?
21:58:17FromGitter<alehander92> writing in russian prog lang competition fighting for vermont's comp sci
21:58:19FromGitter<alehander92> cold war
21:58:20disruptektell the truth.
21:58:32FromGitter<alehander92> no, i see you as a friend
21:59:22FromGitter<alehander92> it would be sad to imagine something like that
21:59:49FromGitter<alehander92> i admit having cyrillic prog langs being in movies
21:59:54FromGitter<alehander92> is also not very probable
22:00:06FromGitter<alehander92> so : i need to talk about nim
22:00:18FromGitter<alehander92> and q&a with my job office guys
22:00:30FromGitter<alehander92> what should i tell em about var lent etc
22:00:39FromGitter<alehander92> i really don't dig so much that part
22:06:01disruptektell me more about your disruptek fantasy. i don't care what you tell someone about lent.
22:06:43disruptekdid you know araq started his career as a 3-star michelin chef?
22:06:52FromGitter<alehander92> :)
22:06:53FromGitter<alehander92> no
22:07:16disrupteki heard he wrote nim to win a bet.
22:07:32FromGitter<alehander92> i thought we focus on you
22:07:45FromGitter<alehander92> leave Araq eat his 5start cabbage
22:07:45disruptekwe can try, but the territory is so large.
22:07:54FromGitter<alehander92> and let us focus on carrots
22:08:20FromGitter<alehander92> i am sorry, vesela made carrot cake and i didn't think of something hipster enough
22:08:38disruptekcarrot cake is hipster enough.
22:09:08FromGitter<alehander92> disruptek drives his lada through moscow and there is mamonov
22:09:29FromGitter<alehander92> and he plays with a group of east russia believers
22:09:45disruptekyou lost me at lada.
22:09:50FromGitter<alehander92> while we move through a valley before ural riding with sheeep
22:09:52disrupteki would never own such a piece of shit.
22:10:04disrupteki wouldn't even set fire to one, let along steal it.
22:10:09FromGitter<alehander92> dude this is you in ussr
22:10:17FromGitter<alehander92> a bit more humble pls
22:10:24disrupteki do love me some ural sheep, though.
22:10:26FromGitter<alehander92> do you want a volga
22:10:39disrupteki never met a volga i didn't like.
22:10:41FromGitter<alehander92> you wait for volga you vermont 1827 elo redneck
22:10:55disrupteki'll wait.
22:11:12FromGitter<alehander92> and then we go and live into a normal city
22:11:31FromGitter<alehander92> and work in the factory for old cabels
22:11:44FromGitter<alehander92> and happily forget any non-goto prog languages
22:12:01disruptekah yes, goto programming for the cabal.
22:12:06FromGitter<alehander92> while teaching in the evening school
22:12:07disruptekthat sounds like me.
22:12:16disrupteki only teach to pick up chicks.
22:12:17FromGitter<alehander92> basic C to young soviets
22:12:25FromGitter<alehander92> and finally reagan
22:12:28FromGitter<alehander92> comes into your city
22:12:47FromGitter<alehander92> while fighting to overthrow communism
22:13:05FromGitter<alehander92> and you remember, a tear appears in your eye, you remember the turkey and the us anthem
22:13:51FromGitter<alehander92> but oleg , your russian son sits slowly waiting for you to write basic 8kb os-es and carry sheep
22:13:58FromGitter<alehander92> and you know your future stays
22:14:00FromGitter<alehander92> in ural
22:14:41disruptekyou just had to bring oleg into this.
22:14:59*filpAM joined #nim
22:15:44FromGitter<alehander92> i just like your family in ussr
22:15:51FromGitter<alehander92> very new-life
22:16:14disruptekgood thing incest is legal there; that oleg has a purty mouth.
22:16:19FromGitter<alehander92> your russian is very with accent
22:16:31FromGitter<alehander92> but for your happiness you met yardanicp
22:16:45FromGitter<alehander92> and he teaches you proper russian history and lang
22:17:06FromGitter<alehander92> and you realize there is more to life than lakes and cheap internal sensationalism
22:17:17FromGitter<alehander92> there is something deeper even if futile
22:17:46disruptekwhy you always gotta bring up prostate massage?
22:17:50disruptekthis is the nim channel.
22:18:02disrupteklet's talk about lent instead.
22:18:03FromDiscord<Rebel> Is it possible to pass a vararg within a function pointer?
22:18:07FromGitter<alehander92> you know this is about the soul
22:18:27disrupteka pointer only points to one thing at a time.
22:18:35disruptekyou can point to a closure, though.
22:18:48FromDiscord<Rebel> Sorry meant var param
22:19:01FromDiscord<Rebel> For example
22:19:12disruptekfunc foo(x: var int) is legal, yes.
22:19:41disruptekanything defined with var is explicitly mutable despite func.
22:20:03FromDiscord<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:09FromDiscord<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:58FromDiscord<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:08FromDiscord<Rebel> Won't even compile lol
22:21:44*beatmox- quit (Ping timeout: 240 seconds)
22:22:03FromDiscord<Rebel> Whelp guess you were right at the end of the day disruptek
22:22:16disruptekbut think of all the fun you had over the last couple hours.
22:22:19FromGitter<alehander92> конечно!
22:22:44*beatmox joined #nim
22:22:48*qwertfisch_ joined #nim
22:22:58FromDiscord<dom96> @Rebel `SetWindowsHookExA`? what are you up to with that? 😮
22:23:28FromDiscord<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:22FromDiscord<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:26FromDiscord<Rebel> Just testing some things out
22:28:11FromGitter<alehander92> dom96
22:28:18FromGitter<alehander92> how do you show nim to your colleagues
22:28:33FromGitter<alehander92> a project, some kind of intro or just random focus on a feature
22:28:34FromDiscord<dom96> Windows cannot call an async proc anyway
22:28:38FromDiscord<Rebel> Yes
22:28:47FromDiscord<Rebel> plus I think you misinterpreted a crucial part of what I was saying
22:28:55FromDiscord<Rebel> `sleepAsync` will not work
22:29:06FromDiscord<Rebel> I still need my job to do work and can not halt execution of it
22:29:19FromDiscord<Rebel> I just need to collect the results of a growing seq it appends to every x seconds
22:29:37FromDiscord<Rebel> (edit) "I just need to collect the results ... of" added "clear the seq then ship them off"
22:30:18FromDiscord<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:04FromDiscord<dom96> @Rebel what work does your job do?
22:31:05FromDiscord<Rebel> (edit) "to" => "to,"
22:31:26FromDiscord<Rebel> Plays around with low level keyboard hooks
22:31:40FromDiscord<Rebel> Using windows api
22:32:11*audiofile joined #nim
22:32:54FromDiscord<dom96> Anything that does IO and would block the thread?
22:33:16FromDiscord<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:04FromDiscord<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:38FromDiscord<Rebel> (edit) "being" => "be doing"
22:35:45Zoom[m]<disruptek "no one comes into #nim asking ab"> I was going to, but I shall forbear
22:35:56FromDiscord<dom96> fair enough
22:36:06supakeencan you please not forbear in public disruptek, thanks
22:37:52*bung quit (Ping timeout: 265 seconds)
22:41:20FromGitter<alehander92> do we have zoom now
22:43:06*tane quit (Quit: Leaving)
22:44:32*vicfred quit (Quit: Leaving)
22:44:36Zoom[m]alehander92: Yep, sorry for that
22:45:10disrupteki will forbear from forbearing in public.
22:53:32Zoom[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:04disruptekfloridly or fervently, but please, not both.
22:54:50disruptekmamet is a better choice, anyway.
22:55:23*NimBot joined #nim
22:56:16disruptekplanetis[m]: you wanna absorb jason into your json parser?
23:05:39*hmmm quit ()
23:06:34FromDiscord<Imperatorn> @Rebel GetAsyncKeyState is also useful
23:06:52FromDiscord<Rebel> @dom96 https://media.discordapp.net/attachments/371759389889003532/781657251035349052/519.png
23:06:58FromDiscord<Rebel> 🤦‍♂️
23:07:24FromDiscord<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:05FromDiscord<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:47FromDiscord<dom96> hehe, glad it's working for you 🙂
23:09:12FromDiscord<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:20FromDiscord<Rebel> Uvloop to Nim when 😄
23:10:50FromDiscord<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:51FromDiscord<dom96> we don't rely on dependencies around these parts 😄
23:11:23FromDiscord<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)