<< 16-05-2022 >>

00:01:06FromDiscord<Zectbumo> is there something like the javascript `??`
00:01:36FromDiscord<Elegantbeef> wrapnils?
00:02:14FromDiscord<Yardanico> https://github.com/status-im/questionable
00:02:21FromDiscord<Yardanico> "Use the |? operator to supply a fallback value when the Option does not hold a value:"
00:02:34FromDiscord<Yardanico> but there are others as well
00:05:18FromDiscord<huantian> ooh that's a nice wrapper
00:07:04FromDiscord<Yardanico> https://github.com/arnetheduck/nim-result is even nicer, covers more usecases, but it's not compatible with options
00:07:23FromDiscord<Yardanico> I mean you can easily write code that converts std/options to Opt, but still
00:12:03FromDiscord<Zectbumo> okay, I think I need a debugger now. how do I step through nim code?
00:13:31FromDiscord<Elegantbeef> C debuggers work when you compile with `--debugger:native`
00:15:03FromDiscord<Zectbumo> there should be an entire debug section in the docs page (I know, I know, PR request šŸ™‚ I'm going to have to start making a list of all these PRs I need to make šŸ˜‰
00:16:08*krux02 quit (Remote host closed the connection)
00:19:53*noeontheend quit (Ping timeout: 260 seconds)
00:33:34FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3XSy
00:34:01FromDiscord<Elegantbeef> Lol pmunch really needs to make a better example
00:34:40FromDiscord<Elegantbeef> you need to have a `path` or `syspath` that has a `cstdio.h`
00:36:20FromDiscord<!Patitotective> what clang version should i use? 9, 9.0.1, 10, 10.0.0, 11, 11.1.0, 13, 13.0.1, 14 or 14.0.0 lol
00:36:55FromDiscord<Elegantbeef> Whichever you have
00:37:02FromDiscord<!Patitotective> all of those
00:40:12FromDiscord<Elegantbeef> It's only for parsing so just use whatever
00:40:16FromDiscord<!Patitotective> anyways, it seems like clang does not have cstdio, instead `gcc-4.8.5/libstdc++-v2` does
00:48:25*ltriant quit (Ping timeout: 248 seconds)
00:51:10*ltriant joined #nim
00:58:51*ltriant_ joined #nim
00:59:33*ltriant quit (Ping timeout: 260 seconds)
01:00:26*vicfred quit (Quit: Leaving)
01:06:34*dithpri quit (Ping timeout: 240 seconds)
01:09:33*dithpri joined #nim
01:14:45FromDiscord<!Patitotective> sent a code paste, see https://paste.rs/l8W
01:15:17FromDiscord<!Patitotective> what was https://github.com/define-private-public/stb_image-Nim wrapped with?
01:15:33FromDiscord<Elegantbeef> Are you using it on C++?
01:16:32FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3XSH
01:18:35FromDiscord<Elegantbeef> isnt stdc a C++ wrapped C file?
01:18:36FromDiscord<Elegantbeef> Yea it's a C++ file
01:19:43FromDiscord<!Patitotective> soooo i shold compile to cpp? right
01:19:48FromDiscord<Elegantbeef> > A free C++11 file dialog library.
01:19:54FromDiscord<Elegantbeef> You cannot use futhark on C++
01:20:03FromDiscord<Elegantbeef> Just reimplement the code in Nim
01:20:22FromDiscord<!Patitotective> reimpl-who?
01:20:26FromDiscord<!Patitotective> whats that
01:20:38FromDiscord<Elegantbeef> Take the code and rewrite it in Nim
01:21:11FromDiscord<Elegantbeef> Or try c2nim
01:23:04FromDiscord<Elegantbeef> It's a C++ source library not a C++ library so it's going to be a pain to use
01:23:45FromDiscord<!Patitotective> In reply to @Elegantbeef "It's a C++ source": :[
01:26:24FromDiscord<!Patitotective> dang `/home/cristobal/minidev/nim-portable-file-dialogs/portable-file-dialogs.h(1513, 13) Error: invalid token $ (\36)`
01:26:41FromDiscord<!Patitotective> will i have to rewrite 1745 lines? :[
01:28:53FromDiscord<!Patitotective> theres also this thing https://sourceforge.net/p/tinyfiledialogs/code/ci/master/tree/tinyfiledialogs.c
01:30:39FromDiscord<Elegantbeef> What was the issue with the Nim official ones
01:30:48*noeontheend joined #nim
01:38:32*wallabra_ joined #nim
01:39:27*wallabra quit (Ping timeout: 252 seconds)
01:39:38*wallabra_ is now known as wallabra
01:45:34*dithpri quit (Ping timeout: 240 seconds)
01:56:19FromDiscord<yoyojambo> besides using a while loop, is there a way to have more control over the variable in a for loop that counts up?
01:56:34*dithpri joined #nim
01:56:56FromDiscord<yoyojambo> I am trying to skip several iterations at once by increasing the variable
01:57:34FromDiscord<yoyojambo> or should I just add a condition at the top with a `continue`?
01:58:26FromDiscord<Elegantbeef> You can make your own iterator
02:00:19FromDiscord<yoyojambo> hmmm I think that would complicate it a lot
02:01:11FromDiscord<yoyojambo> I kind of want the logic that increases the variable inside the for loop not as part of it
02:01:35FromDiscord<yoyojambo> but its fine ill just use `continue`
02:13:48*rockcavera joined #nim
02:13:49*rockcavera quit (Changing host)
02:13:49*rockcavera joined #nim
02:23:03FromDiscord<root> is there anywhere i can post a problem im having?
02:23:10FromDiscord<Elegantbeef> Here
02:23:16FromDiscord<root> ok
02:24:27FromDiscord<root> so im using this code https://github.com/elddy/Nim-Reverse-Shell and im a noob so i dont understand how to use it to send and receive commands between the server and the client, any help would be appreciated.
02:25:25FromDiscord<Elegantbeef> `socket.send` and `socket.recv` is how
02:26:53FromDiscord<Elegantbeef> Do you have a more descrpitive explanation of the problem?
02:28:55FromDiscord<root> Yes how would I format that if I wanted to send and receive messages typed in by the user?
02:29:10FromDiscord<root> And thank you so much for the help btw
02:29:24FromDiscord<Elegantbeef> What do you mean?
02:31:15FromDiscord<root> Thatā€™s ok I will try to give the rest out by myself, thank you tho!
02:31:47FromDiscord<Elegantbeef> Jeez people thank a lot for so little reason šŸ˜„
02:32:25FromDiscord<root> Sorry I just appreciate your time šŸ™‚
02:40:51*noeontheend quit (Ping timeout: 256 seconds)
03:12:52*arkurious quit (Quit: Leaving)
03:16:34FromDiscord<root> what does "spawn" do ?
03:21:56*noeontheend joined #nim
03:25:23FromDiscord<Elegantbeef> spools up a thread with the right hand of the `spawn` statement
03:25:38FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual_experimental.html#parallel-amp-spawn
03:26:34FromDiscord<root> i still dont understand how to use this code šŸ˜¦
03:26:44FromDiscord<root> https://github.com/elddy/Nim-Reverse-Shell
03:28:32FromDiscord<root> i wanna use this to send commands from the server to the client
03:28:42FromDiscord<root> i cant figure it out tho šŸ˜¦
03:28:52FromDiscord<root> (edit) "šŸ˜¦" => "šŸ˜­"
03:30:02*Guest13 joined #nim
03:32:11*Guest13 left #nim (#nim)
03:41:08*noeontheend quit (Ping timeout: 260 seconds)
03:43:10*rockcavera quit (Remote host closed the connection)
04:19:54FromDiscord<Zectbumo> @root it looks pretty simple from the looks of the code. where are you stuck?
04:25:51FromDiscord<root> I donā€™t know how to use the recvMsg() and sendMsg() things
04:26:01*duuude quit (Ping timeout: 248 seconds)
04:26:28FromDiscord<root> In reply to @Zectbumo "<@817060943803973632> it looks pretty": I donā€™t know how to use the recvMsg() and sendMsg() things
04:28:29FromDiscord<Zectbumo> don't you just run the server and client?
04:32:00FromDiscord<root> Yea but idk how to send and receive data between them šŸ˜¦
04:32:11FromDiscord<root> Sry Iā€™m coming from python so I kinda dumb
04:32:11FromDiscord<Zectbumo> you just type
04:32:22FromDiscord<Zectbumo> me too šŸ˜„
04:33:03FromDiscord<root> So whenever u type and press enter into the server it send the info to client.py?
04:33:09FromDiscord<root> .nim
04:34:13FromDiscord<Zectbumo> so reading the program it looks like: run Client on your windows machine, ssh tunnel 4444, then run Server on the other machine, and start typing on "other machine"
04:34:45FromDiscord<Zectbumo> and of course open up TCP 4444 on the firewall on the Server side
04:34:59FromDiscord<root> Where does the client receive and use the data sent from server?
04:36:11FromDiscord<Zectbumo> in recvMsg it has a recvLine() and then writeLine(cmds)
04:36:19FromDiscord<root> Omg thank you
04:36:33FromDiscord<root> ā¤ļø
04:39:08FromDiscord<Zectbumo> oh in my instructions I did it backwards. run the server first, then tunnel, then client šŸ˜›
04:39:30FromDiscord<root> Thank you!
04:40:23FromDiscord<root> How do I have nim execute system commands?
04:40:40FromDiscord<Zectbumo> oh and since you are tunneling there is no need to open port on 4444 either
04:40:56FromDiscord<root> Thatā€™s ok I already knew that I just appreciate the help
04:41:06FromDiscord<Zectbumo> it already is executing for you via cmd.exe
04:41:33FromDiscord<root> Wait so whatever I type into server is being sent and executed in the client?
04:41:41FromDiscord<Zectbumo> yes
04:41:46FromDiscord<root> Ohhhh
04:41:50FromDiscord<root> I didnā€™t know thattt
04:41:54FromDiscord<root> Iā€™m dumb lol
04:41:56FromDiscord<root> Thank you
04:41:59FromDiscord<Zectbumo> type dir and you should see a listing pop up
04:42:15FromDiscord<root> I donā€™t šŸ˜¦
04:42:53FromDiscord<Zectbumo> do you see "Got connection from:" on the server side?
04:42:59FromDiscord<root> Yes
04:43:36FromDiscord<root> Yea I just typed mkdir hi and no new directory was formed
04:43:39FromDiscord<Zectbumo> do you see the command you typed pop up on the client side?
04:43:49FromDiscord<root> No
04:43:56FromDiscord<Zectbumo> okay so message didn't make it through
04:44:20FromDiscord<Zectbumo> it actually echos before executing
04:44:34FromDiscord<root> Ok let me try something
04:48:04FromDiscord<Zectbumo> it looks like this program burns cycles waiting for the process to exit while in use. it may chew cpu just sitting there doing nothing
04:48:17FromDiscord<root> Oh ok
04:48:42FromDiscord<root> Exponentially? Or will it just always take up some cpu space
04:48:47FromDiscord<Zectbumo> do you have cmd.exe on the client side?
04:49:01FromDiscord<root> Yes
04:49:08FromDiscord<Zectbumo> just some. it has a dedicated thread just cycling, no wait, just checking a flag
04:49:47*slowButPresent quit (Quit: ERC 5.4 (IRC client for GNU Emacs 28.1))
04:50:35FromDiscord<Zectbumo> probably checking the process thousands of times per second šŸ˜„
04:51:19FromDiscord<Zectbumo> anyway, just a side note. it's a basic program. and you have bigger issues
04:53:43FromDiscord<Zectbumo> okay, my guess is you do not have cmd.exe and the process gets closed and then the socket gets closed and the recvMsg returns and sendMsg is hanging because it's trying to read 1 char so since that's not moving the process gets stuck
04:54:05FromDiscord<Zectbumo> though, if you did type a command I would guess that the Client would exit
04:54:11FromDiscord<Zectbumo> possibly with error
04:54:52FromDiscord<Zectbumo> oh no, error. there is an except: return šŸ˜®
05:04:09FromDiscord<root> how do i compile a nim project to run on windows šŸ˜¦
05:04:43FromDiscord<Zectbumo> šŸ˜„ I tried this today and gave up with I saw it needed minGW
05:05:00FromDiscord<root> okok
05:06:06FromDiscord<Zectbumo> https://nim-lang.org/install_windows.htmlā†µcheck out compiler dependencies
05:06:47FromDiscord<Zectbumo> actually, I'll do it with you. I stopped prematurely
05:06:58FromDiscord<huantian> I would use choosenim myselfā†µ<https://github.com/dom96/choosenim#choosenim>ā†µthough I haven't tried either method on windows
05:07:02FromDiscord<huantian> because windows is for the weak
05:08:06FromDiscord<root> what does nim compile to by default? assembly?
05:08:20FromDiscord<Zectbumo> complies to C code
05:08:31FromDiscord<root> wouldnt that have a .c extention
05:08:41FromDiscord<Zectbumo> yes, somewhere you can find that
05:08:45FromDiscord<root> my output file has no extention
05:08:52FromDiscord<huantian> nim -> c -> binary
05:08:57FromDiscord<Zectbumo> that compiled to machine code
05:09:03FromDiscord<root> ok
05:09:24FromDiscord<root> can binary run on windows?
05:09:39FromDiscord<huantian> only if you compile it for windows
05:09:40FromDiscord<huantian> and not linux
05:09:42FromDiscord<Zectbumo> only if you build on windows, or crossbuild for windows
05:09:53FromDiscord<huantian> ^
05:09:56FromDiscord<root> how do u cross build for windows
05:10:01FromDiscord<Zectbumo> let's not go there
05:10:08FromDiscord<Zectbumo> just get nim working on windows
05:10:08FromDiscord<root> my pc is on linux but i want it to work on windows
05:10:15FromDiscord<huantian> <https://nim-lang.org/docs/nimc.html#crossminuscompilation-for-windows>
05:10:36FromDiscord<root> In reply to @Zectbumo "let's not go there": is it not worth it? should I just get my win 10 vm to use nim
05:11:16FromDiscord<Zectbumo> you would get cool points from me if you crossbuild, but that's just more steps
05:11:34FromDiscord<root> ok
05:11:40FromDiscord<root> well i do want cool points
05:11:44FromDiscord<Zectbumo> šŸ˜„
05:11:53FromDiscord<huantian> then read the docs šŸ˜›
05:11:54FromDiscord<root> In reply to @huantian "<https://nim-lang.org/docs/nimc.html#crossminuscomp": i did this now what
05:11:59FromDiscord<root> In reply to @huantian "then read the docs": i willll
05:12:18FromDiscord<huantian> you installed mingw, then did `nim c -d:mingw file.nim`?
05:12:28FromDiscord<root> its just hard moving from a lang with to much documentation (python) to nim with like none
05:12:28FromDiscord<huantian> you should have a file called `file.exe` and you can run that on windows
05:12:42FromDiscord<root> In reply to @huantian "you installed mingw, then": thx!
05:12:54FromDiscord<Elegantbeef> Or wine šŸ˜„
05:13:12FromDiscord<Elegantbeef> if you have wine you can actually do `nim c -d:mingw -r ...`
05:13:45FromDiscord<root> In reply to @Elegantbeef "if you have wine": i did this it worked šŸ™‚
05:13:48FromDiscord<root> thank u all
05:16:22FromDiscord<Zectbumo> there's your cool point
05:25:37FromDiscord<Zectbumo> so I'm running chrome 101 on windows and I can't download the nim package from the website. chrome makes me delete the zip after download completion
05:26:03FromDiscord<Elegantbeef> Yep many antivirus programs flag it as a virus
05:26:59FromDiscord<Prestige> The browser makes you delete the file? Weird
05:27:18FromDiscord<Elegantbeef> Yep they can detect what they consider malware and remove it
05:27:20FromDiscord<Zectbumo> https://media.discordapp.net/attachments/371759389889003532/975630507914190879/unknown.png
05:27:35FromDiscord<Prestige> Can't you override that somehow?
05:27:47FromDiscord<Zectbumo> yeah, I can go into settings and disable standard protection
05:28:11FromDiscord<Zectbumo> just, not ideal for the non developers using nim
05:28:49FromDiscord<Zectbumo> (edit) "non developers" => "standard user"
05:29:33FromDiscord<huantian> You can also go to downloads
05:29:37FromDiscord<huantian> And then thereā€™s a button
05:29:43FromDiscord<huantian> Like download anyways
05:30:52FromDiscord<Zectbumo> so I disabled it in chrome and now Windows: https://media.discordapp.net/attachments/371759389889003532/975631400172662804/unknown.png
05:31:02FromDiscord<Zectbumo> guys, Nim is going viral!
05:31:24FromDiscord<Elegantbeef> Yea it's well established for a year or so that Nim triggers AV
05:31:26FromDiscord<Elegantbeef> It's a shame but it's what it is
05:32:15FromDiscord<Zectbumo> has anyone talked to Microsoft about this?
05:32:31FromDiscord<Zectbumo> and Google
05:33:30FromDiscord<Elegantbeef> https://forum.nim-lang.org/t/7885
05:33:43FromDiscord<Yardanico> <https://github.com/nim-lang/Nim/issues/17820>
05:33:56FromDiscord<Yardanico> Potentially https://github.com/nim-lang/Nim/pull/19767 can help with that
05:34:26FromDiscord<Yardanico> since last time I checked, the most detected binary from the 1.6.6 archive was nimgrab.exe with (i don't remember exactly) 15-18 detections, others only had 2-3 detections at max
05:35:16FromDiscord<Zectbumo> what? hmm, it actually looked like it caught a virus. maybe someone put a back door in? it flashed the name of the worm but then it oddly disappeared before I could quarantine it
05:35:24FromDiscord<Yardanico> no it's not a virus
05:35:26FromDiscord<Yardanico> it's a false positive
05:35:42FromDiscord<Zectbumo> I see
05:36:03FromDiscord<Yardanico> nimgrab is probably detected because it uses the (kind of) deprecated windows UrlMon API for downloading stuff, and it seems that AVs really don't like that
05:37:11FromDiscord<Zectbumo> the odd part is that it flagged as a threat but then reverses on its own without me doing anything and then says 0 threats
05:37:35FromDiscord<Yardanico> In reply to @Zectbumo "the odd part is": did you think it would let you actually decide what you want to happen on "your" device? hahaha
05:37:41FromDiscord<Yardanico> good joke :)
05:38:03FromDiscord<Zectbumo> aw well, at least I know the bitcoin miner running on my machine now is going to a good cause šŸ˜‰
05:38:08FromDiscord<Yardanico> but in all seriousness, most windows users aren't tech savvy at all, so that's why defender behaves like that
05:39:18FromDiscord<undel> In reply to @Yardanico "but in all seriousness,": i've seen people (gamers in particular) download obvious malware because it promised to optimize gaming performance
05:39:36FromDiscord<undel> instead they got a cryptominer and a chrome extension that injected ads into every page
05:41:24FromDiscord<Zectbumo> so my guess is that the AV did a quick check raised a false positive and then once it did a full check it found it was okay
05:41:47*gshumway quit (*.net *.split)
05:41:48*via_ quit (*.net *.split)
05:41:48*Stink quit (*.net *.split)
05:41:48*robertmeta quit (*.net *.split)
05:41:48*oz quit (*.net *.split)
05:41:48*notchris quit (*.net *.split)
05:41:53FromDiscord<Yardanico> no? it just removed the binary
05:41:55*via_ joined #nim
05:42:00*notchris joined #nim
05:42:03*Stink joined #nim
05:42:19FromDiscord<Yardanico> if you unpacked the archive, check the binaries, you'll probably be missing a few that the defender removed
05:42:30FromDiscord<Zectbumo> maybe so. hopefully I didn't need it
05:42:33*gshumway joined #nim
05:42:35*Stink is now known as Guest7620
05:42:41*ox joined #nim
05:42:46*robertmeta joined #nim
05:42:46*robertmeta quit (Changing host)
05:42:46*robertmeta joined #nim
05:43:35FromDiscord<Zectbumo> arg and it deleted my zip
05:44:23FromDiscord<Zectbumo> this is abuse
05:45:45FromDiscord<Zectbumo> okay, install complete. I even added to start menu. whatever that means
05:47:00FromDiscord<Zectbumo> oh I get a custom cmd prompt now šŸ‘‘ https://media.discordapp.net/attachments/371759389889003532/975635459453620244/unknown.png
05:56:42FromDiscord<Zectbumo> okay I got caught up with the details https://github.com/nim-lang/Nim/issues/17820
06:03:38FromDiscord<Prestige> In reply to @Zectbumo "this is abuse": That's why I don't use Windows
06:04:41FromDiscord<Zectbumo> I can't even remember why I wanted nim on windows now. this process took me for a spin
06:08:05FromDiscord<Zectbumo> That's why I run four operating systems šŸ˜„
06:49:37*ltriant joined #nim
06:50:44*ltriant_ quit (Ping timeout: 248 seconds)
06:55:12*PMunch joined #nim
07:09:25FromDiscord<Zectbumo> sent a code paste, see https://paste.rs/5wh
07:10:18FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XTl
07:13:08FromDiscord<Elegantbeef> `user.email` of course
07:13:22FromDiscord<Elegantbeef> I sometime write fantastic things šŸ˜„
07:13:53FromDiscord<Zectbumo> there's nothing standard? it's a basic need in nim
07:14:11FromDiscord<Elegantbeef> In nim the only truthy value is `true`
07:14:17FromDiscord<Elegantbeef> if you want other truthy values you use converters
07:14:58FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/Bb7
07:15:03FromDiscord<Zectbumo> I would like a standard converter that checks for nonDefault
07:15:06FromDiscord<Yardanico> In reply to @Zectbumo "there's nothing standard? it's": i think checking if a string is not empty is simple enough :)
07:15:28FromDiscord<Elegantbeef> `myVal != default(typeof(myVal))`
07:15:29FromDiscord<Zectbumo> sure is, and is going to happen everywhere
07:15:32FromDiscord<Yardanico> In reply to @Zectbumo "I would like a": after all, nim is not python despite all the marketing people are trying to do
07:15:52FromDiscord<Elegantbeef> Nim is a statically typed language and all values implicitly turning into bools is bad design
07:15:54FromDiscord<Yardanico> and converters are kind of a bad practice except some specific cases
07:15:55FromDiscord<Zectbumo> no nim is better, or should be at least
07:16:26FromDiscord<Yardanico> nim only has implicit type conversion when it makes sense
07:16:33FromDiscord<Yardanico> without surprising behaviour
07:16:59FromDiscord<Yardanico> first you want `if string` to work, and then by accident you pass a string to a proc that accepts bool
07:17:00PMunchZectbumo, strings in Nim can't be nil like in many other languages. So the default value of a string is an empty string. You can check if a string is empty like you did above or with `user.email.len == 0`. Nim is also very strict about types, so checking if a string is true or false doesn't work.
07:17:12FromDiscord<Zectbumo> I like explicitly turning into bools. like @ElegantBeef default() check is cool. just needs to be standard, imo
07:17:47FromDiscord<Elegantbeef> I mean it's one line of code
07:18:08FromDiscord<Yardanico> In reply to @Zectbumo "I like explicitly turning": default as standard would only really work for simple builtin types
07:18:25FromDiscord<Yardanico> because user-defined types usually use constructor-like procs for initialization
07:18:53PMunchIn your case `if user.email`, let's rename the field to `user.hasAddress` and let's assume this comes from a HTTP form or something. Now this field is sent as "true" or "false" as strings. Now the check `if user.hasAddress` logically looks like it would check if the user has an address, but in fact it checks if the user `hasAddress` field isn't set properly.
07:18:56FromDiscord<Zectbumo> that's all I'm asking is the simple types. anyone else can make their own if needed for custom
07:19:18FromDiscord<Yardanico> and yeah, I don't see the need for these types of conversions in code i write usually :)
07:19:42FromDiscord<Yardanico> and i also started using nim after using python back in 2017
07:20:13PMunchAnd default is already built-in, so not sure what you want to be standard about that
07:20:28FromDiscord<Elegantbeef> They want a `isDefault` or similar
07:21:01FromDiscord<Zectbumo> sent a code paste, see https://play.nim-lang.org/#ix=3XTn
07:21:02FromDiscord<Yardanico> has?
07:21:09FromDiscord<Elegantbeef> You can do that
07:21:10FromDiscord<Zectbumo> (edit) "https://play.nim-lang.org/#ix=3XTn" => "https://play.nim-lang.org/#ix=3XTo"
07:21:20FromDiscord<Yardanico> but again, this is not much different in length than `if user.email != ""`
07:21:29PMunchAah, something like `template isDefault(x: untyped): bool = x == default(typeof(x))`?
07:21:47FromDiscord<Zectbumo> In reply to @Yardanico "but again, this is": I'm going for elegance not char count
07:22:05FromDiscord<Yardanico> how is this not elegant šŸ¤”
07:22:12FromDiscord<Yardanico> its a basic piece of code that's going to be the same in most languages
07:22:25FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/1BZ
07:22:27FromDiscord<Zectbumo> In reply to @Elegantbeef "You can do that": yes, but I would like to see this standard where it's the nim norm.
07:22:35FromDiscord<Elegantbeef> "standard"
07:22:39FromDiscord<Elegantbeef> It's one frigging proc šŸ˜„
07:22:46PMunch`template has(obj, field: untyped): bool = compiles(obj.field) and obj.field != default(typeof(obj.field))`
07:22:50FromDiscord<Yardanico> anyway, maybe you like it, but I like my "old-school" nim way
07:23:00PMunchNow you can if `if user.has email` :P
07:23:13FromDiscord<Elegantbeef> Pmunch really going off the deepend šŸ˜„
07:23:29FromDiscord<Zectbumo> In reply to @Elegantbeef "It's one frigging proc": I'll use that proc, but too bad I won't see anyone else using it because everyone will be stuck in != "" land
07:23:39FromDiscord<Elegantbeef> Well it's more expressive
07:23:55FromDiscord<Elegantbeef> `has` sounds like `compiles(myType.field)`
07:23:55PMunchI typically use .len == 0 for what it's worth
07:24:52FromDiscord<Yardanico> In reply to @Zectbumo "I'll use that proc,": if you want everyone to use the same idioms and code style, Nim is really, really not for you :)
07:24:58FromDiscord<Yardanico> look into things like Go that force one way to write code
07:25:18FromDiscord<Yardanico> nim has multiple ways to do the same thing, and people prefer different ones
07:25:28PMunchKeep in mind as well that `default(int)` is 0. So `if has user.age` would run if the user was a newborn
07:26:13FromDiscord<Zectbumo> there's no forcing everyone to use `has` it would be nice to have an elegant way built in already so not everyone comes up with their own or worse nothing at all
07:26:46PMunchIMO those auto-bool and default checks is more useful when you have nilable types that can't readily mix with the rest of the behaviour of your type
07:27:15FromDiscord<Zectbumo> In reply to @PMunch "IMO those auto-bool and": that's another area. I would like the ?? like in javascript
07:27:17PMunchNim luckily doesn't have those, if you have a string you can always call string-based procs on it, no silly nil checks
07:27:43FromDiscord<Zectbumo> sent a code paste, see https://play.nim-lang.org/#ix=
07:28:05FromDiscord<Yardanico> https://nim-lang.org/docs/wrapnils.html
07:28:16PMunchZectbumo, you don't really need that in Nim. But optionsutils has something similar for options: https://github.com/PMunch/nim-optionsutils
07:28:34FromDiscord<Yardanico> although it is a bit different, optionsutils is better
07:28:49FromDiscord<Yardanico> also there's https://github.com/status-im/questionable from status
07:29:16FromDiscord<Yardanico> @Zectbumo just make your own version of stdlib as some people do :P
07:29:35FromDiscord<Yardanico> if they don't agree with the way nim stdlib is structured or how it handles things
07:30:08FromDiscord<Zectbumo> In reply to @Yardanico "<@157415492812800000> just make your": it does seem that's the way
07:30:39FromDiscord<Yardanico> but really, i think your ideas are all a bit too pythony, e.g. the one about typeless arguments
07:30:45FromDiscord<Zectbumo> I went through optionutils earlier when I ran into it in the cookies module
07:30:59FromDiscord<Yardanico> if you use nim for some time you'll stop trying to make it look like python :)
07:31:21FromDiscord<Zectbumo> sure, and I really like that it's so flexible that I can get what I want
07:31:52*krux02 joined #nim
07:32:06FromDiscord<Yardanico> yes i didn't say you can't, that's why a lot of people use nim
07:32:13FromDiscord<Yardanico> even if they disagree with the stdlib or other stuff
07:32:28*krux02 quit (Remote host closed the connection)
07:32:33FromDiscord<Yardanico> but the majority still prefers to try to do it with existing nim means instead of doing something completely new
07:33:01FromDiscord<Zectbumo> wrapnils looks interesting. a bit backward for my taste but works.
07:36:10FromDiscord<Zectbumo> btw, not looking to make nim into python, just using python as a bar that I'd like to see nim meet or exceed
07:36:24FromDiscord<Zectbumo> javascript too
07:39:05*gsalazar joined #nim
07:56:43FromDiscord<Zectbumo> sent a code paste, see https://play.nim-lang.org/#ix=3XTx
08:00:23FromDiscord<Zectbumo> sent a code paste, see https://paste.rs/KI3
08:19:20FromDiscord<sheerluck> what is `has` here?
08:20:13FromDiscord<Elegantbeef> A very obscure procedure name
08:20:21FromDiscord<Rika> sent a code paste, see https://paste.rs/cn9
08:20:47FromDiscord<Rika> It is elegant, but it is not self explanatory nor glance-understandable
08:21:13FromDiscord<sheerluck> In reply to @Elegantbeef "A very obscure procedure": so `I can has cheezburger?` is valid Nim, right?
08:21:15FromDiscord<Rika> ā€œElegantā€ for whatever that word means really
08:21:24FromDiscord<Rika> In reply to @sheerluck "so `I can has": Postfix ? šŸ™‚
08:21:31FromDiscord<Rika> No postfix here other than
08:21:40FromDiscord<Elegantbeef> and `[]`
08:21:44FromDiscord<Rika> True
08:32:46*ltriant_ joined #nim
08:33:50*ltriant quit (Ping timeout: 240 seconds)
08:50:36*dithpri quit (Remote host closed the connection)
09:12:48FromDiscord<Phil> In reply to @Zectbumo "see, great example of": My friend, compile-time checks are heaven. It is very lovely to prevent yourself from being dumb at compile time
09:13:14FromDiscord<Phil> I wish python could prevent me more from being dumb
09:13:26FromDiscord<Phil> (edit) "dumb" => "dumb. Sadly it doesn't, it trusts me! What a foolish notion"
09:16:12FromDiscord<Phil> Also, Spy X Family has ruined me. I hear "elegant", I immediately have anime-memes in my head of an old bearded dude in a tailcoat and a cane shouting about how X is elegant or not
09:16:27FromDiscord<Elegantbeef> No comment
09:22:59*dmichiels joined #nim
09:38:48*Zectbumo quit (Remote host closed the connection)
10:16:15NimEventerNew thread by Rbohl64: Memory Leak with --gc:orc and Nimble Decimal Library, see https://forum.nim-lang.org/t/9159
10:24:49FromDiscord<Yardanico> In reply to @NimEventer "New thread by Rbohl64:": time to check with useMalloc instead of weird rusages :)
10:28:48FromDiscord<Yardanico> yeah it is true "definitely lost: 19,248 bytes in 401 blocks"
10:47:07FromDiscord<uncle jim> gib me some beginner projects pls
10:47:22FromDiscord<uncle jim> i am really demotivated rn
10:47:30FromDiscord<uncle jim> i dont know what to do
10:48:01FromDiscord<uncle jim> https://tenor.com/view/tembel-%C3%BC%C5%9Fenge%C3%A7-lazy-gif-19911238
10:48:35FromDiscord<uncle jim> @ElegantBeef i need you
10:52:25FromDiscord<Rika> What are you interested in
10:53:15FromDiscord<uncle jim> In reply to @Rika "What are you interested": some terminal based apps?
10:53:18FromDiscord<uncle jim> i guess
10:53:23FromDiscord<Rika> Then make one?
10:53:36FromDiscord<uncle jim> i dont kno how to make one
10:53:38FromDiscord<uncle jim> i mean
10:53:41FromDiscord<Rika> Then learn how to?
10:53:43FromDiscord<uncle jim> just look at sudoku
10:53:49FromDiscord<uncle jim> solver
10:54:04FromDiscord<xflywind> You can read https://xmonader.github.io/nimdays
10:54:26FromDiscord<uncle jim> In reply to @flywind "You can read https://xmonader.github.io/nimdays": the is gold
10:54:31FromDiscord<uncle jim> thenks
10:54:41FromDiscord<Yardanico> zalso check https://narimiran.github.io/nim-basics/ and other nim tutorial stuff
10:54:43FromDiscord<uncle jim> thenks wery much
10:54:49FromDiscord<uncle jim> In reply to @Yardanico "zalso check https://narimiran.github.io/nim-basics/": i red that
10:55:24FromDiscord<xflywind> Or you can help simple stuffs regarding Nim 2.0 or implement libraries in https://github.com/nim-lang/needed-libraries/issues
10:55:51FromDiscord<uncle jim> thas too much for me lel
10:57:31FromDiscord<xflywind> Well, there is a hard fork called Nimskull, you can port some good changes to Nim.
10:57:43FromDiscord<Yardanico> lol
11:05:53FromDiscord<xflywind> @Yardanico Hi, what did you think I need to check for https://github.com/nim-lang/Nim/pull/19767#issuecomment-1119528144?
11:06:00FromDiscord<xflywind> (edit) "did" => "do"
11:06:29FromDiscord<Yardanico> yeah it's better to be safe, although I think that it should work totally fine
11:06:45FromDiscord<Yardanico> and hopefully it makes nim much less detectable by AVs
11:09:07FromDiscord<xflywind> I agree. I'm testing it using `koch temp c -r tools/finish.nim`.
11:09:19FromDiscord<Yardanico> well, araq said to test it from finish.exe
11:09:26FromDiscord<Yardanico> so you run finish.exe and it downloads mingw with nimgrab
11:16:37FromDiscord<xflywind> lol, I use `curl` on windows.
11:25:22FromDiscord<retkid> I've switched over to nlvm
11:27:57FromDiscord<Yardanico> In reply to @retkid "I've switched over to": okay, enjoy life with no arc :P
11:28:11FromDiscord<retkid> FUCK
11:28:13FromDiscord<Yardanico> i mean nlvm is nice, but I don't think it's worth using it for general purpose Nim at this point
11:28:33FromDiscord<retkid> so basically im gonna use it until i do something cursed and need arc
11:28:37FromDiscord<retkid> then be like fuck
11:28:38FromDiscord<retkid> and replace it
11:28:39FromDiscord<Rika> Itā€™s worth using to encourage itā€™s development heh
11:28:43FromDiscord<Yardanico> In reply to @retkid "FUCK": it's also still nim 1.2.x branch
11:28:55FromDiscord<retkid> is nim 2.0 out?
11:28:58FromDiscord<Yardanico> no
11:29:01FromDiscord<Yardanico> but nim 1.4 and 1.6 are out
11:29:03FromDiscord<retkid> eh then who cars
11:29:04FromDiscord<retkid> (edit) "cars" => "cares"
11:29:05FromDiscord<retkid> well
11:29:07FromDiscord<retkid> 1.6 is cool
11:29:08FromDiscord<retkid> hmmm
11:29:32FromDiscord<Yardanico> any specific reason you want nlvm?
11:29:38FromDiscord<retkid> webasm
11:29:41FromDiscord<Yardanico> for wasm32 you can just use nim's c backend with wasi sdk/emscripten
11:29:44FromDiscord<Yardanico> and it works really well
11:29:51FromDiscord<Yardanico> in fact it'll probably work better than with nlvm
11:29:56FromDiscord<retkid> In reply to @Yardanico "for wasm32 you can": that was too much of a pain in the ass last time i tried
11:29:58FromDiscord<Yardanico> it's really easy
11:29:59FromDiscord<retkid> but maybe i was sleepy
11:30:07FromDiscord<retkid> im only slightly sleepy
11:30:49FromDiscord<Yardanico> https://github.com/Yardanico/wasm4nim/blob/master/examples/config.nims some of the flags for wasm (you'll need most of them even with nlvm), the only thing is that passL with all the stack size etc will probably not be needed
11:30:52FromDiscord<Yardanico> this was made for wasm4
11:30:58FromDiscord<Yardanico> the fantasy game console
11:35:28FromDiscord<retkid> In reply to @Yardanico "https://github.com/Yardanico/wasm4nim/blob/master/e": https://github.com/stisa/nwasm
11:35:33FromDiscord<retkid> i was looking at this
11:35:35FromDiscord<retkid> lmao
11:42:58FromDiscord<xflywind> In reply to @Yardanico "so you run finish.exe": It works
11:43:09FromDiscord<xflywind> => https://github.com/nim-lang/Nim/pull/19767#issuecomment-1127566452
11:45:16FromDiscord<xflywind> I think it should backport to 1.6.x
11:45:37FromDiscord<xflywind> (edit) "backport" => "be backported"
11:45:59FromDiscord<Yardanico> yeah
11:59:54FromDiscord<planetis> sent a code paste, see https://play.nim-lang.org/#ix=3XUo
12:00:04FromDiscord<Andreas> sent a code paste, see https://play.nim-lang.org/#ix=3XUp
12:00:51FromDiscord<enthus1ast> does V() work?
12:00:53FromDiscord<Andreas> (edit) "https://play.nim-lang.org/#ix=3XUp" => "https://play.nim-lang.org/#ix=3XUr"
12:01:41FromDiscord<Yardanico> In reply to @Andreas "Is it possible to": wdym "generic type V"? if it's a generic type you must instantiate it with all types
12:01:41FromDiscord<Andreas> In reply to @enthus1ast "does V() work?": sadly not - V can be anything (int, string, float, object)
12:01:58FromDiscord<Yardanico> types are compile-time in Nim, so you must instantiate the type when you declare a value with it
12:01:59FromDiscord<enthus1ast> i think it does not, but you could try to use a yaml implementation, as far as i know, yaml supports comments and is a superset of jsonā†µ(@planetis)
12:02:37FromDiscord<Yardanico> that's the only way, you can't just declare `var x: V` here
12:02:43FromDiscord<Yardanico> maybe you actually want to use object variants?
12:02:46FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3XUs
12:02:51FromDiscord<Yardanico> or inheritance with runtime dispatch
12:03:02FromDiscord<Yardanico> https://nim-lang.org/docs/manual.html#types-object-variants
12:05:23FromDiscord<Andreas> sent a code paste, see https://play.nim-lang.org/#ix=3XUt
12:06:06FromDiscord<Andreas> (edit) "https://play.nim-lang.org/#ix=3XUt" => "https://play.nim-lang.org/#ix=3XUu"
12:06:28FromDiscord<Yardanico> you can have a object kind with no fields
12:06:33FromDiscord<Yardanico> like mykindNone or something
12:06:40FromDiscord<Andreas> (edit) "https://play.nim-lang.org/#ix=3XUu" => "https://play.nim-lang.org/#ix=3XUv"
12:07:02FromDiscord<Yardanico> In reply to @Andreas "yepp, i actually use": but actually why not std/options ?
12:07:23FromDiscord<Andreas> In reply to @Yardanico "but actually why not": yeah, maybe thats best..
12:10:48FromDiscord<Andreas> sent a code paste, see https://play.nim-lang.org/#ix=3XUw
12:12:04FromDiscord<Andreas> (edit) "https://play.nim-lang.org/#ix=3XUw" => "https://play.nim-lang.org/#ix=3XUx"
12:23:56FromDiscord<planetis> @enthus1ast no it does work actually
12:24:00FromDiscord<Rika> Iā€™m not sure what your V type is supposed to be even after reading the convo
12:25:46FromDiscord<enthus1ast> oh thats great, i know i've tried it some day and it was not working back thenā†µ(@planetis)
12:40:08*slowButPresent joined #nim
12:52:51*ox is now known as oz
13:00:34arkanoidwhat are the best selling point of rust compared to nim, as today?
13:02:03arkanoidI am thinking about moving from nim to rust as I'm having problems with antivirus issue and lack of production-level libs for some stuff I need, but I fear what I will lose
13:02:53FromDiscord<retkid> i would like to access the second
13:02:58FromDiscord<retkid> (edit) "i would like to access the second ... " added "element in the tree"
13:03:02FromDiscord<retkid> of each xml element
13:03:17arkanoidI really like Nim, but wheel is not turning fast enough to bet on it for some larger projects. What I will miss the most?
13:03:28FromDiscord<retkid> - aā†µ/ 1ā†µ/ 2ā†µ3
13:03:44FromDiscord<retkid> (edit) "- aā†µ/ 1ā†µ/ 2ā†µ3" => "sent a long message, see http://ix.io/3XUF"
13:04:09FromDiscord<retkid> 0
13:04:14FromDiscord<retkid> (edit) "0" => "-> "hi""
13:04:19FromDiscord<retkid> (edit) "http://ix.io/3XUF" => "https://paste.rs/n0C"
13:06:34FromDiscord<Rika> In reply to @arkanoid "I really like Nim,": Better generics and macros?
13:06:38FromDiscord<Rika> Syntax?
13:08:09arkanoidrust syntax surely is ugly compared to Nim, and compile time is surely more ergonomic in nim too for same reason
13:08:20*rockcavera joined #nim
13:08:20*rockcavera quit (Changing host)
13:08:20*rockcavera joined #nim
13:09:21FromDiscord<Rika> Yeah I looked at the embedded rust stuff and wow
13:09:30FromDiscord<Rika> ā€œThis is pretty badā€
13:09:44FromDiscord<Rika> Though there are ideas Iā€™d totally copy over
13:12:29FromDiscord<Rika> Bad not in the sense of ā€œunusableā€, just messy
13:12:47FromDiscord<retkid> embedded low level nim is also a bit of a pain though
13:12:51FromDiscord<retkid> due to how libraries do gc
13:13:25FromDiscord<Rika> ARC ORC
13:13:26arkanoidsadly I need "official" reference libraries to rely on, not wrappers with bus factor 1 (not talking about quality here, just safety againts bitrot)
13:13:27FromDiscord<Rika> Easy
13:13:31FromDiscord<planetis> Lack of progress is not something that concerns me too much, in general nim is a stable and elegnat language.
13:13:53FromDiscord<retkid> In reply to @Rika "ARC ORC": doesm
13:13:59FromDiscord<retkid> (edit) "doesm" => "doesn't that cause memory holes"
13:14:02FromDiscord<retkid> if you didn't design for it
13:14:07FromDiscord<Rika> In reply to @retkid "doesn't that cause memory": Youā€™re mistaken?
13:14:18FromDiscord<planetis> not with orc
13:14:26PMunchA wrapper with bus factor 1 isn't too bad IMO, I mean once a library is wrapped it's wrapped, there's not much more to do
13:14:34FromDiscord<Rika> Not with ARC if you know you donā€™t cycle
13:14:40PMunchOf course if you use Futhark you don't have to depend on wrappers at all :)
13:14:43FromDiscord<Rika> In reply to @PMunch "A wrapper with bus": Updates
13:14:52FromDiscord<Rika> In reply to @PMunch "Of course if you": You do if you want an idiomatic one
13:15:06FromDiscord<retkid> In reply to @Rika "Not with ARC if": yes but using the entire stdlib and extra libraries, are you really so sure you aren't gonna memory hole on an embedded system with probably very low amounts of ram
13:15:12FromDiscord<planetis> I think making a real wrapper opposed to bindings takes more time to get right
13:15:18arkanoidPMunch: nope, you need to have proper updates 1:1 with relase schedule
13:15:19FromDiscord<Rika> In reply to @retkid "yes but using the": Do you know what youā€™re saying?
13:15:45PMunchOh for sure, but with Futhark you write your abstractions on top, and the low-level wrapping part is done automatically
13:15:49FromDiscord<Rika> I sure donā€™t know how low ram amount has to do with leaking memory, theyā€™re not exactly related
13:15:59FromDiscord<Rika> You could run out of memory sure
13:16:04FromDiscord<Rika> Fragmentation and all
13:16:05FromDiscord<planetis> that's awesome, I need to try it again
13:16:10PMunchSo apart from major library rewrites you probably won't have to change much, if anything
13:16:15FromDiscord<planetis> In reply to @PMunch "Oh for sure, but": in reply to this
13:16:16FromDiscord<Rika> Thatā€™s the job of the allocator though not really the GC
13:16:32FromDiscord<Rika> Not leaking memory is the job of the GC
13:16:41FromDiscord<Rika> If it does then is it really a GC
13:16:45FromDiscord<retkid> In reply to @Rika "I sure donā€™t know": .... I don't know how you can possibly say that out loud and not instantly see what i meant
13:16:56arkanoidPMunch: as one of the first users of Furhark (really, thanks for that, hooked me for quite a lot of time), I strongly believe in low level automatic wrapping + idiomatic wrapping on top of it, jut yet even if done right it would still be a bus factor 1 idea
13:17:11FromDiscord<Rika> In reply to @retkid ".... I don't know": You meant the opposite way, okay
13:17:13FromDiscord<retkid> where you have a limited headroom and some form of memory defect would be extremely annoying to debug
13:17:21FromDiscord<planetis> I might move naylib to it, that custom C parser of theirs suck
13:18:00FromDiscord<Rika> Now what do you mean by ā€œwith the libraries and all, youā€™ll leak memory with ARCā€
13:18:28FromDiscord<planetis> @PMunch but I need to right everything by hand right? No way to cheat?
13:18:35FromDiscord<retkid> while yes when you have memory to spare its fine for a few problems but when on a long running system running problematic libraries that you may not know problematic until every 1 month and 13 days your embedded system has 2 minutes of downtime
13:18:59FromDiscord<retkid> (edit) "downtime" => "downtime, might be a bit annoying to debug"
13:19:00FromDiscord<Rika> I know what you mean by that
13:19:16FromDiscord<Rika> Iā€™m asking about the connections between library usage and leaking with ARC now
13:19:35FromDiscord<planetis> I mean it wouldn't be much work at this point, I already have most functions already wrapped
13:19:36PMuncharkanoid, that's true, but at least for me when I was done writing a low-level wrapper I was fed up with the project and didn't want to touch the low-level wrapper ever again. With Futhark doing the boring 1:1 translation work I can spend my time creating a beautiful wrapper on top. This is a lot more fun, and takes a lot less time to maintain, which overall will hopefully lead to better-developed wrappers.
13:19:57PMunch@planetis, right everything?
13:19:57FromDiscord<planetis> (edit) removed "already"
13:20:06FromDiscord<Rika> He means write
13:20:11FromDiscord<retkid> I've had a few times where I've switched over to ARC and my applications would use more ram, and I'd have to go back in and actually make sure the code i was running wasn't absolute garbage
13:20:24FromDiscord<planetis> I must dyslexic of something
13:20:25FromDiscord<retkid> but when i did that it was nearly identica l
13:20:26FromDiscord<retkid> (edit) "identica l" => "identical"
13:20:30FromDiscord<planetis> (edit) "of" => "or"
13:20:33PMunchOh :P
13:20:37FromDiscord<Rika> Async is cyclic and you need ORC for that
13:20:43PMunchWell Futhark does the 1:1 conversion from C to Nim
13:20:45FromDiscord<Rika> Otherwise I believe most other libraries arenā€™t
13:20:47FromDiscord<planetis> No i dont think so
13:20:59FromDiscord<retkid> In reply to @Rika "Async is cyclic and": usually happens when i use async on threads
13:21:04PMunchThen the resulting job is to write nice Nim interfaces over the C functions
13:21:10FromDiscord<Rika> And thereā€™s your issue no?
13:21:27FromDiscord<Rika> Also you canā€™t exactly use threads and async in embedded (without effort)
13:21:40FromDiscord<Rika> Since those rely on POSIX things and usually you donā€™t have that on embedded
13:21:43FromDiscord<retkid> pretty sure this has never been a problem for a single threaded application
13:21:51FromDiscord<retkid> like ever
13:21:53PMunchFor example I recently wrote a CoAP wrapper that features destructors and async/await support in Nim. So you don't have to manage memory manually, and you can integrate it with other async systems in Nim :)
13:22:18FromDiscord<retkid> but the only time I've needed to switch over to ARC is when im doing strange memory things on threads
13:22:23PMunchI have an article in the pipe for it that will help to showcase how to work with Futhark
13:22:48FromDiscord<Rika> Well in embedded contexts threads are much different from threads in more usual contexts
13:22:55FromDiscord<Rika> You have less securities and limitations and whatnot
13:23:02FromDiscord<Rika> Sometimes you donā€™t have threading at all xd
13:23:21FromDiscord<retkid> In reply to @Rika "You have less securities": that sounds cooler for the 0.2 seconds before i read the words
13:23:31FromDiscord<retkid> sent a code paste, see https://play.nim-lang.org/#ix=
13:23:45FromDiscord<retkid> then i slumped back in my chair
13:23:57FromDiscord<retkid> (edit)
13:24:07FromDiscord<Rika> I donā€™t know man, Iā€™m not sure what your point was
13:24:20FromDiscord<Rika> ARC doesnā€™t leak unless you have cycles as Iā€™ve said
13:24:21FromDiscord<retkid> Rika are you ever sure what my point was
13:24:58FromDiscord<Rika> Would you like to ask the other people whether they understood your point or not
13:25:01FromDiscord<planetis> Well apart from some C FFI regressions in 1.6 that have been fixed, making sure you don't mess up with pointers somehow is still your responsibility.
13:25:24FromDiscord<Rika> In reply to @planetis "Well apart from some": I believe that will always be your responsibility when wrapping C libraries
13:25:29FromDiscord<retkid> In reply to @Rika "Would you like to": No i think I am always unprepared to talk about these things, bad at articulating these problems, and never wanna share my code
13:25:39FromDiscord<Rika> Okay
13:25:50FromDiscord<Rika> Youā€™ll get better over time with practice
13:26:13FromDiscord<Rika> By the way I hope you donā€™t think Iā€™m mad lol
13:26:26FromDiscord<planetis> well the best tool you have is ASan it helps track down mistakes easily, provided you know what's going on
13:26:47FromDiscord<retkid> In reply to @Rika "Youā€™ll get better over": im going to uni for this shit soon so I hope I somehow get better at articulating low level problems in Nim
13:27:06FromDiscord<Rika> Uni doesnā€™t really help from my experience but ymmv
13:27:22FromDiscord<planetis> In reply to @Rika "Uni doesnā€™t really help": same
13:27:40FromDiscord<retkid> welp
13:27:59FromDiscord<retkid> hopefully this part of my brain just gets bulkier over the next 40 uyears
13:28:03FromDiscord<retkid> (edit) "uyears" => "years or so"
13:28:31FromDiscord<retkid> the "reddit programmer argument" part
13:28:34FromDiscord<Rika> Careful of haemorrhage
13:28:56FromDiscord<retkid> THATS HOW YOU SPELL THAT
13:29:00FromDiscord<retkid> :O
13:29:23FromDiscord<Rika> You can also spell it without the first a
13:30:10FromDiscord<planetis> they teach that stuff very fast, so going prepared would help you a lot.
13:31:47FromDiscord<retkid> In reply to @planetis "they teach that stuff": I'll be fine for a few yearws
13:31:48FromDiscord<retkid> (edit) "yearws" => "years"
13:31:50FromDiscord<retkid> maybe a year
13:32:08FromDiscord<retkid> but there will probably be a very specific point in time
13:32:19FromDiscord<retkid> where i go from knowing everything to go to knowing nothing
13:32:25FromDiscord<retkid> and thats what i gotta be ready for
13:33:06FromDiscord<Rika> Here, I think I get it now
13:33:13FromDiscord<Rika> Youā€™re right that you can leak with ARC
13:33:26arkanoidPMunch: sure, but what you have at the end is at least 3 projects: low-level wrapper that hopefully you can keep up-to-date automatically (but that's not granted), an idiomatic wrapper that should cope with low-level changes and compatibility on top, and your project using the imported features. As a simple programmer in a 1 man team, I want to cope with just my project, sadly
13:33:30FromDiscord<Rika> Youā€™re mistaken that you can leak with ARC easily
13:33:42FromDiscord<Rika> Youā€™re right that you still have to be careful with ARC
13:33:55FromDiscord<planetis> well being open to learning is the best skill someone should have in CS
13:34:49FromDiscord<retkid> In reply to @planetis "well being open to": I don't wanna only major in CS but I feel like i might be too stupid for a mathmatics degree
13:34:54FromDiscord<retkid> (edit) "mathmatics" => "mathematics"
13:35:00PMuncharkanoid, yeah I get that. I was just saying that since the amount of work required to keep a project up to date is smaller it should allow developers of the bindings to create better results with the same amount of effort
13:35:02FromDiscord<planetis> a minor in math?
13:35:30FromDiscord<planetis> oh two degrees cool
13:36:12FromDiscord<retkid> learned some f# today
13:36:26FromDiscord<retkid> better than ocaml lmao
13:37:22FromDiscord<planetis> and how is it?
13:37:31FromDiscord<planetis> learning functional languages is the only thing I resist, I guess I don;t follow what I preachšŸ¤£
13:37:53FromDiscord<retkid> its easier having been scared off by ocaml
13:38:05FromDiscord<retkid> though it took me like an hour to write a simple function
13:38:09PMunch@retkid, I learned some F# for a class at university, that was horrible
13:38:26PMunchTaught myself some Clojure, now that is a really nice language
13:38:32*arkurious joined #nim
13:38:39FromDiscord<retkid> then it took me like 30 minutes to write a prime checking function
13:38:49FromDiscord<retkid> then took me 5 minutes to check within a loop
13:39:07FromDiscord<retkid> In reply to @PMunch "<@217459674700578816>, I learned some": its not that cool. I like how it makes me think
13:39:16FromDiscord<retkid> (edit) "cool." => "bad."
13:39:36arkanoidI went straight learning haskell. That-is-a-monster language
13:39:38PMunchThe thing I really liked with Clojure was how everything just slots together. F# felt like drying to use a screwdriver to nail something up
13:39:46FromDiscord<Rika> Haskell isnā€™t too bad
13:39:51arkanoidproblem is that the feature you have in haskell you don't have anywhere else
13:39:53PMunchs/drying/trying
13:40:26FromDiscord<Rika> In reply to @arkanoid "problem is that the": So like Nim hahaha
13:40:29PMunchI wish the Nim standard library fit together as well as Clojures, if that was the case it would be pretty much perfect
13:40:40arkanoidyeah :D kinda
13:41:02FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/975754753625710628/unknown.png
13:41:16arkanoidnim would be my perfect language if there would be official releases for major libs for it
13:41:46FromDiscord<retkid> In reply to @arkanoid "nim would be my": this is the nim motto...
13:41:48arkanoidbut nowadays you see only C/C++/Rust and Python for very high level implementations
13:41:55PMunch@retkid, you probably liked the functional way of thinking, which I also enjoy immensely, but it's just so clunky and weird
13:42:03FromDiscord<retkid> https://tenor.com/view/bender-hookers-blackjacks-futurama-gif-18364125
13:42:25arkanoidhahaha
13:42:26FromDiscord<retkid> ^thats just the entire nim community and all major libs
13:42:33FromDiscord<retkid> we have our own fork
13:42:37FromDiscord<retkid> hasn't been updated in 7 years
13:42:50FromDiscord<retkid> but Treeforms did it like in 1998
13:42:52FromDiscord<retkid> ĀÆ\_(惄)_/ĀÆ
13:43:38PMunchI have considered trying to delete all of stdlib and try to build my own :P
13:43:47PMunchThat is quite a herculean task though
13:44:25PMunchOh well, I'm off
13:44:27*PMunch quit (Quit: Leaving)
13:44:28FromDiscord<retkid> sounds like you have too much freetime
13:44:34FromDiscord<retkid> consider how limited life is
13:45:01FromDiscord<retkid> and all the cool things that can be done in that time, like, go outside
13:45:15FromDiscord<retkid> i kid
13:48:02FromDiscord<Rika> Youā€™re a kid yes
13:48:13FromDiscord<Rika> Youā€™re retkid
13:49:53FromDiscord<retkid> retadult
13:49:54FromDiscord<retkid> legaly
13:50:34FromDiscord<retkid> though in my brain im stuck at the age of like a 13 year old and I cant mature socially
13:52:00FromDiscord<Rika> Probably should get that checked or something
13:53:59*noeontheend joined #nim
13:59:06FromDiscord<retkid> In reply to @Rika "Probably should get that": just autism
13:59:11FromDiscord<retkid> socially inepty
13:59:13FromDiscord<retkid> (edit) "inepty" => "inept"
14:07:21FromDiscord<Andreas> seems that `-d:nimOldCaseObjects ` solves my troubles with variants šŸ™‚ Any idea how long this option will be around ?
14:07:31FromDiscord<Andreas> (edit) "`-d:nimOldCaseObjects `" => "`-d:nimOldCaseObjects`"
14:09:42*noeontheend quit (Ping timeout: 260 seconds)
14:12:07*noeontheend joined #nim
14:13:22arkanoidwhere would be nim here? http://www.modulecounts.com/
14:13:32*dtomato quit (Quit: The Lounge - https://thelounge.chat)
14:13:41arkanoidit's just a rethoric question
14:15:12FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/975763349608497202/unknown.png
14:15:27FromDiscord<retkid> what the fuck node
14:16:22FromDiscord<retkid> this is because node will have modules that have modules for their modules
14:17:11arkanoidnode is like https://9gag.com/gag/apgv5PB
14:17:33*dtomato joined #nim
14:17:55FromDiscord<aph> In reply to @arkanoid "where would be nim": you can try counting here: https://github.com/nim-lang/packages/blob/master/packages.json
14:18:01FromDiscord<aph> failed on my phone
14:18:09FromDiscord<aph> the data is too large to be on a clipboard
14:18:21arkanoidthere's nim you can enable on modulecounts.com
14:18:27arkanoidit's just 1/day
14:19:10*vicfred joined #nim
14:21:31arkanoidelixir/erlang has some serious curve, I though it was less than that
14:28:50FromDiscord<Rika> In reply to @Andreas "seems that `-d:nimOldCaseObjects`": Likely 2.0?
14:28:58FromDiscord<Rika> Rather it will be gone by 2.0
14:34:56FromDiscord<uncle jim> how to accept command line arguments in nim?
14:36:40FromDiscord<Rika> Thereā€™s a lot of ways, you can get parameters raw from std/os or use an external package to help with parsing
14:38:04FromDiscord<0st guy on the list> In reply to @Rika "Thereā€™s a lot of": how me do that?
14:38:09FromDiscord<0st guy on the list> using std/os
14:38:56FromDiscord<Rika> https://nim-lang.org/docs/os.html#commandLineParams
14:39:10FromDiscord<Rika> There's also
14:39:12FromDiscord<Rika> https://nim-lang.org/docs/parseopt.html
14:41:19FromDiscord<0st guy on the list> zamn the nim standard lib is wayyyyyy better than rust standard lib(rust std sucks)
14:47:07FromDiscord<Rika> I have no experience there so I canā€™t say
14:47:11FromDiscord<Rika> Why do you think so
14:47:47FromDiscord<0st guy on the list> In reply to @Rika "Why do you think": it's really small
14:47:56FromDiscord<Rika> Probably intentional
14:48:13FromDiscord<0st guy on the list> it does not have many libs that are actually needed
14:49:10FromDiscord<Rika> Why not use a third party library then
14:49:45FromDiscord<0st guy on the list> In reply to @Rika "Why not use a": can't be so reliant on them
14:49:52FromDiscord<Rika> Why so?
14:50:15FromDiscord<0st guy on the list> In reply to @Rika "Why so?": it increases rusts compile time
14:50:26FromDiscord<0st guy on the list> the `dependencies`
14:50:41FromDiscord<Rika> The standard library doesnā€™t?
14:51:30arkanoid0st guy on the list: for your infomation, nim is going to externalize stdlib features too
14:51:57arkanoidthe more modules, the better, including stdlib
14:52:16arkanoid(this is the shared idea, not my personal, I like batteries included)
14:53:45FromDiscord<0st guy on the list> In reply to @Rika "Why not use a": there's also the problem of outdated crates
14:54:10FromDiscord<Rika> Itā€™s an issue for standard libraries too you know
14:54:20FromDiscord<0st guy on the list> In reply to @Rika "Itā€™s an issue for": y
14:54:24FromDiscord<Rika> A lot of stuff in the Nim standard library are left to rot because no one is maintaining it
14:54:47FromDiscord<Rika> Just because something is in the standard library doesnā€™t mean it is well maintained
14:55:07FromDiscord<0st guy on the list> hmmmm
14:55:20FromDiscord<0st guy on the list> guess we can't do anything about that
14:55:33FromDiscord<Rika> In reply to @arkanoid "(this is the shared": I like batteries included if it didnā€™t mean maintenance hell
14:55:48FromDiscord<Rika> Then again, Iā€™d prefer ā€œeasy to make integrated librariesā€ more
14:56:11FromDiscord<Rika> Like features that allow for you to easily combine different libraries from different people kinda thing
14:57:36*vicfred quit (Quit: Leaving)
15:05:42arkanoidI prefer when a lot of people are aiming at the same thing.
15:05:54arkanoidAnd nim is not like that
15:08:56FromDiscord<Rika> What do you mean?
15:11:41FromDiscord<Rika> Itā€™s hard to explain this, but if weā€™re talking relatively, I believe all languages have an unfocused aim with regards to devs who arenā€™t part of the core team
15:11:42arkanoidI mean that I like when the knowledge/responsibility over a project is shared among a lot of people
15:11:47FromDiscord<Rika> Itā€™s just that Nim is smaller so itā€™s felt more
15:12:48FromDiscord<Rika> With core devs itā€™s a different thing
15:13:54arkanoidsure, I'm not saying nim is wrong, absolutely, it's my favorite and community, but it's hard to live with it. I fear betting when picking modules for important projects
15:14:21arkanoidwhile with python, for example, there would be shitton of people complaning for a regression, with nim I'd be always the first
15:15:08FromDiscord<Rika> It really is hard to live with
15:15:17FromDiscord<Rika> I have the same feeling
15:15:49FromDiscord<Rika> Itā€™s not easy to solve, I believe itā€™s partially a money thing partially a ā€œweā€™re so different people donā€™t want to use itā€
15:16:56*vicfred joined #nim
15:25:26arkanoidsomeone has to be paid professionally to build, maintain and pass the responsibility to next maintainer for major building blocks
15:26:22arkanoidnim would be a great language for data science, but it is not as nobody is getting paid to build the equivalent of python's scipy for nim
15:26:41FromDiscord<sheerluck> nim is a great language
15:27:55arkanoidit's a big trap for small teams who want to use them as lingua-franca for different projects
15:31:28FromDiscord<sheerluck> lower your expectations a bit. It's a trap only if small team expects too much. like all python batteries.
15:33:55FromDiscord<sheerluck> if small team wants to do something but it is not available yet in Nim, small team can use Python to fill the gaps
15:57:28arkanoidsheerluck, maintaining two pipelines and splitting to microservices is not always feasible or preferred than just using the technology that let's you do both
15:58:20FromDiscord<jmgomez> heys guys, anyone knows what's the compiler argument (if possible at all) for setting a directory to look for dyn libs when creating an executable?
15:59:50FromDiscord<demotomohiro> `--passL:-L/path/to/dir`
16:01:20FromDiscord<demotomohiro> Or `--clibdir:/path/to/dir`: https://nim-lang.org/docs/nimc.html
16:03:18FromDiscord<jmgomez> but is not that for the linker? I mean for the dependencies on the executable, rather than the symbols
16:10:40*wallabra_ joined #nim
16:11:17*wallabra quit (Ping timeout: 246 seconds)
16:11:39*wallabra_ is now known as wallabra
16:15:30FromDiscord<spoon> any treesitter support?
16:18:17FromDiscord<spoon> or treesitter grammar rather
16:20:41FromDiscord<demotomohiro> @jmgomez Then only option I know is `--rpath`: https://sourceware.org/binutils/docs-2.38/ld/Options.html#Optionsā†µAnd It seems no way to embed paths to search for dlls to an executable on windows.
16:32:21FromDiscord<jmgomez> In reply to @demotomohiro "<@726017160115126333> Then only option": Tried before asking and didnt did the trick, not sure if I was doing something wrong. I did a simbolic link with the dlls because the env var cant be set neither (on MacOs). When I got a fresh env will try again with rpath. Thanks!
16:51:48*ehmry quit (Ping timeout: 240 seconds)
16:55:57*noeontheend quit (Ping timeout: 260 seconds)
16:56:26*ehmry joined #nim
17:01:41*ehmry quit (Ping timeout: 246 seconds)
17:06:52FromDiscord<Rika> In reply to @spoon "or treesitter grammar rather": someone tried
17:32:33*ehmry joined #nim
17:37:30*xet7 joined #nim
18:02:22*ehmry quit (Ping timeout: 250 seconds)
18:05:32FromDiscord<konsumlamm> In reply to @retkid "its easier having been": i'm curious what scared you in OCaml that wasn't a problem in F#
18:05:54FromDiscord<morgan> is there a way to have a for loop that jumps forward by more than one?
18:06:37FromDiscord<konsumlamm> sure
18:06:41FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/975821608532979722/unknown.png
18:07:13*PMunch joined #nim
18:07:20FromDiscord<konsumlamm> In reply to @MorganAlyssa "is there a way": `for i in countup(a, b, step): ...`
18:07:24NimEventerNew question by William Rosenbaum: Function comparing two strings slower in nim than python, see https://stackoverflow.com/questions/72263721/function-comparing-two-strings-slower-in-nim-than-python
18:07:26FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/975821792906215524/unknown.png
18:07:45FromDiscord<konsumlamm> In reply to @retkid "": isn't the F# syntax mostly the same?
18:07:54FromDiscord<konsumlamm> those don't really look like beginner examples either
18:08:36FromDiscord<morgan> In reply to @konsumlamm "`for i in countup(a,": thanks
18:08:38FromDiscord<retkid> i also dont feel the need to type ;; to define a var
18:08:45FromDiscord<konsumlamm> why are you confused about the dots though? those just access module members, just like in Nim
18:08:57FromDiscord<konsumlamm> In reply to @retkid "i also dont feel": you don't need to either, except in the REPL
18:09:39FromDiscord<retkid> pointAssoc.add_multi isn't defined in this screenshot
18:09:40FromDiscord<retkid> so
18:09:56FromDiscord<retkid> what if its a builtin default function thats stupid and i need to learn
18:10:11FromDiscord<retkid> what are all the ~ i guarantee they do something stupid and unneeded
18:10:31FromDiscord<konsumlamm> named arguments lol
18:11:00FromDiscord<retkid> idk f# just seems more slimmed down
18:11:03FromDiscord<retkid> same idea
18:11:04FromDiscord<konsumlamm> it is
18:11:05FromDiscord<retkid> just moved
18:11:09FromDiscord<retkid> (edit) "moved" => "modern"
18:11:41FromDiscord<retkid> i also wanted to learn more functional so i can learn a language like haskell less difficulties
18:11:51FromDiscord<retkid> also purescript
18:13:05FromDiscord<konsumlamm> makes sense
18:13:18FromDiscord<retkid> (edit) "i also wanted to learn more functional so i can learn a language like haskell ... less" added "with"
18:13:50FromDiscord<retkid> ~~i also wanna impress this cute person i know whos a haskell nerd~~
18:14:31PMunchF# seems slimmed down? What have you been using?
18:14:39*ehmry joined #nim
18:14:45FromDiscord<retkid> slimmed down in simple syntax
18:14:57FromDiscord<retkid> it has more features and a bigger stdlib
18:15:09FromDiscord<konsumlamm> ~~i doubt a haskell nerd will be impressed by F#~~
18:15:16PMunchF# syntax is a wild mess..
18:15:18FromDiscord<konsumlamm> unless you show them computation expressions maybe
18:15:40PMunchIf you want slim syntax, check out Clojure :)
18:15:42FromDiscord<retkid> In reply to @konsumlamm "~~i doubt a haskell": if i get good F# i can impress her with haskell and purescript and maybe even... K
18:29:33FromDiscord<retkid> In reply to @PMunch "F# syntax is a": there are some things involving how strict the typing is that i'd like to ideally change
18:30:27FromDiscord<retkid> i like how the lack of control makes you write code differently too
18:36:19FromDiscord<ambient> F# is pretty much Ocaml isn't it? Ocaml should be pretty easy to get started with, plus it's pretty fast
18:37:42FromDiscord<ambient> now, could I write Ocaml just with Nim macros? šŸ¤“
18:56:05FromDiscord<Phil> If you use nimpy, do you still compile with -d:release?
18:56:38FromDiscord<Phil> Mostly asking since, skimming over the nimpy github page, the example does not contain -d:release:ā†µ`nim c --app:lib --out:mymodule.so --threads:on mymodule`
18:58:00FromDiscord<Yardanico> In reply to @Isofruit "Mostly asking since, skimming": Are you talking to the StackOverflow question?
18:58:05FromDiscord<Phil> In reply to @Yardanico "Are you talking to": Yeah, got curious and skimmed over it
18:58:23FromDiscord<Phil> Couldn't see anything obviously wrong with the code so I started assuming he compiled badly somehow
18:58:23FromDiscord<Yardanico> Well, that person isn't there, are they?
18:58:32FromDiscord<Yardanico> In reply to @Isofruit "Couldn't see anything *obviously*": Yeah I'll try myself
18:59:20FromDiscord<Yardanico> And they shouldn't forget about overhead of converting Nim types to Python types
19:00:03FromDiscord<Phil> Yeah but if you act on strings with 50000 chars I'd assume the overhead to be not that big in comparison
19:00:13FromDiscord<Phil> That's why I asked if their benchmark was a lot of small calls or a few big ones
19:04:28PMunchSeems like a classic mistake of debug vs. release
19:04:40FromDiscord<Xzayler> Does anyone use an ORM with nim?
19:04:42PMunchI built their code with both
19:04:49PMunch@Xzayler, yes
19:04:54FromDiscord<Xzayler> which one?
19:05:11FromDiscord<Xzayler> I found a few but not sure if they're up to date or abandoned or something
19:05:15PMunchPython version on my version was 0.9s, Nim was 5.6 in debug mode, 0.6 in release mode
19:05:26PMunch@Xzayler, oh an ORM
19:05:32PMunchSorry I misread your question
19:05:46PMunchI assume some projects use ORMs in Nim though, can't think of any of the top of my head though
19:05:51PMunchMaybe the Nim forums?
19:06:32FromDiscord<Xzayler> I mean an ORM library
19:07:46FromDiscord<Phil> In reply to @Yardanico "Yeah I'll try myself": Just did it, they didn't compile with -d:release
19:07:51FromDiscord<Yardanico> Classic
19:08:02FromDiscord<Yardanico> A true timeless classic
19:08:13FromDiscord<Yardanico> Even though Nim literally screams DEBUG MODE
19:08:20FromDiscord<Yardanico> But I guess they didn't see that with nimporter or something
19:12:11FromDiscord<Phil> TBF, they're likely a pythonista that just looked at the github page of nimpy, which makes no mention of -d:release
19:12:29FromDiscord<Phil> I can see myself making the same mistake if I just want to play fast and loose and play around
19:12:44FromDiscord<Yardanico> but honestly there's almost no point in optimizing this specific code in a Nim extension
19:13:31FromDiscord<Phil> Eh, still around 33% faster on my machineā†µKeep in mind he's most likely doing this for bioinformatics. ā†µYou do a ton of string comparison stuff like this there
19:14:20FromDiscord<Yardanico> In reply to @Isofruit "Eh, still around 33%": The cost of crossing the Python-Nim bridge in this case is also quite big
19:14:32FromDiscord<Yardanico> it'd be better if he would write his program in Nim and call into Python for stuff he needs from it
19:16:16FromDiscord<Phil> I think if he just writes the entire part thats computationally expensive so that you only do a single call from the outside, do a ton of work in nim and then return the result, you could make it worth it while staying in the python ecosystem
19:16:29FromDiscord<Phil> Though fun fact, this was the first time I ever did nim to python stuff, that was surprisingly painless
19:17:00PMunchYeah I was also shocked by how easy it was to use nimpy
19:17:15FromDiscord<Phil> God dangit Pmunch! I wanted to write an answer as well xD
19:17:29PMunchI thought the instructions was missing a part :P
19:17:38PMunch@Phil, haha feel free :)
19:18:17FromDiscord<Phil> Nah, can't really add much more than you already did, other than numbers that is
19:18:38FromDiscord<Yardanico> In reply to @Isofruit "Nah, can't really add": your comment is a bit misformatted with ` :)
19:18:52FromDiscord<Phil> Yeah I saw that just now as well
19:18:55FromDiscord<Rika> Donā€™t think itā€™s his fault though
19:19:25PMunchYeah the -d:release part of that message uses backticks :P
19:19:34PMunchI changed them manually in my paste
19:21:16FromDiscord<Phil> I noticed too late to edit ;_;
19:21:34*byanka joined #nim
19:22:52FromDiscord<Phil> Where was stuff like -d:lto explained again?
19:23:01FromDiscord<Phil> It's not in the compiler user guide
19:27:15PMunchThe Stack Overflow developer survey has square boxes with checkmarks that works like radio-boxes..
19:27:34PMunch-d:lto is just a shortcut for --passL:-flto I believe
19:27:37PMunchIt's a C thing
19:28:33FromDiscord<Yardanico> In reply to @PMunch "-d:lto is just a": a bit more than that, it also forces the use of lld with clang for no reason :)
19:28:42FromDiscord<Yardanico> so if you want LTO with clang but don't have lld installed, -d:lto won't work :P
19:28:55FromDiscord<Yardanico> passing -flto directly to the C compiler will
19:30:07FromDiscord<Phil> The only reason I know of -d:lto is because I think yard dropped it at one point and it actually gave another slight speed-up to my web-project, so I just kept it in there for when I compile prod-code.ā†µSo without being able to bug Yard about this, I wouldn't even know -d:lto is there and useful!
19:30:43FromDiscord<Phil> Thus the question if there's other documentation than the compiler user guide for stuff like that
19:40:32PMunchWell, make a Stackoverflow post about poor performance in Nim and you'll get all the flags you need :P
19:41:56FromDiscord<Phil> But PMunch!
19:42:09FromDiscord<Phil> I'd need to have an example of nim code with poor performance for that and I just don't have that!
19:42:27FromDiscord<Phil> ~~Even my worst nim-code bits in my application are still like 5 times faster than whatever I had in python in their place~~
19:43:16FromDiscord<Phil> With the one exception being hashing the password, but we had already established that python basically has an insanely well optimized wrapper around ... some very fast C lib whose name I forgot
19:52:16PMunchHaha, what a luxury problem you have
19:55:06*gsalazar quit (Remote host closed the connection)
19:55:10FromDiscord<Phil> I think it's mostly that in terms of performance I'm looking through a very skewed lense. I'm not going for embedded software speeds where I actually need to seriously think about optimizations.ā†µMy worst nim code will always be faster than my python code through the sheer virtue of it being written in nim, and if my measuring stick is python then I pretty much can only win
19:55:16*gsalazar joined #nim
19:58:41PMunchBeside -d:release the biggest speed boost you can get is changing algorithms and optimising your code
19:58:53PMunchLTO and other such things will only give you marginally better performance
19:59:35FromDiscord<Phil> Yeh, but LTO is free performance!
20:00:08FromDiscord<Phil> In terms of bang for buck, given the amount of effort that goes into making use of LTO on my end, its utility is infinite!
20:00:08PMunchYou can read this as well: https://blog.johnnovak.net/2017/04/22/nim-performance-tuning-for-the-uninitiated/
20:00:16PMunchIt's a bit old, but still some good stuff in there
20:00:24PMunchThat's fair
20:00:51FromDiscord<Yardanico> In reply to @PMunch "LTO and other such": well, PGO can give quite big speedups as well, but for it you need some real-world usage data to profile your program on
20:01:02PMunchThere was another thing where you would run your code through a program which essentially figured out what the hot paths where and made sure those where faster
20:01:08PMunchAh yes, PGO!
20:01:34PMunchhttps://forum.nim-lang.org/t/6295
20:03:50FromDiscord<Yardanico> https://github.com/Yardanico/nim-snippets/blob/master/compile_pgo.nim a lot of repetitions :)
20:03:55FromDiscord<planetis> That blog theme is so cool
20:04:28PMunch@planetis, John Novaks?
20:04:32FromDiscord<planetis> yep
20:04:39PMunchYeah I really like that one
20:05:49PMunchSolid mobile version as well
20:05:55PMunchI really should redesign my site..
20:15:23*daemilk quit (Quit: Connection closed for inactivity)
20:31:30*vicecea quit (Remote host closed the connection)
20:32:04*vicecea joined #nim
20:51:35*tiorock joined #nim
20:51:35*tiorock quit (Changing host)
20:51:36*tiorock joined #nim
20:51:36*rockcavera is now known as Guest5850
20:51:36*Guest5850 quit (Killed (copper.libera.chat (Nickname regained by services)))
20:51:36*tiorock is now known as rockcavera
20:54:34FromDiscord<planetis> I forgot about what a director in a multinational company here told me during an industry event.
20:55:06FromDiscord<planetis> Fuck rust you should learn Java and SQL database s are the future man
20:55:28FromDiscord<planetis> Good advice, right?
21:09:21FromDiscord<!Patitotective> In reply to @Elegantbeef "What was the issue": id have to create a gtk2 window (and a windows window)ā†µand besides i dont want that dependency im not sure how to create a window and hide it or šŸ¤·ā€ā™‚ļø
21:10:49PMunchI mean if you just want to earn money learn Fortran and Cobol :P
21:11:22PMunchI once got told that programming was a fad and I should try to get myself onto a fishing ship instead
21:11:26PMunchNot all advice is good advice
21:14:57FromDiscord<!Patitotective> In reply to @Elegantbeef "What was the issue": they're so old https://media.discordapp.net/attachments/371759389889003532/975868984362688532/Screenshot_from_2022-05-16_16-14-25.png
21:15:02FromDiscord<Elegantbeef> Hey i bet most fishermen never say "Fish is fucking abhorrent"
21:15:13FromDiscord<Elegantbeef> I know software developers say "Software is fucking abhorrent"
21:15:15*PMunch quit (Quit: leaving)
21:16:40*noeontheend joined #nim
21:38:59*greaser|q joined #nim
21:40:09*greaser|q quit (Changing host)
21:40:09*greaser|q joined #nim
21:40:11*greaser|q is now known as GreaseMonkey
22:03:45FromDiscord<ambient> is there a copy somewhere?
22:03:47FromDiscord<ambient> sent a code paste, see https://play.nim-lang.org/#ix=3XWO
22:04:04FromDiscord<ambient> (edit) "https://play.nim-lang.org/#ix=3XWO" => "https://play.nim-lang.org/#ix=3XWP"
22:04:25FromDiscord<ambient> (edit) "https://play.nim-lang.org/#ix=3XWP" => "https://play.nim-lang.org/#ix=3XWQ"
22:05:05FromDiscord<ambient> i tested the (y, x) = (x, y) part and it doesn't seem to change any performance
22:15:41*termer quit (Remote host closed the connection)
22:16:03*termer joined #nim
22:27:42FromDiscord<ambient> sent a code paste, see https://play.nim-lang.org/#ix=3XWW
22:28:48FromDiscord<Yardanico> i think asking arraymancer questions in #science would be more useful :) but it's fine to ask it here too, but some people in #science only talk in it P
22:28:57FromDiscord<ambient> ok
22:33:25FromDiscord<Elegantbeef> The `[a..b]` might copy
22:52:39*arkurious quit (Quit: Leaving)
22:58:43*xet7 quit (Remote host closed the connection)
22:59:46*xet7 joined #nim
23:41:04FromDiscord<root> sent a code paste, see https://play.nim-lang.org/#ix=3XX8
23:41:19FromDiscord<root> (edit) "https://play.nim-lang.org/#ix=3XX8" => "https://play.nim-lang.org/#ix=3XX9"
23:41:47FromDiscord<root> (I already had the server running on my host pc (Linux)
23:42:54FromDiscord<Elegantbeef> https://stackoverflow.com/a/43168497/15200657
23:43:01FromDiscord<Elegantbeef> Mingw isnt properly in your path
23:43:27FromDiscord<Elegantbeef> You either need the `.dll` next your binary or mingw in path
23:43:47FromDiscord<Elegantbeef> Dont recall where mingw is placed for Nim
23:44:37FromDiscord<root> ok thank you šŸ™‚
23:45:54*ltriant_ quit (Ping timeout: 272 seconds)
23:46:09*ltriant joined #nim
23:46:21FromDiscord<Elegantbeef> Windows is the worst development platform return to TempleOS
23:54:23FromDiscord<!Patitotective> In reply to @Elegantbeef "*Windows is the worst": true