00:15:35 | FromDiscord | <anuke> `.nims` configuration files show spurious errors when opened with the official VSCode extension. This seems to happen with every Nim VSC extension, and across various configuration options. Is this a known issue? How do I fix this? https://media.discordapp.net/attachments/371759389889003532/1297352478689595403/Screenshot_from_2024-10-19_20-11-14.png?ex=67159d26&is=67144ba6&hm=53c59f0d6aec51e008a89dacb1fc703a6b03dcced7e5d0c3b5d7217c46a8412c& |
00:21:49 | FromDiscord | <anuke> <https://github.com/nim-lang/vscode-nim/issues/74#issue-2417720314> suggests that other people have experienced it as well, but it seems like too obvious of a problem for it to have only a single issue... |
00:35:56 | FromDiscord | <Robyn [She/Her]> In reply to @anuke "`.nims` configuration files show": at the top, you can do `when nimvm: import system/nimscript` |
00:36:03 | FromDiscord | <Robyn [She/Her]> bit of a hack but if it works, it works |
00:44:10 | FromDiscord | <anuke> sadly it does not https://media.discordapp.net/attachments/371759389889003532/1297359671580950558/image.png?ex=6715a3d9&is=67145259&hm=747929d8ede38e6c7615df8da510c7951b69d3f947da98197157b66f356b83dd& |
00:44:20 | FromDiscord | <anuke> importing it twice seems to lead to other errors |
00:44:38 | FromDiscord | <anuke> (it's not a spurious error this time, compilation fails as well) |
01:01:52 | FromDiscord | <Robyn [She/Her]> ah, sorry then |
01:05:39 | FromDiscord | <janakali> @anuke https://discord.com/channels/371759389889003530/753721959308853319/1295809631964233891 |
01:06:49 | FromDiscord | <janakali> sent a code paste, see https://play.nim-lang.org/#pasty=rtCkfyRs |
01:29:37 | FromDiscord | <anuke> that works, thanks |
01:48:35 | FromDiscord | <emanresu3> sent a code paste, see https://play.nim-lang.org/#pasty=hjOeNjIf |
01:51:08 | FromDiscord | <Elegantbeef> It's a bug |
01:59:34 | FromDiscord | <emanresu3> a bug in nim? is it already reported? |
01:59:40 | FromDiscord | <Elegantbeef> No clue |
01:59:46 | FromDiscord | <Elegantbeef> It's' a bug in Nim yes |
02:00:08 | FromDiscord | <Elegantbeef> `var T` where `T is ref` is causing an implicit dereference in Nim which is why it says `myclass:ObjectType` |
02:01:20 | FromDiscord | <emanresu3> I see, thanks beef, I'll use different field names for now then |
02:12:32 | * | rockcavera quit (Remote host closed the connection) |
02:44:03 | * | SchweinDeBurg quit (Quit: WeeChat 4.5.0-dev) |
03:08:23 | * | SchweinDeBurg joined #nim |
03:28:52 | FromDiscord | <ollicron_53732> Guys how do I install the internet Verizon gave me a CD but it doesn't work. |
04:30:41 | * | rockcavera joined #nim |
04:54:04 | * | cm_ joined #nim |
04:54:44 | * | cm quit (Ping timeout: 260 seconds) |
04:54:44 | * | cm_ is now known as cm |
07:01:41 | Amun-Ra | is that CD contain something required for connecting to verizon? |
07:07:45 | FromDiscord | <spaceshaman> What does it take to make nim build your whole website from dom to styles to behavior? |
07:11:25 | FromDiscord | <spaceshaman> I could see such a... 'model' being designed like a target type a-la library vs executable (in this case vs gui application) |
07:18:33 | FromDiscord | <spaceshaman> I guess some of the api needs of a web model aren't translatable to a gui app. Like the difference between a hyperlink that creates a new tab and one that recycles the current tab. |
07:20:34 | FromDiscord | <spaceshaman> So a gui app target is probably inadequate for a fully featured website target, though you would still want it to work as a js backend. |
08:00:49 | * | ntat joined #nim |
08:12:26 | * | marcus quit (Remote host closed the connection) |
08:13:54 | * | coldfeet joined #nim |
08:14:16 | * | marcus joined #nim |
09:23:27 | FromDiscord | <xtrayambak> In reply to @emanresu3 "any idea why this": I'm pretty sure you don't need the `var` suffix when dealing with ref'd objects |
09:33:13 | FromDiscord | <nocturn9x> uhh |
09:33:16 | FromDiscord | <nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=ucQmYFjw |
09:33:27 | FromDiscord | <nocturn9x> does anyone know why this would happen when using channels from `std/os`? |
09:34:09 | FromDiscord | <nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=bPChoKjd |
09:34:11 | FromDiscord | <xtrayambak> sent a code paste, see https://play.nim-lang.org/#pasty=MtmCZMbE |
09:34:14 | FromDiscord | <nocturn9x> yeah :'D |
09:34:27 | FromDiscord | <xtrayambak> sent a code paste, see https://play.nim-lang.org/#pasty=xKrNXpjH |
09:34:34 | FromDiscord | <nocturn9x> yeah I think so as well |
09:34:43 | FromDiscord | <xtrayambak> refs never play well with C structs |
09:35:07 | FromDiscord | <nocturn9x> I'll try var |
09:35:10 | FromDiscord | <xtrayambak> also, you should check out [weave](https://github.com/mratsim/weave) if you don't want to deal with the hassle of threading |
09:35:15 | FromDiscord | <xtrayambak> (edit) "threading" => "threads" |
09:36:14 | FromDiscord | <nocturn9x> all libraries I've tried to use either suck or fail to do some transformation to my code |
09:36:19 | FromDiscord | <nocturn9x> so I'll stick with raw channels lol |
09:38:49 | FromDiscord | <xtrayambak> refs are an absolute pain in the arse for me, I'm so glad that I can ditch them entirely now :) |
09:39:03 | FromDiscord | <xtrayambak> they have a tiiiiny bit more boilerplate, but it's absolutely worth it |
09:43:51 | FromDiscord | <fabric.input_output> I usually make my own `Arc[T]` and `Box[T]` types |
09:56:14 | FromDiscord | <nocturn9x> I just realized that channels do deep copies |
09:56:17 | FromDiscord | <nocturn9x> I need references :| |
11:01:06 | * | ryuukk_ quit (Remote host closed the connection) |
11:05:19 | * | ryuukk joined #nim |
11:15:43 | * | ryuukk quit (Ping timeout: 252 seconds) |
11:16:12 | * | ryuukk joined #nim |
12:02:19 | FromDiscord | <Robyn [She/Her]> In reply to @nocturn9x "I need references :|": use references and always use `sink`? |
12:02:42 | FromDiscord | <nocturn9x> hmm |
12:17:54 | * | coldfeet quit (Remote host closed the connection) |
12:20:41 | * | xutaxkamay quit (Read error: Connection reset by peer) |
12:21:08 | * | xutaxkamay joined #nim |
13:40:22 | * | ryuukk quit (Ping timeout: 252 seconds) |
13:40:54 | * | ryuukk joined #nim |
13:41:49 | * | coldfeet joined #nim |
14:08:36 | * | ryuukk quit (Remote host closed the connection) |
14:11:34 | * | ryuukk joined #nim |
14:50:50 | FromDiscord | <myxi> go vs nim benchmarks↵<https://programming-language-benchmarks.vercel.app/nim-vs-go>↵what do you guys think, are the benchmarks good? |
15:05:23 | * | cnx quit (Ping timeout: 265 seconds) |
15:06:00 | * | cnx joined #nim |
16:07:04 | FromDiscord | <frusadev> Hi there!↵Is there a way to have absolute imports in nim? Instead of relative import? |
16:07:15 | FromDiscord | <frusadev> I'm using nimble btw |
16:15:40 | FromDiscord | <frusadev> sent a code paste, see https://play.nim-lang.org/#pasty=EzhuTfvk |
16:21:08 | FromDiscord | <frusadev> I think it makes code more readable that using relative paths |
16:21:18 | FromDiscord | <frusadev> (edit) "that using" => "thanusing" |
16:21:27 | FromDiscord | <frusadev> (edit) "thanusing" => "than using" |
16:22:12 | FromDiscord | <ieltan> In reply to @myxi "go vs nim benchmarks": Meaningless benchmark says nothing about which language is suited for your usecases. Nim is great all around while Go is definitely much better when you need concurrency |
16:26:53 | FromDiscord | <janakali> In reply to @frusadev "Hi there! Is there": add `--path:'.'` to `config.nims` in your project's root directory and now you can use absolute paths like this `import src/pkgexample/file1` |
16:27:29 | FromDiscord | <frusadev> In reply to @janakali "add `--path:'.'` to `config.nims`": Thx! |
16:28:35 | FromDiscord | <frusadev> Even if i'm using nimble? |
16:31:07 | FromDiscord | <janakali> nimble makes use of config.nims file too |
16:32:09 | FromDiscord | <janakali> @frusadev sorry, correct syntax is with double quotes: `--path:"."` |
16:35:50 | strogon14 | or use e.g. 'switch("path", "$projectDir/../src")' |
16:38:46 | FromDiscord | <frusadev> In reply to @strogon14 "or use e.g. 'switch("path",": 🤔 this syntax even seems to work with nimls! i assume --path would only work with the compiler. |
16:38:51 | FromDiscord | <frusadev> Thanks! |
16:39:34 | strogon14 | -- is just a template for "switch" defined for NimScript |
16:40:08 | FromDiscord | <nasuray> For reference: https://nim-lang.org/docs/nimscript.html#--.t%2Cuntyped%2Cuntyped |
16:57:44 | FromDiscord | <j_crypto0498> sent a long message, see https://pasty.ee/bzdlQWnl |
16:58:01 | * | zgasma quit (Quit: Lost terminal) |
18:33:42 | * | coldfeet quit (Remote host closed the connection) |
18:56:32 | * | ntat quit (Quit: Leaving) |
19:10:10 | * | FergusL joined #nim |
19:12:49 | FergusL | Hello there, complete beginner with nim, I'm just trying to build the latest git version of this app: https://github.com/Patitotective/ImThemes and I get ".../lib/pure/sugar.nim(327, 29) Error: cannot open file: config.toml" it's this line: https://github.com/nim-lang/Nim/blob/devel/lib/pure/sugar.nim#L326 |
19:21:50 | FergusL | oops, installing nim with my package manager instead of choosenim somehow fixed this, sorry for the noise! |
19:21:52 | * | lumidify quit (Quit: leaving) |
19:24:17 | Amun-Ra | every ontopic noise counts :) |
19:32:54 | * | lumidify joined #nim |
20:05:52 | FromDiscord | <odexine> What are we counting |
20:22:22 | FromDiscord | <Elegantbeef> All real numbers |
20:27:06 | FromDiscord | <nervecenter> In reply to @myxi "go vs nim benchmarks": Tends to be the case that Nim is faster in most cases than Go, except with concurrency like people have said. Go's GC also doesnt handle a lot of pressure very well and I'm pretty sure Nim's RC variants are all leaner and faster. |
20:28:20 | FromDiscord | <Elegantbeef> Not to mention that the vercel benchmarks are a joke |
20:29:51 | FromDiscord | <Elegantbeef> https://github.com/hanabi1224/Programming-Language-Benchmarks/blob/main/bench/algorithm/spectral-norm/1.nim vs. https://github.com/hanabi1224/Programming-Language-Benchmarks/blob/main/bench/algorithm/spectral-norm/8-m.rs |
20:30:01 | FromDiscord | <Elegantbeef> Notice one of these uses `simd`, but that surely does not matter 😄 |
20:31:55 | FromDiscord | <nervecenter> Yeah I was gonna say the Rust one is using an auto-parallelism library along with SIMD |
20:32:00 | FromDiscord | <nervecenter> Nim one is just using sstdlib lel |
20:32:08 | FromDiscord | <nervecenter> (edit) "sstdlib" => "stdlib" |
20:32:14 | FromDiscord | <Elegantbeef> If the implementations are not the same, I hardly see the point |
20:34:34 | FromDiscord | <Elegantbeef> Yea it's like racing horse that was given a bunch of stimulants vs. a non domesticated horse |
20:34:38 | FromDiscord | <nervecenter> Would the equivalent functionality here all be in Arraymancer? |
20:35:41 | FromDiscord | <Elegantbeef> For the example I gave? |
20:35:55 | FromDiscord | <Elegantbeef> Using simd ops is all it takes for what I gave |
20:37:56 | FromDiscord | <nervecenter> No experience on that front so I'm clueless as to what that means. Maybe I should start digging into it, the product I make could probably benefit. |
20:38:12 | FromDiscord | <nervecenter> (edit) "means." => "means on a practical level." |
20:39:01 | FromDiscord | <nervecenter> Though my gnarliest worst-case scenario takes less than a real-world minute to run server-side. |
20:39:18 | FromDiscord | <Elegantbeef> Simd uses larger registers and uses a single cycle to do multiple operations on data at once |
20:39:24 | FromDiscord | <Elegantbeef> It's like a hardware supported multithreaded operation for a single operation type |
20:40:12 | FromDiscord | <Elegantbeef> Like you have 256bit registers and can do addition for 8 float32s at once |
20:40:37 | FromDiscord | <Elegantbeef> In many cases you can save cycles if you load all your data in a big buffer and do a single operation at once |
20:40:40 | FromDiscord | <nervecenter> I know those basics, and that the x86 instructions all have `mm` labels or some such, but trying to read SIMD code gives me a headache. |
20:41:12 | FromDiscord | <Elegantbeef> Hell you can simd string find if you really wanted to to make it faster 😄 |
20:41:24 | FromDiscord | <Elegantbeef> Eh the operations are fairly simple so it's not too hard if you just refer to the documentation |
20:41:25 | FromDiscord | <nervecenter> Oh crap I did not know that |
20:42:01 | FromDiscord | <Elegantbeef> See which operations are used then think about it on a atomic level |
20:42:30 | FromDiscord | <Elegantbeef> by atomic I mean per each element in the buffer |
20:43:33 | FromDiscord | <Elegantbeef> https://github.com/ashvardanian/Stringzilla reference if you care |
21:04:09 | * | FergusL left #nim (The Lounge - https://thelounge.chat) |
22:03:08 | * | beholders_eye joined #nim |
22:53:03 | * | beholders_eye quit (Ping timeout: 244 seconds) |
22:55:05 | * | beholders_eye joined #nim |