<< 02-08-2022 >>

00:04:51FromDiscord<Tuatarian> would it be possible to, instead of computing the rollout step with MCTS, just use a simple heuristic evaluator?
00:05:01FromDiscord<Tuatarian> computing rollout seems insanely expensive and also unreliable
00:05:19FromDiscord<Tuatarian> and I think it would take crazy amounts of time for the game I'm trying to build an engine for
00:13:10FromDiscord<Tuatarian> probably not, right? kind of violates the theoretical idea of the entire algo
00:14:43FromDiscord<neon_> btw if anyone was wondering how i fixed the problem i had yesterday i added -static to the linker options and it worked
00:17:04FromDiscord<neon_> In reply to @neon_ "on another note would": for reference i also added the linker options for the windows networking library
00:17:29FromDiscord<neon_> now it all packs into a static binary
00:17:57FromDiscord<konradmb> How can I define hooks in external module for an user to implement later - like https://github.com/treeform/jsony does?
00:18:10FromDiscord<Elegantbeef> `mixin`
00:18:13*wallabra_ joined #nim
00:18:27FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#generics-mixin-statement
00:20:26*wallabra quit (Ping timeout: 255 seconds)
00:20:26*wallabra_ is now known as wallabra
00:21:55FromDiscord<Superstart033> `resultVar2() == "I will be returned"` [AssertionDefect]↵`Error: execution of an external program failed`↵This error keeps happening, someone knows why? https://media.discordapp.net/attachments/371759389889003532/1003819903100399647/unknown.png
00:22:16FromDiscord<Superstart033> I'm using the example from "Nim in Action"
00:23:17FromDiscord<konradmb> Elegantbeef\: Ok, thanks. So it only works in generics? So I guess there's no way to do it in "normal" procs?
00:23:40FromDiscord<!Patitotective> youre missing the last dot @Superstart033
00:23:50FromDiscord<Elegantbeef> hooks dont make sense in normal procs
00:24:12FromDiscord<Superstart033> In reply to @Patitotective "youre missing the last": Thank you
00:24:44FromDiscord<Elegantbeef> i mean since non generics arent instantiated there is no new scope
00:24:50FromDiscord<Superstart033> Why did the bots tag each other?
00:24:56FromDiscord<Elegantbeef> perhaps use a template instead
00:25:47FromDiscord<Elegantbeef> we arent bots↵(@Superstart033)
00:25:58FromDiscord<Superstart033> Lol
00:26:07*TakinOver joined #nim
00:26:10*TakinOver quit (Read error: Connection reset by peer)
00:27:10FromDiscord<!Patitotective> In reply to @Elegantbeef "we arent bots (<@179666061795262464>)": they are, dont listen to them
00:27:53FromDiscord<konradmb> @Superstart033\: To continue using this server please enter CAPTCHA\: N̴̈̚i̴̛̿m̷̋̉ ̵̒̄i̸͌̊s̸̛͂ ̵͊̚ť̸͛h̴̛̀e̴͑̈́ ̷́͑k̴͊̔i̵͋̊n̷̓͛g̷̈̅
00:27:57*TakinOver joined #nim
00:28:38FromDiscord<!Patitotective> LMAO
00:29:05FromDiscord<Superstart033> https://tenor.com/view/vacuum-chase-run-scared-gif-3985014
00:29:05FromDiscord<voidwalker> I find it very funny that we get very beginner questions from people buyin that book, even though it's not a book for beginners, except the very first part
00:29:17*krux02 quit (Remote host closed the connection)
00:29:33FromDiscord<voidwalker> A part that feels somewhat stitched together to the rest
00:29:47FromDiscord<Superstart033> In reply to @voidwalker "I find it very": I'm not a beginner, I just not good noticing those small errors sometimes
00:30:24FromDiscord<Superstart033> I was honestly expecting a false as a result, not an error
00:30:34FromDiscord<!Patitotective> beef, i will again translate c++ code manually instead of wrapping it 😁 ↵ill never touch c++ 💀
00:30:42FromDiscord<Superstart033> Lul
00:31:12FromDiscord<Prestige> In reply to @Patitotective "beef, i will again": Same
00:31:38FromDiscord<!Patitotective> carbon is not killing c++↵we are
00:33:14FromDiscord<Prestige> Google will do that anyway
00:35:40FromDiscord<Superstart033> Apparently Golang lives
00:36:02FromDiscord<Superstart033> And Dart is still use
00:36:13FromDiscord<Elegantbeef> doubt
00:36:17FromDiscord<Prestige> Same
00:36:20FromDiscord<Superstart033> So Carbon will live for a while after 1.0
00:36:31qwrcarbon exists because google has some weird build-the-world development process
00:36:48FromDiscord<!Patitotective> In reply to @Elegantbeef "doubt": hes a quantic bot LOL
00:37:00FromDiscord<Superstart033> Lmao
00:37:17FromDiscord<Superstart033> In reply to @qwr "carbon exists because google": Build-the-world?
00:37:30FromDiscord<Elegantbeef> Full on NIH syndrome
00:37:34qwrappearantly D-lang didn't work for google either, or they're really into NIH
00:41:37FromDiscord<Prestige> I don't really care if it takes off or not tbh
00:42:35FromDiscord<Superstart033> I don’t think many people should care at the moment, is too young and unstable to be something to be taken seriously imo
00:43:06FromDiscord<Elegantbeef> What you think `let a:!: f32 = 0` makes sense?!
00:43:18FromDiscord<Prestige> what the fuck is that
00:43:22FromDiscord<Elegantbeef> whoops that's supposed to be `a:! f32`
00:43:42FromDiscord<Prestige> magic nonsense eh
00:43:48FromDiscord<Superstart033> Bruh
00:43:55FromDiscord<Prestige> Does that mean like, must be initialized?
00:44:10FromDiscord<Elegantbeef> That's how carbon declares a constant
00:44:15FromDiscord<Prestige> my god, why
00:44:47FromDiscord<Prestige> In reply to @Superstart033 "I don’t think many": I mean I'm not going to care, I mostly care about what will happen with Nim
00:44:57FromDiscord<Elegantbeef> `const a` was too dificult 😄
00:44:58FromDiscord<Elegantbeef> No it's a constant
00:45:07FromDiscord<Elegantbeef> it's the same as `const a: float32 = 0`
00:45:13FromDiscord<Elegantbeef> in nim\
00:45:19FromDiscord<Superstart033> What will happen with Nim?
00:45:24FromDiscord<Superstart033> :nim1:
00:45:44qwrcompare https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2137r0.html and https://github.com/carbon-language/carbon-lang/blob/trunk/docs/project/goals.md#non-goals
00:46:13qwrbut yeah, carbon isn't interesting, if you are not google
00:46:41FromDiscord<Prestige> In reply to @Superstart033 "What will happen with": at this point I'm mostly hoping for better editor support and I'll be happy
00:47:14FromDiscord<Superstart033> I’m not having much problems myself, but I’m just coping the simplest things from the book
00:47:28FromDiscord<Superstart033> What kind of problems do you mean?
00:48:24FromDiscord<ajusa> Google uses open source code
00:48:30FromDiscord<Prestige> Editor problems? Getting errors from nimsuggest that aren't real (code compiles fine), not getting warnings I should be getting, better LSP support, better autocompletion, etc etc
00:48:59FromDiscord<ajusa> but yes, they have a ton of internal tools that are all invented there
00:50:16FromDiscord<j-james> In reply to @Avahe "Editor problems? Getting errors": editor support got significantly better when i switched from vscode+vscode-nim to sublime + the lsp
00:50:28FromDiscord<j-james> (edit) "vscode+vscode-nim" => "vscode + vscode-nim"
00:50:52FromDiscord<Prestige> Nimsuggest constantly crashing I believe is the main problme
00:50:53FromDiscord<Prestige> (edit) "problme" => "problem"
00:51:09FromDiscord<Superstart033> So is “out of memory” one of those problems?
00:51:18FromDiscord<Superstart033> Because that just happened to me
00:51:26FromDiscord<Prestige> Not usually
00:52:01FromDiscord<Superstart033> This is the first time a programming language literally tells me that is out of memory
00:52:43FromDiscord<Elegantbeef> The hell are you doing that it goes out of memory
00:53:11FromDiscord<Superstart033> I’m literally just copying from the book
00:53:16FromDiscord<Superstart033> I think is my pc itself
00:53:34FromDiscord<Elegantbeef> Yea if you're low on ram and attempt to allocate you'd get an out of memory error
00:53:35FromDiscord<Superstart033> It’s completely frozen right now
00:53:53FromDiscord<Superstart033> Welp
01:02:22FromDiscord<!Patitotective> In reply to @j-james "editor support got significantly": really? when i tried nimlsp in sublime it worked for a while and then just stopped working and blocked sublime auto-completions so using it was even worse than not using it
01:04:37*CyberTailor_ joined #nim
01:04:48FromDiscord<neon_> can the irc / matrix bridge bots also translate discord reactions?
01:05:11FromDiscord<Elegantbeef> Nope
01:05:23FromDiscord<Elegantbeef> I mean it's technically possible for matrix but the bridge doesnt do it
01:05:39FromDiscord<!Patitotective> In reply to @neon_ "can the irc /": they live in a joyless world
01:05:48FromDiscord<neon_> yeah i can see :(
01:06:09FromDiscord<neon_> is it custom written or just cloned from a repo
01:06:19*CyberTailor quit (Remote host closed the connection)
01:06:38FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1003831157705670857/image.png
01:07:12FromDiscord<neon_> dayum images go througg???
01:07:36FromDiscord<Elegantbeef> Matrix is a multimedia protocol
01:08:44FromDiscord<neon_> is the bridge written in nim
01:09:31FromDiscord<Elegantbeef> no
01:09:42FromDiscord<neon_> :(
01:10:31FromDiscord<neon_> would it be possible to dynamically load nim files like discord bots in javascript load commands from .js files?
01:10:51FromDiscord<Elegantbeef> You could use a plugin system but it'd be a lot of work for no reward
01:11:42FromDiscord<neon_> yeah at that point its prolly better to just use a cicd to autocompile
01:12:01FromDiscord<neon_> or have seperate binaries and use a rpc based system
01:13:29FromDiscord<Elegantbeef> Or just recompile the bot cause it takes like 10s on release probably
01:16:18FromDiscord<neon_> yeah yeah but if you wanted to automate it u just use some actions platform that listens to a git repo then autocompiles it and pushes the binary (or docker container) to the target machine
01:16:33FromDiscord<neon_> my inner devops is taking over😩
01:17:08FromDiscord<!Patitotective> In reply to @Elegantbeef "image.png": lmaooo https://media.discordapp.net/attachments/371759389889003532/1003833797005017188/unknown.png
01:17:19FromDiscord<!Patitotective> In reply to @neon_ "is the bridge written": beef doesnt want to :[
01:18:40FromDiscord<neon_> what did he write it in
01:19:04FromDiscord<Elegantbeef> I didnt write the bridge
01:19:08FromDiscord<!Patitotective> i mean, he doesnt want to rewrite
01:19:10FromDiscord<!Patitotective> lmao
01:19:19FromDiscord<!Patitotective> (edit) "i mean, he doesnt want to rewrite ... " added "it"
01:19:23FromDiscord<Elegantbeef> I dont even know which bridge is used
01:32:45FromDiscord<j-james> In reply to @Patitotective "really? when i tried": yeah it works great
01:32:59FromDiscord<j-james> nimlime with no syntax checking + nimlsp
01:33:50FromDiscord<!Patitotective> :/
01:56:03FromDiscord<#!/rip/luke> What is the best mongodb lib
01:57:10FromDiscord<voidwalker> Trying to grasp my head around this async thing. What is wrong with this code? :
01:57:25FromDiscord<voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=46oa
01:57:38FromDiscord<voidwalker> trying to get it to close the connection after N bytes read
02:00:33FromDiscord<huantian> Maybe it’s cus readAll waits until the connection is completely finished?
02:01:04FromDiscord<huantian> I also can’t remember if streaming requests are bugged or not lol
02:03:14FromDiscord<voidwalker> Hm don't remember where I picked that one from, but it seems readAll is for normal streams, not future streams
02:07:20FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=46oe
02:09:02FromDiscord<huantian> Maybe actually don’t await, just asyncCheck
02:09:10FromDiscord<voidwalker> let body = await resp.body ?
02:09:22FromDiscord<!Patitotective> In reply to @voidwalker "let body = await": yes
02:09:24FromDiscord<huantian> That way you can do stuff as the body is being read
02:09:26FromDiscord<!Patitotective> it just reads the body stream
02:09:53FromDiscord<!Patitotective> oh actually no
02:10:06FromDiscord<!Patitotective> it will read the whole body stream
02:10:11FromDiscord<!Patitotective> readAll will too
02:10:48FromDiscord<voidwalker> welp, both streams and async are foreign concepts to me
02:11:25FromDiscord<!Patitotective> https://nim-lang.org/docs/asyncstreams.html#len%2CFutureStream%5BT%5D
02:11:27FromDiscord<voidwalker> Wish there was some video animation of such a program running step by step, and its internal state
02:11:36FromDiscord<!Patitotective> read the docs https://nim-lang.org/docs/asyncdispatch.html
02:15:09*arkurious quit (Quit: Leaving)
02:22:03FromDiscord<voidwalker> I read that but it's not clear enough for a beginner in the topic :\
02:22:22FromDiscord<voidwalker> just searched for "await" in the mastering nim book.. 0 results nice
02:22:34FromDiscord<voidwalker> how can you master nim if you can't do async
02:23:58FromDiscord<Elegantbeef> You become me and hardly ever use asnyc
02:24:04FromDiscord<Elegantbeef> so little i cannot spell it
02:24:14FromDiscord<!Patitotective> In reply to @voidwalker "I read that but": it was also hard to me to understand asynchronous stuff but you can search for "async/await programing" in google and youll be able to apply those concepts in nim
02:24:47FromDiscord<voidwalker> I remember dom's book had a pretty elaborate explanation, I should return to that
02:27:46FromDiscord<voidwalker> `A procedure can be executed in a new thread using the spawn procedure. `
02:27:58FromDiscord<!Patitotective> those are threads
02:33:50*wallabra quit (Ping timeout: 240 seconds)
02:45:50FromDiscord<crack81> The autocomplete doesn't work in vscode , already installed the nim plugin, any clue about it?
02:46:32FromDiscord<Elegantbeef> If you arent using niimsaem's you should be
02:48:21FromDiscord<crack81> FYI I am using w11 and nim is installed and the path configured
02:48:33FromDiscord<crack81> (edit) "FYI I am using w11 and nim is installed and the path ... configured" added " is"
02:52:36NimEventerNew post on r/nim by Ruri: Newbie Question about Proc Declaration, see https://reddit.com/r/nim/comments/we08zs/newbie_question_about_proc_declaration/
02:58:29*pch quit (Quit: Leaving)
03:06:01*dextop_ is now known as dextop
03:21:56FromDiscord<!Patitotective> sent a code paste, see https://paste.rs/5J1
03:24:28FromDiscord<huantian> what is Toast?
03:24:41FromDiscord<!Patitotective> an object
03:24:49FromDiscord<!Patitotective> do i send it?
03:25:07FromDiscord<flywind> Toast is marked as requiresInit?
03:25:36FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=46ok
03:26:33FromDiscord<flywind> sent a code paste, see https://play.nim-lang.org/#ix=46ol
03:26:46FromDiscord<huantian> maybe it's cus Positive defaults to 0?
03:27:12FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=46om
03:27:17FromDiscord<huantian> !eval echo default(Positive)
03:27:20NimBot0
03:27:26FromDiscord<flywind> (edit) "https://play.nim-lang.org/#ix=46ol" => "https://play.nim-lang.org/#ix=46on"
03:28:36FromDiscord<huantian> sent a code paste, see https://play.nim-lang.org/#ix=46oo
03:28:46FromDiscord<!Patitotective> :/
03:29:55*CyberTailor_ quit (Remote host closed the connection)
03:31:05*CyberTailor_ joined #nim
03:31:44FromDiscord<Elegantbeef> It's telling you "The sequence can grow and you may not like the result"
03:33:57FromDiscord<!Patitotective> im iterating through a `seq[Toast]` and since i can delete an element inside the loop im `deepCopy`ing it↵not sure if its a good idea :/
03:35:00FromDiscord<Elegantbeef> Doesnt sound like a good idea
03:36:09FromDiscord<!Patitotective> soooo should i `mySeq.delete(mySeq.find(ele))`
03:36:10FromDiscord<!Patitotective> (edit) "`mySeq.delete(mySeq.find(ele))`" => "`mySeq.delete(mySeq.find(ele))`?"
03:36:46FromDiscord<Elegantbeef> You should check if it's \>= 0 and probably use `del` if you dont need them in order
03:37:13FromDiscord<!Patitotective> :]
03:41:20FromDiscord<!Patitotective> 🌃
04:06:02*dextop quit (Quit: WeeChat 2.8)
04:41:58FromDiscord<#!/rip/luke> Is it a good idea to have a database with a .nim file
04:42:39FromDiscord<#!/rip/luke> Like it can use type to define objects
04:45:09FromDiscord<&Makarov/1> Hello guys .. i hope you re doing well , i got all the time this question
04:45:41FromDiscord<&Makarov/1> Why using nim rather than rust
04:45:46FromDiscord<&Makarov/1> Or rather than zig
04:45:58FromDiscord<that_dude> Because nim is cool
04:46:03FromDiscord<that_dude> simple as
04:46:14FromDiscord<Prestige> It's easier to read and write, and has comparable performance to rust and zig
04:46:15FromDiscord<Elegantbeef> It's a more expressive language that has a different type system to Rust or Zig
04:48:10FromDiscord<&Makarov/1> In reply to @Elegantbeef "It's a more expressive": By expressive you mean what exactly ?
04:48:55FromDiscord<Elegantbeef> It's very easy to write and doesnt require writing a lot to get to the point
04:49:11FromDiscord<Elegantbeef> Compare that to Zig's method of generics or rust in general
04:49:53FromDiscord<&Makarov/1> In reply to @Elegantbeef "Compare that to Zig's": Can u pls give me an example of that 🙏
04:51:06FromDiscord<gibson> @that_dude easier to read/write/share with novices, great performance, runs everywhere. I love how like Rust nim assumes safety for you, but unlike Rust doesn't berate you for playing around just to get something to work, but Nim lets you adjust all the nuts and bolts to achieve very similar safety and assurances and performance tweaks, should you care (unsafe memory, exception tracking, pure funcs, noinit)
04:54:07FromDiscord<&Makarov/1> In reply to @gibson "<@532751332445257729> easier to read/write/share": Hmmm
04:54:18FromDiscord<that_dude> Don't think you pinged the right person lol
04:55:03FromDiscord<gibson> Oops, you're right. Can I change it?...
04:55:22FromDiscord<that_dude> Maybe change the message, but he understood so it's prob fine
04:56:49FromDiscord<gibson> sent a code paste, see https://play.nim-lang.org/#ix=46pd
05:03:01FromDiscord<gibson> Or compile-time parameter pack indexing, which is notoriously difficult in C++, to get the Nth element of an iterable object, is insanely easy in Nim, using the same syntax you would use to do it at runtime. For instance, here is the C++ talk from May 2022 on exactly this topic. https://www.youtube.com/watch?v=LfOh0DwTP00
05:04:08FromDiscord<b1rdf00d> I'm interested in Zig, but it has not operator overloading or macros. And it's manually memory managed (which I'd like to practice)
05:04:24FromDiscord<Elegantbeef> You can practice with Nim 😛
05:04:54FromDiscord<b1rdf00d> also strings are just arrays of u8 and doing the AOC with zig started to become a bit tedious
05:05:26FromDiscord<b1rdf00d> Nim feels like a dynamic language, but it's typed and compiled
05:05:27FromDiscord<gibson> Yeah, honestly practicing manual memory management in Nim has been very fun, because any of the stuff you _don't_ want to spend time doing, you don't have to, and you can focus on whatever the heart of your fancy algorithm is.
05:06:11FromDiscord<b1rdf00d> I'm interested in the custom allocators in Zig, and defer. Thinking I might try to follow Crafting Interpreters using Zig instead of C
05:06:26FromDiscord<Elegantbeef> Shame
05:06:43FromDiscord<b1rdf00d> But yes, having access to it when you want to instead of being forced to all the time is a great part of Nim
05:08:07FromDiscord<b1rdf00d> In reply to @Elegantbeef "Shame": Actually, I think it would help me better understand what I'm doing when writing Nim. I ran into a question with `ref` on the weekend and I think if I'd had more recent experience with a manually memory managed language I would have understood better
05:08:13FromDiscord<Elegantbeef> Personally i'd rather use odin than zig, as it has features i'd like
05:08:25FromDiscord<Elegantbeef> Sure but why not just use Nim with manual memory management?
05:08:51FromDiscord<b1rdf00d> In reply to @Elegantbeef "Sure but why not": Actually this is a good point. I might do this instead
05:08:52FromDiscord<Elegantbeef> `--mm:none -d:useMalloc` and valgrind to ensure you dont leak
05:09:32FromDiscord<Elegantbeef> Odin actually has distincts and bitsets
05:10:02FromDiscord<Elegantbeef> Oh and enum indexed arrays 😄
05:10:27FromDiscord<b1rdf00d> Odin is interesting to me too, a couple of things I'm not sure about: not sure I'm "correct" enough as a developer for Ginger Bill's standards, errors are just handled as an additional return var. ↵↵String handling in Odin seems much nicer than in Zig and it does also have custom allocators
05:10:56FromDiscord<Elegantbeef> Yea the multiple return type for error handling i dislike
05:11:11FromDiscord<Elegantbeef> I'm an odd duck as i prefer exceptions
05:11:33FromDiscord<b1rdf00d> I went to install valgrind the other night to profile my ray tracer but apple silicon is not yet supported, might have to do it on my 2012 air
05:12:19FromDiscord<Elegantbeef> wonders if it works with linux
05:12:55FromDiscord<b1rdf00d> actually yeah I might try installing a linux VM
05:13:08FromDiscord<Elegantbeef> I more meant running linux natively 😄
05:13:22FromDiscord<b1rdf00d> ah yep, been there
05:13:45FromDiscord<Elegantbeef> I'd imagine valgrind there would work
05:13:55FromDiscord<b1rdf00d> I'm tempted to go back, but can't for work and kinda can't be bothered for my personal machine
05:14:36FromDiscord<Elegantbeef> cmon if linus can develop linux on it you can develop whatever you need on it 😛
05:18:33FromDiscord<huantian> did you know linux switched to asahi?
05:18:38FromDiscord<huantian> and is on an macbook now
05:18:51FromDiscord<huantian> which is like ↵cool but apple
05:19:03FromDiscord<huantian> (edit) "linux" => "linus"
05:19:42FromDiscord<b1rdf00d> yeah it's impressive
05:21:17FromDiscord<Prestige> sounds like a poor choice imo
05:24:11FromDiscord<flywind> !eval import std/macros; dumpTree: let x = block: 12
05:24:13NimBotCompile failed: /usercode/in.nim(1, 30) Error: expression expected, but found 'keyword let'
05:26:56FromDiscord<flywind> Is there a reason for block expressions and block statements share the same node kind: nkBlockStmt?
05:27:14FromDiscord<flywind> sent a code paste, see https://play.nim-lang.org/#ix=46pr
05:27:37FromDiscord<flywind> sent a code paste, see https://play.nim-lang.org/#ix=46ps
05:29:42FromDiscord<b1rdf00d> In reply to @huantian "did you know linus": oh Linus did, that I did not know
05:29:58FromDiscord<flywind> In reply to @flywind "Is there a reason": So does `nkCaseStmt`.
05:30:01FromDiscord<huantian> yeah typo sorry lol
05:54:37*jmdaemon joined #nim
06:00:41FromDiscord<wiga> any idea how i can additionate floats with integer? https://media.discordapp.net/attachments/371759389889003532/1003905155982426172/unknown.png
06:01:58FromDiscord<Prestige> You mean add? Lol
06:02:09FromDiscord<Prestige> `float(someInt) + 0.5`
06:02:15FromDiscord<wiga> In reply to @Avahe "You mean add? Lol": french, dont mind
06:02:19FromDiscord<wiga> In reply to @Avahe "`float(someInt) + 0.5`": ty
06:09:11FromDiscord<Prestige> Is there a way to make a `set` filled with all values from an enum? Or do I just have to create the set
06:09:32FromDiscord<Girvo> I didn't realise Asahi is so far along it can be run. Nice, I might setup my M1 Pro to run it
06:16:18FromDiscord<Prestige> Elegantbeef help me out here ^
06:23:39*CyberTailor_ quit (Remote host closed the connection)
06:27:28*CyberTailor_ joined #nim
06:32:00FromDiscord<Prestige> I'm basically trying to get a random value from an enum, _excluding_ any values the user passes in. Was planning on uses sets, it's been a pita so far
06:33:00FromDiscord<Phil> sent a long message, see http://ix.io/46pK
06:34:29FromDiscord<&Makarov/1> In reply to @Isofruit "As someone who tried": Thanks for this explanation !!
06:36:29FromDiscord<Girvo> Tbh, thats because Rust is honestly a _bad fit_ for web development/modern back-end dev. Its not what it's good at, IMHO
06:36:53FromDiscord<Girvo> I know a lot of people are putting a lot of work into trying to make it happen, but it really feels like a square-peg round-hole situation to me
06:38:56*CyberTailor_ quit (Remote host closed the connection)
06:39:16FromDiscord<Girvo> Honestly a lot of what it gets pushed for by the Rust crowd it's a bad fit for lol
06:39:32FromDiscord<Phil> In reply to @Girvo "Tbh, thats because Rust": I do not think myself experienced enough to be able to evaluate that, so that's likely true.↵Would you say that because of the push for correctness or what feature makes it so?
06:39:34FromDiscord<Girvo> And I say that as someone who _likes_ the language. Though I feel Nim is superior in most ways for most projects
06:39:46FromDiscord<huantian> man I actually need to try rust at some point
06:40:00FromDiscord<Phil> In reply to @huantian "man I actually need": The one thing you'll really like is pattern matching. Man that is a nice feature
06:40:01*CyberTailor_ joined #nim
06:40:09FromDiscord<Phil> That and Result types
06:40:11FromDiscord<Phil> chef's kiss
06:40:30FromDiscord<Girvo> Web development/server dev is all about stringly-typed stuff, and munging incoming/outgoing data in various forms. Its why dynamic-ish scripting languages are so great at it, for example. It's the antithesis of Rusts correctness checking 🙂
06:40:49FromDiscord<Girvo> At the end of the day, HTTP Is all about strings and doing weird stuff to them 😉
06:41:06FromDiscord<Girvo> That, and Rusts async story is _still_ not sorted out fully yet
06:41:10FromDiscord<Girvo> Which is a pretty big blocker, IMO
06:41:11FromDiscord<Phil> In reply to @Girvo "Web development/server dev is": Hmm but wouldn't nim also be bad at it then?
06:41:39FromDiscord<huantian> In reply to @Girvo "That, and Rusts async": you say that like nim async is perfect 🙃
06:41:43FromDiscord<Phil> Or maybe I am biased at this point, I've spent 3 times the amount with nim than I have with rust
06:41:44FromDiscord<Girvo> Nim is _great_ at munging strings though 😄 Or, should I say, it _can_ be, because you can be a strict or as loosey-goosey as you need to be
06:41:53FromDiscord<Girvo> In reply to @huantian "you say that like": No I didn't 😉
06:42:06FromDiscord<Girvo> Its one of my main pain-points in Nim still today haha
06:42:31FromDiscord<Phil> In reply to @Girvo "Nim is _great_ at": How does one evaluate that? Or is that because Rust has 2 different string types that you need to deal with?
06:42:37*CyberTailor_ quit (Remote host closed the connection)
06:42:51FromDiscord<Girvo> Rusts big benefit is `serde` though. Fantastic project that is great at marshalling data into and out of various forms
06:42:51FromDiscord<huantian> In reply to @Girvo "Nim is _great_ at": I really like how nim strings are just ascii bytes
06:43:17FromDiscord<huantian> you don't have to worry about encoding until you have to worry about it
06:43:31FromDiscord<Girvo> @huantian I have a love-hate relationship with that
06:43:57FromDiscord<Elegantbeef> sample the random difference of a set and the given value?↵(@Prestige)
06:44:14*CyberTailor_ joined #nim
06:44:18FromDiscord<Elegantbeef> `enumutils` if it wasnt pointed out
06:44:23FromDiscord<Girvo> I _love_ it because for the work I'm doing right now, its perfect. I can't waste cycles on my tiny processor for UTF-8. But for larger network projects that deliver stuff to a users browser, I'd prefer UTF-8 by-default. PHP rightfully caught a lot of flack for being ASCII-first up until recently
06:44:24FromDiscord<Phil> In reply to @huantian "you don't have to": It's kinda funny to me that generating a random string is honestly faster by just generating random bytes with syrand and base64 encoding them than choosing a random character from a set of character n times
06:44:49FromDiscord<Prestige> In reply to @Elegantbeef "sample the random difference": Yeah that's my goal. Thanks I'll check out enumutils
06:44:54FromDiscord<Phil> Which I assume the entire byte-thing plays into
06:45:10FromDiscord<Bung> how to get privilege for manage services in windows?
06:45:25FromDiscord<Phil> ... context?
06:45:39FromDiscord<Girvo> @Bung you mean trigger a UAC prompt to ask for that perm?
06:45:46FromDiscord<Bung> fails to call OpenSCManager with code 5
06:46:15FromDiscord<Bung> prompt or not I dont care
06:46:41FromDiscord<Bung> I just want run a program stop some services
06:47:06FromDiscord<Girvo> Right click -> run as admin?
06:47:17FromDiscord<Girvo> Or do you need to do it programatically?
06:47:52FromDiscord<Bung> https://github.com/bung87/gamode/blob/main/src/gamode/srv.nim
06:47:54FromDiscord<Girvo> I believe if you ensure your binary is named `EXAMPLE_setup.exe` windows will automatically request elevated privileges
06:49:04FromDiscord<Bung> ah, haven't pack as installer , just debuging through `nim c -r `
06:49:21FromDiscord<Girvo> Ah that's why 🙂
06:50:01FromDiscord<Girvo> You can in theory turn `nim.exe` into needing Admin permissions lol but that might be annoying
06:50:37FromDiscord<huantian> In reply to @Girvo "I believe if you": wait whattttttt I didn't know this
06:50:39FromDiscord<Bung> hmm let me try manually run as admin first
06:50:50FromDiscord<Girvo> If you find the `.exe` file that your `nim c` has built, you can right click it -> properties -> "Run this program as administrator"
06:51:00FromDiscord<Girvo> But it'll likely get wiped each time you rebuild
06:51:17FromDiscord<Girvo> @huantian It definitely used to work that way back in Windows 7! It's possible it has changed mind you
06:52:55FromDiscord<Bung> yeah , it's work, thanks. my program works as expected.
06:52:58FromDiscord<Girvo> If you want it to start with User permissions by default, and request a UAC prompt to get Admin at run-time, you'll likely need to do some COM fiddling.↵https://docs.microsoft.com/en-us/windows/win32/com/the-com-elevation-moniker
06:53:16FromDiscord<Girvo> Basically use `CoGetObject` to create an elevated operation, to manage services for example
06:53:24FromDiscord<Girvo> But this is left as an exercise to the reader 😉
06:58:59FromDiscord<Bung> I understand , register com app to registry then send request prompt to get privileges
07:01:20FromDiscord<Bung> btw , do you load how to switch keyboard layout in program?
07:01:34FromDiscord<Bung> (edit) "load how" => "knowhow"
07:01:41FromDiscord<Bung> (edit) "knowhow" => "know how"
07:02:26FromDiscord<Bung> I tried `ActivateKeyboardLayout` doesn't seem to work
07:08:14*gsalazar quit (Quit: Leaving)
07:08:29*gsalazar joined #nim
07:11:28FromDiscord<Prestige> Elegantbeef: I'm not sure how I should utilize enumutils for this use case
07:11:34FromDiscord<Prestige> If you have any ideas
07:11:48FromDiscord<Girvo> @Bung Not sure, been _years_ since I was doing stuff like that 🙂
07:12:14FromDiscord<Girvo> But yeah ↵>Switching the keyboard layout requires some P/Invoke; you´ll need at least the following Windows functions to get it working: LoadKeyboardLayout, GetKeyboardLayout and ActivateKeyboardLayout. The following import declarations worked for me...
07:12:18FromDiscord<Girvo> (edit) "↵>Switching" => "↵> Switching"
07:12:28FromDiscord<huantian> sent a long message, see http://ix.io/46q2
07:12:30FromDiscord<Girvo> ^ thats from some C# COM discussion on how to do it @Bung
07:14:18FromDiscord<Elegantbeef> `sample(fullSet(MyEnum) - {myEnum})`prestige
07:14:29FromDiscord<Girvo> > This function only affects the layout for the current process or thread.↵^ This isn't true anymore. Windows no longer has per-process keyboard layouts, it's global. So it likely needs Admin permissions too, I think
07:14:54FromDiscord<Bung> In reply to @Girvo "But yeah >": yeah, I did it exactly same, but did not work, and the keyboard layout I loaded does not list in settings but in task bar
07:15:06FromDiscord<Prestige> In reply to @Elegantbeef "`sample(fullSet(MyEnum) - {myEnum})`prestige": What is sample?
07:15:18FromDiscord<Elegantbeef> It's a procedure in `std/random`
07:15:28FromDiscord<Girvo> @Bung Yeah welcome to Windows API programming haha, it's a mess 😄
07:15:40FromDiscord<Prestige> sweet that's the one bit I was missing. Thanks
07:16:11FromDiscord<Bung> In reply to @Girvo "> This function only": yeah , maybe it's privilege problem too, thanks! help a lot.
07:16:39FromDiscord<Girvo> No worries 🙂
07:17:30FromDiscord<huantian> In reply to @huantian "<https://www.reddit.com/r/programminghorror/comment": though concepts exist ig, but you don't get that safety when writing the procedure, it's only nicer for the user
07:28:34FromDiscord<huantian> Hm would it even be possible for concepts to work like how rust traits work, with the compile time tooling
07:33:52FromDiscord<Rika> Rust traits are opt in, Nim concepts are “whatever fits fits”
07:34:29FromDiscord<Elegantbeef> Yes Huan it'd be possible the compiler would just have to check that all usages of your type that is bound to a concept is applicable to the concept
07:34:48FromDiscord<Elegantbeef> It requires making the compiler smarter
07:35:30FromDiscord<Rika> Lol
07:36:02FromDiscord<Rika> I don’t really know what traits do exactly so cd
07:36:07FromDiscord<Rika> (edit) "cd" => "xd"
08:02:59FromDiscord<huantian> Yeah I have no idea how, even generally, this would actually implemented
08:03:09FromDiscord<huantian> But it does seem possible
08:10:14FromDiscord<frobnicate> Seeing the word "traits" makes me shiver due to PHP
08:12:03FromDiscord<frobnicate> Anyway, question time: any good tutorial or example on multi threading in Nim other than the docs and Nim in action?
08:12:32FromDiscord<frobnicate> And any way to benchmark on windows?
08:14:13FromDiscord<Phil> In reply to @frobnicate "And any way to": How precisely benchmarking are we talking?↵For simple "how fast is func x compared to y" you can just use benchy in a mini playground project
08:51:43FromDiscord<b1rdf00d> I used the manual recently to multithread my raytracer using `parallel` . The tracing is all independent so I didn’t need to deal with mutating state across threads. It wasn’t clear why I should use `parallel` over a `threadpool`.
09:04:41*oddish joined #nim
09:04:54FromDiscord<frobnicate> In reply to @Isofruit "How precisely benchmarking are": I wanted to try putting a benchmark in my render loop
09:05:27FromDiscord<frobnicate> I'm fooling myself into believing I'm making a renderer
09:06:04FromDiscord<frobnicate> In reply to @b1rdf00d "I used the manual": I see, thanks
09:08:13*jmdaemon quit (Ping timeout: 268 seconds)
09:09:08Amun-Rahuantian: regarding trais, same here but due to rust not php
09:11:36FromDiscord<Rika> We were discussing rust traits though
09:13:05FromDiscord<b1rdf00d> In reply to @frobnicate "I see, thanks": Not sure if it’s helpful but here’s the code which has a single threaded and multithreaded version starting line 132. I found the docs to be a little sparse, a bit more complicated example would have helped. ↵↵https://github.com/danielclarke/raytracing/blob/main/nim/src/tracer.nim
09:14:41FromDiscord<b1rdf00d> In reply to @Rika "We were discussing rust": I’m keen on exploring rust traits vs Nim ufcs + Concepts more. I think they provide similar functionality but I’m a noob and want to try writing something much more in depth in both
09:15:32FromDiscord<b1rdf00d> The Nim version seems more “dynamic” and the rust version seems more “enterprise”
09:19:11FromDiscord<Elegantbeef> Ironic since the Nim variant is static and the rust variant is capable of being dynamic 😄
09:54:40FromDiscord<untoreh> in gdb when I call `info locals` all the vars are named T_xxx is there a way to get the source names?
10:53:03FromDiscord<Superstart033> Do you guys have any guides on how to do “Conway’s game of life”? I would like to try and do it as my first Nim project
10:53:19FromDiscord<Superstart033> Also, do I need a graphics library for that?
10:55:08FromDiscord<hotdog> In reply to @Superstart033 "Do you guys have": Cool idea!
10:55:08FromDiscord<hotdog> In reply to @Superstart033 "Also, do I need": You could output characters to the terminal, or use a graphics library
10:55:50FromDiscord<hotdog> sdl2 is pretty simple to get started with, or Araq's pixel library which I think is based on sdl2 and just gives you simple draw functions
10:56:40FromDiscord<hotdog> I've used this wrapper before successfully: https://nimble.directory/pkg/sdl2nim
10:57:01FromDiscord<hotdog> This is the pixels library: https://nimble.directory/pkg/pixels
10:57:21FromDiscord<Superstart033> In reply to @hotdog "You could output characters": Yeah, that was the idea. Probably using the symbol as the cells.
10:57:37FromDiscord<hotdog> Raylib is another option, there's a few wrappers: https://nimble.directory/search?query=raylib
10:57:41FromDiscord<Superstart033> But I wanted to know if I needed to use a graphics lib just in case
10:57:49FromDiscord<hotdog> In reply to @Superstart033 "But I wanted to": You don't have to
10:57:57FromDiscord<PyryTheBurger> Can someone help me with generics? everytime i try to do something weith them i get the error "generic/template instansiation from here"
10:58:14FromDiscord<Superstart033> In reply to @hotdog "You don't have to": Thank you for the support, hotdog!
10:58:40FromDiscord<hotdog> @Superstart033 useful terminal stuff is in this stdlib module: https://nim-lang.org/docs/terminal.html
10:58:56FromDiscord<hotdog> This package is also cool for advanced terminal interfaces: https://nimble.directory/pkg/illwill
10:59:21FromDiscord<hotdog> Hope that helps get you started 🙂 Feel free to message on here with any questions, people are very helpful
10:59:40FromDiscord<Superstart033> I notice yeah! Thank you so much
10:59:56FromDiscord<hotdog> In reply to @PyryTheBurger "Can someone help me": Do you have a code example of what you're trying to do?
11:25:23*CyberTailor_ quit (Remote host closed the connection)
11:27:09*CyberTailor_ joined #nim
11:27:38FromDiscord<Phil> In reply to @Superstart033 "Do you guys have": OHHHH that's a fun one! Cool idea!
11:30:50FromDiscord<Phil> In reply to @Superstart033 "But I wanted to": If you want to use this as a learning experience, it might be useful to first write the program for the terminal, and then later on to write it as e.g. a gnome application. That has the nice benefit of exposing you to both terminal and GUI stuff and once the GUI stuff comes around you only have 1 new thing to get used to
11:31:26FromDiscord<Superstart033> I see, thank you. I’ll try
11:45:29NimEventerNew thread by Jasonfi: Nexus context types are being refactored, see https://forum.nim-lang.org/t/9340
13:12:58*CyberTailor_ quit (Ping timeout: 268 seconds)
13:13:41*CyberTailor_ joined #nim
13:32:18*xet7 quit (Remote host closed the connection)
13:44:17*wallabra joined #nim
13:46:37FromDiscord<PyryTheBurger> why does this code not work omggggg proc getComp(ent: Entity, T: typedesc): T =↵ result = cast[T](ent.comps[T.name]) and that code gets no errors in one file but then in another file echo ent.getComp(LolComp).lol there is that stupid generics error
13:48:50FromDiscord<PyryTheBurger> nvm got it working
13:50:37FromDiscord<PyryTheBurger> how can i get the type that the typedesc is describing
13:53:42FromDiscord<Rika> the typedesc is the type, wdym
13:55:10FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=46rv
13:55:27FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=46rv" => "https://play.nim-lang.org/#ix=46rw"
13:55:53FromDiscord<PyryTheBurger> wooooooooooooow perfect
13:55:55FromDiscord<PyryTheBurger> sorry
13:56:05FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=46rw" => "https://play.nim-lang.org/#ix=46rx"
13:57:05FromDiscord<PyryTheBurger> In reply to @Isofruit "Heya, by using 3": no that returns an error
13:57:51FromDiscord<Phil> In reply to @PyryTheBurger "no that returns an": Generally, when saying it returns an error, you would copy-paste the error. You can also do that with backticks for readability, e.g.:↵\`\`\`txt↵some error text↵\`\`\`
13:58:33FromDiscord<PyryTheBurger> sent a code paste, see https://play.nim-lang.org/#ix=
13:59:08FromDiscord<Phil> How are you calling getComp?
13:59:19FromDiscord<PyryTheBurger> echo ent.getComp(LolComp).lol
13:59:29FromDiscord<PyryTheBurger> sent a code paste, see https://play.nim-lang.org/#ix=
14:00:09FromDiscord<Phil> And the above is the entire text your terminal throws out?↵The above is more than likely a warning that leads to the actual error 2-3 lines down
14:00:58FromDiscord<PyryTheBurger> sent a code paste, see https://play.nim-lang.org/#ix=46rz
14:01:03FromDiscord<Phil> AHA! See, the below line is your actual error
14:01:19FromDiscord<PyryTheBurger> i dont really understand
14:01:32FromDiscord<Phil> is "name" a field on your type `LolComp`?
14:01:37FromDiscord<PyryTheBurger> lolcomp has a field name
14:01:55FromDiscord<PyryTheBurger> nope it doesnt
14:01:58FromDiscord<PyryTheBurger> arghhhhhhhhhhh
14:02:01FromDiscord<PyryTheBurger> im so dumbbbb
14:02:07FromDiscord<Phil> You have another issue there
14:02:26FromDiscord<Phil> "LolComp" is not an instance of the type LolComp, it is the type LolComp itself
14:02:39FromDiscord<PyryTheBurger> huh
14:03:01FromDiscord<Phil> As in, the type description. That's like a class in Java, it contains the information that "I have all of these fields", but since it isn't an instance of the type it doesn't hold actual data
14:03:48*arkurious joined #nim
14:04:33FromDiscord<PyryTheBurger> yeah but its a ref object of component so it says its a component but i want it to be a lolcomponent
14:05:09FromDiscord<enthus1ast> what is T.name supposed to do?
14:05:31FromDiscord<PyryTheBurger> T.id is an index of a table
14:05:43FromDiscord<PyryTheBurger> t is supposed to be a lolcomp
14:05:48FromDiscord<PyryTheBurger> i dont know
14:05:59FromDiscord<enthus1ast> T.id ?
14:06:15FromDiscord<PyryTheBurger> its a string
14:06:21FromDiscord<Phil> In reply to @PyryTheBurger "yeah but its a": Ohhh so this is an inheritance thing?↵You have something of type `Entity` and you know that it is the subclass `LolComp` which inherits from `Entity` and thus want to type-cast it to be `LolComp` to get access to the corresponding fields and such.↵Is that correct?
14:06:56FromDiscord<Phil> Or are these 2 completely separate types and you want to convert from one to the other?
14:06:58FromDiscord<PyryTheBurger> there is a class Component and every component like LolComp is inheritence from it
14:07:23FromDiscord<PyryTheBurger> and Component type has an id
14:07:58FromDiscord<enthus1ast> you can get the name of the type (as a string) with `$T`
14:08:07FromDiscord<Phil> Could you copy paste the type definitions of `Entity` and `LolComp` ?
14:08:18FromDiscord<enthus1ast> https://github.com/enthus1ast/ecs/blob/f693322e32782e3e676b96ae8a783a556917d9cf/src/ecs.nim#L153
14:08:35FromDiscord<PyryTheBurger> In reply to @enthus1ast "https://github.com/enthus1ast/ecs/blob/f693322e3278": i want to make my own
14:08:59FromDiscord<enthus1ast> sure, but maybe you can see how i got the name↵(@PyryTheBurger)
14:09:07FromDiscord<PyryTheBurger> sent a code paste, see https://paste.rs/GyT
14:11:10FromDiscord<Phil> sent a code paste, see https://paste.rs/3sI
14:11:56FromDiscord<PyryTheBurger> yes probably
14:12:14FromDiscord<PyryTheBurger> the keys are Component.id's
14:13:56FromDiscord<PyryTheBurger> what does all the [T] mean tho
14:13:59FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=46rE
14:15:15FromDiscord<PyryTheBurger> In reply to @Isofruit "Ahhhh okay, yeah then": no this doesnt work because it thinks lolcomp is just Component
14:16:33FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=46rF
14:17:28FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=46rF" => "https://play.nim-lang.org/#ix=46rG"
14:17:40FromDiscord<domosokrat> sent a code paste, see https://play.nim-lang.org/#ix=46rH
14:17:56FromDiscord<Phil> entity doesn't ahve an id field domosokrat
14:18:04FromDiscord<PyryTheBurger> sent a code paste, see https://play.nim-lang.org/#ix=46rI
14:18:10*krux02 joined #nim
14:18:13FromDiscord<voidwalker> can someone produce code that will close the http client after N bytes being downloaded ? I can't figure it out. Spent 2 hours researching :\
14:18:32FromDiscord<domosokrat> damn, didn't pay attention \:(
14:19:32FromDiscord<PyryTheBurger> sent a code paste, see https://play.nim-lang.org/#ix=46rJ
14:19:55FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=46rK
14:19:59FromDiscord<enthus1ast> T is your type
14:20:04FromDiscord<enthus1ast> not the instance
14:20:12FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=46rL
14:20:26FromDiscord<Phil> Do you know other programming languages? Maybe I can make a comparison to those
14:20:53FromDiscord<PyryTheBurger> C:\Users\delux\dev\nim\projects\ecs\src\game.nim(11, 75) template/generic instantiation of `getComp` from here↵C:\Users\delux\dev\nim\projects\ecs\src\ecs.nim(67, 33) Error: undeclared field: 'id'
14:21:15FromDiscord<PyryTheBurger> i understand yeah
14:22:32FromDiscord<enthus1ast> its the same as writing LolType.id
14:23:11FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=46rN
14:23:22FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=46rN" => "https://play.nim-lang.org/#ix=46rO"
14:23:50FromDiscord<Phil> Most of the time you only need typedesc[T] or the like when you do meta-programming of sorts
14:26:04FromDiscord<enthus1ast> i still don't get what this all should actually do `ent.comps[T.id]`
14:26:06FromDiscord<Phil> That's why it's useful to show us always the proc and how you call it in one go
14:26:07FromDiscord<enthus1ast> you store the components inside the entitiy?
14:26:49FromDiscord<enthus1ast> if yes, then why not use the type as the key? (as i shown in my example)
14:26:56*CyberTailor_ quit (Remote host closed the connection)
14:28:06*CyberTailor_ joined #nim
14:29:49FromDiscord<Phil> Is it typical for such a system to only have 1 instance? I assumed he might want an ID to have multiple instances of the same type
14:30:15FromDiscord<enthus1ast> typically you would not store the components in the entities
14:31:28FromDiscord<enthus1ast> in his design (at least what i've guessed now) is that his entity has a table that stores all component objects assigned to the entity
14:32:33FromDiscord<enthus1ast> usually you only have one component of the same type per entity
14:32:40FromDiscord<enthus1ast> at least with the ecs'es i've used
14:47:15*gsalazar quit (Quit: Leaving)
14:47:32*gsalazar joined #nim
14:55:36FromDiscord<PyryTheBurger> where do you store the components if not entitiesa
14:55:58NimEventerNew thread by Woodwindblues: Translating "Nature of Code" to Nim - Which graphics library should I use?, see https://forum.nim-lang.org/t/9341
15:00:21FromDiscord<PyryTheBurger> In reply to @enthus1ast "if yes, then why": do you mean that i should set the id of lolcomp to be $LolComp
15:04:41*wallabra_ joined #nim
15:05:26*wallabra quit (Ping timeout: 240 seconds)
15:05:57FromDiscord<enthus1ast> Not sure why you need the id at all
15:06:28FromDiscord<enthus1ast> In the registry↵(@PyryTheBurger)
15:06:46*wallabra_ is now known as wallabra
15:06:48FromDiscord<enthus1ast> The entity is as lightweight as possible (just an int)
15:06:54FromDiscord<PyryTheBurger> what
15:07:26FromDiscord<PyryTheBurger> bruh im doing everything wrong
15:07:29FromDiscord<enthus1ast> That you use for all the lookups
15:07:56FromDiscord<enthus1ast> BUT you approach could also work, so yeah
15:09:12FromDiscord<PyryTheBurger> what is a tableref compared to a table
15:13:03FromDiscord<Phil> A table will be copied whenever you reassign it, tableref is a normal ref type so lives in heap memory
15:13:26FromDiscord<Phil> Use table for small tables and ref for larger ones
15:14:20FromDiscord<PyryTheBurger> why do you need all that {.gcsafe.} and stuff
15:14:32FromDiscord<PyryTheBurger> for me it adds those automatically
15:14:43FromDiscord<Phil> In general?
15:15:04FromDiscord<Phil> Or are you taking about some code example from enthusiast ?
15:15:05FromDiscord<AmitSupremacy> hi, sorry to interrup, I need to create a cli app, is there any library that provides api for flag parsing and loading animation?
15:15:13FromDiscord<PyryTheBurger> in general
15:17:09FromDiscord<Phil> I'm on phone and soon climbing, the reason is multi threading, aka 2 threads could work on the same object at the same time and if one e.g. deletes an object and hands it's memory back to the system while the other wanted to assign to it, it'll try to do so on a piece of memory it no longer has access to
15:17:20FromDiscord<Phil> Somebody else will have to explain more in depth
15:17:51*CyberTailor_ quit (Remote host closed the connection)
15:18:46*CyberTailor_ joined #nim
15:21:27FromDiscord<Superstart033> Can constant arrays change still have their values change?
15:21:36FromDiscord<Superstart033> (edit) removed "change"
15:28:38*gsalazar quit (Ping timeout: 240 seconds)
15:51:32FromDiscord<auxym> In reply to @AmitSupremacy "hi, sorry to interrup,": cligen is the popular one for CLI flags parsing. not sure what you mean by animation though? something tui like curses? if so check out illwill
15:54:50*CyberTailor_ quit (Remote host closed the connection)
15:55:49*CyberTailor_ joined #nim
15:56:06FromDiscord<AmitSupremacy> In reply to @auxym "cligen is the popular": completion status/ loading animation like tqdm in python
16:02:01*gsalazar joined #nim
16:04:53FromDiscord<auxym> this turns up 3 options: https://nimble.directory/search?query=progress
16:09:26*gsalazar quit (Ping timeout: 240 seconds)
16:16:42FromDiscord<EyeCon> You can create yours with the terminal package if it's not complicated
16:16:44*krux02 quit (Remote host closed the connection)
16:16:56FromDiscord<EyeCon> Part of the stdlib
16:23:16FromDiscord<voidwalker> Help. Need code to get just first N bytes with httpclient, then close connection
16:25:35FromDiscord<voidwalker> Didn't find any way to do it with httpclient itself, so something like asynchttpclient, and constant polling until the N bytes are got. N is small for me, so it shouldn't be a problem to wait in a loop for this
16:33:33FromDiscord<EyeCon> Would it be OK to just send a Content-Range and read all returned bytes?
16:33:57FromDiscord<voidwalker> oh wait, is that just a header the server complies with ?>
16:34:06FromDiscord<voidwalker> that might work then
16:34:23FromDiscord<EyeCon> Sorry, request has header `Range` apparently
16:34:40FromDiscord<EyeCon> Response has `Content-Range` if I read it correctly
16:34:42FromDiscord<Rika> Not all servers support it but there’s a chance
16:35:16FromDiscord<EyeCon> In reply to @voidwalker "oh wait, is that": Exactly
16:35:24FromDiscord<EyeCon> The support is not bad, I think
16:35:33FromDiscord<EyeCon> Reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range
16:35:52FromDiscord<EyeCon> Be ready to accept a 206 rather than a 200: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/206
16:40:17*gsalazar joined #nim
17:18:23FromDiscord<voidwalker> well, imdb does not appear to accept ranges
17:18:49FromDiscord<voidwalker> it's a dynamic webpage, why would it
17:23:44*ecs left #nim (*.net *.split)
17:33:05FromDiscord<voidwalker> welp, so my request remains: I need code that closes connection after the first N bytes have been retrieved by httpclient
17:36:09*wallabra_ joined #nim
17:36:44*wallabra quit (Ping timeout: 244 seconds)
17:38:10*wallabra_ is now known as wallabra
17:43:21FromDiscord<Kermithos> In reply to @voidwalker "welp, so my request": I don't think you can do that, maybe patch httpclient to add this function?
17:45:12FromDiscord<Kermithos> I think you could do it here: https://github.com/nim-lang/Nim/blob/58656aa5bba572672f093499280b69bb0f0d4c06/lib/pure/httpclient.nim#L684
17:56:40FromDiscord<voidwalker> 0 chance
17:57:58NimEventerNew Nimble package! grAlg - Classical Graph Algos in Nim, see https://github.com/c-blake/gralg
17:58:13FromDiscord<voidwalker> I am stuck at this for 24 hours now
17:58:16FromDiscord<voidwalker> I will write on the forum
18:06:42FromDiscord<krisppurg> is there any optimised way and or quicker way of `stream.readStr(...)`?
18:33:10*Guest6812 joined #nim
18:39:49*Guest6812 quit (Quit: Client closed)
18:49:47FromDiscord<voidwalker> how do you confirm e-mail on nim forum ? I got no e-mail message for that
18:50:30FromDiscord<Phil> That is a very good question to ask <@&371760044473319454>
18:50:52FromDiscord<Phil> Preferably while mentioning your account name @voidwalker 😄
18:51:22FromDiscord<Superstart033> Also your credit card information:^)
18:51:33FromDiscord<Phil> For security purposes of course
18:51:41FromDiscord<Superstart033> ☝️
18:51:45FromDiscord<Phil> Will need the secret code on the back just to confirm it's you
18:52:09FromDiscord<Vindaar> In reply to @voidwalker "how do you confirm": you don't, it's broken afaiu. If you tell us your username we just activate your account
18:52:21FromDiscord<voidwalker> that is so sad 😦
18:52:28FromDiscord<voidwalker> please activate void09 thanks
18:54:52FromDiscord<PMunch> In reply to @voidwalker "please activate void09 thanks": Done
18:56:34NimEventerNew thread by Void09: How to get just the first N bytes with httpclient ?, see https://forum.nim-lang.org/t/9342
18:57:56FromDiscord<voidwalker> First time discord fails to provide an answer for >24 hours.. let's see how well the forum does : )
19:00:52FromDiscord<Phil> Apologies for being unable to help here, I've worked precious little with the httpclient so I can't really offer any experience there, and I'm fairly certain anything I can think of to stare at you've already checked out
19:01:24FromDiscord<voidwalker> I'm pretty sure it's something very simple, it's just too many unfamiliar concepts thrown in at once
19:09:51*Figworm joined #nim
19:11:59*kenran joined #nim
19:19:20*kenran quit (Quit: WeeChat info:version)
19:19:34*kenran joined #nim
19:24:57FromDiscord<zip1203> Cheap VPS/VDS, Storage Slabs, Shared Hosting. Starting from 2$ a month. Coin Payments allowed, privacy focused law of the land host. Tor allowed -\> https://my.frantech.ca/aff.php?aff=5862
19:26:30FromDiscord<Phil> In reply to @zip1203 "Cheap VPS/VDS, Storage Slabs,": Gooo fuuuuck yourseeeeeelf↵Help <@&371760044473319454>
19:28:18FromDiscord<Phil> Thanks!↵My fuse for ad bastards really has shortened considerably over the months
19:28:38FromDiscord<PMunch> Thanks..
19:29:30FromDiscord<PMunch> I wonder if we can somehow fingerprint those to ban them automatically
19:31:34FromDiscord<PMunch> Maybe something as simple as if the first message contains a URL?
19:31:56FromDiscord<huantian> there are bots that do that for you
19:32:01FromDiscord<gibson> sent a code paste, see https://play.nim-lang.org/#ix=46td
19:32:07FromDiscord<Phil> Maybe a keyword + url?
19:32:41FromDiscord<Phil> With a handfull of url's whitelisted such as all links nim related
19:33:01*CyberTailor_ quit (Remote host closed the connection)
19:33:21FromDiscord<Phil> In reply to @gibson "Why does this break": I don't think 2 can act as a type, that'd need to be int
19:33:32FromDiscord<gibson> But if I make it a proc it works.
19:33:39FromDiscord<Phil> Wait what? One sec, trying out
19:34:01*CyberTailor_ joined #nim
19:34:37*kenran quit (Quit: WeeChat info:version)
19:35:02FromDiscord<Phil> Okay, tried it out, phew, yeah a number is not a type , otherwise `let x: 2 = 2` would work
19:35:18FromDiscord<Phil> How does your proc look? identical?
19:35:46FromDiscord<gibson> Yeah, just change `template` to `proc`. You can even replace the `0` return with `N` and you'll get 2 returned.
19:36:06FromDiscord<Phil> ... what the hell
19:36:14FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=46te
19:37:49*jmdaemon joined #nim
19:38:01FromDiscord<gibson> I expected the proc to work, and it did. But I don't know why the template doesn't work.
19:38:47FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=46tg
19:38:48FromDiscord<enthus1ast> but idk
19:39:03*CyberTailor_ quit (Remote host closed the connection)
19:39:14FromDiscord<Phil> I agree that the above should not be valid
19:39:17FromDiscord<Phil> Like, a number as a type
19:39:19FromDiscord<Phil> What the heck
19:39:28FromDiscord<gibson> Why not? The template is specified to be a compile-time value.
19:39:43FromDiscord<Phil> Using a number as a type does not work in any other context
19:40:02FromDiscord<Phil> `let x:2 = 2` is invalid
19:41:06*CyberTailor_ joined #nim
19:41:21FromDiscord<gibson> It's not a type, `static int` means "I want a const int, not an int" unless that's technically a type.
19:41:54FromDiscord<gibson> I of course have no idea what's going on under the hood, so I best just stop talking now... :p
19:43:32FromDiscord<Phil> sent a long message, see http://ix.io/46th
19:43:53FromDiscord<huantian> In reply to @Isofruit "I agree that the": why not?
19:44:21FromDiscord<huantian> it doesn't make sense in templates, since it's functionally the same as using it as a parameter, but It does have some use for procs and types
19:45:10FromDiscord<gibson> Yes, as a parameter is my current workaround. I suppose that makes sense.
19:45:31FromDiscord<gibson> I kind of wish for syntax uniformity it would allow this.
19:46:20FromDiscord<Phil> In reply to @huantian "it doesn't make sense": I think this just brings befuddles me, like suddenly swapping Subject-Predicate-Object order around.
19:46:27FromDiscord<Phil> (edit) removed "brings"
19:46:50FromDiscord<Phil> Like, 2 is a value, why is it a type? It's the thing you describe with types, not the other way round
19:46:58FromDiscord<Phil> I'd be equally confused by a variable of type false
19:47:38FromDiscord<Phil> (edit) "In reply to @huantian "it doesn't make sense": I think this ... just" added "(the concept of using a specific value as a type, not your sentence, I just reread and noticed it's missunderstandable)"
19:47:55FromDiscord<Phil> (edit) "it's" => "my line here was"
19:47:58FromDiscord<gibson> Well, it's sometimes useful to specify different compile-time variants of procs and types using the `[]` syntax with different values passed in... like making a 2D array for instance.↵But @huantian is right, that with a template, it's always at compile-time so you don't have to rely on templating of the signature.
19:48:45FromDiscord<gibson> @Phil the trick is the keyword `static`.
19:49:49FromDiscord<Phil> I think unless I see an actual usecase I'll not comprehend. My mind keeps getting stuck that a number isn't a type, it's a value and thus a thing you'd put as a parameter-value
19:50:20FromDiscord<Phil> Maybe the sports muddled my brain enough, it is semi late I guess
19:51:58FromDiscord<gibson> I think it's because `static int` doesn't actually mean "an int-known-at-compiletime type" rather, "an int known at compiletime"
19:53:36FromDiscord<gibson> and similarly `int` in generics means "an int value, known at runtime"
19:55:00FromDiscord<gibson> sent a code paste, see https://play.nim-lang.org/#ix=46tl
19:55:42FromDiscord<gibson> that would be generics specialization for the int typeclass declaration.
19:56:18*CyberTailor_ quit (Remote host closed the connection)
19:56:58FromDiscord<mr_noia> sent a code paste, see https://paste.rs/inU
19:57:06*CyberTailor_ joined #nim
19:57:35FromDiscord<Elegantbeef> Good example, but i'd use a concept 😄
19:58:31FromDiscord<mr_noia> yes, but it was the simplest one I could think hehe
19:58:33FromDiscord<gibson> I learned something.
19:59:54FromDiscord<gibson> In reply to @mr_noia "An example of having": (fencepost error :p)
20:00:16FromDiscord<Phil> In reply to @gibson "that would be generics": Pretty much, since as far as I understood generics so far for example, `bla[T: object]()` the `: object` just narrowed down the type rather than making a value explicit
20:00:55FromDiscord<Elegantbeef> This is the fun part `static[T]` is type information 😄
20:01:53FromDiscord<Phil> In reply to @mr_noia "An example of having": I'm squinting at this, very hard. It's pretty correct and it looks like one of the best possible ways to write this, but it still takes a specific number as a generic type of sorts and I just can't help but squint at that.↵I may need a bit to just get used to the thought.
20:02:08FromDiscord<Elegantbeef> It's not the best way to write that 😛
20:02:31FromDiscord<Phil> The "one of" in there is doing work beef 😛
20:02:50FromDiscord<gibson> @Phil it constrains `N` to be a number known at compiletime. Without that constraint the compiler complains.
20:02:54FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=46ts
20:03:56FromDiscord<Phil> The previous typing did
20:03:58FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=46tu
20:04:01FromDiscord<Elegantbeef> Of course
20:04:08FromDiscord<Elegantbeef> It should atleast
20:04:27FromDiscord<Phil> I'm seeing no information anywhere being passed about the array length, thus the question
20:04:30*wallabra_ joined #nim
20:04:37FromDiscord<enthus1ast> this makes sence (in my mind at least) but dotProduct[2] would not
20:05:11FromDiscord<gibson> array length is part of the array type. So if they are different lengths, then that signature would not match.
20:05:24FromDiscord<Elegantbeef> Concepts are generic constraints it should constrain to the type and if the type isnt the same it's a mismatch↵(@Phil)
20:05:27FromDiscord<Elegantbeef> Atleast it should
20:05:57FromDiscord<domosokrat> Elegantbeef\: Where does the `N` in your code get its value?
20:06:08FromDiscord<Elegantbeef> It doesnt i messed up that should be `..a.high`
20:06:21FromDiscord<Elegantbeef> Yay it doesnt actually compile
20:07:02*wallabra quit (Ping timeout: 240 seconds)
20:07:03*wallabra_ is now known as wallabra
20:07:32FromDiscord<Elegantbeef> Shit it doesnt bind how i assumed
20:07:36FromDiscord<Elegantbeef> I guess smokebomb
20:08:03FromDiscord<Phil> Oh no, where did beef go, he stole all the concepts and took them with him, I can't see him anywhere!
20:09:05FromDiscord<Elegantbeef> Concepts apparently dont work like typeclasses so.... yea
20:09:20FromDiscord<gibson> And that's why I avoid them haha. I wish they did.
20:09:33FromDiscord<Elegantbeef> You can easily make that the case i methinks
20:10:22*xet7 joined #nim
20:10:49FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=46tw
20:11:30FromDiscord<gibson> wha???...
20:11:46FromDiscord<Phil> This looks somewhat cursed
20:13:22FromDiscord<Elegantbeef> Nim typeclasses bind tightly to the type to reduce typing
20:13:51FromDiscord<Elegantbeef> `proc doThing(a, b: int or float)` does not behave the same as `proc doThing(a, b: SomeNumber)`
20:14:08FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim/issues/20136#issuecomment-1201995189
20:14:13*wallabra quit (Ping timeout: 268 seconds)
20:15:15FromDiscord<mr_noia> that's really interesting, but how does it constraint the size of the arrays?
20:15:48FromDiscord<Elegantbeef> The typeclass makes it so the types have to match
20:15:48FromDiscord<Elegantbeef> This is just how named typeclasses work
20:16:31FromDiscord<gibson> Can you explain that another way? I'm trying to wrap my head around why it needed ` and not void` to compile.
20:16:50FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=46tx
20:18:05FromDiscord<gibson> Unless concepts can inherently be void unless otherwise specified, because they're a blank canvas of typing.
20:19:18FromDiscord<DaiChimpo> that's a little funky
20:20:05FromDiscord<mr_noia> really cool, I'm gonna have to study this more
20:20:31*Figworm quit (Quit: Figworm)
20:20:59FromDiscord<gibson> sent a code paste, see https://play.nim-lang.org/#ix=46ty
20:21:16FromDiscord<Phil> But now you need to remember to always type and not void
20:21:26FromDiscord<Phil> Which is the first thing I'll professionally forget
20:21:38FromDiscord<gibson> Not for use to get things done. Only to see what was necessary to get this to compile.
20:22:42*CyberTailor_ quit (Quit: Konversation terminated!)
20:28:56FromDiscord<EyeCon> sent a code paste, see https://play.nim-lang.org/#ix=46tA
20:29:17FromDiscord<EyeCon> Joke aside, that's actually very interesting to know
20:35:58*Onionhammer quit (Quit: The Lounge - https://thelounge.chat)
20:36:28*Onionhammer joined #nim
21:03:46FromDiscord<Elegantbeef> Except that doesnt solve the issue of mismatching arrays↵(@gibson)
21:03:58FromDiscord<Elegantbeef> Atleast it shouldnt 😄
21:22:52*def- quit (Quit: -)
21:23:03*def- joined #nim
21:30:14*tk quit (Ping timeout: 240 seconds)
21:31:09NimEventerNew thread by Pietroppeter: Nimib with release 0.3 becomes interactive, see https://forum.nim-lang.org/t/9343
21:51:39*rwb quit (Quit: ZNC - https://znc.in)
21:53:16*MatN joined #nim
21:55:30*wallabra joined #nim
21:58:01*MatN quit (Quit: Leaving)
22:02:15FromDiscord<Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=46u4
22:02:30FromDiscord<Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=46u5
22:02:46FromDiscord<Elegantbeef> You dont check if `result != nil` i presume
22:04:13FromDiscord<Tuatarian> When would it be nil?
22:04:23FromDiscord<Tuatarian> I am not checking yeah
22:04:28FromDiscord<Elegantbeef> if `rt: McNode` was nil
22:04:55FromDiscord<Tuatarian> That shouldn't be happening in general though I don't think
22:05:12FromDiscord<Elegantbeef> Well you have a nil... so guard your nils
22:05:32FromDiscord<Tuatarian> I'm creating a mcnode and running mcmonte on it repeatedly
22:05:48FromDiscord<Tuatarian> I guess I do have a nil but then the question becomes why
22:05:57FromDiscord<Elegantbeef> You diddnt provide all the code so cannot say
22:06:14FromDiscord<Tuatarian> This is all the relevant stuff
22:06:26FromDiscord<Elegantbeef> Except it lacks the graph generation 😄
22:07:40FromDiscord<Tuatarian> I'm doing `var mcroot = McNode(board : b(this is a legal position btw), parental units : McNode(visits : -1), whiteMoves : false)` and running mcmonte on that
22:08:19FromDiscord<Tuatarian> It becomes nil at some point during mcpick/mcwalk i am pretty sure so the other parts of mcmonte should not be relevant
22:08:49FromDiscord<Elegantbeef> Why does mcmonte take a `var McNode`?
22:09:13FromDiscord<Tuatarian> it mutates it right?
22:09:25FromDiscord<Tuatarian> oh not yet
22:09:32FromDiscord<Tuatarian> yeah it mutates it in the later functions
22:09:35FromDiscord<Elegantbeef> It's a reference you only need `var` if you want to change where the reference points
22:10:00FromDiscord<Tuatarian> you can mutate the data itself without using var?
22:10:08FromDiscord<Tuatarian> I never want to change where I'm pointing
22:10:20FromDiscord<Elegantbeef> Without stricteffects yes
22:10:20FromDiscord<Elegantbeef> strictFuncs i mean
22:10:32FromDiscord<Tuatarian> ok I will remove the var, that should fix it
22:11:09FromDiscord<Tuatarian> removng all the vars still causes it to segfault
22:11:20FromDiscord<Elegantbeef> Well yea you werent mutating it 😄
22:11:23FromDiscord<Elegantbeef> You're passing a nil somewhere
22:11:33FromDiscord<Elegantbeef> Put some nil guards
22:11:34FromDiscord<Tuatarian> in the same place
22:11:58FromDiscord<Elegantbeef> And what line is erroring?
22:12:07FromDiscord<Tuatarian> 285
22:12:14FromDiscord<Elegantbeef> Doesnt help me
22:12:16FromDiscord<Tuatarian> `result = mcPick result`
22:12:22FromDiscord<Tuatarian> yeah I realized after I said that lmao
22:12:23FromDiscord<Tuatarian> in mcWalk()
22:12:29FromDiscord<Elegantbeef> That's not the line that's erroring
22:12:44FromDiscord<Elegantbeef> There is no dereferencing in that
22:12:54FromDiscord<Elegantbeef> Walk down the stack i believe in you
22:13:25FromDiscord<!Patitotective> the stack walks on you
22:13:47FromDiscord<Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=46ua
22:13:55*xet7 quit (Remote host closed the connection)
22:14:19FromDiscord<mischa_u> Check that there is a valid bestkid found, initially without previous visits your score will be 0, so will never beat the uninitialized bedKid
22:14:22FromDiscord<Elegantbeef> You have a cyclical type but are using orc?
22:14:23FromDiscord<Elegantbeef> arc i mean
22:14:42FromDiscord<Tuatarian> oh oops I meant to use orc
22:14:45FromDiscord<Elegantbeef> Wait to no let them figure it out for themselves
22:15:00FromDiscord<Tuatarian> still segfaults
22:15:14FromDiscord<mischa_u> (edit) "Check that there is a valid bestkid found, initially without previous visits your score will be 0, so will never beat the uninitialized bedKid ... " added "and you will return a nil M node in mcPick"
22:15:15FromDiscord<Elegantbeef> No shit it still segfaults
22:15:24FromDiscord<Elegantbeef> "We've changed nothing, and it still fails"
22:16:00FromDiscord<mischa_u> (edit) "bedKid" => "bestKid" | "M node" => "McNode"
22:16:11FromDiscord<Tuatarian> yeah it was that there was no valid bestkid found
22:16:34FromDiscord<Tuatarian> I didn't realize that ref obj didn't have an initial value, which I probably should have in retrospect
22:16:42FromDiscord<Tuatarian> thanks mischa & beef
22:16:45FromDiscord<Elegantbeef> How do i not passive aggressively say "Wow a nil check really solved the issue"
22:17:22FromDiscord<Tuatarian> "nil check unsurprisingly solved the isssue"
22:17:31FromDiscord<Prestige> Good bot
22:17:34FromDiscord<Tuatarian> lmao
22:17:45FromDiscord<Tuatarian> as long as you're not actually being malicious tone is not a huge deal
22:17:57FromDiscord<!Patitotective> In reply to @Elegantbeef "How do i not": you're passive aggressive yourself, its on your nature
22:18:16FromDiscord<Elegantbeef> Oh i know patito but i try no to be a dick, although sometimes it's hard 😛
22:18:55FromDiscord<Tuatarian> you can use arc with cyclic types right? You just need to manually free them
22:19:10FromDiscord<Elegantbeef> Sure
22:19:18FromDiscord<!Patitotective> In reply to @Elegantbeef "Oh i know patito": using :p makes everything nice
22:19:38FromDiscord<Elegantbeef> Patito you're useless and will never amount to anything
22:19:39FromDiscord<Elegantbeef> 😛
22:19:43FromDiscord<Elegantbeef> Ah you're right it does make it nice
22:19:49FromDiscord<!Patitotective> yep :p
22:19:57FromDiscord<Tuatarian> I feel like :p is just more passive aggressive
22:20:03FromDiscord<!Patitotective> maybe :p
22:20:19FromDiscord<Tuatarian> "Wow a nil check really solved the issue" :p
22:20:19FromDiscord<!Patitotective> In reply to @Elegantbeef "😛": thats not :p thats 😛
22:20:22FromDiscord<!Patitotective> lmao
22:20:44FromDiscord<Elegantbeef> Hey my client automatically inserts it 😛
22:20:53FromDiscord<Tuatarian> matrix moment
22:21:00FromDiscord<Elegantbeef> I can disable it
22:21:06FromDiscord<Elegantbeef> Cause control exists here
22:21:18FromDiscord<!Patitotective> thats the thing i hate the most about twitch (and discord by default)↵they fricking replace nice ascii emojis with their ugly little things
22:22:17FromDiscord<Tuatarian> In reply to @Elegantbeef "I can disable it": p sure you can disable it on discord too
22:22:43FromDiscord<Prestige> yeah :P
22:22:44FromDiscord<Tuatarian> yep just disabled it
22:22:50FromDiscord<Generic> In reply to @Patitotective "thats the thing i": I like ascii emojis too, which OS do you use?
22:22:56FromDiscord<Generic> (edit) "In reply to @Patitotective "thats the thing i": I like ascii emojis too, ... which" added "though"
22:23:06FromDiscord<!Patitotective> i-...
22:23:18FromDiscord<!Patitotective> linux for short 😁
22:23:27FromDiscord<Generic> imho the only good emoji font is the one windows has
22:23:34FromDiscord<Tuatarian> emoji font?
22:23:35FromDiscord<!Patitotective> i like twitter une
22:23:36FromDiscord<!Patitotective> (edit) "une" => "one"
22:23:39FromDiscord<Generic> segoe ui emoji or however it's called
22:24:03FromDiscord<Tuatarian> the only emojis i like are the thumb up, thumb down, heart
22:24:12FromDiscord<Tuatarian> pretty much the only useful ones
22:24:43FromDiscord<Generic> for some reason the one place where flat and simple designs really look a lot better is where even Apple still uses those ugly somewhat realistically shaded ones
22:24:45FromDiscord<!Patitotective> hey, \:upside_do: is useful too
22:24:50FromDiscord<Generic> 💽
22:24:56FromDiscord<!Patitotective> (edit) "\:upside_do:" => "\🙃"
22:25:07FromDiscord<!Patitotective> In reply to @Patitotective "hey, \🙃 is useful": what happened here?
22:25:15FromDiscord<!Patitotective> thats not discords 🙃
22:26:00FromDiscord<Generic> lach
22:27:28*tk joined #nim
23:16:28FromDiscord<voidwalker> Welp. 65 views and no reply. https://forum.nim-lang.org/t/9342
23:18:54FromDiscord<voidwalker> How exactly would you get the bodyStream data, which is FutureStream[string] ?
23:20:09FromDiscord<Elegantbeef> I might be wrong but you may not be capable of doing what you want with the present httpclient
23:24:34FromDiscord<voidwalker> there is this `onProgressChanged` callback proc. `You may specify a callback procedure to be called during an HTTP request. This callback will be executed every second with information about the progress of the HTTP request.`
23:24:43FromDiscord<voidwalker> why a second ? I don't see any way to change that
23:24:46FromDiscord<!Patitotective> @voidwalker take a look at this https://github.com/nim-lang/Nim/blob/version-1-6/lib/pure/asyncdispatch.nim#L1939
23:25:06FromDiscord<!Patitotective> In reply to @voidwalker "there is this `onProgressChanged`": it just returns the total amount to download, the current and speed
23:26:53FromDiscord<voidwalker> well it does whatever you want it to do
23:27:12FromDiscord<voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=46ug
23:40:18FromDiscord<!!sharpcdf!!> In reply to @Elegantbeef "Cause control exists here": im late to the party but ROASTED
23:40:31FromDiscord<!!sharpcdf!!> DESTROYED WITHOUT MERCY
23:41:24FromDiscord<!!sharpcdf!!> but yea you can do the same thing on discord lmao