<< 03-07-2021 >>

00:26:14FromDiscord<juan_carlos> How can I assert that a nnkIdent is a mutable var ?.
00:30:52FromDiscord<ElegantBeef> You cannot since idents dont carry anything
00:31:01FromDiscord<ElegantBeef> You'd have to bind the sym or get it typed
00:31:54FromDiscord<juan_carlos> Yep, I remember now, thanks.
00:55:04*cyraxjoe joined #nim
01:29:23fn<ForumUpdaterBot99> New thread by Stu002: Associating a constant with a concept?, see https://forum.nim-lang.org/t/8187
01:51:33FromDiscord<hamidb80> sent a code paste, see https://play.nim-lang.org/#ix=3rMP
01:58:12FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=3rMQ
01:58:48FromDiscord<ElegantBeef> Though without a test cannot confirm if that works for you
02:05:05FromDiscord<ElegantBeef> @hamidb80 did that work?
02:05:23FromDiscord<ElegantBeef> If not give me a usable example i'm too lazy to make one for you πŸ˜›
02:08:34FromDiscord<hamidb80> sent a code paste, see https://play.nim-lang.org/#ix=3rMS
02:09:17FromDiscord<hamidb80> i dont know why mapIt filterIt, ... just works with pars ()
02:10:00FromDiscord<hamidb80> In reply to @hamidb80 "why do i have": even if you want pass a block of code to it, you should pass it with pars ()
02:10:11FromDiscord<hamidb80> (edit) "it," => "them,"
02:10:23FromDiscord<ElegantBeef> Ah i see
02:10:39FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=3rMU
02:11:24FromDiscord<ElegantBeef> https://nim-lang.org/docs/manual_experimental.html#do-notation
02:12:24FromDiscord<hamidb80> "do with parentheses is an anonymous proc; however a do without parentheses is just a block of code."
02:12:38FromDiscord<hamidb80> Haha, i didn't know that, thank u
02:13:45FromDiscord<ElegantBeef> Now the reason why it needs the pars is probably just due to how the evaluation works but idk
02:16:35FromDiscord<hamidb80> yeah i think `do` notation distinguishes a untyped parameter for a macro to a block of code
02:21:36FromDiscord<ElegantBeef> Yea the block there just doesnt work there, the parse just doesnt like it πŸ˜„
02:29:00*cyraxjoe quit (Quit: I'm out!)
02:46:18*arkurious quit (Quit: Leaving)
02:51:58*rockcavera quit (Remote host closed the connection)
02:55:22FromDiscord<@bracketmaster-5a708063d73408ce4> do macros make nim homoiconic?
02:56:38FromDiscord<ElegantBeef> Well they're homoiconic macros
03:06:04FromDiscord<Rika> what would disqualify a language from being homoiconic
03:09:56FromDiscord<Rika> p.sure you can wrap a whole nim file in a macro and it would work so i guess?
03:13:42*cyraxjoe joined #nim
03:23:10FromDiscord<RattleyCooper> I'm pretty new to nim and I'm wondering if there is a concrete type like a `seq` that can contain a variety of types?
03:24:01FromDiscord<RattleyCooper> types would be arbitrary and inconsistent
03:24:01FromDiscord<Rika> no, you have to box the variety
03:24:14FromDiscord<Rika> totally arbitrary is impossible without type elision
03:24:22FromDiscord<Rika> ...i believe
03:25:23FromDiscord<Rika> if you know the subset of types you want to store you can use the boxing (variant type) method
03:26:11FromDiscord<Rika> otherwise i dont know of more methods but storing it in a `pointer` (equiv. C void)
03:27:04FromDiscord<Rika> are you sure the types are totally arbitrary?
03:27:53FromDiscord<RattleyCooper> Yes
03:28:55FromDiscord<Rika> what are you aiming to do?
03:28:56FromDiscord<RattleyCooper> I mean, I suppose. I was just thinking about how RPC works and was wondering how someone would create a way to register RPC procedures
03:29:28FromDiscord<RattleyCooper> And so if someone wanted to create a RPC how would you deal with the variety of types they might be using in their procedure calls?
03:29:41FromDiscord<Rika> register RPC procedures? you cant exactly make procedures anyway so it is done in macro i believe?
03:29:42FromDiscord<RattleyCooper> I'm not actually doing this, it's more of an exercise
03:29:58FromDiscord<Rika> so youre trying to implement closures
03:29:59FromDiscord<Rika> ?
03:30:39FromDiscord<Rika> i dont understand the relation of storing types in a heterogeneous seq and RPC
03:30:53FromDiscord<RattleyCooper> Well more of a dispatcher. Register RPCs to some kind of container and then send/receive the RPC info over network and run the RPC and send the result back
03:31:29FromDiscord<Rika> huh?
03:31:37FromDiscord<Rika> container as in docker?
03:31:37FromDiscord<RattleyCooper> remote procedure call
03:31:39FromDiscord<RattleyCooper> over the network
03:31:42FromDiscord<Rika> i know what RPC means
03:31:49FromDiscord<Rika> but how are you implementing that exactly
03:32:03FromDiscord<RattleyCooper> So the user defines their procedures and labels them as a RPC
03:32:12FromDiscord<ElegantBeef> Basically by doing it completely wrong
03:32:17FromDiscord<Rika> so you want an evaluation system as well?
03:32:21FromDiscord<ElegantBeef> You dont need to capture any variables yourself
03:32:23FromDiscord<Rika> that doesnt sound like rpc
03:32:32FromDiscord<Rika> that just sounds like a remote repl
03:32:45FromDiscord<ElegantBeef> Well anyway a p2p "rpc" can be seen here https://github.com/beef331/nettyrpc
03:32:46FromDiscord<Rika> im honestly absolutely confused
03:32:47fn<R2D299> itHub: 7"Implements an RPC like system using netty."
03:33:19FromDiscord<ElegantBeef> It captures the to/from inside of a lambda
03:33:38FromDiscord<Rika> you handle this beef ive stuff to do right now lol
03:33:40FromDiscord<ElegantBeef> Actually iirc it adds the `from` into the procedure
03:33:49FromDiscord<ElegantBeef> Will do πŸ˜„
03:33:56FromDiscord<RattleyCooper> So, I'm not so much worried about making my own RPC...
03:34:34FromDiscord<ElegantBeef> Well you're worried about holding heterogeneous types together which requires boxing
03:35:13FromDiscord<Rika> boxing in either variant types (known subset) or total type erasure (unknown subset)
03:35:14FromDiscord<ElegantBeef> I have this library that aids in that but it's not overly great https://github.com/beef331/nettyrpc
03:35:16fn<R2D299> itHub: 7"Implements an RPC like system using netty."
03:35:22FromDiscord<Rika> you sent that already
03:35:25FromDiscord<ElegantBeef> god damn it
03:35:27FromDiscord<Rika> lol
03:35:30FromDiscord<ElegantBeef> https://github.com/beef331/sumtypes
03:35:32fn<R2D299> itHub: 7"Easy to use Nim sum type library"
03:35:32FromDiscord<ElegantBeef> There we go
03:36:21FromDiscord<Rika> @ElegantBeef the issue is he does not know the types
03:36:26FromDiscord<Rika> so thats not feasible
03:37:12FromDiscord<ElegantBeef> Let's look at this rpc example, you're wanting to hold a bunch of procedures in a list right?
03:37:58FromDiscord<RattleyCooper> Yeah, I have a template that can handle most of it
03:38:01FromDiscord<ElegantBeef> got a bit of a headache so probably going to be loopy πŸ˜„
03:38:08FromDiscord<Rika> when are you not
03:38:16FromDiscord<ElegantBeef> No clue
03:38:24FromDiscord<RattleyCooper> I'm just struggling with a container with varying types on my custom type
03:38:40FromDiscord<RattleyCooper> Can I paste small snippets in here?
03:38:47FromDiscord<ElegantBeef> Yep or on the playground
03:38:49FromDiscord<Rika> sure y noty
03:38:52FromDiscord<Rika> (edit) "noty" => "not"
03:39:15FromDiscord<RattleyCooper> sent a long message, see http://ix.io/3rN7
03:39:26FromDiscord<RattleyCooper> I put `rpc_args` as `int` so it will compile
03:39:44FromDiscord<RattleyCooper> I am not going to register the varargs
03:39:58FromDiscord<RattleyCooper> Just showing what I want for my `rpc_args`
03:40:03FromDiscord<ElegantBeef> Yea this just seems like the wrong way about
03:40:04FromDiscord<RattleyCooper> something like `varargs`
03:40:09FromDiscord<RattleyCooper> How should I do it?
03:40:26FromDiscord<Rika> uh no
03:40:30FromDiscord<Rika> you cannot
03:40:31FromDiscord<RattleyCooper> I'm coming from much looser languages lol
03:40:37FromDiscord<ElegantBeef> Well you can rika
03:40:41FromDiscord<RattleyCooper> Well I don't know any better
03:40:47FromDiscord<ElegantBeef> Yea it's fine what you attempted
03:40:48FromDiscord<Rika> put it in a `pointer` and figure out how to make the proc accept it
03:40:52FromDiscord<ElegantBeef> Nah
03:40:57FromDiscord<Rika> wdym then
03:41:03FromDiscord<Rika> wait
03:41:05FromDiscord<ElegantBeef> Let's use nettyrpc as an example
03:41:05FromDiscord<Rika> varargs
03:41:15FromDiscord<Rika> that means its still homogeneous isnt it
03:41:43FromDiscord<ElegantBeef> I assume you want all your args to be anything?
03:41:47FromDiscord<RattleyCooper> Yeah
03:41:57FromDiscord<ElegantBeef> Then yea you can make an inbetween lambda
03:42:00FromDiscord<ElegantBeef> Like i do with netty
03:42:01FromDiscord<ElegantBeef> (edit) "netty" => "nettyrpc"
03:42:03FromDiscord<Rika> the only method i know is what lua's c integration does or so i believe
03:42:04FromDiscord<ElegantBeef> Will show an example
03:42:08FromDiscord<RattleyCooper> πŸ˜„
03:44:20FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=3rN8
03:44:34FromDiscord<ElegantBeef> that event table is an `array[id, proc(s: var Stream)`
03:44:43FromDiscord<Rika> oh you're making it a stream
03:44:54FromDiscord<Rika> so basically kinda what i was thinking of as well
03:45:09FromDiscord<Rika> a proc that receives a pointer and handles the parameters itself
03:45:13FromDiscord<ElegantBeef> Well it's the best way to do it, have each procedure read the stream
03:45:21FromDiscord<Rika> just more nim like, i think in c i guess
03:45:23FromDiscord<ElegantBeef> Yea that'd work aswell ofc but isnt as nice
03:45:46FromDiscord<ElegantBeef> (edit) "https://play.nim-lang.org/#ix=3rN8" => "https://play.nim-lang.org/#ix=3rN9"
03:45:48FromDiscord<RattleyCooper> I will have to look into streams
03:45:58FromDiscord<ElegantBeef> Well look at nettrpc it's not a large library, though uses macros
03:46:11FromDiscord<ElegantBeef> the main module is 100 loc
03:46:26FromDiscord<RattleyCooper> I read up on the AST and a little bit on macros, but to be honest most of my programming experience is in python and PHP
03:46:30FromDiscord<RattleyCooper> and gdscript lol
03:47:29FromDiscord<ElegantBeef> Well the beauty is you can rip the entire macro apart putting in `treeRepr` or compile with `--expandMacro:networked`
03:47:29FromDiscord<RattleyCooper> So I have a lot to learn. A lot of stuff goes over my head but I am trying lol
03:47:43FromDiscord<RattleyCooper> Oh wow
03:48:04FromDiscord<ElegantBeef> `treeRepr(someNode)` will output the ast
03:49:21FromDiscord<ElegantBeef> and `--expandMacro:networked` will show you the generated AST of that macro, so you can see what i do and understand it hands on
03:49:34FromDiscord<ElegantBeef> I do have two examples that work
03:49:59FromDiscord<ElegantBeef> I guess it's generated code, not AST, but meh
03:50:07FromDiscord<RattleyCooper> lol
03:50:35FromDiscord<ElegantBeef> I'm also almost always here if you need to talk about what i do
03:52:04FromDiscord<RattleyCooper> Thanks! I am still trying to figure this out. I haven't gotten this far out of my comfort zone in a while lol
03:52:45FromDiscord<RattleyCooper> I am just trying to figure out all the different types and how templates/proc/func work
03:53:32FromDiscord<Bung> pmunch's jsonschema dont do export types ?
03:53:41FromDiscord<ElegantBeef> `func` is just a `proc`
03:53:48FromDiscord<ElegantBeef> `templates` are code subsitution
03:54:12FromDiscord<ElegantBeef> Though a `func` cannot have side effects so anything that mutates variables not passed in as `var`
03:54:25FromDiscord<RattleyCooper> Yeah, I am just not used to compiled languages so I don't understand why you can't have something like `varargs` outside of a template
03:54:34FromDiscord<ElegantBeef> You can though
03:54:43FromDiscord<RattleyCooper> Oh?
03:54:46FromDiscord<ElegantBeef> `proc a(args: varargs[int])` works
03:54:55FromDiscord<RattleyCooper> Oh sorry, `untyped`
03:55:15FromDiscord<RattleyCooper> `proc a(args: varargs[untyped])` doesn't work does it?
03:55:21FromDiscord<ElegantBeef> No cause it's not semantically checked
03:55:33FromDiscord<RattleyCooper> Yeah, this is the stuff I'm missing haha
03:55:34FromDiscord<Bung> you should use template
03:55:54FromDiscord<RattleyCooper> Been reading but there is so much. Just going to take precious time
03:56:48FromDiscord<ElegantBeef> Well we're here so can always ask πŸ˜›
03:58:24FromDiscord<RattleyCooper> I appreciate it! I'm sure I'll have more questions. I'm looking through `nettyrpc` right now
03:58:33FromDiscord<Bung> @PMunch jsonschema dont do export types ?
04:06:01*supakeen quit (Quit: WeeChat 3.2)
04:06:37*supakeen joined #nim
04:32:35FromDiscord<reilly> sent a code paste, see https://play.nim-lang.org/#ix=3rNg
04:33:11FromDiscord<reilly> (edit) "https://play.nim-lang.org/#ix=3rNg" => "https://play.nim-lang.org/#ix=3rNh"
04:33:19FromDiscord<reilly> (edit) "https://play.nim-lang.org/#ix=3rNh" => "https://play.nim-lang.org/#ix=3rNi"
04:34:30FromDiscord<reilly> If not, I could always just walk the directory at runtime... but that seems so much slower.
04:35:46FromDiscord<ElegantBeef> look at `walkdir` and `static`
04:37:52FromDiscord<ElegantBeef> sent a code paste, see https://paste.rs/mAN
04:38:00FromDiscord<ElegantBeef> May need to use a macro to make it an array
04:51:10FromDiscord<reilly> sent a code paste, see https://play.nim-lang.org/#ix=3rNl
04:52:00FromDiscord<reilly> This isn't super flexible, since it assumes that there will always be 635 files in the directory, but it works for now.
04:59:05FromDiscord<ElegantBeef> It takes like 2 seconds to make the macro πŸ˜„
05:01:01FromDiscord<reilly> Bold of you to assume I have the slightest understanding of macros.
05:03:51FromDiscord<ElegantBeef> I'll get it to you in a minute πŸ˜„
05:10:15FromDiscord<ElegantBeef> @reilly https://play.nim-lang.org/#ix=3rNt here?
05:12:30FromDiscord<ElegantBeef> Now all you need to do is make a seq then pass it to that macro and boom
05:16:56FromDiscord<reilly> sent a code paste, see https://play.nim-lang.org/#ix=3rNu
05:17:17FromDiscord<ElegantBeef> just do the logic in a `nodeNames = static:` πŸ˜›
05:20:30FromDiscord<reilly> I don't really understand how to use `static:`.
05:21:09FromDiscord<reilly> The manual isn't much help in that regard. (Wow, compile-time `echo`s! ...and only compile-time `echo`s.)
05:21:23FromDiscord<ElegantBeef> well it runs code at compile time
05:21:32FromDiscord<ElegantBeef> So if you put getNodenames in there hten call `asArray it'll be fine
05:23:41FromDiscord<ElegantBeef> Unless you want that procedure to be cleaner πŸ˜„
05:28:21FromDiscord<reilly> I'm having a hard time putting into words why that doesn't make sense to me. You already have everything I've written, and you obviously know better than I do, so could you just show me?
05:28:46FromDiscord<reilly> It'll click when I actually see it, I'm sure.
05:31:18FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=3rNy
05:35:11FromDiscord<reilly> That doesn't work. `res` gets filled just fine, but `asArray` spits out an `array[0..-1, empty]`, which is obviously not correct.
05:35:50FromDiscord<@bracketmaster-5a708063d73408ce4> I've heard that nim can automatically insert free calls during compilation when the compiler is able to determine an object goes out of scope
05:35:57FromDiscord<@bracketmaster-5a708063d73408ce4> what is this behavior called?
05:38:16FromDiscord<RattleyCooper> https://nim-lang.org/blog/2020/10/15/introduction-to-arc-orc-in-nim.html
05:38:25FromDiscord<RattleyCooper> ^ this?
05:38:59FromDiscord<RattleyCooper> scope based memory management?
05:43:15FromDiscord<ElegantBeef> @reilly works fine it was cause it was an empty array
05:43:21FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=3rNz
05:44:25FromDiscord<reilly> I had tested it on my actual machine, not on the site, so the array should have been anything but empty. Well, now we have an "it works on my machine" problem.
05:45:35FromDiscord<ElegantBeef> Ah nvm the adding is different
05:45:40FromDiscord<ElegantBeef> So disregard jusut use the proc πŸ˜„
05:46:36FromDiscord<reilly> You know what they say, if it ain't broke, don't fix it.
05:55:28FromDiscord<Rika> "witchcraft"
05:55:31FromDiscord<Rika> not really...
06:35:09*max22- joined #nim
06:41:53*max22- quit (Ping timeout: 268 seconds)
07:07:57fn<ForumUpdaterBot99> New thread by Arnetheduck: Safe `enum` conversion, see https://forum.nim-lang.org/t/8188
07:23:44*max22- joined #nim
07:24:57*beshr joined #nim
07:33:11FromDiscord<ElegantBeef> I cant way to see arne's negative feedback for my response on that post! πŸ˜„
07:33:41FromDiscord<Rika> Cursed macro
07:34:02FromDiscord<ElegantBeef> I think timothee one lined it
07:34:05FromDiscord<ElegantBeef> I dont recall
07:34:47FromDiscord<ElegantBeef> Or maybe i did it, cause i regret the `result =` there
07:35:05FromDiscord<Rika> Well IMO it’s a bad solution because does everyone now need to copy that macro and proc
07:35:15FromDiscord<ElegantBeef> Well no cause you put it in a module πŸ˜„
07:35:20FromDiscord<ElegantBeef> It's also the safest way
07:35:45FromDiscord<Rika> In reply to @ElegantBeef "Well no cause you": Still a lot of duplication across programmers
07:36:09FromDiscord<ElegantBeef> Well this is arne so probably status, and they run their own stdlib
07:37:09FromDiscord<ElegantBeef> It probably needs to be included somewhere considering the complexity i agree though
07:37:27FromDiscord<ElegantBeef> But it's the only way to safely generate a range for the holey enums
07:38:14FromDiscord<Rika> Praying to one of my enums right now
07:38:31FromDiscord<ElegantBeef> hey i said holey not holy
07:50:00FromDiscord<Rika> β€œI realize now this is probably too much for your style guide :D” lol
07:51:00FromDiscord<ElegantBeef> Well it's the only safe way i can see to do it, so who wants to PR into `enumutils`? πŸ˜„
07:51:15FromDiscord<Rika> Why don’t you
07:51:48FromDiscord<ElegantBeef> smokebomb
08:02:40*xet7 joined #nim
08:33:21FromDiscord<haxscramper> In reply to @Ayy Lmao "That would be very": https://github.com/haxscramper/hnimast/blob/master/tests/tCompilerAux.nim#L15
08:33:44FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rO1
08:34:08FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rO2
08:34:18FromDiscord<haxscramper> It does work, but it is not pretty by any means
08:34:47FromDiscord<haxscramper> You can implement own mangling scheme to have something adequate, right now I just convert `nkSym` to sighash directly
08:35:40FromDiscord<haxscramper> NIm compiler also generates intermediate variables like `_T90` to guarantee order of argument evaluation
08:35:53FromDiscord<haxscramper> IIRC C does not enforce it, maybe lua does, so it is not necessaary
08:36:13FromDiscord<haxscramper> But lua does not have support for `if` expressions etc.
08:36:39FromDiscord<haxscramper> You don't need to worry about macros and templates, they are handled by `compilestring`
08:36:50FromDiscord<haxscramper> I also added `symDefines` to pass `define` flags to compilation
08:37:07FromDiscord<haxscramper> Pushed new version - `0.3.31` for hnimast, it has these changes
08:38:09FromDiscord<haxscramper> Right now I just generate string with almost no control over indentation etc. You can use https://haxscramper.github.io/hmisc/src/hmisc/other/blockfmt.html to make it better-looking
08:41:41FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rO4
08:43:25FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rO5
08:44:35FromDiscord<haxscramper> For some things - IDK how I'm supposed to handle them exactly. Like `nkHiddenDeref` https://github.com/haxscramper/hnimast/blob/ece4676973258330e323fefe15ea81f39ab2ed18/tests/tCompilerAux.nim#L64 etc.
08:45:07FromDiscord<haxscramper> Not sure what they are responsible for on the nim side and I don't know enough lua to correctly convert them
09:56:12FromDiscord<haxscramper> In reply to @haxscramper "It does work, but": https://github.com/nim-lang/Nim/pull/14632/files had more readable manging scheme implemented
11:05:13*max22- quit (Ping timeout: 246 seconds)
11:14:41FromDiscord<gerwy> Hi so i was wondering
11:14:46FromDiscord<gerwy> because basically i have a list of some youtubers i like to watch when i am bored and i loop through all of them to see if some new video appeared, but i don't always remember all of them so i would like to automate this thing
11:14:54FromDiscord<gerwy> do anyone know any resource for that? Like Youtube API or or something like ths?
11:14:59FromDiscord<gerwy> (edit) "ths?" => "this?"
11:16:15FromDiscord<gerwy> its probably possible to do it in python easily, but i wonder if i could do something like this in nim too, but idk how to work with API's in nim or if there is a way for me to check videos of youtuber from outside of youtube without going full page fetch path
11:18:56FromDiscord<gerwy> TLDR↡How to use API's with Nim
11:19:36FromDiscord<gerwy> (edit) "TLDR↡How" => "TL;DR↡How"
11:20:56FromDiscord<Kermithos> I think youtube has an RSS feed
11:21:05FromDiscord<Kermithos> would probably be the easiest way
11:22:00FromDiscord<Rika> wouldnt be surprised if they removed it sooner or later though
11:22:46FromDiscord<Kermithos> yea, there are still other ways but Im not sure how they work
11:23:07FromDiscord<Kermithos> but projects like FreeTube, newpipe or Inviodious can get the feed without the rss endpoint
11:23:39FromDiscord<gerwy> In reply to @Kermithos "I think youtube has": it has, i should probably even use it because i heard that if you fetch big amount of channels videos then you can get banned (im using FreeTube)
11:24:38FromDiscord<gerwy> but yeah, i don't need it to be seconds or minutes precise, i just want to know if new video is out so yeah, hmm could be useful↡hmmm, RSS Feed is just XML? Right? or HTML?
11:24:45FromDiscord<Kermithos> not sure what ratelimits youtube has for RSS but if you dont spam it should be fine
11:25:03FromDiscord<Kermithos> In reply to @Life Sucks "but yeah, i don't": xml
11:25:16FromDiscord<gerwy> i have more than 200 subscribers, probably less than 100 is the limit
11:25:56FromDiscord<gerwy> oh okay and i saw that nim has xml parser in std, nice i could now receive it, store it and look for changes right?
11:26:53FromDiscord<Kermithos> yea
11:27:01FromDiscord<Kermithos> you could check the upload date too
11:27:58FromDiscord<gerwy> Okay thanks i forgot about the RSS feed↡i will make something with it, after that i would like to make it so that i type command into the terminal instead of typing to execute the script
11:28:14FromDiscord<gerwy> but i guess it could be just an alias so yeah hmm doesn't seem as hard as i thought thaaanks<3
11:28:42FromDiscord<Kermithos> In reply to @Life Sucks "but i guess it": if you are on linux you can just write it in your ~/.bashrc
11:29:11FromDiscord<gerwy> well im basically on linux kinda
11:29:30FromDiscord<gerwy> and im using zsh, soo, yeah in ~/.zshrc
11:29:40FromDiscord<Rika> i'd love to make a program for my sub feed too, but i unfortunately want precise timing and also have almost 1000 subscriptions so i dont think i can...
11:31:42FromDiscord<gerwy> i hate it that youtube now doesn't show precise sub count,
11:32:56FromDiscord<gerwy> but if you log into YT and use it's API i think its possible, you can do (or even use if he shared the code) carykh sub counter, but change some things because he fetches sub count like every second or every minute and just lerp to the next value he got
11:34:31FromDiscord<gerwy> hmm something like this
11:34:31FromDiscord<gerwy> https://www.youtube.com/watch?v=JNBsdSsAmYQ
11:34:34fn<R2D299> outube: 7"JACKNJELLIFY HITTING ONE MILLION STREAM!"
11:36:04FromDiscord<gerwy> can't find code for it tho ://
11:37:45*max22- joined #nim
12:06:02*supakeen quit (Quit: WeeChat 3.2)
12:06:36*supakeen joined #nim
12:30:00*max22- quit (Ping timeout: 268 seconds)
12:52:30*arkurious joined #nim
12:58:38*max22- joined #nim
13:18:06*max22- quit (Ping timeout: 268 seconds)
13:46:44*stkrdknmibalz quit (Quit: WeeChat 3.0.1)
13:53:42FromDiscord<zevv> treeform#3712\: ping
13:56:23FromDiscord<Rika> @treeform
14:08:29*max22- joined #nim
14:12:10*dbohdan left #nim (#nim)
14:18:22FromDiscord<Ayy Lmao> sent a code paste, see https://play.nim-lang.org/#ix=3rPA
14:20:19FromDiscord<Ayy Lmao> sent a code paste, see https://play.nim-lang.org/#ix=3rPC
14:20:36FromDiscord<haxscramper> yes, that's how you should be doing this
14:21:07FromDiscord<Ayy Lmao> I think the JS backend does something similar, is there any way to tap into what the compiler does there or do I need to implement it manually?
14:22:00FromDiscord<Ayy Lmao> Because there are a lot of edge cases that are a bit annoying
14:32:31*Schnouki quit (Ping timeout: 256 seconds)
14:34:32FromDiscord<Ayy Lmao> @haxscramper Oh yeah, I was also wondering if it is possible to have compileString to tell you line numbers when there are errors in the nim code. Right now it just says the error with no context.
14:41:10*max22- quit (Ping timeout: 246 seconds)
14:42:32*supakeen quit (Remote host closed the connection)
14:42:56*supakeen joined #nim
14:43:16FromDiscord<haxscramper> There is a `optionsConfig` for `compileString` that accepts `ConfigRef`
14:43:27FromDiscord<haxscramper> it has `.structuredErrorHook` callback field
14:43:47FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rPI
14:43:50FromDiscord<haxscramper> but you can change to different implementation if you want
14:44:22FromDiscord<haxscramper> also, in general you would want to use compiler passes instead of `compileString` because you might also need to compile a part of stdlib
14:44:25FromDiscord<haxscramper> and things like that
14:44:38FromDiscord<haxscramper> `compileString` does not return other module bodies
14:46:40fn<ForumUpdaterBot99> New Nimble package! pl0t - Plot and visualize data, see http://pl0t.com
14:49:54*koltrast quit (Ping timeout: 240 seconds)
14:50:00FromDiscord<Ayy Lmao> In reply to @haxscramper "also, in general you": Yeah I was wondering about what happens when importing stdlib stuff. So you mean I should be doing the stuff that `compileString` is doing manually?
14:51:51*koltrast joined #nim
14:52:00FromDiscord<haxscramper> In reply to @Ayy Lmao "Yeah I was wondering": yes, second argument for `makePass` should generate necessary code
14:57:48*max22- joined #nim
14:58:52FromDiscord<Ayy Lmao> In reply to @haxscramper "yes, second argument for": Alright, cool. I have a lot of research ahead of me haha. There's a lot of stuff in there I have no idea what it's doing
15:08:11fn<ForumUpdaterBot99> New thread by Pedroos: Nested string format error: , see https://forum.nim-lang.org/t/8189
15:11:03*pgimeno joined #nim
15:20:49pgimenoI'm trying to run a network-less build, but it's crashing when attempting to clone Nimble, even though it is already present in the dir. Should I place it somewhere other than the main Nim git directory? This worked with csources_v1.
15:24:59FromDiscord<Recruit_main707> Programming language battle Royale, let’s go https://m.youtube.com/watch?v=↡You can submit solutions and I bet you can improve them
15:25:09FromDiscord<Recruit_main707> bruh
15:25:50FromDiscord<Recruit_main707> https://m.youtube.com/watch?v=pv4Yq35Chx0
15:25:52fn<R2D299> outube: 7"45 Computer Languages Compared: Which is FASTEST?"
15:25:57FromDiscord<Rika> eh
15:26:20FromDiscord<Recruit_main707> Sorry discord is shit on phone
15:30:36*vsantana quit (Quit: vsantana)
15:32:04FromDiscord<treeform> In reply to @zevv "treeform#3712\: ping": Yes?
15:32:06*xet7 quit (Remote host closed the connection)
15:32:50*xet7 joined #nim
16:17:15*stkrdknmibalz joined #nim
16:18:37*GreaseMonkey quit (Remote host closed the connection)
16:19:48*greaser|q joined #nim
16:28:05*Vladar joined #nim
16:28:40FromDiscord<levovix> How to get varargs len staticly?↡For example, to pass it to generic
16:30:10FromDiscord<haxscramper> You can't statically get number of varargs for a `proc`, they are passed as an array internallly
16:30:25FromDiscord<haxscramper> You would need to write a macro/template that counts arguments
16:43:55FromDiscord<konsumlamm> the length of varargs isn't always known statically, since you can also pass a `seq` (or any `openArray`)
16:55:25FromDiscord<treeform> In reply to @reilly "I'd gladly port Pixie": I started with this: https://www.shadertoy.com/view/ldXyRn
17:44:29fn<ForumUpdaterBot99> New thread by Scotpip: Parsecsv crashing witn OverflowDefect error, see https://forum.nim-lang.org/t/8190
17:52:52*supakeen quit (Remote host closed the connection)
17:53:16*supakeen joined #nim
18:28:35*max22- quit (Ping timeout: 268 seconds)
18:45:26*xet7 quit (Remote host closed the connection)
18:49:42fn<ForumUpdaterBot99> New question by SlightlyKosumi: Convert uint8 to int, see https://stackoverflow.com/questions/68237261/convert-uint8-to-int
18:51:45*neceve joined #nim
18:54:31FromDiscord<RayPals> Hello, Does anyone know of a good starter tutorial for Nim?
19:04:29FromDiscord<haxscramper> https://nim-by-example.github.io/getting_started/
19:05:40FromDiscord<Zoom> @RayPals\: How "sarter" are we talking? The [official ones](https://nim-lang.org/docs/tut1.html) are fine. You can also try [learn Nim in x minutes](https://github.com/adambard/learnxinyminutes-docs/blob/master/nim.html.markdown). Nim wiki has good pages for users with experience in other languages\: https://github.com/nim-lang/Nim/wiki
19:07:00FromDiscord<dain> question: in a nim macro am I able to "peek inside" a function
19:07:27FromDiscord<dain> like, if a function is used in the body of the macro, inspect and possibly modify it's AST as if it were inlined
19:07:37FromDiscord<dain> (edit) "it's" => "its"
19:09:01FromDiscord<dain> (why i want to do this: I want to make a DSL that is basically nim but you can only use a restricted subset of functions, or [recursively] functions that only use those functions)
19:09:33FromDiscord<dom96> no, you cannot do this, but you can generate a new function based on the one that's called and then rewrite the ast to call it instead
19:10:49FromDiscord<dain> hmm
19:11:47FromDiscord<dain> can I stick attributes onto functions? like how one might use `setattr` in python
19:12:54FromDiscord<dom96> don't think so
19:14:44FromDiscord<haxscramper> You might try something with `getInst` for proc symbol
19:14:59FromDiscord<haxscramper> I'm not sure but maybe this would store all pragma annotations in the implementation
19:15:21FromDiscord<haxscramper> This works for objects, so you can add custom annotations to types and then check for them via`getTypeInst`
19:15:29FromDiscord<haxscramper> that returns original source
19:15:43FromDiscord<haxscramper> maybe it would work the same way for procedures, but I'm not sure
19:15:45FromDiscord<dain> sent a code paste, see https://play.nim-lang.org/#ix=3rRq
19:17:40FromDiscord<dain> btw my goal for this is to have a text language for defining excel models. it would eventually all compile to an excel spreadsheet. so the only stuff you could use is stuff that has an analogue as an excel formula
19:19:16FromDiscord<dain> kind of like how you can replace a wysiwyg word processor with LaTeX/markdown and compile it. separation of layout and content
19:19:52FromDiscord<dain> i tried doing this in python but it was awful looking
19:23:23FromDiscord<demotomohiro> In reply to @treeform "I started with this:": You might already know, but this looks like efficient way to rendering fonts or some 2D curves on GPU:↡https://steamcdn-a.akamaihd.net/apps/valve/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf
19:36:04FromDiscord<exelotl> I always found "Learn Nim in X Minutes" to be really confusing
19:44:35FromDiscord<exelotl> it's kinda disorganised and starts with the wrong basics (`when`, `discard` and `tuple` ???)
19:46:06*max22- joined #nim
19:47:27FromDiscord<konsumlamm> `discard` is quite basic though
19:53:28FromDiscord<exelotl> yeah fair I'll give them that. But they demonstrate it multiple times too
19:59:00*Vladar quit (Quit: Leaving)
19:59:30*leth joined #nim
20:00:11*leth quit (Quit: nor eason)
20:11:18FromDiscord<planetis> this is equivalent to `proc some_function(x: int): int {.some_macro.} =`↡(@dain)
20:12:51FromDiscord<planetis> can modify a procedure this way
20:16:51FromDiscord<dain> In reply to @planetis "this is equivalent to": oh neato
20:16:55FromDiscord<dain> that makes it cleaner
20:17:15FromDiscord<dain> didn't know you could define custom pragmas
20:18:12FromDiscord<dain> wait, is this how the `pure` pragma is implemented? scan the function body for any calls to a blacklisted function that performs I/O?
20:18:33FromDiscord<dain> (edit) "`pure`" => "`noSideEffect`"
20:36:21FromDiscord<ElegantBeef> Nah no side effect is apart of the compiler
20:45:55FromDiscord<Quibono> Is there any good comparison between Nim and similar languages like V/Zig?
20:46:53FromDiscord<konsumlamm> V isn't all that similar tbh
20:49:02FromDiscord<Quibono> I ask because they're targeting similar niches.
20:49:17FromDiscord<codic> V is a language that promises far more than what it delivers
20:49:34FromDiscord<codic> the developer claims far too much that is nowhere near reality at all, i'd stay away from it
20:50:05FromDiscord<codic> zig is pretty cool but it's more of a C replacement, so you'll usually do more things by hand than nim
20:50:13FromDiscord<konsumlamm> as for Zig: they have very different philosophies
20:50:16FromDiscord<codic> does https://github.com/treeform/ws support server side ssl?
20:50:18fn<R2D299> itHub: 7"Simple WebSocket library for nim."
20:50:28FromDiscord<codic> yeah zig is very "keep it small, no macros, explicitness"
20:50:32FromDiscord<codic> whereas nim has lots of syntax sugar
20:51:06FromDiscord<konsumlamm> ye, Zig has a lot of intentional "limitations", like no GC, no macros, no default arguments
20:51:19FromDiscord<konsumlamm> the first two are the most significand differences i'd say
20:51:26FromDiscord<Quibono> Do you think the syntactic sugar is well born out versus the simplistic approach?
20:51:29FromDiscord<konsumlamm> (although you can technically use Nim without GC)
20:51:42FromDiscord<konsumlamm> "well born out"?
20:52:12FromDiscord<Quibono> Erm, is it worth it? I think limited options as to how you do things can wind up being nice.
20:52:25FromDiscord<konsumlamm> imo definitely, but ymmv
20:53:07FromDiscord<vindaar> I feel like half of my libraries would be more verbose without it πŸ˜…β†΅(@Quibono)
20:53:37FromDiscord<ElegantBeef> Different strokes for different folks, but Vlang is for no one πŸ˜›
20:53:53FromDiscord<Quibono> Eh, i actually find V to not be that bad nowadays
20:53:59FromDiscord<Quibono> But different conversation
20:54:14FromDiscord<haxscramper> they did full rewrite of the compiler since the start IIRC
20:54:37FromDiscord<konsumlamm> at some point the author realized that the promise of not using an AST isn't realistic
20:54:39FromDiscord<haxscramper> so it's like completely different implementation, aside from basic syntax
20:55:17FromDiscord<haxscramper> Also very strange project planning when they are offically writing an os in V
20:55:26FromDiscord<konsumlamm> V has so many false promises that i wouldn't even wanna use it if it was good some day
20:55:44FromDiscord<Quibono> They definitely use an ast, idk when they rewrote it, and yeah the OS is ongoing
20:55:45FromDiscord<haxscramper> they have excess contributors or something
20:55:58FromDiscord<haxscramper> OS, browser, compiler, editor
20:56:02FromDiscord<konsumlamm> In reply to @Quibono "They definitely use an": ye, but the author originally claimed that it won't need an AST
20:56:25FromDiscord<Quibono> In reply to @konsumlamm "ye, but the author": Yeah fair he over promises, the language isn’t as bad as people make it seem tho.
20:56:35FromDiscord<ElegantBeef> They also claimed no memory leaks without GC or a RC πŸ˜„
20:56:46FromDiscord<ElegantBeef> So that bitch leaked
20:56:57FromDiscord<konsumlamm> it was that bad at some point though
20:57:01FromDiscord<konsumlamm> maybe it's better now7
20:57:20FromDiscord<konsumlamm> half the "WIP"s are still not implemented though
20:57:52FromDiscord<haxscramper> they certainly have a lot of attention though
20:58:08FromDiscord<haxscramper> And since people are into "minimal" languages these days
20:58:13FromDiscord<konsumlamm> and look, now it uses a GC afaik, after claiming that "memory management will be like Rust but wthout ownership/borrowing"
20:58:30FromDiscord<haxscramper> btw, I think ARC is close to what they claim to add
20:58:37FromDiscord<haxscramper> really close
20:58:46FromDiscord<konsumlamm> In reply to @haxscramper "And since people are": it's not as minimal as people make it out to be from what i've seen
20:58:49FromDiscord<haxscramper> no GC, deterministic, no borrowing
20:58:55FromDiscord<konsumlamm> and a lot of stuff is builtin, that shouldn't be
20:59:01FromDiscord<Quibono> So yeah they basically use a GC for part of it and then β€œautofree” which is basically comptime reference counting.
20:59:05FromDiscord<konsumlamm> In reply to @haxscramper "no GC, deterministic, no": ARC is definitely a GC in my mind
20:59:21FromDiscord<ElegantBeef> Well it's memory management but it's not a garbage collector
21:00:20FromDiscord<haxscramper> In reply to @konsumlamm "it's not as minimal": they don't have `while` loop https://github.com/vlang/v/blob/master/doc/docs.md#bare-for
21:00:27FromDiscord<haxscramper> `minimal` confirmed
21:00:31FromDiscord<Quibono> So anyway, ya’ll should try it, but I’m more interested in /Why Nim/
21:00:52FromDiscord<konsumlamm> In reply to @haxscramper "they don't have `while`": ye, because they use `for` for 5 different things, including while loops
21:00:59FromDiscord<ElegantBeef> macros, lovely syntax, pretty good CTE
21:01:01FromDiscord<konsumlamm> so it has while loops, they're just called for loops
21:01:15FromDiscord<haxscramper> In reply to @konsumlamm "ARC is definitely a": well, that mostly a PR talk, really. I don't care about concrete definitions, but since people sometimes have weird reactions to GC
21:01:40FromDiscord<haxscramper> And really into "no GC" sometimes
21:01:48FromDiscord<konsumlamm> that's another issue
21:02:00FromDiscord<konsumlamm> In reply to @ElegantBeef "Well it's memory management": according to wikipedia it is :P
21:02:08FromDiscord<ElegantBeef> Indeed πŸ˜„
21:02:19FromDiscord<haxscramper> but I personally don't have enough expertise to argue how we should call ARC
21:02:45FromDiscord<haxscramper> In reply to @Quibono "So anyway, ya’ll should": C++ interop
21:03:02FromDiscord<haxscramper> Probably the best you can get, though haxe might be better
21:03:09FromDiscord<Quibono> CTE?
21:03:10FromDiscord<haxscramper> but they've build whole language around this
21:03:15FromDiscord<ElegantBeef> Compile time evaluation
21:03:16FromDiscord<konsumlamm> honestly, i (personally) would use orc over arc any time anyway
21:03:26FromDiscord<haxscramper> well, yes, orc will be default
21:03:30FromDiscord<ElegantBeef> Well ofc cause it only introduces cycle collection where needed
21:03:32FromDiscord<konsumlamm> i'm not confident enough to be sure that i'd never make ref cycles
21:03:33FromDiscord<ElegantBeef> So no cycles = arc πŸ˜„
21:04:01FromDiscord<konsumlamm> but i can't imagine any useful definition of GC that wouldn't include orc
21:04:21FromDiscord<ElegantBeef> Eh it think it's a moot thing to debate about, more merits in functional use and benefits
21:05:17FromDiscord<haxscramper> `ref bool`
21:05:47FromDiscord<konsumlamm> In reply to @Quibono "CTE?": that's one of the most unique features of Nim: you can call almost any function at compile time
21:06:09FromDiscord<konsumlamm> together with the macro system, which allows you transform Nim code at compile time (using Nim code)
21:06:47FromDiscord<haxscramper> In reply to @Quibono "So anyway, ya’ll should": To be honest I sometimes find this question kind of hard to answer, because if I start just listing language features, some of them might need somewhat boring explanation
21:07:01FromDiscord<haxscramper> but in general I find nim to be in line of how I want to do things
21:07:24FromDiscord<haxscramper> language does what I want it to and not being too smart about "the one way" to do things
21:07:43FromDiscord<haxscramper> I don't like these "one way" languages, so
21:07:45FromDiscord<konsumlamm> In reply to @Quibono "So anyway, ya’ll should": i'm curious what you like so much about it though, it doesn't have any interesting features imo, other than "being fast" ig (as long as you don't encounter a bug :P)
21:09:08FromDiscord<haxscramper> it can be considered a better go, at least if you don't do threading/async whatever google optimized go for
21:09:19FromDiscord<haxscramper> and people like go for some reason
21:09:27FromDiscord<konsumlamm> ~~i don't understand that either~~
21:11:46FromDiscord<Quibono> It’s fast, simple, active community, I kinda do like the β€˜one way’ mentality to an extent... uh, yeah pretty much that. I like that it mostly doesn’t have a GC although I’d like that to be more true
21:12:09FromDiscord<haxscramper> do you write high-performance code?
21:12:15FromDiscord<haxscramper> like hard realtime?
21:12:33FromDiscord<Quibono> I want to yes.
21:12:57FromDiscord<Quibono> Soft real-time at least.
21:14:07FromDiscord<dom96> In reply to @konsumlamm "that's one of the": these days there is actually many more languages that support it, D, Zig, Rust
21:14:26FromDiscord<konsumlamm> ye, but it's still not very wide spread
21:14:42FromDiscord<konsumlamm> and as much as i like Rust, it's CTFE can't be compared to that of Nim or D
21:15:07FromDiscord<Canelhas> sent a long message, see http://ix.io/3rRR
21:15:32FromDiscord<konsumlamm> i only wish it didn't have so many bugs πŸ˜…
21:15:44FromDiscord<dom96> so I'm lacking context, what are we discussing? πŸ™‚
21:15:49FromDiscord<konsumlamm> Nim
21:15:54FromDiscord<Canelhas> In reply to @dom96 "so I'm lacking context,": why nim
21:16:03FromDiscord<haxscramper> one of the very nice features of nim is support for lazy evaluation
21:16:09FromDiscord<konsumlamm> wat
21:16:11FromDiscord<haxscramper> no haskell-level
21:16:17FromDiscord<haxscramper> but you can get smart with templates
21:16:35FromDiscord<dom96> In reply to @Canelhas "why nim": ahh cool, for me no other language fits the bill of "fast Python"
21:16:46FromDiscord<konsumlamm> any language with closures/lambdas can implement lazy evaluation though
21:16:54FromDiscord<dom96> Nim is just as expressive as Python and gives me compiled binaries
21:17:08FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rRS
21:17:22FromDiscord<haxscramper> Idk, but I think this too is called lazy
21:17:24FromDiscord<Canelhas> the only thing that i wish was better is tooling↡i'm a pleb using vscode + win10↡and tooling isn't quite there yet
21:17:42FromDiscord<haxscramper> but that's not what regular definition of lazy evaluiation means of course
21:17:44FromDiscord<Canelhas> ( but i come from java so i might be spoiled in that regard )
21:18:25FromDiscord<konsumlamm> the most annoying part imo is that error highlighting only highlights the first character
21:21:50FromDiscord<haxscramper> also bitsets, variant types and arrays
21:22:08FromDiscord<haxscramper> if I were to choose one feature that I wanted to add to every language, it would probably be this one
21:22:40FromDiscord<haxscramper> all nim's `enum`-related stuff is just great
21:23:08FromDiscord<haxscramper> When #368 is implemented, it would be almost perfect
21:23:28FromDiscord<Canelhas> In reply to @haxscramper "When #368 is implemented,": whats changing?
21:23:43FromDiscord<haxscramper> you can have same field in different branches
21:24:17FromDiscord<haxscramper> well, the syntax looks a little different but the behavior matches
21:29:23FromDiscord<ElegantBeef> The contains -> `in` and `notin` is fantastic πŸ˜›
21:31:21FromDiscord<haxscramper> `if len(myset {flag1, flag2}) > 0`
21:31:35FromDiscord<haxscramper> `myset ∩ {flag1, flag2}`
21:36:25*greaser|q quit (Changing host)
21:36:25*greaser|q joined #nim
21:36:27*greaser|q is now known as GreaseMonkey
21:39:05FromDiscord<Bung> https://github.com/bung87/lsp_client/blob/master/tests/test1.nim I get io error ommunication to nimlsp server use asynctools, any idea?
21:52:26FromDiscord<Jasmine and Don't Forget!~> I actually don't have a job! it was an mlm
21:52:45FromDiscord<Jasmine and Don't Forget!~> Woot! woot!
21:55:55FromDiscord<mratsim> wot?
21:58:57FromDiscord<Jasmine and Don't Forget!~> Yeah, an old coworker was like here's a job and I needed a job and it was a pyramid scheme
22:01:24FromDiscord<codic> does https://github.com/treeform/ws support server side ssl?
22:01:27fn<R2D299> itHub: 7"Simple WebSocket library for nim."
22:06:30FromDiscord<mratsim> Yet another weekend lost fighting/setuping CI :/
22:06:55FromDiscord<ElegantBeef> Just use NI also known as Never Intergration πŸ˜„
22:07:00FromDiscord<vindaar> I was just looking at github and seeing your last pushes. Sorry to hear it 😐️
22:07:57FromDiscord<codic> or is it nim integration
22:09:13FromDiscord<treeform> In reply to @demotomohiro "You might already know,": I have read this before, but still tanks for sending it!
22:11:06FromDiscord<treeform> In reply to @codic "does https://github.com/treeform/ws support server": No it does not. But is a bad idea. What I do is wrap it with nginx with letsencrypt, much better then supporting it internally.
22:11:08fn<R2D299> itHub: 7"Simple WebSocket library for nim."
22:11:34FromDiscord<garett> sent a code paste, see https://play.nim-lang.org/#ix=3rS3
22:12:00FromDiscord<treeform> In reply to @codic "does https://github.com/treeform/ws support server": You can also wrap it with cloudflare, even simpler.
22:12:02fn<R2D299> itHub: 7"Simple WebSocket library for nim."
22:12:02FromDiscord<codic> In reply to @treeform "No it does not.": oh that is a good idea
22:12:46FromDiscord<treeform> SSL is complex and I would just rather others handle it.
22:13:21FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3rS4
22:19:06*neceve quit (Ping timeout: 240 seconds)
22:23:46FromDiscord<PressF> Hey people.↡I'm thinking about going throw a book on Nim live after my exams are over. Any free book suggestion (something like rust's book or "learn Go with tests")
22:46:55FromDiscord<ElegantBeef> Book wise there isnt much out there, do have http://ssalewski.de/nimprogramming.html though.
22:47:12FromDiscord<ElegantBeef> Also "Nim in Action" but that isnt free
22:59:30fn<ForumUpdaterBot99> New thread by Iortega: Cannot properly internationalize, see https://forum.nim-lang.org/t/8191
23:03:21FromDiscord<aleclarson> Can I take ownership of a ref, so I have to dealloc it manually or it leaks?
23:03:53FromDiscord<aleclarson> (edit) "Can I take ownership of a ref, so ... I`dealloc`" added "that" | "dealloc" => "`dealloc`"
23:04:04FromDiscord<aleclarson> (edit) "Can I take ownership of a ref, so that I have to `dealloc` it manually or ... it" added "else"
23:04:13FromDiscord<ElegantBeef> You mean of an already existent ref?
23:04:17FromDiscord<aleclarson> Right
23:06:03FromDiscord<ElegantBeef> If you can, I imagine it'd depend on the GC you're using so probably inadvisable
23:06:08FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rSc
23:07:21FromDiscord<ElegantBeef> There is a `GC_unref` though
23:07:37FromDiscord<haxscramper> It evaluates argument as a tuple and just uses first or second field
23:08:10FromDiscord<ElegantBeef> Yea so you'd `GC_ref(yourRef)` then to dealloc it you'd `GC_unref(yourRef)`
23:08:17FromDiscord<ElegantBeef> Though i do wonder if that has any implications on arc
23:08:52FromDiscord<treeform> In reply to @codic "so I just set": Yeah, I have single entry for whole server, no need to do it per path
23:15:35FromDiscord<aleclarson> In reply to @ElegantBeef "Yea so you'd `GC_ref(yourRef)`": Oh interesting thx!
23:18:30FromDiscord<treeform> In reply to @codic "so I just set": https://seanthegeek.net/1035/how-to-configure-a-nginx-reverse-proxy-with-lets-encrypt-certificates/ this is the setup I used. Certbot and nginx.
23:21:31*max22- quit (Remote host closed the connection)
23:44:28FromDiscord<βƒŸβƒŸ> why is this not working?
23:44:29FromDiscord<βƒŸβƒŸ> sent a code paste, see https://play.nim-lang.org/#ix=3rSh
23:46:18FromDiscord<exelotl> Nim's case insensitivity does not apply to the first character in an identifier
23:47:02FromDiscord<βƒŸβƒŸ> i see
23:47:25FromDiscord<exelotl> this is useful to prevent variables and types from clashing↡e.g. `var foo: Foo` is allowed
23:47:43FromDiscord<βƒŸβƒŸ> this feature does not support greek letters?
23:48:11FromDiscord<exelotl> hmm I imagine not
23:48:23FromDiscord<βƒŸβƒŸ> why
23:49:00FromDiscord<exelotl> I would assume it only works for ASCII but I've never tried it
23:51:03FromDiscord<βƒŸβƒŸ> it seems you are correct from my test
23:51:11FromDiscord<βƒŸβƒŸ> now the question is why does it not support greek
23:55:19FromDiscord<ElegantBeef> Cause unicode is complex
23:55:55FromDiscord<ElegantBeef> Ascii is simple to lowercase unicode is complicated to do
23:56:27FromDiscord<βƒŸβƒŸ> if the reason is it would be too complex to implement i would not have had it work for just latin characters
23:56:38FromDiscord<ElegantBeef> Well ascii is what most people use
23:57:16FromDiscord<exelotl> the main purpose of the feature is to allow you to use whatever style you want in your own project, even if the libraries you depend on are using a different style
23:57:31FromDiscord<βƒŸβƒŸ> what about non english speakers
23:58:31FromDiscord<exelotl> it's very unlikely that a library would be exporting an API with non ascii glyphs in it's public API
23:58:33FromDiscord<ElegantBeef> Well then you dont benefit from it anyway
23:58:53FromDiscord<exelotl> (edit) "an API" => "identifiers"
23:59:26FromDiscord<ElegantBeef> How much code is written in a language with unicode characters as the exported symbols?