<< 05-07-2022 >>

00:00:07FromDiscord<retkid> ooh thats annoying
00:00:30*rockcavera quit (Ping timeout: 240 seconds)
00:01:06FromDiscord<retkid> In reply to @Elegantbeef "For finished to be": is this in your lib or stdlib
00:01:14FromDiscord<Elegantbeef> Finished is stdlib
00:11:42FromDiscord<retkid> gonna write a template which combines finished and ()
00:12:04FromDiscord<jonhj> Now is your Bitcoin wallet or coinbase 0.00000 I promise 0.80500 in less than 24 hours without sending money to anyone. Earn 0.764 in 7hours, No referrals, No Ads, No scams. Ask how(me)Or join https://t.me/+JdEg2rIn7E0wZDFk
00:12:07FromDiscord<jonhj> Join and ask how
00:12:15FromDiscord<retkid> <@&371760044473319454>
00:49:36*rockcavera joined #nim
00:49:36*rockcavera quit (Changing host)
00:49:36*rockcavera joined #nim
01:01:47FromDiscord<geekrelief> Hi, @ElegantBeef with nimscripter or the vm have you come across `Error: cannont evaluate at compile time` before?
01:02:14FromDiscord<Elegantbeef> Of course
01:02:31FromDiscord<Elegantbeef> It's the most common error either caused by badly written code or attempting to use imported C code
01:03:27FromDiscord<geekrelief> hmm I'm not importing C code, and I'm not sure why my code is bad.. cause it works unless I comment out one line
01:03:50FromDiscord<Elegantbeef> @Prestige\: No clue if curious but damn is this wayland example compositor much nicer than any reference X WM 😄 https://gitlab.freedesktop.org/wlroots/wlroots/-/blob/master/tinywl/tinywl.c
01:03:56FromDiscord<Elegantbeef> Well code or didnt happen
01:04:03FromDiscord<Elegantbeef> What's the line and context
01:04:29FromDiscord<geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=41Db
01:05:10FromDiscord<geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=41Dc
01:05:33FromDiscord<geekrelief> if I comment out the `var a {.test.}` line I get the Error: cannot value at compile time: v
01:07:10FromDiscord<geekrelief> https://media.discordapp.net/attachments/371759389889003532/993684429308428399/y1qzdGCcjn.mp4
01:07:47FromDiscord<Elegantbeef> I know what a compile error is, but thanks for the video 😄
01:08:07FromDiscord<geekrelief> sure, more info is better right? anyway, just wanted to give context
01:08:14FromDiscord<geekrelief> any clue why that's happening?
01:09:28FromDiscord<Elegantbeef> The error doesnt appear with the normal Nim VM does it?
01:10:04FromDiscord<geekrelief> sent a code paste, see https://paste.rs/NY8
01:10:19FromDiscord<geekrelief> that's the normal nim vm right?
01:10:20FromDiscord<Elegantbeef> Sure but we can just do `nim e` and run the main file
01:10:25FromDiscord<Elegantbeef> To reduce the stupidity
01:10:36FromDiscord<Elegantbeef> The same error appears of course
01:11:00FromDiscord<geekrelief> you mean `nim e main.nims`?
01:11:01FromDiscord<geekrelief> that works
01:11:34FromDiscord<Elegantbeef> So it seems like it's a vm issue with `{.compileTime.}`
01:12:11FromDiscord<Elegantbeef> changing it to `var code: NimNode` removes the issue
01:12:42NimEventerNew Nimble package! fushin - Fetch fushinsha serif data and save as csv files, see https://github.com/eggplants/fushin
01:13:34FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=41Dd
01:14:21FromDiscord<Elegantbeef> I assume it's something along the lines of 'NimVm doesnt care about compileTime as it's runtime but plays with the compile time pragma'
01:14:33FromDiscord<Elegantbeef> Evaluate the code using a debug compiler if you want to fix it
01:14:39FromDiscord<Elegantbeef> Otherwise make an issue if one doesnt exist of corse
01:14:50FromDiscord<Prestige> In reply to @Elegantbeef "<@778498877464117248>\: No clue if": sweet
01:14:51FromDiscord<geekrelief> thanks, yeah I'll make an issue
01:15:29FromDiscord<Elegantbeef> Using `: string` and `.repr` is just dumb imo anyway but ymmv
01:17:13FromDiscord<Elegantbeef> Given this is on the VM it's probably just compileTime being useless
01:17:25FromDiscord<Elegantbeef> There is no difference between compile time and runtime in the VM iirc it runs code as it gets told to
01:17:49FromDiscord<Elegantbeef> Actually that's wrong
01:20:41FromDiscord<Rika> In reply to @NimEventer "New Nimble package! fushin": Strangely specific package haha
01:21:13FromDiscord<Elegantbeef> The install instructions are are funny
01:21:30FromDiscord<Elegantbeef> Literally the exact same thing just with more steps 😄
01:23:51FromDiscord<geekrelief> to constrain the issue further, code is an uninitialized var, if you give it a value it'll compile
01:24:20FromDiscord<Elegantbeef> Yea i think on the VM something with compileTime makes it go "Hey the next statement is my r value"
01:24:43FromDiscord<geekrelief> thx for the help!
01:24:52FromDiscord<Elegantbeef> Which is why it complains about the next variable but not macro
01:25:02FromDiscord<Elegantbeef> I'd be curious to know if it complains about a procedure declaration
01:26:24FromDiscord<geekrelief> with just a declaration the compiler says it expects an implementation
01:27:04FromDiscord<Elegantbeef> I mean you do need a declaration 😄
01:27:11FromDiscord<Elegantbeef> A full declaration not a forward one
01:28:05FromDiscord<geekrelief> ok, yeah a full one gives no error
02:22:29FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/993703379907911700/unknown.png
02:22:35FromDiscord<retkid> this is some of the nim im more proud of
02:23:22FromDiscord<retkid> its not very complex, but it feels good to my brain
02:23:26FromDiscord<Elegantbeef> you can jusut do `for x in it()`
02:23:40FromDiscord<retkid> i could
02:24:10FromDiscord<retkid> certainly
02:24:15FromDiscord<retkid> do i want to tho
02:24:18FromDiscord<Elegantbeef> Instead of the while loop
02:25:01FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/993704017756688569/unknown.png
02:25:02FromDiscord<retkid> yea thats better
02:25:25FromDiscord<retkid> this iterator is also a lot faster than my old method for some reason
02:25:31FromDiscord<retkid> like 2x faster per image
02:25:34FromDiscord<Elegantbeef> cause it doesnt reallocate
02:25:34FromDiscord<retkid> ¯\_(ツ)_/¯
02:26:03FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/993704280336912404/unknown.png
02:26:09FromDiscord<retkid> this is what it looks like but a bit more stuff
02:26:20FromDiscord<retkid> so idk why it would be faster
02:47:32FromDiscord<zhmtzhmt> sent a code paste, see https://play.nim-lang.org/#ix=41Dk
02:47:43FromDiscord<zhmtzhmt> how to replace / with "."
02:48:35FromDiscord<zhmtzhmt> sent a code paste, see https://play.nim-lang.org/#ix=41Dl
02:48:52FromDiscord<Rika> That isn’t the issue
02:49:00FromDiscord<Rika> What other import paths do you have
02:49:56FromDiscord<zhmtzhmt> sent a code paste, see https://play.nim-lang.org/#ix=41Dm
02:50:10FromDiscord<Rika> That’s your issue
02:50:12FromDiscord<Elegantbeef> well there's your problem
02:50:26FromDiscord<zhmtzhmt> line 3
02:50:26FromDiscord<zhmtzhmt> sent a code paste, see https://play.nim-lang.org/#ix=41Dn
02:50:40FromDiscord<Elegantbeef> Yes it should be `util/Util`
02:50:41FromDiscord<Rika> It says that using periods is deprecated
02:51:14FromDiscord<xflywind> No, it is scheduled to be removed.
02:51:49FromDiscord<zhmtzhmt> Thanks , problem fixed.
02:53:33FromDiscord<Rika> In reply to @flywind "No, it is scheduled": That is essentially the same as deprecated? Rather, they’re not mutually exclusive
02:54:38FromDiscord<xflywind> Yeah, I mean I would propose to remove it before Nim v2.
02:54:55FromDiscord<xflywind> I didn't mean to reply to you though.
02:55:08FromDiscord<Rika> Oh ok
03:00:01FromDiscord<zhmtzhmt> I am glad to see nim working very well with c++, I have embeded several c++ classes in nim successfully. I will be free from memory management. 😄
03:00:27FromDiscord<zhmtzhmt> Nim is great!
03:03:13FromDiscord<Rika> “I will be free from memory management” from a C++ programmer is the funniest thing I’ve read today lmao
03:03:15FromDiscord<Rika> Congrats
03:04:10FromDiscord<xflywind> Do you use it in work?
03:08:52FromDiscord<xflywind> !eval echo compileOption("gc")
03:08:53NimBotCompile failed: /usercode/in.nim(1, 6) Error: type mismatch: got <bool>
03:09:19FromDiscord<xflywind> 😕
03:12:10*toluene quit (Ping timeout: 240 seconds)
03:12:25FromDiscord<xflywind> The error message is not friendly for misused program.
03:21:05FromDiscord<xflywind> Nim v2 is a bit rush with little manpower we have.
03:23:21*toluene joined #nim
04:11:56*arkurious quit (Quit: Leaving)
04:14:25FromDiscord<j-james> how can i check if an Option is some() or none() in an if statement?
04:14:41FromDiscord<Elegantbeef> `isNone` or `isSome`
04:15:33*rockcavera quit (Remote host closed the connection)
04:15:41FromDiscord<j-james> ah ty
04:15:59FromDiscord<Phil> Option also has neat functionality such as "map" where you transform the value inside
04:16:13FromDiscord<Phil> On an unrelated sidenote, I am up way too early
04:17:08FromDiscord<j-james> options have been very nice so far
04:17:20FromDiscord<Rika> Pattern matching where
04:17:21FromDiscord<j-james> except, nimlsp appears to break on them
04:18:13FromDiscord<j-james> aah red squigglies https://media.discordapp.net/attachments/371759389889003532/993732510313881670/2022-07-04-211734.png
04:19:07FromDiscord<Phil> And stuff like that is why I try to use the most mainstream tooling possible
04:19:19FromDiscord<Elegantbeef> Eh that's a nimsuggest issue not a lsp issue
04:19:29FromDiscord<Elegantbeef> Restart the lsp and if it's still broken try to make a min repro
04:22:15FromDiscord<j-james> In reply to @Elegantbeef "Restart the lsp and": restarting fixed it 🤦
04:22:38FromDiscord<j-james> how have i still not learned the golden rule of computers
04:23:48FromDiscord<Phil> In reply to @j-james "how have i still": Nobody ever does, it catches you after 5 years when you least expect it at the place you least expect it
04:24:13FromDiscord<Phil> Like when stuff randomly stops working on arch and you realize "Oh wait, I just updated 50 packages, maybe need to do a reboot"
05:33:45FromDiscord<frobnicate> In reply to @Isofruit "And stuff like that": What do you use?
06:02:04madpropswhat's the best way to measure in ms the execution of a function. to display to the user?
06:03:53FromDiscord<Elegantbeef> `std/monotimes` is pretty good store time before and after then just use Nim's `times.$`
06:07:42madpropsdon't need nanosecond precision hmm
06:09:11FromDiscord<Elegantbeef> well then if you dont need precision you can just use times
06:09:41madpropsecho (time_end - time_start) * 1000
06:09:47madpropsthat would give me ms right?
06:11:42madpropsnow just to format it to 2 decimal places
06:11:50madpropsthat's always a fun ride
06:12:26FromDiscord<Elegantbeef> I mean you can access the time you want but yea
06:12:49madpropshow do you access it?
06:13:29madpropsim using cpuTime
06:19:31FromDiscord<Rika> Times has overhead
06:19:37FromDiscord<Rika> More overhead than mono times
06:19:40madpropshmm
06:19:52FromDiscord<Rika> Just remove the nanoseconds part or manual formatting
06:19:59madpropsit's monkeytime i guess then
06:26:50madpropslet ms = duration.inNanoSeconds.float / 1_000_000
06:33:24FromDiscord<jmgomez> https://media.discordapp.net/attachments/371759389889003532/993766530913411072/message.txt
06:33:34FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=41Eb
06:37:05FromDiscord<Elegantbeef> Odd error
06:38:21FromDiscord<Elegantbeef> Given this isnt in a weird def https://github.com/nim-lang/Nim/blob/8bfc396a4dfa722239818f399a119452a53fe07f/lib/system/arc.nim#L169
06:41:01FromDiscord<jmgomez> So is it a bug? Maybe worth mentioning that's happening on config.nims file
06:41:10FromDiscord<jmgomez> (edit) "So is it a bug? Maybe worth mentioning that's happening on ... config.nims" added "a"
06:42:10FromDiscord<Elegantbeef> Uhh it's happening with nimscript that's odd
06:43:14madpropshttps://github.com/nim-lang/RFCs/issues/218
06:43:22madpropsif i continue inside an except what happens?
06:43:41FromDiscord<Elegantbeef> It goes to the next iteration
06:44:22FromDiscord<jmgomez> In reply to @Elegantbeef "Uhh it's happening with": yes.. maybe a workaround could be to deactivate it for nimscript but use it on the final code? Is that even an option?
06:44:36FromDiscord<Elegantbeef> I mean just define it after the code
06:44:39FromDiscord<xflywind> Not so related, nimscript doesn't work with orc defines.
06:45:26FromDiscord<Elegantbeef> Wait the Nim compiler's VM doesnt work if you define orc?
06:46:11FromDiscord<jmgomez> In reply to @Elegantbeef "I mean just define": hw that worked :/
06:46:50FromDiscord<xflywind> I mean it cannot build with orc symbols
06:46:54FromDiscord<xflywind> https://github.com/nim-lang/Nim/pull/19972/commits/becf63183c41d3ee541d054a8ad05e77fed3f8b9
06:47:02FromDiscord<Elegantbeef> I know that
06:47:08FromDiscord<Elegantbeef> But we're talking about nimscript running on the stock Nim VM
06:47:50FromDiscord<xflywind> Yeah, so I said "not so related" 😂
06:48:32FromDiscord<Elegantbeef> `--gc:orc` or `--gc:arc` in your config and then run some code after that causes the NimVM to not work cause "GC is defined" is odd behaviour
06:48:34FromDiscord<jmgomez> should I fill an issue or is it something known already?
06:49:18FromDiscord<Elegantbeef> Shouldnt the NimVM used for configuration ignore `gc` options all together
06:49:31FromDiscord<xflywind> did you use devel compiler?
06:49:44FromDiscord<jmgomez> yes, but it doesn happen in 1.6.6 too
06:49:50FromDiscord<jmgomez> (edit) "doesn" => "does"
06:49:58FromDiscord<xflywind> I see
06:50:25FromDiscord<Elegantbeef> The issue is that they have `--gc:orc` specified before the config is loaded which causes a gcorc bug with the NimVM used for configuration
06:51:03FromDiscord<Elegantbeef> I dont see that the configuration needs to worry about GC options
06:51:21FromDiscord<jmgomez> the odd thing is that it started to happen after a refactor, here is defined before and it works just fine https://github.com/jmgomez/NimForUE/blob/master/config.nims
06:51:48FromDiscord<Elegantbeef> writting nimconfig files like the stone age overhere
06:51:59FromDiscord<Elegantbeef> you know Nim has a `--` macro for nimscript configurations?
06:52:11FromDiscord<Elegantbeef> `--mm:orc` is valid nimscript config 😄
06:52:48FromDiscord<jmgomez> ohh didnt know that I thought it was just for cfg files. Im planning to moving them into an array anyways, but thanks!
06:53:43FromDiscord<xflywind> In reply to @jmgomez "should I fill an": Yeah. I didn't see one.
06:54:01FromDiscord<Elegantbeef> You still need to make a min repro though 😄
06:54:23FromDiscord<jmgomez> Okay, will try to isolated it to the min not sure if I will be able to though
06:54:37FromDiscord<Elegantbeef> I believe in you
06:54:48FromDiscord<jmgomez> 😂
06:57:00*gsalazar joined #nim
06:57:20FromDiscord<Elegantbeef> Eh i got close
06:58:48*toluene quit (Ping timeout: 276 seconds)
06:58:54FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/W4C
06:59:19FromDiscord<luteva> what does arc/orc stand for? I know it is the (now default) GC, but just what exactly do the terms stand for and why are they (always) mentioned both at the same time? RC stands for reference counting, right? So, what do the A and the O stand for?
06:59:36FromDiscord<Rika> Araq’s and “because it looks like a cycle”
07:00:07*toluene joined #nim
07:02:15FromDiscord<ezquerra> I believe the A means Automatic
07:03:43FromDiscord<demotomohiro> probably this? https://en.wikipedia.org/wiki/Automatic_Reference_Counting
07:03:57FromDiscord<Rika> I believe Araq specifically said it didn’t mean that
07:06:47FromDiscord<jmgomez> How it compares with the one in Swift/Obj-C? Is it more performant?
07:07:14FromDiscord<Elegantbeef> https://nim-lang.org/blog/2020/10/15/introduction-to-arc-orc-in-nim.html
07:08:02FromDiscord<xflywind> Yeah, it should be performant in single thread.
07:08:37FromDiscord<xflywind> (edit) "Yeah, it should be ... performant" added "more"
07:08:48FromDiscord<jmgomez> 👍
08:05:59FromDiscord<retkid> how can i take stdin better in nim
08:06:08FromDiscord<retkid> i would like to run a proc every time a character is typed
08:06:11FromDiscord<retkid> or have a timeout
08:10:11madpropsi've done that in rust
08:10:21madpropswith some terminal lib
08:14:23FromDiscord<retkid> I've done it in JS
08:14:45FromDiscord<retkid> JS's design makes it kinda trivial
08:14:51FromDiscord<Elegantbeef> It's a shame Nim doesnt have an async readline/readchar
08:15:02FromDiscord<retkid> i would put it in an iterator
08:15:43FromDiscord<retkid> In reply to @Elegantbeef "It's a shame Nim": i think you can do STDIN with a stream but
08:15:44FromDiscord<retkid> uygh
08:15:46FromDiscord<retkid> (edit) "uygh" => "ugh"
08:17:16FromDiscord<Prestige> Don't know your exact use case but thought I'd mention https://github.com/johnnovak/illwill
08:21:57FromDiscord<retkid> kinda like using a high precision laser to open a fedex package
08:21:58FromDiscord<retkid> but
08:22:00FromDiscord<retkid> It'll do
08:22:05madpropsloks nice
08:22:16madpropslooks ill even
08:22:35FromDiscord<Prestige> In reply to @retkid "kinda like using a": Sounds like a good time
08:23:00FromDiscord<retkid> well you could just use a boxcutter
08:23:09FromDiscord<retkid> but i dont have one\
08:23:13FromDiscord<Prestige> But LASERS
08:23:13FromDiscord<retkid> so the laser will do
08:23:39FromDiscord<Prestige> Can't you just do like https://nim-lang.org/docs/io.html#readChar%2CFile readChar(stdin) or am I crazy?
08:23:56madpropson the shoulders of giga ants
08:25:28FromDiscord<retkid> .
08:25:30FromDiscord<retkid> (edit) "." => "> Should not be used in performance sensitive code."
08:25:39FromDiscord<retkid> Im using this function in preformance sensitive code
08:25:42FromDiscord<retkid> (edit) "preformance" => "performance"
08:25:44FromDiscord<retkid> :|
08:26:04madpropslistening to input very fast?
08:26:27FromDiscord<xflywind> https://nim-lang.org/docs/rdstdin.html#readLineFromStdin%2Cstring
08:26:34FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/993795010392756284/unknown.png
08:26:40FromDiscord<retkid> oh no wrong function
08:32:09FromDiscord<demotomohiro> Last time I searched for how to read stdin asynchronously, it seems there is no way to do that on windows. You probably need to get keyboard input using other API.
08:42:52*pch quit (Quit: Leaving)
09:00:27FromDiscord<Entikan> how do I dereference a pointer?
09:02:01FromDiscord<Rika> []
09:02:10FromDiscord<Rika> On the end
09:02:15FromDiscord<Rika> Like an array but without a number
09:02:30FromDiscord<Rika> In reply to @demotomohiro "Last time I searched": There indeed isn’t
09:02:30FromDiscord<Prestige> `myPointer[]`
09:02:54FromDiscord<demotomohiro> !eval var a = 123;var p = a.addr; echo p[]
09:02:57NimBot123
09:03:02FromDiscord<Entikan> gotcha
09:03:44madpropswhat happened to Araq?
09:04:11FromDiscord<Prestige> What do you mean?
09:04:19madpropsi never see him here
09:04:54FromDiscord<Prestige> I think he's mostly using discord
09:05:17madpropswell this is a discord channel
09:05:23madpropsslash irc
09:05:27madpropsalsh matrix
09:06:21FromDiscord<Rika> He frequents #internals more
09:08:05*pch joined #nim
09:09:19madpropsi published some aur packages that depend on the nim compiler
09:09:28madpropsfeels ok to make it a dependence
09:09:35madpropsbut for a rust program i just made a bin package
09:09:41madpropssomething about the rust compiler feels bloated
09:10:04madpropsalso lots of dependencies
09:10:30madpropsand github started triggering the warnings of deprecated packages
09:11:27madpropsif you wanna check a simple program on aur install goldie-git
09:12:12madpropswith my clipboard manager i got into a weird situation where i had to make a c program aur package
09:12:21madpropsbecause "clipnotify" is terribly outdated
09:12:28madpropssome guy made a merge request in 2019
09:12:31madpropsnothing happened
09:12:38madpropsso i used the merge and made a package
09:13:20madpropsbut i kinda have to tell users to also install that themselves
09:19:47FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/993808400200769547/unknown.png
09:19:48FromDiscord<retkid> now
09:19:55FromDiscord<retkid> i dont know how it'lll handle japanese
09:20:00FromDiscord<retkid> but we'll go onto that bring when we come ot it
09:20:44FromDiscord<retkid> (edit) "bring" => "bridge"
09:21:06FromDiscord<sealmove> Hey basic question: How does Nim compile to C? Is it done with gcc only or you can do it with clang for example?
09:21:24FromDiscord<retkid> you can change the gcc options with the gcc flag
09:21:31FromDiscord<retkid> you can turn it off but its not a good idea
09:21:46FromDiscord<retkid> as most libraries are deved with it in mind and you'll memory leak out the ass
09:22:11FromDiscord<Elegantbeef> gcc not gc
09:22:16FromDiscord<retkid> .....................
09:22:32FromDiscord<retkid> oh you can also change it from gcc to clang or musl if you want
09:22:33FromDiscord<Elegantbeef> You can use multiple C compilers with Nim clang, gcc, vcc, tcc all are supported iirc
09:22:40FromDiscord<retkid> wait is musl supported
09:22:57FromDiscord<Elegantbeef> It works dont think it has a `--cc` flag
09:22:58FromDiscord<retkid> wait does musl have a compiler
09:25:32FromDiscord<sealmove> I wonder if something like this could be used https://github.com/WebAssembly/wasi-sdk 🥺
09:26:14FromDiscord<retkid> well
09:26:14FromDiscord<sealmove> It's supposed to be a drop-in replacement of clang
09:26:20FromDiscord<retkid> we have wasm
09:26:24FromDiscord<Elegantbeef> Probably
09:26:26FromDiscord<retkid> and if its drop in then it wouldn't be much effort
09:26:28FromDiscord<Elegantbeef> Though you can use emcc
09:26:41FromDiscord<Elegantbeef> Or try nlvm
09:26:43FromDiscord<sealmove> no I don't want wasm for browser, I want wasi support
09:26:58FromDiscord<sealmove> In reply to @Elegantbeef "Or try nlvm": yeah I am trying to understand its approach
09:27:02FromDiscord<Elegantbeef> emcc can make WASI modules
09:27:09FromDiscord<retkid> well, if it has the same args as clang, then, im pretty sure its a matter of modifying a few lines of code?
09:27:23FromDiscord<sealmove> emcc == emcscripten right?
09:27:43FromDiscord<Elegantbeef> Yea it's just `--cc:clang --clang.exe="pretendWereclang"`
09:27:46FromDiscord<Elegantbeef> Yes
09:28:10FromDiscord<Elegantbeef> I've used emscripten with a simple Nim config and got WASI modules that run in a native WASM runtime
09:28:39FromDiscord<sealmove> wow! can you share?
09:28:48FromDiscord<Elegantbeef> Didnt i share this before?
09:29:17FromDiscord<Elegantbeef> https://github.com/beef331/wasmedge_playground/tree/master/wasmsources
09:30:04FromDiscord<retkid> i wish i could wrap my head around the nim opengl stuff so i can do really weird browser shenanigans
09:30:31FromDiscord<Elegantbeef> "nim opengl stuff"
09:30:51FromDiscord<Elegantbeef> Use a version that is opengl gles compatible and then follow treeforms emscripten guide
09:30:58FromDiscord<Elegantbeef> You're now doing browser shenanigans
09:31:09madpropsi wonder what elegant's main project is
09:31:15FromDiscord<retkid> i mean nimgl
09:31:37FromDiscord<retkid> i dont wanna know
09:31:47FromDiscord<Elegantbeef> https://streamable.com/6fkxma
09:31:51FromDiscord<Elegantbeef> It's nothing much really
09:32:08FromDiscord<Elegantbeef> The wasm toying around is for my next project
09:32:35FromDiscord<sealmove> In reply to @Elegantbeef "Didnt i share this": right, sorry I am only now starting to understand the technologies
09:33:21madpropsbeef i like the wavy effect on the ocean tiles
09:33:28FromDiscord<retkid> i got distracted form my main project and am now building a small tool to practice japanese
09:33:42FromDiscord<Elegantbeef> madprops i'm very very bad at working on a singular thing so it's a long long project that is relatively simple
09:33:56FromDiscord<Elegantbeef> Yea my water shader is fantastic
09:33:58FromDiscord<retkid> main project is mighty stupid though
09:34:08FromDiscord<retkid> that certainly is a water shader
09:34:11FromDiscord<retkid> sometimes it gets me sad
09:34:18FromDiscord<retkid> whenever i work on games
09:34:20FromDiscord<retkid> and i realize
09:34:26FromDiscord<Elegantbeef> Do you see mine i've yet see a person even know what the mechanic is supposed to be
09:34:36FromDiscord<retkid> "Woah this cool thing i do would have been mildly impressive in 1994"
09:34:39madpropsbest game i've made is this https://tetris.merkoba.com/
09:34:45madpropsbut my main project is a chat system
09:35:57FromDiscord<Elegantbeef> My next game idea will use wasm for modding and a plugin system which is why i've toyed it
09:36:14FromDiscord<Elegantbeef> I really really like the idea of being able to script from any language
09:36:23FromDiscord<retkid> I was working on a website
09:36:24FromDiscord<retkid> then i got sad
09:36:38FromDiscord<Elegantbeef> Sounds like someone needs som anti depressants
09:36:43FromDiscord<retkid> so then i stopped because i cannot stand frontend design
09:36:53FromDiscord<retkid> In reply to @Elegantbeef "Sounds like someone needs": what about me gives you that impression
09:37:09FromDiscord<Elegantbeef> "I work on game it makes me sad, i make site it makes me sad"
09:37:17FromDiscord<Elegantbeef> A lot of sad and not a lot of glad
09:37:27FromDiscord<retkid> this is true
09:37:35FromDiscord<retkid> i am glad my brain is barely functioning enough to do this stuff
09:38:43madpropsalso made this minesweeper https://mines.merkoba.com/
09:38:47madpropssimple but nice
09:38:52FromDiscord<retkid> i spent 10 minutes looking for a way to do \r in nim
09:38:59FromDiscord<retkid> then i realized you do \r in nim
09:39:03FromDiscord<retkid> by typing \r
09:39:34FromDiscord<Elegantbeef> Anyway i'm outta here
09:39:34madpropsalso invented some new shitty game and paid a youtuber to make videos about it
09:39:54FromDiscord<retkid> In reply to @madprops "also invented some new": sounds like someone has too much money
09:40:11madpropsnaj
09:40:12madpropsnah
09:40:38madpropsi did pay for a narrated movie though
09:40:44madpropsbased on a real diaspora discussion
09:45:30madpropsim beating ag now
09:45:36madpropsmy program is 10x as fast roughly
09:46:18FromDiscord<Rika> Does it do as much
09:46:40madpropsit has a tendency of ignoring files so maybe it does less
09:47:03madpropsbut it's still an inspiration
09:47:45madpropsactually it does more in this caase
09:47:51madpropsmy program has a 100 results limit
09:47:54madpropsag just goes on
09:48:09FromDiscord<Rika> Sounds like it does less to me
09:48:11madpropsi figured tha nobody would care to see more than 100 results at once
09:48:33FromDiscord<Rika> Use a pager for many results maybe?
09:48:59madpropslike more?
09:50:20madpropsthe way i use this
09:50:26madpropsis to see if any results exist
09:50:28madpropsthen i inspect them
09:55:41madpropshttps://i.imgur.com/VYn8wMs.jpg
10:13:23FromDiscord<luteva> sent a code paste, see https://play.nim-lang.org/#ix=41EQ
10:14:31FromDiscord<luteva> (edit) "https://play.nim-lang.org/#ix=41EQ" => "https://play.nim-lang.org/#ix=41ER"
10:15:20FromDiscord<luteva> (edit) "https://play.nim-lang.org/#ix=41ER" => "https://play.nim-lang.org/#ix=41ES"
10:18:45FromDiscord<untoreh> @luteva
10:20:04FromDiscord<untoreh> sent a code paste, see https://play.nim-lang.org/#ix=41EV
10:22:40FromDiscord<luteva> oh thank you! one more reason to learn the ropes of macros 😄
10:28:46*rockcavera joined #nim
10:28:46*rockcavera quit (Changing host)
10:28:46*rockcavera joined #nim
10:31:10*jmdaemon quit (Ping timeout: 240 seconds)
11:13:10*pch quit (Read error: Connection reset by peer)
11:18:42FromDiscord<Phil> In reply to @frobnicate "What do you use?": The most mainstream editor of them all, vscode, or rather its Foss base whose name I keep forgetting
11:19:53madpropsi used codium until it created some conflicts with something that expected vscode
11:20:08FromDiscord<Generic> it's not based on anything, it's a Firefox like situation
11:20:08madpropsso i figured the hassle wasn't worth it
11:20:38FromDiscord<Generic> where the main thing is open source and the distributed builds come with branding and telemetry
12:04:59*xet7 joined #nim
12:08:34FromDiscord<TryAngle> why does this only compile when I add a ( ) around the "T" https://media.discordapp.net/attachments/371759389889003532/993850878362652682/unknown.png
12:08:37FromDiscord<Entikan> sent a code paste, see https://play.nim-lang.org/#ix=41Fr
12:09:45FromDiscord<TryAngle> funny enough at other places it works
12:09:56FromDiscord<TryAngle> I think this only erros when I wanna do x = r""
12:10:11FromDiscord<TryAngle> so only assigns error
12:10:18FromDiscord<TryAngle> (edit) "assigns" => "assignments"
12:10:46FromDiscord<Entikan> oh snap nvm
12:12:29FromDiscord<Entikan> I'm a dumbdumb
12:13:24FromDiscord<TryAngle> In reply to @Entikan "I'm a dumbdumb": same 😔 ↵I always ask questions here and realize the solution 1-10s after I pressed enter
12:13:32FromDiscord<TryAngle> (not the case for this one)
12:14:00FromDiscord<Entikan> yeah I need a rubber ducky
12:25:57FromDiscord<Phil> Rubber quack then, I guess 😄
12:46:06FromDiscord<Hamid_Bluri> why i can't do that 😕 https://media.discordapp.net/attachments/371759389889003532/993860320655327362/unknown.png
12:46:23FromDiscord<dom96> In reply to @TryAngle "why does this only": my guess is it clashes with the language-level raw-string literals
12:46:35FromDiscord<dom96> https://nim-lang.org/docs/manual.html#lexical-analysis-raw-string-literals
12:46:45FromDiscord<dom96> try renaming the `r` template to a different letter
12:47:49FromDiscord<Hamid_Bluri> In reply to @hamidb80 "why i can't do": also I can't import both `std/math` and `my_module/math`
12:49:42FromDiscord<dom96> In reply to @hamidb80 "also I can't import": `import my_module/math as my_math` should work
12:56:31FromDiscord<fbpyr> there was a way to store results from a loop directly into a let variable right? something like this (but with correct syntax 🤔 )\:↵`let nums: seq[int] = for i in 0..5: nums.add(i)`
13:01:21FromDiscord<enthus1ast> sent a code paste, see https://paste.rs/Y7Q
13:02:08FromDiscord<fbpyr> ah via collect! thank you so much [enthus1ast](https://matrix.to/#/@sn0re:matrix.code0.xyz) !
13:02:30FromDiscord<enthus1ast> would have worked
13:02:31FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=41FF
13:12:16ozback
14:14:29FromDiscord<enthus1ast> can i test in a macro if the expression is static?
14:15:39FromDiscord<enthus1ast> i want to further optimize the nimja codegen, to not create string.add statements when a expression (variable, or proc) returns a static/const
14:16:13*arkurious joined #nim
14:21:39FromDiscord<sOkam!> Would it be possible to compile a `.dll` file, written in Nim, so that its fully compatible with loading the file from a C project's binaries?
14:21:40FromDiscord<Yardanico> you can probably use `compiles` for this
14:21:46FromDiscord<Yardanico> In reply to @sOkam! "Would it be possible": not sure what you exactly mean
14:21:53FromDiscord<Yardanico> if you want a C application to load a Nim dll, then yes, it's possible
14:22:05FromDiscord<Yardanico> Nim dlls are fully self-contained including the GC, you just have to properly do FFI
14:22:19FromDiscord<Yardanico> for example https://github.com/jangko/nppnim
14:22:21FromDiscord<Yardanico> notepad++ plugin
14:23:13FromDiscord<sOkam!> i see, thx
14:23:20FromDiscord<sOkam!> where can i read about the ffi part??
14:23:48FromDiscord<Yardanico> there's no separate resource, it's just how you do the usual C FFI
14:24:12FromDiscord<Yardanico> `{.exportc, dynlib.}`, your exposed procs should have C types as their arguments and have a C type as a return type
14:24:12FromDiscord<sOkam!> I just found this on google. Is this it?↵https://nim-lang.org/docs/backends.html
14:24:30FromDiscord<Yardanico> yes, but these are only the basics
14:30:31*gsalazar quit (Read error: Connection reset by peer)
14:30:33*gsalazar_ joined #nim
14:35:41*gsalazar joined #nim
14:35:44*gsalazar_ quit (Ping timeout: 244 seconds)
14:40:22FromDiscord<sOkam!> super helpful read. thx yard
14:43:32FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=41G8
14:47:51*derpydoo joined #nim
14:58:18*fallback quit (Ping timeout: 240 seconds)
15:06:34FromDiscord<enthus1ast> nope does not work inside macros (or i dont know how),↵@Yardanico you mentioned compiles
15:06:54FromDiscord<Yardanico> you can make your way work in macros by using double-macros
15:06:58FromDiscord<Yardanico> or a template + macro
15:07:15FromDiscord<Yardanico> emit code in first macro that'll call the second macro with the result (if the expression is static or not)
15:07:18FromDiscord<Yardanico> or make a template that does the same
15:10:49FromDiscord<enthus1ast> sent a code paste, see https://paste.rs/qFq
15:12:30FromDiscord<enthus1ast> here instead of the (poor) parseStmt try, i would call the second macro?
15:12:51FromDiscord<Yardanico> you would emit the code calling the second macro
15:14:04FromDiscord<enthus1ast> mh i'm not sure if i can do this in this step, because i need this information before i even emit code
15:15:15FromDiscord<enthus1ast> emit NimNodes i mean
15:19:07FromDiscord<TryAngle> In reply to @dom96 "try renaming the `r`": I see, thanks
15:19:29FromDiscord<TryAngle> is there a good templating language for html similar to jinja2 that works well with jester?
15:19:38FromDiscord<TryAngle> (edit) "jester?" => "jester and tailwind css?"
15:20:05FromDiscord<enthus1ast> nimja (shameless self plug)
15:20:24FromDiscord<ajusa> Nimja is good
15:20:29FromDiscord<enthus1ast> if its "good" you must decide for yourself
15:20:54FromDiscord<TryAngle> looks gucci
15:20:55FromDiscord<TryAngle> thx
15:20:59FromDiscord<TryAngle> for creating this
15:21:01FromDiscord<ajusa> https://github.com/ajusa/simple-twitter/blob/master/server.nim
15:21:19FromDiscord<ajusa> Example with Nimja and Jester
15:21:33FromDiscord<TryAngle> thanks 🥺
15:21:56FromDiscord<TryAngle> is there also a good session plugin for jester?
15:22:18FromDiscord<dom96> In reply to @ajusa "https://github.com/ajusa/simple-twitter/blob/master": That's cool. You wanna add it to Jester's readme? :D
15:23:33FromDiscord<TryAngle> or idk if this is required at all but I would like store some temporary data per user
15:23:38FromDiscord<TryAngle> how would htis be done in jester?
15:24:18FromDiscord<enthus1ast> you must do session handling yourself
15:24:19FromDiscord<enthus1ast> setting a cookie on a route, then look the cookie value up in some kind of datastore
15:24:25FromDiscord<enthus1ast> on every other route
15:24:49FromDiscord<enthus1ast> prologue has a session middleware btw
15:24:58FromDiscord<TryAngle> what is prologue?
15:25:19FromDiscord<TryAngle> In reply to @enthus1ast "setting a cookie on": this would work for me, but how would u do that?
15:25:20FromDiscord<enthus1ast> its another web framework
15:25:35FromDiscord<enthus1ast> a simple table would work already↵(@TryAngle)
15:25:53FromDiscord<enthus1ast> the cookie is actually just a part in the http header
15:26:00FromDiscord<TryAngle> I mean the cookie part lol
15:26:14FromDiscord<enthus1ast> which is set on every request by the browser
15:26:40FromDiscord<enthus1ast> so eg have a login route, that checks login, and if good you responst with a response that have the set cookie headers set
15:27:34FromDiscord<enthus1ast> and the cookie contains a random id
15:27:42FromDiscord<enthus1ast> this one you store in a table on the server
15:28:24FromDiscord<enthus1ast> then every following request from this browser session will have the cookie set in the http header,
15:28:50FromDiscord<enthus1ast> so in every route, you look into the table and retreive the values you have stored in the table
15:29:02FromDiscord<TryAngle> hm ok I think I understand, thanks
15:29:12FromDiscord<enthus1ast> BUT do not forget the annoying eu popups when you set cookies \:D
15:29:44FromDiscord<TryAngle> In reply to @enthus1ast "BUT do not forget": I don't htink they are required as long as Idon't store actual user data
15:30:11FromDiscord<TryAngle> I just want to write a text cursefier where u can modify the probabilities
15:34:53FromDiscord<TryAngle> sent a long message, see http://ix.io/41Gu
15:36:40FromDiscord<enthus1ast> so you write "500 days no shower" and it generates "500 ÐÀYS NÒ $HÒWĖR"?
15:37:04FromDiscord<TryAngle> In reply to @enthus1ast "so you write "500": ye and I want to be able to set how likely for example an S gets replaced with $
15:37:19FromDiscord<Yardanico> and what is the issue?
15:37:36FromDiscord<enthus1ast> for the likelyhood you can generate an int eg rand(100)
15:37:37FromDiscord<Yardanico> you can just have a mapping from char to a mapping with possibilities
15:37:42FromDiscord<Yardanico> that it gets replaced with
15:37:47FromDiscord<TryAngle> that is not the issue I have that code already
15:38:00FromDiscord<TryAngle> I was just wondering how to make jester being able to "store" those values
15:38:10FromDiscord<TryAngle> (edit) "values" => "probabilities per site call"
15:38:20FromDiscord<enthus1ast> you can store it in the browser
15:38:38FromDiscord<TryAngle> @enthus1ast already said how to do it with cookies, I think this is good for this case idk, but it should work
15:38:40FromDiscord<Yardanico> In reply to @TryAngle "I was just wondering": you mean per session?
15:38:46FromDiscord<TryAngle> In reply to @Yardanico "you mean per session?": yes
15:38:50FromDiscord<Yardanico> on the server-side or in the browser?
15:38:57FromDiscord<enthus1ast> https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Client-side_web_APIs/Client-side_storage
15:38:59FromDiscord<Yardanico> but yeah, you can just do it with cookies, that's how most session stuff works
15:39:15FromDiscord<TryAngle> server side, I wanna write nim not javascript(🤮)
15:39:22FromDiscord<Yardanico> you generate some ID for the cookie on the client-side, and set that cookie as the key to possibilities table (whatever) on your server
15:39:26FromDiscord<Yardanico> and retrieve when needed
15:39:51FromDiscord<enthus1ast> nim can also compile to js ;)
15:40:01FromDiscord<TryAngle> oh actually true I totally forgot about this 🤔
15:40:41FromDiscord<TryAngle> In reply to @enthus1ast "https://developer.mozilla.org/en-US/docs/Learn/Java": isn't this for JS?
15:40:47FromDiscord<TryAngle> https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies this should work for cookies no?
15:40:56FromDiscord<TryAngle> (edit) "JS?" => "JS only?"
15:51:56FromDiscord<Yardanico> In reply to @TryAngle "isn't this for JS": he's talking about client-side
15:52:01FromDiscord<Yardanico> storing possibilities on client-side
15:52:37FromDiscord<enthus1ast> I think this is less hassle for these kind of stuff
15:53:05*gsalazar quit (Remote host closed the connection)
15:53:21*gsalazar joined #nim
15:53:22FromDiscord<enthus1ast> Or directly store this value in the cookie
15:56:46*gsalazar quit (Read error: Connection reset by peer)
15:57:06*gsalazar joined #nim
16:00:33*wallabra_ joined #nim
16:01:35*wallabra quit (Ping timeout: 260 seconds)
16:01:53*wallabra_ is now known as wallabra
16:04:06*gsalazar quit (Ping timeout: 244 seconds)
16:05:28*gsalazar joined #nim
16:19:48*Kiori joined #nim
16:22:02*kenran joined #nim
16:22:27*fallback joined #nim
16:22:48*vicecea quit (Remote host closed the connection)
16:22:57*CyberTailor joined #nim
16:23:18*vicecea joined #nim
16:29:20CyberTailorhmm, i wonder how it turns out https://github.com/nim-lang/Nim/pull/19960
16:34:46*Lord_Nightmare quit (Excess Flood)
16:35:42FromDiscord<Yardanico> In reply to @flywind "You can also send": what email? there's one persona asking for a email to send some typos too
16:35:56*Lord_Nightmare joined #nim
16:36:19FromDiscord<Yardanico> (edit) "persona" => "person"
16:36:24FromDiscord<Yardanico> in the Nim Telegram chat
16:41:38*Lord_Nightmare quit (Excess Flood)
16:42:09*Lord_Nightmare joined #nim
16:43:45FromDiscord<pietroppeter> I used the mail listed here: https://github.com/Araq
16:53:12*Kiori left #nim (Leaving)
17:10:27*better_sleeping[ joined #nim
17:19:40*better_sleeping[ left #nim (#nim)
17:27:21*derpydoo quit (Ping timeout: 276 seconds)
17:28:55NimEventerNew thread by Cosisert: Updatnig Nim version / looking for teacher, see https://forum.nim-lang.org/t/9281
17:32:38FromDiscord<dom96> In reply to @dain "": that looks to me like you need to clear the window's pixel buffer
17:46:40*noeontheend joined #nim
18:07:18*xet7 quit (Ping timeout: 264 seconds)
18:13:50*kenran quit (Quit: WeeChat info:version)
18:16:28*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
18:19:46*Lord_Nightmare joined #nim
18:28:59*xet7 joined #nim
18:29:47*noeontheend quit (Ping timeout: 244 seconds)
18:32:24FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/993947471980003398/unknown.png
18:32:27FromDiscord<retkid> i would like to move this
18:32:35FromDiscord<retkid> and the only code i can find it is in "cputs"
18:32:43FromDiscord<retkid> but i dont wanna write low level code to do this
18:32:54FromDiscord<retkid> the white square
18:32:59FromDiscord<retkid> (edit) "square" => "square, is the header"
18:33:07FromDiscord<retkid> (edit) "header" => "topic of that sentence"
18:44:11FromDiscord<Yardanico> https://nim-lang.org/docs/terminal.html has cursor procs
19:02:52FromDiscord<retkid> In reply to @Yardanico "https://nim-lang.org/docs/terminal.html has cursor ": i tried those ebois
19:02:56FromDiscord<retkid> (edit) "ebois" => "boits"
19:02:57FromDiscord<retkid> (edit) "boits" => "bois"
19:03:05FromDiscord<retkid> they seem to change where the text is entered
19:03:15FromDiscord<retkid> but not the actual cursor
19:03:40*lumo_e joined #nim
19:21:12FromDiscord<untoreh> asyncfile doesn't work with chronos?
19:27:50*lumo_e quit (Ping timeout: 240 seconds)
19:57:23FromDiscord<gjyljljjl> sent a long message, see http://ix.io/41I3
19:58:12FromDiscord<Yardanico> In reply to @gjyljljjl "Hi all. So,": Magic means that it's actually a built-in and is implemented in the compiler itself, in a lot of cases in backends directly
19:58:19FromDiscord<Yardanico> You can search for mInc in the compiler source
19:59:22FromDiscord<gjyljljjl> Cheers, I will do that
20:08:38*lumo_e joined #nim
20:22:07*jmdaemon joined #nim
20:32:09FromDiscord<ezquerra> sent a long message, see http://ix.io/41Ig
21:10:34FromDiscord<Phil> So the first book is "Mastering Nim"↵The second book is "Mastering things around Nim"!
21:18:13*lumo_e quit (Ping timeout: 244 seconds)
21:51:17reversem3[m]There is a second book after Mastering Nim?
21:58:13FromDiscord<Yardanico> It's Phil's joke :)
22:16:56FromDiscord<Phil> Not even a good one, I'm too damn tired to think of a second book name that could over-dramatize the things around nim-coding
22:17:11FromDiscord<Elegantbeef> The secret of nim is the easy one
22:17:28FromDiscord<Phil> But that's not a joke though, that's an earnest book title
22:18:02FromDiscord<Elegantbeef> It's a parody title of a film
22:20:39*hc0re joined #nim
22:21:08FromDiscord<!Patitotective> beef is a man of culture
22:21:52*hc0re quit (Client Quit)
22:22:58FromDiscord<TurtleP> sent a code paste, see https://play.nim-lang.org/#ix=41Iy
22:23:23FromDiscord<Elegantbeef> Nim doesnt have pointer arithmetic
22:23:35FromDiscord<Elegantbeef> should be `cast[ptr UncheckedArray[uint32]]`
22:23:37*hc0re joined #nim
22:24:07FromDiscord<TurtleP> .. I thought of using UncheckedArray lmao
22:24:49*hc0re quit (Client Quit)
22:24:57FromDiscord<TurtleP> thank you again
22:25:01*hc0re joined #nim
22:25:41FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=41Iz
22:25:47FromDiscord<Elegantbeef> Though ideally `relocationHeaders` is just a `ptr UncheckedArray`
22:26:21*estiquelapice quit ()
22:26:49FromDiscord<Elegantbeef> And the question of "why are you using C arrays instead of seqs" does exist
22:27:56FromDiscord<TurtleP> because I need a fixed size
22:28:05FromDiscord<TurtleP> .. and this is giving me bigger numbers than it should
22:28:06FromDiscord<Elegantbeef> Nim has static arrays
22:28:29FromDiscord<Elegantbeef> `ref array[32, uint32]` works
22:28:31*estiquelapice joined #nim
22:29:12FromDiscord<TurtleP> ugh, getting numbers like `4129039962`, but it should be `353`
22:29:26FromDiscord<Elegantbeef> Full code?
22:30:09FromDiscord<TurtleP> sent a code paste, see https://play.nim-lang.org/#ix=41IA
22:30:25FromDiscord<TurtleP> `toCtrRelocationHeader` is from binarylang
22:31:02FromDiscord<Elegantbeef> The type of `CtrRelocation` is?
22:31:55FromDiscord<TurtleP> sent a code paste, see https://play.nim-lang.org/#ix=41IB
22:31:57FromDiscord<TurtleP> like I said, it's binarylang stuff
22:34:25FromDiscord<TurtleP> in the C++ code, it's supposed to be a normal struct
22:34:26FromDiscord<Elegantbeef> Bridge cut out i'm not dumb
22:34:30FromDiscord<TurtleP> well, array of structs
22:34:50*hc0re quit (Quit: Leaving)
22:35:02FromDiscord<Elegantbeef> So then what's the point of the pointer indirection
22:35:04*hc0re joined #nim
22:35:23*hc0re quit (Client Quit)
22:35:51FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=41IC
22:35:52*hc0re joined #nim
22:37:13FromDiscord<TurtleP> it pretty much is, iirc, though that doesn't compile
22:37:18*hc0re quit (Client Quit)
22:37:33FromDiscord<TurtleP> and I just wanna clarify I wasn't trying to call or insinuate you were dumb before
22:38:13FromDiscord<Rika> He aimed it at himself
22:38:47FromDiscord<TurtleP> oh
22:45:53CyberTailorwhat to use instead of "spawn" (will be removed in nim 2.0)? no external packages
22:46:19CyberTailormaybe using system/threads directly?
22:47:13CyberTailorbut how to get return value from Thread[]?
22:50:31FromDiscord<Generic> @TurtleP hey neat, you're doing 3ds stuff in Nim
22:50:43FromDiscord<Generic> I still have a 3dsx parser in Nim from my failed 3DS emulator attempt
22:52:12FromDiscord<Generic> https://gist.github.com/RSDuck/7e2f88e401e0ec88ca591bc6435ddb54
22:52:43FromDiscord<TurtleP> heh, though this one I made originally in C++ recently
22:53:02FromDiscord<TurtleP> I do a 3DS/Switch homebrew stuff, typically
22:53:06FromDiscord<TurtleP> @Generic
22:53:35FromDiscord<Generic> me too, I did the Switch port of melonDS
22:53:45FromDiscord<Generic> currently I'm working on a GameCube emulator in Nim
22:53:52FromDiscord<Generic> it already runs on Switch, though only very poorly
22:54:45FromDiscord<TurtleP> though is sealmove in this Discord?
22:55:02FromDiscord<Generic> no idea, who's this?
22:55:08FromDiscord<TurtleP> the author of binarylang
22:55:16FromDiscord<TurtleP> wasn't really a question for you 😛
22:55:19FromDiscord<Generic> ah
22:55:20FromDiscord<TurtleP> no offense
22:55:27FromDiscord<Generic> some people are also on matrix or irc
22:55:59FromDiscord<TurtleP> but if you didn't know, generic, I'm the main author of LÖVE Potion
22:56:16FromDiscord<Generic> ah yeah I remember now
22:56:46FromDiscord<Generic> do you have a deko3d renderer?
22:57:16FromDiscord<TurtleP> yep
22:57:21FromDiscord<TurtleP> it's been there for quite a while
22:57:30FromDiscord<Generic> cool
22:58:59FromDiscord<Elegantbeef> Yea sealmove is here but they have the worlds most unpingable name
22:59:25FromDiscord<TurtleP> lmao
23:00:04FromDiscord<TurtleP> well, if someone can get their attention for me, that'd be awesome
23:00:17FromDiscord<TurtleP> I'd raise a GitHub issue, but dunno if it's worth it
23:00:39FromDiscord<Elegantbeef> They asked about WASI last so if you search that you'd probably find them 😄
23:02:17FromDiscord<tangonov> sent a code paste, see https://play.nim-lang.org/#ix=41IH
23:02:37FromDiscord<tangonov> What's the best way to get around that? Are we using an env var to derive the shell and falling back to /bin/sh?
23:04:31*dextop joined #nim
23:06:07FromDiscord<Elegantbeef> Does it not just use a shebang?
23:06:33FromDiscord<Elegantbeef> Actually we're probably looking at `execCmd` or similar i guess
23:08:43NimEventerNew thread by Severak: Advanced integration with lua, see https://forum.nim-lang.org/t/9282
23:10:00FromDiscord<tangonov> In reply to @Elegantbeef "Actually we're probably looking": Is it fair to say it might be called inside of koch.nim, or am I going to have dig the dependency tree until I find the offending statement?
23:10:43FromDiscord<Elegantbeef> you can probably build it with `-d:debug` to see
23:11:03FromDiscord<Elegantbeef> Dont know how koch is build
23:11:13FromDiscord<Elegantbeef> might be release, might be debug
23:11:37FromDiscord<tangonov> That I can do in 2 seconds, let's see what we can find
23:14:51FromDiscord<tangonov> No such luck. Error is as ambiguous as ever
23:15:42FromDiscord<Elegantbeef> It's odd that something is looking for `/bin/sh` you could search the entire repo for files with that string
23:16:10FromDiscord<NotFlawffles> should i learn Nim because I'm bored and always only use C
23:16:44FromDiscord<Elegantbeef> Do you want a higher level language with a better type system and fancier features?
23:17:30FromDiscord<NotFlawffles> yeah, you can say that
23:17:38FromDiscord<Elegantbeef> Well then yes
23:17:41FromDiscord<NotFlawffles> even though i prefer medium and low level
23:17:44FromDiscord<NotFlawffles> but still yes
23:18:05FromDiscord<NotFlawffles> Nim sounds really interesting to mw
23:18:11FromDiscord<NotFlawffles> (edit) "mw" => "me"
23:18:12FromDiscord<Elegantbeef> It's all scales
23:18:13FromDiscord<Elegantbeef> Nim can do everything C can
23:18:14FromDiscord<Elegantbeef> So you can use Nim just like you do C if you really wanted to
23:18:35FromDiscord<NotFlawffles> In reply to @Elegantbeef "Nim can do *everything*": don't every programming languages, lol
23:18:41FromDiscord<Elegantbeef> If you wanted a modern C i'd suggest Zig/Odin/Hare, but if you're interested in moving to the 21st century Nim is here
23:18:44FromDiscord<Elegantbeef> No they cannot
23:18:46FromDiscord<NotFlawffles> (edit) "languages," => "languages does,"
23:19:01FromDiscord<Elegantbeef> Open up python and allocate 200 bytes then dont free it
23:19:06FromDiscord<Elegantbeef> Leak that memory
23:19:29FromDiscord<NotFlawffles> i don't use python anyway, it's sucks
23:19:35FromDiscord<Elegantbeef> Not the point
23:19:36FromDiscord<NotFlawffles> i used to, before
23:19:39FromDiscord<NotFlawffles> i know
23:19:40FromDiscord<NotFlawffles> got you
23:19:44FromDiscord<Elegantbeef> System languages give control, Nim is a system language
23:19:55FromDiscord<NotFlawffles> and that's why I'm interested
23:20:03FromDiscord<NotFlawffles> i love systems programming
23:20:17FromDiscord<Elegantbeef> @tangonov\: the issue is probably this line https://github.com/nim-lang/Nim/blob/01b40dc1d7c7c5331361341bdf305084c799c05b/lib/pure/osproc.nim#L984
23:20:48FromDiscord<Elegantbeef> Is there really a different shell path for a posix system?
23:21:06FromDiscord<tangonov> Yeap
23:21:10FromDiscord<NotFlawffles> wow cool
23:21:27FromDiscord<tangonov> In a guix build environment, everything is symlinked from the container storage.
23:21:38FromDiscord<Elegantbeef> That means absolutely nothing to me 😄
23:21:44FromDiscord<tangonov> So /bin/sh is actually /gnu/store/8gruij3yreu8fiobkj4h3uy8ewi9odkjt5u4i93oeif/bin/sh
23:21:53FromDiscord<Elegantbeef> Ah
23:21:54FromDiscord<huantian> beef doesn't understand the beauty of immutable systems 😛
23:21:57FromDiscord<tangonov> The build flow can help me patch that line. I will try it later!
23:22:09FromDiscord<Elegantbeef> I dont understand most things↵(@huantian)
23:22:22FromDiscord<Elegantbeef> I dont want a immutable system cause i want to use my system
23:22:25FromDiscord<tangonov> Thanks for the help @ElegantBeef
23:23:51FromDiscord<NotFlawffles> the problem tho that i always confuse when i try to type nim because i use nvim and only one letter matter soooo eh
23:24:36*CyberTailor quit (Excess Flood)
23:24:41FromDiscord<NotFlawffles> i always type nvim instead of nim lol
23:25:38*CyberTailor joined #nim
23:36:04FromDiscord<tangonov> In reply to @Elegantbeef "I dont want a": The beauty if Guix is the immutable system is your system. You build it with Scheme
23:36:37FromDiscord<Elegantbeef> The joke is that the only system i use is my desktop and if it was immutable it would not be fun
23:37:08FromDiscord<tangonov> Well...it is technically not immutable. Just less mutable. I mutate my state all the time, transactionally.
23:38:17FromDiscord<Elegantbeef> My computer isnt a vending machine there are no transactions! 😄
23:38:38FromDiscord<tangonov> Hue hue hue
23:38:47FromDiscord<tangonov> rat, osproc is already patched.
23:39:00FromDiscord<tangonov> (edit) "rat," => "Drat,"
23:39:57FromDiscord<tangonov> `when not defined(android): "/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/sh"`
23:41:28FromDiscord<tangonov> A few more candidates, I guess https://media.discordapp.net/attachments/371759389889003532/994025251413430282/unknown.png
23:41:44FromDiscord<Rika> Can’t you just take a look at how Nix does it since they’re sisters anyway
23:42:55FromDiscord<tangonov> In reply to @Rika "Can’t you just take": I suppose I could, but I don't want to make the Twin I'm partnered with jealous
23:44:08FromDiscord<tangonov> I just thought perhaps the reasons for the compiler looking for /bin/sh directly could have been a simpler answer. I appreciate the help
23:48:34*noeontheend joined #nim
23:52:47*CyberTailor quit (Remote host closed the connection)
23:53:37*CyberTailor joined #nim