<< 30-10-2022 >>

00:01:32*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
00:03:43*Lord_Nightmare joined #nim
00:07:33FromDiscord<Phil> That's just strutils
00:08:03FromDiscord<Elegantbeef> No that's amore
00:08:41FromDiscord<Phil> Strudeltils
00:11:47FromDiscord<albassort> today im working with coroutines
00:11:48FromDiscord<Elegantbeef> Uhhh
00:13:04FromDiscord<albassort> hey, rika always tells me to do webscraping in async
00:13:29FromDiscord<Elegantbeef> That's the correct way of doing IO intensive operations
00:14:05FromDiscord<albassort> but im running it in a coro because i want to have a ctrl-c to stop the recursive proc
00:14:11FromDiscord<Rika> ??
00:14:22FromDiscord<Rika> You can still do that with async
00:14:26FromDiscord<albassort> yea
00:14:29FromDiscord<ChocolettePalette> strutils doesn't have such functionality btw
00:14:54FromDiscord<albassort> In reply to @ChocolettePalette "strutils doesn't have such": it does not; but Rosetta code had a neat code example
00:15:11FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4eqz
00:15:58FromDiscord<albassort> In reply to @Rika "You can still do": async is for nerds and i dont like it
00:16:24FromDiscord<ChocolettePalette> So is programming in general
00:16:41FromDiscord<ChocolettePalette> Unlike e.g. football
00:16:51FromDiscord<albassort> idk, Async has never worked in my brain
00:16:56FromDiscord<albassort> its super clunky, I don't like it
00:17:05FromDiscord<albassort> coroutines is more how i think about programs
00:17:22FromDiscord<Phil> I recommend an angular bootcamp, forced coding in rxjs for 3 straight months
00:17:27FromDiscord<Phil> Async will no longer be scary after that
00:17:34FromDiscord<Phil> Also your brain will be broken in very funny ways
00:17:34FromDiscord<albassort> I've done... it
00:17:41FromDiscord<albassort> yea
00:17:42FromDiscord<Rika> Because you’re relegating what you manually do in async to the OS instead
00:17:51FromDiscord<Rika> Reactive is another hell
00:17:59FromDiscord<Rika> Using reactive easy
00:18:01FromDiscord<albassort> async js is like slamming a hammer into your testicles
00:18:04FromDiscord<Rika> Making reactive hard
00:20:27FromDiscord<Phil> Nah, it's no physical pain, it's forcing you to think about your code over time and through which callbacks its all connected and at some point that just breaks you to a degree.↵But tbh once you've got rxjs down and can use its operators smoothly (such as switchMap and understand what it means) normal async is pretty easy
00:21:50FromDiscord<albassort> how do i get the maximum value of an integer type?
00:22:06FromDiscord<Elegantbeef> `high`
00:22:11FromDiscord<Phil> `int.high`
00:23:46FromDiscord<albassort> sent a long message, see http://ix.io/4eqz
00:23:59FromDiscord<albassort> i despise when flameshot fails to copy to clipboard
00:26:04FromDiscord<albassort> it seems stdlib coroutines kinda meh
00:27:17FromDiscord<Rika> Lol
00:31:08FromDiscord<albassort> oh so coro suspends main
00:31:19FromDiscord<albassort> :pensivemoai:
00:37:43FromDiscord<Mr.Ender> how can I set a default value for something in a type
00:38:38FromDiscord<Elegantbeef> Whatelse would it do?
00:39:18FromDiscord<Mr.Ender> so with the question I asked ealier it is because I have a type but I dont want all the values to have to be defined
00:39:33FromDiscord<Mr.Ender> and if they are not defined just default the undefined values to false
00:39:52FromDiscord<albassort> create a proc which instantiates it with new and set its value
00:41:05FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4eqC
00:41:19FromDiscord<albassort> (edit) "https://play.nim-lang.org/#ix=4eqC" => "https://play.nim-lang.org/#ix=4eqD"
00:41:27FromDiscord<albassort> results are already created with new and mutable so this works fine
00:42:31FromDiscord<Elegantbeef> Only if it's a non ref type
00:43:38FromDiscord<Mr.Ender> sent a long message, see http://ix.io/4eqE
00:43:42FromDiscord<Elegantbeef> Just use a set
00:43:51FromDiscord<albassort> that would be cool syntax yes
00:44:16FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4eqF
00:44:19FromDiscord<albassort> however, its a bit complicated because most basic types already have defaults
00:44:45FromDiscord<albassort> dont know why its not in nim atm
00:44:49FromDiscord<Elegantbeef> Eh Nim will have that in 2.0
00:44:54FromDiscord<Elegantbeef> A bitset makes more sense
00:44:57FromDiscord<albassort> im sure theres some philosophical ---
00:45:09FromDiscord<albassort> well i guess its in the pipeline
00:45:20FromDiscord<Elegantbeef> I mean it already is in devel
00:45:42FromDiscord<albassort> I like nim because of how free it is, while keeping things maintainable
00:46:03FromDiscord<albassort> my friend pointed out that I get really angry when languages stop me from doing stuff
00:46:08FromDiscord<albassort> lo
00:46:11FromDiscord<albassort> (edit) "lo" => "lol"
00:48:18FromDiscord<albassort> is there a way to kill a coroutine
00:48:34FromDiscord<Elegantbeef> Who knows, no one uses coro
00:48:50FromDiscord<albassort> i wanna be different, but I dont want to try too hard
01:16:49FromDiscord<Mr.Ender> How do I return data from a try catch because if I define a variable in a try I can not access it outside of it.
01:17:33FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4eqJ
01:19:53FromDiscord<Mr.Ender> thank you I surprised how I have never cam across this
01:20:17FromDiscord<Elegantbeef> Nim is the land of "Everything is an expression"
01:27:49FromDiscord<ChocolettePalette> Omg this is so cool actually
01:28:53FromDiscord<ChocolettePalette> I hate it when I have to define stuff before a try / catch block in e.g. C++ to further make some more checks etc etc
01:30:05FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/t8n
01:36:17FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4eqK
01:36:31FromDiscord<albassort> i dont know if i like it
01:37:14FromDiscord<Elegantbeef> Ok?
01:37:48FromDiscord<Rika> ok
01:37:58FromDiscord<Rika> idk what you want us to say
01:38:02FromDiscord<Elegantbeef> It's better than the alternative
01:38:25FromDiscord<albassort> im expressing my concern
01:38:40FromDiscord<albassort> i dont think its as readable as per-defineing it
01:39:10FromDiscord<albassort> In reply to @Rika "idk what you want": "Caroline-sama, please enlighten us with your witty and totally correct critique of this expression"
01:40:09*ehmry quit (Ping timeout: 244 seconds)
01:40:20*ehmry joined #nim
01:48:39FromDiscord<Elegantbeef> The issue with predefining is now it's mutable
02:00:49*alicetries joined #nim
02:00:49*alice is now known as Guest2333
02:00:49*Guest2333 quit (Killed (zinc.libera.chat (Nickname regained by services)))
02:00:49*alicetries is now known as alice
02:03:54*alice quit (Client Quit)
02:04:29*alice joined #nim
02:13:21*wallabra_ joined #nim
02:14:57*wallabra quit (Ping timeout: 240 seconds)
02:15:04*wallabra_ is now known as wallabra
03:19:48FromDiscord<albassort> is there anyway to check if you're running in a spawned thread or main thread
03:21:46FromDiscord<albassort> eh i guess i'll just make an enum
03:23:21FromDiscord<that_dude> So I have nim installed, but not msys. If I install that and then manually add paths to my environment, that wont mess with anything nim related right? I'm on windows btw
03:24:29FromDiscord<albassort> i want to combine a if statement and a while statement
03:25:02FromDiscord<Elegantbeef> What?
03:25:05FromDiscord<Rika> In reply to @albassort "i want to combine": what does that mean
03:25:21FromDiscord<albassort> its a while loop that doesn't loop
03:25:43FromDiscord<albassort> if at any point during the if statement the condition becomes false it goes to else
03:25:50FromDiscord<albassort> or just breaks the block
03:27:18FromDiscord<Rika> what
03:27:25FromDiscord<Rika> thats more complicated than you think
03:27:42FromDiscord<albassort> no its just as complicated as i think
03:27:44FromDiscord<albassort> and its stupid
03:27:53FromDiscord<Rika> thats not really a while loop either
03:28:00FromDiscord<albassort> well its not a loop
03:28:09FromDiscord<albassort> its just an if statement which returns
03:28:15FromDiscord<Rika> its no
03:28:18FromDiscord<Rika> (edit) "no" => "not that either"
03:28:31FromDiscord<Rika> its a group of statements with multiple if checks in the middle
03:29:21FromDiscord<albassort> if you really wanted to implement it you can just do it like this
03:30:22FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4eqY
03:30:34FromDiscord<albassort> (edit) "https://play.nim-lang.org/#ix=4eqY" => "https://play.nim-lang.org/#ix=4eqZ"
03:30:46FromDiscord<albassort> (edit) "https://play.nim-lang.org/#ix=4eqZ" => "https://play.nim-lang.org/#ix=4er0"
03:30:59FromDiscord<Rika> not really
03:31:06FromDiscord<Rika> in the middle the check is not made
03:31:29FromDiscord<albassort> yea but the while manages the condition
03:31:47FromDiscord<albassort> im running coroutines in threads and i want it to exit when i hit ctrl-c and then do something
03:31:52FromDiscord<albassort> this is the best solution i have
03:32:15FromDiscord<albassort> https://media.discordapp.net/attachments/371759389889003532/1036120321322913832/unknown.png
03:32:32FromDiscord<albassort> yes i commit warcrimes
03:32:42FromDiscord<that_dude> In reply to @albassort "if at any point": iirc there was a time when araq was asked that and he recomended to use exceptions
03:32:54FromDiscord<that_dude> wait I think I'm reading that wrong
03:33:24FromDiscord<albassort> this is a really stupid idea i have
03:33:32FromDiscord<albassort> this creates far too many problems to be in nim
03:33:36FromDiscord<Rika> control c is a signal on unix, not really a condition
03:33:54FromDiscord<Rika> In reply to @that_dude "iirc there was a": technically that is still correct
03:34:14FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4er1
03:34:24FromDiscord<albassort> boom
03:35:10FromDiscord<Rika> In reply to @albassort "": you know we can still read that blurred section `https://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q or smth
03:35:13FromDiscord<Rika> (edit) "`https://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q" => "`https://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q`"
03:35:36FromDiscord<Rika> if you want to censor something id recommend always using pixellation
03:35:38FromDiscord<albassort> fuck
03:35:57FromDiscord<albassort> noooooo dont know im doing a weird project
03:36:16FromDiscord<albassort> maybe related to the kanji thing
03:36:27FromDiscord<albassort> (i dont trust the frequency statistics for kanji)
03:38:22FromDiscord<Elegantbeef> Why this doesnt just a channel is beyond me
03:38:26FromDiscord<Elegantbeef> just use a
03:41:30FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4er3
03:42:34FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4er4
03:42:44FromDiscord<Elegantbeef> And of course set the `doProcess` bool to false
03:43:00FromDiscord<Elegantbeef> This doesnt instantaneously kill your threads but it ends the processing
03:56:22*alice quit (Quit: *disappears* U_U)
03:58:43*alice joined #nim
04:02:36FromDiscord<albassort> In reply to @Elegantbeef "This doesnt instantaneously kill": yea because i want the mainthread to resume... eventually
04:32:00*vicecea quit (*.net *.split)
04:32:00*_________ quit (*.net *.split)
04:32:49*lumidify quit (*.net *.split)
04:32:49*jkl1337 quit (*.net *.split)
04:32:49*mal`` quit (*.net *.split)
04:32:49*Ekho quit (*.net *.split)
04:34:09*jkl joined #nim
04:36:22*mal`` joined #nim
04:37:17*lumidify joined #nim
04:37:25*_________ joined #nim
04:42:01*tinystoat quit (*.net *.split)
04:42:01*arkanoid quit (*.net *.split)
04:42:10*tinystoat joined #nim
04:42:27*arkanoid joined #nim
04:42:40*redj quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
04:43:07*redj joined #nim
04:44:07*Ekho joined #nim
04:53:20FromDiscord<albassort> coroutines are thread based right
04:53:23FromDiscord<albassort> time to test
04:54:10*attah quit (*.net *.split)
04:54:10*crem quit (*.net *.split)
04:54:10*sforman quit (*.net *.split)
04:54:11*henrytill quit (*.net *.split)
04:54:11*noeontheend quit (*.net *.split)
04:54:11*mronetwo quit (*.net *.split)
04:54:11*djanatyn quit (*.net *.split)
04:54:11*systemdsucks quit (*.net *.split)
04:54:16*systemdsucks joined #nim
04:54:17*mronetwo joined #nim
04:54:18*crem joined #nim
04:54:19*djanatyn joined #nim
04:55:28*noeontheend joined #nim
04:55:54*henrytill joined #nim
04:55:55FromDiscord<albassort> ah, coroutines aren't threadsafe
04:55:58FromDiscord<albassort> :notLikeThis:
04:56:06*sforman joined #nim
04:56:17FromDiscord<Elegantbeef> Of course not they're a type of continuations
04:56:37FromDiscord<Elegantbeef> Just use async and be normal for once
04:57:05FromDiscord<albassort> I feel like coroutines either need some love or need to go the way of threadpool
04:57:26FromDiscord<albassort> am i going to fix coroutines? no.
04:57:48FromDiscord<Elegantbeef> I mean no one uses coroutines
04:57:54FromDiscord<Elegantbeef> So good
04:57:55*attah joined #nim
04:58:17FromDiscord<Elegantbeef> You can make coroutines using CPS if you really need/want
04:58:26FromDiscord<albassort> maybe people would use them more if they got the same love as async
04:58:45FromDiscord<Elegantbeef> Doubtful
04:58:56FromDiscord<Elegantbeef> Async is the decided path for IO blocking operations
05:00:47FromDiscord<albassort> ah fine I'll use async but begrudgingly I think coroutines are superior
05:10:11FromDiscord<albassort> mixing threads and async
05:10:17FromDiscord<albassort> the classic 1 2 punch of headache
05:23:48FromDiscord<Rika> In reply to @albassort "ah fine I'll use": Hard to believe the opinion of the inexperienced
05:25:41FromDiscord<albassort> In reply to @Rika "Hard to believe the": i am inexperienced with coroutines to be hurt by them
05:26:02FromDiscord<albassort> maybe if i used them I would change my mind
05:38:31*derpydoo joined #nim
06:03:23*vicecea joined #nim
06:35:36*jkl1337 joined #nim
06:36:15*jkl quit (Ping timeout: 252 seconds)
06:36:43*systemdsucks quit (Ping timeout: 252 seconds)
06:38:14*systemdsucks joined #nim
06:43:42*tinytoast joined #nim
06:45:01*wallabra quit (Ping timeout: 246 seconds)
06:46:37*tinystoat quit (Ping timeout: 252 seconds)
06:58:43*attah quit (Ping timeout: 252 seconds)
06:59:04*attah joined #nim
07:33:06*derpydoo quit (Ping timeout: 255 seconds)
08:33:31*krux02 joined #nim
09:03:01*attah quit (Ping timeout: 252 seconds)
09:03:28*attah joined #nim
09:18:01*kenran joined #nim
09:18:07*kenran quit (Remote host closed the connection)
09:36:28NimEventerNew thread by mantielero: Undeclared identifier despite being imported, see https://forum.nim-lang.org/t/9561
10:49:28*dnh joined #nim
10:52:25FromDiscord<haywireSSC> how would I make a table of generic objects?
11:11:47*derpydoo joined #nim
11:24:45NimEventerNew thread by ingo: Too many clock-cycles?, see https://forum.nim-lang.org/t/9562
11:32:50*jjido joined #nim
11:50:53FromDiscord<haywireSSC> In reply to @haywireSSC "how would I make": nvm
11:54:02*jmdaemon quit (Ping timeout: 250 seconds)
12:35:30*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
12:47:00FromDiscord<jmgomez> Im trying to find where the windows sdk version is set (for the includes on nimbase) so I can change it, cant find it. Any idea?
12:52:42*jjido joined #nim
12:56:49FromDiscord<jmgomez> just saw it on vccexe.nim
12:59:21*derpydoo quit (Ping timeout: 255 seconds)
12:59:22*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
13:32:00FromDiscord<Raynei486> is there a way for arrays to predict the size?
13:32:53FromDiscord<enthus1ast> @Raynei486\: what does this mean?
13:33:51*dnh quit (Quit: Textual IRC Client: www.textualapp.com)
13:34:04FromDiscord<Raynei486> sent a code paste, see https://play.nim-lang.org/#ix=4esD
13:34:11FromDiscord<Raynei486> letting the compiler fill in the size automatically
13:35:08FromDiscord<demotomohiro> !eval echo [1, 2, 3, 4, 5]
13:35:13NimBot[1, 2, 3, 4, 5]
13:35:14FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=4esE
13:36:29FromDiscord<Raynei486> I didn't know arrays also had "initializers"
13:36:30FromDiscord<Raynei486> Thanks
13:42:16FromDiscord<demotomohiro> @jmgomez If you use visual c++ backend, probably cl.exe has such an option. `cl.exe /?` lists all command like options. Or google cl.exe reference.
13:44:03FromDiscord<jmgomez> In reply to @demotomohiro "<@726017160115126333> If you use": I just ended up passing it to vcc and worked just fine 🙂
14:01:03FromDiscord<haxscramper> In reply to @haxscramper "I'm in process of": comments/commits/pulls activity https://media.discordapp.net/attachments/371759389889003532/1036278564812759101/unknown.png
14:01:37FromDiscord<enthus1ast> nim?
14:02:47FromDiscord<enthus1ast> haha also not noticed it \:D↵(@jmgomez)
14:06:49*jjido joined #nim
14:07:49FromDiscord<haxscramper> In reply to @haxscramper "comments/commits/pulls activity": issues created and closed https://media.discordapp.net/attachments/371759389889003532/1036280267666636820/unknown.png
14:08:45FromDiscord<enthus1ast> mh it looks like the interest declines
14:08:55FromDiscord<enthus1ast> or maybe there are less bugs
14:09:55FromDiscord<haxscramper> Need to wait for the community survey to come in, but last three years had an increasing trend in the bug-fixing priority
14:10:08FromDiscord<haxscramper> so probably the former
14:10:54FromDiscord<enthus1ast> its interesting, because i've the feeling i see a lot new people lately
14:11:40FromDiscord<enthus1ast> ah, but this is for the nim repo right?
14:11:49FromDiscord<enthus1ast> a lot of work has shifted to nimble repos
14:22:36FromDiscord<haxscramper> this is for nim
14:22:40FromDiscord<haxscramper> which repos exactly?
14:40:48FromDiscord<sOkam!> sent a long message, see http://ix.io/4esZ
14:41:51FromDiscord<enthus1ast> i think this is fine
14:43:09FromDiscord<Horizon [She/Her]> Anyone know of a WASM runtime i can look at using?
14:43:10FromDiscord<enthus1ast> for such communication i usually use networking
14:43:17FromDiscord<Horizon [She/Her]> That has Nim bindings
14:43:36FromDiscord<sOkam!> In reply to @enthus1ast "for such communication i": do you have an example of that?
14:43:46FromDiscord<Horizon [She/Her]> My priority is just being able to define APIs that can be accessed via the WASM module
14:44:35FromDiscord<enthus1ast> @sOkam!\: not saying its best practice etc, but it has some benefits, since the parts can run on different nodes
14:45:33FromDiscord<enthus1ast> bind to a port, let the clients connect, do you data exchange eg with line seperated json, on finish close client connection
14:45:45FromDiscord<sOkam!> it could also mean that they could become just one app, so curious
14:45:57FromDiscord<sOkam!> (edit) "one app," => "two apps instead of three,"
14:46:34FromDiscord<sOkam!> oh, but what about local? like the apps themselves run on the computer, they don't need any external access
14:47:02FromDiscord<enthus1ast> then just bind to localhost
15:04:57*redj quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
15:05:50*redj joined #nim
15:17:53FromDiscord<Horizon [She/Her]> How do i include a header file?
15:18:37FromDiscord<Horizon [She/Her]> I want to make bindings to a library, and the header file is in the lib path but apparently Nim uses `#include "path"` and not `#include <path>` so how to do it
15:19:12FromDiscord<Horizon [She/Her]> Will just `emit`ting the code work?
15:37:14FromDiscord<Horizon [She/Her]> I need `uint128` in Nim
15:37:29*derpydoo joined #nim
15:44:38FromDiscord<tangonov> sent a code paste, see https://play.nim-lang.org/#ix=4evH
15:44:42FromDiscord<jmgomez> In reply to @Event Horizon "How do i include": There are multiple ways, usually you can go about it with the header pragma
15:45:41FromDiscord<jmgomez> In reply to @tangonov "I am trying to": why tuple ant not object?
15:46:03FromDiscord<tangonov> Don't need the features in an object, I thought tuples were simpler
15:46:08FromDiscord<jmgomez> Not sure how it will play out with recursive types, AFAIK tuples are structurally checked
15:46:15FromDiscord<jmgomez> rather than nominal
15:46:26*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
15:46:28FromDiscord<Horizon [She/Her]> In reply to @jmgomez "There are multiple ways,": Ah alright!
15:46:28FromDiscord<jmgomez> In reply to @tangonov "Don't need the features": what do you mean?
15:46:46FromDiscord<jmgomez> object is just a struct in c, there is no overhead
15:47:02FromDiscord<tangonov> Hm, okay.
15:48:48FromDiscord<tangonov> I guess I thought tuples had less performance impact, and I'm going to have to iterate the data a couple of times to get more consistent data
15:49:32*redj quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
15:49:44FromDiscord<tangonov> But I'll be the first to admit that I don't know enough and nim is much newer to me. It's a learning project
15:50:28*redj joined #nim
15:51:48FromDiscord<jmgomez> Just stick to objects if that works, not sure about tuples with recursive types. Maybe someone else can tell you about that, what I do know is what I told you, object == nominal types, tuples == structural types. Most of the time you likely will want nominal types
15:53:20FromDiscord<tangonov> sent a code paste, see https://play.nim-lang.org/#ix=4evY
15:59:36FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4evZ
16:00:59FromDiscord<sOkam!> i know that nim has `lsh` and `rsh` instead of `<<` and `>>`, so make me thing that the other two bitwise ops could be different too, and I've never seen people use them in Nim yet 🤔
16:01:29FromDiscord<sOkam!> (edit) "make" => "makes" | "thing" => "think"
16:04:11NimEventerNew thread by exelotl: How to import a C array of unknown size?, see https://forum.nim-lang.org/t/9563
16:14:58FromDiscord<sOkam!> ~~deleted~~ answered myself with some dummy test code↵`C: &` is `Nim: and`, which also serves the purpose of C's `&&`. ↵So they are kinda merged, in a way, which is what confused me
16:16:18FromDiscord<enthus1ast> i wonder (every time i do it) what is best practice for splitting up a growing project into multiple files. Every time its annoying to export all object members etc, even those, that should remain private.
16:16:32FromDiscord<enthus1ast> Any tip?
16:16:32*derpydoo quit (Ping timeout: 246 seconds)
16:19:42FromDiscord<enthus1ast> I want something like the c++ `friend class` or an import that ignores the export markers (for this one export)
16:22:49FromDiscord<enthus1ast> i have the suspicion that nim is underdeveloped in this particular
16:25:58FromDiscord<Tanguy> https://nim-lang.org/docs/importutils.html
16:26:23FromDiscord<enthus1ast> mh yeah
16:26:46FromDiscord<enthus1ast> will try to work with this
16:28:16FromDiscord<enthus1ast> but since its just the current scope, i must do it every time i'm in a extra scope
16:28:24FromDiscord<enthus1ast> quite some bloat
16:28:34FromDiscord<enthus1ast> will try
16:28:39FromDiscord<enthus1ast> ty @Tanguy
16:33:12FromDiscord<danoneil> https://t.me/+PEc8FSRwFiFiYzc0
16:37:35FromDiscord<Ricky Spanish> sent a long message, see http://ix.io/4ew5
16:41:42FromDiscord<enthus1ast> also works on the module level scope.And regarding bloat\: just had to add 1 line so far \:)
16:47:13FromDiscord<haxscramper> In reply to @haxscramper "comments/commits/pulls activity": less confusing plot with bars instead of histogram values and properly stacked https://media.discordapp.net/attachments/371759389889003532/1036320384020119664/unknown.png
16:55:00*derpydoo joined #nim
17:06:34*pro joined #nim
17:27:58*alice is now known as [m]alice
17:28:20*jjido joined #nim
17:49:54*arkurious joined #nim
17:59:20*wallabra joined #nim
18:07:01*derpydoo quit (Quit: derpydoo)
18:25:02FromDiscord<Horizon [She/Her]> In reply to @Tanguy "https://nim-lang.org/docs/importutils.html": Oh that's neat
18:25:54FromDiscord<FireLite> What is the translation of `uintptr_t` for nim?
18:30:10*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
18:39:33*wallabra quit (Ping timeout: 255 seconds)
18:40:02*wallabra joined #nim
18:57:14FromDiscord<Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4ewv
18:57:37FromDiscord<Horizon [She/Her]> Should i just use Futhark to wrap this low-level API?
18:58:24FromDiscord<enthus1ast> @FireLite pointer
19:00:06*jjido joined #nim
19:19:47FromDiscord<Horizon [She/Her]> In reply to @Event Horizon "How am i supposed": Futhark can't wrap this and generates an empty file rip
19:42:43*jmdaemon joined #nim
19:45:08*derpydoo joined #nim
19:49:55FromDiscord<haywireSSC> https://media.discordapp.net/attachments/371759389889003532/1036366358562222131/unknown.png
19:50:06FromDiscord<haywireSSC> how would I do something like this/
19:50:35FromDiscord<haywireSSC> (edit) "this/" => "this?, where I create an object then a refrence to that object"
19:51:24FromDiscord<haywireSSC> it gives me an error saying type expected
19:51:49FromDiscord<dom96> In reply to @haxscramper "less confusing plot with": Awesome graph. Is your script on GitHub?
19:53:11FromDiscord<dom96> would be interesting to see the same for Rust/Go/Zig/etc
19:54:06FromDiscord<haxscramper> https://github.com/haxscramper/code_forensics/blob/master/scripts/repository_activity.py
19:54:20FromDiscord<haxscramper> In reply to @dom96 "would be interesting to": It takes like billion years to compute the DB for the repo
19:54:32FromDiscord<haxscramper> Github limits 5k requests per account, max, and you can't buy more
19:54:43FromDiscord<haxscramper> so now imagine getting 40k comments from the nim repo
19:55:32FromDiscord<haxscramper> I will clean up the schema for the DB a bit and then figure out a reliably way to incrementally update the DB and then I will start pulling in some other languages
19:56:55FromDiscord<haxscramper> In reply to @haxscramper "https://mega.nz/file/Z4cz3DCB#Lfjg_g69nJJGQU5cfjSON": this is the DB I have now, so if you want to see some other stats for yourself
20:05:33FromDiscord<Elegantbeef> I also have the futhark'd wasmedge 0.10.0
20:05:34FromDiscord<Elegantbeef> I have some wasm3 bindings if you just want a wasm runtime↵(@Horizon [She/Her])
20:05:45FromDiscord<Elegantbeef> Though personally i moved to wasm3 since wasmedge wasnt working properly on my distro
20:17:31FromDiscord<Horizon [She/Her]> In reply to @Elegantbeef "I have some wasm3": Yeah we looked at that but really struggled with figuring out how to define our own WASI function implementations, since I'm trying to create a virtual 'machine' (machine being very loosely used, since it's more just a wad of code to pretend to be a very minimal system that can run untrusted code with WASI functions in it's own environment)
20:18:04FromDiscord<Horizon [She/Her]> In reply to @Elegantbeef "I also have the": Did you do anything special for WasmEdge bindings with Futhark or?
20:18:16FromDiscord<Elegantbeef> Nope
20:18:34FromDiscord<Elegantbeef> https://github.com/beef331/wasmedge_playground/blob/master/src/wasmedge.nim#L33-L40
20:18:42FromDiscord<Elegantbeef> That was for 0.10.0
20:19:18FromDiscord<Elegantbeef> Wasmedge started behaving weird on my system and i couldnt diagnose why, so i gave up on it
20:19:27FromDiscord<Elegantbeef> I tried to build it from source but couldnt without docker
20:22:18FromDiscord<Horizon [She/Her]> In reply to @Elegantbeef "https://github.com/beef331/wasmedge_playground/blob": Ah neat!
20:22:45FromDiscord<Horizon [She/Her]> In reply to @Elegantbeef "I tried to build": Fair enough, I'm totally fine with using wasm3 tbh, i just need to figure out how to define my methods with the wasi module name
20:24:38FromDiscord<Elegantbeef> https://github.com/beef331/wasm3/blob/master/src/wasm3.nim#L30 with my wrapped api it should just be use the wasi module name here
20:24:52FromDiscord<Elegantbeef> Though i've never used named modules
20:26:27FromDiscord<Horizon [She/Her]> Aah okay neat! Thank you Beef!
20:28:31FromDiscord<Elegantbeef> wasm3's procedure type is a string that replicates the C equivlent
20:28:31FromDiscord<Elegantbeef> So like a void proc that takes two ints is `v(ii)`
20:29:19FromDiscord<Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4eym
20:29:36FromDiscord<Horizon [She/Her]> In reply to @Elegantbeef "So like a void": So it's the first letter of the primitive type?
20:30:17FromDiscord<Elegantbeef> https://github.com/beef331/wasm3/blob/master/tests/test1.nim#L95-L101 shows a host function being exported
20:30:18FromDiscord<Elegantbeef> `callWasm` is a macro i wrote to make calling native code easier with how wasm3's procedures work, but it only works with basic types presently
20:31:27FromDiscord<Horizon [She/Her]> In reply to @Elegantbeef "`callWasm` is a macro": That's fair, i don't expect to need to use other non-basic types really, since i can wrap methods on the WASM side
20:31:42FromDiscord<Elegantbeef> Yea, there is a case statement inside wasm3's source somewhere that handles it
20:31:58FromDiscord<Elegantbeef> Well also any complex type is passed as an integer
20:32:13FromDiscord<Elegantbeef> Dont think wasm3 supports multiple return types yet
20:32:54FromDiscord<Horizon [She/Her]> Fair
20:33:21FromDiscord<Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4eyo
20:33:27FromDiscord<Elegantbeef> Seems like it's an issue with git submodules?
20:33:56FromDiscord<Elegantbeef> Yea i got the same thing here
20:34:04FromDiscord<Elegantbeef> You may have to clone it and then `nimble develop`
20:34:50FromDiscord<Horizon [She/Her]> Ah alright then
20:35:48FromDiscord<Elegantbeef> I included wasm3's source as a sub module to make everyone's life easier
20:35:48FromDiscord<Elegantbeef> But it seems that may not have made nimble happy?
20:40:36FromDiscord<Horizon [She/Her]> Probably not, but should be fine, i've just added wasm3 (your bindings) as a submodule now and used recursive submodule cloning
20:42:35FromDiscord<Horizon [She/Her]> I wonder if it's possible to make Nimble use a directory as a dependency
20:47:33FromDiscord<Horizon [She/Her]> Finally got wasm3 working locally, gonna run a test program now
20:48:06FromDiscord<Elegantbeef> All the tests dumbly rely on having emscripten installed, i probably should push the `.wasm` files to the repo
20:49:34FromDiscord<Horizon [She/Her]> Eh i have my own test file so it's fine
20:49:55FromDiscord<Horizon [She/Her]> Just a simple hello world file with emscripten (compiled with the standalone mode)
20:49:57FromDiscord<Elegantbeef> I will say it's probably smarter to use `nimble develop` so you can atleast easily test/PR changes 😄
20:51:12FromDiscord<Horizon [She/Her]> Fair enough! I'll set that up later haha
20:54:36FromDiscord<Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4eyr
20:54:38FromDiscord<Horizon [She/Her]> Just for hello world
20:55:48FromDiscord<Elegantbeef> What was the source language?
20:56:10FromDiscord<Elegantbeef> I also dont recall if wasm3 has wat support
21:00:11FromDiscord<Horizon [She/Her]> In reply to @Elegantbeef "What was the source": It was in C with Emscripten which is weird
21:00:40FromDiscord<Horizon [She/Her]> In reply to @Elegantbeef "I also dont recall": Ah it's a WASM file, i'm just using the WAT format to help me see what i need to implement
21:00:44FromDiscord<Elegantbeef> Did you compile with optimisation flags?
21:01:00FromDiscord<Horizon [She/Her]> Hm i don't know, probably not, let me try that now
21:02:55FromDiscord<Horizon [She/Her]> `-O3` is what i compiled it with
21:03:07FromDiscord<Horizon [She/Her]> Gives me the same output when compiling the program
21:05:10FromDiscord<Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4eyu
21:05:42*redj quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
21:06:38*redj joined #nim
21:06:43*pro quit (Quit: pro)
21:16:05FromDiscord<System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4eyw
21:16:14FromDiscord<Elegantbeef> A bitset
21:16:16FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=
21:16:17FromDiscord<Elegantbeef> Shit
21:17:10FromDiscord<Elegantbeef> Make the first 8 bits a set on a object, the next 8 a uint8 and the last 16 a uint16 then marked the object {.packed.}
21:17:53FromDiscord<System64 ~ Flandre Scarlet> Ah so I should create an object?
21:21:47FromDiscord<Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4eyx
21:22:16FromDiscord<Horizon [She/Her]> Will look into if i can make the error message better because yeah that's not gonna help me lmao
21:23:18FromDiscord<System64 ~ Flandre Scarlet> In reply to @Elegantbeef "A bitset": Humm how does it work? I don't understand very well
21:26:09FromDiscord<Elegantbeef> It's just me bubbling up wasm3's error message↵(@Horizon [She/Her])
21:27:12FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4eyz
21:27:15FromDiscord<Elegantbeef> There you go system64
21:28:49FromDiscord<Horizon [She/Her]> In reply to @Elegantbeef "It's just me bubbling": Ah so that's just wasm3? Unfortunate but that'll have to do then
21:29:25FromDiscord<System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4eyA
21:36:22FromDiscord<Horizon [She/Her]> sent a code paste, see https://discordapp.com/channels/371759389889003530/371759389889003532/1036393122399264789
21:36:22FromDiscord<Horizon [She/Her]> sent a code paste, see https://discordapp.com/channels/371759389889003530/371759389889003532/1036393108105072761
21:37:03FromDiscord<Elegantbeef> Yea callWasm isnt exactly feature complete 😄
21:37:11NimEventerNew thread by matkuki: NimEdit: can it be made compilable with Nim 1.6.8?, see https://forum.nim-lang.org/t/9564
21:38:19FromDiscord<Horizon [She/Her]> In reply to @Elegantbeef "Yea callWasm isnt exactly": Guess i'll have to use lower level calls then?
21:39:36FromDiscord<Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4eyD
21:41:06FromDiscord<Elegantbeef> Should use int32 anyway
21:42:07FromDiscord<Horizon [She/Her]> Oh? Why's that?
21:42:39FromDiscord<Horizon [She/Her]> Ah that seemed to fix the error (using int32 instead of int)
21:44:13FromDiscord<haywireSSC> In reply to @haywireSSC "": https://media.discordapp.net/attachments/371759389889003532/1036395120649568367/unknown.png
21:44:14FromDiscord<haywireSSC> found it
21:44:27FromDiscord<Elegantbeef> Wasm is 32bit
21:48:29*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
21:48:59FromDiscord<Horizon [She/Her]> Ah
21:51:23*krux02 quit (Remote host closed the connection)
21:51:42FromDiscord<Horizon [She/Her]> I got it somewhat working but ooof I don't want to implement everything from scratch but I'm probably gonna have to since, custom functionality
22:06:11FromDiscord<System64 ~ Flandre Scarlet> Is that normal? https://media.discordapp.net/attachments/371759389889003532/1036400651028140192/unknown.png
22:17:13FromDiscord<haywireSSC> Is there a way to access variables by string name?
22:17:22FromDiscord<haywireSSC> Ik this is really bad practice xd
22:20:20FromDiscord<demotomohiro> In reply to @System64 "Is that normal?": BiggestInt is signed int not unsigned.
22:20:34FromDiscord<System64 ~ Flandre Scarlet> Oh alright
22:24:43FromDiscord<Elegantbeef> There is but there is 0 reason to really do as such↵(@haywireSSC)
22:28:00FromDiscord<Elegantbeef> You'd use a macro to do as such
23:04:08*krux02 joined #nim
23:05:30*derpydoo quit (Ping timeout: 255 seconds)
23:10:34*redj quit (Ping timeout: 252 seconds)
23:11:14*redj joined #nim
23:12:51*krux02 quit (Remote host closed the connection)
23:26:53FromDiscord<Generic> In reply to @haywireSSC "Is there a way": is the string known at compile time, otherwise not?
23:27:02FromDiscord<Generic> (edit) "time, otherwise not?" => "time? Otherwise not."