00:15:04 | FromDiscord | <Gennadiy> Why is this advice given in the `sequtils` section of the docs: "Instead of using map and filter, consider using the collect macro from the sugar module."? |
00:21:54 | * | krux02 quit (Remote host closed the connection) |
00:26:11 | FromDiscord | <ElegantBeef> cause the collect module can be more idiomatic |
00:28:39 | FromDiscord | <Hi02Hi> ah yes, the collect module |
00:29:16 | FromDiscord | <Hi02Hi> isnt another reason that the collect macro makes less copies? |
00:30:31 | FromDiscord | <ajusa> okay, this is going to seem like a dumb question, but how do I convert a cstring to a string for the JS backend? I tried `echo $(data.hashPart).type` but this prints out cstring |
00:33:30 | FromDiscord | <ElegantBeef> Ah yea macro π |
00:33:56 | FromDiscord | <ElegantBeef> Yea it doesnt do each in a step it's all at once |
00:37:28 | FromDiscord | <Gennadiy> It's such a shame because the collect macro is much more verbose. |
00:39:11 | FromDiscord | <ElegantBeef> I mean you can use whatever you want |
00:43:39 | FromDiscord | <Gennadiy> Yes, but if using map and filter are less efficient, then I may have to use collect. |
00:59:45 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
01:00:04 | * | njoseph joined #nim |
01:02:52 | * | lf_ joined #nim |
01:08:46 | * | Amun_Ra quit (Quit: Gdyby mi siΔ chciaΕo tak jak mi siΔ nie chceβ¦) |
01:22:54 | * | Amun_Ra joined #nim |
02:09:57 | * | rockcavera quit (Remote host closed the connection) |
02:17:45 | * | lf_ quit (Quit: lf_) |
02:18:21 | * | lf_ joined #nim |
02:29:34 | * | kwilczynski quit (Ping timeout: 245 seconds) |
02:32:07 | * | kwilczynski joined #nim |
02:36:26 | * | fredrikhr quit (Ping timeout: 240 seconds) |
02:38:41 | FromDiscord | <ajusa> sent a code paste, see https://paste.rs/UJT |
02:38:53 | FromDiscord | <ajusa> (edit) "https://play.nim-lang.org/#ix=2Vzd" => "https://play.nim-lang.org/#ix=2Vze" |
02:53:26 | * | rockcavera joined #nim |
02:57:09 | * | leorize quit (Ping timeout: 240 seconds) |
02:58:20 | * | lf_ quit (Quit: lf_) |
02:59:31 | * | leorize joined #nim |
03:28:07 | * | spiderstew joined #nim |
03:28:19 | * | spiderstew_ quit (Ping timeout: 248 seconds) |
03:37:11 | FromDiscord | <Esther> hey quick q: does nim automatically initialise values to zero? like if I declare `var f: float` can I safely assume it has the value 0.0 to start with? |
03:37:32 | FromDiscord | <ajusa> I believe so |
03:38:37 | FromDiscord | <Esther> awesome |
03:38:43 | FromDiscord | <Esther> guess I could test that in a few seconds but waa |
03:41:50 | FromDiscord | <ElegantBeef> Yea it does default all values |
03:42:53 | FromDiscord | <ElegantBeef> there is a `var f {.noinit.}: float` if you want to override that behaviour |
03:44:03 | FromDiscord | <ElegantBeef> Also the same rule applies to objects they're 0-inited |
03:45:40 | FromDiscord | <Esther> nah I do want it, saves me setting my arrays to 0 for default return values |
03:45:49 | FromDiscord | <Esther> ty for the info |
03:45:49 | FromDiscord | <ElegantBeef> you dont even need to do that |
03:46:13 | FromDiscord | <ElegantBeef> What i mean is you dont need a default return value π |
03:46:20 | FromDiscord | <ElegantBeef> Assuming you dont know about `result` |
03:46:24 | FromDiscord | <Esther> I do hahah |
03:46:42 | FromDiscord | <Esther> I just mean I'm hoping result doesn't contain garbage floats if I don't fill it with zeroes myself |
03:47:09 | FromDiscord | <Esther> (btw result is like the best thing ever, why on earth don't other languages do this) |
03:47:20 | FromDiscord | <ElegantBeef> I concur with the aside |
03:47:31 | FromDiscord | <ElegantBeef> but it'll be for of 0s |
03:47:34 | FromDiscord | <ElegantBeef> (edit) "for" => "full" |
03:47:36 | FromDiscord | <Esther> awesome |
03:48:55 | FromDiscord | <ElegantBeef> Worth getting inim for things like this |
03:48:58 | FromDiscord | <ElegantBeef> `nimble install inim` |
03:49:05 | FromDiscord | <ElegantBeef> It's a good repl |
04:02:49 | FromDiscord | <Esther> oh whoa I had no idea |
04:02:51 | FromDiscord | <Esther> ;0 |
04:03:17 | FromDiscord | <ElegantBeef> Lol it's perfect for small things, that and your `/tmp/` folder |
04:03:33 | FromDiscord | <ElegantBeef> Though the latter is a terrible idea to do anything serious in, pmunch lost a lot of work that way π |
04:03:39 | FromDiscord | <Esther> I'm on windows :PepeHands: |
04:03:45 | FromDiscord | <ElegantBeef> Well sucks to suck |
04:03:51 | FromDiscord | <Esther> aye |
04:04:12 | FromDiscord | <Esther> okay wait msys2 has /tmp |
04:04:17 | FromDiscord | <Esther> I just don't use it Β―\_(γ)_/Β― |
04:04:40 | FromDiscord | <ElegantBeef> It has to have a temp file somewhere probably `%tempdir%` |
04:05:59 | FromDiscord | <Esther> windows has %TEMP% I think idk |
04:15:44 | FromDiscord | <Rika> In reply to @Esther "(btw result is like": some people argue it can lead to unhandled cases |
04:15:48 | FromDiscord | <Rika> which is true |
04:16:01 | FromDiscord | <Rika> in which case expression-return would be better |
04:16:16 | FromDiscord | <Rika> compiler would catch cases where no return value is given |
04:16:41 | FromDiscord | <hamidb80> why cant i do this π€ π https://media.discordapp.net/attachments/371759389889003532/830295191709024267/unknown.png |
04:17:10 | * | shodan45 quit (*.net *.split) |
04:17:10 | * | FromDiscord quit (*.net *.split) |
04:17:10 | * | revere quit (*.net *.split) |
04:17:10 | * | ldlework quit (*.net *.split) |
04:17:10 | * | acidx quit (*.net *.split) |
04:17:10 | * | jken quit (*.net *.split) |
04:17:10 | * | leorize quit (*.net *.split) |
04:17:10 | * | motersen quit (*.net *.split) |
04:17:10 | * | sekao[m] quit (*.net *.split) |
04:17:10 | * | Avahe[m] quit (*.net *.split) |
04:17:10 | * | fbpyr[m] quit (*.net *.split) |
04:17:10 | * | watzon quit (*.net *.split) |
04:17:10 | * | jess quit (*.net *.split) |
04:17:10 | * | d10n-work quit (*.net *.split) |
04:17:10 | * | hoek quit (*.net *.split) |
04:17:10 | * | npgm quit (*.net *.split) |
04:17:10 | * | FlammableDuck[m] quit (*.net *.split) |
04:17:10 | * | solitudesf quit (*.net *.split) |
04:17:11 | * | blackbeard420 quit (*.net *.split) |
04:17:11 | * | EastByte quit (*.net *.split) |
04:17:11 | * | bozaloshtsh quit (*.net *.split) |
04:17:11 | * | kwilczynski quit (*.net *.split) |
04:17:11 | * | Amun_Ra quit (*.net *.split) |
04:17:11 | * | njoseph quit (*.net *.split) |
04:17:11 | * | Gustavo6046 quit (*.net *.split) |
04:17:11 | * | Jeff[m]2 quit (*.net *.split) |
04:17:11 | * | zedeus quit (*.net *.split) |
04:17:11 | * | gangstacat quit (*.net *.split) |
04:17:11 | * | pbb quit (*.net *.split) |
04:17:11 | * | teasea quit (*.net *.split) |
04:17:11 | * | ehmry quit (*.net *.split) |
04:17:11 | * | giaco__ quit (*.net *.split) |
04:17:11 | * | mwbrown quit (*.net *.split) |
04:17:11 | * | kaliy quit (*.net *.split) |
04:17:11 | * | voidpi quit (*.net *.split) |
04:17:11 | * | Eyess quit (*.net *.split) |
04:17:11 | * | fmaruki quit (*.net *.split) |
04:17:11 | * | Araq quit (*.net *.split) |
04:17:11 | * | vicfred quit (*.net *.split) |
04:17:12 | * | def- quit (*.net *.split) |
04:17:12 | * | mal`` quit (*.net *.split) |
04:17:12 | * | beenz quit (*.net *.split) |
04:17:12 | * | so_ quit (*.net *.split) |
04:17:12 | * | Technisha[m] quit (*.net *.split) |
04:17:12 | * | guelosk[m] quit (*.net *.split) |
04:17:12 | * | Clonkk[m] quit (*.net *.split) |
04:17:12 | * | anoj[m] quit (*.net *.split) |
04:17:12 | * | jfondren[m] quit (*.net *.split) |
04:17:12 | * | Avatarfighter[m] quit (*.net *.split) |
04:17:12 | * | GitterIntegratio quit (*.net *.split) |
04:17:12 | * | unclechu quit (*.net *.split) |
04:17:12 | * | Northstrider[m] quit (*.net *.split) |
04:17:12 | * | dom96 quit (*.net *.split) |
04:17:12 | * | Simon[m]5 quit (*.net *.split) |
04:17:12 | * | Onionhammer quit (*.net *.split) |
04:17:13 | * | arecaceae quit (*.net *.split) |
04:17:13 | * | koltrast_ quit (*.net *.split) |
04:17:13 | * | qwr quit (*.net *.split) |
04:17:13 | * | hyiltiz quit (*.net *.split) |
04:17:13 | * | lain quit (*.net *.split) |
04:17:13 | * | MightyJoe quit (*.net *.split) |
04:17:13 | * | blueberrypie quit (*.net *.split) |
04:17:13 | * | ForumUpdaterBot quit (*.net *.split) |
04:17:13 | * | antranigv quit (*.net *.split) |
04:17:13 | * | ShalokShalom[m] quit (*.net *.split) |
04:17:13 | * | m33[m] quit (*.net *.split) |
04:17:13 | * | MTRNord quit (*.net *.split) |
04:17:13 | * | goblinslayer[m] quit (*.net *.split) |
04:17:13 | * | liblq-dev quit (*.net *.split) |
04:17:13 | * | reversem3 quit (*.net *.split) |
04:17:13 | * | antholop[m] quit (*.net *.split) |
04:17:13 | * | robertmeta quit (*.net *.split) |
04:17:13 | * | fowl quit (*.net *.split) |
04:17:13 | * | JStoker quit (*.net *.split) |
04:17:13 | * | zopsi quit (*.net *.split) |
04:17:13 | * | icebattle quit (*.net *.split) |
04:17:13 | * | sknebel quit (*.net *.split) |
04:17:13 | * | Ekho quit (*.net *.split) |
04:17:13 | * | astronavt quit (*.net *.split) |
04:17:13 | * | oz quit (*.net *.split) |
04:17:13 | * | YovelKey-Cohen[m quit (*.net *.split) |
04:17:13 | * | ee7[m] quit (*.net *.split) |
04:17:13 | * | Zoom[m] quit (*.net *.split) |
04:17:13 | * | k0mpjut0r quit (*.net *.split) |
04:17:13 | * | lnxw37d4 quit (*.net *.split) |
04:17:13 | * | stefantalpalaru quit (*.net *.split) |
04:17:14 | * | euantorano quit (*.net *.split) |
04:17:14 | * | crem quit (*.net *.split) |
04:17:14 | * | mids quit (*.net *.split) |
04:17:14 | * | rockcavera quit (*.net *.split) |
04:17:14 | * | blackpawn quit (*.net *.split) |
04:17:14 | * | m4r35n357 quit (*.net *.split) |
04:17:14 | * | Mister_Magister quit (*.net *.split) |
04:17:14 | * | threenp quit (*.net *.split) |
04:17:14 | * | cornfeedhobo quit (*.net *.split) |
04:17:14 | * | sacredfrog quit (*.net *.split) |
04:18:01 | * | leorize joined #nim |
04:18:01 | * | rockcavera joined #nim |
04:18:01 | * | kwilczynski joined #nim |
04:18:01 | * | Amun_Ra joined #nim |
04:18:01 | * | njoseph joined #nim |
04:18:01 | * | Gustavo6046 joined #nim |
04:18:01 | * | blackpawn joined #nim |
04:18:01 | * | hyiltiz joined #nim |
04:18:01 | * | vicfred joined #nim |
04:18:01 | * | m4r35n357 joined #nim |
04:18:01 | * | ShalokShalom[m] joined #nim |
04:18:01 | * | sekao[m] joined #nim |
04:18:01 | * | guelosk[m] joined #nim |
04:18:01 | * | Simon[m]5 joined #nim |
04:18:01 | * | Technisha[m] joined #nim |
04:18:01 | * | ee7[m] joined #nim |
04:18:01 | * | YovelKey-Cohen[m joined #nim |
04:18:01 | * | Clonkk[m] joined #nim |
04:18:01 | * | Zoom[m] joined #nim |
04:18:01 | * | Jeff[m]2 joined #nim |
04:18:01 | * | solitudesf joined #nim |
04:18:01 | * | FlammableDuck[m] joined #nim |
04:18:01 | * | anoj[m] joined #nim |
04:18:01 | * | k0mpjut0r joined #nim |
04:18:01 | * | GitterIntegratio joined #nim |
04:18:01 | * | lnxw37d4 joined #nim |
04:18:01 | * | jfondren[m] joined #nim |
04:18:01 | * | antholop[m] joined #nim |
04:18:01 | * | MTRNord joined #nim |
04:18:01 | * | Avahe[m] joined #nim |
04:18:01 | * | Avatarfighter[m] joined #nim |
04:18:01 | * | fbpyr[m] joined #nim |
04:18:01 | * | liblq-dev joined #nim |
04:18:01 | * | m33[m] joined #nim |
04:18:01 | * | goblinslayer[m] joined #nim |
04:18:01 | * | watzon joined #nim |
04:18:01 | * | reversem3 joined #nim |
04:18:01 | * | unclechu joined #nim |
04:18:01 | * | jken joined #nim |
04:18:01 | * | acidx joined #nim |
04:18:01 | * | ldlework joined #nim |
04:18:01 | * | revere joined #nim |
04:18:01 | * | FromDiscord joined #nim |
04:18:01 | * | shodan45 joined #nim |
04:18:01 | * | jess joined #nim |
04:18:01 | * | d10n-work joined #nim |
04:18:01 | * | hoek joined #nim |
04:18:01 | * | npgm joined #nim |
04:18:01 | * | giaco__ joined #nim |
04:18:01 | * | motersen joined #nim |
04:18:01 | * | mwbrown joined #nim |
04:18:01 | * | bozaloshtsh joined #nim |
04:18:01 | * | EastByte joined #nim |
04:18:01 | * | blackbeard420 joined #nim |
04:18:01 | * | ehmry joined #nim |
04:18:01 | * | teasea joined #nim |
04:18:01 | * | pbb joined #nim |
04:18:01 | * | gangstacat joined #nim |
04:18:01 | * | zedeus joined #nim |
04:18:01 | * | Araq joined #nim |
04:18:01 | * | fmaruki joined #nim |
04:18:01 | * | Eyess joined #nim |
04:18:01 | * | voidpi joined #nim |
04:18:01 | * | kaliy joined #nim |
04:18:01 | * | so_ joined #nim |
04:18:01 | * | beenz joined #nim |
04:18:01 | * | mal`` joined #nim |
04:18:01 | * | def- joined #nim |
04:18:01 | * | dom96 joined #nim |
04:18:01 | * | Northstrider[m] joined #nim |
04:18:01 | * | qwr joined #nim |
04:18:01 | * | koltrast_ joined #nim |
04:18:01 | * | arecaceae joined #nim |
04:18:01 | * | Onionhammer joined #nim |
04:18:01 | * | antranigv joined #nim |
04:18:01 | * | ForumUpdaterBot joined #nim |
04:18:01 | * | blueberrypie joined #nim |
04:18:01 | * | MightyJoe joined #nim |
04:18:01 | * | lain joined #nim |
04:18:01 | * | oz joined #nim |
04:18:01 | * | astronavt joined #nim |
04:18:01 | * | sknebel joined #nim |
04:18:01 | * | Ekho joined #nim |
04:18:01 | * | icebattle joined #nim |
04:18:01 | * | zopsi joined #nim |
04:18:01 | * | JStoker joined #nim |
04:18:02 | * | fowl joined #nim |
04:18:02 | * | robertmeta joined #nim |
04:18:02 | * | crem joined #nim |
04:18:02 | * | mids joined #nim |
04:18:02 | * | euantorano joined #nim |
04:18:02 | * | stefantalpalaru joined #nim |
04:18:02 | * | sacredfrog joined #nim |
04:18:02 | * | threenp joined #nim |
04:18:02 | * | Mister_Magister joined #nim |
04:18:02 | * | cornfeedhobo joined #nim |
04:18:24 | * | giaco__ quit (Max SendQ exceeded) |
04:18:26 | FromDiscord | <hamidb80> but not `seq[seq[Type]]` |
04:18:32 | FromDiscord | <hamidb80> (edit) "seq[array[n, Type]]" => "`seq[array[n, Type]]`" |
04:20:07 | * | d10n-work quit (Ping timeout: 276 seconds) |
04:20:13 | * | goblinslayer[m] quit (Ping timeout: 246 seconds) |
04:20:22 | * | FlammableDuck[m] quit (Ping timeout: 243 seconds) |
04:20:22 | * | solitudesf quit (Ping timeout: 243 seconds) |
04:20:24 | * | DannyHpy[m] quit (Ping timeout: 245 seconds) |
04:20:25 | * | anoj[m] quit (Ping timeout: 252 seconds) |
04:20:26 | * | GitterIntegratio quit (Ping timeout: 252 seconds) |
04:20:34 | * | ShalokShalom[m] quit (Ping timeout: 244 seconds) |
04:20:34 | * | m33[m] quit (Ping timeout: 244 seconds) |
04:20:34 | * | reversem3 quit (Ping timeout: 244 seconds) |
04:20:35 | * | Simon[m]5 quit (Ping timeout: 248 seconds) |
04:20:42 | * | phatnael[m] quit (Ping timeout: 258 seconds) |
04:20:43 | * | stisa quit (Ping timeout: 258 seconds) |
04:20:43 | * | Jeff[m]2 quit (Ping timeout: 252 seconds) |
04:20:44 | FromDiscord | <hamidb80> In reply to @Rika "strange": do you think i should open an issue or not? |
04:20:46 | * | YovelKey-Cohen[m quit (Ping timeout: 245 seconds) |
04:20:46 | * | ee7[m] quit (Ping timeout: 245 seconds) |
04:20:46 | * | Zoom[m] quit (Ping timeout: 245 seconds) |
04:20:46 | * | k0mpjut0r quit (Ping timeout: 245 seconds) |
04:20:46 | * | lnxw37d4 quit (Ping timeout: 245 seconds) |
04:20:47 | * | antholop[m] quit (Max SendQ exceeded) |
04:20:47 | * | Technisha[m] quit (Ping timeout: 252 seconds) |
04:20:47 | * | guelosk[m] quit (Ping timeout: 252 seconds) |
04:20:48 | * | Avatarfighter[m] quit (Ping timeout: 252 seconds) |
04:20:48 | * | unclechu quit (Max SendQ exceeded) |
04:20:49 | * | Benjamin[m]2 quit (Ping timeout: 245 seconds) |
04:20:49 | * | leorize[m] quit (Ping timeout: 245 seconds) |
04:20:49 | * | raboof quit (Ping timeout: 245 seconds) |
04:20:55 | * | MTRNord quit (Ping timeout: 246 seconds) |
04:20:55 | * | liblq-dev quit (Ping timeout: 246 seconds) |
04:21:01 | FromDiscord | <Rika> i feel like there is already an open issue for this |
04:21:05 | FromDiscord | <Rika> maybe check if there is first |
04:21:05 | * | BitPuffin quit (Ping timeout: 258 seconds) |
04:21:07 | * | giaco__ joined #nim |
04:21:09 | * | Clonkk[m] quit (Ping timeout: 252 seconds) |
04:21:09 | * | jfondren[m] quit (Ping timeout: 252 seconds) |
04:21:14 | * | j-james[m] quit (Ping timeout: 245 seconds) |
04:21:16 | * | waleee-cl quit (Ping timeout: 258 seconds) |
04:21:25 | * | sekao[m] quit (Ping timeout: 276 seconds) |
04:21:26 | * | Avahe[m] quit (Ping timeout: 276 seconds) |
04:21:26 | * | fbpyr[m] quit (Ping timeout: 276 seconds) |
04:21:26 | * | watzon quit (Ping timeout: 276 seconds) |
04:21:26 | * | hoek quit (Ping timeout: 276 seconds) |
04:22:05 | * | npgm quit (Ping timeout: 276 seconds) |
04:24:47 | FromDiscord | <hamidb80> how can i search something among 1.8k issuesπ |
04:25:12 | * | npgm joined #nim |
04:25:26 | * | waleee-cl joined #nim |
04:25:27 | FromDiscord | <ElegantBeef> https://media.discordapp.net/attachments/371759389889003532/830297401633669140/unknown.png |
04:25:28 | * | rockcavera quit (Read error: Connection reset by peer) |
04:25:57 | * | rockcavera joined #nim |
04:26:34 | * | raboof joined #nim |
04:28:06 | FromDiscord | <ElegantBeef> Ah this is actually a varargs issue |
04:28:24 | FromDiscord | <ElegantBeef> varargs assumes the sequence is what you want |
04:28:35 | FromDiscord | <ElegantBeef> so you need to do `[a, b]` |
04:28:41 | * | hoek joined #nim |
04:28:51 | * | d10n-work joined #nim |
04:28:59 | FromDiscord | <hamidb80> oh |
04:33:38 | FromDiscord | <hamidb80> i didn't see an open issue for it |
04:33:47 | FromDiscord | <hamidb80> so i'm going to open new one |
04:36:57 | FromDiscord | <hamidb80> https://github.com/nim-lang/Nim/issues/8304 |
04:45:55 | FromDiscord | <James> Dumb super newbie question, what is the proper way to import types from another file? The tutorials I've read make it seem like anything not marked private in an imported file will be available, but I'm getting errors about undefined identifiers when I try to use them. |
04:46:40 | FromDiscord | <James> I have an example here, I was trying to add a level map to a Nico example.β΅https://gist.github.com/jamesgecko/c9bb543fa8d187ac646b52d0374cfdf2 |
04:46:46 | FromDiscord | <hamidb80> anything you dont mark as public is private |
04:46:53 | FromDiscord | <hamidb80> (edit) "anything you dont mark ... as" added "it" |
04:47:04 | FromDiscord | <hamidb80> (edit) "anything ... you" added "that" |
04:47:27 | FromDiscord | <James> Ohhhh. Thanks! π€¦ββοΈ |
04:48:14 | FromDiscord | <ElegantBeef> Ah you had the export marker backwards |
04:48:24 | FromDiscord | <ElegantBeef> You thought it was a private marker π |
04:50:05 | FromDiscord | <James> I was having a terrible time finding anything about public or private methods; knowing it's called the export marker helps a lot. |
04:57:04 | * | BitPuffin joined #nim |
05:07:37 | FromDiscord | <sealmove> how to programmatically call a proc at runtime? |
05:07:53 | FromDiscord | <sealmove> I mean, construct its name at runtime and use it. |
05:09:20 | FromDiscord | <sealmove> is it possible? |
05:11:21 | FromDiscord | <ElegantBeef> What are you imagining is the api? |
05:11:29 | * | rockcavera quit (Remote host closed the connection) |
05:12:19 | FromDiscord | <sealmove> sent a code paste, see https://play.nim-lang.org/#ix=2Vzz |
05:12:43 | FromDiscord | <sealmove> (edit) "https://play.nim-lang.org/#ix=2Vzz" => "https://play.nim-lang.org/#ix=2VzA" |
05:12:55 | FromDiscord | <sealmove> (edit) "https://play.nim-lang.org/#ix=2VzA" => "https://play.nim-lang.org/#ix=2VzB" |
05:13:13 | FromDiscord | <ElegantBeef> Well you can always subscribe procedures to a lut using a pragma and macro cache |
05:13:32 | FromDiscord | <ElegantBeef> But the calling is the odd thing since they'd probably be `pointer` |
05:14:10 | FromDiscord | <sealmove> I want this to avoid having to use a lut. It's possible to check if a proc i declared with `when declared`. |
05:14:26 | FromDiscord | <sealmove> (edit) "i" => "is" |
05:14:42 | FromDiscord | <ElegantBeef> I dont really see how this is possible without a lut |
05:15:30 | FromDiscord | <Rika> In reply to @ΰΈ£ΡΰΈΙΰΉΰΉΧ©Ρ "I want this to": that is not on runtime |
05:15:46 | FromDiscord | <ElegantBeef> What's the intended usecase of this? |
05:16:48 | FromDiscord | <sealmove> sent a code paste, see https://play.nim-lang.org/#ix=2VzC |
05:16:58 | FromDiscord | <ElegantBeef> then dont |
05:17:09 | FromDiscord | <ElegantBeef> We have macros, use them |
05:17:26 | FromDiscord | <sealmove> but, the opcode is found at runtime |
05:17:30 | FromDiscord | <ElegantBeef> So what |
05:17:35 | FromDiscord | <ElegantBeef> the data can be stored at compile time |
05:17:36 | FromDiscord | <sealmove> macros don't work |
05:17:42 | FromDiscord | <sealmove> hmm |
05:17:56 | FromDiscord | <ElegantBeef> You're talking to someone that did similar for nimscript -> nim interop |
05:18:20 | FromDiscord | <ElegantBeef> The way i did it was use a lambda + string to call the procedure |
05:18:31 | FromDiscord | <ElegantBeef> string held the data the lambda parsed + called the procedure |
05:18:32 | FromDiscord | <sealmove> yes, that's exactly what I need |
05:18:48 | FromDiscord | <ElegantBeef> You're doing nimscript interop? |
05:18:56 | FromDiscord | <sealmove> But you are saying I should turn my whole program to run at compile-time |
05:19:02 | FromDiscord | <ElegantBeef> Nope |
05:19:14 | FromDiscord | <ElegantBeef> I'm saying make a LUT and then you can call it at runtime no problem |
05:19:31 | FromDiscord | <ElegantBeef> <https://github.com/beef331/nimscripter> shameless source of inspiration |
05:19:35 | FromDiscord | <sealmove> and how is a lut better than the snipper I posted above? :> |
05:19:45 | FromDiscord | <ElegantBeef> Cause it's automated with a pragma |
05:19:52 | FromDiscord | <ElegantBeef> All parsing/calling |
05:20:08 | FromDiscord | <ElegantBeef> Using a macro to save your fingees |
05:20:33 | FromDiscord | <sealmove> Ah, the logging is not done by hand. I see. |
05:20:57 | FromDiscord | <ElegantBeef> yep in the end all you need to do is `vmTable[function](buffer)` |
05:21:23 | FromDiscord | <ElegantBeef> then the lambdas that were automagically generated parse that string to the arguments and calls the function |
05:21:41 | FromDiscord | <ElegantBeef> And just like that you have a scriptable runtime |
05:29:37 | FromDiscord | <ElegantBeef> Well thanks seal you gave me an idea and it works so i can finally move nimscripter to macrocache! |
05:30:10 | FromDiscord | <ElegantBeef> Apparently added nnkSyms are looked up cross modules |
05:36:51 | * | goblinslayer[m] joined #nim |
05:36:51 | * | m33[m] joined #nim |
05:36:51 | * | Benjamin[m]2 joined #nim |
05:36:51 | * | Avatarfighter[m] joined #nim |
05:36:51 | * | k0mpjut0r joined #nim |
05:36:51 | * | lnxw37d4 joined #nim |
05:36:51 | * | jfondren[m] joined #nim |
05:36:51 | * | leorize[m] joined #nim |
05:36:51 | * | stisa joined #nim |
05:36:51 | * | MTRNord joined #nim |
05:36:51 | * | Avahe[m] joined #nim |
05:36:51 | * | DannyHpy[m] joined #nim |
05:36:51 | * | unclechu joined #nim |
05:36:52 | * | j-james[m] joined #nim |
05:36:52 | * | GitterIntegratio joined #nim |
05:36:52 | * | liblq-dev joined #nim |
05:36:52 | * | antholop[m] joined #nim |
05:36:52 | * | fbpyr[m] joined #nim |
05:36:53 | * | reversem3 joined #nim |
05:36:53 | * | watzon joined #nim |
05:36:57 | * | solitudesf joined #nim |
05:36:57 | * | YovelKey-Cohen[m joined #nim |
05:36:58 | * | Technisha[m] joined #nim |
05:36:58 | * | Jeff[m]2 joined #nim |
05:36:58 | * | Clonkk[m] joined #nim |
05:36:58 | * | guelosk[m] joined #nim |
05:36:58 | * | ShalokShalom[m] joined #nim |
05:36:59 | * | ee7[m] joined #nim |
05:36:59 | * | FlammableDuck[m] joined #nim |
05:36:59 | * | phatnael[m] joined #nim |
05:36:59 | * | Zoom[m] joined #nim |
05:36:59 | * | sekao[m] joined #nim |
05:36:59 | * | anoj[m] joined #nim |
05:37:00 | * | Simon[m]6 joined #nim |
06:11:09 | FromDiscord | <sealmove> nice :) |
06:11:22 | FromDiscord | <sealmove> json module doesn't support insert? |
06:11:46 | saem | @ElegantBeef: what does moving to macrocache mean? |
06:12:46 | FromDiscord | <ElegantBeef> Currently i use compiletime variables for holding my procedures and like, but with macrocache i can do it in a way that might not be dependant on import order |
06:13:16 | saem | oh neat. |
06:13:42 | FromDiscord | <ElegantBeef> Right now if you want to have code scripted from nimscript you need to do it all before importing nimscripter anywhere |
06:13:52 | saem | I might have simplified that typedesc wrapping logic a bit... just took a while. smh |
06:14:57 | FromDiscord | <ElegantBeef> Nice |
06:15:34 | FromDiscord | <ElegantBeef> @sealmove what do you mean insert, in a jarray? |
06:15:41 | FromDiscord | <sealmove> yup |
06:15:43 | saem | kinda weird that we allow `static int` in type params. I wonder if we allow that for other generic types. |
06:15:57 | FromDiscord | <ElegantBeef> Also it's weird to now know we can call procedures across module barriers |
06:16:02 | FromDiscord | <ElegantBeef> Yes |
06:16:21 | FromDiscord | <ElegantBeef> `static T` is allowed pretty much anywhere a `T` is |
06:16:33 | FromDiscord | <ElegantBeef> Within reason of course π |
06:17:20 | saem | oh that I get, I meant `static T` is `static[T]`. But can you do another generic type and use that same syntax. |
06:17:49 | FromDiscord | <ElegantBeef> Apparently not |
06:18:06 | FromDiscord | <ElegantBeef> aside from typedesc/ type |
06:18:13 | saem | Yeah, that's what I mean, wish we didn't. |
06:20:29 | FromDiscord | <ElegantBeef> Yea it makes it odder |
06:21:02 | saem | hmm, maybe `type MyType` should be `TypeDef[symbol]` in the type expression language... might be a thing for concepts -- this is stretching my understanding. Sounds like a thing Concepts would care about, since that's in HKD land. |
06:21:51 | FromDiscord | <ElegantBeef> Not a clue, you've flown over me when talking about the underlying logic π |
06:22:17 | saem | I'm over my own head, but that's the fun bit. π
|
06:24:19 | * | spiderstew quit (Ping timeout: 258 seconds) |
06:26:19 | saem | It's kinda like CT, RT, and TT (type time). Moreover, I'm referring to the parts of Nim that's the type language, where you define (abstraction) or use/annotate (application) types. |
06:26:57 | saem | now let's see if my silly changes explode everything. |
06:27:13 | FromDiscord | <ElegantBeef> Saems house caught fire |
06:27:20 | saem | :( |
06:27:22 | FromDiscord | <Rika> beef dont we need him |
06:27:27 | saem | Ouch. |
06:27:36 | saem | Wait... I didn't parse that right |
06:27:38 | saem | Thanks! |
06:27:44 | FromDiscord | <Rika> lmao |
06:27:58 | saem | My brain flipped that to, "beef we don't need him" π |
06:29:01 | saem | Silence is all the answer we need in this case, Rika. |
06:29:52 | FromDiscord | <Rika> i was busy with laundry |
06:30:02 | FromDiscord | <ElegantBeef> We need him, of course who else will i laugh at bugs with |
06:30:29 | saem | π€ |
06:30:42 | FromDiscord | <Rika> so you prefer murdering bugs slowly while ridiculing them instead of destroying them quickly |
06:30:51 | FromDiscord | <ElegantBeef> We've had many of giggles about bugs |
06:31:25 | FromDiscord | <ElegantBeef> Meanwhile saem's like "Well beef giggled, i was wondering 'How long until he leaves me be'" |
06:32:01 | saem | Oh man... just those 20 lines of code... that was surprising. |
06:32:03 | FromDiscord | <Rika> "how long do i have to fake my laugh before he leaves" |
06:32:45 | saem | It's all true... I've been found out. |
06:33:00 | FromDiscord | <ElegantBeef> Good i never liked you anyway! |
06:33:09 | FromDiscord | <ElegantBeef> Your name is a poorly spelled version of same! π |
06:33:20 | FromDiscord | <Rika> your name makes no sense |
06:33:21 | saem | π |
06:33:36 | FromDiscord | <ElegantBeef> Well rika what you're saying is it fits me |
06:33:39 | saem | In all honesty, i think the social part of Nim is my favourite bit. |
06:34:05 | * | spiderstew joined #nim |
06:34:14 | saem | I figure if you're not a diehard Fedora user I'd be so disappointed. |
06:34:52 | FromDiscord | <ElegantBeef> Well good thing for you, you dont have to be disappointed |
06:35:29 | saem | 17 was a good vintage: https://beefymiracle.org/ |
06:35:31 | FromDiscord | <Rika> eh? you're already a disappointment wdym |
06:36:30 | saem | weird... the tests are running a lot slower. :/ |
06:36:32 | FromDiscord | <ElegantBeef> Well i might be a disappointment but that doesnt mean you people are disappointed in me |
06:36:45 | FromDiscord | <Rika> ??? we are though |
06:36:47 | saem | we keep holding out hope |
06:36:55 | saem | well some of us |
06:38:17 | * | spiderstew quit (Ping timeout: 250 seconds) |
06:38:37 | FromDiscord | <ElegantBeef> I'm too complacent with my state, so have fun! |
06:38:55 | FromDiscord | <ElegantBeef> Any of the lurkers working on anything cool? |
06:39:00 | FromDiscord | <ElegantBeef> We know you're reading |
06:39:21 | saem | (from the back) NO! |
06:39:56 | saem | Ever considered stalking them on github? |
06:40:06 | FromDiscord | <ElegantBeef> In all sincerity there has to be a few dozen people reading this that are like 1/10th the way to writting a message |
06:40:08 | FromDiscord | <Rika> asking a lurker to speak is almost like asking a wall to speak |
06:40:19 | FromDiscord | <ElegantBeef> Yea i know |
06:41:45 | saem | Hmm, that's some interesting stalking: https://github.com/search?o=desc&q=lang%3Anim&s=updated&type=Repositories |
06:42:33 | saem | Oh neat, Nim Julia and Erlang bridges. |
06:42:49 | FromDiscord | <ElegantBeef> Yea that's going on TMWN for april |
06:43:00 | FromDiscord | <ElegantBeef> So in 3 weeks you'll see it there |
06:43:05 | FromDiscord | <ElegantBeef> the nim julia one that is |
06:43:24 | FromDiscord | <Rika> lmao |
06:43:33 | FromDiscord | <Rika> why not the erlang oine |
06:43:38 | FromDiscord | <ElegantBeef> Cause they didnt submit |
06:44:00 | FromDiscord | <Yardanico> @saem I do that from time to time :) |
06:44:04 | FromDiscord | <Rika> you must submit to the great beef |
06:44:07 | FromDiscord | <Yardanico> and you should use pushed:>some recent date |
06:44:20 | FromDiscord | <Yardanico> that gives better results |
06:44:34 | FromDiscord | <ElegantBeef> In reply to @Rika "you must submit to": I mean i'm not that great, just the schmuck that decided to do it |
06:44:47 | saem | @Yardanico it's pretty great -- I've found some gems that way. |
06:44:56 | FromDiscord | <Yardanico> yeah, same |
06:45:19 | FromDiscord | <Yardanico> also @saem it's "language:nim" |
06:45:22 | FromDiscord | <Yardanico> not "lang:nim" :) |
06:45:30 | FromDiscord | <Yardanico> https://github.com/search?o=desc&q=language%3Anim+pushed%3A%3E2021-04-01&s=updated&type=Repositories |
06:45:35 | FromDiscord | <Yardanico> here, all updates repos since 1st of april |
06:45:38 | saem | I always get confused |
06:45:47 | FromDiscord | <Yardanico> sorted by recently updated |
06:47:37 | saem | weirds me out when I see my own stuff in those searches. |
06:49:04 | FromDiscord | <Yardanico> lol |
06:50:03 | * | spiderstew joined #nim |
06:50:06 | saem | Then I run into https://github.com/yglukhov/rod, that engine code, the nim to shader thing Kruz wrote, hot code reload, and the compiler being written in Nim itself are what pulled me into Nim. |
06:52:45 | * | narimiran joined #nim |
06:54:35 | FromDiscord | <ElegantBeef> Then there is me that just wanted to try something that didnt rely on a runtime, and Nim had the cleanest syntax to me |
06:54:56 | FromDiscord | <ElegantBeef> (edit) "Then there is me that just wanted to try something that didnt rely on a ... runtime," added "need to be distributed" |
06:55:14 | saem | what brought those requirements? |
06:55:37 | FromDiscord | <ElegantBeef> Well i did most programming inside Unity so i wanted to try something else |
06:55:57 | FromDiscord | <ElegantBeef> And didnt want to use C# since it didnt interest me much |
06:56:23 | FromDiscord | <ElegantBeef> making users have to get a runtime is just ugh |
06:57:17 | saem | I _thought_ you could distribute that? |
06:58:06 | saem | hmm, does sublime have particularly good Nim syntax highlighting? |
06:59:00 | FromDiscord | <Yardanico> wdym "particularly good"? |
06:59:06 | FromDiscord | <Yardanico> it's normal syntax highlighting |
06:59:10 | FromDiscord | <Yardanico> also it's what is used by github |
06:59:10 | FromDiscord | <Yardanico> https://github.com/Varriount/NimLime |
07:00:33 | FromDiscord | <ElegantBeef> Dont know if you can distribute the runtime for unix usuers |
07:00:34 | saem | I know about that, I'm wondering if it's good as in has issues or does it handle things well, like triple quotes, pragmas not ending with `.}` and `}` instead, etc... |
07:00:36 | FromDiscord | <ElegantBeef> (edit) "usuers" => "users" |
07:00:43 | saem | mono or something? |
07:00:52 | FromDiscord | <ElegantBeef> well dotnetcore3.0 |
07:00:54 | saem | but I get what you mean. |
07:01:18 | FromDiscord | <Yardanico> @saem i don't think it has any issues with triple quoting |
07:02:19 | FromDiscord | <Yardanico> huh https://github.com/herEmanuel/Nide |
07:02:51 | saem | that's neat |
07:04:28 | FromDiscord | <ElegantBeef> So a step away from embedded javascript π |
07:04:38 | FromDiscord | <Yardanico> In reply to @ElegantBeef "So a step away": something something QuickJS :) |
07:04:45 | FromDiscord | <Yardanico> but yeah, there's quite a lot of langdev in nim |
07:04:45 | FromDiscord | <Yardanico> https://github.com/maxadamski/vitamin |
07:05:03 | saem | I guess I should test that syntax highlighting vs what I have in the current vscode extension to see if it looks better. Though I'd be curious what other people think about it. |
07:06:25 | saem | oh wow, that's dependently typed. |
07:06:52 | saem | Someone who gets QTT has got more than a few things figured out. |
07:08:04 | FromDiscord | <Yardanico> then again https://github.com/tontinton/panther |
07:08:10 | FromDiscord | <Yardanico> a lot of langdev work in nim :) |
07:08:18 | FromDiscord | <ElegantBeef> Except on the language itself π |
07:08:44 | FromDiscord | <Yardanico> because it's already good enough (TM) :P |
07:08:49 | FromDiscord | <ElegantBeef> Lol |
07:09:00 | FromDiscord | <Yardanico> people wouldn't have used it for making their own languages otherwise :) |
07:09:35 | FromDiscord | <Yardanico> https://github.com/h3rald/mn https://h3rald.com/mn/ |
07:09:39 | FromDiscord | <Yardanico> by author of min |
07:10:15 | FromDiscord | <ElegantBeef> The joke was mostly just the quantity of developers on Nim |
07:10:30 | saem | Add a pattern matching lib and the stdlib will cover all the various things you end up needing for various plumbing, all of a sudden not a bad thing to write a compiler in. |
07:10:52 | FromDiscord | <ElegantBeef> There are about 1000 languages implemented in it but relatively few developers on the language |
07:10:56 | FromDiscord | <Yardanico> fusion/matching :P |
07:11:49 | saem | I know, that's what I was alluding to. |
07:15:07 | FromDiscord | <archiloque> I used the Advent of Code to start learning Nim (I'm always doing it after the fact to avoid the pressure of having a fixed schedule), I've done it all and will try to use Nim for some personal projects https://archiloque.net/blog/aoc2020/ |
07:15:26 | * | teal joined #nim |
07:15:30 | FromDiscord | <ElegantBeef> Welcome, and cool good to hear! |
07:15:40 | saem | ^^ |
07:16:33 | FromDiscord | <ElegantBeef> lol "-no hype" |
07:18:09 | FromDiscord | <ElegantBeef> looking at you code do you prefer explict types on variables? |
07:18:22 | FromDiscord | <ElegantBeef> Or do you just not realize there is local type inference π |
07:18:38 | * | saem goes and "fixes" that |
07:18:41 | FromDiscord | <archiloque> I know there is, I mostly add it as s visual aid |
07:18:44 | FromDiscord | <ElegantBeef> Ah |
07:19:01 | FromDiscord | <archiloque> I'll probably use less of them in the future I think |
07:19:03 | FromDiscord | <ElegantBeef> Couldnt help myself to actually read over the code |
07:19:18 | FromDiscord | <archiloque> No problem at all, I published it so people can read it |
07:20:11 | FromDiscord | <Yardanico> oh well... https://media.discordapp.net/attachments/371759389889003532/830341371960360960/unknown.png |
07:20:15 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/830341389555466250/unknown.png |
07:20:30 | FromDiscord | <archiloque> (edit) "s" => "a" |
07:21:07 | saem | hahaha |
07:21:21 | FromDiscord | <Yardanico> apparently it was in NIm, then the person wanted to switch to Rust but reverted the commits |
07:21:34 | FromDiscord | <ElegantBeef> Oooh Archiloque i can suggest a cool module! |
07:21:41 | FromDiscord | <archiloque> yes ? |
07:21:46 | FromDiscord | <Yardanico> (edit) "NIm," => "Nim," |
07:21:49 | FromDiscord | <ElegantBeef> For strscans! |
07:21:53 | FromDiscord | <ElegantBeef> It's like regex but not shit π |
07:22:03 | FromDiscord | <Yardanico> we also have pure-nim regex (nim-regex) |
07:22:03 | FromDiscord | <Yardanico> and npeg |
07:22:07 | FromDiscord | <ElegantBeef> Yea |
07:22:18 | FromDiscord | <ElegantBeef> But strscans is in the stdlib and i can understand it |
07:22:24 | FromDiscord | <Yardanico> In reply to @archiloque "yes ?": also, as a tip - it's preferred to use the "std" import prefix nowadays |
07:22:29 | FromDiscord | <Yardanico> for importing std modules |
07:22:38 | FromDiscord | <ElegantBeef> `std/[strutils, os, re...]` |
07:23:11 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2VzW |
07:24:16 | FromDiscord | <archiloque> Thanks |
07:25:24 | FromDiscord | <archiloque> I've looked for a PCRE2 Regex engine for one of the exercices and couldn't find it, so I generated the regex from Nim and used Perl |
07:25:40 | FromDiscord | <Yardanico> nim's "re" uses pcre |
07:26:24 | FromDiscord | <archiloque> I know, but I needed the recursion features of PCRE2 |
07:26:41 | FromDiscord | <archiloque> (edit) "needed" => "wanted" |
07:32:35 | FromDiscord | <ElegantBeef> Also for the intellij issue cross your fingers and hope they open the editor extension up π |
07:33:06 | FromDiscord | <Yardanico> In reply to @ElegantBeef "Also for the intellij": yeah, saw that |
07:33:23 | FromDiscord | <Yardanico> https://github.com/nim-lang/RFCs/issues/300#issuecomment-815583102 for those who didn't |
07:33:58 | FromDiscord | <Yardanico> that said, I still don't use it :P |
07:34:10 | FromDiscord | <Yardanico> mainly because no UFCS support |
07:34:16 | FromDiscord | <Yardanico> but it's cool, I tried it |
07:35:45 | * | teal quit (Quit: WeeChat 3.1) |
07:39:08 | saem | Sadly none of the workbench stuff is really transferable. :( |
07:39:26 | FromDiscord | <Yardanico> wdym? |
07:39:28 | saem | I have InteliJ ultimate edition, just never use it. |
07:40:19 | saem | The semantics analyzer in InteliJ for nim uses their language workbench thing. |
07:40:43 | FromDiscord | <Yardanico> yeah, that's true |
07:40:50 | saem | That's a bunch of definitions in java/kotlin (iirc). |
07:40:59 | FromDiscord | <Yardanico> yep |
07:41:16 | saem | The language workbench is super cool, just stuck on an island. |
07:42:15 | saem | If you could define nim in there and output the definition back in Nim, that's be hilarious. |
07:44:48 | FromDiscord | <archiloque> Intellij can display metadata in the middle of the code, with Nim it could display the inferred types of the variables and it could be really handy |
07:45:06 | saem | I still kinda hold it hope someone goes wild on the Nim VM, adds in symbolic evaluation, and we end up with a futamura protection. |
07:45:38 | saem | I know, but handy for an IDE user, not the language and its long-term health necessarily. |
07:46:18 | saem | Those are improvements that should ideally go back into Nim's semantic analysis later. |
07:46:19 | FromDiscord | <archiloque> I don't understand what you mean |
07:46:28 | FromDiscord | <archiloque> Ah yes I agree |
07:46:40 | saem | Two threads of thought |
07:49:23 | FromDiscord | <archiloque> I'm all for the langage to be improved so it can support all external tools, not specific tooling for one IDE. But if users of one IDE are so used to some advanced features that they work on adding them to the language and then other can benefit from it, it would be nice. |
07:51:16 | saem | Futamura projections are kinda amazing, sorta a thought experiment in some ways. http://blog.sigfpe.com/2009/05/three-projections-of-doctor-futamura.html?m=1 |
07:53:05 | saem | Sure, I just don't see those InteliJ related things meaningfully impacting Nim. I say that with an InteliJ pro subscription. |
08:05:46 | FromDiscord | <Yardanico> compiling nimsuggest with LTO and march=native to see if it gets faster :P https://media.discordapp.net/attachments/371759389889003532/830352840668217434/unknown.png |
08:07:34 | saem | Danger Zone! |
08:08:02 | saem | I haven't been doing lto, but haven been using danger. |
08:08:14 | saem | I should give that a go. |
08:08:46 | saem | Any public code case where you find it really craps the bed? |
08:09:31 | FromDiscord | <Yardanico> not sure, but you can check some benchmarks of LTO + PGO for the nim compiler in https://forum.nim-lang.org/t/6295 |
08:09:49 | FromDiscord | <Yardanico> also to see where the C compiler is doing optimizations (esp. in case of vectorization when compiling with -march and stuff) you can use -fopt-info |
08:09:54 | FromDiscord | <Yardanico> the output is quite verbose though, be prepared :P |
08:10:18 | FromDiscord | <Yardanico> it'll show both LTO and vectorization optimizations the C compiler does |
08:10:27 | FromDiscord | <Yardanico> "Inlined add_system_4825/1010 into doOperation_system_5267/261 which now has time 18.471632 and size 88, net change of +27." |
08:11:09 | FromDiscord | <Yardanico> "/home/dian/Projects/nim-strenc/here/stdlib_io.nim.c:335:8: optimized: Semantic equality hit:asgnRef/29->asgnRef/843" |
08:17:36 | saem | Once I get the generics type stuff in the compiler a bit better and the CPS bits are more in my head, then it might be time to return to playing with profiling the compiler. |
08:18:20 | saem | I'm fun bits I did get rr working, was even able to time travel back. |
08:26:18 | * | vicfred quit (Quit: Leaving) |
08:33:41 | FromDiscord | <jtiai> sent a code paste, see https://play.nim-lang.org/#ix=2VAc |
08:35:49 | FromDiscord | <haxscramper> You can use {.union.} to pack register into 16 bits, and define upper and lower halves via tuple |
08:36:12 | FromDiscord | <haxscramper> So your register is a union of full 16-bit value or a tuple |
08:37:17 | FromDiscord | <haxscramper> That's how most of the CPU emulators written in C do that, the o ly difference is that they define nested anonymous struct instead of a tuple |
08:38:26 | FromDiscord | <haxscramper> And because it is anonymous you get .low, .high, .full syntax when adressing register, but in non you would have to do reg.BCtuple.low. this can be mitigated by defining template |
08:40:07 | FromDiscord | <haxscramper> Template is recommended to get perfect inlining |
08:43:31 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2VAf |
08:48:48 | FromDiscord | <jtiai> Ooo... πͺ ... |
08:50:27 | FromDiscord | <Yardanico> @haxscramper I wonder how unsafe is this :D |
08:50:38 | FromDiscord | <Yardanico> sent a code paste, see https://paste.rs/C62 |
08:50:43 | FromDiscord | <Yardanico> "The object declaration then must not use inheritance or any GC'ed memory but this is currently not checked." |
08:52:15 | FromDiscord | <haxscramper> That is not designed to work with strings or any complicated data type of course |
08:52:39 | FromDiscord | <haxscramper> Only actual value objects |
08:52:53 | FromDiscord | <haxscramper> Not "it has value semantics" type of thing |
08:53:39 | FromDiscord | <Yardanico> i mean with ARC strings/seqs are "value objects", they contain 2 ints and 1 pointer |
08:53:46 | FromDiscord | <haxscramper> > pointer |
08:54:01 | FromDiscord | <haxscramper> That's exactly what I'm talking about |
08:54:54 | FromDiscord | <haxscramper> They might be "value objects" from regular semantics point of view, but in this case it only works for types that are actually fully contained in one block of memory |
08:55:06 | FromDiscord | <haxscramper> Like int, tuples of primitives, chars enums |
08:55:45 | FromDiscord | <haxscramper> I.e. the data types that CPU can operate on |
08:56:16 | FromDiscord | <haxscramper> We don't have built-in BCD integer type in the language but this would've worked too |
08:58:21 | FromDiscord | <haxscramper> It might be possible to somehow pack selector kind in the enum, but I'm afraid it would go over 16 bits |
08:58:35 | FromDiscord | <haxscramper> (edit) "enum," => "register," |
09:02:07 | * | teasea quit (Ping timeout: 260 seconds) |
09:06:28 | saem | Hmm, a bunch of the SSL tests fail on my machine when testing the compiler. |
09:09:18 | * | haxscramper joined #nim |
09:10:37 | FromDiscord | <Goel> sent a code paste, see https://paste.rs/yBf |
09:10:45 | FromDiscord | <Varriount> In reply to @archiloque "Intellij can display metadata": If you can actually get usable documentation for the IntlliJ Editor API, I would be quite interested. |
09:14:36 | FromDiscord | <archiloque> In reply to @Varriount "If you can actually": Sorry I never tinkered with IntelliJ dΓ©veloppent, Iβm just a happy user since a long time |
09:15:06 | * | teasea joined #nim |
09:15:15 | FromDiscord | <archiloque> (edit) "dΓ©veloppent," => "development," |
09:22:18 | FromDiscord | <jtiai> sent a code paste, see https://paste.rs/3zf |
09:23:00 | FromDiscord | <haxscramper> Reverse order of flags or set values explicitly |
09:23:12 | FromDiscord | <haxscramper> You can do `1 shl 3` as a value |
09:24:41 | FromDiscord | <Rika> Value of the enum is the bit shift so a (value 1) is bit one and so on |
09:45:47 | FromDiscord | <haxscramper> After adding `#programming-language`-tagged repositories there are now 12 languages written in nim (each has different state of completion of course). I also found https://github.com/maxadamski/vitamin which seems really interesting as it allows to define custom syntax with includes custom mixfix operators |
09:52:33 | FromDiscord | <Yardanico> yeah I linked that one above :P |
09:57:38 | * | fredrikhr joined #nim |
09:58:09 | FromDiscord | <haxscramper> I know |
09:58:33 | FromDiscord | <Yardanico> In reply to @haxscramper "I know": also, I found more than 12 |
09:59:00 | FromDiscord | <haxscramper> In reply to @Yardanico "also, I found more": https://gist.github.com/haxscramper/3562fa8fee4726d7a30a013a37977df6 I updated list - if anything is missing I can add this |
09:59:11 | FromDiscord | <Yardanico> sent a long message, see http://ix.io/2VAr |
09:59:24 | FromDiscord | <haxscramper> ah, I did search with `#programming-language` only |
09:59:47 | FromDiscord | <Yardanico> yeah a lot of them are like this https://media.discordapp.net/attachments/371759389889003532/830381534480564244/unknown.png |
09:59:48 | FromDiscord | <Yardanico> https://github.com/dom96/nael |
10:00:58 | FromDiscord | <Yardanico> In reply to @haxscramper "https://gist.github.com/haxscramper/3562fa8fee4726d": honestly you should make a nim wiki page for this :) |
10:01:07 | FromDiscord | <Yardanico> in https://github.com/nim-lang/Nim/wiki I mean |
10:02:11 | FromDiscord | <haxscramper> when I finally get my site generator working I will put in on my wiki |
10:02:27 | FromDiscord | <Yardanico> why not on nim wiki? :P |
10:03:08 | FromDiscord | <haxscramper> I want to have full control over what is written in thist list |
10:03:14 | FromDiscord | <haxscramper> feel free to copy-paste it or whatever |
10:06:59 | FromDiscord | <haxscramper> 18 languages |
10:19:17 | FromDiscord | <nsauzede> What is the recommended/official VScode Nim extension ? |
10:19:37 | FromDiscord | <nsauzede> (edit) "VScode" => "VSCod{e|ium}" |
10:20:53 | FromDiscord | <nsauzede> this one ? https://marketplace.visualstudio.com/items?itemName=kosz78.nim |
10:22:09 | FromDiscord | <Yardanico> yes but it's not in active development really |
10:22:22 | FromDiscord | <Yardanico> there's https://marketplace.visualstudio.com/items?itemName=nimsaem.nimvscode which is a Nim version of that Nim extension with some improvements |
10:22:36 | FromDiscord | <Yardanico> (that is, it's written in Nim and uses the JS backend to compile to JS so it can be used as a vscode extension) |
10:22:41 | FromDiscord | <Yardanico> https://github.com/saem/vscode-nim |
10:40:13 | * | lritter joined #nim |
10:40:18 | * | tane joined #nim |
10:51:04 | FromDiscord | <Gary M> there's also my fork which is just better syntax highlighting from the original π |
10:51:13 | FromDiscord | <Gary M> I never got around to rewriting the whole plugin. |
11:15:49 | FromDiscord | <nsauzede> I must say Nim is really neat |
11:19:26 | FromDiscord | <Gary M> Yes it is |
11:34:01 | FromDiscord | <nsauzede> is it possible to output an `\n` within a `fmt""` string ? |
11:34:39 | FromDiscord | <nsauzede> sent a code paste, see https://play.nim-lang.org/#ix=2VAY |
11:34:42 | FromDiscord | <nsauzede> (edit) |
11:34:48 | FromDiscord | <haxscramper> Either use `&"\n"` or `fmt("\n")` |
11:35:07 | FromDiscord | <haxscramper> https://nim-lang.org/docs/strformat.html#fmt-vsdot-amp |
11:36:18 | FromDiscord | <haxscramper> `fmt""` basically works the same way as `r""` - i.e. it generates raw string literal |
11:36:35 | FromDiscord | <Solitude> sent a code paste, see https://paste.rs/tYk |
11:39:46 | FromDiscord | <nsauzede> ok; so if I want to output an `\n` within an `fmt""` (which is raw), may I use some `{10:c}` form, to force an arbitrary `char` output ? |
11:40:22 | FromDiscord | <nsauzede> like a `printf("%c", 10)` |
11:40:29 | FromDiscord | <nsauzede> (edit) "like a ... `printf("%c",for" added "C" | "C`printf("%c", 10)` ... " added "for instance" |
11:41:33 | FromDiscord | <haxscramper> !eval import std/strformat; echo fmt"[{char(10)}]" |
11:41:38 | NimBot | [β΅] |
11:41:47 | FromDiscord | <haxscramper> But I would just use `&` |
11:42:18 | FromDiscord | <haxscramper> or `const nl = char(10)` |
11:42:35 | FromDiscord | <haxscramper> if you need raw string literal for other reasons |
11:43:59 | FromDiscord | <nsauzede> The cast works fine, thank you |
11:44:23 | FromDiscord | <nsauzede> I prefer it to keep everything inline, to not be distracted by an extra variable etc.. |
11:45:11 | FromDiscord | <haxscramper> !eval import std/strformat; echo &"[{1+2}\n{3+4}]" |
11:45:17 | NimBot | [3β΅7] |
11:45:18 | FromDiscord | <Yardanico> In reply to @nsauzede "The cast works fine,": fyi - it's a conversion, not a cast :) |
11:45:27 | FromDiscord | <Yardanico> we have `cast` for actual casts |
11:45:33 | FromDiscord | <Yardanico> conversion is safe, a cast is not |
11:46:35 | FromDiscord | <nsauzede> I'm still a noob, must learn π |
11:47:47 | FromDiscord | <nsauzede> In reply to @haxscramper "!eval import std/strformat; echo": so basically you're telling that `&""` offers `{}` as `fmt""`, but is not raw so tolerates escape chars ? |
11:48:10 | FromDiscord | <Yardanico> In reply to @nsauzede "so basically you're telling": did you see the docs link? :) |
11:48:16 | FromDiscord | <Yardanico> https://nim-lang.org/docs/strformat.html#fmt-vsdot-amp |
11:48:22 | FromDiscord | <Yardanico> talks about the difference between fmt and & |
11:50:03 | FromDiscord | <nsauzede> In reply to @Yardanico "did you see the": oops sorry I only looked at the other link, not yours -- I did now |
11:50:17 | FromDiscord | <Yardanico> that wasn't my link, but okay :) |
11:50:22 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/830409365772697600/unknown.png |
11:51:01 | FromDiscord | <nsauzede> yes; `&""` is exactly what I needed, as you suggested indeed. |
11:52:06 | FromDiscord | <nsauzede> is it possible to make an `echo XXX` without the (implicit) trailing `newline` ? |
11:52:41 | FromDiscord | <Rika> stdout.write |
11:52:50 | FromDiscord | <nsauzede> excellent, thanks |
11:53:34 | FromDiscord | <haxscramper> Although `write` is not variadic, and it does not perform implicit stringification |
12:03:50 | FromDiscord | <nsauzede> is there a Nim equivalent of C `printf`, that is : with variadic, positional arguments (following the first `format` string) ? |
12:04:06 | FromDiscord | <nsauzede> (or : can we easily call printf ?) |
12:04:19 | FromDiscord | <nsauzede> (edit) "(or : can we easily call ... printf" added "C" |
12:04:28 | FromDiscord | <haxscramper> https://nim-lang.org/docs/manual.html#types-cstring-type |
12:04:59 | FromDiscord | <nsauzede> marvelous π |
12:18:17 | FromDiscord | <Yardanico> wait |
12:18:18 | FromDiscord | <Yardanico> is that nim https://www.reddit.com/r/badcode/comments/mo26yu/i_had_a_programming_exam_and_had_5_minutes_left/ ? |
12:18:26 | FromDiscord | <Yardanico> i'm really confused |
12:18:30 | FromDiscord | <Yardanico> it's `readFile` and `items` |
12:18:37 | FromDiscord | <Yardanico> but dynamic typing and no `var` |
12:19:06 | FromDiscord | <Yardanico> ah python dict has a items method |
12:25:37 | FromDiscord | <Solitude> In reply to @haxscramper "Although `write` is not": https://nim-lang.org/docs/io.html#write%2CFile%2Cvarargs%5Bstring%2C%5D |
12:55:20 | FromDiscord | <krisppurg> Hey uh has anyone used zippy? |
13:11:35 | FromDiscord | <dom96> In reply to @Yardanico "is that nim https://www.reddit.com/r/badcode/commen": The print gives it away. Unmistakable Python. |
13:15:48 | FromDiscord | <krisppurg> sent a code paste, see https://play.nim-lang.org/#ix=2VBp |
13:19:45 | * | rockcavera joined #nim |
13:20:57 | FromDiscord | <krisppurg> I even did uncompress(buffer) |
13:22:03 | * | Gustavo6046 quit (Ping timeout: 260 seconds) |
13:22:29 | FromDiscord | <haxscramper> BTW you don't need to use `@` prefix for "\x00", I just used it to convert string to `seq[char]` |
13:22:39 | FromDiscord | <krisppurg> oh |
13:26:14 | FromDiscord | <haxscramper> I haven't used zippy, but you can try to figure out what is wrong based on checks in `uncompress` that raise this exception |
13:26:14 | FromDiscord | <haxscramper> https://github.com/guzba/zippy/blob/c922587070bd2f4eccc9183bebd966082428d5b9/src/zippy.nim#L94-L125 |
13:26:43 | FromDiscord | <krisppurg> alright |
13:31:12 | * | Gustavo6046 joined #nim |
13:46:18 | * | xet7 quit (Ping timeout: 268 seconds) |
13:47:56 | FromDiscord | <krisppurg> I dont see anything wrong |
13:48:06 | FromDiscord | <krisppurg> @haxscramper |
13:49:55 | * | Vladar joined #nim |
13:54:07 | FromDiscord | <haxscramper> I just made a suggestion, you would have to wait for someone who actually knows where this library can fail. And of course you need to look at stacktrace and see where exception was raised and go from there |
13:54:31 | FromDiscord | <haxscramper> If you haven't done so already |
13:57:16 | FromDiscord | <krisppurg> In reply to @haxscramper "I just made a": the stacktrace doesnt locate where the exception was raised |
13:58:15 | FromDiscord | <haxscramper> you mean this particular exceptions is incorrectly shown in the stacktrace? |
13:58:20 | FromDiscord | <haxscramper> ah yes, I see |
13:58:21 | FromDiscord | <haxscramper> https://github.com/guzba/zippy/blob/c922587070bd2f4eccc9183bebd966082428d5b9/src/zippy/common.nim#L183 |
13:58:35 | FromDiscord | <haxscramper> Last exception points here, right? |
13:59:47 | FromDiscord | <krisppurg> yes |
14:04:06 | haxscramper | This is a common mistake with raise inside of a template where lineinfo gets clobbered by template instantiation. It cannot be fixed externally, you need to add `{.line: instantiationInfo().}` to the template definition. So you can just find where zippy is installed in your system (most likely it is somewhere in the `~/.nimble/pkgs/<zippy-XXX>`, find `failUncompress` template and make an edit |
14:08:11 | haxscramper | I think `newException` should not be used anywhere except top-level code, it is too easy to misuse to completely destroy stacktrace |
14:08:22 | haxscramper | Also people forget about `{.line:.}` |
14:08:59 | haxscramper | That's why almost half of the stacktraces in the stdlib lead to template or macro definitions |
14:11:18 | FromDiscord | <krisppurg> it says cannot attach a custom pragma to failCompress |
14:11:47 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2VBF |
14:11:56 | FromDiscord | <haxscramper> https://nim-lang.org/docs/manual.html#pragmas-line-pragma |
14:11:59 | FromDiscord | <krisppurg> O |
14:12:16 | FromDiscord | <haxscramper> IIRC `{.dirty.}` might have the same effect |
14:12:24 | FromDiscord | <haxscramper> But I"m not sure and I think it gets weird in some cases |
14:12:33 | FromDiscord | <haxscramper> Like very weird |
14:12:54 | FromDiscord | <haxscramper> (edit) removed "Like" |
14:13:02 | FromDiscord | <Solitude> can i somehow get the name of generated result variable from PProc in jsgen? |
14:14:45 | FromDiscord | <krisppurg> it still doesn't show the stacktrace that locates to where the exception was raised |
14:22:12 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2VBJ |
14:22:19 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2VBK |
14:22:24 | * | xet7 joined #nim |
14:22:37 | FromDiscord | <krisppurg> sent a code paste, see https://play.nim-lang.org/#ix=2VBL |
14:22:59 | FromDiscord | <krisppurg> the version im using is `zippy-0.3.14` |
14:23:58 | FromDiscord | <haxscramper> First - try updating. Current one is `0.5.5` |
14:24:07 | FromDiscord | <haxscramper> Which is a lot newer |
14:24:28 | FromDiscord | <haxscramper> And might now even have the same issue as one you are currently having |
14:24:49 | FromDiscord | <krisppurg> alright |
14:34:19 | FromDiscord | <krisppurg> still same |
14:35:56 | FromDiscord | <haxscramper> Can you show the stacktrace |
14:36:04 | FromDiscord | <krisppurg> alright |
14:36:37 | FromDiscord | <krisppurg> https://media.discordapp.net/attachments/371759389889003532/830451207285899274/message.txt |
14:37:01 | FromDiscord | <haxscramper> async backtrace |
14:37:03 | FromDiscord | <haxscramper> I'm out |
14:37:22 | FromDiscord | <krisppurg> ? |
14:37:58 | FromDiscord | <haxscramper> have you tried running `uncompress` without async? Just store packet somewhere, and run `import zippy; discard uncompress("packet".readFile())` |
14:40:56 | FromDiscord | <krisppurg> In reply to @krisppurg "Welp, besides locating to": I think it would be more of a hassle, even when the stacktrace is found, there still is an issue going on. |
14:41:16 | FromDiscord | <krisppurg> wrong message |
14:41:38 | FromDiscord | <haxscramper> now you can't even see where exception originated |
14:41:57 | FromDiscord | <haxscramper> Maybe someone knows a way how to make async return sane exceptions |
14:42:04 | FromDiscord | <haxscramper> But that "someone" is certainly not me |
14:43:05 | FromDiscord | <krisppurg> https://discord.com/channels/371759389889003530/371759389889003532/830447659276959745 |
14:45:51 | FromDiscord | <archiloque> As a first Nim personal project I'm tempted to try working on a graphical ActivityPub client, it's a kind of project I could probably do easily in a language I'm experienced with, but not sure if it's not too big for a first project in a lang I'm learning |
14:50:25 | FromDiscord | <dk> In reply to @archiloque "As a first Nim": would that be just a terminal program that does http requests |
14:53:42 | FromDiscord | <archiloque> No, I was thinking of a GUI, I don't really like the provided web interfaces and want to have a look at some graphical interface tools |
14:59:55 | FromDiscord | <dom96> In reply to @haxscramper "have you tried running": best plan IMO |
15:07:31 | * | PMunch joined #nim |
15:08:48 | PMunch | @ElegantBeef, guess what I got in the mail yesterday! |
15:33:08 | * | PMunch quit (Quit: leaving) |
15:49:22 | ForumUpdaterBot | New Nimble package! ffmpeg - ffmpeg.nim is the Nim binding for FFMpeg(4.3.2)., see https://github.com/momeemt/ffmpeg.nim |
15:58:20 | FromDiscord | <Hi02Hi> In reply to @ElegantBeef "Any of the lurkers": finished with my small bigint lib, and also a bigrationals (?) lib. working on implementing std/math for bigints |
16:06:29 | * | Menduist joined #nim |
16:06:50 | * | rockcavera quit (Remote host closed the connection) |
16:15:24 | FromDiscord | <krisppurg> I think most likely I have found the issue why I am getting invalid buffer, is that zippy or zip does not support reusing the same z_stream context for multiple messages in code (`uncompress`), hence why I'm getting the `Invalid Buffer` error |
16:17:04 | FromDiscord | <flywind> In reply to @Hi02Hi "finished with my small": cool! we need bigints https://github.com/nim-lang/Nim/issues/14696 |
16:18:02 | FromDiscord | <krisppurg> !repo zlib |
16:19:10 | * | Menduist quit (Quit: Connection closed) |
16:47:35 | FromDiscord | <Hi02Hi> In reply to @flywind "cool! we need bigints": isnt there https://github.com/def-/nim-bigints ?β΅also, my lib in not at all geared towards performance, though i am happy i am within 1/2 the speed of the above link while being 4x shorter |
16:50:14 | FromDiscord | <Hi02Hi> now that i look, araq said β΅"For the Nim compiler I don't care much about the speed, it's much more important that it has no dependencies."β΅my lib also only depends on system, his imports strutils |
16:51:43 | FromDiscord | <Rika> in this case its more of "[external] dependencies"; any stdlib is fine |
16:54:30 | FromDiscord | <Hi02Hi> ok |
16:56:51 | FromDiscord | <Hi02Hi> but yeah, mine isnt the fastest out there |
17:06:33 | FromDiscord | <hugogranstrom> I've been having trouble unzipping a large file (3GB zipped, 6GB unzipped) using Nim (1.4.4 Windows 64 bit) lately without success. `zip` can't seem to handle it (hard to tell exactly what as it just returns false) and `zippy` eats up my memory and gives me an `out of memory` error. Any suggestions? The file can be opened just fine in the file explorer and on WSL |
17:08:55 | saem | I would pull down the code for zippy and start debugging. Does that seem very out of reach? |
17:09:42 | FromDiscord | <hugogranstrom> I think the problem with zippy primarly is that it read the entire file into memory at once :/ |
17:10:01 | FromDiscord | <hugogranstrom> My RAM is just 8GB after all |
17:10:01 | saem | Well, there you go. |
17:10:31 | federico3 | "just"? |
17:10:45 | saem | Is it possible to use file stream in zippy, might be a moderate PR? |
17:11:30 | FromDiscord | <hugogranstrom> federico3: hehe I'm spoiled π |
17:11:53 | FromDiscord | <hugogranstrom> It's not possible atm but guzba has plans for it in the future: https://github.com/guzba/zippy/issues/12#issuecomment-814430510 |
17:12:25 | FromDiscord | <hugogranstrom> "It is a quite large refactor though" So perhaps not a moderate PR exactly |
17:13:58 | FromDiscord | <hugogranstrom> I think it's strange that the standard `zip` library can't handle it as well |
17:15:14 | FromDiscord | <hugogranstrom> Just got a though though, if `zlib.dll` that comes bundled with Nim only is compiled with 32 bits, would that be a problem when I have a file larger than 4GB (uint32 maxes out there) |
17:15:21 | FromDiscord | <hugogranstrom> (edit) "there)" => "there)?" |
17:22:09 | ForumUpdaterBot | New thread by Mrhdias: How to iterate over a SharedTable?, see https://forum.nim-lang.org/t/7772 |
17:30:11 | * | krux02 joined #nim |
17:55:23 | * | fredrikhr quit (*.net *.split) |
17:55:24 | * | mwbrown quit (*.net *.split) |
17:55:24 | * | kaliy quit (*.net *.split) |
17:55:24 | * | voidpi quit (*.net *.split) |
17:55:24 | * | Eyess quit (*.net *.split) |
17:55:24 | * | fmaruki quit (*.net *.split) |
17:55:24 | * | Araq quit (*.net *.split) |
17:56:21 | * | fredrikhr joined #nim |
17:56:22 | * | mwbrown joined #nim |
17:56:22 | * | kaliy joined #nim |
17:56:22 | * | voidpi joined #nim |
17:56:22 | * | Eyess joined #nim |
17:56:22 | * | fmaruki joined #nim |
17:56:22 | * | Araq joined #nim |
18:14:36 | FromDiscord | <Charlotte> Is it possible to use Nimscript in Python? |
18:15:07 | FromDiscord | <Charlotte> Like, i wanna use Nimscript as a scripting language for my python discord bot, since Nimscript is easy to use and stuff |
18:15:40 | FromDiscord | <Charlotte> I can't directly use Python since that's unsafe, but i can't use JS and Lua isn't preferable imo |
18:15:56 | FromDiscord | <Charlotte> Nimscript would be the perfect choice for me, especially because of the macros |
18:17:40 | FromDiscord | <Charlotte> Also, this is @Technisha's alt |
18:17:45 | FromDiscord | <Charlotte> (No I'm not banned) |
18:18:30 | FromDiscord | <Technisha> This is le proof I'm not banned |
18:18:31 | FromDiscord | <jtiai> Um. Does Nim have something equivalent to Python `getattr()` ? |
18:19:26 | FromDiscord | <Yardanico> In reply to @jtiai "Um. Does Nim have": you can use https://nim-lang.org/docs/iterators.html#fieldPairs.i%2CT and check by the field name |
18:19:34 | FromDiscord | <Yardanico> or write a macro :) |
18:19:52 | FromDiscord | <Yardanico> don't worry, fieldPairs is compile-time too |
18:20:23 | FromDiscord | <Yardanico> as in, it unrolls the loop at compile-time, so with a when check for the field name you can get it all at compile-time |
18:20:38 | FromDiscord | <Yardanico> but if you only get the attribute name at runtime, you'll have a harder time |
18:22:14 | FromDiscord | <Charlotte> :p |
18:22:48 | FromDiscord | <Charlotte> I could probably use Nimpy to embed Nimscript after some manual wrapping tbh |
18:23:00 | FromDiscord | <Charlotte> But idk how I'd actually implement my custom functions :p |
18:23:13 | FromDiscord | <Yardanico> take a look at https://github.com/beef331/nimscripter |
18:23:26 | FromDiscord | <Charlotte> Oh? |
18:24:09 | * | vicfred joined #nim |
18:24:40 | FromDiscord | <Charlotte> That's perfect! Thanks! |
18:30:11 | FromDiscord | <Charlotte> ~~I saw you typing, Beef-~~ |
18:31:15 | FromDiscord | <Yardanico> In reply to @Charlotte|π»β "Also, this is <@470131488856211476>'s": why do you need alts though? π€ |
18:32:32 | FromDiscord | <Charlotte> This was my old account from ages ago that i lost |
18:32:43 | FromDiscord | <Charlotte> And i cnba to actually switch between them constantly |
18:32:56 | FromDiscord | <Charlotte> Since most of my programming servers are on this account |
19:02:22 | * | haxscramper quit (Remote host closed the connection) |
19:02:47 | * | haxscramper joined #nim |
19:09:04 | * | lritter quit (Remote host closed the connection) |
19:14:03 | FromDiscord | <dom96> In reply to @saem "Is it possible to": in general, we seem to have a streaming problem in Nim. It suggests that our streams API is not good enough. |
19:19:09 | saem | @dom96: I'll admit I'm not a fan of them. There is a unifying concept that helps then and other problem areas, it's just really painful to have only two people noodling through it. |
19:19:27 | FromDiscord | <mlokis> what actually takes most of the compile time? I guess frontend because of so match sugar syntax has |
19:21:10 | saem | Depends, macros and other compile time code have their code, and as you mean harder on the type system is possible to hit suboptimal paths. Converters can really add up too. |
19:27:24 | FromDiscord | <treeform> In reply to @dom96 "in general, we seem": Guzba and me are not huge fans of streams. Mainly that they are slow. |
19:28:47 | * | PMunch joined #nim |
19:31:27 | FromDiscord | <zetashift> But aren't streams supposed to be fast for big stuff? Is it an implementation problem or something inherent to Streams? |
19:31:57 | FromDiscord | <treeform> I think its an implementation problem. I think status has streams that are way faster. |
19:32:03 | FromDiscord | <treeform> We have not explored the area though. |
19:33:15 | FromDiscord | <treeform> I think the problem is that I/O api is slower then modern systems then memory mapping. There might be some solution based on memory mapping that we would like. |
19:33:25 | FromDiscord | <treeform> (edit) "then" => "on" |
19:33:57 | PMunch | @Charlotte, it should be possible. Not sure how easy it'd be to set up though.. |
19:36:41 | FromDiscord | <Charlotte> That's alright tbh, as long as it's possible it's fine for me :p |
19:38:14 | PMunch | I mean you "just" need to build a DLL/so that loads the nimscript stuff and then have some function to trigger that from Python |
19:38:36 | FromDiscord | <Charlotte> Yeah :p |
19:38:51 | FromDiscord | <Charlotte> Though idk how I'd access certain functions from Python |
19:38:56 | FromDiscord | <Charlotte> I know Nimpy can do it but like |
19:39:22 | FromDiscord | <Charlotte> Idk how i should go about implementing this |
19:39:56 | PMunch | Hmm, I don't really know enough about Python <-> dynamic library interaction to help I think.. |
19:40:31 | FromDiscord | <Charlotte> That's alright, thanks anyway though! |
19:46:58 | * | narimiran quit (Quit: leaving) |
19:51:29 | FromDiscord | <archiloque> I'm looking for a GUI toolkit for personnal projects, I have experience in web and Java GUI (so I know the paradigms) but not in toolkits like QT or others, and I want something that don't need to invest too much time. nimx seem to be a good choice since it doesn't require to learn an external toolkit and the API seem easy to grasp, are there better / more popular tool, or any caveat to consider ? |
19:59:42 | FromGitter | <symgryph> How do I specify the default binary location in my config.nims file. I tried --outdir:/blah/blah it totally hated hat. |
19:59:44 | FromGitter | <symgryph> that |
20:03:34 | FromDiscord | <Yardanico> -o:binary |
20:03:44 | FromDiscord | <Yardanico> or --out: |
20:03:49 | FromDiscord | <Yardanico> check advanced options https://nim-lang.org/docs/nimc.html |
20:06:10 | * | PMunch quit (Ping timeout: 268 seconds) |
20:08:57 | FromGitter | <symgryph> so for "generic" directory: |
20:09:08 | FromGitter | <symgryph> -o:/my/directory/to/save |
20:09:34 | FromGitter | <symgryph> --output-dir works fine on cli: |
20:10:19 | FromGitter | <symgryph> nim --outdir=/Users/tmunn/src/nim/chat/bin c client.nim |
20:10:27 | FromGitter | <symgryph> but when I put in my client.nims: |
20:11:51 | FromGitter | <symgryph> it puts it in the src directory where I am compiling |
20:12:05 | FromGitter | <symgryph> client.nims= |
20:12:07 | FromGitter | <symgryph> --threads:on β --outdir:/Users/tmunn/src/nim/chat |
20:18:33 | * | PMunch joined #nim |
20:27:29 | * | haxscramper quit (Remote host closed the connection) |
20:27:52 | * | haxscramper joined #nim |
20:27:53 | * | haxscramper quit (Remote host closed the connection) |
20:32:40 | ForumUpdaterBot | New thread by Sflennik: RegexFlag, see https://forum.nim-lang.org/t/7773 |
20:33:14 | FromDiscord | <nsauzede> A noob question : how to make a func parameter mutable ? |
20:33:39 | FromDiscord | <nsauzede> sent a code paste, see https://play.nim-lang.org/#ix=2VDW |
20:34:21 | FromDiscord | <nsauzede> and I didn't add any special flag to the `rec` param of my func |
20:34:29 | FromDiscord | <nsauzede> so ig I should π |
20:35:11 | FromDiscord | <nsauzede> sent a code paste, see https://play.nim-lang.org/#ix=2VDX |
20:36:05 | FromDiscord | <Yardanico> In reply to @nsauzede "and I didn't add": `var` |
20:36:24 | FromDiscord | <Yardanico> rec: var HitRec |
20:36:58 | FromGitter | <symgryph> for anyone else having this problem (*in nims*) to get your compilation to work if you aren't using cwd (default location for binary --outdir" correct syntax is: |
20:37:01 | FromDiscord | <Yardanico> remember that you don't need that if you have a `ref object`, but in case of normal value objects you do need it |
20:37:19 | FromGitter | <symgryph> --outdir:"../bin" if your output directory is located in a directoyr above say your source code" |
20:37:20 | FromDiscord | <nsauzede> π€¦ββοΈ thanks @Yardanico |
20:49:09 | FromDiscord | <nsauzede> is it expected, that nim refuses to compile a file whose name comprises an `-` ? (I got and `module name error` or so) |
20:49:30 | FromDiscord | <ElegantBeef> yes `-` is not a valid nim identifier character |
20:49:41 | FromDiscord | <Yardanico> In reply to @nsauzede "is it expected, that": all nim module names must be valid identifiers |
20:49:45 | FromDiscord | <Yardanico> since you must be able to import them |
20:49:51 | FromDiscord | <Yardanico> and refer to them (fully qualify if needed) |
20:50:04 | FromDiscord | <Yardanico> https://nim-lang.org/docs/manual.html#modules |
20:50:05 | FromDiscord | <nsauzede> ok -- and there is a strong relation bw module name and file name right |
20:50:14 | FromDiscord | <nsauzede> (edit) "relation" => "relationship" |
20:50:21 | FromDiscord | <Yardanico> as I described |
20:50:33 | FromDiscord | <nsauzede> got it |
20:50:42 | FromDiscord | <nsauzede> (edit) "got it ... " added "π" |
20:50:45 | FromDiscord | <ElegantBeef> you can do `module.procedureName` and if it was capable of being a bad ident, you couldnt do that |
20:50:51 | FromDiscord | <mrotaru> I'm trying to send some server-sent events but getting errors from both `httpie` and `curl`, complaining about chunked-encoding issues; tried lots of combinations but still wont' work; any examples of working code for sending chunked-encoded HTTP responses ? |
20:52:41 | * | a_chou joined #nim |
20:54:37 | * | a_chou quit (Remote host closed the connection) |
20:55:54 | FromDiscord | <nsauzede> sent a code paste, see https://play.nim-lang.org/#ix=2VE0 |
20:56:14 | FromDiscord | <ElegantBeef> `--out:name` |
20:57:22 | liblq-dev | or just -o:name |
20:57:42 | FromDiscord | <Charlotte> I wonder if I'd be allowed to distribute Nimscript in Python on PyPi- |
20:57:55 | * | reversem3 < https://matrix.org/_matrix/media/r0/download/matrix.org/wWBLHnSlOjHczlAqielSKhMr/message.txt > |
20:57:58 | FromDiscord | <Charlotte> Nimscrpy |
20:58:05 | FromGitter | <symgryph> I really liked --outdir:bin since it just uses the name of the source code plus my bin directory in the current working directory. |
20:58:12 | FromGitter | <symgryph> it even creates it for you if its missing! |
20:58:13 | FromDiscord | <Charlotte> Now i gotta make the repo |
20:58:16 | FromDiscord | <Charlotte> https://cdn.discordapp.com/emojis/772498743378575403.png?v=1&size=64 |
20:58:17 | FromDiscord | <ElegantBeef> Why wouldnt you be allowed to it's MIT licensed |
20:58:26 | FromDiscord | <Charlotte> I mean if PyPi would accept it- |
20:58:29 | FromDiscord | <ElegantBeef> I dont know why you would use nimscript in python |
20:58:37 | FromDiscord | <ElegantBeef> 2 interpreters deep, for what reason?! |
20:58:38 | FromDiscord | <Charlotte> For scripting custom commands |
20:58:43 | FromDiscord | <Charlotte> Safely |
20:58:54 | FromDiscord | <ElegantBeef> So just make the program in Nim then use nimscript to script that π |
20:59:03 | FromDiscord | <Charlotte> It's a python bot- |
20:59:11 | FromDiscord | <ElegantBeef> Exactly my point π |
20:59:12 | FromDiscord | <Charlotte> That's using a lib that i really like- |
20:59:23 | FromDiscord | <Charlotte> And it doesn't work in Nimpy- |
20:59:33 | FromDiscord | <Charlotte> ~~Discord.py sucks, Hata is the best-~~ |
20:59:47 | FromDiscord | <ElegantBeef> Yea excuse me i have my biases π |
20:59:58 | FromDiscord | <Charlotte> Mood xD |
21:00:15 | FromDiscord | <ElegantBeef> I'd just rather use Dimscord + my command handler + nimscript, than touch python |
21:00:46 | FromDiscord | <Charlotte> Lmaooo |
21:01:06 | * | filcuc_ joined #nim |
21:01:13 | FromDiscord | <Charlotte> It'd also be good for other devs who want a python-like scripting language that's safer then eval/exec |
21:02:15 | FromDiscord | <ElegantBeef> Personally since bots are rather rigid and compile times are quick i dont see the benefit of live scripting commands |
21:02:25 | FromDiscord | <Charlotte> Custom command system |
21:02:28 | FromDiscord | <Charlotte> :p |
21:02:54 | FromDiscord | <ElegantBeef> Sure but isnt this easy enough? https://github.com/GaryM-exkage/GDGW-Maverick-Bot/blob/master/src/nimcordbot/command/justask.nim |
21:03:21 | PMunch | Hi @ElegantBeef, did you see my message from earlier? |
21:03:27 | FromDiscord | <Charlotte> For custom commands? |
21:03:28 | FromDiscord | <ElegantBeef> Yea |
21:03:43 | FromDiscord | <ElegantBeef> Oh you want users to provide their own custom commands |
21:03:45 | FromDiscord | <Charlotte> That someone can make with `v>addcmd` |
21:03:47 | FromDiscord | <Charlotte> Yeah |
21:03:53 | FromDiscord | <ElegantBeef> That's dumb, but carry on π |
21:04:04 | FromDiscord | <ElegantBeef> Yea pmunch i did |
21:04:12 | FromDiscord | <ElegantBeef> pitter patter get some code running on the pico |
21:04:18 | FromDiscord | <Charlotte> Lmao |
21:04:21 | PMunch | I'm ready to break your stuff now :P |
21:04:25 | FromDiscord | <ElegantBeef> clone my template and run cmake |
21:04:49 | FromDiscord | <ElegantBeef> Nice, think i convinced my friend to get a pico, but no clue if he plans on using/learning Nim |
21:05:45 | FromDiscord | <ElegantBeef> He's an electronics tech graduate, so atleast hardware wise he thinks the pico is quite awesome |
21:06:03 | FromDiscord | <ElegantBeef> Considering the cost and the features |
21:06:45 | FromDiscord | <ElegantBeef> You might have to help me get the tinyusb support running since you actually have a modicum of understand with C π |
21:06:57 | FromDiscord | <ElegantBeef> (edit) "understand" => "understanding" |
21:08:39 | PMunch | Shhh, don't mention for federico that you like the Pico :P |
21:09:07 | FromDiscord | <ElegantBeef> Lol for the cost and functionality i think you're hard pressed to find another equally good device |
21:09:42 | PMunch | He linked one last time I brought it up |
21:09:54 | PMunch | But I think for the ease of use for new users it's hard to beat |
21:10:29 | PMunch | Now I just need to create a program with MicroPython that fills the entire memory, then rewrite the whole thing in Nim showing how nice and small it can be when done right :P |
21:10:35 | FromDiscord | <Yardanico> how big is the flash size on pico? |
21:10:50 | reversem3 | ok I figured it out inim only works when installed via stable nim repo |
21:11:01 | reversem3 | same with nsh and tnim |
21:11:04 | FromDiscord | <Charlotte> How would i release a package that uses some Nim code? |
21:11:09 | FromDiscord | <Charlotte> Like, how would i distribute it |
21:11:10 | FromDiscord | <ElegantBeef> Nimble |
21:11:12 | FromDiscord | <Charlotte> With wheels? |
21:11:12 | FromDiscord | <Yardanico> check out how https://github.com/Pebaz/nimporter does it |
21:11:19 | FromDiscord | <Charlotte> Oh okay! |
21:11:22 | FromDiscord | <Yardanico> but this isn't really a nim question |
21:11:30 | FromDiscord | <Yardanico> it's more specific to pypi/binary releases |
21:11:43 | FromDiscord | <Yardanico> 2mb flash memory on the pico |
21:11:52 | FromDiscord | <Yardanico> good enough I guess |
21:12:13 | PMunch | Yardanico 2MB I think |
21:12:28 | FromDiscord | <ElegantBeef> I wager he searched it manually |
21:12:35 | PMunch | Who me? |
21:12:40 | FromDiscord | <ElegantBeef> Yard |
21:12:47 | FromDiscord | <ElegantBeef> Considering he said it before you |
21:13:16 | PMunch | I used a LoPy device than ran only Micropython, filled the whole thing up with a simple screen and font.. |
21:13:24 | PMunch | And that thing had 4Mb I think |
21:14:05 | FromDiscord | <ElegantBeef> I'm missing hardware to test different things, so aside from tiny usb mostly hit the limits of stuff i can implement |
21:14:07 | FromDiscord | <Yardanico> yeah I had a nodemcu esp8266 |
21:14:14 | FromDiscord | <Yardanico> before I burned it :P |
21:14:43 | FromDiscord | <Yardanico> mostly used it as a WiFi UART bridge lol |
21:16:05 | PMunch | I've got plenty of sensors and stuff I can plug into it :) |
21:16:13 | FromDiscord | <ElegantBeef> Yea i assumed so |
21:16:27 | FromDiscord | <ElegantBeef> do need to get pio and i2c ported still, but atleast i know gpio works π |
21:16:53 | FromDiscord | <ElegantBeef> My super elaborate gpio test https://streamable.com/xd8w81 |
21:17:17 | FromDiscord | <ElegantBeef> wrote a whole fancy pure 7 segmented display module for that single project |
21:17:55 | PMunch | Hmm, in the documentation what does "Navigate to the build folder" mean? |
21:18:19 | FromDiscord | <ElegantBeef> `csource/build` |
21:19:23 | FromDiscord | <jtiai> if I have an array is there simple way to fill in block there except for-loop? somethings like: `myarray[0:3] = [1, 2, 3]` ? |
21:20:28 | FromDiscord | <ElegantBeef> Don think there is, might be wrong |
21:20:38 | FromDiscord | <Charlotte> How would i make it so in Nimscripter, i can expose functions in Python for use in Nimscript, programmatically? |
21:20:47 | FromDiscord | <Charlotte> Unless this is impossible which i hope isn't |
21:20:50 | PMunch | I guess you could write a `[]=` that takes a range and put your loop in there |
21:21:24 | FromDiscord | <ElegantBeef> You'd have to replicate the logic nimscripter does for nim code, for python code |
21:21:36 | FromDiscord | <ElegantBeef> so a LUT of `proc(string)` |
21:21:41 | FromDiscord | <ElegantBeef> Which then call python code |
21:22:40 | FromDiscord | <ElegantBeef> nimscript -> nim -> python is what you need to do |
21:22:51 | FromDiscord | <Charlotte> Wait so how would I do this in pure Nim (programmatically) |
21:22:57 | FromDiscord | <Charlotte> What file contains the logic? |
21:23:00 | * | vicfred quit (Quit: Leaving) |
21:23:13 | FromDiscord | <ElegantBeef> You'd need to have bindings to python code inside the binary |
21:23:49 | FromDiscord | <ElegantBeef> So nimscript calls `doThing(args)` which goes to nim, which then calls python |
21:23:59 | FromDiscord | <ElegantBeef> Hence the reason i said this seems silly |
21:24:11 | FromDiscord | <ElegantBeef> 2 intepreters + 1 binary |
21:24:36 | FromDiscord | <Charlotte> Ah alright |
21:25:36 | FromDiscord | <Charlotte> ~~Not gonna stop doing this though lmao~~ |
21:26:03 | FromDiscord | <ElegantBeef> Excuse me whilst i delete nimscripter |
21:26:09 | FromDiscord | <Yardanico> In reply to @Charlotte|π»β "~~Not gonna stop doing": no one stops you from doing so, but you're making things harder for yourself :) |
21:26:29 | FromDiscord | <Yardanico> and people don't usually help with pointless things, they'll instead point you out to why they think it's pointless |
21:26:35 | FromDiscord | <Yardanico> x y problem and stuff |
21:26:45 | FromDiscord | <Yardanico> e.g. for python there's https://github.com/hylang/hy |
21:26:54 | FromDiscord | <Charlotte> O |
21:27:05 | PMunch | I for one congratulate you, doing stupid things is sometimes the most fun :P |
21:27:10 | FromDiscord | <Charlotte> In reply to @Yardanico "no one stops you": It's reusable so- |
21:27:20 | FromDiscord | <Charlotte> In reply to @PMunch "I for one congratulate": EXACTLY! SOMEONE GETS IT- |
21:27:29 | FromDiscord | <ElegantBeef> I just dont see the benefit from using the python discord library |
21:27:34 | FromDiscord | <ElegantBeef> We have a Nim one |
21:27:39 | FromDiscord | <Charlotte> Yeah but like |
21:27:49 | FromDiscord | <Charlotte> Implementing this once will help be do a lot more things |
21:27:58 | FromDiscord | <Yardanico> a lot more cursed things? |
21:28:01 | FromDiscord | <Charlotte> Yes- |
21:28:07 | PMunch | @ElegantBeef, yay first error! http://ix.io/2VEf |
21:28:09 | FromDiscord | <Yardanico> eh, your choice |
21:28:10 | FromDiscord | <ElegantBeef> What's the benefit of using the python library? |
21:28:47 | FromDiscord | <ElegantBeef> Is that just the normal hello world project? |
21:28:55 | FromDiscord | <Charlotte> It's something I'm really comfortable with and have used in the past reliably, and the dev is actually really open to new ideas that could actually benefit the lib |
21:29:14 | FromDiscord | <Charlotte> No I'm not talking about Discord.py, Danny would never do that- |
21:29:20 | FromDiscord | <Charlotte> Dpy is shit anyway- |
21:29:22 | FromDiscord | <ElegantBeef> I mean krispurg is in here somewhere |
21:29:42 | FromDiscord | <Charlotte> Yeah but like, it's so much more preferable to me |
21:30:04 | FromDiscord | <ElegantBeef> Pmunch, what code did you try to compile? |
21:30:07 | FromDiscord | <Charlotte> Especially since it's in the language I've been using for the past 3 years and have the most experience in |
21:31:16 | FromDiscord | <Yardanico> In reply to @Charlotte|π»β "Especially since it's in": yes, no one is stopping you from doing so, but as this might seem strange for some people they wouldn't want to help (like beef, no offense, I completely understand him :P) |
21:31:24 | PMunch | @ElegantBeef, just the template |
21:31:34 | PMunch | I was just following the build instructions |
21:31:48 | FromDiscord | <clyybber> In reply to @Charlotte|π»β "Also, this is <@470131488856211476>'s": Do you want it to be renamed to Technishia too? |
21:31:51 | FromDiscord | <Charlotte> Yeah i understand too xD |
21:31:59 | PMunch | On latest stable by the way |
21:32:11 | FromDiscord | <ElegantBeef> open cmakelists.txt and save it |
21:32:20 | FromDiscord | <Charlotte> Β―\\_(γ)\_/Β― |
21:32:37 | FromDiscord | <Nisha's alt> @Nisha's alt ΓvΓ |
21:32:44 | FromDiscord | <mrotaru> in this code: ` msg.add "\c\L"` what are \c and \L ? |
21:32:44 | FromDiscord | <Yardanico> who is nisha |
21:32:45 | FromDiscord | <ElegantBeef> Ah this explains alot |
21:32:55 | FromDiscord | <clyybber> yardanico was faster :D |
21:33:01 | FromDiscord | <Yardanico> In reply to @mrotaru "in this code: `": https://nim-lang.org/docs/manual.html#lexical-analysis-string-literals |
21:33:12 | FromDiscord | <Nisha's alt> In reply to @Clyybber "yardanico was faster :D": I changed it |
21:33:17 | FromDiscord | <clyybber> oh |
21:33:19 | FromDiscord | <Nisha's alt> Nisha is my nickname :p |
21:33:21 | FromDiscord | <Yardanico> carriage return followed by a line feed I think |
21:33:25 | FromDiscord | <Nisha's alt> It's still Technisha :p |
21:33:29 | * | filcuc_ quit (Quit: Konversation terminated!) |
21:33:35 | FromDiscord | <mrotaru> yep, thanks ! |
21:33:36 | FromDiscord | <clyybber> I thought you couldnt change your own username |
21:33:39 | FromDiscord | <ElegantBeef> It's annoying pmunch, but you need to tick the cmakelist's modification date for it to search for all the `.c`/`.h` files |
21:33:42 | FromDiscord | <Nisha's alt> Nah you can |
21:33:42 | * | filcuc_ joined #nim |
21:33:47 | FromDiscord | <Yardanico> In reply to @Clyybber "I thought you couldnt": the display name you can |
21:33:54 | FromDiscord | <Yardanico> username too, but that's global |
21:33:58 | FromDiscord | <Yardanico> display name is specific to the server |
21:34:02 | FromDiscord | <clyybber> but for irc that means easy impersonation no? |
21:34:05 | FromDiscord | <Yardanico> yes |
21:34:12 | FromDiscord | <Yardanico> as it's already been shown |
21:34:21 | FromDiscord | <Yardanico> but people complained so ircord uses display names now :) |
21:34:30 | FromDiscord | <clyybber> ah but if.you can change global it.wouldnt make sense to prevent it anyways |
21:34:36 | FromDiscord | <Yardanico> since a lot of people have weird stuff in their usernames like unicode |
21:34:40 | FromDiscord | <Yardanico> and only change display name on the nim server |
21:37:51 | FromDiscord | <Nisha's alt> For Nimscripter, to add my own file to the stdlib in Nimscript, all i need to do is drop it in, right? |
21:38:14 | PMunch | @ElegantBeef `touch csource/CMakeList.txt` |
21:38:19 | PMunch | Easier way of doing it |
21:38:42 | PMunch | Maybe that should just be put in the `make` target? |
21:38:45 | reversem3 | nim> var seqlist = newSeq[string](3) |
21:38:45 | reversem3 | nim> assert seqlist[0] == nil |
21:38:45 | reversem3 | Error: 'nil' is now invalid for 'string'; compile with --nilseqs:on for a migration period; usage of '==' is an {.error.} defined at /home/nixfreak/.choosenim/toolchains/nim-1.4.4/lib/system.nim(2947, 5) |
21:39:03 | reversem3 | so no more nil unless compiled with nilseq:on ? |
21:39:05 | PMunch | reversem3, yeah strings can't be nil any longer |
21:39:12 | FromDiscord | <Yardanico> @reversem3 since a long time ago, yes |
21:39:15 | PMunch | Same for sequences |
21:39:18 | FromDiscord | <Yardanico> strings/seqs are empty by default |
21:39:21 | FromDiscord | <ElegantBeef> Yea that's all you have to do for nimscripter |
21:39:33 | FromDiscord | <ElegantBeef> `touch` isnt crossplatform though is it? |
21:40:07 | PMunch | when defined(goodOS): execCmd "touch csources/CMakeList.txt" |
21:40:12 | * | filcuc_ quit (Ping timeout: 265 seconds) |
21:40:17 | FromDiscord | <Yardanico> :) |
21:40:18 | FromDiscord | <ElegantBeef> Also i do suggest using a recent devel version of Nim since there was an issue with nimscript module iimporting |
21:40:23 | FromDiscord | <ElegantBeef> Lol i suppose |
21:40:30 | PMunch | I mean you could probably do the same with some NimScript as well |
21:40:30 | FromDiscord | <Nisha's alt> In reply to @ElegantBeef "Yea that's all you": Thanks! |
21:40:42 | FromDiscord | <Nisha's alt> In reply to @ElegantBeef "Also i do suggest": Oh? |
21:40:52 | PMunch | NimScript module importing? |
21:41:01 | PMunch | Wait, have you put NimScript on the Pico? |
21:41:05 | FromDiscord | <ElegantBeef> Nope |
21:41:09 | FromDiscord | <ElegantBeef> Nisha is talking about nimscript |
21:41:14 | PMunch | Oh, sorry :P |
21:41:22 | FromDiscord | <Nisha's alt> I'm using Nim 1.4.2 (latest version that comes on Termux) |
21:41:28 | PMunch | Hmm, how big does the program get when you add NimScript? |
21:41:38 | PMunch | Like could you theoretically do it |
21:41:54 | FromDiscord | <ElegantBeef> A meg or so |
21:42:02 | FromDiscord | <Yardanico> with LTO it'd be less probably |
21:42:02 | FromDiscord | <ElegantBeef> But that's not --opt:siize |
21:42:14 | FromDiscord | <Yardanico> and opt size, yeah |
21:42:24 | FromDiscord | <ElegantBeef> But eitherway it's dumb |
21:42:28 | FromDiscord | <Yardanico> -d:danger --opt:size -d:lto |
21:42:31 | FromDiscord | <ElegantBeef> I dont condone it |
21:42:34 | FromDiscord | <Yardanico> heh |
21:42:37 | * | Vladar quit (Remote host closed the connection) |
21:42:46 | FromDiscord | <Yardanico> In reply to @ElegantBeef "I dont condone it": people use python and JS on microcontrollers :) |
21:42:49 | FromDiscord | <Yardanico> so why can't they use nimscript :D |
21:43:00 | FromDiscord | <ElegantBeef> Cause nimscript is even slower than python π |
21:43:12 | FromDiscord | <Yardanico> shhh |
21:43:37 | FromDiscord | <Nisha's alt> What's lto? |
21:43:44 | FromDiscord | <ElegantBeef> Link time optimization |
21:43:47 | FromDiscord | <Nisha's alt> O |
21:44:20 | PMunch | Oh I mean for sure it's dumb |
21:44:28 | PMunch | That's not really the point though :P |
21:44:34 | FromDiscord | <Nisha's alt> And why is Nimscript slower then Python? :P |
21:44:38 | FromDiscord | <Yardanico> because it is |
21:44:54 | FromDiscord | <ElegantBeef> The only dumb thing i do is exist π |
21:45:26 | FromDiscord | <clyybber> In reply to @Charlotte|π»β "And why is Nimscript": not sure, probably something stupid |
21:45:39 | FromDiscord | <Yardanico> any meaningful benchmarks one can try? |
21:45:55 | FromDiscord | <ElegantBeef> I was curious and was going to profile it, but never got around to, plus i'm not the person to attempt to increase the performance of it |
21:46:22 | FromDiscord | <clyybber> In reply to @ElegantBeef "I was curious and": how do you know you aren't :p |
21:46:39 | FromDiscord | <Nisha's alt> In reply to @Clyybber "not sure, probably something": Hm |
21:46:45 | FromDiscord | <ElegantBeef> Cause i've read a small amount of it and could barely process it |
21:49:55 | FromDiscord | <Nisha's alt> Oof |
21:50:00 | FromDiscord | <Nisha's alt> That's a mood :p |
21:55:18 | reversem3 | this doesn't work anymore either ? |
21:55:22 | * | reversem3 uploaded an image: (5KiB) < https://matrix.org/_matrix/media/r0/download/matrix.org/wQZLSgWVKUuujlhpmzBysxgM/image.png > |
21:56:03 | FromDiscord | <Yardanico> ..< |
21:56:18 | PMunch | Hoorah, it's output Hello Worlds |
21:56:23 | FromDiscord | <Yardanico> are you perhaps reading nim in action? |
21:56:28 | reversem3 | yes |
21:56:34 | FromDiscord | <Yardanico> see https://deepakg.github.io/nim/2019/09/28/nim-in-action-errata.html |
21:59:29 | reversem3 | ok thanks |
22:03:16 | * | reversem3 < https://matrix.org/_matrix/media/r0/download/matrix.org/owhcqyiAtKwwOOUMIpDBEkgX/message.txt > |
22:03:33 | reversem3 | there we go |
22:03:33 | FromDiscord | <Yardanico> yes |
22:03:49 | FromDiscord | <Yardanico> also you can just iterate over seq elements :) |
22:04:02 | FromDiscord | <Yardanico> for elem in list: stdout.write($elem & " ") |
22:04:08 | reversem3 | that is true |
22:05:47 | FromDiscord | <Nisha's alt> Wait in Nimscripter would i also need to import my custom stdlib modules or no? Preferably not |
22:06:05 | FromDiscord | <ElegantBeef> You can import them automatically |
22:06:28 | FromDiscord | <ElegantBeef> when you create the interpreter there is an optional `modules` variable |
22:07:12 | FromDiscord | <ElegantBeef> so if you do `"strutils"` the file will import strutils |
22:07:31 | FromDiscord | <ElegantBeef> Also good to hear pmunch |
22:10:12 | FromDiscord | <Nisha's alt> Ah alright, nice! |
22:11:05 | FromDiscord | <ElegantBeef> Worth noting pmunch i believe all the example but tinyusb work, but dont know if if they truly do |
22:12:23 | FromDiscord | <ElegantBeef> I'm only one numpty with limited knowledge in micro controllers i can only certify so much π |
22:17:13 | FromDiscord | <Nisha's alt> ~~I can make my own fork of Nimscripter right?~~ |
22:17:32 | FromDiscord | <ElegantBeef> It's MIT licensed, and the button is right there |
22:17:43 | FromDiscord | <Yardanico> In reply to @Charlotte|π»β "~~I can make my": no, you must sell your soul first |
22:17:44 | FromDiscord | <ElegantBeef> Why do you need a fork though |
22:17:48 | FromDiscord | <Nisha's alt> Lmao |
22:17:57 | FromDiscord | <Yardanico> and don't forget the eternal damnation in hell |
22:18:04 | FromDiscord | <Nisha's alt> In reply to @ElegantBeef "Why do you need": Adding Python support to it by default |
22:18:09 | FromDiscord | <Nisha's alt> In reply to @Yardanico "and don't forget the": XD |
22:18:13 | FromDiscord | <ElegantBeef> Ah yea not supporting that π |
22:18:20 | FromDiscord | <Nisha's alt> Yeah exactly xD |
22:18:25 | FromDiscord | <Yardanico> i'm curious how far technisha will get with that idea :) |
22:18:47 | FromDiscord | <ElegantBeef> Yea it's fairly macro heavy and i did finally learn i can use macro cache so probably will change a bit |
22:19:01 | FromDiscord | <Nisha's alt> I'm doing that for if someone wants low level access |
22:19:09 | FromDiscord | <Nisha's alt> But meh it's not that important |
22:19:15 | FromDiscord | <Nisha's alt> Mmm maybe I'll make a fork |
22:19:21 | FromDiscord | <Nisha's alt> Probably not |
22:19:37 | FromDiscord | <Nisha's alt> I'll just write a crappy wrapper for it- |
22:19:37 | FromDiscord | <ElegantBeef> Didnt realize that symbols stored in a macrocache are still looked up on unpacking so you can call procedures across modules π |
22:21:28 | FromDiscord | <ElegantBeef> With that knowledge i think i can clean it up quite a bit |
22:21:42 | FromDiscord | <Nisha's alt> Go ahead- |
22:21:49 | FromDiscord | <Nisha's alt> ~~It'll help me more~~ |
22:21:52 | FromDiscord | <ElegantBeef> Didnt realize i needed permission |
22:22:07 | FromDiscord | <Nisha's alt> ? |
22:22:16 | FromDiscord | <ElegantBeef> You said "go ahead" |
22:22:18 | FromDiscord | <Yardanico> we do a little trolling |
22:23:15 | FromDiscord | <Nisha's alt> I meant as in no-one's stopping you :p |
22:23:33 | FromDiscord | <jtiai> sent a code paste, see https://play.nim-lang.org/#ix=2VEn |
22:23:47 | FromDiscord | <Yardanico> need more code |
22:24:01 | FromDiscord | <Yardanico> can you show how you call it? |
22:24:03 | FromDiscord | <ElegantBeef> issue is you're passing a ref to a var cpu procedure |
22:24:14 | FromDiscord | <ElegantBeef> ref != var |
22:24:33 | FromDiscord | <jtiai> `cpu.fillMem(0, @[0x3E'u8, 0x2A])` like this. |
22:24:39 | FromDiscord | <ElegantBeef> cpu in this case is a reference |
22:24:47 | FromDiscord | <ElegantBeef> Consider not making a reference or changing the procedure type |
22:25:10 | FromDiscord | <ElegantBeef> are you using `new Cpu` to initalize it, purposely? |
22:25:16 | FromDiscord | <jtiai> Yes. |
22:25:24 | FromDiscord | <ElegantBeef> You want a reference cpu then? |
22:25:36 | FromDiscord | <jtiai> `cpu.reset()` funny that this works just fine... |
22:25:45 | FromDiscord | <ElegantBeef> It shouldnt |
22:25:50 | FromDiscord | <jtiai> But it does. |
22:26:15 | FromDiscord | <ElegantBeef> !eval echo ref int is int |
22:26:19 | NimBot | Compile failed: /usercode/in.nim(1, 6) Error: attempting to call routine: 'ref' |
22:26:28 | FromDiscord | <ElegantBeef> lol |
22:26:33 | FromDiscord | <ElegantBeef> I never do code right |
22:26:38 | FromDiscord | <Nisha's alt> Mood |
22:26:54 | FromDiscord | <Yardanico> In reply to @jtiai "`cpu.reset()` funny that this": if your Cpu is already a ref you don't need "var" argument type modifier |
22:26:59 | FromDiscord | <Yardanico> since refs are mutable already |
22:27:11 | FromDiscord | <jtiai> But it's not ref... |
22:27:16 | FromDiscord | <ElegantBeef> you used new on it |
22:27:17 | FromDiscord | <jtiai> or does something magically makes it ref? |
22:27:17 | FromDiscord | <Yardanico> but it is a ref as the compiler said |
22:27:19 | FromDiscord | <ElegantBeef> new makes a ref |
22:27:26 | FromDiscord | <Yardanico> `new Type` makes a `ref Type` |
22:27:26 | FromDiscord | <ElegantBeef> if you want a zeroed object do `Cpu()` |
22:27:39 | FromDiscord | <ElegantBeef> or it instantiates a ref type of T is a ref |
22:28:03 | FromDiscord | <ElegantBeef> `new` in nim land means `heap allocated` |
22:28:24 | FromDiscord | <ElegantBeef> `init` means stack allocated |
22:28:42 | FromDiscord | <ElegantBeef> Though tables are odd in that they're `init` which i suppose they're root object isnt heap allocated |
22:29:21 | FromDiscord | <ElegantBeef> also objects are default 0 innited so `var cpu: Cpu` is the same as `var cpu = Cpu()` |
22:29:56 | FromDiscord | <Yardanico> also, @jtiai , doing "argument: var Type" in proc argument list when "Type" is a ref will mean double pointer indirection |
22:30:30 | FromDiscord | <ElegantBeef> The only time you need `var ref T` is when you want to reassign the reference or are using strict functions |
22:31:00 | FromDiscord | <jtiai> Well just getting hang of this. Probably my 5th partial day with nim... |
22:31:01 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/830570588790587443/unknown.png |
22:31:14 | FromDiscord | <Yardanico> sent a code paste, see https://paste.rs/Vck |
22:31:30 | FromDiscord | <ElegantBeef> Yea it's fine we're just teaching you how it works π |
22:32:02 | FromDiscord | <Yardanico> i wonder if it would be hard for the compiler to emit a performance hint/warning if it sees a ref being passed as "var Type" in the proc argument list |
22:32:06 | FromDiscord | <ElegantBeef> in the above example you can also do `x = nil` which would reassign it |
22:32:08 | FromDiscord | <jtiai> And unit test failed.... |
22:32:24 | FromDiscord | <Yardanico> In reply to @jtiai "And unit test failed....": don't forget that stack-allocated objects are copied :) |
22:32:34 | FromDiscord | <ElegantBeef> In reply to @Yardanico "i wonder if it": Well aslong as strict functions is not on |
22:32:39 | FromDiscord | <Yardanico> (unless they're big enough, but that's internal details) |
22:32:45 | FromDiscord | <Yardanico> In reply to @ElegantBeef "Well aslong as strict": they don't affect normal preocs |
22:32:46 | FromDiscord | <Yardanico> (edit) "preocs" => "procs" |
22:32:52 | * | vicfred joined #nim |
22:32:55 | FromDiscord | <jtiai> stack allocated are passed by value? |
22:33:03 | FromDiscord | <ElegantBeef> Well yea they're value types |
22:33:06 | FromDiscord | <Yardanico> yes, unless they're bigger than 24 bytes, then they're passed by a reference |
22:33:09 | FromDiscord | <Yardanico> but that's an internal detail |
22:33:27 | FromDiscord | <jtiai> Then I probably want refs after all. |
22:33:30 | FromDiscord | <ElegantBeef> Nah |
22:33:40 | FromDiscord | <ElegantBeef> Most likely you dont need refs |
22:33:43 | FromDiscord | <Yardanico> In reply to @jtiai "Then I probably want": you really only need refs if you need shared ownership |
22:33:52 | FromDiscord | <Yardanico> but refs make it a bit easier to write code, that is true |
22:34:05 | FromDiscord | <Yardanico> since you don't need to care to insert the "var T" annotations in proc arguments where you mutate it |
22:40:13 | FromGitter | <ynfle> What's the difference between `%%` and `mod` for modulus? |
22:44:19 | FromDiscord | <jtiai> sent a code paste, see https://paste.rs/PAj |
22:45:44 | FromDiscord | <ElegantBeef> well you can do `cpu.Pc += 2` |
22:45:54 | FromDiscord | <ElegantBeef> or you could also do `cpu.incPc(2)` |
22:46:48 | FromDiscord | <jtiai> Gets a bit tedious for 20 registers... π |
22:47:12 | FromDiscord | <ElegantBeef> Well i'm uncertain the entire use case so dont know what's desired |
22:47:23 | FromDiscord | <jtiai> cpu emulation. what else? |
22:47:32 | FromDiscord | <ElegantBeef> I mean the actual programming use case |
22:47:44 | FromDiscord | <ElegantBeef> Like i dont know what design you're after |
22:48:45 | FromDiscord | <jtiai> so that I could drop out those parenthesis from registers when using them in the code. |
22:49:06 | FromDiscord | <jtiai> so `cpu.PC()` -> `cpu.PC` |
22:49:18 | FromDiscord | <jtiai> and same for all the registers. |
22:49:50 | FromDiscord | <ElegantBeef> you can already |
22:50:03 | FromDiscord | <ElegantBeef> in nim you dont need `()` for any single argument procedure |
22:50:29 | FromDiscord | <Yardanico> In reply to @ElegantBeef "in nim you dont": he's using the template on lhs side though |
22:50:35 | FromDiscord | <jtiai> `Error: attempting to call undeclared routine: 'PC='` |
22:50:44 | FromDiscord | <ElegantBeef> ah |
22:50:44 | FromDiscord | <jtiai> Didn't end up that well. |
22:50:46 | FromDiscord | <Yardanico> you can define PC= :P |
22:51:19 | FromDiscord | <jtiai> and rest of ~20? more or less automated. |
22:51:33 | FromDiscord | <Yardanico> it's a single line template anyway |
22:51:36 | FromDiscord | <ElegantBeef> Remove them and write a macro to generate them π |
22:51:45 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2VEw |
22:51:48 | FromDiscord | <Yardanico> but this is for assignment only |
22:51:55 | FromDiscord | <Yardanico> for getters you should keep your current pc |
22:52:25 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2VEx |
22:52:41 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
22:56:35 | * | tane quit (Quit: Leaving) |
23:01:28 | * | Gustavo6046 joined #nim |
23:03:31 | FromDiscord | <jtiai> Hmmph. Have to think about this... |
23:03:43 | FromDiscord | <Yardanico> lol @ElegantBeef it works and was very easy to do |
23:03:45 | FromDiscord | <Yardanico> just for fun |
23:03:59 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/830578886265667614/unknown.png |
23:04:08 | FromDiscord | <Yardanico> semtypes.nim https://media.discordapp.net/attachments/371759389889003532/830578922940137492/unknown.png |
23:04:13 | FromDiscord | <ElegantBeef> Lol |
23:04:14 | FromDiscord | <ElegantBeef> Nice |
23:05:00 | FromDiscord | <ElegantBeef> !remindme add the explict "A mismatch is due to reference passed in as `var`" and "A mismatch is due to a immutable passed in as `var`" π |
23:05:08 | FromDiscord | <Yardanico> when the compiler is sus https://media.discordapp.net/attachments/371759389889003532/830579175269203998/unknown.png |
23:05:15 | FromDiscord | <Yardanico> (trying this on the compiler itself) |
23:05:32 | FromDiscord | <ElegantBeef> Certainly need a config option |
23:05:55 | FromDiscord | <Yardanico> i mean in most cases in the compiler the "var" is used when it's reassigned |
23:06:06 | FromDiscord | <Yardanico> and checking that a variable is reassigned is much harder than what I did :P |
23:06:12 | FromDiscord | <ElegantBeef> Yea i know |
23:06:47 | FromDiscord | <ElegantBeef> I was just thinking about when i was playing without colourful output and seeing how easy it was to have a single line dedicated to "Your sending an immutable to a mutable procedure" |
23:06:54 | FromDiscord | <ElegantBeef> (edit) "without" => "with" |
23:06:55 | FromDiscord | <Yardanico> hm, found one proc where it's not needed |
23:07:07 | FromDiscord | <Yardanico> or am I missing something obvious here https://media.discordapp.net/attachments/371759389889003532/830579678573887528/unknown.png |
23:07:20 | FromDiscord | <Yardanico> DepN is a ref object |
23:09:12 | FromDiscord | <Yardanico> but yeah, actually analysing if it was reassigned in the proc is much harder and would require using varpartitions I guess :P |
23:09:20 | FromDiscord | <Yardanico> or dfa or something like that (changing them) |
23:09:21 | FromDiscord | <ElegantBeef> God damnit i just got hit with `for i in 4..1` not working π |
23:09:53 | FromDiscord | <clyybber> @Yardanico With the current strict funcs you are encouraged to do `var someRef` so I think it's better if the compiler optimizes the double indirection away if no reassign is happening |
23:10:00 | FromDiscord | <Yardanico> yeah that's true |
23:18:40 | FromDiscord | <Nisha's alt> I wonder if there's a benefit to implementing Nimscript in Java- |
23:18:52 | FromDiscord | <Nisha's alt> :) |
23:19:07 | PMunch | Now you're just going too far... |
23:19:33 | FromDiscord | <Yardanico> In reply to @Charlotte|π»β "I wonder if there's": just reimplement nim in python at this point |
23:20:16 | FromDiscord | <clyybber> In reply to @Charlotte|π»β "I wonder if there's": lol |
23:20:26 | FromDiscord | <Nisha's alt> Lmaoooo |
23:21:05 | FromDiscord | <ElegantBeef> Hey it already has performance issues, lets implement it in a language that cannot have cache efficiency |
23:22:01 | FromDiscord | <Nisha's alt> XDDD |
23:22:10 | FromDiscord | <Nisha's alt> It's better then Python though- |
23:22:19 | FromDiscord | <Nisha's alt> Python is way slower then Java- |
23:23:23 | PMunch | Damn it, there was an Aprils fool on that a while back |
23:23:28 | PMunch | But now I can't find it.. |
23:23:35 | FromDiscord | <Technisha> Really? |
23:23:39 | FromDiscord | <Technisha> What was it?- |
23:23:48 | FromDiscord | <Yardanico> - |
23:24:10 | PMunch | That Nim would be reimplemented in Python |
23:24:21 | FromDiscord | <Yardanico> ah yes |
23:25:03 | FromDiscord | <Nisha's alt> Lmaooooo |
23:26:41 | FromDiscord | <Yardanico> @PMunch https://forum.nim-lang.org/t/6136 |
23:29:02 | PMunch | Ah yes! |
23:29:11 | PMunch | How did you find that? :P |
23:29:19 | FromDiscord | <Yardanico> checked araq's threads |
23:29:20 | PMunch | Have you got it bookmarked or something? |
23:29:22 | PMunch | Aah |
23:29:23 | FromDiscord | <Yardanico> he rarely creates threads on the forum |
23:29:37 | FromDiscord | <Yardanico> so it's the 5th in 10 of his last threads |
23:31:11 | PMunch | Makes sense |
23:34:04 | PMunch | Guess I could've found it like this as well: https://irclogs.nim-lang.org/01-04-2020.html#11:53:04 |
23:35:03 | * | NimBot joined #nim |
23:35:55 | * | fredrikhr quit (Remote host closed the connection) |
23:36:22 | * | fredrikhr joined #nim |
23:37:51 | PMunch | Hmm, https://github.com/nim-lang/Nim/pull/13757#issuecomment-603998025 Zig uses Clang to analyse .h files for wrapper free interop. Have anyone looked into doing this for Nim? |
23:38:35 | FromDiscord | <ElegantBeef> Someone was working on clang analysis for bindings, think it was haxscramper |
23:38:37 | FromDiscord | <Nisha's alt> Oh? |
23:38:50 | FromDiscord | <Nisha's alt> Zig in Nim? What's the advantage? |
23:39:04 | FromDiscord | <Gary M> No, not using Zig with Nim |
23:39:26 | PMunch | Ugh, I should go to bed.. |
23:39:27 | FromDiscord | <Gary M> Although the zig compiler can be used I think |
23:39:38 | FromDiscord | <Gary M> Which is more or less the clang compiler with caching |
23:39:40 | PMunch | I think I'll do some more keyboard development tomorrow by the way |
23:40:08 | PMunch | Reimplementing the USB stuff in Nim, and improving the progmem stuff is the plan |
23:40:18 | * | PMunch quit (Quit: leaving) |
23:40:27 | FromDiscord | <Yardanico> In reply to @Gary M "Although the zig compiler": it has no LLVM interface based on itself |
23:40:56 | FromDiscord | <Gary M> Hm? |
23:40:57 | FromDiscord | <Yardanico> so haxscramper's work is not really related to Zig |
23:40:58 | * | fredrikhr quit (Ping timeout: 240 seconds) |
23:41:03 | FromDiscord | <Yardanico> it's related to clang/LLVM directly |
23:41:17 | FromDiscord | <Gary M> Yeah, I'm not saying hax's stuff is zig related |
23:41:25 | FromDiscord | <Gary M> It was in response to Nisha |
23:41:36 | FromDiscord | <Gary M> In reply to @Charlotte|π»β "Zig in Nim? What's": This in particular |
23:41:56 | FromDiscord | <Yardanico> not sure why technisha thought of zig in this case π€ |
23:42:15 | FromDiscord | <ElegantBeef> Pmunch's references |
23:42:33 | FromDiscord | <Gary M> Because Zig was mentioned with how they use clang for wrapper free ffi |
23:42:35 | FromDiscord | <Nisha's alt> I mean the Zig compiler in Nim :p |
23:42:48 | FromDiscord | <Yardanico> again, how is that mentioned to clang and nim π€ |
23:42:58 | FromDiscord | <Nisha's alt> In reply to @PMunch "Hmm, https://github.com/nim-lang/Nim/pull/13757#iss": ^^^^ |
23:43:06 | FromDiscord | <Gary M> In reply to @Charlotte|π»β "I mean the Zig": Then yeah afaik the only real benefit is the caching and maybe the ability to switch the stdlib... I think. |
23:43:16 | FromDiscord | <Gary M> I haven't used zig so I can't say with confidence |
23:43:17 | FromDiscord | <Yardanico> In reply to @Gary M "Then yeah afaik the": wdym "stdlib"? |
23:43:20 | FromDiscord | <Nisha's alt> Switch the stdlib, wdym? |
23:43:31 | FromDiscord | <Yardanico> the only benefit is just somewhat easier cross-compilation |
23:43:33 | FromDiscord | <Yardanico> nothing else really |
23:44:10 | FromDiscord | <Gary M> Stdlib is probably the wrong term |
23:44:27 | FromDiscord | <Yardanico> you mean libc? |
23:44:32 | FromDiscord | <Gary M> What I meant is you can force it to target musl or glibc |
23:44:35 | FromDiscord | <Yardanico> yes, that's libc |
23:44:38 | FromDiscord | <Yardanico> that's kind of a part of cross-compilation |
23:44:55 | FromDiscord | <Gary M> Whatever the case is π |
23:45:19 | FromDiscord | <Gary M> It has artifact caching built in. |
23:46:07 | FromDiscord | <Gary M> I don't know if that would really have any noticable improvements to build speed unless it was a large project |
23:46:21 | FromDiscord | <Gary M> And then, I'm not sure how much of that would be taken by Nim itself without IC |
23:47:07 | FromDiscord | <Nisha's alt> Hm, does Nim support it rn? If so then I'll try it :p |
23:47:33 | FromDiscord | <Yardanico> "zig cc" just acts as a C compiler |
23:47:40 | FromDiscord | <Yardanico> with a clang cli |
23:47:51 | FromDiscord | <Gary M> Yeah so change to clang and redirect to zig cc |
23:47:55 | FromDiscord | <Gary M> Or whatever |
23:48:01 | FromDiscord | <Gary M> Again, not something I'm familiar with |
23:48:03 | FromDiscord | <Nisha's alt> I'll compile Nim with zig's compiler, then with clang, and then compile Nim with each respectively- |
23:48:11 | FromDiscord | <Nisha's alt> Wait |
23:48:11 | FromDiscord | <Yardanico> what? |
23:48:22 | FromDiscord | <Nisha's alt> Idk I'm confusing myself lmaooo |
23:48:26 | FromDiscord | <Yardanico> "zig cc" is literally clang with cross-compilation and caching added on top |
23:48:29 | FromDiscord | <Yardanico> it's not some new C compiler |
23:48:35 | FromDiscord | <Gary M> That's the point yard |
23:48:44 | FromDiscord | <Yardanico> @Gary M I'm trying to let nisha understand |
23:48:50 | FromDiscord | <Gary M> Benchmarking the incremental build time of caching |
23:48:52 | FromDiscord | <Gary M> But |
23:48:54 | FromDiscord | <Nisha's alt> Yeah |
23:48:57 | FromDiscord | <Gary M> my point is that |
23:49:08 | FromDiscord | <Gary M> You aren't going to see a difference in a small project. |
23:49:26 | FromDiscord | <Nisha's alt> Mhm |
23:49:30 | FromDiscord | <Gary M> So benchmarking probably won't yield any valuable results. |
23:49:50 | FromDiscord | <Nisha's alt> I'd compile it multiple times to actually see the caching work |
23:50:01 | FromDiscord | <Nisha's alt> Since I'm just dumb like that π |
23:50:17 | FromDiscord | <Gary M> I'm dumb like that too just ask @ElegantBeef |
23:50:31 | FromDiscord | <Nisha's alt> Lmao really?- |
23:50:42 | FromDiscord | <Gary M> I like benchmarking just for the fun of it |
23:50:49 | FromDiscord | <Nisha's alt> Lmao |
23:50:54 | FromDiscord | <ElegantBeef> Why ask me? |
23:50:59 | FromDiscord | <Gary M> But now I'm doing something that validates my atrocious addiction |
23:51:11 | FromDiscord | <Nisha's alt> I do stupid shit ALL the time, no-one can compare to me >:3 |
23:51:13 | FromDiscord | <Gary M> Because I have annoyed you with my benchmarking shit :P |
23:51:18 | FromDiscord | <Gary M> And other stupid shit I do |
23:57:43 | FromDiscord | <Nisha's alt> Mood |