<< 01-10-2024 >>

00:00:10*albe quit (Quit: The Lounge - https://thelounge.chat)
00:01:09*beholders_eye quit (Read error: Connection reset by peer)
00:03:17*albe joined #nim
00:07:18*beholders_eye joined #nim
00:08:43*beholders_eye quit (Read error: Connection reset by peer)
00:14:37*beholders_eye joined #nim
00:15:07*beholders_eye quit (Read error: Connection reset by peer)
00:20:57*beholders_eye joined #nim
01:36:57*beholders_eye quit (Read error: Connection reset by peer)
01:42:22*beholders_eye joined #nim
01:58:14*beholders_eye quit (Read error: Connection reset by peer)
01:58:45*beholders_eye joined #nim
02:22:13*beholders_eye quit (Read error: Connection reset by peer)
02:28:08*beholders_eye joined #nim
03:10:41*beholders_eye quit (Read error: Connection reset by peer)
03:16:28*beholders_eye joined #nim
03:19:21*beholders_eye quit (Read error: Connection reset by peer)
03:24:52*beholders_eye joined #nim
03:25:35*beholders_eye quit (Read error: Connection reset by peer)
03:31:11*beholders_eye joined #nim
04:51:20*beholders_eye quit (Read error: Connection reset by peer)
04:55:22*ntat joined #nim
04:57:31*beholders_eye joined #nim
05:42:42*SchweinDeBurg quit (Quit: WeeChat 4.5.0-dev)
05:44:10*SchweinDeBurg joined #nim
06:34:04*PMunch joined #nim
06:58:05*beholders_eye quit (Read error: Connection reset by peer)
07:03:52*beholders_eye joined #nim
07:18:39*Amun-Ra joined #nim
07:30:14*beholders_eye quit (Read error: Connection reset by peer)
07:36:13*beholders_eye joined #nim
08:32:33*beholders_eye quit (Read error: Connection reset by peer)
08:38:33*beholders_eye joined #nim
08:44:19*ntat quit (Quit: Leaving)
09:11:59*beholders_eye quit (Read error: Connection reset by peer)
09:12:57*derpydoo joined #nim
09:17:55*beholders_eye joined #nim
09:19:34*ryuukk quit (Remote host closed the connection)
09:34:09*cnx quit (Ping timeout: 245 seconds)
09:51:39FromDiscord<arnetheduck> sent a code paste, see https://play.nim-lang.org/#pasty=SKrAcCqA
09:52:47FromDiscord<odexine> best use `typedesc[Index]` instead
10:05:47*cnx joined #nim
10:34:27*derpydoo quit (Quit: derpydoo)
10:41:29*jjido joined #nim
10:43:29*jjido quit (Client Quit)
10:58:50*jjido joined #nim
10:58:52*ryuukk joined #nim
11:04:33FromDiscord<arnetheduck> In reply to @odexine "best use `typedesc[Index]` instead": the joy of having multiple ways to type the same thing
11:04:53FromDiscord<odexine> iirc the type style is deprecated or discouraged?
11:09:22FromDiscord<fabric.input_output> I've only used typedesc
11:13:02FromDiscord<metagngn> `type` used to mean `typeof` is discouraged probably
11:13:19FromDiscord<metagngn> not used as `typedesc` given it came after it
11:27:30FromDiscord<arnetheduck> well, the language should make up its mind on this point - until it's actually deprecated or discouraged (ie the compiler warns about it), it's just another bikeshed opportunity
11:28:46FromDiscord<arnetheduck> ie as far as I remember, there is no _technical_ difference between the ways of writing it, beyond the number of characters you use
11:30:24*ryuukk quit (Remote host closed the connection)
11:39:17FromDiscord<metagngn> yep: <https://nim-lang.github.io/Nim/manual.html#special-types-typeof-operator>↵> Note: typeof(x) can for historical reasons also be written as type(x) but type(x) is discouraged.
11:44:48FromDiscord<goerge_lsd> anyone use allographer ? I am having an issue inserting 30k rows, if I insert one by one, it takes ~5 minutes, unreasonable for ~12MB of data. If I insert all the data (as allographer needs it, seq[JsonNode], I get a `too many sql variables` exception.
11:45:41FromDiscord<goerge_lsd> I really like tha allographer syntax and concept, but maybe not a good idea to use it because of issues like this. And development is slow
11:52:55FromDiscord<arnetheduck> In reply to @metagngn "yep: <https://nim-lang.github.io/Nim/manual.html#sp": the example we're discussing isn't about `typeof` though
11:55:52FromDiscord<arnetheduck> I think something like 80-90% of status code uses `_: type Xxx` for cases like this simply because someone started using it and it stuck .. it's not hard to argue that `typedesc[Xxx]` is an ugly mouthful, comparatively
12:01:42FromDiscord<metagngn> https://github.com/nim-lang/Nim/pull/7681#issuecomment-440262937
12:03:41FromDiscord<metagngn> this PR changed all the documentation to say `type` instead of `typedesc` but now there is no mention of `type`, only `typedesc` lol
12:11:43*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
12:27:45*ryuukk joined #nim
12:56:10*ntat joined #nim
12:56:15FromDiscord<arnetheduck> zah has indeed had strong influence on the code style of status, but I can't recall him writing a lot of docs during his time here 😉
12:56:29FromDiscord<arnetheduck> none that were read, anyway
13:20:46FromDiscord<janakali> @goerge_lsd seems to be an sqlite limit https://stackoverflow.com/questions/7106016/too-many-sql-variables-error-in-django-with-sqlite3↵maybe try to insert your rows in batches of ~900?
13:26:21FromDiscord<double_spiral> Is there a macro or something that can initialize a particularly large array for me
13:34:04FromDiscord<double_spiral> A ref array to be specific
13:36:19FromDiscord<aurelian5014> `ld: library 'rt' not found` when trying to use mimalloc
13:37:56FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=rwJwjZIh
13:39:57FromDiscord<double_spiral> Thank you ill see if i can get this to work
14:18:38*PMunch quit (Quit: Leaving)
14:32:04Amun-Raaurelian5014: librt is a linux library
14:32:36FromDiscord<aurelian5014> I fixed it
14:32:45FromDiscord<aurelian5014> on a work call, I'll post the fix for mac
14:33:55Amun-Ranice
14:37:27FromDiscord<nikolina.mahin> Grad zagreb
14:39:11Amun-Racity zagreb
14:54:36FromDiscord<lui1187> sent a code paste, see https://play.nim-lang.org/#pasty=jiWYrPcW
14:56:55Amun-Ra<< is one of the most things I despise in C++
14:57:04Amun-Ras/most/top/
14:57:35FromDiscord<.bobbbob> In reply to @lui1187 "i don't know why,": cursed
14:58:42Amun-Rabtw, that eol is so 90s
15:00:36FromDiscord<.bobbbob> it just needs std:: in front of it to make it as annoying as possible
15:01:40strogon14Amun-Ra: you're thinkin' of AOL ;-)
15:01:44Amun-Rawhat it lacks the most is std::setw and similar C++ stuff
15:01:54Amun-Rastrogon14: ;)
15:02:31FromDiscord<TFed> and ; at the end😊
15:03:00Amun-Ra:P
15:54:44FromDiscord<xtrayambak> If B is an `ref object of A` and I want to turn a `A` into `B`, is there a way to do so but I leave the fields that `A` does not have but `B` does to their `default(T)` state?
15:55:08FromDiscord<xtrayambak> I tried a cast but it just causes a bizzare memory corruption in some cases
15:55:16FromDiscord<xtrayambak> (edit) "cases" => "cases, which is sort of to be expected"
15:55:26Amun-Racast works only when ABI is 1:1
15:55:59FromDiscord<xtrayambak> In reply to @Amun-Ra "cast works only when": As in, the layout of the fields of the object?
15:56:07Amun-Ramhm
15:56:30FromDiscord<xtrayambak> sent a code paste, see https://play.nim-lang.org/#pasty=vPIxWYAY
16:00:34Amun-RaI'm not experienced in refs and inheritence in nim
16:14:41FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=JdhlgSTK
16:29:26*beholders_eye quit (Ping timeout: 265 seconds)
16:29:59*gshumway quit (Quit: .)
16:32:10*gshumway joined #nim
17:25:00FromDiscord<enthus1ast.> sent a long message, see https://pasty.ee/sxYWfauL
17:26:28FromDiscord<enthus1ast.> You do not believe how often i've helped Scientists, that only write python, do some Javascript for form handling, and shitty user handling
17:27:16FromDiscord<enthus1ast.> The important thing is, that the "magic scientific thing" must be shielded, because its really shitty.
17:31:29FromDiscord<enthus1ast.> its really shitty == does not clean up; calls into different very old code (fortran); uses python (some modules need python X, the other needs python Y); one step of the pipeline takes csv, the other json, the other some other stuff etc pp
17:33:14FromDiscord<enthus1ast.> i often thing: The good old unix times where much better for the users, they could easily hack together a bash script that solves a real issue, then let multiple users use it with terminal sharing/ssh.
17:34:23FromDiscord<enthus1ast.> (edit) "thing:" => "think:"
17:34:53FromDiscord<enthus1ast.> if one feels inspired; and want to start the thing above ( 😉 ) i would join the effort
17:35:25FromDiscord<fabric.input_output> I think elixir would be great for making the orchestrator service
17:35:46FromDiscord<enthus1ast.> so you recommend elixir in a nim channel? 😄
17:36:01FromDiscord<fabric.input_output> yes
17:36:17Amun-Raerlang > elixir; change my mind :P
17:36:18FromDiscord<fabric.input_output> you could write sub services in nim
17:36:33FromDiscord<fabric.input_output> and orchestrate them with elixir
17:36:43FromDiscord<enthus1ast.> nonono you got me wrong, i would write the stuff in nim 😛
17:37:16FromDiscord<fabric.input_output> In reply to @Amun-Ra "erlang > elixir; change": syntax sucks, can't reassign vars, no pipe operator, no macros, no module nesting, aliasing etc
17:37:31FromDiscord<fabric.input_output> (edit) "nesting," => "nesting or"
17:38:19FromDiscord<enthus1ast.> what do you mean with orchestration btw?
17:38:26Amun-Rafabric.input: not vars, that's one of these perks I like
17:39:05FromDiscord<fabric.input_output> sent a code paste, see https://play.nim-lang.org/#pasty=vFGMuqPc
17:39:15FromDiscord<fabric.input_output> (edit) "https://play.nim-lang.org/#pasty=VBckifpq" => "https://play.nim-lang.org/#pasty=UcMJQOvs"
17:39:19FromDiscord<fabric.input_output> (edit) "https://play.nim-lang.org/#pasty=ahbtVFKO" => "https://play.nim-lang.org/#pasty=cmdUiETk"
17:40:02FromDiscord<enthus1ast.> but erlang needs to be set up, the "pipeline.exe" or "pipeline.dmg" cannot be double clicked or?
17:40:10FromDiscord<enthus1ast.> it needs a erlang vm and other stuff
17:40:12Amun-Radon't forget very ugly if synax by design :P
17:40:19FromDiscord<fabric.input_output> In reply to @enthus1ast. "what do you mean": the thing that will call all the other subservices and is responsible for routing data and stuff around
17:40:58FromDiscord<enthus1ast.> the only "routing" thing -> call the docker container; then collect the artifacts/results
17:41:09FromDiscord<enthus1ast.> thats what i mean by "shielding"
17:41:40FromDiscord<fabric.input_output> ez in elixir, also true fearless concurrency
17:41:50FromDiscord<enthus1ast.> the scientists must be able to write the stuff they know, and the admin just wraps the stuff in a few clicks / lines, in this pipeline
17:42:06FromDiscord<fabric.input_output> make a web interface with phoenix
17:42:52FromDiscord<enthus1ast.> no, its not nim, i want to write the stuff i like
17:44:15FromDiscord<fabric.input_output> ok
17:44:30FromDiscord<fabric.input_output> have fun
17:44:47FromDiscord<enthus1ast.> oh i will one day.
17:45:15FromDiscord<fabric.input_output> In reply to @Amun-Ra "don't forget very ugly": pretty much all erlang syntax is ugly syntax
17:46:12FromDiscord<enthus1ast.> i just wanted to to phrase the thing i think about for a long time into words
17:46:23FromDiscord<fabric.input_output> elixir has macros like nim fyi just sayin'
17:56:24*disso-peach joined #nim
17:58:28*ntat quit (Quit: Leaving)
19:22:42*coldfeet joined #nim
19:38:02*coldfeet quit (Quit: Lost terminal)
20:08:38FromDiscord<silme94> anyone know how to fix this? (windows) https://media.discordapp.net/attachments/371759389889003532/1290767348432896050/dssd.PNG?ex=66fda845&is=66fc56c5&hm=630cb67896f824285bd1893bccfa3fe0dd8bf1c63d3cf54bbacc86fb59f89a50&
20:09:13FromDiscord<silme94> sent a code paste, see https://play.nim-lang.org/#pasty=rosVzdjP
20:09:33FromDiscord<silme94> anyone know how to fix this? https://media.discordapp.net/attachments/371759389889003532/1290767581975679006/dssd.PNG?ex=66fda87c&is=66fc56fc&hm=72f3612294b2dc9481fda2b9c328d98a4985c729c84488d72448489c940b6c3e&
20:18:27FromDiscord<intellij_gamer> Import [syncio](https://nim-lang.org/docs/syncio.html#stdin)
20:18:59FromDiscord<silme94> ok
20:20:25FromDiscord<silme94> sent a code paste, see https://play.nim-lang.org/#pasty=axAFjSAZ
20:26:34FromDiscord<enthus1ast.> sent a code paste, see https://play.nim-lang.org/#pasty=IUBdntgl
20:26:44FromDiscord<enthus1ast.> (edit) "https://play.nim-lang.org/#pasty=BsIoSkdu" => "https://play.nim-lang.org/#pasty=phgFKpPD"
20:27:54FromDiscord<Elegantbeef> You do not need to import syncio if you do not pass the slim flag
20:29:12FromDiscord<Elegantbeef> if you do `-d:nimPreviewSlimSystem` you get a very small system and have to import most modules that are there by default
20:29:13FromDiscord<enthus1ast.> to be honest, it looks more like if the compiler is evaluating nimscript
20:29:41FromDiscord<Elegantbeef> If only we could see their entire console
20:29:54FromDiscord<Elegantbeef> Technology just isnt there yet
20:31:00FromDiscord<enthus1ast.> yes
20:31:13FromDiscord<Elegantbeef> But yes I agree they likely are attempting to use nimscript and running into its limitations
20:31:45FromDiscord<silme94> sent a code paste, see https://play.nim-lang.org/#pasty=QsGJaKmI
20:31:50FromDiscord<silme94> (edit) "https://play.nim-lang.org/#pasty=aecYXSPn" => "https://play.nim-lang.org/#pasty=mkLdIcsr"
20:32:45FromDiscord<nnsee> In reply to @silme94 "ok this is working": https://nim-lang.org/docs/nims.html#limitations
20:32:46FromDiscord<enthus1ast.> i knew it 🙂
20:33:08FromDiscord<enthus1ast.> this limitation i also do not get to be honest
20:33:21FromDiscord<enthus1ast.> should be fixes as a bug imho
20:33:45FromDiscord<enthus1ast.> stdin and stdout would be usefull for scripting
20:33:51FromDiscord<Elegantbeef> Well you have to wrap all of `syncio` in vmhooks
20:33:56FromDiscord<Elegantbeef> So it's not hard it's just a lot of work
20:34:07FromDiscord<silme94> In reply to @nnsee "https://nim-lang.org/docs/nims.html#limitations": oh yeah ok
20:34:12FromDiscord<silme94> thanks
20:34:27FromDiscord<nnsee> syncio has a lot of importc iirc
20:34:47FromDiscord<nnsee> In reply to @Elegantbeef "So it's not hard": so what he said
20:35:09*jjido joined #nim
20:46:42FromDiscord<silme94> in what case should we use when
20:48:54Amun-Rawhen you need to include/exclude some code during compilation
21:12:45FromDiscord<illum1nation> sent a code paste, see https://play.nim-lang.org/#pasty=UCuEpRlN
21:13:11FromDiscord<illum1nation> (edit) "https://play.nim-lang.org/#pasty=OWTeXbcj" => "https://play.nim-lang.org/#pasty=bQRzLyUm"
21:13:45FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=qVoBzcCc
21:13:56FromDiscord<sirius_x3> is it possible to save procs (their pointers) to an array and call them by using the respective index?
21:14:53FromDiscord<Elegantbeef> Yes Nim has first class procedures so just make an array
21:16:17FromDiscord<sirius_x3> sent a code paste, see https://play.nim-lang.org/#pasty=PsbZpYEj
21:16:48FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=EmcrhiJY
21:16:58FromDiscord<Elegantbeef> Those are not `proc()` they're `proc(a, b: uint): uint`
21:17:05FromDiscord<Elegantbeef> But you do not need the type annotation
21:17:47FromDiscord<aurelian5014> I have a basic socket listener accepting in a loop then executing a few procs based on the message. When stress test it with hyperfine using `orc`, the memory usage keeps growing, while `refc` is stable. Did I miss any basic deallocation steps? afaict my only ref type is `Socket`
21:18:12FromDiscord<Elegantbeef> Try with `-d:useMalloc` might be a Nim allocator bug
21:18:21FromDiscord<aurelian5014> (edit) "`Socket`" => "`Socket`, a few strings, and a couple of `seq`s"
21:18:31FromDiscord<Elegantbeef> If it's still an issue it might just be Nim's cycle collector
21:18:37FromDiscord<Elegantbeef> So if you can min repo make an issue
21:19:00FromDiscord<sirius_x3> sent a code paste, see https://play.nim-lang.org/#pasty=iEULgIwI
21:19:19FromDiscord<aurelian5014> (edit) "I have a basic socket listener accepting in a loop then executing a few procs based on the message. When stress test it with hyperfine using `orc`, the memory usage keeps growing, while `refc` is stable. Did I miss any basic deallocation steps? afaict my only ref type is `Socket`, ... a" added "plus"
21:19:25FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=hXOOUfoO
21:19:32FromDiscord<Elegantbeef> Works fine when you use the correct type of `nimcall`
21:19:50FromDiscord<sirius_x3> sent a code paste, see https://play.nim-lang.org/#pasty=xcohGuaa
21:19:59FromDiscord<Elegantbeef> At the very least make a `type OpProc = proc(_, _: uint8): uint8`
21:20:09FromDiscord<Elegantbeef> Whoops forgot the nimcall 😄
21:20:21FromDiscord<Elegantbeef> At the most stop annotating types 😄
21:20:29FromDiscord<sirius_x3> In reply to @Elegantbeef "At the most stop": NEVER!
21:20:57FromDiscord<sirius_x3> (edit) "In reply to @Elegantbeef "At the most stop": NEVER! ... " added "🙂"
21:21:48FromDiscord<Nlits (Ping on reply)> How do i make `distinct T` generic work? When i make a proc with this generic it always can't find this proc
21:22:03FromDiscord<Elegantbeef> You really should stop annotating it's a refactor nightmare
21:22:21FromDiscord<Elegantbeef> Do you have an example of distinct not working?
21:24:03FromDiscord<sirius_x3> In reply to @Elegantbeef "You really should stop": I will give it a thought, thanks 🙂 😄
21:24:43FromDiscord<Elegantbeef> Well just in the above, say you add another opcode, you now need to add the opp and also increment the number
21:24:58FromDiscord<Elegantbeef> Also if these are like opcodes I suggest making an enum and an enum indexed array
21:25:37FromDiscord<Nlits (Ping on reply)> sent a code paste, see https://play.nim-lang.org/#pasty=yuECwBaD
21:25:43FromDiscord<Nlits (Ping on reply)> (edit) "https://play.nim-lang.org/#pasty=EsIkBKVT" => "https://play.nim-lang.org/#pasty=LPsJtgRX"
21:25:48FromDiscord<Nlits (Ping on reply)> (edit) "https://play.nim-lang.org/#pasty=EvMSxtqU" => "https://play.nim-lang.org/#pasty=MqWkcRdH"
21:26:06FromDiscord<Nlits (Ping on reply)> Doesn't compile and idk why
21:27:48FromDiscord<Elegantbeef> `distinct T` is actually just `T` when inside of parameters like that
21:27:56FromDiscord<Elegantbeef> It's an annoying generic binding rule
21:29:50FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=nxPOKWPh
21:30:12FromDiscord<sirius_x3> In reply to @Elegantbeef "Well just in the": hmmm, that's true ig
21:30:29FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=THPbgrhC
21:30:40*rockcavera joined #nim
21:30:40FromDiscord<Elegantbeef> So you cannot overload with a `distinct int` for instance
21:31:44FromDiscord<sirius_x3> In reply to @Elegantbeef "Also if these are": wow thanks, didn't even know that was a thing lol. kinda like accessing fields in an object
21:32:46FromDiscord<Elegantbeef> It does require manually keeping an array and enum in lockstep so it's a bit tedious on additions/refactors, but it also does allow you to not have an array that is indexed by an int
21:32:54FromDiscord<Elegantbeef> So no "Which one is addition again"
21:34:35FromDiscord<Nlits (Ping on reply)> sent a code paste, see https://play.nim-lang.org/#pasty=FWiMMuXq
21:46:57FromDiscord<aurelian5014> In reply to @Elegantbeef "Try with `-d:useMalloc` might": keeps growing with `orc + malloc` and `orc + mimalloc`
21:47:14FromDiscord<Elegantbeef> Well the cycle collector is broke
21:47:58FromDiscord<aurelian5014> refc rock solid at 2MB
21:48:06FromDiscord<aurelian5014> the others grew to 10+
22:31:45*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
22:47:31*jjido joined #nim
23:10:26arkanoidhello from IRC! Thanks to the team for restoring the bridge
23:43:35*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)