<< 14-11-2022 >>

00:11:01NimEventerNew thread by setop: Memory footprint of parsejson, see https://forum.nim-lang.org/t/9603
00:22:19FromDiscord<pietroppeter> had fun playing for the first time with an ECS (with nim js backend): https://pietroppeter.github.io/nblog/drafts/easyess_js_ball.html
00:27:12FromDiscord<Elegantbeef> Hmph i should add JS support to my toy ECS
00:28:23FromDiscord<pietroppeter> I didn’t even know you had a ECS!
00:29:05FromDiscord<Elegantbeef> It's mostly a toy
00:29:13FromDiscord<Elegantbeef> But it's like 99% macro-less so it makes me happy
00:29:51FromDiscord<Elegantbeef> https://github.com/beef331/nimtrest/blob/master/yeacs.nim#L128-L160 if you're curious
00:32:21FromDiscord<pietroppeter> Nice, thanks, always curious 🙂
00:36:30FromDiscord<Elegantbeef> Js makes this implementation quite difficult
00:43:05*adium joined #nim
01:01:08NimEventerNew thread by DestyNova: Subsequence matching, see https://forum.nim-lang.org/t/9605
01:15:19FromDiscord<salt rock lamp> is there a nim library that implements functionality like rsync? or would i need to write my own using e.g. librsync, or call out the rsync process?
01:15:46FromDiscord<salt rock lamp> also\: is there a nim ssh client? or again, would i need to either use libssh or call the openssh client program?
01:16:22FromDiscord<salt rock lamp> libssh seems fairly usable as-is, but librsync looks a lot lower-level than i have brainpower to handle
01:16:42FromDiscord<salt rock lamp> oh i see this https://github.com/ba0f3/ssh2.nim
01:52:10FromDiscord<Elegantbeef> @pietroppeter\: well you made me do it, it now supports JS 😛
01:52:40FromDiscord<Elegantbeef> It's actually likely a safer implementation on JS but it uses OOP so it's not actually good for performance, but i blame JS
02:04:12FromDiscord<b1rdf00d> sent a long message, see http://ix.io/4fQO
02:06:50FromDiscord<Elegantbeef> Shucks presently my current API lacks dynamic composition, so i guess that's something I need to think about
02:07:09FromDiscord<Elegantbeef> Toy api development, the most fun waste of time
02:16:23*arkurious quit (Quit: Leaving)
02:18:12*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
02:19:17FromDiscord<Require Support> anyone have an example of using threads + async? preferrably with chronos
02:20:28FromDiscord<Elegantbeef> @pietroppeter\: to annoy you one more time 😛 https://play.nim-lang.org/#ix=4fQP
02:27:17NimEventerNew thread by unquietwiki: Opportunity to adopt a new linker?, see https://forum.nim-lang.org/t/9606
02:34:00*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
02:38:47*jjido joined #nim
02:39:16*jjido quit (Client Quit)
03:58:03FromDiscord<Bung> any resource about how the allocator initial heap size determined? am looking into nim's alloc.nim but still have no idea all these constant numbers
03:58:35FromDiscord<Bung> sent a code paste, see https://play.nim-lang.org/#ix=4fR2
04:02:34FromDiscord<Elegantbeef> Should be `nimMinHeapPages PageSize`
04:03:24FromDiscord<Bung> here `const StandaloneHeapSize {.intdefine.}: int = 1024'i32 PageSize` ?
04:04:04FromDiscord<Elegantbeef> That's for the `--os:standalone` i think, i could be wrong
04:04:09FromDiscord<Elegantbeef> Araq likely can give more insight
04:07:06FromDiscord<Bung> am trying to change the target int size to int16, these calculation cause overflow, I've searched but no article mention about this algorithm
04:07:54FromDiscord<Bung> like javase "Initial heap size of 1/64 of physical memory "
04:15:27FromDiscord<Bung> araq is sleep time \:(
04:20:13*genpaku quit (Remote host closed the connection)
04:22:05*deadmarshal quit (Remote host closed the connection)
04:24:43*genpaku joined #nim
05:02:10*deadmarshal joined #nim
05:28:56FromDiscord<b1rdf00d> In reply to @Bung "araq is sleep time": Can you post your question on the forum?
05:55:17FromDiscord<pietroppeter> In reply to @Elegantbeef "<@588390287810887693>\: to annoy you": Haha that’s so fun! Very nice that you can make such an implementation in a few lines!
06:09:39*wallabra quit (Quit: ZNC 1.8.2 - https://znc.in)
06:16:15FromDiscord<alice.> does this language have an parsec clone because if not i am ditching it
06:16:35FromDiscord<alice.> i dont want to have a recursive descent parser
06:16:43FromDiscord<alice.> (edit) "does this language have an parsec clone because if not i am ditching it ... " added "for f#/ocaml"
06:17:01FromDiscord<Bung> what's string type supported on 16bit target, I see delphi is limited supported
06:17:07FromDiscord<alice.> (edit) removed "because if not i am ditching it for f#/ocaml"
06:19:16FromDiscord<alice.> like parsec from haskell basically
06:19:28FromDiscord<alice.> i dont want to rewrite all 800+ lines in another language if i can avoid it
06:19:46*wallabra joined #nim
06:20:43FromDiscord<Bung> you may find something on github search `language:nim <keyword>`
06:21:03FromDiscord<alice.> it doesnt
06:21:09FromDiscord<alice.> i googled it
06:22:11FromDiscord<Elegantbeef> Npeg does exist
06:22:16FromDiscord<ringabout> In reply to @alice. "like parsec from haskell": https://github.com/schneiderfelipe/microparsec
06:22:57FromDiscord<Bung> there're two results exactly matches
06:24:19FromDiscord<Bung> sure, I'll do that, someone may good at it↵(@b1rdf00d)
06:28:38FromDiscord<alice.> In reply to @Elegantbeef "Npeg does exist": that's far from parsec
06:33:51NimEventerNew thread by bung: Targeting 16bit system, see https://forum.nim-lang.org/t/9608
06:37:51NimEventerNew thread by jasonfi: OpenSSL 3?, see https://forum.nim-lang.org/t/9609
06:46:58FromDiscord<ShalokShalom> In reply to @alice. "that's far from parsec": I used fparsec, so I know what you mean
07:10:50NimEventerNew post on r/nim by thindil: [Nim blog] A cost model for Nim, see https://reddit.com/r/nim/comments/yuro4k/nim_blog_a_cost_model_for_nim/
07:20:45*kenran joined #nim
07:23:07*derpydoo joined #nim
07:35:11*carce joined #nim
07:35:13*carce quit (Client Quit)
07:39:55*PMunch joined #nim
08:07:04*jjido joined #nim
08:15:24*kenran` joined #nim
08:16:50*kenran quit (Ping timeout: 240 seconds)
08:20:48Amun-Ralet's say I have several importc functions with libfoo dynlib pragma; is there a way of handling libfoo no to be found?
08:21:40FromDiscord<qb> Is there a way to buy nim in action with cryptos?
08:25:56PMunchNot officially I believe
08:28:44Zevvalice.: just curious, I don't know about parsec so pardon my ignorance: what is it looking for that parsec offers and npeg "is far from"?
08:29:34FromDiscord<Elegantbeef> Oh zevv still waits for someone to say npeg
08:30:06Zevvyeah i'm sitting here staring at the screen all day
08:30:14Zevvwhat else is there to do in life
08:30:42FromDiscord<Yardanico> @alice. ^ so they get the ping
08:41:14PMunchZevv, judging by their comments they seem to just not want to rewrite their parsing code for some other grammar language. If Nim had a parsec implementation with similar syntax to the Haskell one they could possibly copy-paste the quote fairly verbatim. But NPeg would require a big rewrite
08:41:43Zevvand a pony
08:41:54FromDiscord<Elegantbeef> Maybe even a unicorn
08:41:55Zevvsorry
08:42:42Zevvwell, that makes sense, but indeed, that's not something Nim has - or any other language, likely
08:42:58PMunchOh yeah, it's a tall order
08:43:00FromDiscord<ShalokShalom> FParsec
08:43:27FromDiscord<ShalokShalom> I know, there are others too. I think OCaml/Reason maybe? Have to look
08:43:28PMunchI guess rewriting the syntax but not having to reason about rewriting the logic of the parsing would be a relief as well
08:43:45PMunchBut microparsec seems promising
08:47:11Zevvah nice, didn't know that one.
08:47:13Zevvso much i don't know
08:47:34Amun-RaElegantbeef: is there a way to iterate over all global/threadvar variables in current module using macro?
08:47:36PMunchNPeg is still my favourite parsing library for Nim by the way :)
08:47:49Zevvlove you too :)
08:47:55FromDiscord<Elegantbeef> There is `locals`↵(<@709044657232936960_=41mun-=52a=5b=49=52=43=5d>)
08:48:19PMunchI really need to move Protobuf over to it.. I know I've said that pretty much since it came out, but I recently picked up protobuf again and the parsing in it is soo slow :P
08:48:29FromDiscord<ShalokShalom> Saw microparsec the other day
08:48:33FromDiscord<ShalokShalom> Looks cute
08:48:41Zevvit does
08:49:01FromDiscord<Elegantbeef> Dont think locals works at module level
08:49:02FromDiscord<Elegantbeef> Shame
08:49:11FromDiscord<Elegantbeef> So the answer is no i guess
08:50:08Amun-Rahmm
08:50:10Amun-Rathanks
08:50:40FromDiscord<Elegantbeef> Nim's module level introspection is very much lacking
08:50:45PMunchMentions from Matrix to IRC are a mess..
08:50:55PMunchhttps://irclogs.nim-lang.org/14-11-2022.html#08:47:55
08:51:25FromDiscord<Elegantbeef> Yea i accidently replied like a tool
08:51:29FromDiscord<Elegantbeef> I forget you people live in 1993
08:51:50Amun-Rawait, isn't 1993 still a future?
08:52:01FromDiscord<Elegantbeef> You're thinking of 1984
08:52:08Amun-Ragood old times
08:53:01FromDiscord<ShalokShalom> Yeah, seems like fparsec is the only parsec port, that is ready to go
08:53:17FromDiscord<ShalokShalom> OCaml and Rust have outdated implementations
08:55:21FromDiscord<ShalokShalom> @762784615127449642> Have you not said, you wrote a script, that removes the FromDiscord?
08:55:28FromDiscord<ShalokShalom> Or was this someone else
08:58:57PMunchOh yeah, I have a small script on my machine which strips the `FromDiscord` part off of messages
08:59:17PMunchAnd extracts the username from the message
09:00:31FromDiscord<Elegantbeef> Even if my name was FromDiscord? 😛
09:04:43PMunchWell if your name was FromDiscord and you started your message with `<SomeName>` then it would replace FromDiscord with SomeName
09:10:03Amun-Rahow to get the name of a var as string? https://play.nim-lang.org/#ix=4fS7
09:10:21FromDiscord<Yardanico> astToStr
09:10:50Amun-Rathanks
09:21:20FromDiscord<ShalokShalom> In reply to @PMunch "Oh yeah, I have": Ah, cause I see it in the screenshot
09:21:33FromDiscord<ShalokShalom> I guess, there would be another instance, without that plugin?
09:21:57PMunchScreenshot?
09:22:20PMunchThe thing I linked was the official IRC logs
09:22:35PMunchIt's just a website which records everything that is said in this channel
09:22:49PMunchCourtesy of NimBot
09:22:59FromDiscord<ShalokShalom> Ah
09:23:28FromDiscord<ShalokShalom> Can the script also fill in the name of the actual nick, into that field?
09:23:36FromDiscord<ShalokShalom> Basically just swap it.
09:25:59PMunchYup, my IRC looks like this: https://irclogs.nim-lang.org/14-11-2022.html#08:47:55
09:26:09PMunchWoops
09:26:15PMunchhttps://uploads.peterme.net/2022-11-14T10:24:54.png <- Like that
09:26:37*ensyde quit (Quit: WeeChat 2.8)
09:29:16*dnh joined #nim
09:31:47FromDiscord<Prestige> Looks very nice
09:38:51PMunchThanks :)
09:51:08FromDiscord<scarf> In reply to @PMunch "https://uploads.peterme.net/2022-11-14T10:24:54.png": yo which client are you using?
09:55:10FromDiscord<ShalokShalom> Very nice
09:55:25FromDiscord<ShalokShalom> Why doesnt the bouncer you showed us earlier, also use that?
09:55:43FromDiscord<ShalokShalom> Did you pitch them the plugin?
09:56:20FromDiscord<ShalokShalom> A plugin that translates the pings could be cool
09:59:55PMunch@scarf, HexChat
10:00:13PMunch@ShalokShalom, well it loses a bit of information..
10:00:22FromDiscord<scarf> In reply to @PMunch "<@399454059184128010>, HexChat": thx, looks cool
10:01:20FromDiscord<scarf> does replying in discord gets translated as ping in IRC?
10:01:42PMunchOh that's what they meant by ping :P
10:01:54PMunchWell on IRC you get highlighted as long as someone mentions your name
10:02:07PMunchNo need for @ or anything like that
10:02:42PMunchSo your message pinged me
10:02:51PMunchSince it contained the word PMunch
10:05:13*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
10:06:09FromDiscord<ShalokShalom> Yeah, but I see a case in your screenshot, where I ping just a long line of numbers
10:08:43FromDiscord<ShalokShalom> Wonder, why that is.
10:23:16FromDiscord<scarf> does nim have rfc for RAII (or python style context manager)
10:24:02FromDiscord<scarf> i found this forum post but it's dead for 5y <https://forum.nim-lang.org/t/3205>
10:24:19FromDiscord<ringabout> It has destructors which are similar to RAII
10:24:45FromDiscord<ringabout> https://nim-lang.github.io/Nim/destructors.html
10:25:00FromDiscord<Yardanico> In reply to @scarf "does nim have rfc": you can write python style context managers with just a bit of templates btw
10:25:30FromDiscord<scarf> In reply to @Yardanico "you can write python": yeah but it would be great if resources (file, stream, etc) had those destructors
10:25:39FromDiscord<Yardanico> well they don't yet
10:25:41FromDiscord<ringabout> Locks, Files, Socket, TempFiles should utilize destructors, RFC is appreciated.
10:26:14FromDiscord<ringabout> (edit) "Locks, Files, Socket, ... TempFiles" added "Stream,"
10:27:02FromDiscord<scarf> is sink similar to move semantics in c++ and will improve performance?
10:28:01FromDiscord<ringabout> `sink` is an optimization; it moves when it could and fall back to copy when it can not
10:28:14FromDiscord<ringabout> (edit) "`sink` is an optimization; it moves ... when" added "data"
10:43:34Zevvit can never make your code more correct
10:44:07Zevvjust sayin'
10:44:57*vicecea quit (Remote host closed the connection)
10:46:25*vicecea joined #nim
10:53:23FromDiscord<scarf> In reply to @Zevv "it can never make": about RAIIs?
10:54:42*PMunch quit (Quit: Leaving)
11:12:27*jjido joined #nim
11:37:45*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
12:13:36*PMunch joined #nim
12:14:09*derpydoo quit (Quit: derpydoo)
12:28:09*jjido joined #nim
12:33:06Zevv?
12:33:17Zevvoh that, nevermind me :)
12:34:25Zevvthat's a kind of a running joke in some circles
12:35:22Zevvhttps://forum.nim-lang.org/t/8531#55284
12:45:54FromDiscord<alehander42> hey guys @emil.ivanichkov loves you
13:04:22madpropsthanks emil ivanichkov
13:21:19FromDiscord<scarf> anyways I drew nim-chan https://media.discordapp.net/attachments/371759389889003532/1041704380694540318/nim.png
13:26:15madpropscute
13:27:34FromDiscord<Rika> damn
13:35:14FromDiscord<Arouzing> A fun code challenge idea just crossed my mind. Pick a random library and find a way to use it for a task it was not intended.
13:37:04PMunchHaha, sounds like fun
13:42:43FromDiscord<huantian> In reply to @scarf "anyways I drew nim-chan": I approve
13:43:03FromDiscord<Phil> I was about to say "use a connection pool for a task it wasn't intended for" but I came up with a possibility within like 10 seconds
13:53:04*jmdaemon quit (Ping timeout: 268 seconds)
14:01:03*arkurious joined #nim
14:19:01*pro joined #nim
14:32:30FromDiscord<scarf> sent a code paste, see https://play.nim-lang.org/#ix=4fSZ
14:33:00FromDiscord<ringabout> Yeah, a possible solution is to wrap it in a File object.
14:33:15FromDiscord<ringabout> And make a new module probably.
14:33:31FromDiscord<Phil> At which point you're writing your own file API in a sense
14:34:00FromDiscord<Phil> As you need to forward any proc to the inner file object
14:34:00FromDiscord<ringabout> Or you can change the structure in place.
14:34:17FromDiscord<Phil> (edit) "As you need to forward any proc ... to" added "call"
14:34:54FromDiscord<ringabout> I recommend to start with simple things like Locks.
14:37:30FromDiscord<ringabout> Or something which is already a object or a ref
14:42:44FromDiscord<scarf> thanks, will try looking at
14:49:25*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
14:55:22FromDiscord<ajusa> In reply to @Arouzing "A fun code challenge": Literally me every time I try and write some code
14:56:52*PMunch quit (Quit: Leaving)
15:12:30*ox is now known as oz
15:13:45FromDiscord<Arouzing> In reply to @ajusa "Literally me every time": I feel that, lmao.
15:44:37FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=4fTw
15:46:05FromDiscord<enthus1ast> i mean, nothing special everything is boring
15:46:39FromDiscord<enthus1ast> my dateStr\: 2022-11-14T16\:43\:54+01\:00
15:46:45FromDiscord<enthus1ast> even more boring
15:48:48FromDiscord<ringabout> https://media.discordapp.net/attachments/371759389889003532/1041741497898377256/image.png
15:49:05FromDiscord<enthus1ast> o.0
15:49:06FromDiscord<ringabout> missing `pkName` I guess
15:49:52FromDiscord<enthus1ast> oh man indeed
15:50:00FromDiscord<enthus1ast> thank you @ringabout
15:51:00FromDiscord<ringabout> you are welcome
15:57:05*TakinOver quit (Remote host closed the connection)
15:58:21*TakinOver joined #nim
16:07:55*jjido joined #nim
16:08:45*pro quit (Quit: pro)
16:13:42*kenran` quit (Remote host closed the connection)
16:23:30*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
16:29:47FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=4fTF
16:39:04*phytolizer joined #nim
16:44:31FromDiscord<.tochka> is there a way to make it work? https://play.nim-lang.org/#ix=4fTI
16:46:45phytolizerhi all. i am very happy with nim's ffi in general, but i am kind of stumped here. i am linking Jansson, a C library for json parsing (i am using this one specifically for the pretty printing capabilities).
16:46:45phytolizeri am implementing RFC6901 (json pointer) using this library, and have some unit tests. but interestingly i am running into this issue in one test: json_dumpf is failing for no apparent reason, on valid objects. here is the code: https://bpa.st/YMHQ
16:46:46phytolizeras you can see from the output, the objects are equal (according to json_equal), but i am unable to print them, and unsure how to even debug this. the pointers are not nil. can someone help me figure out a solution?
16:48:36phytolizeroops, i should RTFM more. i am supposed to pass JSON_ENCODE_ANY to allow printing non-objects :facepalm:
16:51:24phytolizerwell on a different note then, is there a way to show the objects using json_dumps when an error occurs in the unit test? do i just have to catch some exception?
17:27:45*derpydoo joined #nim
17:35:50FromDiscord<System64 ~ Flandre Scarlet> Hi↵I try to use this↵https://github.com/zacharycarter/nimgui↵But is there some exemples in Nim somewhere please?
17:37:07FromDiscord<.tochka> In reply to @.tochka "is there a way": i guess this works but that's ugly https://play.nim-lang.org/#ix=4fTY
17:38:13*jjido joined #nim
17:39:31FromDiscord<.tochka> In reply to @System64 "Hi I try to": it does just export c definitions, any c example would work the same
17:40:09FromDiscord<System64 ~ Flandre Scarlet> https://github.com/peko/cimgui-c-example/blob/master/src/main.c↵I'll try this
17:40:15*phytolizer quit (Quit: Client closed)
17:40:19FromDiscord<.tochka> (edit) "export" => "import"
17:42:05FromDiscord<.tochka> this one is probably better, and theres example in tests https://github.com/nimgl/imgui
17:48:56*yarrie joined #nim
17:53:51FromDiscord<.tochka> hm, is staticRead only relative to current module and ignores path switch?
18:03:06*jmdaemon joined #nim
18:06:34*wallabra quit (Quit: ZNC 1.8.2 - https://znc.in)
18:07:56*wallabra joined #nim
18:10:45FromDiscord<auxym> In reply to @jmgomez "I know that I": this? https://nim-lang.org/docs/enumutils.html#items.i%2Ctypedesc%5BT%5D
18:13:35*wallabra_ joined #nim
18:15:11*wallabra quit (Ping timeout: 256 seconds)
18:15:11*wallabra_ is now known as wallabra
18:15:21FromDiscord<jmgomez> In reply to @auxym "this? https://nim-lang.org/docs/enumutils.html#item": didnt know that even exists, I endup rolled my own, did a quick test with that one and it isnt working. I think it's due to the literal Im using. Thanks though, will review it
18:15:35*pro joined #nim
18:15:43FromDiscord<jmgomez> (edit) "rolled" => "rolling"
18:16:19FromDiscord<auxym> if your enum doesn't have holes, you can use the usual Ordinal stuff too, like `high, low, succ, pred`
18:16:27*wallabra quit (Client Quit)
18:17:09FromDiscord<jmgomez> yeah, it has. Thing is I defining the enums in hex and it seems it's converting it to int/int64.. but that's another story
18:17:41*wallabra joined #nim
18:21:26FromDiscord<choltreppe> sent a code paste, see https://play.nim-lang.org/#ix=4fU5
18:27:53FromDiscord<auxym> In reply to @choltreppe "hey, I want to": looks OK according to https://scripter.co/nim-deploying-static-binaries/, why do you say it's not working?
18:31:52FromDiscord<user2m> sent a code paste, see https://play.nim-lang.org/#ix=4fU7
18:32:17FromDiscord<choltreppe> sent a code paste, see https://play.nim-lang.org/#ix=4fU8
18:33:57FromDiscord<rlipsc> In reply to @pietroppeter "<@800432830605819906> here is the": What p5 library did you use for this? I get the same issue as you for this repo https://github.com/Foldover/nim-p5/issues/1
18:42:13FromDiscord<.tochka> In reply to @user2m "Random question - is": object construction requires field names, otherwise for nim it's function call, and constructors arent functions
18:42:35FromDiscord<System64 ~ Flandre Scarlet> In reply to @.tochka "this one is probably": So I should use this ImGUI?
18:43:03FromDiscord<choltreppe> sent a code paste, see https://play.nim-lang.org/#ix=4fUg
18:43:41FromDiscord<auxym> In reply to @user2m "Random question - is": no but have a look at https://github.com/beef331/constructor
18:44:33FromDiscord<auxym> In reply to @choltreppe "when I compile it": no idea tbh, try posting on the forum if no one here knows...
18:51:17FromDiscord<rlipsc> @pietroppeter ah! Ignore previous comment, found your wrapper here https://pietroppeter.github.io/nblog/drafts/bouncing_ball_p5js.html
18:55:18*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
19:04:38*pro quit (Quit: pro)
19:11:04FromDiscord<rlipsc> In reply to @user2m "Random question - is": `let p = person(name: "hello", age: 23)`
19:17:48FromDiscord<.tochka> In reply to @System64 "So I should use": based on that it's more maintained - yes
19:31:25FromDiscord<Elegantbeef> Or copy rather
19:31:25FromDiscord<Elegantbeef> Hmph i must be dumb i dont see the move in the original↵(@.tochka)
19:34:48FromDiscord<Elegantbeef> I guess `get` disallows the sink
19:36:23FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=4fUy is possibly less ugly
19:43:45*phytolizer joined #nim
20:14:40FromDiscord<System64 ~ Flandre Scarlet> In reply to @.tochka "based on that it's": could not load: cimgui.dll↵Is that normal?
20:15:04FromDiscord<pietroppeter> In reply to @rlipsc "<@588390287810887693> ah! Ignore previous": Yeah there was some issue with the original that I do not remember. Note though that the issue I reported on polymorph did not depend on p5 at all
20:15:27FromDiscord<rlipsc> In reply to @pietroppeter "Yeah there was some": I just "fixed" the issue, but it's not ideal...
20:15:52FromDiscord<rlipsc> `position.y += vel.dy` doesn't update `position`, but `position.access.y += vel.dy` does.
20:16:27FromDiscord<rlipsc> `access` transforms the index into the array.
20:16:50FromDiscord<pietroppeter> Ah well, always nice to have a workaround 🙂
20:16:53FromDiscord<rlipsc> so seems like that's the cause of it
20:17:56FromDiscord<rlipsc> In reply to @pietroppeter "Ah well, always nice": yes, but don't want to be putting `access` on the end of everything. Curious what the source of the problem is. Perhaps it's the `+=` working with copies in JS?
20:18:17FromDiscord<.tochka> In reply to @System64 "could not load: cimgui.dll": executable cannot find this dll, try to put it alongside
20:20:05FromDiscord<.tochka> In reply to @Elegantbeef "https://play.nim-lang.org/#ix=4fUy is possibly less": .get().move() worked for me in the end
20:24:54FromDiscord<System64 ~ Flandre Scarlet> In reply to @.tochka "executable cannot find this": The dll is in the same foldedr
20:25:09FromDiscord<.tochka> strange
20:25:21FromDiscord<System64 ~ Flandre Scarlet> I compiled it with mingw
20:26:12FromDiscord<.tochka> might be other loading issue? but i dont know how to debug it with nim dynamic loader
20:27:56*jjido joined #nim
20:29:58FromDiscord<rlipsc> Yep, seems to just be the `+=` that needs `access`. If you just have `position.x =` it's fine. Hmm not sure what to do to fix that though.
20:34:52FromDiscord<pietroppeter> ah so avoiding += should already fix it right? make sense that gravity was being applied then, since it does not have any of those. not sure if one could overload += with a term rewriting macro (although I guess that is something that might be deprecated)
20:39:09FromDiscord<System64 ~ Flandre Scarlet> In reply to @.tochka "might be other loading": The problem is the error message isn't verbose at all
20:40:01FromDiscord<System64 ~ Flandre Scarlet> Like↵> could not load: cimgui.dll↵Thanks captain Obvious, but why you can't load it??
20:41:11FromDiscord<rlipsc> In reply to @pietroppeter "ah so avoiding +=": Yeah exactly, that's why move didn't work but the others did!
20:42:07FromDiscord<rlipsc> It's a strange one for me, I wouldn't have expected `+=` to introduce a copy here.
20:42:18FromDiscord<rlipsc> If that is indeed what's happening
20:43:04FromDiscord<rlipsc> term rewriting might work, but as you say I think it's to be deprecated in the future.
20:43:23FromDiscord<treeform> Hey I need your help, one of the ways to make Nim popular if more big or well known companies admin to using Nim in production. I work at Reddit which is a big well known company and here is a post on the official reddit tech blog talking about my experience https://www.reddit.com/r/RedditEng/comments/yvbt4h/why_i_enjoy_using_the_nim_programming_language_at/ Please I need you to spread the word that big well known company like Reddit use
20:44:45FromDiscord<rlipsc> In reply to @treeform "Hey I need your": Nice! That's exactly what Nim does need right now - examples of business use!
20:45:28FromDiscord<treeform> yes. Now how do we spread the word?
20:45:44FromDiscord<treeform> upvote on HN? https://news.ycombinator.com/newest
20:45:55FromDiscord<treeform> upvote on reddit?
20:46:03FromDiscord<treeform> post its some place else?
20:48:23*derpydoo quit (Quit: derpydoo)
20:48:54FromDiscord<.tochka> In reply to @System64 "Like > could not": you could try to statically link to bypass it i guess
20:49:22FromDiscord<pietroppeter> that's so cool @treeform!
20:51:09NimEventerNew thread by treeform: Why I enjoy using the Nim programming language at Reddit., see https://forum.nim-lang.org/t/9611
20:51:20FromDiscord<treeform> In reply to @pietroppeter "that's so cool <@107140179025735680>!": Thanks, now we just need to upvote those things so that more programmers see it.
20:52:23NimEventerNew post on r/nim by treeform: Why I enjoy using the Nim programming language at Reddit., see https://reddit.com/r/nim/comments/yvc8xm/why_i_enjoy_using_the_nim_programming_language_at/
20:53:04FromDiscord<treeform> also submitted it to r/programming https://old.reddit.com/r/programming/new/
20:57:52FromDiscord<jmgomez> Cool! Post it on twitter so we can rt too
21:10:33FromDiscord<System64 ~ Flandre Scarlet> In reply to @.tochka "you could try to": Okay, some improvements, but I now have a segfault on Nim side
21:12:20*krux02 joined #nim
21:17:02FromDiscord<.tochka> lol
21:18:36FromDiscord<System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4fUX
21:20:32FromDiscord<.tochka> very peculiar
21:20:39FromDiscord<System64 ~ Flandre Scarlet> wdym?
21:34:37FromDiscord<rlipsc> In reply to @treeform "upvote on HN? https://news.ycombinator.com/newest": Well there ya go, I called Nim a `weapon of mass production` 😆
21:35:37FromDiscord<treeform> In reply to @jmgomez "Cool! Post it on": I have zero twitter game, maybe you post it and I retweet?
21:36:21FromDiscord<Elegantbeef> It's a programming language it's not viagra↵(@rlipsc)
21:40:00FromDiscord<rlipsc> In reply to @Elegantbeef "It's a programming language": https://media.discordapp.net/attachments/371759389889003532/1041829882965016657/unknown.png
21:41:01FromDiscord<rlipsc> In reply to @Elegantbeef "It's a programming language": https://media.tenor.com/vahQDpWpoJ4AAAAC/hey-im-proud.gif
21:41:38*phytolizer quit (Quit: Client closed)
21:47:17NimEventerNew thread by RodSteward: Bad out of the box experience with MSVC, see https://forum.nim-lang.org/t/9612
21:51:23FromDiscord<GalacticColourisation> hey, about https://nim-lang.org/docs/manual.html#effect-system↵do you guys know that this isn't actually even close to effect systems? they're closer to checked exceptions in java
21:51:45FromDiscord<Elegantbeef> Lol
21:52:05FromDiscord<Elegantbeef> If you scroll down further you're see user defined effects
21:53:12FromDiscord<GalacticColourisation> but that isn't how effect systems work, that's still closer to checked exceptions
21:53:16FromDiscord<Elegantbeef> Also they're the complete opposite to checked exceptions in java
21:53:36FromDiscord<jmgomez> In reply to @treeform "I have zero twitter": just posted https://twitter.com/_jmgomez_/status/1592274184423755776
21:53:37FromDiscord<Elegantbeef> Java manually requires annotation of raised errors
21:54:27FromDiscord<Elegantbeef> > In computing, an effect system is a formal system that describes the computational effects of computer programs, such as side effects. An effect system can be used to provide a compile-time check of the possible effects of the program.
21:55:55FromDiscord<Elegantbeef> Either way though Nim's definition doesnt have to fit with other definitions
21:56:13FromDiscord<GalacticColourisation> effect systems is a technical term that is a way to construct pure functions which, are themselves constructed of functions that effect handlers can interpret to cause side-effects, you can't just use side-effectful code and put a label on it that says what it's doing
21:56:22FromDiscord<GalacticColourisation> In reply to @Elegantbeef "Either way though Nim's": that just makes things confusing, though
21:56:44FromDiscord<Elegantbeef> Nim's effect system tracks side effects
21:56:45FromDiscord<Elegantbeef> So...?
21:57:02FromDiscord<GalacticColourisation> tracking side effects =/= having an effect system
21:57:11FromDiscord<huantian> I think we need to open an rfc to rename it to SIde Effect Tracker-o-matic 1000 beef
21:57:22FromDiscord<Elegantbeef> Or something huan
21:57:31FromDiscord<huantian> actually hold on how about this: "affect system"
21:57:41FromDiscord<Elegantbeef> Damn ingenious
21:58:00FromDiscord<GalacticColourisation> or you could call it effect tracking
21:58:49FromDiscord<GalacticColourisation> no need for systems, especially since it's kind of far away from being a system
22:00:22FromDiscord<treeform> In reply to @jmgomez "just posted https://twitter.com/_jmgomez_/status/1": re-tweeted
22:00:22FromDiscord<GalacticColourisation> in nim it's just like, tags you put on a function; in actual effect systems you have effect handlers/interpreters, effects themselves, and pure but effectful functions
22:00:34FromDiscord<GalacticColourisation> is there a way i can suggest this in a way that'd reach the devs?
22:00:45FromDiscord<Elegantbeef> Nim-lang/rfcs
22:00:52FromDiscord<GalacticColourisation> thank you
22:00:57FromDiscord<Elegantbeef> The issue is more just in nim tags do not distinguish procedures
22:01:24FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4fV4
22:02:39FromDiscord<jmgomez> In reply to @treeform "re-tweeted": let's see if it takes off. Some nue tweets get 10 or so rts.. but I dont have big audience neither as you can see haha
22:06:52FromDiscord<rlipsc> @treeform your post at RedditEng has 3 replies for me but I can't see them. Why might that be?
22:07:15FromDiscord<Elegantbeef> Official reddit subreddits might be more heavily moderated
22:07:54FromDiscord<treeform> I don't see the replies as well
22:08:34FromDiscord<Elegantbeef> It might need moderator approval oddly
22:08:55FromDiscord<Elegantbeef> I do see it has 3 comments but yea they're not visible
22:10:08FromDiscord<Elegantbeef> @GalacticColourisation\: i do have to ask, could you write a small example of what would be required in Nim to have what you'd consider an effect system?
22:10:26FromDiscord<Elegantbeef> An example in Nim code of course not in any other language
22:13:16FromDiscord<GalacticColourisation> sent a code paste, see https://play.nim-lang.org/#ix=4fV8
22:13:30FromDiscord<Elegantbeef> It doesnt compile presently
22:13:41FromDiscord<GalacticColourisation> well, what is it supposed to do
22:13:45FromDiscord<Elegantbeef> But the idea would be that `tags` are apart of the signature so you could differentiate
22:22:42FromDiscord<Tuatarian> I'm trying to pass
22:22:44FromDiscord<Tuatarian> `max(0, cOps[i] - 1)..cOps[i] + `
22:22:53FromDiscord<Tuatarian> as a `Slice[Natural]` but am getting a compile error
22:22:58FromDiscord<Tuatarian> how do this?
22:23:03FromDiscord<Elegantbeef> I very much need a concise example to understand, but alas. https://play.nim-lang.org/#ix=4fVe this allows operating on the tags, whether that defines a effect system is beyond me
22:23:21FromDiscord<Elegantbeef> add spaces before and after `..`↵(@Tuatarian)
22:23:30FromDiscord<Elegantbeef> Also sharing the compiler error is 99% smarter than saying it has one
22:23:49FromDiscord<GalacticColourisation> sent a long message, see http://ix.io/4fVf
22:24:15FromDiscord<Elegantbeef> So then what i provided is an effect system?
22:24:19FromDiscord<GalacticColourisation> you can see the confusion that it could be causing in the actual area that effect systems are formally used (i.e., haskell, koka, Eff)
22:24:35FromDiscord<Elegantbeef> It takes in effects(tags) and dispatches based off them
22:25:12FromDiscord<GalacticColourisation> In reply to @Elegantbeef "So then what i": i'm not sure... is `discard` just a `noop`? what does `object` mean? is it just like "this type exists"?
22:25:30FromDiscord<GalacticColourisation> what does `(proc())(doThing())` do exactly?
22:25:31FromDiscord<Tuatarian> In reply to @Elegantbeef "Also sharing the compiler": fair
22:25:34FromDiscord<Tuatarian> that didn't fix btw
22:25:35FromDiscord<Tuatarian> error is
22:25:36FromDiscord<Elegantbeef> Nim's tag system uses types for the tags so you need something
22:25:41FromDiscord<Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=4fVh
22:25:42FromDiscord<Elegantbeef> discard is noop yes
22:25:45FromDiscord<Elegantbeef> Also look at the most recent version
22:25:49FromDiscord<Tuatarian> (edit) "https://play.nim-lang.org/#ix=4fVh" => "https://play.nim-lang.org/#ix=4fVi"
22:26:09FromDiscord<Elegantbeef> `Natural(yourExpr)..Natural(yourOtherExpr)`
22:26:21FromDiscord<Elegantbeef> Cmon tuatara!
22:26:27FromDiscord<Tuatarian> ok that's kind of weird that it's required tho...
22:26:29FromDiscord<Tuatarian> lmao
22:26:54FromDiscord<Elegantbeef> int -\> natural conversions do not work on generics
22:26:57FromDiscord<huantian> int i believe is only automatically coerced to ranges when you try to do them directly
22:27:01FromDiscord<Elegantbeef> The generic is a type information
22:27:06FromDiscord<huantian> yeah what beef said
22:27:08FromDiscord<Elegantbeef> Natural != int
22:27:25FromDiscord<Tuatarian> do not work on generics meaning?
22:27:37FromDiscord<Elegantbeef> `seq[Natural] isnot seq[int]`
22:27:47FromDiscord<Elegantbeef> `Slice[int] isnot Slice[Natural]`
22:27:50FromDiscord<Tuatarian> OH
22:27:52FromDiscord<Elegantbeef> You need to explicitly convert between the two
22:27:53FromDiscord<Tuatarian> I see
22:28:04FromDiscord<Tuatarian> when I have a `seq[int]` I cannot pass that as natural
22:28:13FromDiscord<Elegantbeef> You might be able to do `Slice[Natural](yourExpr..yourOtherExpr)`
22:28:14FromDiscord<Tuatarian> it only implicitly casts for literals I guess
22:28:20FromDiscord<Elegantbeef> Not literals
22:28:30FromDiscord<Elegantbeef> It only implicitly converts for base `int`s
22:28:42FromDiscord<Elegantbeef> Be it a variable or a literal
22:28:42FromDiscord<GalacticColourisation> sent a code paste, see https://play.nim-lang.org/#ix=4fVj
22:28:53FromDiscord<Tuatarian> I see
22:29:02FromDiscord<Tuatarian> not from the return of a generic proc, even if it is an int
22:29:07FromDiscord<Tuatarian> In reply to @Elegantbeef "You might be able": this didn't work
22:29:48FromDiscord<emanresu3> Hey I noticed that if I have a `.nim` file and a `.nims` file with the same name, and then run `nim c --run file.nim`, both the nimscript and the compiled file get executed, is this a bug in Nim?
22:29:55FromDiscord<Tuatarian> what is wrong with doing ` s[r[0]] = t` if `r` is a `Slice[Natural]`?
22:30:04FromDiscord<Tuatarian> shouldn't that get the first thing in r
22:30:08FromDiscord<Elegantbeef> Ok i think i get it galatic, your effect system is just a series of flags to tell an interpreting block of code what to do. So you might have a `ReadFromFile` and `ReadFromStdin` effect which you pass to a procedure that then delimits based off that
22:30:39FromDiscord<Elegantbeef> Given that i'd say that what i provided in the link is indeed an effect system
22:30:46FromDiscord<Elegantbeef> If you missed the link here it is again https://play.nim-lang.org/#ix=4fVe
22:30:54FromDiscord<Elegantbeef> Seems like a bug
22:31:26FromDiscord<.tochka> In reply to @GalacticColourisation "in nim it's just": what is this pedantism about one single word lul
22:31:30FromDiscord<Elegantbeef> Wait no
22:31:37FromDiscord<Elegantbeef> `.nims` is used for config
22:31:44FromDiscord<Elegantbeef> `a.nims` is a config file for `a.nim`
22:31:54FromDiscord<Elegantbeef> If you read the `config file used` message you'll see that
22:32:17FromDiscord<Elegantbeef> FP pedantry is a scourge, but I learned something new↵(@.tochka)
22:32:23FromDiscord<Elegantbeef> So why am i complaining 😄
22:32:33FromDiscord<emanresu3> Oh really? I didn't know that, I was using `.nims` files for scripts. Thanks for the info
22:32:49FromDiscord<Elegantbeef> I should specify they're a config file when sitting next to eachother
22:32:51FromDiscord<GalacticColourisation> In reply to @.tochka "what is this pedantism": well, effect systems is a very active and specific area of study right now, it's important not to mistake things for what they are not, otherwise it'll cause even more confusion for everyone
22:32:55FromDiscord<Elegantbeef> `config.nims` is also a config file
22:33:13FromDiscord<Elegantbeef> Well to be fair i made what might be considered a effect system in like 40 lines of code
22:33:20FromDiscord<Elegantbeef> So perhaps Nim has an effect system 😛
22:33:36FromDiscord<huantian> I mean nim has anything if you code it yourself lmao
22:33:50FromDiscord<Elegantbeef> Of course
22:34:02FromDiscord<Elegantbeef> But the issue is mainly that `effectTraits` lacks a `hasTag`
22:34:07FromDiscord<GalacticColourisation> In reply to @Elegantbeef "So perhaps Nim has": my point wasn't that it was impossible, it's that the website is using the wrong technical concept for the wrong concept they're implementing
22:34:35FromDiscord<.tochka> In reply to @Elegantbeef "So perhaps Nim has": nim is every language at the same time in fact
22:34:45FromDiscord<Elegantbeef> If you add a `hasTags` macro to effect traits, we can say it does indeed have a manually dispatched effect system and tracking
22:35:02FromDiscord<Elegantbeef> Tochka i'm surprised you havent gone for the "it's python joke"
22:35:07FromDiscord<Elegantbeef> How goes your Nim project you oddball
22:35:58FromDiscord<dizzyliam> I'm getting a `SIGSEGV: Illegal storage access.` during compilation to JS. Looks like the compiler is failing just as macro code finishes, so maybe a nimscript VM thing? Any ideas?
22:36:03FromDiscord<.tochka> In reply to @Elegantbeef "How goes your Nim": dead again
22:36:24FromDiscord<Elegantbeef> Clone the Nim repo do `./build_all.sh` then `./koch temp c ./myNim.nim`↵(@dizzyliam)
22:37:08FromDiscord<Elegantbeef> Sounds like some AST bug that needs to be fixed
22:37:39FromDiscord<dizzyliam> Will do
22:38:03FromDiscord<Elegantbeef> Thinking about effects i do wonder how much code gets broken if tags become apart of the type definition
22:38:32FromDiscord<.tochka> In reply to @.tochka "dead again": learned that gl 2.1 is pretty much useless, and i only have this on ancient laptop of mine
22:38:34FromDiscord<huantian> I mean there's a reason why nim has what it has
22:38:45FromDiscord<huantian> it's a non-invasive, opt in way to do effects tracking
22:38:58FromDiscord<Elegantbeef> Sure but when in rome
22:39:15FromDiscord<Elegantbeef> Oh ya anything below gl3.3 is a bit of a mess
22:39:25FromDiscord<Elegantbeef> And even then it's a bit of mess compared to gl4.5+
22:39:41FromDiscord<Elegantbeef> Though it's totally usable for simple things
22:39:54FromDiscord<.tochka> you can use it, i guess, but it has no way of optimizing things for cases i wanted
22:40:17FromDiscord<.tochka> no bitwise operators in glsl, only one integer type and etc.
22:40:21FromDiscord<Elegantbeef> It doesnt have compute shaders or ssbos so i'm always a bit put off by it
22:40:36FromDiscord<Elegantbeef> "You want me to copy data to a texture then use that texture for instanced rendering and the like?!"
22:41:01FromDiscord<huantian> In reply to @Elegantbeef "Sure but when in": in rome?
22:41:17FromDiscord<Elegantbeef> When you have effect tracking
22:44:39FromDiscord<.tochka> In reply to @GalacticColourisation "well, effect systems is": i dont get your reasoning, nothing claims that something is something just by its name being similar, and every implementation of effect system is different, esp between koka and haskell, which doesnt have handlers, for example. and you can find mentions of nim 'effect system' before current abundance of papers about 'the true and only effect system'
22:46:29FromDiscord<GalacticColourisation> > could have, if you ↵which one are you saying doesn't have handlers
22:46:44FromDiscord<GalacticColourisation> (edit) "could have, if you ↵which" => "esp between koka and haskell, which doesnt have handlers↵which"
22:48:01FromDiscord<GalacticColourisation> koka obviously does, haskell has effect system libraries that do like polysemy, eff, and mtl (mtl is the defacto effect system in haskell)
22:48:05FromDiscord<.tochka> haskell has handlers implemented in packages, not as a language feature, that's what im saying
22:49:03FromDiscord<.tochka> ok time to stop :D
22:49:31FromDiscord<GalacticColourisation> i don't understand how that goes against what i'm saying. mtl and transformers are packages that come packaged with all haskell installs, and they're the main effect systems which use basic monads, the ones that most intermediate haskell developers are familiar with. polysemy and eff are less common but implement handlers anyways.
22:51:26FromDiscord<GalacticColourisation> (edit) "monads," => "monad transformers,"
22:57:06FromDiscord<Mycsina> Hey, is there a reason why post from httpclient doesn't take a headers param while request does?
22:58:16FromDiscord<GalacticColourisation> essentially, the point of effect systems is to have a function that causes subeffects, and by running effect handlers through it, we "simplify" it to a pure function.
23:16:05*krux02 quit (Remote host closed the connection)
23:26:31FromDiscord<pietroppeter> fixed p5js (cc @rlipsc, the fix is on my fork), created some examples and published them with nimib. it is so much fun! https://pietroppeter.github.io/nim-p5/
23:34:39FromDiscord<Elegantbeef> Did i annoy you with me adding worlds? 😄
23:34:54FromDiscord<Elegantbeef> The API is more sane now! So I guess thanks
23:38:00FromDiscord<pietroppeter> oh, no actually I will have to create a nblog post also with your ECS and the code you shared! 😄
23:42:52FromDiscord<pietroppeter> reminder! https://github.com/pietroppeter/nblog/issues/15
23:46:42FromDiscord<emanresu3> Is the `collect` macro with no init parameter (https://nim-lang.org/docs/sugar.html#collect.m%2Cuntyped) deprecated? I can't get the example to compile
23:47:09NimEventerNew post on r/nim by Greenscarf_005: nim-chan, see https://reddit.com/r/nim/comments/yvgmkc/nimchan/
23:54:50FromDiscord<Elegantbeef> The example left out `import std/[sugar,...]`
23:56:02FromDiscord<emanresu3> I did import sugar as well
23:56:06FromDiscord<Elegantbeef> Oh cool, that code is deprecated now though https://github.com/beef331/nimtrest/blob/master/toys%20of%20toys/ecs.nim is the more "correct" version↵(@pietroppeter)
23:56:31FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=4fVq works fine so idk what to say
23:58:05*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)