<< 01-07-2023 >>

00:24:09FromDiscord<pandasdontfly> yo this is new why am i suddenly getting this error? https://media.discordapp.net/attachments/371759389889003532/1124495623358529656/image.png
00:28:10*rockcavera quit (Remote host closed the connection)
03:02:14FromDiscord<jeremyjaydan> sent a long message, see https://paste.rs/aT7ur
03:02:29FromDiscord<jeremyjaydan> the rules: https://media.discordapp.net/attachments/371759389889003532/1124535466180497528/image.png
03:02:35FromDiscord<jeremyjaydan> <https://nim-lang.org/docs/manual.html#effect-system-exception-tracking>
03:11:26FromDiscord<jeremyjaydan> or more concisely, the behaviour of `effectsOf` is seemingly the same with and without it, what is the purpose of it? Could someone provide an example that demonstrates a behaviour change that happens?
03:17:19FromDiscord<Elegantbeef> Life is easier if you share the code 😄
03:17:36FromDiscord<jeremyjaydan> I don't have any code :p
03:17:39FromDiscord<jeremyjaydan> just reading the whole manual
03:17:44FromDiscord<Elegantbeef> The stuff you were testing
03:17:51FromDiscord<jeremyjaydan> oh
03:18:13FromDiscord<jeremyjaydan> sent a code paste, see https://play.nim-lang.org/#ix=4zui
03:19:01FromDiscord<jeremyjaydan> sent a code paste, see https://paste.rs/tSN7K
03:19:29FromDiscord<Elegantbeef> Wit devel it does change the error line atleast
03:19:47FromDiscord<jeremyjaydan> What's devel?
03:20:24FromDiscord<jeremyjaydan> I see, a version of the library
03:20:25FromDiscord<Elegantbeef> The development branch of the compiler
03:20:27FromDiscord<Elegantbeef> Bleeding edge
03:20:30FromDiscord<jeremyjaydan> ok
03:21:31FromDiscord<demotomohiro> You can get devel Nim from:↵https://github.com/nim-lang/nightlies/releases
03:22:07FromDiscord<jeremyjaydan> is there an equivalent nvm (node version manager) but for nim?
03:23:38FromDiscord<jeremyjaydan> choosenim, found it
03:23:54FromDiscord<jeremyjaydan> thanks for your responses @elegantbeef, @demotomohiro
03:27:37FromDiscord<demotomohiro> I just download nightly devel Nim to random directory and set `PATH` when I want to use it.
03:28:22FromDiscord<Elegantbeef> I use gitnim or choosenim
03:50:49FromDiscord<jeremyjaydan> I think I get it now, I was missing two things, didn't end up using devel, I found a test in the nim source that clarified things a little: <https://github.com/nim-lang/Nim/blob/2f109595e982bd68b4f4f2fabf934409947b0ee1/tests/effects/teffects6.nim#L24> https://media.discordapp.net/attachments/371759389889003532/1124547626843525141/Screen_Recording_2023-07-01_at_11.49.22_am.mov
03:51:42FromDiscord<jeremyjaydan> so I was missing `{.experimental: "strictEffects".}` but also the `use()` had `raises: []` which was correct for the demo but not for how I was trying to get it to behave
03:52:28FromDiscord<jeremyjaydan> thanks again!
05:28:30*lucasta quit (Quit: Leaving)
05:32:58FromDiscord<uninnocent> why is my nim program getting flagged by defender
05:37:49FromDiscord<that_dude.> Because AVs detect nim patterns instead of virus patterns
05:38:39FromDiscord<uninnocent> so how do I make it not detect nim patterns
05:39:07FromDiscord<Elegantbeef> Pay MS to sign your package very nicefully
05:39:21FromDiscord<uninnocent> Im not forking over 3k
05:39:31FromDiscord<that_dude.> And even then it doesn't work iirc
05:39:33FromDiscord<uninnocent> is there any way I can make my nim executable look not like a nim executable
05:39:41FromDiscord<uninnocent> because no matter what I write
05:39:45FromDiscord<uninnocent> its always flagged by defender
05:39:48FromDiscord<Elegantbeef> Write it in a different language like go... wait the same thing happens there
05:39:52FromDiscord<uninnocent> even if the code does literally nothing but print shit
05:40:08FromDiscord<Elegantbeef> Obscure languages are often used for malware so eager antivirus false positive it
05:40:08FromDiscord<uninnocent> I REALLY dont want to learn C++
05:40:11FromDiscord<uninnocent> its painful
05:40:33FromDiscord<uninnocent> which popular programming language that compiles into something that antiviruses dont detect
05:40:36FromDiscord<uninnocent> that isnt painful
05:41:59FromDiscord<Elegantbeef> None really
05:42:25FromDiscord<uninnocent> which one is the least painful
05:42:30FromDiscord<Elegantbeef> Rust and even Go have common false positives
05:42:37FromDiscord<Elegantbeef> Nim
05:42:42FromDiscord<uninnocent> yeah ik
05:42:49FromDiscord<uninnocent> but I cant fucking deal
05:42:51FromDiscord<uninnocent> with the av flags
05:43:02FromDiscord<Elegantbeef> Well your choices are C/C++
05:43:10FromDiscord<Elegantbeef> If windows flagging is such a concern
05:43:27FromDiscord<uninnocent> what abt something like rust
05:43:43FromDiscord<Elegantbeef> Even Rust has issues like I said
05:44:00FromDiscord<uninnocent> I just fucked with the compiled flags a ton and now my program isnt flagged
05:44:06FromDiscord<uninnocent> 🤷‍♂️
05:45:59FromDiscord<uninnocent> ig ill keep using nim for now
05:46:07FromDiscord<uninnocent> but I gotta find someting better if these flags persist
05:47:29*ntat joined #nim
05:49:43FromDiscord<demotomohiro> How about to open source your program and convince people that your program is not a virus even if windows defender say so.
05:50:12FromDiscord<Elegantbeef> I mean they were injecting things into PEs, it's probably malware
05:51:56*cyraxjoe joined #nim
06:08:17FromDiscord<uninnocent> In reply to @Elegantbeef "I mean they were": I couldn't figure that out btw
06:08:34FromDiscord<uninnocent> I figured out how to run it
06:08:36FromDiscord<uninnocent> but not inject it
06:29:21FromDiscord<demotomohiro> Nim doesn't do anything wrong but there are people making malwares with Nim and antivirus softwares don't inspect executables propely and flags Nim programs just do `echo "Hello world"`.↵And some people believe closed source software created by large company rather than open source software and blame Nim as if it is doing something wrong and av flags Nim generated programs.
06:56:48*m5zs7k quit (Ping timeout: 252 seconds)
07:02:15*m5zs7k joined #nim
07:24:24FromDiscord<.bobbbob> Is it window's built in antivirus or various third party antiviruses? Just curious
07:24:31FromDiscord<.bobbbob> does windows even have a built in antivirus
07:32:01FromDiscord<odexine> Both and yes
07:32:11FromDiscord<odexine> Mainly windows though
07:43:58FromDiscord<.bobbbob> my mind jumps to ms being anticompetitive then, block languages that arent c#
07:44:06FromDiscord<.bobbbob> do they still care about c#
07:44:28FromDiscord<.bobbbob> as you can tell im not versed in ms land haha
07:47:19FromDiscord<.bobbbob> or msvc
08:07:53FromDiscord<bostonboston> Eset at work is constantly telling me the Nim compiler is malware
08:28:16*ovenpasta joined #nim
08:39:58*azimut quit (Ping timeout: 240 seconds)
09:42:06*junaid_ joined #nim
09:42:51*junaid__ joined #nim
09:45:54FromDiscord<przmk> There's this weird thing on Github when searching for lang\:Nim repos. If I sort them by "recently updated", the first entry is from Feb, 26th. ↵https://github.com/search?q=lang%3ANim+&type=repositories&s=updated&o=desc
09:48:51FromDiscord<przmk> Nvm, it's the same for other languages as well
09:56:45*junaid__ quit (Remote host closed the connection)
09:56:49*junaid_ quit (Remote host closed the connection)
11:10:57*derpydoo quit (Quit: derpydoo)
11:56:14*Guest89 joined #nim
11:56:43*Guest89 quit (Client Quit)
12:22:20*krux02 joined #nim
12:40:44*ntat quit (Quit: Leaving)
13:13:05FromDiscord<takemichihanagaki3129> In reply to @Elegantbeef "Rust and even Go": Even python, if you compile it with Nuitka.↵I had my application flagged too...
13:23:12*ntat joined #nim
13:45:11FromDiscord<Yardanico> In reply to @przmk "There's this weird thing": there's a very easy trick to that
13:45:25FromDiscord<Yardanico> basically the problem is that github doesn't run your search query against ALL entries that match, because that would put too much strain on the database etc
13:45:39FromDiscord<Yardanico> what you can do is to just limit your search by searching for repos that e.g. were pushed to this month
13:45:41FromDiscord<Yardanico> then you'll see all of them
13:45:51FromDiscord<Yardanico> https://github.com/search?q=lang%3ANim+pushed%3A%3E2023-06-01&type=repositories&s=updated&o=desc
13:46:04FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/1124697432169652254/image.png
13:56:43FromDiscord<ieltan> sent a code paste, see https://paste.rs/RW1hP
13:57:24FromDiscord<ieltan> (edit) "https://play.nim-lang.org/#ix=4zw0" => "https://play.nim-lang.org/#ix=4zw1"
13:57:32FromDiscord<odexine> Do you know what the global pragma does?
13:58:28FromDiscord<ieltan> i believe it would let a var live past the proc lifetime
13:59:18FromDiscord<ieltan> sent a code paste, see https://play.nim-lang.org/#ix=4zw2
13:59:29FromDiscord<ieltan> only thing is that i want that for ref
14:00:38FromDiscord<Yardanico> In reply to @ieltan "Anyone knows how to": you really can't, global pragma has a very small specific usecase and only works well for non-gc types
14:00:50FromDiscord<Yardanico> why can't you just declare an actual global variable?
14:01:03FromDiscord<ieltan> In reply to @yardanico "you really can't, global": I see then
14:02:48FromDiscord<ieltan> In reply to @yardanico "why can't you just": Well, I need my global var to be immutable. If I have a `let someref: MyRefObject` it's going to complain that it needs to be init.
14:02:57FromDiscord<Yardanico> In reply to @ieltan "Well, I need my": but you mutate it
14:03:36FromDiscord<Yardanico> your code previously shows you mutating those variables, maybe i don't understand
14:04:10FromDiscord<ieltan> Erm can you explain more ? I mean yes i'm mutating the values , not the ref.
14:05:03FromDiscord<Yardanico> then what is even the question? you can declare a ref and mutate its contents just fine, you just won't be able to mutate the ref itself
14:05:19FromDiscord<odexine> What makes you unable to initialise the reference outside?
14:05:36FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4zw5
14:05:47FromDiscord<Yardanico> this just works, because again, you're modifying the contents of the ref, nim doesn't have deep immutability for refs by default (it's only available in funcs with strictFuncs on)
14:05:57FromDiscord<Yardanico> you did the same in your first example, just with global
14:11:10FromDiscord<ieltan> In reply to @yardanico "then what is even": Sorry then, the example was a bit too naive. i have a new `newRefObject()` and I need to pass this one ref somewhere so that i can use it in other modules, one solution would be to have a `var myglobal: refObject` globally and modify `newRefObject` so that it can init `myglobal` but If `newRefObject` is called twice the ref will change twice too and I dont want that
14:11:18FromDiscord<ieltan> (edit) "new" => ""
14:12:23FromDiscord<Yardanico> In reply to @ieltan "Sorry then, the example": `once` template exists in system
14:12:32FromDiscord<Yardanico> you can use it instead of using the global pragam to only unitialize some global variable once
14:12:52FromDiscord<Yardanico> https://nim-lang.org/docs/system.html#once.t%2Cuntyped this template actually uses global itself, but for a simple bool value
14:12:57FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/1124704196311134288/image.png
14:13:23FromDiscord<Yardanico> i wonder if this approach you're taking for a gui framework will scale though, but i don't know myself either :)
14:14:56FromDiscord<ieltan> I'm aware of `once`, but didn't try it yet on a global var
14:14:59FromDiscord<ieltan> emm
14:33:54*flouer quit (Ping timeout: 260 seconds)
14:43:47*junaid_ joined #nim
15:06:00*azimut joined #nim
15:20:58FromDiscord<gogolxdong666> sent a long message, see http://ix.io/4zwt
15:21:10FromDiscord<gogolxdong666> windows error
15:21:31FromDiscord<gogolxdong666> devel lastest
15:34:47*krux02 quit (Ping timeout: 264 seconds)
15:43:38*azimut quit (Ping timeout: 240 seconds)
16:01:50*krux02 joined #nim
16:02:44FromDiscord<ambient3332> sent a code paste, see https://paste.rs/kVNKK
16:02:57FromDiscord<ambient3332> https://github.com/amb/whispercpp-nim/tree/main
17:01:14FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4zwL
17:01:50FromDiscord<ambient3332> sent a code paste, see https://play.nim-lang.org/#ix=4zwM
17:02:00*azimut joined #nim
17:02:25FromDiscord<ambient3332> Seems either Nim or my system gcc is also broken, only works on --cc:vcc
17:02:35FromDiscord<ambient3332> (of course before the compiler flags)
17:04:15FromDiscord<ambient3332> It's pretty nice now how I can run a full local audio to text so easily, and can integrate it with Nim
17:05:07*flouer joined #nim
17:06:12FromDiscord<ambient3332> Full sort of working project now updated: https://github.com/amb/whispercpp-nim/tree/main
17:19:09*junaid_ quit (Remote host closed the connection)
17:20:51*junaid_ joined #nim
18:22:39*ntat quit (Quit: Leaving)
18:23:05NimEventerNew thread by mantielero: Lvgl - callback issues, see https://forum.nim-lang.org/t/10314
18:43:12FromDiscord<4zv4l> can I get the name of the file being compiled at comptime ?
18:43:36FromDiscord<4zv4l> like if I do `nim c hello.nim`↵can I at comptime do like↵`echo getScripteName()` ?
18:45:05*krux02 quit (Remote host closed the connection)
18:46:12FromDiscord<Andreas> sent a long message, see http://ix.io/4zxa
18:47:16FromDiscord<Andreas> (edit) "long message," => "code paste," | "http://ix.io/4zxa" => "https://play.nim-lang.org/#ix=4zxc"
18:47:24FromDiscord<Andreas> (edit) "https://play.nim-lang.org/#ix=4zxc" => "https://play.nim-lang.org/#ix=4zxd"
18:47:46FromDiscord<Andreas> (edit) "https://play.nim-lang.org/#ix=4zxd" => "https://play.nim-lang.org/#ix=4zxe"
18:53:00FromDiscord<demotomohiro> In reply to @4zv4l "can I get the": There is also:↵https://nim-lang.org/docs/system.html#currentSourcePath.t↵https://nim-lang.org/docs/macros.html#getProjectPath
18:54:36FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4zxh
18:55:47FromDiscord<Andreas> In reply to @demotomohiro "Why dont you use": i got that as a discord-tip, it worked and i never changed it :), thx anyway..
19:00:40FromDiscord<crim4> is there a way to do this in nim https://media.discordapp.net/attachments/371759389889003532/1124776600064507944/image.png
19:01:18FromDiscord<crim4> https://media.discordapp.net/attachments/371759389889003532/1124776761071239178/image.png
19:01:22FromDiscord<huantian> ~~ik black on white is supposed to be better contrast but somehow your font makes it even worse haha~~
19:01:47FromDiscord<crim4> my font is for chad guys
19:01:50*ntat joined #nim
19:02:14FromDiscord<crim4> and the color scheme looks a bit strange because i don't have the nim ext ahah
19:02:30FromDiscord<mooncell07> What's the name
19:03:02FromDiscord<crim4> font: <https://github.com/rbanffy/3270font>↵colorscheme: oolory
19:03:07FromDiscord<crim4> (edit) "font: <https://github.com/rbanffy/3270font>↵colorscheme: oolory ... " added "(vscode)"
19:03:44FromDiscord<crim4> its just the most similar thing to the rust playground (i love its color scheme) https://media.discordapp.net/attachments/371759389889003532/1124777372097466389/image.png
19:03:56FromDiscord<crim4> so simple
19:06:00FromDiscord<mooncell07> 🤔 hmm I personally use jetbrains mono with Catppuccin Mocha theme
19:06:27FromDiscord<mooncell07> https://github.com/catppuccin/catppuccin
19:06:37FromDiscord<crim4> don't worry i don't discriminate femboys
19:07:51FromDiscord<mooncell07> Oh ok thanks ~~your eyebags must be funny~~
19:08:41FromDiscord<crim4> ahah i use sublime the most time, so no, not yet
19:08:49FromDiscord<crim4> (edit) "ahah i use sublime the most ... time," added "of the"
19:09:11FromDiscord<4zv4l> In reply to @crim4 "don't worry i don't": what xD
19:09:38FromDiscord<crim4> ahah just black humor don't ban me 🐔
19:44:14FromDiscord<spotlightkid> Y'all know you can paste code here in between triple backticks?
19:45:40FromDiscord<hugop707> the irc bridge didnt like those, it would send the whole thing line by line iirc, not sure if it was addressed
19:46:20*strogon14 joined #nim
19:46:28FromDiscord<Elegantbeef> the irc bot sends a link to the playground with the entire message
19:46:43FromDiscord<Elegantbeef> To be frank, who cares about the dinosaurs living in the year 1903
19:47:27FromDiscord<spotlightkid> I'd rather have only IRC than only discord. So I'm happy Matrix exists.
19:48:44FromDiscord<spotlightkid> Re\: 1903, I'm not sure morse code supports backticks 😉
19:49:12FromDiscord<Elegantbeef> Now now they had phones
19:49:40FromDiscord<Elegantbeef> Phones have to support irc at the very least I'm told it's a simple protocol
19:50:04FromDiscord<Elegantbeef> I don't know about irc vs discord, but yes matrix existing is grand
19:50:33*strogon14 left #nim (Und tschüss!)
20:00:38*ntat quit (Quit: Leaving)
20:16:24FromDiscord<4zv4l> is it possible to tell `nimble` to build for multiple targets ?↵for example when doing `nimble build` to build for `linux x86_64` and `windows x86_64` using mingw ?
20:17:53FromDiscord<Elegantbeef> Make a new nimble task
20:19:59FromDiscord<4zv4l> any doc about how to create a task ?
20:20:34FromDiscord<Elegantbeef> https://nim-lang.org/docs/nimscript.html#task.t%2Cuntyped%2Cstring%2Cuntyped
20:27:54FromDiscord<4zv4l> that's confusing↵I think I understand how to make tasks↵but how to make a tasks that would compile the nimble project ?↵I saw `setCommand` but I have to give a filename ?
20:28:19FromDiscord<Elegantbeef> `selfExec`
20:32:16FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4zxy
20:32:28FromDiscord<4zv4l> and in the doc it says not to add `nim` or `nimble` inside the `selfExec`
20:39:27*junaid_ quit (Remote host closed the connection)
20:51:50FromDiscord<demotomohiro> I think `selfExec` calls nim not nimble.↵It will be like `selfExec(c -d:mingw)`.
20:52:20FromDiscord<demotomohiro> `selfExec("c -d:mingw")`
20:53:54FromDiscord<Elegantbeef> Well the docs do mention nimble, but it seems it doesnt work
20:56:26FromDiscord<spotlightkid> That won't work either because it expects a file name.↵(@demotomohiro)
20:59:58FromDiscord<4zv4l> yeah 🥺
21:02:30FromDiscord<demotomohiro> @spotlightkid I forget to add a file name.
21:07:07FromDiscord<spotlightkid> sent a code paste, see https://paste.rs/D4nAx
21:16:06FromDiscord<4zv4l> thanks !!!
21:16:08FromDiscord<4zv4l> works great
21:16:59FromDiscord<4zv4l> sent a long message, see http://ix.io/4zxI
21:25:28FromDiscord<Elegantbeef> Nope
21:30:49FromDiscord<spotlightkid> https://nim-lang.org/docs/logging.html#basic-usage-format-strings
21:56:46FromDiscord<Andreas> @elegantbeef Ola beef - i'd like to extract all Type-definitions, RoutineNodes( proc/func/iter/converter) plus template- and macro-definitions from a nim-source-file ? Can nimsuggest give tat to me or need i do the extraction myself ?
21:57:28FromDiscord<Andreas> (edit) "tat" => "that" | "thatto me or need i do the extraction myself ? ... " added "Or would you or anybd know of a tool/script, that can do such ?"
21:57:30FromDiscord<Elegantbeef> No clue if nimsuggest can
21:58:11FromDiscord<Andreas> In reply to @Elegantbeef "No clue if nimsuggest": so hand-roll myself..
22:00:16FromDiscord<Elegantbeef> You could use `parseStmt` inside a macro and load a file then iterate
22:00:24FromDiscord<Elegantbeef> No clue what you need these for
22:01:27*ovenpasta quit (Ping timeout: 245 seconds)
22:30:37*azimut_ joined #nim
22:31:58*azimut quit (Ping timeout: 240 seconds)
23:19:22*azimut_ quit (Remote host closed the connection)
23:19:47*azimut joined #nim
23:43:18*azimut quit (Ping timeout: 240 seconds)
23:57:17*azimut joined #nim