<< 06-08-2021 >>

00:02:51*auxym quit (Ping timeout: 276 seconds)
00:04:07*Oddmonger quit (Ping timeout: 265 seconds)
00:20:06*vicfred joined #nim
00:24:58FromDiscord<theangryepicbanana> pretty sure I just killed the typechecker https://media.discordapp.net/attachments/371759389889003532/872998647976046652/unknown.png
00:41:47msttheangryepicbanana: http://trout.me.uk/foom2.jpg
00:42:05FromDiscord<theangryepicbanana> yeah pretty fun
00:42:36FromDiscord<theangryepicbanana> also just found out that implicit generics work just fine here, not sure why
00:45:53mstI have no idea but I sympathise with "bending software until it breaks" cos I do it all the time so the least I could do was provide a cute kitty to look at while you curse :D
00:46:14FromDiscord<theangryepicbanana> I appreciate the kitty :)
00:46:53FromDiscord<theangryepicbanana> this is now day 7 of arguing with nim's type checker
01:13:30*auxym joined #nim
01:23:17*neurocyte0 joined #nim
01:23:18*neurocyte0 quit (Changing host)
01:23:18*neurocyte0 joined #nim
01:25:50FromDiscord<undersquire> In reply to @theangryepicbanana "pretty sure I just": Lol
01:26:24FromDiscord<undersquire> It broke cause u need to use <T> not <T>
01:26:45FromDiscord<theangryepicbanana> In reply to @undersquire "It broke cause u": obv
01:26:56*neurocyte quit (Ping timeout: 258 seconds)
01:26:57*neurocyte0 is now known as neurocyte
01:27:03FromDiscord<undersquire> Simple mistake 😉
01:43:47*arkurious quit (Quit: Leaving)
01:53:54*krux02 quit (Remote host closed the connection)
02:04:53*auxym quit (Ping timeout: 258 seconds)
02:05:16*redj quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
02:06:08*redj joined #nim
02:14:38*redj quit (Read error: Connection reset by peer)
02:14:56*redj joined #nim
02:39:02*tiorock joined #nim
02:39:03*tiorock quit (Changing host)
02:39:03*tiorock joined #nim
02:39:03*rockcavera quit (Killed (zirconium.libera.chat (Nickname regained by services)))
02:39:03*tiorock is now known as rockcavera
03:04:36*tiorock joined #nim
03:04:36*tiorock quit (Changing host)
03:04:36*tiorock joined #nim
03:04:36*rockcavera is now known as Guest8834
03:04:36*Guest8834 quit (Killed (platinum.libera.chat (Nickname regained by services)))
03:04:36*tiorock is now known as rockcavera
03:07:10FromDiscord<Alea> Why does nim only have bitwise operators and not logical ones? Isn't bitwise slower when you just need a circuit breaker in your logic?
03:07:46FromDiscord<undersquire> logical ones as in like `break` ?
03:07:53FromDiscord<undersquire> (edit) "logical ones as in like `break` ... ?" added "and `continue`"
03:07:53FromDiscord<Alea> No like && vs &
03:07:56FromDiscord<undersquire> oh
03:08:02FromDiscord<undersquire> i think it does
03:08:24FromDiscord<Alea> It seems like and, or, etc. Do bitwise
03:08:31FromDiscord<undersquire> sent a code paste, see https://play.nim-lang.org/#ix=3v7A
03:08:48FromDiscord<Elegantbeef> `and` is bitwise with ints, and boolean with bools
03:08:49FromDiscord<Elegantbeef> if you want a concise different op `import std/bitops`
03:09:35FromDiscord<Alea> So False or True or False or ... Would cut off early?
03:10:11FromDiscord<undersquire> yeah
03:10:25FromDiscord<undersquire> False or True (this is true so it should end here)
03:10:47FromDiscord<undersquire> @ElegantBeef what is your take on this? https://forum.nim-lang.org/t/8301
03:10:52FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3v7C
03:10:55FromDiscord<Elegantbeef> This is testable pretty easily 😀
03:11:01FromDiscord<undersquire> personally i think its a cool idea to make the language a bit more consistent
03:11:36FromDiscord<Elegantbeef> I dont see the point proc definitions can get long so you'd have to scroll up to see if you're in a proc def, macro, template, or func
03:11:59FromDiscord<Elegantbeef> It also would have another indent level eaten for no reason but "consistency"
03:12:03FromDiscord<undersquire> oh true
03:12:22FromDiscord<undersquire> i forgot it could also be template, func etf
03:12:25FromDiscord<undersquire> (edit) "etf" => "etc"
03:12:36FromDiscord<undersquire> and yeah it would use another indentation level
03:12:56FromDiscord<Alea> In reply to @Elegantbeef "This is testable pretty": It came up during bed time reading and it was going to eat at me 😂
03:13:05FromDiscord<Alea> No comp to test on
03:13:13FromDiscord<Alea> Although playground to be fair
03:13:29FromDiscord<Elegantbeef> Ok well alea it doesnt call echo
03:13:29FromDiscord<Elegantbeef> Plus pragmas get more confusion
03:13:30FromDiscord<Elegantbeef> Plus pragmas get more confusing
03:15:43FromDiscord<Elegantbeef> And personally i only use var/const/let sections, so it's not overly consistent to me
03:18:20FromDiscord<Elegantbeef> I'd rather have the abillity to use `closure` `cdecl` `noconv` and similar to declare a procedure to get rid of the constant pragma usage 😛
03:19:34FromDiscord<Elegantbeef> Would also make the type mismatch easier to spot
03:35:26FromDiscord<gogolxdong (liuxiaodong)> Is there any RELIC library in Nim? https://github.com/relic-toolkit/relic
03:35:29nrds<R2D299> itHub: 7"Code"
04:06:01*supakeen quit (Quit: WeeChat 3.2)
04:06:33*supakeen joined #nim
04:31:07*thunder joined #nim
04:45:07*rockcavera quit (Remote host closed the connection)
05:04:27FromDiscord<Rika> In reply to @exelotl "there's no solution for": The bots can’t scrape if the validation channel is locked to them (unverified users) and admins and only them and admins
05:40:07FromDiscord<bolino> Hi, I have an issue with db_mysql.
05:40:26FromDiscord<bolino> Hi, I have an issue with db_mysql
05:45:41*thunder quit (Ping timeout: 258 seconds)
05:46:00FromDiscord<bolino> sent a long message, see http://ix.io/3v7Y
05:46:20FromDiscord<bolino> (edit) "http://ix.io/3v7Y" => "http://ix.io/3v7Z"
05:47:44FromDiscord<Elegantbeef> is `?` a special character in sql?
05:51:06FromDiscord<bolino> In reply to @Elegantbeef "is `?` a special": Yes, it's used for parameter substitution, but when it's alone, not when in a string. I tried to escape it with \, but it fails. Never had this issue in native SQL or any other language. I'm afraid the Nim library just parse for ? to interprete it as parameter substitution instead of treating the full string first.
05:51:22FromDiscord<bolino> (edit) "\," => ""\","
05:51:32FromDiscord<bolino> (edit) ""\"," => ""`\`","
05:51:43FromDiscord<bolino> (edit) "?" => "`?`"
06:00:16FromDiscord<Elegantbeef> I'd check the source for the procedure and see if there is anything odd
06:37:23FromDiscord<mratsim> In reply to @gogolxdong (liuxiaodong) "Is there any RELIC": I looked into relic before choosing a crypto library but it requires generating custom C code for the exact primitives you need.↵↵I might have something ready to use depending on what you want, so what do you need from there?
06:39:09*max22- joined #nim
07:34:52*neurocyte quit (Quit: The Lounge - https://thelounge.chat)
07:39:06*neurocyte joined #nim
07:39:06*neurocyte quit (Changing host)
07:39:06*neurocyte joined #nim
07:44:38arkanoidI'm trying hard to grok what the "mangle" option of c2nim does
07:45:08arkanoidmangle "_" "p" replaces ALL names with just ppppppppppppppppppppppppp
07:45:37arkanoidmangle "{.*}__{.*}" "$1_p_$2" seemns to work for replacing __ with _
07:46:17arkanoidbut this: mangle "_{.*}" "p_$1" and this: mangle "{.*}_" "$1_p" does NOT replace heading and trailing underscores
07:46:45arkanoidmanual says that they follow PEG syntax, but it doesn't seems https://www.gnu.org/software/guile/manual/html_node/PEG-Syntax-Reference.html
07:54:18FromDiscord<haxscramper> I'm pretty sure it does https://github.com/nim-lang/c2nim/blob/0557f1e2a86b2a9e99acd23ebc41cfa7dcdfc76b/mangler.nim#L65
07:54:36FromDiscord<haxscramper> You can try `std/peg` as a standalone
07:55:51*neceve joined #nim
08:46:13*maxime_ joined #nim
08:47:57*max22- quit (Ping timeout: 268 seconds)
08:55:15FromDiscord<dain> really basic question I have:
08:55:40FromDiscord<Elegantbeef> Real basic answer might suffice
08:55:58FromDiscord<dain> nim encourages unqualified imports. when reading such a module, how do you figure out where each function comes from
08:56:18FromDiscord<dain> im used to python where you can always tell by the prefix
08:56:29FromDiscord<Elegantbeef> Tooling + imports
08:58:43FromDiscord<Elegantbeef> And if you dont have tooling, is it really a concern to know which module X comes from, since you know you're probably not able to compile the code 😀
09:02:15FromDiscord<dain> what tools tells you where the functions come from
09:02:42FromDiscord<Elegantbeef> The vscode extension has it listed in hovering
09:02:55FromDiscord<Elegantbeef> Goto definition also does
09:11:11FromDiscord<Rika> The more you use a language the easier it becomes to tell where something comes from hahaha
09:11:23FromDiscord<Rika> Basically memory
09:11:41FromDiscord<Rika> And if you don’t know then tooling as said above
09:11:56FromDiscord<Rika> And then there’s also intuition lol
09:12:37FromDiscord<Elegantbeef> Yea it doesnt really matter where a symbol comes from assuming no overlap and you import just what you need
09:12:43FromDiscord<Elegantbeef> The compiler does tell you when you have unused modules
09:13:21FromDiscord<Elegantbeef> If you're wanting to see all the symbols the stdlib has you may consider looking at and searching here https://nim-lang.org/docs/theindex.html
09:15:45FromDiscord<Rika> Of course, you can have tooling import via “from import” too
09:15:56FromDiscord<Rika> Don’t ask me how to set that up though, I do not know
09:16:31FromDiscord<Rika> In reply to @Rika "Of course, you can": Notably nvim-compe can do this with configuration
09:16:40FromDiscord<haxscramper> https://narimiran.github.io/2019/07/01/nim-import.html
09:17:00*beshr quit (Ping timeout: 272 seconds)
09:30:16FromDiscord<dain> oh ya I knew that the compiler could figure it out, was just wondering how I would
09:30:19FromDiscord<dain> thanks :)
09:40:31FromDiscord<Rika> It’s usually obvious due to types and function names
10:54:34arkanoidI really don't get peg syntax
10:55:50emerywe'd have nim on plan9 if it wasn't for {.align.}
10:58:55arkanoidthis plan9? https://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs
10:59:38emeryyep
11:00:08emerythe native C compiler is only C99
11:00:30arkanoidthis never fell under my radar in last 20 years. I've been living on the moon probably. Cool project!
11:01:35emerywell, plan9 hasn't been used much in the last 20 years
11:02:23FromDiscord<haxscramper> What is wrong with .align.
11:03:04emeryolder compilers don't have any guarantess on aligning stuff
11:03:35FromDiscord<haxscramper> Ah, I just thought it somehow completely prevents use on plan9.
11:04:09FromDiscord<haxscramper> So you technically can use it, but not all features are available
11:04:44emeryit does, you don't see align very much, but its used in the GC, so stuff works until things are freed
11:38:05FromDiscord<enthus1ast> i'm fighting with staticRead, i've build a template engine which compiles everything on compile time. my "compileTemplateFile" functions accepts a static string to a path. But staticRead behaviour is not want i want, it is relative to the imported modules path. It also not accepts absolute dirs. Any idea how to solve this?
11:41:15FromDiscord<Rika> make your compileTemplateFile take in a static string with the contents of the file instead of a path
11:41:17FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3v8X
11:41:25FromDiscord<Rika> and just tell the user to use staticstring(path) or so
11:41:42FromDiscord<enthus1ast> yes that can work for not extended templates
11:41:50FromDiscord<enthus1ast> but for extended templates it will not \:/
11:42:00FromDiscord<Rika> i have no idea what extended templates are
11:42:15FromDiscord<enthus1ast> an index.html can extend a master.html
11:42:31FromDiscord<enthus1ast> and have the whole boiler plate from master around its code blocks
11:43:06FromDiscord<Rika> i dont know how to help then sorry
11:43:42FromDiscord<enthus1ast> sent a code paste, see https://paste.rs/IOn
11:44:11FromDiscord<enthus1ast> wow that code block is broken, sorry
11:46:04FromDiscord<Rika> i dont know how "broken" looks
11:46:07FromDiscord<Rika> it looks fine in discord
11:46:26FromDiscord<enthus1ast> ok in matrix it is broken ...
11:47:31FromDiscord<enthus1ast> the problem is that the {% extends master.nwt %} internally must call staticRead to read the master template, and this is relative to my parser
11:51:01FromDiscord<enthus1ast> which basically is a showstopper 😥
11:54:11*maxime_ quit (Ping timeout: 268 seconds)
11:54:21FromDiscord<Rika> windows or linux
11:54:29FromDiscord<enthus1ast> currently windows
11:54:51FromDiscord<enthus1ast> but it must run everywhere (i consider it to run even in the browser)
11:54:59FromDiscord<enthus1ast> but then it is of course another logic
11:55:28FromDiscord<Rika> heres the code to staticread https://github.com/nim-lang/Nim/blob/devel/compiler/vmdeps.nim#L13
11:56:05FromDiscord<enthus1ast> yes
11:58:17FromDiscord<enthus1ast> mh
11:59:06FromDiscord<enthus1ast> i think now it works. Thank you Rika. I'm a little dizzy already, to much coding.
11:59:15FromDiscord<Rika> what did you do lol
11:59:22FromDiscord<Rika> i dont see anything obvious to make it work
11:59:37FromDiscord<enthus1ast> in the users file\:
11:59:43FromDiscord<Rika> and i did think it was weird that staticread didnt work with absolute directories
12:00:03FromDiscord<enthus1ast> template scriptDir()\: string =↵ parentDir(instantiationInfo(-1, true).filename)↵↵proc renderIndex(users\: seq[User])\: string = compileTemplateFile(scriptDir() / "index.nwt.html")
12:00:31FromDiscord<enthus1ast> in the parser\:`let masterStr = staticRead( parentDir(path) / secondsStepTokens[0].extendsPath)`
12:01:08FromDiscord<enthus1ast> yes that was my mistake, i called scriptDir()↵(@Rika)
12:02:33FromDiscord<enthus1ast> so basically i took the parent dir from the file i want to render
12:02:34FromDiscord<enthus1ast> which also does not work all the time mhhhhh, but for now it is good enough i guess
12:03:47FromDiscord<enthus1ast> no not the "the file i want to render" but my executable ...
12:06:02*supakeen quit (Quit: WeeChat 3.2)
12:06:35*supakeen joined #nim
12:09:48FromDiscord<enthus1ast> yeah nice, the template engine works quite well. Basically a "jina" or "twig" for nim. Strongly typed \:)
12:10:51*auxym joined #nim
12:12:49FromDiscord<enthus1ast> but in constrast to my old "nimWebTemplates" this one is compiled and has "if elif else / while / for / eval / variables / comments / include / extend" functionallity
12:16:53*auxym quit (Ping timeout: 250 seconds)
12:17:10*stkrdknmibalz quit (Quit: WeeChat 3.0.1)
12:31:51*auxym joined #nim
12:39:06*auxym quit (Ping timeout: 240 seconds)
12:46:29*maxime_ joined #nim
12:49:01*rockcavera joined #nim
12:49:01*rockcavera quit (Changing host)
12:49:01*rockcavera joined #nim
13:03:53*arkurious joined #nim
13:09:37FromDiscord<enthus1ast> ugh staticRead still bites me
13:09:55FromDiscord<enthus1ast> its behaviour is nearly useless ...
13:15:43FromDiscord<enthus1ast> do you know if the compiler has a global where the current working dir is stored? This might help
13:18:50FromDiscord<Rika> isnt there a function for that
13:19:06FromDiscord<enthus1ast> all must be at compile time
13:19:15FromDiscord<TurtleP> Yeah, the os module has one @Rika
13:19:16FromDiscord<enthus1ast> because the templates are parsed on compile time
13:19:55FromDiscord<enthus1ast> nope cannot use getCurrentDir() on compile time
13:20:53*vicfred_ joined #nim
13:20:56FromDiscord<krisppurg> Anyone who knows nimsuggest, is there an example of a generic parameter and a label?
13:21:15FromDiscord<enthus1ast> either the current working dir (where the compiler is invoked) or the file that is compiled (the one that i specify via nim c -r i/need/this/path.nim)
13:21:47FromDiscord<xflywind> You need compile with `-d:vmopsDanger`
13:22:07FromDiscord<xflywind> or so to use `getCurrentDir` at compile time.
13:24:00*vicfred quit (Ping timeout: 272 seconds)
13:24:04FromDiscord<xflywind> https://github.com/nim-lang/Nim/blob/6563a685c1076cb5342f65d192b8f2a983220dba/compiler/vmops.nim#L296
13:25:56FromDiscord<xflywind> yeah compile with `--experimental:vmopsDanger`
13:28:08FromDiscord<enthus1ast> yesss
13:28:09FromDiscord<xflywind> works for me
13:28:12FromDiscord<xflywind> sent a code paste, see https://play.nim-lang.org/#ix=3v9l
13:28:29FromDiscord<enthus1ast> @xflywind\: thank you \:D
13:29:18FromDiscord<xflywind> you are welcome
13:29:47FromDiscord<enthus1ast> do you know by chance if i can enable this in a module file?
13:30:06FromDiscord<Rika> not recommended
13:30:57FromDiscord<enthus1ast> the problem is if this is not enabled via the module file, then this must be specified for every project that uses the template engine
13:34:10FromDiscord<Rika> i think experimental is a pragma
13:34:36FromDiscord<enthus1ast> {.experimental\: "vmopsDanger".} is not working
13:34:43FromDiscord<Rika> {.experimental: vmopsDanger.} i think? i dont remember its been a while since i wrote nim code. if not maybe string
13:35:47*vicfred_ quit (Quit: Leaving)
13:36:36FromDiscord<Rika> i dont think this can be enabled by pragma
13:38:00FromDiscord<xflywind> I don't know, at least you can use `staticExec` + shell command at compile time 🙂
13:38:19FromDiscord<enthus1ast> yes i tried as well...
13:38:47FromDiscord<enthus1ast> maybe i will do this but its very ugly
13:40:42FromDiscord<enthus1ast> maybe i should open an incident for a more usable staticRead
13:45:49FromDiscord<xflywind> Compile time is quite limited, maybe generate templates at runtime.
13:46:11FromDiscord<enthus1ast> the templates evaluate to nim source code
13:46:50FromDiscord<enthus1ast> this is basically a compiled jinja or twig
13:49:16FromDiscord<Ænigma> sent a code paste, see https://play.nim-lang.org/#ix=3v9t
13:49:58*vicfred joined #nim
13:50:07FromDiscord<Ænigma> (edit) "https://play.nim-lang.org/#ix=3v9t" => "https://play.nim-lang.org/#ix=3v9u"
13:52:10FromDiscord<Rika> nim uses `initT()` for a naming style
13:53:00FromDiscord<Rika> but some people use `init(T: typedesc[MyType], ...): T` or `init[T: MyType](...): T` afaik?
13:53:59FromDiscord<Ænigma> I see
13:58:18FromDiscord<Rika> imo the generic one (the last one i said) is the best one
13:59:01*Lord_Nightmare quit (Remote host closed the connection)
13:59:36*Lord_Nightmare joined #nim
13:59:49arkanoidcould you please help me write a PEG mangle rule for c2nim that removes all trailing underscores? like in foo_ -> foo
14:35:44arkanoidwait, I might have just found the right mindset! "^{ ( !'_' . )* }'_'$"
14:36:55arkanoidno, I was wrong
14:38:23FromDiscord<haxscramper> `#mangle "'_'{@}'_''_'" "$1"` is a possible solution, but!
14:38:33FromDiscord<haxscramper> peg does not support non-greedy quantifiers
14:38:48FromDiscord<haxscramper> But that handles `void test() {` correctly
14:38:54FromDiscord<haxscramper> Why someting sane
14:39:14arkanoidI'm testing with string "foo_bar_" -> expected output "foo_bar"
14:39:18FromDiscord<haxscramper> like regex (which everyone in the world already knows) wasn't used is completely beyond me
14:40:57arkanoidhaxscramper, actually not sure, but PEG is actually deterministic, regex is not
14:41:41arkanoidand I'd say this is a requirement if dealing with code
14:42:16FromDiscord<haxscramper> requirement for dealing with code would be converting identifiers to nep1 by default
14:42:47FromDiscord<haxscramper> or supporting both regex and peg
14:43:59FromDiscord<haxscramper> I don't ask "do you really want me to generate `_poor_mans_mangling_` identifiers as-is?" in hcparse
14:43:59FromDiscord<haxscramper> I just fix it
14:44:06FromDiscord<haxscramper> so you put shit in get something usable out, without having to learn some never-before-seen text matching syntax
14:46:01FromDiscord<haxscramper> and I'm pretty sure "deterministic" does not really add anything when we talk about `^_(.?)_$`
14:46:34FromDiscord<haxscramper> which is, by the way, the use case
14:46:56FromDiscord<haxscramper> honestly I would just use `sed` on code generated from c2nim
14:49:41FromDiscord<haxscramper> I also checked whether you could use full peg grammar in `#mangle` - sadly this is not possible
14:51:29*vicfred quit (Quit: Leaving)
14:56:13FromDiscord<haxscramper> Peg also has very strange notion of capture group. I tried to do `#mangle "'_' { (!'_') } { ('_' (!'_') ) } '_'" "[#1$1][#1$2]"`↵` _`
14:56:40FromDiscord<haxscramper> Leading `'_'`, then search until next `_`,
14:56:47FromDiscord<haxscramper> Then repeatedly search for `_<things>`
14:56:51FromDiscord<haxscramper> Followed by `_`
14:57:20FromDiscord<haxscramper> And given `void _foo_bar_() {}` it mangles it to `proc [#1][#2]foo[#1][#2]bar[#1][#2]()`
14:57:30FromDiscord<haxscramper> So it is applied like three times total?
15:01:30FromDiscord<haxscramper> https://regex101.com/r/WWO1nB/1
15:02:46FromDiscord<haxscramper> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/873217905288953896): Peg also has very strange notion of capture group. I tried to do `#mangle "'_' { (!'_') } { ('_' (!'_') ) } '_'" "[#1$1][#2$2]"`↵` _`
15:04:21arkanoidI've been playing with the mangle option for hours and yet I'm not there
15:06:09arkanoidif you read here: https://nim-lang.org/docs/pegs.html , there's "{@} E" and "@@ E" that should exactly do what I need (capture all except trailing underscore), but mangle "{@} '_'" "$1" transforms "foo_false_" in "foofalse"
15:06:17arkanoidso there's something I don't get yet
15:06:28arkanoidit shouldn't be greedy, but apparently is
15:08:12arkanoidmaybe maybe I just got it: mangle "{@} ('_'$)" "$1"
15:08:42FromDiscord<haxscramper> does not work for leading, works for trailing
15:09:01FromDiscord<haxscramper> `{@}('_'+$)` is more correct
15:09:02FromDiscord<haxscramper> `foo`
15:09:34FromDiscord<haxscramper> `^'_'{@}('_'+$)`
15:09:42arkanoidyeah, I'm just trying to replace tralining. I've a separate mangle for removing heading
15:10:00arkanoidactually 3 mangles, remove heading, remove heading, remove double "__"
15:10:24arkanoidbut yeah probably I will try to merge them
15:10:44FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3vai
15:10:50arkanoidbut if I first replace __ with _ then the other two can be merged easily
15:10:55FromDiscord<haxscramper> oh no, `foo` fails
15:10:55FromDiscord<haxscramper> `^'_'{@}('_'$)` yes
15:13:32arkanoid"( ^ '_'* ) @@ ( '_'* $ )" "$1"
15:14:04arkanoidotherwise it won't remove trailing if heading is not present
15:14:40FromDiscord<haxscramper> https://github.com/nim-lang/c2nim/pull/218
15:18:39arkanoidthis is the spirit! thanks
15:18:52FromDiscord<generic linux user> thats the spirit
15:19:19FromDiscord<Rika> no u
15:19:20arkanoidyeah, sorry, I've literally translated from my language
15:19:22arkanoid:D
15:23:31FromDiscord<exelotl> In reply to @Rika "imo the generic one": I like `proc init(foo: var Foo, ...)` but it doesn't really fit that nicely with arc I guess :(
15:23:44FromDiscord<Rika> why not
15:23:47FromDiscord<haxscramper> Honestly I did it only because it is possible to make PR on github without cloning/pushing etc, just using web interface
15:24:06FromDiscord<Rika> and im not a fan of that, it requires me to have an out variable
15:24:20FromDiscord<haxscramper> So not that big of a deal
15:27:12*neceve quit (Ping timeout: 258 seconds)
15:28:08arkanoidhaxscramper, I've just realised there's a --nep1 option in c2nim that does all the underscore thing automatically
15:29:58FromDiscord<haxscramper> making most wanted option non-default
15:30:02FromDiscord<haxscramper> classic
15:30:04arkanoidI've just realised that's creating also big holes in syntax
15:30:23FromDiscord<haxscramper> what do you mean?
15:30:45arkanoidI mean, I was already quite far from compilable nim code, but with --nep1 I'm even further away
15:31:28FromDiscord<exelotl> In reply to @Rika "why not": I came to that conclusion when I was trying it a few weeks ago, as assignment seems to be the preferred way to initialise things. `foo.init()` does pair nicely with `foo.destroy()`, but that's superseded by destructors in arc
15:31:39FromDiscord<haxscramper> so `#mangle` is better in that case?
15:31:58FromDiscord<haxscramper> Can you show what exactly `--nep1` breaks?
15:42:00FromDiscord<top level await> hello could anybody look at my code ?
15:42:09FromDiscord<top level await> I don't think it's that good and I want some second opinions
15:42:14FromDiscord<top level await> I'm trying out nim and have really liked it so far
15:43:06FromDiscord<top level await> https://github.com/yourfriendoss/yourfriendoss
15:43:09nrds<R2D299> itHub: 7"Website + Readme"
15:45:24FromDiscord<top level await> the nim code is a single file `run.nim`
15:47:18FromDiscord<haxscramper> If you need mostly stylistic commments -↵● https://github.com/yourfriendoss/yourfriendoss/blob/main/run.nim#L34 usually it is not necessary to use `strutils` all over the place↵● https://github.com/yourfriendoss/yourfriendoss/blob/main/run.nim#L1 std imports are better done with `std/[]` prefix, other ones I assume are packages? (there is no `.nimble` file for a project, so I would have to manually install all of them).
15:47:57FromDiscord<haxscramper> Otherwise it looks fine
15:48:05FromDiscord<top level await> what's a .nimble?
15:48:21FromDiscord<top level await> i don't know a better way to do the replacing
15:49:56arkanoidhaxscramper, I'm trying to create minimal example. Problem is that I'm converting a 11K lines long C header
15:51:18FromDiscord<haxscramper> In reply to @arkanoid "<@608382355454951435>, I'm trying to": you can just send it as is, I just want to take a quick look
15:51:22nrds<Prestige99> Anyone else have a problem accidentally typing discard instead of discord now?
15:52:12FromDiscord<haxscramper> well, with your current `#mangle` modifications etc, I would just do `c2nim`, `c2nim --nep1` and look at cwdiff
15:52:50FromDiscord<top level await> how do I add stuff a dependency to my .nimble file?
15:52:55FromDiscord<top level await> (edit) "stuff a" => "\a"
15:52:59FromDiscord<top level await> (edit) "\a" => "a"
15:53:01FromDiscord<top level await> how do I add a dependency to my .nimble file?
15:53:30FromDiscord<generic linux user> In reply to @top level await "what's a .nimble?": breuh
15:53:30FromDiscord<haxscramper> I was talking about `strutils.replace` - there is no need for `strutils.` part. Just `replace` would be sufficient
15:53:31FromDiscord<haxscramper> Pin minimum required prologue versions, like `prologue >= 0.4.4"`
15:53:37FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3vay
15:54:05FromDiscord<top level await> In reply to @richard stallmen(crazy GNU guy) "breuh": i'm very new to nim..
15:54:26FromDiscord<generic linux user> please suit yourslef
15:54:46FromDiscord<haxscramper> it seems like matrix bridge is routed through a potato floating somewhere in the pacific ocean
15:54:56FromDiscord<top level await> sent a code paste, see https://play.nim-lang.org/#ix=3vaz
15:55:04FromDiscord<top level await> (edit) "https://play.nim-lang.org/#ix=3vaz" => "https://play.nim-lang.org/#ix=3vaA"
15:55:06FromDiscord<haxscramper> yes, that is correct
15:55:11FromDiscord<top level await> thanks
15:56:02FromDiscord<haxscramper> now `nimble run` should pull down all deps, build and run binary
15:56:51FromDiscord<generic linux user> oh i didnt know that you had run
15:57:09FromDiscord<generic linux user> lesson: read doc :|
15:57:26arkanoidhaxscramper, no problem. I can send you raw initial .h and the .nim generated via c2nim and mangling rules
16:00:46FromDiscord<haxscramper> yes, that would be enogh
16:02:56*neceve joined #nim
16:06:03FromDiscord<Rika> In reply to @haxscramper "it seems like matrix": that implies it is water cooled
16:10:06FromDiscord<generic linux user> :|
16:15:23*maxime_ quit (Quit: Leaving)
16:16:17*max22- joined #nim
16:33:50*neceve quit (Remote host closed the connection)
16:35:05*neceve joined #nim
16:40:45arkanoidhaxscramper, here's the c2nim output without manual mangling but --nep1 https://termbin.com/nyci
16:40:56arkanoidI've removed lines 30:34
17:06:22arkanoidI think this is a good file identify possible c2nim improvements
17:06:39arkanoidfor example, I'm finding '__' even with --nep1
17:06:51*rockcavera quit (Remote host closed the connection)
17:26:52FromDiscord<codic> gintro looks to auto generate stuff, and I'm trying to grep for `DestroyNotify` to see what it aliases to but can't find it, and the compiler isn't being helpful; what could I do?
17:27:20FromDiscord<codic> actually found it
17:27:26FromDiscord<codic> ~/.nimble/bin/pkgs
17:28:33FromDiscord<codic> sent a code paste, see https://paste.rs/H8G
17:28:55FromDiscord<codic> oh no cdecl i guess
17:36:02FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3vbl
17:39:33FromDiscord<codic> ok so the destroy proc should be replaced with nil
18:17:14*max22- quit (Ping timeout: 272 seconds)
18:49:44FromDiscord<StefanSalewski (StefanSalewski)> Codic, I can not really help you with vte async, but you may look at
18:49:48FromDiscord<StefanSalewski (StefanSalewski)> https://github.com/StefanSalewski/gintro/blob/master/examples/gtk3/vte.nim
18:50:04FromDiscord<StefanSalewski (StefanSalewski)> and [StefanSalewski/gintro#82](https://github.com/StefanSalewski/gintro/issues/82)
18:50:11FromDiscord<StefanSalewski (StefanSalewski)> Bye, logout
18:58:34FromDiscord<codic> yeah I got it to work, thanks
18:59:47*max22- joined #nim
19:10:38FromDiscord<StefanSalewski (StefanSalewski)> codic, great!
19:10:43FromDiscord<StefanSalewski (StefanSalewski)> logout
19:13:48nrds<sorcerer99> o/
19:37:28FromDiscord<top level await> logout
19:37:47nrds<sorcerer99> login
19:37:52FromDiscord<top level await> lol
19:37:59FromDiscord<top level await> i've been learning this language
19:38:03nrds<sorcerer99> :P
19:38:03FromDiscord<top level await> such fun
19:38:06FromDiscord<top level await> it's like python but native
19:38:08FromDiscord<top level await> love it
19:41:24*SebastianM joined #nim
19:45:51FromDiscord<Rika> remember that it only looks like python
19:46:21FromDiscord<top level await> it looks like python but isn't
19:46:27FromDiscord<PsychoClay> is it prossible to pass a socket between threads?
19:48:16*vsantana joined #nim
19:49:01FromDiscord<Elegantbeef> I'd say it's possible but i'd question the safety of it
19:49:36FromDiscord<PsychoClay> well i tried it but the connection seems to fail when i pass it to a different thread
19:49:56FromDiscord<PsychoClay> it doesnt give any exception sadly
19:49:59FromDiscord<top level await> how do I import a file from a directory and use it? I'm trying to split every route into into my routes/ directory, but I can't seem to use it.. I get some weird unexplainable error.
19:50:16FromDiscord<Elegantbeef> `import foldername/modulename`
19:50:25FromDiscord<top level await> sent a code paste, see https://play.nim-lang.org/#ix=3vbX
19:50:28FromDiscord<Elegantbeef> you can also do `import foldername/[a, b, c]`
19:50:28FromDiscord<top level await> and so on
19:50:33FromDiscord<top level await> sent a code paste, see https://play.nim-lang.org/#ix=3vbY
19:52:27FromDiscord<dom96> In reply to @PsychoClay "well i tried it": what's your high-level goal?
19:52:52*vsantana left #nim (#nim)
19:53:26FromDiscord<Elegantbeef> If the first block is the main file you dont have prologue in that file so i dont see how this works \:D
19:53:47FromDiscord<PsychoClay> In reply to @dom96 "what's your high-level goal?": i have 1 thread for accepting websocket connections with the ws library, and another rpc thread to send messages on those websockets
19:54:22FromDiscord<dom96> why are you using threads for this? async should be enough
19:56:27FromDiscord<PsychoClay> il try that
20:04:00nrds<Prestige99> what's up sorcerer
20:04:12nrds<sorcerer99> chillin and you sir
20:05:54nrds<Prestige99> same, work almost over. Gotta work on my wm this weekend lol
20:06:00nrds<sorcerer99> lol
20:06:13nrds<sorcerer99> are you gonna do it, or be lazy like me? rofl
20:07:10nrds<Prestige99> uhh well I have a few other projects to work on as well so we'll see :P
20:08:54nrds<sorcerer99> lol
20:15:20FromDiscord<top level await> elegantbeef
20:15:32FromDiscord<Elegantbeef> ME!
20:15:35FromDiscord<top level await> YHES
20:16:00FromDiscord<top level await> run.nim https://pastebin.com/Hnc7nnf3
20:16:27FromDiscord<top level await> routes/index.nim https://pastebin.com/0p424qvv
20:16:36FromDiscord<top level await> error: run.nim line 83
20:31:18*SebastianM quit (Quit: Bye)
20:49:50FromDiscord<rishavs (Rishav Sharan)> sent a code paste, see https://play.nim-lang.org/#ix=3vcd
20:50:02FromDiscord<tandy> a nim window manager?↵(<@709044657232936960_nrds=5b=49=52=43=5d>)
20:50:11FromDiscord<Elegantbeef> you can use a tuple just without tuple unpacking
20:51:01FromDiscord<rishavs (Rishav Sharan)> Sorry, I didn't quite understand
20:51:23FromDiscord<Elegantbeef> Yes it's call nimdow tandy
20:51:24FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3vce
20:51:42FromDiscord<tandy> oh sick
20:51:51FromDiscord<Elegantbeef> I'm also presently working on one
20:51:54FromDiscord<rishavs (Rishav Sharan)> ooh. that looks so trivial now! Thanks!
20:52:36FromDiscord<tandy> repo link?
20:52:38FromDiscord<tandy> also damn this doesnt support wayland
20:52:51FromDiscord<top level await> wayland bad
20:52:56FromDiscord<Elegantbeef> I mean i say "of course not i game"
20:53:08FromDiscord<Elegantbeef> I joke, i just cant be arsed to use wayland
20:53:20FromDiscord<tandy> why↵(@top level await)
20:53:24FromDiscord<codic> i like wayland but until stuff like screen sharing works properly i'll stick with x11
20:53:25FromDiscord<top level await> idk
20:53:29FromDiscord<Elegantbeef> Still relatively early but got most systems in place https://github.com/beef331/goodwm
20:53:32nrds<R2D299> itHub: 7"<No Description>"
20:53:40FromDiscord<tandy> works on my machine [TM]↵(@codic)
20:53:43FromDiscord<top level await> i've never used wayland and i've only seen bugs with it ol
20:53:47FromDiscord<Elegantbeef> on discord screensharing works properly with wayland + audio afaik
20:53:47FromDiscord<top level await> x11 has never failed me
20:53:50FromDiscord<codic> anyone know how a x11 wm can tell clients that it supports the emwh _NET_WM_FULLSCREEN hint?
20:53:53FromDiscord<codic> oh it didn't for me
20:54:04FromDiscord<tandy> wayland isnt perfectly supported tho i agree
20:54:07FromDiscord<tandy> eg. zoom flatpak
20:54:17FromDiscord<tandy> but thats proprietary so idgaf
20:54:17FromDiscord<Elegantbeef> Dont you just add it as an xatom to the root window?
20:54:45FromDiscord<tandy> early days haha
20:55:02FromDiscord<top level await> In reply to @top level await "error: run.nim line 83": still cant figure this out
20:55:41FromDiscord<tandy> is wayland support planned?
20:55:41FromDiscord<Elegantbeef> Well to be fair i did originally write one in this repo(you can see the history) like a year ago
20:55:43FromDiscord<tandy> ahh
20:55:43FromDiscord<top level await> error
20:55:43FromDiscord<tandy> rip
20:55:45FromDiscord<Elegantbeef> I do not plan to support wayland since it uses a completely different api
20:55:45FromDiscord<tandy> you should write a readme
20:55:45FromDiscord<Elegantbeef> I mean it will be done when it's usable
20:55:56FromDiscord<top level await> sent a code paste, see https://play.nim-lang.org/#ix=3vcg
20:55:58FromDiscord<top level await> that's the error I'm experiencing with the above code
20:56:17FromDiscord<top level await> run.nim https://pastebin.com/Hnc7nnf3↵routes/index.nim https://pastebin.com/0p424qvv↵error: run.nim line 83
20:56:24FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3vch
20:56:35FromDiscord<Elegantbeef> try `"/".UrlPattern` if that doesnt work `["/".UrlPattern]` \:D
20:56:57FromDiscord<codic> if i look at dwm, it does that, but some more things:
20:56:57FromDiscord<Elegantbeef> Codic are you also working on a WM \:D
20:57:05FromDiscord<codic> yep
20:57:10FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3vci
20:57:29FromDiscord<Elegantbeef> Yea i previously tried to use DWM as reference but it's too undescript for me
20:58:17FromDiscord<top level await> elegantbeef
20:58:18FromDiscord<top level await> `app.addRoute("/".UrlPattern, index)`
20:58:34FromDiscord<top level await> sent a code paste, see https://play.nim-lang.org/#ix=3vcj
20:58:37nrds<Prestige99> !gh nimdow
20:58:38nrds<R2D299> vahe-kellenberger/nimdow 2https://github.com/avahe-kellenberger/nimdow - quot;A window manager written in Nim (In Development)"
20:58:41FromDiscord<top level await> sent a code paste, see https://play.nim-lang.org/#ix=3vck
20:58:42nrds<Prestige99> @tandy
20:58:53FromDiscord<codic> actually nimdow supports fullscreen let me check how it does it
20:59:15nrds<Prestige99> I'm the author btw
20:59:21FromDiscord<Elegantbeef> I've never used prologue so i cannot say much of how it works/supposed t owork
20:59:27FromDiscord<top level await> same
20:59:37FromDiscord<top level await> prolouge docs are so outdated
20:59:39FromDiscord<codic> Prestige: nice!
20:59:51FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3vcl
20:59:55FromDiscord<codic> oh no
20:59:56FromDiscord<top level await> https://planety.github.io/prologue/staticfiles.html
20:59:57FromDiscord<codic> one is on the root window
21:00:02FromDiscord<codic> the other is on the supporting window
21:00:09FromDiscord<top level await> this doc is broken
21:00:24FromDiscord<top level await> urls.urlPatterns where that come from uh?
21:00:30nrds<Prestige99> In nimdow's code look for NetWMStateFullScreen in windowmanager.nim
21:00:32FromDiscord<codic> that it supports all those atoms?
21:00:34FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3vcp
21:00:49FromDiscord<codic> yeah I have an implementation of fullscreen already I'm just trying to figure out how to advertise it
21:01:05FromDiscord<codic> otherwise some clients that just try to do it work, like chromium, but others don't, like firefox, because first it checks if its supported
21:01:08nrds<Prestige99> Yeah that shows which atoms are supported
21:03:33FromDiscord<codic> oh it's just an enum that you populate
21:06:42FromDiscord<codic> it looks like only NetAtoms are used in Nimdow, not WmAtoms or XAtoms
21:07:40nrds<Prestige99> Perhaps I should provide them all
21:15:38FromDiscord<top level await> any alternitaves http framework that has good documentation?
21:15:43FromDiscord<top level await> (edit) removed "alternitaves"
21:16:53FromDiscord<codic> httpbeast is pretty good
21:16:57FromDiscord<codic> jester is a nice wrapper
21:17:04FromDiscord<top level await> i might switch from prolouge to httpx
21:17:19nrds<Prestige99> @codic if you have any question about wm stuff just ping me
21:17:29nrds<Prestige99> questions*
21:22:46FromDiscord<top level await> nim to me is
21:22:50FromDiscord<top level await> python + js + C
21:22:52FromDiscord<top level await> (edit) "C" => "C++"
21:22:53FromDiscord<top level await> (edit) "C++" => "C"
21:22:56FromDiscord<top level await> (edit) "C" => "C/C++"
21:22:59FromDiscord<top level await> (edit) "C/C++" => "C"
21:23:01FromDiscord<top level await> (edit) "C" => "C++"
21:23:02FromDiscord<top level await> (edit) "C++" => "C"
21:23:08nrds<Prestige99> uh
21:23:25nrds<Prestige99> all the edits
21:23:26FromDiscord<top level await> i edited that many times, sorry
21:23:36FromDiscord<top level await> i forgot there's a irc bridge
21:23:47nrds<Prestige99> haha np
21:24:00FromDiscord<top level await> the hint of js
21:24:04FromDiscord<top level await> comes from the `var` and `let`
21:24:13FromDiscord<top level await> so i sometimes write `const` instead of `let`
21:24:39nrds<Prestige99> Yeah it throws me off sometimes going back and forth between nim and js
21:24:43FromDiscord<top level await> python from the fact `from a import a` `import a` and `echo "hi"`
21:25:00FromDiscord<top level await> i constantly switch between java, js and python
21:25:17FromDiscord<top level await> i might drop java entirely if I get better at nim though
21:25:42nrds<Prestige99> I pretty much only use nim and typescript now
21:25:47FromDiscord<top level await> I use java cause I don't need to pack anything togethr with it. Like you don't need 300 libaries. You can just grab swing and throw a theme on it lol
21:26:02FromDiscord<top level await> Also I think of js due to `nimble`
21:26:10FromDiscord<top level await> And the fact that you can install packages THAT quickly
21:28:29FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3vct
21:28:45FromDiscord<Elegantbeef> Case statement macros or fusion/matching
21:29:13FromDiscord<Elegantbeef> But you can just you know do a case statement on it's `.theType` field
21:29:36nrds<Prestige99> normal case statements need to be compile time I believe
21:30:13FromDiscord<Elegantbeef> What do you mean by that prestige?
21:30:49nrds<Prestige99> like the `of "foo"` part
21:31:18FromDiscord<codic> yeah that is comptime known
21:31:31FromDiscord<codic> just like `of MotionNotify:`, etc
21:32:27FromDiscord<codic> XEvent is a union, so I want to switch on what type it is: https://tronche.com/gui/x/xlib/events/structures.html
21:33:40FromDiscord<codic> also, is it ok to blanket recieve events with xselectinput and filter stuff out, or should i explicitly xgrabkey for everything I want?
21:33:41nrds<Prestige99> yeah i think you should be able to do that
21:34:03nrds<Prestige99> only grab what you need
21:34:28*xet7 quit (Read error: Connection reset by peer)
21:34:43*xet7 joined #nim
21:34:57FromDiscord<codic> okay, i think i'll go back to using if/else and move the event handlers into functions
21:35:02FromDiscord<codic> right now its just one messy big file
21:37:04FromDiscord<Elegantbeef> The of statements of a normal case statement do need to be compile time, i gues
21:37:05FromDiscord<Elegantbeef> The of statements of a normal case statement do need to be compile time, i guess
21:37:31*neceve quit (Ping timeout: 258 seconds)
21:37:58FromDiscord<Elegantbeef> I mean https://github.com/beef331/goodwm/blob/master/src/goodwm.nim#L69-L92
21:38:07FromDiscord<Elegantbeef> It's not that hard to not use case here
21:38:11FromDiscord<codic> oh wait
21:38:14FromDiscord<codic> the field is literally called
21:38:15FromDiscord<codic> .theType
21:38:16FromDiscord<codic> hahahaha
21:38:29FromDiscord<codic> i thought you were using it as an example
21:38:37FromDiscord<top level await> `template/generic instantiation of `format` from here↵`
21:38:40FromDiscord<top level await> (edit) "`template/generic" => "template/generic" | "here↵`" => "here"
21:38:42FromDiscord<top level await> what do this error mean>
21:38:44FromDiscord<top level await> (edit) "mean>" => "mean?"
21:38:56FromDiscord<Elegantbeef> It means it doesnt have a `format` accessible
21:39:10FromDiscord<Elegantbeef> Probably due to your lovely selective importing
21:39:13FromDiscord<top level await> ah thank you
21:39:20FromDiscord<top level await> In reply to @Elegantbeef "Probably due to your": it is faster
21:39:21FromDiscord<top level await> in my head
21:39:23FromDiscord<top level await> ok?
21:39:41FromDiscord<top level await> but should I not do that?
21:39:58FromDiscord<Elegantbeef> It's generally only done when you want to only get a few symbols due to collisions
21:39:59FromDiscord<top level await> cause I don't want everything polluted with stuff I don't want
21:40:19FromDiscord<top level await> well I'm redoing the entire app anyways
21:40:20FromDiscord<Elegantbeef> Pollution isnt a big issue imho
21:40:22FromDiscord<top level await> in httpx
21:41:10FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3vcw
21:41:21FromDiscord<Elegantbeef> Local modules on a single liine, packages all seperated by a new line
21:41:27FromDiscord<Elegantbeef> But that's up to you
21:41:37FromDiscord<Elegantbeef> I find selective imports annoying since you have to add more whenever you need them
21:41:53FromDiscord<codic> yeah but when you only need very few things from a module its ok
21:41:59FromDiscord<codic> or like one proc
21:42:40FromDiscord<top level await> what's the diffrence
21:42:45FromDiscord<top level await> between a func and a proc
21:42:59FromDiscord<Elegantbeef> Functions are pure and cannot have side effects
21:43:13FromDiscord<Elegantbeef> So no touching non-const global states
21:44:41FromDiscord<top level await> ah
21:44:45FromDiscord<top level await> i should use that more then
21:45:12FromDiscord<Elegantbeef> Just like const -\> let -\> var you should func -\> proc
21:46:45FromDiscord<Elegantbeef> Though procs are actually converted to `noSideEffects`(funcs) if they dont have side effects
21:48:08FromDiscord<codic> xephyr is kinda sucky, pretty handy to have a wm open on the other vty
21:48:21FromDiscord<Elegantbeef> Eh xephyr works fine for me
22:00:17FromDiscord<top level await> elegantbeef
22:00:18FromDiscord<top level await> ``
22:00:26FromDiscord<top level await> this is how I decided on doing my imports
22:00:28FromDiscord<top level await> (edit) "``" => "sent a code paste, see https://paste.rs/SHu"
22:01:00FromDiscord<top level await> all packages in same line like `import httpx, nre, markdown`
22:01:27FromDiscord<top level await> nre is std, forgot
22:01:30FromDiscord<Elegantbeef> Yea you can do them how ever you want really, it's just what I said I do, you can write the language however it works for you
22:01:43FromDiscord<top level await> do you know any capybara images
22:01:51FromDiscord<top level await> i need more for my capy images
22:02:41FromDiscord<Elegantbeef> There are many images of those nice rodents
22:02:57FromDiscord<Elegantbeef> If that means anything aside from the actual docile animal, i dont know what that means
22:03:10FromDiscord<top level await> they are so nice
22:03:13FromDiscord<top level await> btw
22:03:14FromDiscord<top level await> they're harmless
22:03:32FromDiscord<Elegantbeef> hence "docile"
22:03:40FromDiscord<top level await> they are like
22:03:43FromDiscord<top level await> th BEST eniamel
22:04:08FromDiscord<top level await> our friend group
22:04:10FromDiscord<top level await> we call them
22:04:12FromDiscord<top level await> crappy bars
22:04:20FromDiscord<top level await> https://yourfriend.lv/capybaras/3.jpg
22:04:20FromDiscord<top level await> tetris
22:04:44FromDiscord<top level await> https://media.discordapp.net/attachments/371759389889003532/873325742841274368/3.png
22:08:50*max22- quit (Quit: Leaving)
22:11:57FromDiscord<top level await> also
22:12:01FromDiscord<top level await> the entire idea of that website
22:12:05FromDiscord<top level await> is that it's a contained readme.md
22:12:17FromDiscord<top level await> so I can use it as my github profile readme
22:12:17FromDiscord<top level await> https://github.com/yourfriendoss
22:14:44FromDiscord<Elegantbeef> Consider looking at https://github.com/pietroppeter/nimib
22:14:47nrds<R2D299> itHub: 7"nimib 🐳 - nim 👑 driven ⛵ publishing ✍"
22:17:01FromDiscord<codic> ufcs is so awesome I love it
22:17:30FromDiscord<codic> i just wish there was a x11 wrapper for nim that used nim types and didn't put X in front of everything... I might do that
22:18:53FromDiscord<Elegantbeef> Yea i'm more annoyed by the `para1: cint, para2: cint` \:P
22:19:45FromDiscord<top level await> elegantbeef
22:19:54FromDiscord<top level await> that's more like a documentation framework
22:19:54FromDiscord<top level await> lmfao
22:20:08FromDiscord<Elegantbeef> Sure but it outputs .md
22:20:16FromDiscord<top level await> i don't like it though lol
22:20:18FromDiscord<top level await> this seems natrual to me
22:20:20FromDiscord<top level await> that doesn't
22:20:38FromDiscord<top level await> probably once I get more into nim I can try that.. for now that seems complicated & useless
22:22:28FromDiscord<top level await> i feel more control with httpx
22:22:32FromDiscord<top level await> like i can do whatever i want with it
22:22:35FromDiscord<top level await> than prolouge
22:22:41FromDiscord<codic> i should switch to matrix for this server i'm just too lazy
22:22:42FromDiscord<top level await> i just get ON REUQEST: do shit with reuqest
22:23:34FromDiscord<top level await> In reply to @codic "i should switch to": same
22:23:44FromDiscord<top level await> I wanna go full foss actually
22:23:53FromDiscord<top level await> but spotify and discord are preventing me from doing that
22:23:57FromDiscord<top level await> and google classrooms
22:24:02FromDiscord<top level await> and google itself lol
22:24:42FromDiscord<undersquire> In reply to @top level await "and google itself lol": Yep
22:25:06FromDiscord<top level await> duckduckgo is simply not good enough
22:25:06FromDiscord<top level await> lol
22:25:18FromDiscord<undersquire> Yeah its results are not good
22:25:23FromDiscord<top level await> yup
22:25:26FromDiscord<undersquire> (edit) "Yeah its results are not ... good" added "as"
22:25:48FromDiscord<undersquire> SearX is the best option
22:26:10FromDiscord<undersquire> But it’s self hosted so u either gotta use someone’s instance or host ur own
22:27:07FromDiscord<undersquire> (edit) "SearX is the best ... option" added "Foss"
22:28:20FromDiscord<top level await> why do people hate cloudflare?
22:28:59FromDiscord<undersquire> Because if it goes down, so does half the internet lol (since so many websites rely on it)
22:29:14FromDiscord<top level await> In late 2019, Cloudflare was criticized for providing services to the anti-black website Chimpmania
22:29:16FromDiscord<top level await> whaaaaaaaat
22:29:23FromDiscord<top level await> you can't just deny a purchase lol
22:29:26FromDiscord<undersquire> Wtf
22:29:57FromDiscord<undersquire> I never heard anything about that
22:33:45FromDiscord<dom96> In reply to @top level await "i might switch from": Just FYI: httpx and httpbeast are just a web servers.
22:34:07FromDiscord<top level await> yup
22:34:10FromDiscord<top level await> that's all I want
22:34:14FromDiscord<top level await> also I did switch to httpx
22:35:26FromDiscord<dom96> hm, I wonder if httpx includes the latest httpbeast patches
22:35:39FromDiscord<top level await> how latest are they?
22:35:53FromDiscord<dom96> 12 June
22:36:00FromDiscord<top level await> of this year ? :Bruh:
22:36:04FromDiscord<dom96> yep
22:36:13FromDiscord<top level await> latest commit: ↵on Oct 22, 2020
22:36:51FromDiscord<top level await> if you ever plan on adding wepoll support, please annouce it somewhere, ty
22:38:14FromDiscord<dom96> I'd rather not. It's extra maintenance. For Jester I just use asynchttpserver on Windows
22:38:46FromDiscord<top level await> Who maintains httpx?
22:39:08FromDiscord<dom96> xflywind
22:39:24FromDiscord<top level await> @xflywind - do you plan on updating httpx to include the latest patches ? thank you
22:40:00FromDiscord<dom96> Why did you decide to move away from prologue?
22:40:16FromDiscord<top level await> i had issues with routing
22:40:22FromDiscord<top level await> also the documentation was kind of broken
22:40:34FromDiscord<top level await> i just wanted something that I can quickly edit and that i know what it is going to do
22:40:38FromDiscord<dom96> maybe you could give jester a try?
22:44:59FromDiscord<top level await> i can't pass it's get to a function
22:47:49FromDiscord<dom96> can you elaborate?
22:48:33FromDiscord<top level await> actually I'm gonna try something
22:53:05*flynn quit (Remote host closed the connection)
22:54:10FromDiscord<top level await> how do I check if I'm on windows or on posix?
22:54:12*flynn joined #nim
22:54:36FromDiscord<dom96> `when defined(windows)` and `when defined(posix)`
22:54:41FromDiscord<dom96> but what are you trying to do? 🙂
22:55:00FromDiscord<top level await> I'm gonna look through httpbeast
22:55:04FromDiscord<top level await> I wanna make a updated fork
22:57:45FromDiscord<top level await> btw @dom96
22:57:48FromDiscord<top level await> for some reason there's
22:57:56FromDiscord<top level await> import times # TODO this shouldn't be required. Nim bug?
22:58:01FromDiscord<top level await> even though times is used in a bunch of places
22:58:18FromDiscord<top level await> this place actually
22:58:21FromDiscord<top level await> sent a code paste, see https://play.nim-lang.org/#ix=3vcI
22:58:41FromDiscord<dom96> it's old code, I can barely remember it, check the blame
22:59:13FromDiscord<top level await> only problem I can see under windows is this
22:59:20FromDiscord<top level await> sent a code paste, see https://play.nim-lang.org/#ix=3vcJ
23:06:35FromDiscord<top level await> ` var data: ptr Data = addr(selector.getData(fd))`
23:06:43FromDiscord<top level await> template/generic instantiation of `getData` from here
23:06:46FromDiscord<top level await> hm.. weird..
23:08:11FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3vcO
23:09:58FromDiscord<dom96> sequtils.filter maybe
23:11:11FromDiscord<codic> returns a copy, I need either a pointer o an index because i'm going to mutate the value in clients
23:31:50*auxym joined #nim
23:32:16FromDiscord<top level await> anybody used https://github.com/nimgl/imgui before here?
23:32:19nrds<R2D299> itHub: 7"ImGui bindings for Nim via cimgui"
23:33:04FromDiscord<top level await> i love imgui but i wanna use it in imgui
23:33:06FromDiscord<top level await> but this seems hard lol
23:38:39FromDiscord<Elegantbeef> I've used it a bit a while ago
23:38:49FromDiscord<top level await> on windows?
23:38:51FromDiscord<top level await> probably not lol
23:38:59FromDiscord<top level await> sent a code paste, see https://play.nim-lang.org/#ix=3vcQ
23:39:05FromDiscord<Elegantbeef> You have to init everything
23:39:10FromDiscord<top level await> sent a code paste, see https://play.nim-lang.org/#ix=3vcR
23:39:27FromDiscord<Elegantbeef> https://github.com/nimgl/nimgl/blob/master/examples/timgui.nim
23:39:35FromDiscord<top level await> sent a code paste, see https://play.nim-lang.org/#ix=3vcS
23:40:27FromDiscord<Elegantbeef> Those bindings are mostly for a renderer agnostic setting, if you want to actually render it you'll need to open up a window, setup a context and the similar using a file like that `timgui.nim`
23:41:00FromDiscord<top level await> i've only used imgui in python..
23:41:05FromDiscord<top level await> where it was trivally easy lol
23:41:26FromDiscord<top level await> https://pypi.org/project/imgui/
23:41:37FromDiscord<Elegantbeef> Well python's library hides it all from you
23:41:43FromDiscord<top level await> yes
23:41:44FromDiscord<top level await> i like that
23:42:36FromDiscord<Elegantbeef> Well then you'll have to write the abstraction for that
23:43:15FromDiscord<Ayy Lmao> sent a code paste, see https://play.nim-lang.org/#ix=3vcX
23:43:15FromDiscord<Elegantbeef> That imgui binding is meant for a bring your own renderer approach
23:43:52FromDiscord<Elegantbeef> Well if that's a dynamic list, yes
23:44:13FromDiscord<Ayy Lmao> Because I am having some very strange behavior doing this where a sequence I use later on will throw an exception saying that it changed length while iterating over it
23:44:16FromDiscord<Elegantbeef> though you can do `var memory = create(cDouble, cDoublesToWrite)`
23:44:33FromDiscord<Elegantbeef> then you dont need the cast for the api call
23:45:07FromDiscord<Ayy Lmao> In reply to @Elegantbeef "though you can do": I will try that and see if it alleviates my problem
23:45:48FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3vcY
23:45:55FromDiscord<Elegantbeef> In this case you use `createU` since you dont need it to 0 memory
23:47:55FromDiscord<Elegantbeef> Also you're probably looking at a different error
23:48:03FromDiscord<Elegantbeef> If you could provide testable code, that'd be grand \:D
23:48:50FromDiscord<Elegantbeef> Wait.. apiFuncThatWritesToACDoublePtr doesnt take an int?
23:50:45FromDiscord<Ayy Lmao> My problem still seems to persist. I don't really know how to provide testable code. This is an extremely elusive problem that makes zero sense to me. I am making a dll that is an extension for a DAW called Reaper. The problem only happens when I have a win32 dialog window running.
23:51:03FromDiscord<Ayy Lmao> In reply to @Elegantbeef "Wait.. apiFuncThatWritesToACDoublePtr doesnt take": It does, I just didn't add it in my pseudo example
23:51:53FromDiscord<Elegantbeef> Cause that error makes 0 sense when talking about this code
23:53:31FromDiscord<Ayy Lmao> It's a weird problem, basically I am trying to request for some audio data from Reaper. The sequence being resized while iterating error happens if I try to loop through `rawBuffer` in my example and build a sequence with `mySeq.add`.
23:53:55FromDiscord<Elegantbeef> What's that loop look like?
23:54:17FromDiscord<Ayy Lmao> If I allocate the required samples beforehand and just write them to the sequence like `mySeq[i] = sample`, it works, but causes some weird behavior later on
23:55:02FromDiscord<Ayy Lmao> sent a code paste, see https://play.nim-lang.org/#ix=3vcZ
23:56:00FromDiscord<Elegantbeef> Cause i mean this works https://play.nim-lang.org/#ix=3vd0
23:56:01FromDiscord<top level await> how do i do
23:56:09FromDiscord<top level await> do: while syntax in nim?
23:56:10FromDiscord<Ayy Lmao> If I use this function to get the audio, and then later on try to loop through the return of it and build a sequence from it by using the `add` function, it will say the sequence changed length while iterating over it
23:56:55FromDiscord<Elegantbeef> there is no do while so you can just init the vars before hand then run the while loop
23:57:15*xet7 quit (Remote host closed the connection)
23:57:25FromDiscord<Ayy Lmao> In reply to @Elegantbeef "Cause i mean this": Yeah it works, it just doesn't work sometimes depending on if I call the function from an event posted by a win32 window
23:58:10FromDiscord<Ayy Lmao> The weird thing is I can get it to work by preallocating the sequence I'm building beforehand, but I have to call the function repeatedly because sometimes it won't fill the whole buffer
23:58:14*xet7 joined #nim