<< 15-06-2022 >>

00:57:30FromDiscord<abdu> sent a code paste, see https://paste.rs/w8R
00:58:19FromDiscord<abdu> (edit) "https://paste.rs/mHZ" => "https://play.nim-lang.org/#ix=40bn"
00:58:58FromDiscord<Elegantbeef> You see if it's wrapped and if not you wrapp the API
00:59:18FromDiscord<abdu> (edit) "https://play.nim-lang.org/#ix=40bn" => "https://play.nim-lang.org/#ix=40bp"
01:00:02FromDiscord<0xc0ffee> Hi, I registered on the Nim forum but I didn't get a confirmation email. And I'm not allowed to post before confirming my email. I actually registered a year ago and had to delete my account and create another one because there's no way to resend the confirmation email. Is there something wrong with that workflow?
01:00:37FromDiscord<0xc0ffee> (edit) "Hi, I registered on the Nim forum but I didn't get a confirmation email. And I'm not allowed to post before confirming my email. I actually registered a year ago and had to delete my account and create another one because there's no way to resend the confirmation email. Is there something wrong with that workflow? ... " added "(and yes, I checked my spam folder)"
01:06:53FromDiscord<abdu> sent a code paste, see https://paste.rs/OFc
01:08:14FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=40bs
01:08:33FromDiscord<ynfle> Why not `echo`?
01:08:46FromDiscord<Elegantbeef> printf doesnt add a `\n`
01:09:14FromDiscord<ynfle> Makes sense
01:11:40FromDiscord<abdu> Wtheck `stdout.flushFile`
01:11:57FromDiscord<abdu> (edit) "Wtheck `stdout.flushFile` ... " added "meaning?"
01:12:24FromDiscord<Elegantbeef> Flushing files is needed if you want to see the result in some places
01:12:57FromDiscord<Elegantbeef> I say some but it moves the memory file to the actual file
01:13:05FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=40bt
01:13:18FromDiscord<Elegantbeef> strformat doesnt work with templates
01:13:22FromDiscord<!Patitotective> :[
01:13:33FromDiscord<Elegantbeef> is `echo name` too much?
01:13:39FromDiscord<!Patitotective> yes
01:14:20FromDiscord<Elegantbeef> You can use `%` from strutils
01:15:02FromDiscord<!Patitotective> In reply to @Elegantbeef "You can use `%`": šŸ¤”
01:15:36FromDiscord<Elegantbeef> lets you do like `echo "$#" % [name]`
01:15:57FromDiscord<abdu> sent a code paste, see https://play.nim-lang.org/#ix=40bu
01:16:08FromDiscord<!Patitotective> In reply to @Elegantbeef "lets you do like": haha
01:16:10FromDiscord<abdu> (edit) "https://play.nim-lang.org/#ix=40bu" => "https://play.nim-lang.org/#ix=40bv"
01:16:12FromDiscord<Yardanico> In reply to @Elegantbeef "strformat doesnt work with": it does if you make a local inject'd variable
01:16:37FromDiscord<Yardanico> But yeah it's a bit ugly
01:16:39FromDiscord<Yardanico> https://nim-lang.org/docs/strformat.html#limitations
01:17:17FromDiscord<Yardanico> In reply to @0xc0ffee "Hi, I registered on": What's your forum username?
01:17:40FromDiscord<0xc0ffee> In reply to @Yardanico "What's your forum username?": khaledh-nim (the original one was khaledh)
01:18:08FromDiscord<Yardanico> you didn't have to delete the old account, you could've just asked here to confirm it btw
01:18:13FromDiscord<Yardanico> lemme confirm the new one then
01:18:31FromDiscord<0xc0ffee> welp šŸ¤·ā€ā™‚ļø
01:18:35FromDiscord<0xc0ffee> thanks anyway
01:18:46FromDiscord<Yardanico> done
01:19:04FromDiscord<0xc0ffee> ty šŸ™‡
01:19:53FromDiscord<Elegantbeef> What do you mean by fully convert?
01:19:53FromDiscord<abdu> In reply to @0xc0ffee "ty šŸ™‡": solved got registered?
01:20:31FromDiscord<0xc0ffee> yes
01:20:38FromDiscord<Elegantbeef> Like what is the point of converting `printf` to nim we have `strutils.%`, `echo`, `strformat` `dump` `printy`, ....
01:20:47FromDiscord<abdu> In reply to @Elegantbeef "What do you mean": said: `stdout` proc or object 100% replace `#include <stdio.h>` ?
01:20:55NimEventerNew thread by Khaledh-nim: Subtype cannot be implicitly converted to base type (without ref)?, see https://forum.nim-lang.org/t/9235
01:21:01FromDiscord<Elegantbeef> I dont know what you mean
01:21:11FromDiscord<Elegantbeef> Khaled yea that's expected
01:21:52FromDiscord<0xc0ffee> OK, gtk. Although it seems the manual needs to be updated. Currently there's a note that says:↵> In later versions of the language the subtype relation might be changed to require the pointer indirection in order to prevent "object slicing".
01:22:15FromDiscord<0xc0ffee> So it seems we're already on that "later version"
01:22:18FromDiscord<Elegantbeef> I mean it should be a compile time error but `base -> parent` is a lossy operation
01:22:41FromDiscord<0xc0ffee> base -> parent? šŸ¤”
01:22:50FromDiscord<0xc0ffee> do you mean base -> child?
01:22:51FromDiscord<Elegantbeef> child sorry
01:23:02FromDiscord<0xc0ffee> yeah, that's not what I'm doing. I'm doing child -> base
01:23:09FromDiscord<0xc0ffee> it doesn't work without a ref type
01:23:09FromDiscord<Elegantbeef> Yea that's what i said
01:23:11FromDiscord<Elegantbeef> child -\> parent
01:23:15FromDiscord<Elegantbeef> that's a lossy operation
01:23:16FromDiscord<Elegantbeef> You lose data
01:23:52FromDiscord<0xc0ffee> That's the Liskov substitution principle, no?
01:24:05FromDiscord<Elegantbeef> Sorry i only speak english
01:24:06FromDiscord<0xc0ffee> I'm free to treat a child runtime object as a parent variable, no?
01:24:22FromDiscord<Elegantbeef> Not with stack variables
01:24:39FromDiscord<0xc0ffee> Interesting. OK, that's good to know.
01:25:57FromDiscord<Elegantbeef> I mean i think it should be a compile time error
01:27:28FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/qsM
01:27:34FromDiscord<Elegantbeef> Like for this to work you should need to do `Parent(Child())`
01:28:27FromDiscord<Elegantbeef> Even then there isnt much reason for stack based inheritance
01:28:36FromDiscord<Elegantbeef> In this usage atleast
01:29:13FromDiscord<Elegantbeef> The only benefit of it i can see is that it gives you inheritable fields and procedures
01:31:58FromDiscord<Elegantbeef> I might be wrong though šŸ˜„
01:34:14FromDiscord<0xc0ffee> In reply to @Elegantbeef "Cause non reference/ptr based": It is currently a compile-time error: `# invalid object assignment [ObjectAssignmentError]`
01:34:31FromDiscord<Elegantbeef> No it's a runtime error
01:34:38FromDiscord<0xc0ffee> oh, sorry, you're right
01:34:46FromDiscord<0xc0ffee> I was confused by the output
01:35:49FromDiscord<0xc0ffee> I'm not currently trying to make use of this in a practical way. It just caught my attention while reading the manual so I was trying it out and noticed the error.
01:36:05FromDiscord<Elegantbeef> Understable
01:38:57NimEventerNew thread by Mardiyah: Aynone kind enough give tutorial how to convert to Nim?, see https://forum.nim-lang.org/t/9236
01:39:44FromDiscord<Elegantbeef> Worth noting that if you call `proc doThing(parent: var Parent)` with a `Child` it'll work
01:39:51FromDiscord<Elegantbeef> It's only on assignment it errors which makes sense
01:42:55FromDiscord<Elegantbeef> Actually it works with all i dont know why i mentioned the `var`
01:48:41FromDiscord<0xc0ffee> sent a long message, see http://ix.io/40bC
01:50:17FromDiscord<0xc0ffee> sent a long message, see https://paste.rs/rc0
01:50:52FromDiscord<0xc0ffee> The above would imply that no ref/ptr/var is needed for the subtype relation
01:51:25FromDiscord<Elegantbeef> Yea i think it is, so to quote the core devs "PRs welcome" šŸ˜„
01:52:12FromDiscord<0xc0ffee> https://github.com/nim-lang/Nim/pull/19898 šŸ˜‰
02:36:30*ltriant quit (Read error: Connection reset by peer)
02:41:45*ltriant joined #nim
03:26:01*oprypin quit (Quit: No Ping reply in 180 seconds.)
03:27:25*oprypin joined #nim
03:41:35FromDiscord<Zectbumo> !eval import std/os; echo "" / "usr" / "local"
03:41:41NimBotusr/local
03:43:44FromDiscord<demotomohiro> Is that wrong output?
03:43:58FromDiscord<Zectbumo> that first slash is totally ignored
03:44:09FromDiscord<Elegantbeef> I think they expect it to `/usr/local`
03:44:31FromDiscord<Zectbumo> how would one put a leading path separator then?
03:45:00FromDiscord<Elegantbeef> `DirSep & "usr" / "local"`
03:45:15FromDiscord<Zectbumo> yeah, not elegant
03:45:34FromDiscord<Elegantbeef> I mean you're making a \nix path
03:45:43FromDiscord<Elegantbeef> You can just do `"/usr/local"`
03:45:44FromDiscord<demotomohiro> It can be still relative path on windows.
03:46:52FromDiscord<demotomohiro> `https://nim-lang.org/docs/os.html#absolutePath,string` would be better.
03:47:30FromDiscord<demotomohiro> https://nim-lang.org/docs/os.html#%2F,string,string↵See example code.
03:47:40FromDiscord<Zectbumo> I see why it's ignored. because `"usr" / "" / "local"` didn't want to be `/usr//local` which is totally fine and equivalent actually
03:48:18FromDiscord<Zectbumo> lol, those examples...
03:48:35FromDiscord<Elegantbeef> > returns normalized path concatenation of head and tail, preserving whether or not tail has a trailing slash (or, if tail if empty, whether head has one).↵Ah yes this means something
03:48:56FromDiscord<Elegantbeef> Zect you made me see this typo you PR that fix šŸ˜›
03:49:13FromDiscord<Elegantbeef> Also nice to see someone write "whether or not"
03:49:15FromDiscord<Zectbumo> šŸ‘
03:49:30FromDiscord<Elegantbeef> Whether already fucking indicates "or not"!
03:49:39FromDiscord<Elegantbeef> Joke rage people, put pitchforks away
03:51:37FromDiscord<demotomohiro> If an user gives a path to directory `dir` and you make a path with `dir / "file.nim"` and `dir` was empty string, "/file.nim" would be not a path user expecting.
03:59:15FromDiscord<Zectbumo> Yeah, Nim lib redeemed. The way it is is better than I expected. Leading `/` is replaced with pathsep. Pretty cool
04:00:37FromDiscord<Zectbumo> And no need to test for empty string and replace with `.` because "it just works"ā„¢
04:03:44FromDiscord<Zectbumo> In reply to @Elegantbeef "Zect you made me": How to reword this? The use of parenthesis make it awkward
04:04:29FromDiscord<Elegantbeef> remove the "or not" and replace the "if" that should be is
04:06:10FromDiscord<Elegantbeef> > returns normalized path concatenation of head and tail, preserving whether the tail has a trailing slash or if tail is empty whether head has one.
04:06:44FromDiscord<Elegantbeef> I'm not known for my great english skills but that's the gist of what i'd do
04:07:41FromDiscord<Zectbumo> On it
05:06:00*rockcavera quit (Remote host closed the connection)
05:21:50*jmdaemon joined #nim
05:26:48*jmdaemon quit (Ping timeout: 248 seconds)
05:30:07*jmdaemon joined #nim
05:30:45*jmdaemon quit (Remote host closed the connection)
05:34:34FromDiscord<Luckayla> man, trying to figure out how to use table arrays in toml
05:34:38FromDiscord<Luckayla> documentation is very sparse
05:46:29FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=40c1
05:47:46FromDiscord<uncle jim> In reply to @Avahe "Take a look at": undeclared identifier: 'rectangleColor'
05:47:47FromDiscord<Luckayla> sent a code paste, see https://play.nim-lang.org/#ix=40c2
05:48:37FromDiscord<enthus1ast> ah i see, can remeber that i had this config before
05:48:52FromDiscord<enthus1ast> this kind of config i mean
05:49:06FromDiscord<Prestige> did you import sdl2/gfx @uncle jim
05:50:10FromDiscord<uncle jim> In reply to @Avahe "did you import sdl2/gfx": we really need a documentation for sdl2 in ni
05:50:14FromDiscord<uncle jim> (edit) "ni" => "nim"
05:50:38FromDiscord<Elegantbeef> It's pretty much the same as C
05:50:49FromDiscord<Prestige> ^ read https://wiki.libsdl.org/
05:50:58FromDiscord<Prestige> and look through the wrappif
05:51:00FromDiscord<Prestige> (edit) "wrappif" => "wrapper"
05:51:49FromDiscord<uncle jim> wut's this `SDL2_gfx.dll` now!?
05:52:09FromDiscord<uncle jim> oh
05:52:12FromDiscord<uncle jim> got it
05:52:37FromDiscord<uncle jim> but is a kind of an addon right?
05:55:10FromDiscord<Luckayla> I'm using generated toml for storing posts of my static site generator since markdown has no way to include metadata directly
05:55:22FromDiscord<Luckayla> and existing static site generators for nim are way heavier than what I need
05:55:48FromDiscord<uncle jim> @Prestige there's gotta be a way to do this without sdl2_gfx right?
05:56:14FromDiscord<Elegantbeef> What are we trying to do?
05:56:44FromDiscord<uncle jim> In reply to @Elegantbeef "What are we trying": who is this meant for?
05:56:52FromDiscord<Elegantbeef> Yo
05:56:55FromDiscord<Elegantbeef> You\
05:57:02FromDiscord<Prestige> He wants to draw a rectangle
05:57:08FromDiscord<uncle jim> In reply to @Avahe "He wants to draw": YE
05:57:25FromDiscord<Elegantbeef> Doesnt sdl2 have `setPixel` or w/e
05:58:02FromDiscord<enthus1ast> sent a code paste, see https://paste.rs/jKN
05:58:15FromDiscord<enthus1ast> with print it was easier to figure out
05:58:28FromDiscord<Luckayla> oh wow, thank you!
05:58:30FromDiscord<enthus1ast> still its a little tricky imho, but toml is so flexible
05:58:48FromDiscord<Luckayla> I knew it had to be simple, just no good examples of it
05:59:36FromDiscord<Elegantbeef> Like if you arent using sdl2\_gfx afaik you have to have the texture you want or manually set pixels
05:59:38FromDiscord<uncle jim> In reply to @Elegantbeef "Doesnt sdl2 have `setPixel`": wut's that bruh
05:59:58FromDiscord<Elegantbeef> Cmon use your search engine
06:00:23FromDiscord<uncle jim> In reply to @Elegantbeef "Cmon use your search": i'm bad at duckduckgo-ing
06:00:30FromDiscord<Elegantbeef> `sdl2 set pixel`
06:00:35FromDiscord<Luckayla> does Nim have anything like makefiles?
06:00:48FromDiscord<Luckayla> obiously I could just use a makefile, but I try to avoid those archaic things :p
06:00:54FromDiscord<Elegantbeef> it has `nimble` for packages you can use `nake` or make
06:01:12FromDiscord<Elegantbeef> https://forum.nim-lang.org/t/9230
06:03:44FromDiscord<uncle jim> how does this work?↵ sdl2.drawRect(renderer, rect: Rect)
06:04:00FromDiscord<uncle jim> what shout be in `rect`'s place?
06:04:31FromDiscord<Elegantbeef> Probably a rect
06:04:40FromDiscord<uncle jim> In reply to @Elegantbeef "Probably a rect": how i maek rect
06:04:42FromDiscord<uncle jim> lel
06:05:08FromDiscord<enthus1ast> @Luckayla\: the good thing about nimble files ist that you can write a subset of nim in them
06:05:09FromDiscord<Elegantbeef> `Rect(x: 0, y: 0, w: 100, h: 200)`
06:05:34FromDiscord<Elegantbeef> You know you have as much source code available as i do right?
06:05:56FromDiscord<uncle jim> In reply to @Elegantbeef "`Rect(x: 0, y: 0,": expression '' has no type (or is ambiguous)
06:06:49FromDiscord<Elegantbeef> Yea that's not the code
06:07:14FromDiscord<uncle jim> bruh
06:07:17FromDiscord<uncle jim> bruh
06:07:21FromDiscord<uncle jim> mometn
06:08:02FromDiscord<Elegantbeef> I mean i have 0 clue what bindings you're using or what your actual code is
06:08:25FromDiscord<uncle jim> In reply to @Elegantbeef "I mean i have": i am using ↵https://github.com/nim-lang/sdl2
06:08:50FromDiscord<Elegantbeef> Ok so then you looked at the definition and seen it taks a `var Rect` or `ptr Rect`
06:08:54FromDiscord<Elegantbeef> Of course you have
06:09:07FromDiscord<Elegantbeef> Then you searched "Rect" and found the source
06:09:22FromDiscord<Luckayla> In reply to @enthus1ast "<@674438327927308358>\: the good thing": Neat, I looked into it and decided to use my own homebrewed program I previously wrote
06:09:26FromDiscord<Luckayla> which is basically python-scriptable make files
06:09:56FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=40c6
06:10:12FromDiscord<Luckayla> It's in a very alpha state but has features like platform-dependent build steps, etc
06:11:04FromDiscord<Elegantbeef> If it's not evident i'm relatively annoyed with your spoonfeed attitude
06:11:23FromDiscord<uncle jim> In reply to @Elegantbeef "If it's not evident": iss this meant for me?
06:11:34FromDiscord<Elegantbeef> Of course
06:11:59FromDiscord<uncle jim> https://tenor.com/view/attacked-rhoc-rhbh-rhnj-feelings-gif-5924682
06:12:40FromDiscord<uncle jim> ok ik you guys are annoyed by me asking questions about how to do literally everything
06:12:59FromDiscord<uncle jim> i apologize for that
06:13:35FromDiscord<enthus1ast> Yet Another Build System? \:D↵(@Luckayla)
06:13:41FromDiscord<enthus1ast> YABS?
06:14:10FromDiscord<Luckayla> In reply to @enthus1ast "Yet Another Build System?": Basically yeah, couldn't find one that suited my needs for a project I was working on at the time
06:14:20FromDiscord<Elegantbeef> IIABS!
06:14:21FromDiscord<Luckayla> I named it "Spells"
06:14:33FromDiscord<Elegantbeef> Iiabs is another build system
06:14:36FromDiscord<Luckayla> as in the magic kind
06:15:00FromDiscord<enthus1ast> its the same in science, everyone build their pipeline tool
06:15:23FromDiscord<Luckayla> I would gladly deprecate my own project and use something else if it had equivalent features lol
06:16:01*wallabra quit (Ping timeout: 256 seconds)
06:16:14FromDiscord<Luckayla> platform independent building with a single install, no requirements for a programming language (Spells' Python scripting requires it to be installed as a Python module, however its standard builds using toml/json are ran from its executable and do not require python to be installed)
06:18:08FromDiscord<enthus1ast> my latest python experience is that its the same old compatibility and module disaster like everything
06:18:32FromDiscord<enthus1ast> nowadays i actually like building c more than python \:)
06:18:35FromDiscord<enthus1ast> thanks to cmake
06:18:46FromDiscord<Elegantbeef> My view is now just "fuck using any single language for scripting"
06:18:55FromDiscord<Elegantbeef> If i want to script something give me a WASM runtime
06:19:12FromDiscord<enthus1ast> fuaslfs? no bad name
06:19:13FromDiscord<Elegantbeef> I do not want to deal with the finicky behaviour of your language of choice
06:19:31FromDiscord<Elegantbeef> Fua for short?
06:19:54FromDiscord<enthus1ast> ok Fua, much better
06:20:35FromDiscord<enthus1ast> but then even make, on linux its good, but on windows i basically need a linux runtime to be fun
06:20:53FromDiscord<Elegantbeef> There are just so many benefits to using a WASM runtime vs. an embedded language imo
06:21:11FromDiscord<enthus1ast> wait what, no wasm joke?
06:21:19FromDiscord<Elegantbeef> No i was being serious
06:21:39FromDiscord<Elegantbeef> Using a wasm runtime for scripting programs is fucking ingenious imho
06:21:47FromDiscord<enthus1ast> so you ship your stuff as a webapplication and download the ready made binary? \:)
06:22:21FromDiscord<Elegantbeef> You have a language agnostic API that you can safely ship the compiled extensions around which are self contained and only can depend on other extensions
06:22:24FromDiscord<Elegantbeef> No not web applications
06:22:39FromDiscord<Elegantbeef> There are native wasm runtimes which just run wasm code, so you can create a plugin system using them
06:22:48FromDiscord<enthus1ast> ah i cee
06:22:58FromDiscord<enthus1ast> s/c/s/
06:23:17FromDiscord<Elegantbeef> They're sandboxed environments so it's a lot like dynamic libraries but that they're safer
06:24:36FromDiscord<Shiba> how can i force nim to compile one single file without the modules
06:24:43FromDiscord<Shiba> (edit) "how can i force nim to compile one single file without the modules ... " added "?"
06:25:18FromDiscord<Elegantbeef> Like this is a module for my wasm test project https://github.com/beef331/aiarena/blob/master/aimodules/flytocenter.nim
06:25:28FromDiscord<Elegantbeef> What?
06:26:34FromDiscord<Luckayla> sent a code paste, see https://play.nim-lang.org/#ix=40c8
06:27:33FromDiscord<enthus1ast> interesting
06:27:37FromDiscord<Luckayla> in toml flavor at least
06:27:39FromDiscord<Shiba> In reply to @Elegantbeef "What?": i wanna compile one nim files without the modules
06:27:48FromDiscord<Shiba> (edit) "files" => "file"
06:28:09FromDiscord<enthus1ast> what do you mean "without the modules" ?
06:28:16FromDiscord<enthus1ast> what modules?
06:28:35FromDiscord<enthus1ast> which modules (? english hard)
06:28:58FromDiscord<Elegantbeef> Perhaps they're using libraries and want to statically link them?
06:29:13FromDiscord<Shiba> those ones https://media.discordapp.net/attachments/371759389889003532/986517721695014952/5.PNG
06:29:26FromDiscord<enthus1ast> @Luckayla\: i see one thing that could really quickly become problematic\: source code in strings
06:29:26FromDiscord<Elegantbeef> You... cant
06:29:40FromDiscord<Elegantbeef> Nim only compiles imported modules
06:29:41FromDiscord<uncle jim> ElegantBeef
06:30:01FromDiscord<enthus1ast> @Shiba\: shiba this is stuff your programm needs from the stdlib
06:30:07FromDiscord<enthus1ast> stdlib/compiler etc
06:30:44FromDiscord<enthus1ast> what is your goal?
06:31:39FromDiscord<Shiba> so it's like , its compiles them everytime
06:31:48FromDiscord<Shiba> there like 26k lines of code
06:32:23FromDiscord<Shiba> (edit) "there" => "they are"
06:32:42FromDiscord<enthus1ast> but not everything lands in your executable, only the stuff you need from the modules
06:33:23FromDiscord<Elegantbeef> Incremental compilation is on it's way eventually it'll land
06:33:38FromDiscord<Elegantbeef> But Nim also doesnt recompile all files
06:33:55FromDiscord<Elegantbeef> are you passing `-f` by anychance?
06:34:08FromDiscord<enthus1ast> yes nim caches a lot in "nimcache"
06:34:24FromDiscord<enthus1ast> there you can see a lot of c files
06:34:30FromDiscord<enthus1ast> c and also .o files imho
06:35:08FromDiscord<Shiba> sent a long message, see http://ix.io/40c9
06:35:30FromDiscord<Shiba> its kinda dumb but i want it
06:36:08FromDiscord<Elegantbeef> I mean it's going to go through all the modules again
06:36:13FromDiscord<Rika> happy? https://media.discordapp.net/attachments/371759389889003532/986519479427170305/unknown.png
06:36:17FromDiscord<Elegantbeef> Like i said it doesnt have IC
06:36:21FromDiscord<Elegantbeef> Or a reliable IC
06:36:57FromDiscord<Elegantbeef> you can do `--processing:filenames` to get more detailed information
06:37:11FromDiscord<Rika> thats not what he mentioned
06:37:16FromDiscord<Rika> he mentioned "CC: ..."
06:37:52FromDiscord<Elegantbeef> Those are files being compiled by teh C compiler, if the Nim file hasnt changed it'll use the cache
06:38:08FromDiscord<Elegantbeef> If you're passing `-f` or have a config with `-f` or `--forceBuild` it'll compile them
06:38:29FromDiscord<Elegantbeef> That's the point of that command afterall
06:39:21FromDiscord<Rika> i'm just complying with what he said, disclaimer
06:39:53FromDiscord<Elegantbeef> oh i know but they're saying they're recompiling all the modules again and again which means they have `-f`
06:40:11FromDiscord<Shiba> In reply to @Rika "happy?": core base frequency ?
06:40:17FromDiscord<Rika> no
06:40:19FromDiscord<Rika> that doesnt matter
06:40:47FromDiscord<Shiba> yea we've got pretty close results , except that im using tcc
06:40:49FromDiscord<Rika> if you want i could boot my pi and run it
06:40:56FromDiscord<Rika> (edit) "if you want i could boot my pi and run it ... " added "there"
06:41:02FromDiscord<Shiba> no , thanks
06:41:05FromDiscord<Rika> though im also not really willing to xd
06:41:11FromDiscord<Elegantbeef> I mean if you dont want to recompile it contribute to IC
06:42:16FromDiscord<Shiba> i noticed that it's does not support multi core compiling "thing like that", would it's make a difference tho
06:42:32FromDiscord<Shiba> (edit) removed "it's"
06:42:43FromDiscord<Elegantbeef> Multicore compiling is relatively hard
06:42:49FromDiscord<Elegantbeef> You cannot really do it reliably
06:43:02FromDiscord<Elegantbeef> How do you compile a file if you need another file that another core is looking at
06:43:31FromDiscord<Shiba> so like nim files are connected to each other somehow
06:43:38FromDiscord<Elegantbeef> IC and packed AST is the way to improve compile times
06:43:45FromDiscord<Elegantbeef> Not multicore compiling
06:43:57FromDiscord<enthus1ast> well you could if you have their types and proc def's etc
06:44:00FromDiscord<Shiba> other languages like c are fine with that
06:44:17FromDiscord<Elegantbeef> The issue with Nim's compile time is that it's not designed for speed
06:44:31FromDiscord<Elegantbeef> It does not use cache friendly design
06:44:43FromDiscord<Elegantbeef> As such it's not a fast compiler
06:45:06FromDiscord<Shiba> (edit) "other languages ... like" added "compilers"
06:45:08FromDiscord<Rika> In reply to @Elegantbeef "Multicore compiling is relatively": not really, arent DAGs a relatively-solved problem for multiprocessing
06:45:16FromDiscord<Rika> i mean directed acyclic graphs
06:45:34FromDiscord<Rika> nonetheless i dont think multicore would particularly help anyway
06:45:54FromDiscord<Elegantbeef> Well it's not the solution given the present layout of data
06:46:19FromDiscord<Rika> it isnt yes
06:46:51FromDiscord<Elegantbeef> Zig is stupid fast and it's single threaded afaik, it's just designed to be fast
06:47:05FromDiscord<Rika> redesigned no? it wasnt initially
06:47:35FromDiscord<Elegantbeef> Zig's C++ compiler is fast, it's new one is just much faster
06:47:42*PMunch joined #nim
06:48:57FromDiscord<Shiba> In reply to @Rika "nonetheless i dont think": yea youre right https://media.discordapp.net/attachments/371759389889003532/986522682570993675/Sans_titre.png
06:49:04FromDiscord<Elegantbeef> Regardless any brave soul that replaces the PNode layout with a PackedAST layout in Nim has my respect
06:49:13FromDiscord<Shiba> i feel like my math is uncorrect
06:49:13FromDiscord<Rika> In reply to @Shiba "yea youre right": oh thats really idealistuc
06:49:29FromDiscord<Rika> you need to account for how multicore has a good amount of overhead
06:50:08FromDiscord<enthus1ast> it all depends on how good a problem is distributable (of if you find smart ways to make it distributable)
06:50:51FromDiscord<Elegantbeef> So this is where we're just ignoring the actual culprit of slow code? šŸ˜„
06:51:21FromDiscord<Elegantbeef> I'd argue given Nim's current design multicore compilation would make it slower
06:51:28FromDiscord<Elegantbeef> Even if orc worked with it since there'd be so much locking to access AST
06:52:52FromDiscord<Elegantbeef> It'd be a nightmare
06:54:00FromDiscord<Elegantbeef> Also what C compiler is multithreaded?
06:54:26FromDiscord<Rika> arent most?
06:54:30FromDiscord<Rika> gcc clang etc
06:54:31FromDiscord<Elegantbeef> No
06:54:34FromDiscord<Rika> ????
06:54:43FromDiscord<Rika> are you sure about that
06:55:24FromDiscord<Rika> i think i get it
06:55:51FromDiscord<Rika> but only because c compilers deal with individual files
06:55:59FromDiscord<Rika> after preprocessing
06:58:17FromDiscord<Elegantbeef> Yea looks like i'm wrong and they're multithread but only in select cases that allow it
06:58:38FromDiscord<Rika> most cases they do
07:15:42*madprog_ is now known as madprog
07:24:09*gsalazar joined #nim
07:52:10*ltriant quit (Ping timeout: 240 seconds)
08:00:37*xet7 joined #nim
08:26:08FromDiscord<Luckayla> I've broken sytntax highlighting on vs code
08:26:09FromDiscord<Luckayla> lol
08:26:43FromDiscord<Elegantbeef> Pragmas or multiline strings?
08:27:07FromDiscord<Luckayla> neither, just a slow decline in highlighting over some procs
08:27:27FromDiscord<Luckayla> everything just turned blue like it's a string despite no strings being unclosed
08:47:45PMunchNew release of notificatcher :) https://github.com/PMunch/notificatcher
08:55:15*ltriant joined #nim
08:59:52*eull joined #nim
09:06:38*ltriant quit (Ping timeout: 246 seconds)
09:17:01*ltriant joined #nim
09:19:12PMunchHmm, anyone remember the name of the small program that replaces the terminal with the window of the recently started program?
09:19:30PMunchI think I even have it installed, just can't remember what it's called :P
09:20:52PMunchAh, devour was the one I was thinking of
09:22:35FromDiscord<Elegantbeef> Oh that's fancy
09:22:43*ltriant quit (Ping timeout: 246 seconds)
09:23:46PMunchYeah it's pretty neat
09:24:18FromDiscord<uncle jim> sent a code paste, see https://paste.rs/Fha
09:24:33FromDiscord<uncle jim> (edit)
09:24:58FromDiscord<Elegantbeef> https://github.com/nim-lang/sdl2/blob/ed842e0092ab1c45176e95ab35d6d244ef48a509/examples/sdl_skeleton.nim
09:25:38FromDiscord<Elegantbeef> There are examples you can refer to if you're lost, or you can search the package files
09:26:09FromDiscord<Elegantbeef> https://github.com/nim-lang/sdl2/search?q=SDL_RenderClear
09:32:31*om3ga joined #nim
09:41:19*kayabaNerve joined #nim
09:41:51FromDiscord<jmgomez> hey guys, there isnt a trim like function in strutils to remove whitespaces at the beginning of a string and at the end?
09:42:13*ltriant joined #nim
09:42:53FromDiscord<amadan> https://nim-lang.org/docs/strutils.html#strip%2Cstring%2Cset%5Bchar%5D↵There is `strip` which (by default) removes whitespace from beginning and end of string
09:47:24*ltriant quit (Ping timeout: 258 seconds)
09:48:28FromDiscord<Rika> Maybe we should have a ā€œcommon namesā€ portion in the docs
09:57:39FromDiscord<ripluke> Does this sync with irc?
09:58:31FromDiscord<Rika> The channel? Yes
10:00:37FromDiscord<ripluke> Oh cool
10:03:04FromDiscord<ripluke> In reply to @PMunch "New release of notificatcher": This could come in handy as I’m working on a lemonbar setup
10:04:18*matt_13373 joined #nim
10:04:37*matt_1337 quit (Ping timeout: 260 seconds)
10:04:37*matt_13373 is now known as matt_1337
10:13:11FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=40cH
10:16:39FromDiscord<j-james> In reply to @PMunch "Ah, devour was the": woah, that's nice
10:16:52FromDiscord<j-james> do you know of a wayland version?
10:18:16FromDiscord<Clonkk> Does `nimble setup` read the result of `nimble lock` ?
10:27:41FromDiscord<demotomohiro> @jmgomez https://nim-lang.org/docs/manual.html#importcpp-pragma-importcpp-for-objects↵`TMap<'0, '1>()` doesnt work?
10:28:37FromDiscord<impbox [ftsf]> with httpclient async, I get `Exception message: [400] Bad Request.` and a traceback but the traceback doesn't really tell me anything about where in my code the http call originated or which url or anything, is there a way I can get more a useful traceback?
10:30:13FromDiscord<jmgomez> sent a code paste, see https://paste.rs/Vbr
10:31:38FromDiscord<demotomohiro> @jmgomez This repo can be a good example to bind C++ template functions/classes: https://github.com/Clonkk/nim-cppstl
10:32:40FromDiscord<jmgomez> Thanks, but it doesnt seem to have that particular use case 😦
10:47:12*fowl quit (Ping timeout: 260 seconds)
10:49:46PMunch@ripluke, yes that is kinda what I'm using it for. At the moment I've got Nimdow set up to blink the notifications. Nimdow also supports clickable regions in the text (separated by the ASCII unit separator) so I even have a clear button and a way to open my notifications with the mouse :)
10:50:29PMunch@j-james, unfortunately not. Haven't used Wayland
10:51:09FromDiscord<j-james> oh well
10:51:27FromDiscord<j-james> i did find https://wio-project.org but it's a full compositor
10:59:21*kayabaNerve quit (Ping timeout: 256 seconds)
10:59:51*ltriant joined #nim
11:02:14FromDiscord<j-james> what is this error i'm getting from `json.add()`? `Error: expression 'add(pkgs[p["name"].str], "count", count)' has no type (or is ambiguous)`
11:02:22FromDiscord<j-james> (edit) "`Error:" => "↵`Error:"
11:03:23FromDiscord<Rika> Add doesn’t return a type does it?
11:04:34*ltriant quit (Ping timeout: 246 seconds)
11:05:21FromDiscord<j-james> oh, it doesn't
11:05:23FromDiscord<j-james> i see
11:05:39*arkurious joined #nim
11:08:26FromDiscord<j-james> hmm interesting that you can call `.add()` on an immutable variable
11:08:40FromDiscord<j-james> is that because `JsonNode` is a `ref JsonNodeObj`?
11:09:33FromDiscord<Rika> Yes
11:20:32*ltriant joined #nim
11:43:30*kayabaNerve joined #nim
12:09:09FromDiscord<tsoj> sent a code paste, see https://paste.rs/8jf
13:14:20FromDiscord<flicko> sent a code paste, see https://paste.rs/iPE
13:15:18PMunch@flicko, because you're using Nimble and haven't added prologue as a requirement
13:16:41FromDiscord<enthus1ast> can you try\:↵nim c -r app.nim
13:17:12FromDiscord<flicko> In reply to @PMunch "<@482139697796349953>, because you're using": aight thx it works↵↵i added `requires "prologue == 0.6.0"` to my `nim_test.nimble` file
13:18:27FromDiscord<enthus1ast> did not know that nimble behaves this way↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
13:20:33PMunch@enthus1ast, it's pretty nice, that way you are guaranteed that you've listed all your requirements
13:23:37FromDiscord<enthus1ast> yeah, i always forget some...
13:37:35*xet7 quit (Remote host closed the connection)
13:50:34FromDiscord<dom96> important thing to keep in mind: `nim c` (picks up all the latest versions of each package in ~/.nimble), `nimble c` (only picks up the stuff in .nimble file)
13:51:03FromDiscord<dom96> I know there are some that dislike the `nim c` behaviour but for fast prototyping it's a great feature
13:51:15FromDiscord<treeform> In reply to @PMunch "I was just wondering": I am back home, I don't see a PR from you, mind if I just copy paste your code?
13:51:57PMunch@treeform, copy away :) I just wasn't sure where to put it, that's why I didn't make a PR
14:00:20*PMunch quit (Quit: Leaving)
14:07:08FromDiscord<flicko> sent a code paste, see https://play.nim-lang.org/#ix=40dD
14:07:24FromDiscord<flicko> (edit) "https://play.nim-lang.org/#ix=40dD" => "https://play.nim-lang.org/#ix=40dE"
14:29:26FromDiscord<treeform> In reply to @PMunch "<@107140179025735680>, copy away :)": Thoughts: https://github.com/treeform/chroma/pull/34/files
14:31:25*kayabaNerve quit (Ping timeout: 246 seconds)
14:46:41*derpydoo joined #nim
14:49:04*vicfred joined #nim
16:58:41NimEventerNew thread by Morturo: Learning threads, see https://forum.nim-lang.org/t/9237
17:05:35*pro joined #nim
17:28:56*gsalazar quit (Ping timeout: 248 seconds)
17:29:52*smvg joined #nim
17:32:49*pro quit (Quit: pro)
17:32:50NimEventerNew thread by Arnetheduck: Back to the roots of v2.. and what it could be, see https://forum.nim-lang.org/t/9238
17:39:14FromDiscord<Xzayler> how can I try to convert a string `"6"` to a float?
17:40:58FromDiscord<Xzayler> is it not just↵`var myString = "6"`↵`float(myString)`
17:41:00FromDiscord<Xzayler> (edit) ""6"`↵`float(myString)`" => ""6"`↵`float(myString)`?"
17:43:41FromDiscord<Xzayler> apparently if I↵`var maxSize = float(self.maxSizeLine.text)`↵maxSize is a string when I pass it into a function šŸ¤”
17:43:47FromDiscord<Xzayler> (edit) "float(self.maxSizeLine.text)`↵maxSize" => "float(self.maxSizeLine.text)`↵`maxSize`"
17:44:17FromDiscord<Xzayler> the thing is the string is given at runtime so..
17:44:48FromDiscord<Xzayler> I guess the compiler doesn't know if it will be able to convert it to float
17:49:15*smvg quit (Read error: Connection reset by peer)
17:50:10FromDiscord<Xzayler> This was probably a dumb idea anyways
18:02:05*vicecea quit (Read error: Connection reset by peer)
18:02:34*vicecea joined #nim
18:04:00*xet7 joined #nim
18:17:03FromDiscord<demotomohiro> Use `parseFloat`: https://nim-lang.org/docs/strutils.html#parseFloat%2Cstring
18:17:46FromDiscord<demotomohiro> !eval import strutils; echo parseFloat("6")
18:17:53NimBot6.0
18:37:59*rwb is now known as rb
18:43:25*kayabaNerve joined #nim
18:44:04*pro joined #nim
18:45:24FromDiscord<gongongagaga> sent a code paste, see https://play.nim-lang.org/#ix=40eH
18:56:29*kenran joined #nim
18:56:54*kenran quit (Client Quit)
19:00:31*rockcavera joined #nim
19:00:31*rockcavera quit (Changing host)
19:00:31*rockcavera joined #nim
19:08:25FromDiscord<j-james> choosenim doesn't support openssl 3, yet
19:08:28FromDiscord<j-james> https://github.com/dom96/choosenim/issues/297
19:30:37*eull quit (Quit: Konversation terminated!)
20:12:31FromDiscord<dom96> yeah, you need openssl 1
20:12:38FromDiscord<dom96> the real issue here is that Nim doesn't support openssl 3
20:23:37FromDiscord<!Patitotective> is there any async/multi-threaded "download manager" library for nim? right now my download system is pretty bad hehe
20:25:04FromDiscord<Rika> no, why
20:25:10FromDiscord<Rika> i mean, not that i know of
20:25:50FromDiscord<huantian> the best you got is probably modify my crappy downloader
20:25:51FromDiscord<!Patitotective> In reply to @Rika "no, why": cause writing my own takes more time lol↵also i dont know much about async stuff
20:25:58*pro quit (Quit: pro)
20:26:01FromDiscord<!Patitotective> In reply to @huantian "the best you got": šŸ‘€
20:26:48FromDiscord<huantian> though annoyingly I had to load all the files into memory before writing them
20:26:59FromDiscord<huantian> because I can't figure out a way to stream downlaod them to files
20:26:59FromDiscord<!Patitotective> In reply to @huantian "the best you got": https://github.com/huantianad/rd-downloader ?
20:27:02FromDiscord<huantian> yeah
20:27:10FromDiscord<huantian> (edit) "files" => "files, the way std's downloadFile does"
20:27:43FromDiscord<huantian> I kinda wanna see if I can make myself an async semaphore so I can not use callbacks
20:29:06FromDiscord<Rika> oh yeah you asked about the progress bar thing
20:29:17FromDiscord<Rika> haa i really need to figure out what to do with that lib
20:34:01FromDiscord<huantian> I mean the current state of it is fine for my usecase
20:36:31NimEventerNew Nimble package! imstyle - A nice way to manage your ImGui application's style, see https://github.com/Patitotective/ImStyle
20:37:55FromDiscord<!Patitotective> what name could the library have šŸ¤” ↵downder? Lol
21:08:54FromDiscord<!Patitotective> soo i want to have everything inside a `Downloader` object (channels and the thread) but since i need to use channel (that is a field of `Downloader`) inside `downloader.thread` it won't work because `channel` has to be var and i dont think i can pass a var arg to a thread :facer
21:08:58FromDiscord<!Patitotective> (edit) ":facer" => "🤨"
21:09:21FromDiscord<Elegantbeef> Wait until you learn about heap allocated data
21:09:41FromDiscord<Elegantbeef> Though you probably should use async
21:09:47FromDiscord<Rika> Don’t thread downloads
21:10:04*wallabra joined #nim
21:11:21FromDiscord<huantian> I am wondering if I should thread my unzipping after downloading though..
21:12:10FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=40f9
21:12:14FromDiscord<Elegantbeef> Use async like a normal human
21:30:51FromDiscord<Phil> In reply to @Elegantbeef "Use async like a": I was so confused as to why I was seeing no futures in this code to handle all of this until I read your last line
21:31:16FromDiscord<Elegantbeef> Lol
21:31:20FromDiscord<Phil> Nice point to jump into the main channel
21:31:58FromDiscord<Elegantbeef> Indeed
21:47:49FromDiscord<Yepoleb> In reply to @huantian "I am wondering if": zlib decompression is very likely io bottlenecked and not cpu
21:49:03FromDiscord<huantian> ok good to know!
21:49:52FromDiscord<huantian> though actually I guess it still would block the async event loop
21:56:11FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=40fh
21:56:27FromDiscord<Elegantbeef> Poll at the end of your update loop
21:56:47FromDiscord<Elegantbeef> why are you `yield fut`?
21:57:30FromDiscord<!Patitotective> https://nim-lang.org/docs/asyncdispatch.html#asynchronous-procedures-handling-exceptions
21:57:33FromDiscord<!Patitotective> (edit) "https://nim-lang.org/docs/asyncdispatch.html#asynchronous-procedures-handling-exceptions ... " added "🤨"
21:57:52FromDiscord<!Patitotective> i dont want `await` to reraise the exception, i want to save it
21:57:55FromDiscord<!Patitotective> (edit) "it" => "the message"
22:03:54*Schnouki_ joined #nim
22:03:56FromDiscord<Elegantbeef> You should return the future add it to a seq and then `poll` at the end of your update then check if any future failed if so add the result
22:03:59FromDiscord<Elegantbeef> Atleast afaik
22:04:00*dmichiels_ joined #nim
22:04:13*toothlessgear_ joined #nim
22:04:48*ormiret_ joined #nim
22:04:54FromDiscord<Elegantbeef> I dont have a degree in asyncology
22:07:23*toothlessgear quit (Ping timeout: 250 seconds)
22:07:23*dmichiels quit (Ping timeout: 250 seconds)
22:07:24*ecs quit (Ping timeout: 250 seconds)
22:07:24*nullsh quit (Ping timeout: 250 seconds)
22:07:24*ormiret quit (Ping timeout: 250 seconds)
22:07:24*Schnouki quit (Ping timeout: 250 seconds)
22:07:25*toothlessgear_ is now known as toothlessgear
22:07:25*dmichiels_ is now known as dmichiels
22:07:25*Schnouki_ is now known as Schnouki
22:07:27*ormiret_ is now known as ormiret
22:07:59*ecs joined #nim
22:11:42FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=40fl
22:12:31FromDiscord<Rika> If you poll and there are no futures that is what you get
22:12:52FromDiscord<huantian> use waitFor asyncSleep(1) instead of poll if you want it to not error but then your program will just keep running
22:12:53FromDiscord<Rika> You have to ensure you don’t poll when there are no futures running
22:14:09FromDiscord<!Patitotective> In reply to @huantian "use waitFor asyncSleep(1) instead": do you mean `sleepAsync`?
22:14:24FromDiscord<Rika> Yes
22:14:46FromDiscord<!Patitotective> super, thanks↵it works :]
22:16:08FromDiscord<!Patitotective> is there any difference between `waitFor sleepAsync` and `poll`? šŸ¤”
22:17:34*nullsh joined #nim
22:22:09FromDiscord<Rika> As mentioned
22:24:29FromDiscord<!Patitotective> just that poll raises an error when no futures are running, right?
22:26:27*xet7 quit (Ping timeout: 240 seconds)
22:29:11FromDiscord<!Patitotective> also, what is prefered to use `Option[T]` or `tuple[avail: bool, val: T]` for procedure results?
22:29:16FromDiscord<!Patitotective> (edit) "results?" => "return types?"
22:29:55FromDiscord<Elegantbeef> Option
22:35:32*dtomato quit (Quit: Ping timeout (120 seconds))
22:35:57FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=40fr
22:38:45*xet7 joined #nim
22:41:02*dtomato joined #nim
22:42:15FromDiscord<!Patitotective> In reply to @Patitotective "what name could the": downder is a depressant drug soo i think ill go with downim
22:42:20FromDiscord<!Patitotective> (edit) "downim" => "_downim_"
22:42:47FromDiscord<Rika> Ah yes a combination of the two things I’d say to not do when naming projects
22:43:00FromDiscord<Rika> Add the project’s purpose and language used
22:43:44FromDiscord<!Patitotective> hmmm what can it be if not the project's purpose
22:45:03FromDiscord<Elegantbeef> I mean rika what about kashae and traitor?
22:45:10FromDiscord<Elegantbeef> or oopsie
22:45:20FromDiscord<Elegantbeef> They say the purpose but it's ever so slightly obfuscated
22:45:59FromDiscord<Rika> That’s maybe perhaps fine but
22:46:05FromDiscord<Rika> In this case it’s just
22:46:06FromDiscord<Rika> There
22:46:41FromDiscord<Elegantbeef> Like atleast do something creative like "Down Below" if you're going to use the function in the name
22:48:04FromDiscord<!Patitotective> DownIt šŸ˜Ž
22:48:05FromDiscord<!Patitotective> lol
22:48:31FromDiscord<Elegantbeef> Donout
22:48:35FromDiscord<Elegantbeef> Donut\
22:50:23FromDiscord<Rika> doughnut
22:50:30FromDiscord<Rika> Spell it right SMHHH
22:50:44FromDiscord<Elegantbeef> But both are valid spellings
22:50:52FromDiscord<Rika> I know I’m joking
22:51:06FromDiscord<Rika> Same thing with colour and the wrong spelling
22:51:08FromDiscord<Elegantbeef> This is the no jokes zone, and with that in mind i have to leave
22:52:10FromDiscord<!Patitotective> In reply to @Rika "Same thing with colour": centre
22:53:44FromDiscord<Rika> I was about to say that I still used ā€œcenterā€ but I kept on typing centre instead
22:56:45FromDiscord<!Patitotective> first time i saw centre i thought it was french
22:57:08FromDiscord<Rika> I do use meter though
23:27:35*vicfred quit (Quit: Leaving)