00:01:32 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
00:03:43 | * | Lord_Nightmare joined #nim |
00:07:33 | FromDiscord | <Phil> That's just strutils |
00:08:03 | FromDiscord | <Elegantbeef> No that's amore |
00:08:41 | FromDiscord | <Phil> Strudeltils |
00:11:47 | FromDiscord | <albassort> today im working with coroutines |
00:11:48 | FromDiscord | <Elegantbeef> Uhhh |
00:13:04 | FromDiscord | <albassort> hey, rika always tells me to do webscraping in async |
00:13:29 | FromDiscord | <Elegantbeef> That's the correct way of doing IO intensive operations |
00:14:05 | FromDiscord | <albassort> but im running it in a coro because i want to have a ctrl-c to stop the recursive proc |
00:14:11 | FromDiscord | <Rika> ?? |
00:14:22 | FromDiscord | <Rika> You can still do that with async |
00:14:26 | FromDiscord | <albassort> yea |
00:14:29 | FromDiscord | <ChocolettePalette> strutils doesn't have such functionality btw |
00:14:54 | FromDiscord | <albassort> In reply to @ChocolettePalette "strutils doesn't have such": it does not; but Rosetta code had a neat code example |
00:15:11 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=4eqz |
00:15:58 | FromDiscord | <albassort> In reply to @Rika "You can still do": async is for nerds and i dont like it |
00:16:24 | FromDiscord | <ChocolettePalette> So is programming in general |
00:16:41 | FromDiscord | <ChocolettePalette> Unlike e.g. football |
00:16:51 | FromDiscord | <albassort> idk, Async has never worked in my brain |
00:16:56 | FromDiscord | <albassort> its super clunky, I don't like it |
00:17:05 | FromDiscord | <albassort> coroutines is more how i think about programs |
00:17:22 | FromDiscord | <Phil> I recommend an angular bootcamp, forced coding in rxjs for 3 straight months |
00:17:27 | FromDiscord | <Phil> Async will no longer be scary after that |
00:17:34 | FromDiscord | <Phil> Also your brain will be broken in very funny ways |
00:17:34 | FromDiscord | <albassort> I've done... it |
00:17:41 | FromDiscord | <albassort> yea |
00:17:42 | FromDiscord | <Rika> Because you’re relegating what you manually do in async to the OS instead |
00:17:51 | FromDiscord | <Rika> Reactive is another hell |
00:17:59 | FromDiscord | <Rika> Using reactive easy |
00:18:01 | FromDiscord | <albassort> async js is like slamming a hammer into your testicles |
00:18:04 | FromDiscord | <Rika> Making reactive hard |
00:20:27 | FromDiscord | <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:50 | FromDiscord | <albassort> how do i get the maximum value of an integer type? |
00:22:06 | FromDiscord | <Elegantbeef> `high` |
00:22:11 | FromDiscord | <Phil> `int.high` |
00:23:46 | FromDiscord | <albassort> sent a long message, see http://ix.io/4eqz |
00:23:59 | FromDiscord | <albassort> i despise when flameshot fails to copy to clipboard |
00:26:04 | FromDiscord | <albassort> it seems stdlib coroutines kinda meh |
00:27:17 | FromDiscord | <Rika> Lol |
00:31:08 | FromDiscord | <albassort> oh so coro suspends main |
00:31:19 | FromDiscord | <albassort> :pensivemoai: |
00:37:43 | FromDiscord | <Mr.Ender> how can I set a default value for something in a type |
00:38:38 | FromDiscord | <Elegantbeef> Whatelse would it do? |
00:39:18 | FromDiscord | <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:33 | FromDiscord | <Mr.Ender> and if they are not defined just default the undefined values to false |
00:39:52 | FromDiscord | <albassort> create a proc which instantiates it with new and set its value |
00:41:05 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=4eqC |
00:41:19 | FromDiscord | <albassort> (edit) "https://play.nim-lang.org/#ix=4eqC" => "https://play.nim-lang.org/#ix=4eqD" |
00:41:27 | FromDiscord | <albassort> results are already created with new and mutable so this works fine |
00:42:31 | FromDiscord | <Elegantbeef> Only if it's a non ref type |
00:43:38 | FromDiscord | <Mr.Ender> sent a long message, see http://ix.io/4eqE |
00:43:42 | FromDiscord | <Elegantbeef> Just use a set |
00:43:51 | FromDiscord | <albassort> that would be cool syntax yes |
00:44:16 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4eqF |
00:44:19 | FromDiscord | <albassort> however, its a bit complicated because most basic types already have defaults |
00:44:45 | FromDiscord | <albassort> dont know why its not in nim atm |
00:44:49 | FromDiscord | <Elegantbeef> Eh Nim will have that in 2.0 |
00:44:54 | FromDiscord | <Elegantbeef> A bitset makes more sense |
00:44:57 | FromDiscord | <albassort> im sure theres some philosophical --- |
00:45:09 | FromDiscord | <albassort> well i guess its in the pipeline |
00:45:20 | FromDiscord | <Elegantbeef> I mean it already is in devel |
00:45:42 | FromDiscord | <albassort> I like nim because of how free it is, while keeping things maintainable |
00:46:03 | FromDiscord | <albassort> my friend pointed out that I get really angry when languages stop me from doing stuff |
00:46:08 | FromDiscord | <albassort> lo |
00:46:11 | FromDiscord | <albassort> (edit) "lo" => "lol" |
00:48:18 | FromDiscord | <albassort> is there a way to kill a coroutine |
00:48:34 | FromDiscord | <Elegantbeef> Who knows, no one uses coro |
00:48:50 | FromDiscord | <albassort> i wanna be different, but I dont want to try too hard |
01:16:49 | FromDiscord | <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:33 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4eqJ |
01:19:53 | FromDiscord | <Mr.Ender> thank you I surprised how I have never cam across this |
01:20:17 | FromDiscord | <Elegantbeef> Nim is the land of "Everything is an expression" |
01:27:49 | FromDiscord | <ChocolettePalette> Omg this is so cool actually |
01:28:53 | FromDiscord | <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:05 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/t8n |
01:36:17 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=4eqK |
01:36:31 | FromDiscord | <albassort> i dont know if i like it |
01:37:14 | FromDiscord | <Elegantbeef> Ok? |
01:37:48 | FromDiscord | <Rika> ok |
01:37:58 | FromDiscord | <Rika> idk what you want us to say |
01:38:02 | FromDiscord | <Elegantbeef> It's better than the alternative |
01:38:25 | FromDiscord | <albassort> im expressing my concern |
01:38:40 | FromDiscord | <albassort> i dont think its as readable as per-defineing it |
01:39:10 | FromDiscord | <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:39 | FromDiscord | <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:48 | FromDiscord | <albassort> is there anyway to check if you're running in a spawned thread or main thread |
03:21:46 | FromDiscord | <albassort> eh i guess i'll just make an enum |
03:23:21 | FromDiscord | <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:29 | FromDiscord | <albassort> i want to combine a if statement and a while statement |
03:25:02 | FromDiscord | <Elegantbeef> What? |
03:25:05 | FromDiscord | <Rika> In reply to @albassort "i want to combine": what does that mean |
03:25:21 | FromDiscord | <albassort> its a while loop that doesn't loop |
03:25:43 | FromDiscord | <albassort> if at any point during the if statement the condition becomes false it goes to else |
03:25:50 | FromDiscord | <albassort> or just breaks the block |
03:27:18 | FromDiscord | <Rika> what |
03:27:25 | FromDiscord | <Rika> thats more complicated than you think |
03:27:42 | FromDiscord | <albassort> no its just as complicated as i think |
03:27:44 | FromDiscord | <albassort> and its stupid |
03:27:53 | FromDiscord | <Rika> thats not really a while loop either |
03:28:00 | FromDiscord | <albassort> well its not a loop |
03:28:09 | FromDiscord | <albassort> its just an if statement which returns |
03:28:15 | FromDiscord | <Rika> its no |
03:28:18 | FromDiscord | <Rika> (edit) "no" => "not that either" |
03:28:31 | FromDiscord | <Rika> its a group of statements with multiple if checks in the middle |
03:29:21 | FromDiscord | <albassort> if you really wanted to implement it you can just do it like this |
03:30:22 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=4eqY |
03:30:34 | FromDiscord | <albassort> (edit) "https://play.nim-lang.org/#ix=4eqY" => "https://play.nim-lang.org/#ix=4eqZ" |
03:30:46 | FromDiscord | <albassort> (edit) "https://play.nim-lang.org/#ix=4eqZ" => "https://play.nim-lang.org/#ix=4er0" |
03:30:59 | FromDiscord | <Rika> not really |
03:31:06 | FromDiscord | <Rika> in the middle the check is not made |
03:31:29 | FromDiscord | <albassort> yea but the while manages the condition |
03:31:47 | FromDiscord | <albassort> im running coroutines in threads and i want it to exit when i hit ctrl-c and then do something |
03:31:52 | FromDiscord | <albassort> this is the best solution i have |
03:32:15 | FromDiscord | <albassort> https://media.discordapp.net/attachments/371759389889003532/1036120321322913832/unknown.png |
03:32:32 | FromDiscord | <albassort> yes i commit warcrimes |
03:32:42 | FromDiscord | <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:54 | FromDiscord | <that_dude> wait I think I'm reading that wrong |
03:33:24 | FromDiscord | <albassort> this is a really stupid idea i have |
03:33:32 | FromDiscord | <albassort> this creates far too many problems to be in nim |
03:33:36 | FromDiscord | <Rika> control c is a signal on unix, not really a condition |
03:33:54 | FromDiscord | <Rika> In reply to @that_dude "iirc there was a": technically that is still correct |
03:34:14 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=4er1 |
03:34:24 | FromDiscord | <albassort> boom |
03:35:10 | FromDiscord | <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:13 | FromDiscord | <Rika> (edit) "`https://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q" => "`https://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q`" |
03:35:36 | FromDiscord | <Rika> if you want to censor something id recommend always using pixellation |
03:35:38 | FromDiscord | <albassort> fuck |
03:35:57 | FromDiscord | <albassort> noooooo dont know im doing a weird project |
03:36:16 | FromDiscord | <albassort> maybe related to the kanji thing |
03:36:27 | FromDiscord | <albassort> (i dont trust the frequency statistics for kanji) |
03:38:22 | FromDiscord | <Elegantbeef> Why this doesnt just a channel is beyond me |
03:38:26 | FromDiscord | <Elegantbeef> just use a |
03:41:30 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4er3 |
03:42:34 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4er4 |
03:42:44 | FromDiscord | <Elegantbeef> And of course set the `doProcess` bool to false |
03:43:00 | FromDiscord | <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:36 | FromDiscord | <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:20 | FromDiscord | <albassort> coroutines are thread based right |
04:53:23 | FromDiscord | <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:55 | FromDiscord | <albassort> ah, coroutines aren't threadsafe |
04:55:58 | FromDiscord | <albassort> :notLikeThis: |
04:56:06 | * | sforman joined #nim |
04:56:17 | FromDiscord | <Elegantbeef> Of course not they're a type of continuations |
04:56:37 | FromDiscord | <Elegantbeef> Just use async and be normal for once |
04:57:05 | FromDiscord | <albassort> I feel like coroutines either need some love or need to go the way of threadpool |
04:57:26 | FromDiscord | <albassort> am i going to fix coroutines? no. |
04:57:48 | FromDiscord | <Elegantbeef> I mean no one uses coroutines |
04:57:54 | FromDiscord | <Elegantbeef> So good |
04:57:55 | * | attah joined #nim |
04:58:17 | FromDiscord | <Elegantbeef> You can make coroutines using CPS if you really need/want |
04:58:26 | FromDiscord | <albassort> maybe people would use them more if they got the same love as async |
04:58:45 | FromDiscord | <Elegantbeef> Doubtful |
04:58:56 | FromDiscord | <Elegantbeef> Async is the decided path for IO blocking operations |
05:00:47 | FromDiscord | <albassort> ah fine I'll use async but begrudgingly I think coroutines are superior |
05:10:11 | FromDiscord | <albassort> mixing threads and async |
05:10:17 | FromDiscord | <albassort> the classic 1 2 punch of headache |
05:23:48 | FromDiscord | <Rika> In reply to @albassort "ah fine I'll use": Hard to believe the opinion of the inexperienced |
05:25:41 | FromDiscord | <albassort> In reply to @Rika "Hard to believe the": i am inexperienced with coroutines to be hurt by them |
05:26:02 | FromDiscord | <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:28 | NimEventer | New thread by mantielero: Undeclared identifier despite being imported, see https://forum.nim-lang.org/t/9561 |
10:49:28 | * | dnh joined #nim |
10:52:25 | FromDiscord | <haywireSSC> how would I make a table of generic objects? |
11:11:47 | * | derpydoo joined #nim |
11:24:45 | NimEventer | New thread by ingo: Too many clock-cycles?, see https://forum.nim-lang.org/t/9562 |
11:32:50 | * | jjido joined #nim |
11:50:53 | FromDiscord | <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:00 | FromDiscord | <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:49 | FromDiscord | <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:00 | FromDiscord | <Raynei486> is there a way for arrays to predict the size? |
13:32:53 | FromDiscord | <enthus1ast> @Raynei486\: what does this mean? |
13:33:51 | * | dnh quit (Quit: Textual IRC Client: www.textualapp.com) |
13:34:04 | FromDiscord | <Raynei486> sent a code paste, see https://play.nim-lang.org/#ix=4esD |
13:34:11 | FromDiscord | <Raynei486> letting the compiler fill in the size automatically |
13:35:08 | FromDiscord | <demotomohiro> !eval echo [1, 2, 3, 4, 5] |
13:35:13 | NimBot | [1, 2, 3, 4, 5] |
13:35:14 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=4esE |
13:36:29 | FromDiscord | <Raynei486> I didn't know arrays also had "initializers" |
13:36:30 | FromDiscord | <Raynei486> Thanks |
13:42:16 | FromDiscord | <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:03 | FromDiscord | <jmgomez> In reply to @demotomohiro "<@726017160115126333> If you use": I just ended up passing it to vcc and worked just fine 🙂 |
14:01:03 | FromDiscord | <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:37 | FromDiscord | <enthus1ast> nim? |
14:02:47 | FromDiscord | <enthus1ast> haha also not noticed it \:D↵(@jmgomez) |
14:06:49 | * | jjido joined #nim |
14:07:49 | FromDiscord | <haxscramper> In reply to @haxscramper "comments/commits/pulls activity": issues created and closed https://media.discordapp.net/attachments/371759389889003532/1036280267666636820/unknown.png |
14:08:45 | FromDiscord | <enthus1ast> mh it looks like the interest declines |
14:08:55 | FromDiscord | <enthus1ast> or maybe there are less bugs |
14:09:55 | FromDiscord | <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:08 | FromDiscord | <haxscramper> so probably the former |
14:10:54 | FromDiscord | <enthus1ast> its interesting, because i've the feeling i see a lot new people lately |
14:11:40 | FromDiscord | <enthus1ast> ah, but this is for the nim repo right? |
14:11:49 | FromDiscord | <enthus1ast> a lot of work has shifted to nimble repos |
14:22:36 | FromDiscord | <haxscramper> this is for nim |
14:22:40 | FromDiscord | <haxscramper> which repos exactly? |
14:40:48 | FromDiscord | <sOkam!> sent a long message, see http://ix.io/4esZ |
14:41:51 | FromDiscord | <enthus1ast> i think this is fine |
14:43:09 | FromDiscord | <Horizon [She/Her]> Anyone know of a WASM runtime i can look at using? |
14:43:10 | FromDiscord | <enthus1ast> for such communication i usually use networking |
14:43:17 | FromDiscord | <Horizon [She/Her]> That has Nim bindings |
14:43:36 | FromDiscord | <sOkam!> In reply to @enthus1ast "for such communication i": do you have an example of that? |
14:43:46 | FromDiscord | <Horizon [She/Her]> My priority is just being able to define APIs that can be accessed via the WASM module |
14:44:35 | FromDiscord | <enthus1ast> @sOkam!\: not saying its best practice etc, but it has some benefits, since the parts can run on different nodes |
14:45:33 | FromDiscord | <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:45 | FromDiscord | <sOkam!> it could also mean that they could become just one app, so curious |
14:45:57 | FromDiscord | <sOkam!> (edit) "one app," => "two apps instead of three," |
14:46:34 | FromDiscord | <sOkam!> oh, but what about local? like the apps themselves run on the computer, they don't need any external access |
14:47:02 | FromDiscord | <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:53 | FromDiscord | <Horizon [She/Her]> How do i include a header file? |
15:18:37 | FromDiscord | <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:12 | FromDiscord | <Horizon [She/Her]> Will just `emit`ting the code work? |
15:37:14 | FromDiscord | <Horizon [She/Her]> I need `uint128` in Nim |
15:37:29 | * | derpydoo joined #nim |
15:44:38 | FromDiscord | <tangonov> sent a code paste, see https://play.nim-lang.org/#ix=4evH |
15:44:42 | FromDiscord | <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:41 | FromDiscord | <jmgomez> In reply to @tangonov "I am trying to": why tuple ant not object? |
15:46:03 | FromDiscord | <tangonov> Don't need the features in an object, I thought tuples were simpler |
15:46:08 | FromDiscord | <jmgomez> Not sure how it will play out with recursive types, AFAIK tuples are structurally checked |
15:46:15 | FromDiscord | <jmgomez> rather than nominal |
15:46:26 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
15:46:28 | FromDiscord | <Horizon [She/Her]> In reply to @jmgomez "There are multiple ways,": Ah alright! |
15:46:28 | FromDiscord | <jmgomez> In reply to @tangonov "Don't need the features": what do you mean? |
15:46:46 | FromDiscord | <jmgomez> object is just a struct in c, there is no overhead |
15:47:02 | FromDiscord | <tangonov> Hm, okay. |
15:48:48 | FromDiscord | <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:44 | FromDiscord | <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:48 | FromDiscord | <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:20 | FromDiscord | <tangonov> sent a code paste, see https://play.nim-lang.org/#ix=4evY |
15:59:36 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4evZ |
16:00:59 | FromDiscord | <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:29 | FromDiscord | <sOkam!> (edit) "make" => "makes" | "thing" => "think" |
16:04:11 | NimEventer | New thread by exelotl: How to import a C array of unknown size?, see https://forum.nim-lang.org/t/9563 |
16:14:58 | FromDiscord | <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:18 | FromDiscord | <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:32 | FromDiscord | <enthus1ast> Any tip? |
16:16:32 | * | derpydoo quit (Ping timeout: 246 seconds) |
16:19:42 | FromDiscord | <enthus1ast> I want something like the c++ `friend class` or an import that ignores the export markers (for this one export) |
16:22:49 | FromDiscord | <enthus1ast> i have the suspicion that nim is underdeveloped in this particular |
16:25:58 | FromDiscord | <Tanguy> https://nim-lang.org/docs/importutils.html |
16:26:23 | FromDiscord | <enthus1ast> mh yeah |
16:26:46 | FromDiscord | <enthus1ast> will try to work with this |
16:28:16 | FromDiscord | <enthus1ast> but since its just the current scope, i must do it every time i'm in a extra scope |
16:28:24 | FromDiscord | <enthus1ast> quite some bloat |
16:28:34 | FromDiscord | <enthus1ast> will try |
16:28:39 | FromDiscord | <enthus1ast> ty @Tanguy |
16:33:12 | FromDiscord | <danoneil> https://t.me/+PEc8FSRwFiFiYzc0 |
16:37:35 | FromDiscord | <Ricky Spanish> sent a long message, see http://ix.io/4ew5 |
16:41:42 | FromDiscord | <enthus1ast> also works on the module level scope.And regarding bloat\: just had to add 1 line so far \:) |
16:47:13 | FromDiscord | <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:02 | FromDiscord | <Horizon [She/Her]> In reply to @Tanguy "https://nim-lang.org/docs/importutils.html": Oh that's neat |
18:25:54 | FromDiscord | <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:14 | FromDiscord | <Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4ewv |
18:57:37 | FromDiscord | <Horizon [She/Her]> Should i just use Futhark to wrap this low-level API? |
18:58:24 | FromDiscord | <enthus1ast> @FireLite pointer |
19:00:06 | * | jjido joined #nim |
19:19:47 | FromDiscord | <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:55 | FromDiscord | <haywireSSC> https://media.discordapp.net/attachments/371759389889003532/1036366358562222131/unknown.png |
19:50:06 | FromDiscord | <haywireSSC> how would I do something like this/ |
19:50:35 | FromDiscord | <haywireSSC> (edit) "this/" => "this?, where I create an object then a refrence to that object" |
19:51:24 | FromDiscord | <haywireSSC> it gives me an error saying type expected |
19:51:49 | FromDiscord | <dom96> In reply to @haxscramper "less confusing plot with": Awesome graph. Is your script on GitHub? |
19:53:11 | FromDiscord | <dom96> would be interesting to see the same for Rust/Go/Zig/etc |
19:54:06 | FromDiscord | <haxscramper> https://github.com/haxscramper/code_forensics/blob/master/scripts/repository_activity.py |
19:54:20 | FromDiscord | <haxscramper> In reply to @dom96 "would be interesting to": It takes like billion years to compute the DB for the repo |
19:54:32 | FromDiscord | <haxscramper> Github limits 5k requests per account, max, and you can't buy more |
19:54:43 | FromDiscord | <haxscramper> so now imagine getting 40k comments from the nim repo |
19:55:32 | FromDiscord | <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:55 | FromDiscord | <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:33 | FromDiscord | <Elegantbeef> I also have the futhark'd wasmedge 0.10.0 |
20:05:34 | FromDiscord | <Elegantbeef> I have some wasm3 bindings if you just want a wasm runtime↵(@Horizon [She/Her]) |
20:05:45 | FromDiscord | <Elegantbeef> Though personally i moved to wasm3 since wasmedge wasnt working properly on my distro |
20:17:31 | FromDiscord | <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:04 | FromDiscord | <Horizon [She/Her]> In reply to @Elegantbeef "I also have the": Did you do anything special for WasmEdge bindings with Futhark or? |
20:18:16 | FromDiscord | <Elegantbeef> Nope |
20:18:34 | FromDiscord | <Elegantbeef> https://github.com/beef331/wasmedge_playground/blob/master/src/wasmedge.nim#L33-L40 |
20:18:42 | FromDiscord | <Elegantbeef> That was for 0.10.0 |
20:19:18 | FromDiscord | <Elegantbeef> Wasmedge started behaving weird on my system and i couldnt diagnose why, so i gave up on it |
20:19:27 | FromDiscord | <Elegantbeef> I tried to build it from source but couldnt without docker |
20:22:18 | FromDiscord | <Horizon [She/Her]> In reply to @Elegantbeef "https://github.com/beef331/wasmedge_playground/blob": Ah neat! |
20:22:45 | FromDiscord | <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:38 | FromDiscord | <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:52 | FromDiscord | <Elegantbeef> Though i've never used named modules |
20:26:27 | FromDiscord | <Horizon [She/Her]> Aah okay neat! Thank you Beef! |
20:28:31 | FromDiscord | <Elegantbeef> wasm3's procedure type is a string that replicates the C equivlent |
20:28:31 | FromDiscord | <Elegantbeef> So like a void proc that takes two ints is `v(ii)` |
20:29:19 | FromDiscord | <Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4eym |
20:29:36 | FromDiscord | <Horizon [She/Her]> In reply to @Elegantbeef "So like a void": So it's the first letter of the primitive type? |
20:30:17 | FromDiscord | <Elegantbeef> https://github.com/beef331/wasm3/blob/master/tests/test1.nim#L95-L101 shows a host function being exported |
20:30:18 | FromDiscord | <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:27 | FromDiscord | <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:42 | FromDiscord | <Elegantbeef> Yea, there is a case statement inside wasm3's source somewhere that handles it |
20:31:58 | FromDiscord | <Elegantbeef> Well also any complex type is passed as an integer |
20:32:13 | FromDiscord | <Elegantbeef> Dont think wasm3 supports multiple return types yet |
20:32:54 | FromDiscord | <Horizon [She/Her]> Fair |
20:33:21 | FromDiscord | <Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4eyo |
20:33:27 | FromDiscord | <Elegantbeef> Seems like it's an issue with git submodules? |
20:33:56 | FromDiscord | <Elegantbeef> Yea i got the same thing here |
20:34:04 | FromDiscord | <Elegantbeef> You may have to clone it and then `nimble develop` |
20:34:50 | FromDiscord | <Horizon [She/Her]> Ah alright then |
20:35:48 | FromDiscord | <Elegantbeef> I included wasm3's source as a sub module to make everyone's life easier |
20:35:48 | FromDiscord | <Elegantbeef> But it seems that may not have made nimble happy? |
20:40:36 | FromDiscord | <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:35 | FromDiscord | <Horizon [She/Her]> I wonder if it's possible to make Nimble use a directory as a dependency |
20:47:33 | FromDiscord | <Horizon [She/Her]> Finally got wasm3 working locally, gonna run a test program now |
20:48:06 | FromDiscord | <Elegantbeef> All the tests dumbly rely on having emscripten installed, i probably should push the `.wasm` files to the repo |
20:49:34 | FromDiscord | <Horizon [She/Her]> Eh i have my own test file so it's fine |
20:49:55 | FromDiscord | <Horizon [She/Her]> Just a simple hello world file with emscripten (compiled with the standalone mode) |
20:49:57 | FromDiscord | <Elegantbeef> I will say it's probably smarter to use `nimble develop` so you can atleast easily test/PR changes 😄 |
20:51:12 | FromDiscord | <Horizon [She/Her]> Fair enough! I'll set that up later haha |
20:54:36 | FromDiscord | <Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4eyr |
20:54:38 | FromDiscord | <Horizon [She/Her]> Just for hello world |
20:55:48 | FromDiscord | <Elegantbeef> What was the source language? |
20:56:10 | FromDiscord | <Elegantbeef> I also dont recall if wasm3 has wat support |
21:00:11 | FromDiscord | <Horizon [She/Her]> In reply to @Elegantbeef "What was the source": It was in C with Emscripten which is weird |
21:00:40 | FromDiscord | <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:44 | FromDiscord | <Elegantbeef> Did you compile with optimisation flags? |
21:01:00 | FromDiscord | <Horizon [She/Her]> Hm i don't know, probably not, let me try that now |
21:02:55 | FromDiscord | <Horizon [She/Her]> `-O3` is what i compiled it with |
21:03:07 | FromDiscord | <Horizon [She/Her]> Gives me the same output when compiling the program |
21:05:10 | FromDiscord | <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:05 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4eyw |
21:16:14 | FromDiscord | <Elegantbeef> A bitset |
21:16:16 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix= |
21:16:17 | FromDiscord | <Elegantbeef> Shit |
21:17:10 | FromDiscord | <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:53 | FromDiscord | <System64 ~ Flandre Scarlet> Ah so I should create an object? |
21:21:47 | FromDiscord | <Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4eyx |
21:22:16 | FromDiscord | <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:18 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "A bitset": Humm how does it work? I don't understand very well |
21:26:09 | FromDiscord | <Elegantbeef> It's just me bubbling up wasm3's error message↵(@Horizon [She/Her]) |
21:27:12 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4eyz |
21:27:15 | FromDiscord | <Elegantbeef> There you go system64 |
21:28:49 | FromDiscord | <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:25 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4eyA |
21:36:22 | FromDiscord | <Horizon [She/Her]> sent a code paste, see https://discordapp.com/channels/371759389889003530/371759389889003532/1036393122399264789 |
21:36:22 | FromDiscord | <Horizon [She/Her]> sent a code paste, see https://discordapp.com/channels/371759389889003530/371759389889003532/1036393108105072761 |
21:37:03 | FromDiscord | <Elegantbeef> Yea callWasm isnt exactly feature complete 😄 |
21:37:11 | NimEventer | New thread by matkuki: NimEdit: can it be made compilable with Nim 1.6.8?, see https://forum.nim-lang.org/t/9564 |
21:38:19 | FromDiscord | <Horizon [She/Her]> In reply to @Elegantbeef "Yea callWasm isnt exactly": Guess i'll have to use lower level calls then? |
21:39:36 | FromDiscord | <Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4eyD |
21:41:06 | FromDiscord | <Elegantbeef> Should use int32 anyway |
21:42:07 | FromDiscord | <Horizon [She/Her]> Oh? Why's that? |
21:42:39 | FromDiscord | <Horizon [She/Her]> Ah that seemed to fix the error (using int32 instead of int) |
21:44:13 | FromDiscord | <haywireSSC> In reply to @haywireSSC "": https://media.discordapp.net/attachments/371759389889003532/1036395120649568367/unknown.png |
21:44:14 | FromDiscord | <haywireSSC> found it |
21:44:27 | FromDiscord | <Elegantbeef> Wasm is 32bit |
21:48:29 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
21:48:59 | FromDiscord | <Horizon [She/Her]> Ah |
21:51:23 | * | krux02 quit (Remote host closed the connection) |
21:51:42 | FromDiscord | <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:11 | FromDiscord | <System64 ~ Flandre Scarlet> Is that normal? https://media.discordapp.net/attachments/371759389889003532/1036400651028140192/unknown.png |
22:17:13 | FromDiscord | <haywireSSC> Is there a way to access variables by string name? |
22:17:22 | FromDiscord | <haywireSSC> Ik this is really bad practice xd |
22:20:20 | FromDiscord | <demotomohiro> In reply to @System64 "Is that normal?": BiggestInt is signed int not unsigned. |
22:20:34 | FromDiscord | <System64 ~ Flandre Scarlet> Oh alright |
22:24:43 | FromDiscord | <Elegantbeef> There is but there is 0 reason to really do as such↵(@haywireSSC) |
22:28:00 | FromDiscord | <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:53 | FromDiscord | <Generic> In reply to @haywireSSC "Is there a way": is the string known at compile time, otherwise not? |
23:27:02 | FromDiscord | <Generic> (edit) "time, otherwise not?" => "time? Otherwise not." |