<< 28-08-2022 >>

00:00:01FromDiscord<Elegantbeef> Just throw four in at the end for fun
00:01:25FromDiscord<!Patitotective> https://github.com/zevv/npeg/issues/45 :[
00:01:44FromDiscord<huantian> did you give up on no deps
00:03:25FromDiscord<!Patitotective> In reply to @huantian "did you give up": dont trust me↵i lied
00:05:08FromDiscord<!Patitotective> plus the code started to be boilerplate and pretty horrible to read
00:11:30FromDiscord<Elegantbeef> One of these days i should write a parser/lexer
00:12:31FromDiscord<!Patitotective> lol https://media.discordapp.net/attachments/371759389889003532/1013239622135980032/unknown.png
00:12:42FromDiscord<!Patitotective> In reply to @Elegantbeef "One of these days": please
00:19:58FromDiscord<! Yes, i hoist> Just a random question, how would i go about making a parser in nim?
00:20:54FromDiscord<Elegantbeef> That's a very open ended question
00:20:57FromDiscord<Elegantbeef> You just write a parser
00:21:54FromDiscord<! Yes, i hoist> Like a lib to make it eaiser
00:22:00FromDiscord<Elegantbeef> npe
00:22:01FromDiscord<!Patitotective> npeg
00:22:02FromDiscord<Elegantbeef> npeg
00:22:05FromDiscord<!Patitotective> boom
00:22:06FromDiscord<Elegantbeef> std/parseutils
00:22:29FromDiscord<!Patitotective> In reply to @not logged in "Like a lib to": system :]
00:23:20FromDiscord<! Yes, i hoist> In reply to @Elegantbeef "std/parseutils": For parsing a langauge
00:23:29FromDiscord<!Patitotective> yes
00:23:35FromDiscord<!Patitotective> you implement it yourself
00:23:42FromDiscord<!Patitotective> the language you want
00:23:44FromDiscord<! Yes, i hoist> :sad:
00:23:48FromDiscord<!Patitotective> ?
00:24:03FromDiscord<!Patitotective> you can train an ai if you want
00:24:05FromDiscord<Elegantbeef> I mean what do you expect `import csparser`?
00:24:37FromDiscord<! Yes, i hoist> Im so used to “find it yourself” instead of “do it yourself”. Whatever
00:27:24FromDiscord<!Patitotective> find what? a the-language-im-thinking-about-right-now-parser?
00:27:44FromDiscord<! Yes, i hoist> In reply to @Patitotective "find what? a the-language-im-thinking-about-right-n": Like, find a lib for it instead of make it yourself
00:31:53FromDiscord<Elegantbeef> So patito how goes KDL? 😄
00:34:36FromDiscord<!Patitotective> well, i'm stuck with the npeg issue because the way i'm doing the lexer is by adding tokens to a stack whenever i find one, the problem is that if two patterns start with a string two strings are added to the stack instead of the one from the pattern that went successfully↵soo i'm thinking about how to fix it↵↵but making the npeg grammar was pretty easy, in KDL's spec they had a "general" grammar that was really helpful
00:34:55FromDiscord<!Patitotective> because KDL's syntax is pretty simple, they have `{}` blocks so no need to mess up with indentation
00:35:51FromDiscord<Elegantbeef> I mean does KDL even need a conventional parser/lexer?
00:37:27FromDiscord<Elegantbeef> At top level you look for a valid identifier, then you go into looking for a valid value, identifier or new scope. Then you look for a valid value, identifier or new scope....
00:38:32FromDiscord<!Patitotective> perhaps
00:38:39FromDiscord<b1rdf00d> sent a code paste, see https://play.nim-lang.org/#ix=48SJ
00:39:13FromDiscord<!Patitotective> In reply to @Elegantbeef "At top level you": i will continue to work on the depedencies-free parser i was working before npeg 😁
00:40:32FromDiscord<Elegantbeef> Yea i dont know anything about parsers/lexers really, i've only played with the idea of using pointer procs to make writing very easy
00:41:00FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=48SM
00:41:33FromDiscord<!Patitotective> In reply to @Elegantbeef "Yea i dont know": i pretty much only read one guide about parsing (which apparently are divided into lexer and parser)
00:41:48FromDiscord<!Patitotective> (edit) "In reply to @Elegantbeef "Yea i dont know": i pretty much only read one guide about parsing (which apparently ... are" added "(traditionally)"
00:42:15FromDiscord<Elegantbeef> I dont get the `validateWhitespace` and `skipWhiteSpaces`
00:42:17FromDiscord<!Patitotective> In reply to @Patitotective "this is the code": i think i could make this much much better with macros but i dont know where to start
00:43:07FromDiscord<!Patitotective> In reply to @Elegantbeef "I dont get the": there must be at least one whitespace and after that it doesnt matter how many whitespaces are, so it skips them↵like `nodeName whiteSpace whiteSpace`
00:43:22FromDiscord<Elegantbeef> There must?
00:43:34FromDiscord<!Patitotective> yes
00:43:53FromDiscord<Elegantbeef> Ok so then what you should do is make a template
00:44:46FromDiscord<Elegantbeef> God i hate your procedure names
00:44:46FromDiscord<Elegantbeef> But anyway
00:45:20FromDiscord<!Patitotective> In reply to @Elegantbeef "God i hate your": i do too↵but i didnt want to spend time thinking about them :p
00:45:44FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=48SN
00:46:03FromDiscord<Elegantbeef> Though again you can think of each node as it's own problem cause that's really what it is
00:46:26FromDiscord<!Patitotective> In reply to @Elegantbeef "Though again you can": wdym?
00:46:51FromDiscord<Elegantbeef> Aside from the top level parser, the parser is just recursively the same for each node
00:47:14FromDiscord<!Patitotective> oh yea, but i still havent get to that part :p
00:47:19*wallabra_ joined #nim
00:47:36*wallabra quit (Quit: ZNC 1.8.2 - https://znc.in)
00:47:49FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=48SO
00:48:31FromDiscord<Elegantbeef> It's the exact same thing of. Find the name, parse if it has any pre scope properties, parse the internal
00:49:05FromDiscord<Elegantbeef> Whoops i put commas like a sane person
00:49:07*wallabra_ is now known as wallabra
00:49:27FromDiscord<!Patitotective> In reply to @Elegantbeef "Whoops i put commas": hehe
00:50:27FromDiscord<Elegantbeef> I think the way to handle this language is to parse a token, then validate and add to the tree, continue on until you're done
00:50:32FromDiscord<Mason> https://tenor.com/view/only-two-genders-neil-degrasse-tyson-gif-9194168
00:50:51FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=48SP
00:51:00FromDiscord<Elegantbeef> Just make a template 😄
00:51:08FromDiscord<!Patitotective> thats what i meant
00:51:10FromDiscord<!Patitotective> but im dumb
00:51:44FromDiscord<Elegantbeef> I mean you might end up refactoring this to not have any 'ParseResult'
00:52:07FromDiscord<Elegantbeef> I like me exceptions so i'd probably end up just using them
00:52:28FromDiscord<!Patitotective> In reply to @Elegantbeef "I mean you might": just a big `while index < input.len` loop?
00:52:41FromDiscord<Elegantbeef> Nope
00:52:45FromDiscord<!Patitotective> In reply to @Elegantbeef "I like me exceptions": yea, i was also thinking about that↵rn is hard to see where something failed
00:52:50FromDiscord<Elegantbeef> Well that'd be your top level loop
00:53:11FromDiscord<Elegantbeef> The toplevel and the internal node parser are a tinge different, but they're mostly the same
00:53:42FromDiscord<!Patitotective> meanwhile some name suggestions 😁?
00:55:30FromDiscord<Elegantbeef> I'm partial to using types for things like this
00:56:07FromDiscord<!Patitotective> In reply to @Elegantbeef "I'm partial to using": wdym
00:57:40*wallabra quit (Quit: ZNC 1.8.2 - https://znc.in)
00:57:44*wallabra_ joined #nim
00:58:21FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=48SS
00:59:33*wallabra_ is now known as wallabra
01:00:58FromDiscord<Elegantbeef> Whoops should be `a.validate ...`
01:01:25FromDiscord<Elegantbeef> I'm a weirdo when it comes to distincts, i love using them for a bunch of things
01:10:06FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=48SY
01:10:15FromDiscord<Elegantbeef> You have where it ends
01:10:36FromDiscord<!Patitotective> how
01:10:45FromDiscord<!Patitotective> whitespaces or?
01:10:54FromDiscord<Elegantbeef> `Slice[int]` stores start/end
01:11:32FromDiscord<!Patitotective> but how do i `Identifier(0..2)` goes until `2` and not `5`
01:11:45FromDiscord<Elegantbeef> What?
01:12:42FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=48T0
01:13:11FromDiscord<Elegantbeef> Ok you know this language requires you to ensure there is a space or `{` right?
01:13:43FromDiscord<Elegantbeef> You'd parse until `=`, `{` or a space
01:14:00FromDiscord<!Patitotective> ok
01:14:11FromDiscord<Elegantbeef> You really can just use named procedures
01:14:16FromDiscord<Elegantbeef> I just am really weird about distincts
01:14:45FromDiscord<!Patitotective> perhaps you're distinct
01:17:48FromDiscord<Elegantbeef> Eitherway you get to do things like https://play.nim-lang.org/#ix=48T2
01:23:44FromDiscord<beans> sent a code paste, see https://play.nim-lang.org/#ix=48T4
01:23:48FromDiscord<Elegantbeef> Generics are runtime only
01:23:54FromDiscord<Elegantbeef> Compile time
01:23:55FromDiscord<Elegantbeef> Jesus
01:23:57FromDiscord<Elegantbeef> Mistype and a half
01:24:40FromDiscord<Elegantbeef> https://internet-of-tomohiro.netlify.app/nim/faq.en.html#coding-how-to-store-different-types-in-seqqmark
01:25:22FromDiscord<beans> Thanks!
01:52:37*pmp-p joined #nim
01:58:59*disso_peach quit (Quit: Leaving)
02:18:51*jmdaemon joined #nim
02:21:32*arkurious quit (Quit: Leaving)
02:22:01FromDiscord<!&luke> How can I change directory
02:25:43*jmdaemon quit (Ping timeout: 268 seconds)
02:44:42FromDiscord<pim pimling> sent a code paste, see https://play.nim-lang.org/#ix=48Tg
02:44:47FromDiscord<pim pimling> (edit) "https://play.nim-lang.org/#ix=48Tg" => "https://paste.rs/lWT"
02:45:12FromDiscord<!&luke> sent a code paste, see https://play.nim-lang.org/#ix=48Th
02:45:31FromDiscord<!&luke> Where do I even start with the problems with that method
02:45:51FromDiscord<pim pimling> In reply to @ripluke "Where do I even": you asked and got what you wanted ig ¯\_(ツ)_/¯
02:46:13FromDiscord<!&luke> I meant like something built into nim
02:46:15FromDiscord<Elegantbeef> https://nim-lang.org/docs/os.html#setCurrentDir%2Cstring
02:46:22FromDiscord<!&luke> In reply to @Elegantbeef "https://nim-lang.org/docs/os.html#setCurrentDir%2Cs": Like this
02:46:26FromDiscord<pim pimling> bruh idk
02:46:49FromDiscord<pim pimling> In reply to @ripluke "Like this": also, what are the langs in your thingy:
02:47:16FromDiscord<pim pimling> sent a long message, see https://paste.rs/yXt
02:48:39FromDiscord<Elegantbeef> Nim, Zig, Dark, Lua, Python, TS
02:48:44FromDiscord<Elegantbeef> Dart\
02:49:08FromDiscord<pim pimling> how is lua a moon?
02:49:15FromDiscord<Elegantbeef> It literally means moon
02:49:31FromDiscord<Elegantbeef> You're going to shit when you learn java means coffee
02:50:33FromDiscord<pim pimling> In reply to @Elegantbeef "It literally means moon": where
02:50:36FromDiscord<pim pimling> in what language
02:50:40FromDiscord<Rika> In Portuguese
02:50:49FromDiscord<pim pimling> bruh
02:50:53FromDiscord<pim pimling> im literally so stupid
02:51:42FromDiscord<pim pimling> also how is this ui i made https://media.discordapp.net/attachments/371759389889003532/1013279679425286204/unknown.png
02:51:48FromDiscord<pim pimling> In reply to @Elegantbeef "You're going to shit": me when coffeescript
02:51:54FromDiscord<Rika> It looks like a UI alright
02:52:29FromDiscord<pim pimling> In reply to @Rika "It looks like a": https://tenor.com/view/laughing-not-funny-laughing-not-funny-neutral-gif-20709132
02:52:32FromDiscord<pim pimling> NOO
02:52:34FromDiscord<pim pimling> EMBED FAIL
02:52:42FromDiscord<Rika> Embeds are disabled here
02:52:47FromDiscord<pim pimling> In reply to @Rika "Embeds are disabled here": no duh
02:52:59FromDiscord<pim pimling> why can i send images but not gifd
02:53:00FromDiscord<pim pimling> (edit) "gifd" => "gifs"
02:53:09FromDiscord<Rika> Because link embeds are disabled here
02:53:15FromDiscord<huantian> also gifs are just annoying
02:53:25FromDiscord<Elegantbeef> Jifs\
02:53:42FromDiscord<pim pimling> In reply to @Elegantbeef "Jifs\*": thats-↵thats not???↵how it works???
02:53:57FromDiscord<Rika> Do you know what a joke is
02:53:57FromDiscord<Elegantbeef> I make the rules
02:54:15FromDiscord<Elegantbeef> Hello i am joke
02:54:26FromDiscord<pim pimling> In reply to @Elegantbeef "Hello i am joke": bruh he's so funny he is joke
02:54:28FromDiscord<Rika> Literal embodiment of joke right here
03:08:58FromDiscord<b1rdf00d> additionally: the lua icon is a moon orbiting a planet
03:45:25FromDiscord<!&luke> In reply to @Elegantbeef "Nim, Zig, Dark, Lua,": Yea literally no one can figure it out
03:45:34FromDiscord<!&luke> It's not even that hard XD
03:46:00FromDiscord<!&luke> In reply to @pim pimling "| Langs: 👑,⚡️, 🎯,": Yellow square = Roblox???
03:46:05FromDiscord<!&luke> Bro what
03:46:20FromDiscord<!&luke> The js logo is a yellow square
03:46:34FromDiscord<!&luke> https://media.discordapp.net/attachments/371759389889003532/1013293488579825775/image0.jpg
03:46:39FromDiscord<!&luke> Except it says js
03:49:59FromDiscord<!&luke> In reply to @b1rdf00d "additionally: the lua icon": Yea
03:50:15FromDiscord<!&luke> Also as stated by beef
03:50:32FromDiscord<!&luke> Lua literally translates to moon in Portuguese
03:51:23FromDiscord<!&luke> https://media.discordapp.net/attachments/371759389889003532/1013294700255522929/IMG_2113.png
03:53:11FromDiscord<Rika> Hey I said the Portuguese part
04:04:03FromDiscord<Elegantbeef> Rika is beef confirmed
04:04:41madpropsbecause the moon is a satellite like lua is to c++
04:05:02FromDiscord<Rika> In reply to @Elegantbeef "Rika is beef confirmed": NOOOOOOOOOO
04:06:30*jmdaemon joined #nim
04:13:00*jmdaemon quit (Ping timeout: 268 seconds)
04:14:26*jmdaemon joined #nim
04:25:56*jmdaemon quit (Ping timeout: 268 seconds)
04:26:20*jmdaemon joined #nim
04:35:37FromDiscord<pim pimling> In reply to @madprops "because the moon is": i thought lua had a c api
04:36:42*dtomato joined #nim
04:36:42*dtomato quit (Read error: Connection reset by peer)
04:36:58*dtomato joined #nim
04:36:58*dtomato quit (Read error: Connection reset by peer)
04:37:15*dtomato joined #nim
04:37:15*dtomato quit (Remote host closed the connection)
04:37:31*dtomato joined #nim
04:37:31*dtomato quit (Read error: Connection reset by peer)
04:37:47*dtomato joined #nim
04:37:47*dtomato quit (Read error: Connection reset by peer)
04:38:04*dtomato joined #nim
04:38:04*dtomato quit (Read error: Connection reset by peer)
04:38:21*dtomato joined #nim
04:38:21*dtomato quit (Read error: Connection reset by peer)
04:39:23*dtomato joined #nim
04:39:23*dtomato quit (Read error: Connection reset by peer)
04:39:39*dtomato joined #nim
04:39:39*dtomato quit (Read error: Connection reset by peer)
04:39:56*dtomato joined #nim
04:39:56*dtomato quit (Read error: Connection reset by peer)
04:40:12*dtomato joined #nim
04:40:12*dtomato quit (Read error: Connection reset by peer)
04:40:29*dtomato joined #nim
04:40:29*dtomato quit (Read error: Connection reset by peer)
04:41:46*dtomato joined #nim
04:41:46*dtomato quit (Read error: Connection reset by peer)
04:42:03*dtomato joined #nim
04:42:03*dtomato quit (Read error: Connection reset by peer)
04:42:19*dtomato joined #nim
04:42:19*dtomato quit (Read error: Connection reset by peer)
04:42:36*dtomato joined #nim
04:42:36*dtomato quit (Read error: Connection reset by peer)
04:42:51*oprypin quit (Ping timeout: 255 seconds)
04:42:53*dtomato joined #nim
04:42:53*dtomato quit (Read error: Connection reset by peer)
04:43:25*dtomato joined #nim
04:43:25*dtomato quit (Read error: Connection reset by peer)
04:43:41*dtomato joined #nim
04:43:41*dtomato quit (Read error: Connection reset by peer)
04:44:14*dtomato joined #nim
04:44:14*dtomato quit (Read error: Connection reset by peer)
04:44:31*dtomato joined #nim
04:44:31*dtomato quit (Read error: Connection reset by peer)
04:44:47*dtomato joined #nim
04:44:47*dtomato quit (Read error: Connection reset by peer)
04:45:04*dtomato joined #nim
04:45:04*dtomato quit (Read error: Connection reset by peer)
04:45:51*dtomato joined #nim
04:45:51*dtomato quit (Read error: Connection reset by peer)
04:46:24*dtomato joined #nim
04:46:24*dtomato quit (Read error: Connection reset by peer)
04:46:40*dtomato joined #nim
04:46:40*dtomato quit (Read error: Connection reset by peer)
04:46:57*dtomato joined #nim
04:46:57*dtomato quit (Read error: Connection reset by peer)
04:47:28*dtomato joined #nim
04:47:28*dtomato quit (Read error: Connection reset by peer)
04:47:44*dtomato joined #nim
04:47:44*dtomato quit (Read error: Connection reset by peer)
04:48:01*dtomato joined #nim
04:48:01*dtomato quit (Read error: Connection reset by peer)
04:48:33*dtomato joined #nim
04:48:33*dtomato quit (Read error: Connection reset by peer)
04:48:50*dtomato joined #nim
04:48:50*dtomato quit (Read error: Connection reset by peer)
04:49:06*dtomato joined #nim
04:49:06*dtomato quit (Read error: Connection reset by peer)
04:49:37FromDiscord<!&luke> In reply to @pim pimling "i thought lua had": Yea
04:49:38*dtomato joined #nim
04:49:38*dtomato quit (Read error: Connection reset by peer)
04:50:08FromDiscord<pim pimling> In reply to @ripluke "Yea": then 🚀 why
04:50:41*dtomato joined #nim
04:50:41*dtomato quit (Read error: Connection reset by peer)
04:50:58*dtomato joined #nim
04:50:58*dtomato quit (Read error: Connection reset by peer)
04:51:14*dtomato joined #nim
04:51:14*dtomato quit (Read error: Connection reset by peer)
04:51:30*dtomato joined #nim
04:51:30*dtomato quit (Read error: Connection reset by peer)
04:51:46*dtomato joined #nim
04:51:46*dtomato quit (Read error: Connection reset by peer)
04:52:33*dtomato joined #nim
04:52:33*dtomato quit (Read error: Connection reset by peer)
04:52:50*dtomato joined #nim
04:52:50*dtomato quit (Read error: Connection reset by peer)
04:53:06*dtomato joined #nim
04:53:06*dtomato quit (Read error: Connection reset by peer)
04:53:23*dtomato joined #nim
04:53:23*dtomato quit (Read error: Connection reset by peer)
04:53:56*dtomato joined #nim
04:53:56*dtomato quit (Read error: Connection reset by peer)
04:54:39madpropsok how lua is to c then
04:54:44madpropsunless you use bindings
04:54:50madpropsthen how lua is to anything
04:54:51*jmd_ joined #nim
04:54:59*dtomato joined #nim
04:54:59*dtomato quit (Read error: Connection reset by peer)
04:55:16*dtomato joined #nim
04:55:16*dtomato quit (Read error: Connection reset by peer)
04:55:33*dtomato joined #nim
04:55:33*dtomato quit (Read error: Connection reset by peer)
04:56:11*jmdaemon quit (Ping timeout: 260 seconds)
04:57:06*dtomato joined #nim
04:57:06*dtomato quit (Read error: Connection reset by peer)
04:57:22*dtomato joined #nim
04:57:22*dtomato quit (Read error: Connection reset by peer)
04:57:39*dtomato joined #nim
04:57:39*dtomato quit (Read error: Connection reset by peer)
04:57:56*dtomato joined #nim
04:57:56*dtomato quit (Read error: Connection reset by peer)
04:58:13*dtomato joined #nim
04:58:13*dtomato quit (Read error: Connection reset by peer)
04:58:21FromDiscord<valerga> https://media.discordapp.net/attachments/371759389889003532/1013311549496115230/flexiblequoting.jpg
04:58:29FromDiscord<valerga> what am I seeing
04:58:29*dtomato joined #nim
04:58:29*dtomato quit (Read error: Connection reset by peer)
04:58:45*dtomato joined #nim
04:58:45*dtomato quit (Read error: Connection reset by peer)
04:59:01*dtomato joined #nim
04:59:01*dtomato quit (Read error: Connection reset by peer)
04:59:18*dtomato joined #nim
04:59:19*dtomato quit (Remote host closed the connection)
04:59:21FromDiscord<Rika> ?
04:59:31FromDiscord<Rika> Strange quoting, I don’t know
04:59:37*dtomato joined #nim
04:59:37*dtomato quit (Read error: Connection reset by peer)
04:59:42FromDiscord<Rika> It’s not really that strange but it’s not normal
04:59:54*dtomato joined #nim
04:59:54*dtomato quit (Read error: Connection reset by peer)
05:00:04FromDiscord<valerga> apparently works with any character
05:00:11*dtomato joined #nim
05:00:11*dtomato quit (Read error: Connection reset by peer)
05:00:28*dtomato joined #nim
05:00:28*dtomato quit (Read error: Connection reset by peer)
05:00:32FromDiscord<valerga> ok just some
05:00:44*dtomato joined #nim
05:00:44*dtomato quit (Read error: Connection reset by peer)
05:00:46FromDiscord<valerga> like %$ .......... $
05:01:01*dtomato joined #nim
05:01:01*dtomato quit (Read error: Connection reset by peer)
05:01:18*dtomato joined #nim
05:01:18*dtomato quit (Read error: Connection reset by peer)
05:01:34*dtomato joined #nim
05:01:34*dtomato quit (Read error: Connection reset by peer)
05:01:44*jmd_ quit (Ping timeout: 268 seconds)
05:01:50*dtomato joined #nim
05:01:50*dtomato quit (Remote host closed the connection)
05:02:07*dtomato joined #nim
05:02:07*dtomato quit (Read error: Connection reset by peer)
05:02:24*dtomato joined #nim
05:02:24*dtomato quit (Read error: Connection reset by peer)
05:02:27*jmdaemon joined #nim
05:02:40*dtomato joined #nim
05:02:40*dtomato quit (Read error: Connection reset by peer)
05:02:57*dtomato joined #nim
05:02:57*dtomato quit (Read error: Connection reset by peer)
05:03:14*dtomato joined #nim
05:03:14*dtomato quit (Read error: Connection reset by peer)
05:03:30*dtomato joined #nim
05:03:30*dtomato quit (Read error: Connection reset by peer)
05:03:46*dtomato joined #nim
05:03:46*dtomato quit (Read error: Connection reset by peer)
05:04:03*dtomato joined #nim
05:04:03*dtomato quit (Read error: Connection reset by peer)
05:04:19*dtomato joined #nim
05:04:19*dtomato quit (Read error: Connection reset by peer)
05:04:36*dtomato joined #nim
05:04:36*dtomato quit (Read error: Connection reset by peer)
05:04:53*dtomato joined #nim
05:04:53*dtomato quit (Read error: Connection reset by peer)
05:05:09*dtomato joined #nim
05:05:09*dtomato quit (Read error: Connection reset by peer)
05:05:26*dtomato joined #nim
05:05:26*dtomato quit (Read error: Connection reset by peer)
05:05:43*dtomato joined #nim
05:05:43*dtomato quit (Read error: Connection reset by peer)
05:05:59*dtomato joined #nim
05:05:59*dtomato quit (Read error: Connection reset by peer)
05:06:16*dtomato joined #nim
05:06:16*dtomato quit (Read error: Connection reset by peer)
05:06:33*dtomato joined #nim
05:06:33*dtomato quit (Read error: Connection reset by peer)
05:06:50*dtomato joined #nim
05:06:50*dtomato quit (Read error: Connection reset by peer)
05:07:06*dtomato joined #nim
05:07:06*dtomato quit (Read error: Connection reset by peer)
05:07:22*dtomato joined #nim
05:07:22*dtomato quit (Read error: Connection reset by peer)
05:07:39*dtomato joined #nim
05:07:39*dtomato quit (Read error: Connection reset by peer)
05:07:56*dtomato joined #nim
05:07:56*dtomato quit (Read error: Connection reset by peer)
05:08:13*dtomato joined #nim
05:08:13*dtomato quit (Read error: Connection reset by peer)
05:08:29*dtomato joined #nim
05:08:29*dtomato quit (Read error: Connection reset by peer)
05:08:46*dtomato joined #nim
05:08:46*dtomato quit (Read error: Connection reset by peer)
05:09:03*dtomato joined #nim
05:09:03*dtomato quit (Read error: Connection reset by peer)
05:09:19*dtomato joined #nim
05:09:19*dtomato quit (Read error: Connection reset by peer)
05:09:36*dtomato joined #nim
05:09:36*dtomato quit (Read error: Connection reset by peer)
05:09:53*dtomato joined #nim
05:09:53*dtomato quit (Read error: Connection reset by peer)
05:09:56FromDiscord<beans> sent a code paste, see https://paste.rs/fgn
05:10:10*dtomato joined #nim
05:10:10*dtomato quit (Read error: Connection reset by peer)
05:10:19FromDiscord<pim pimling> is nim a good golfing language?
05:10:27*dtomato joined #nim
05:10:27*dtomato quit (Read error: Connection reset by peer)
05:10:31FromDiscord<Elegantbeef> First you dont import threads
05:10:43*dtomato joined #nim
05:10:43*dtomato quit (Read error: Connection reset by peer)
05:11:00*dtomato joined #nim
05:11:00*dtomato quit (Read error: Connection reset by peer)
05:11:17*dtomato joined #nim
05:11:17*dtomato quit (Read error: Connection reset by peer)
05:11:34*dtomato joined #nim
05:11:34*dtomato quit (Read error: Connection reset by peer)
05:11:39FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=48TX
05:11:48FromDiscord<Elegantbeef> The issue is that nim assumes all proc definitions are closures
05:11:51*dtomato joined #nim
05:11:51*dtomato quit (Read error: Connection reset by peer)
05:12:07*dtomato joined #nim
05:12:07*dtomato quit (Read error: Connection reset by peer)
05:12:24*dtomato joined #nim
05:12:24*dtomato quit (Read error: Connection reset by peer)
05:12:38FromDiscord<Elegantbeef> You need to ensure they're `nimcall` and `gcsafe` in the callback sequence and have `--threads:on`
05:12:40*dtomato joined #nim
05:12:40*dtomato quit (Read error: Connection reset by peer)
05:12:57*dtomato joined #nim
05:12:57*dtomato quit (Read error: Connection reset by peer)
05:13:02FromDiscord<Elegantbeef> Unless these callbacks are added at runtime there's also not any reason to use a sequence
05:13:13*dtomato joined #nim
05:13:13*dtomato quit (Read error: Connection reset by peer)
05:13:30*dtomato joined #nim
05:13:30*dtomato quit (Read error: Connection reset by peer)
05:13:47*dtomato joined #nim
05:13:47*dtomato quit (Read error: Connection reset by peer)
05:14:04*dtomato joined #nim
05:14:04*dtomato quit (Read error: Connection reset by peer)
05:14:21*dtomato joined #nim
05:14:21*dtomato quit (Read error: Connection reset by peer)
05:14:53*dtomato joined #nim
05:14:53*dtomato quit (Read error: Connection reset by peer)
05:15:09*dtomato joined #nim
05:15:09*dtomato quit (Read error: Connection reset by peer)
05:15:12FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=48TY
05:15:26*dtomato joined #nim
05:15:26*dtomato quit (Read error: Connection reset by peer)
05:15:30FromDiscord<Elegantbeef> You could store the callbacks in an array and then do `array[len(callbacks), Thread[void]]` of course
05:15:42*dtomato joined #nim
05:15:42*dtomato quit (Read error: Connection reset by peer)
05:15:59*dtomato joined #nim
05:15:59*dtomato quit (Read error: Connection reset by peer)
05:16:16*dtomato joined #nim
05:16:16*dtomato quit (Read error: Connection reset by peer)
05:16:33*dtomato joined #nim
05:16:33*dtomato quit (Read error: Connection reset by peer)
05:16:49*dtomato joined #nim
05:16:49*dtomato quit (Read error: Connection reset by peer)
05:17:06*dtomato joined #nim
05:17:06*dtomato quit (Read error: Connection reset by peer)
05:17:23*dtomato joined #nim
05:17:23*dtomato quit (Read error: Connection reset by peer)
05:17:40*dtomato joined #nim
05:17:40*dtomato quit (Read error: Connection reset by peer)
05:20:24*deadmarshal quit (Quit: IRCNow and Forever!)
05:21:06FromDiscord<beans> In reply to @Elegantbeef "Unless these callbacks are": They are added dynamically. I probably should read up more on nim's pragmas 😅
05:21:11FromDiscord<beans> thanks for the help
05:21:24FromDiscord<Elegantbeef> The `closure` and `nimcall` are calling conventions
05:38:57*oprypin joined #nim
06:09:40*oprypin_ joined #nim
06:09:41*oprypin quit (Ping timeout: 260 seconds)
06:18:56*deadmarshal joined #nim
06:29:02FromDiscord<Bung> weird , nimue4 define wstring as `wstring = ptr array[0 .. 10000000, wchar]`
06:37:10FromDiscord<Elegantbeef> let's hope they never do `create typeof(default(wstring)[])`
06:40:23*jmdaemon quit (Ping timeout: 268 seconds)
06:40:47*jmdaemon joined #nim
06:42:46FromDiscord<Phil> Question... why does `addQuoted ` exist in the std lib?↵Like, in what scenarios do you need a proc that adds quotation marks that often that you actually make it not just into the std lib, but the system lib so that everyone always has access to it?↵Similar for `addEscaped`.↵Like, I see some utility, I'm just surprised that's apparently large enough to throw it into systems.nim
06:48:01FromDiscord<flywind> In reply to @Isofruit "Question... why does `addQuoted": see https://github.com/nim-lang/Nim/issues/6225
06:50:22FromDiscord<Phil> So a convenience proc mostly used by the echo proc?
06:52:20FromDiscord<flywind> Yeah, it is used by system/dollars.
07:24:50FromDiscord<Rika> In reply to @Bung "weird , nimue4 define": That’s terrifying
07:29:42*jmdaemon quit (Ping timeout: 268 seconds)
07:30:12*jmdaemon joined #nim
07:32:49FromDiscord<Elegantbeef> @jmgomez\: `ptr UncheckedArray[wchar]`
07:32:50FromDiscord<Elegantbeef> There we solved it
07:37:16FromDiscord<flywind> In reply to @Elegantbeef "There we solved it": It is nimue4 not the newer one
07:37:19FromDiscord<flywind> Probably
07:37:22FromDiscord<flywind> https://github.com/pragmagic/nimue4/blob/d27d4bc341e27a20bddeca06fe015bc9903db96d/modules/core/strings.nim#L10
07:37:35FromDiscord<Elegantbeef> Oh right
07:37:37FromDiscord<Elegantbeef> Smoke bomb
07:37:55FromDiscord<Elegantbeef> So it's in software no one uses which means it's fine
07:44:14FromDiscord<jmgomez> Yeah, I guess it's because they used an older version of Nim and WideCString didnt exist back then?
07:44:24FromDiscord<Elegantbeef> I mean that's not the issue
07:44:34FromDiscord<Elegantbeef> The issue is the use of a sized array instead of unchecked
08:08:30*jmd_ joined #nim
08:09:12*jmdaemon quit (Ping timeout: 268 seconds)
08:15:03FromDiscord<jmgomez> Oh yeah, but I mean but there is no point to redefine it so that's why I thought it wasnt there when they wrote that. ↵WideCString is defined as ptr UncheckedArray as you pointed out
08:17:17*oprypin_ quit (Quit: Bye)
08:17:34*oprypin joined #nim
08:22:46*jmd_ quit (Ping timeout: 268 seconds)
08:22:49*qwestion joined #nim
08:23:07*jmdaemon joined #nim
08:40:00*jmdaemon quit (Ping timeout: 268 seconds)
08:41:59*jmdaemon joined #nim
09:10:21*jmdaemon quit (Ping timeout: 252 seconds)
09:12:21*jmdaemon joined #nim
09:17:51*droidrage joined #nim
09:21:21*jmdaemon quit (Ping timeout: 268 seconds)
09:23:30*jmdaemon joined #nim
09:36:04*xet7 quit (Quit: Leaving)
09:41:59*xet7 joined #nim
10:10:01*mahlon quit (Ping timeout: 260 seconds)
10:10:33FromDiscord<Forest [She/Her]> How does forward declaration work in Nim?
10:11:14FromDiscord<Forest [She/Her]> I need to access a function that isn't defined until after the first function (and i can't reorder them because they reference eachother, and no way around that)
10:13:45FromDiscord<sealmove> there is an experimental pragma
10:13:57FromDiscord<sealmove> but you can just forward declare them yes
10:14:20FromDiscord<sealmove> just write the proc signature, everything up until before the `=`
10:15:52FromDiscord<sealmove> @Forest for reference: https://nim-lang.org/docs/manual_experimental.html#code-reordering
10:15:59*jmdaemon quit (Ping timeout: 252 seconds)
10:16:48FromDiscord<Forest [She/Her]> Oh interesting
10:16:50FromDiscord<aruZeta> is there a way to `nimble doc` the whole `src/` folder?
10:17:14*jmdaemon joined #nim
10:17:23FromDiscord<Forest [She/Her]> Forward declaration would still probably be better here
10:20:28FromDiscord<aruZeta> guess I will `for f in $(find src -name ".nim"); do nimble doc $f; done`
10:26:45FromDiscord<Forest [She/Her]> I've defined `Table[ReferenceKey,NoRefTSym]` in my code as a type, but how do i initialise it without recreating the keys manually in a newTable proc? (For cleaner code)
10:27:05FromDiscord<Mason> By letting it know that you're not actually a tranny
10:27:08FromDiscord<Mason> Then it might work
10:27:17FromDiscord<Forest [She/Her]> tf
10:27:18FromDiscord<Mason> 🤢🤢🤢🤢🤮🤮
10:27:35FromDiscord<Forest [She/Her]> <@&371760044473319454> :p
10:27:46FromDiscord<Mason> Hahahahah cry cry
10:27:50FromDiscord<Mason> There are only 2 genders
10:27:54FromDiscord<Mason> You freak of nature
10:28:03FromDiscord<aruZeta> what?
10:28:33FromDiscord<Phil> The mighty ban hammer
10:28:41FromDiscord<aruZeta> mjolnir
10:28:48FromDiscord<Forest [She/Her]> That was uh, very weird
10:28:53FromDiscord<aruZeta> yep
10:28:55FromDiscord<Phil> Autocorrect, why did you want to make that van hammer
10:29:06FromDiscord<Forest [She/Her]> lmao van hammers are fun
10:29:12FromDiscord<aruZeta> van hammer lmao
10:29:25FromDiscord<Phil> Thx for making the pronoun game easier forest btw
10:31:44FromDiscord<Forest [She/Her]> In reply to @Isofruit "Thx for making the": No worries about, should be normal tbh so
10:32:25FromDiscord<Forest [She/Her]> (edit) "about," => "about it!"
10:32:42FromDiscord<Forest [She/Her]> In reply to @Forest "I've defined `Table[ReferenceKey,NoRefTSym]` in": Anyway before the distraction lmao, ^^
10:33:07FromDiscord<Forest [She/Her]> Maybe i should just make a template
10:34:03FromDiscord<Phil> I drank copious amounts of alcohol yesterday, I would need the example better spelled out to me, I can't simulate code well in my head atm
10:35:00FromDiscord<Forest [She/Her]> Ah fair lmao
10:35:50FromDiscord<Forest [She/Her]> So i have this line of code `ItemidToLibRef = Table[ReferenceKey,NoRefTLib]` which is just meant to make references to this object cleaner, but i want to initialise an empty table from this type
10:37:16FromDiscord<dom96> I don't think you can
10:37:21FromDiscord<Forest [She/Her]> I see that there's a `newTable` function but that works by writing `newTable[ReferenceKey, NoRefTLib]()` which imo isn't as clean as doing something like `ItemidToLibRef.init()` buuut that doesn't exist
10:37:39FromDiscord<dom96> yeah, pretty sure it doesn't exist :)
10:37:39FromDiscord<Forest [She/Her]> Fair enough
10:37:45FromDiscord<Forest [She/Her]> Sad but welp
10:38:29FromDiscord<dom96> Might be possible to write a macro for this though
10:38:39FromDiscord<dom96> depends how good the API to get info about a type is
10:38:46FromDiscord<Forest [She/Her]> That would be nice, i'll look at tryna do it
10:39:36FromDiscord<dom96> you would use one of these afaik https://nim-lang.org/docs/macros.html#getType%2CNimNode
10:39:59FromDiscord<EyeCon> sent a code paste, see https://play.nim-lang.org/#ix=48UP
10:40:21FromDiscord<EyeCon> (not tested)
10:40:30FromDiscord<Forest [She/Her]> How would it know what A and B is?
10:41:08FromDiscord<EyeCon> You'd be giving it your type: `initTable[ItemidToLibRef]()`
10:41:42FromDiscord<dom96> if that works I'll be amazed
10:41:58FromDiscord<Forest [She/Her]> I'll try it but i don't think it will
10:42:18FromDiscord<sealmove> why would it not?
10:42:18FromDiscord<EyeCon> I thing the argument was a mistake: `t: T` - it shouldn't be necessary
10:43:00FromDiscord<dom96> I think you'll get a "undefined identifier: A, B"
10:43:22FromDiscord<Forest [She/Her]> In reply to @dom96 "I think you'll get": Yeah, this
10:43:32FromDiscord<sealmove> the untyped stuff must be template arguments indeed
10:44:07FromDiscord<EyeCon> Meh, doesn't work
10:44:13FromDiscord<EyeCon> In reply to @dom96 "I think you'll get": You're right
10:44:26FromDiscord<Forest [She/Her]> `/home/[name]/projects/Nim/Nim2IR/tmp.nim(6, 29) Error: undeclared identifier: 'A'`
10:45:04FromDiscord<Forest [She/Her]> Yeah macros will be needed
10:46:05FromDiscord<Forest [She/Her]> Out put of dumpTree
10:46:06FromDiscord<Forest [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=48UQ
10:46:58FromDiscord<Phil> In reply to @Forest "I see that there's": Why not write the init proc yourself that takes the type as first Parameter?
10:47:17FromDiscord<Phil> I haven't tried using type with object call syntax but maybe it works
10:48:55FromDiscord<Forest [She/Her]> In reply to @Isofruit "Why not write the": It wouldn't work unless i can get the types of the key and value
10:51:13FromDiscord<Forest [She/Her]> Eh nvm, it's a long solution to something not needed an answer
10:52:39FromDiscord<Forest [She/Her]> (edit) "needed" => "needing"
10:55:03FromDiscord<EyeCon> https://forum.nim-lang.org/t/2810 might be helpful, or PMunch's macroutils: https://github.com/PMunch/macroutils/blob/master/src/macroutils.nim#L783
10:56:02FromDiscord<sealmove> is a nim template same as a macro which has all its body wrapped in a `quote do:`?
10:56:29FromDiscord<Rika> Almost but not quite
10:56:31FromDiscord<sealmove> i mean, does it make sense to use `quote do:` inside a template?
10:56:36FromDiscord<sealmove> no, right>
10:56:36FromDiscord<Rika> No
10:56:41FromDiscord<sealmove> ok great ty
10:59:29FromDiscord<aruZeta> i have this `runnableExample` for my docs: https://media.discordapp.net/attachments/371759389889003532/1013402434741219369/unknown.png
10:59:35FromDiscord<aruZeta> but it's generating this https://media.discordapp.net/attachments/371759389889003532/1013402460062240788/unknown.png
10:59:49FromDiscord<aruZeta> i don't want the `import src/QRgen` it's adding
11:00:45FromDiscord<aruZeta> is there a way to turn it off/change it to `import QRgen`?
11:01:51FromDiscord<aruZeta> maybe something to add to it's `rdoccmd` param?
11:03:57FromDiscord<konsumlamm> no afaik
11:04:16FromDiscord<konsumlamm> but this looks like a a bug anyway, it shouldn't add the `src/`
11:04:36FromDiscord<aruZeta> might have smth to do with `--outdir:"./build"` ?
11:07:08FromDiscord<EyeCon> @Forest you might use this too: https://nim-lang.org/docs/typetraits.html#genericParams.t%2Ctypedesc
11:07:20FromDiscord<EyeCon> I knew I read that somewhere
11:10:04FromDiscord<aruZeta> In reply to @aruZeta "might have smth to": i think this might be the answer because of ↵> As the last step of documentation generation each runnableExample is put in its own file $file_examples$i.nim, compiled and tested
11:12:12FromDiscord<sealmove> is it not possible to `export ` or something similar?
11:14:13FromDiscord<EyeCon> sent a code paste, see https://play.nim-lang.org/#ix=48UW
11:14:47FromDiscord<sealmove> sent a code paste, see https://play.nim-lang.org/#ix=48UX
11:15:36FromDiscord<sealmove> In reply to @EyeCon "Why doesn't this work?": you need `static[typedesc]` I think
11:16:11FromDiscord<EyeCon> In reply to @รєคɭ๓๏שє "you need `static[typedesc]` I": `/usercode/in.nim(6, 47) Error: type expected`
11:21:23FromDiscord<sealmove> `newTable(genericParams(T)[0], genericParams(T)[1])` looks weird
11:21:46FromDiscord<sealmove> sent a code paste, see https://paste.rs/Dhf
11:21:57FromDiscord<EyeCon> I noticed that and corrected, it didn't change anything in the error
11:22:24FromDiscord<EyeCon> sent a code paste, see https://play.nim-lang.org/#ix=48V2
11:22:52FromDiscord<EyeCon> Still the same internal error at the same place
11:23:38FromDiscord<sealmove> we'll get it right ;) should be totally possible
11:23:47FromDiscord<EyeCon> I mean, the pieces are there
11:24:01FromDiscord<EyeCon> Unless there's a compiler bug, this should be doable
11:24:13FromDiscord<aruZeta> doesnt newTable
11:24:22FromDiscord<aruZeta> (edit) "doesnt newTable ... " added "give a table ref"
11:24:25FromDiscord<sealmove> yes
11:25:05FromDiscord<sealmove> if you don't want a ref then use `toTable`
11:25:28FromDiscord<sealmove> or `initTable`
11:25:38FromDiscord<aruZeta> well nah nevermind
11:27:12FromDiscord<sealmove> @EyeCon this is interesting. yeah maybe there it's a bad :|
11:27:44FromDiscord<EyeCon> `proc initTable(T: typedesc): T = @[].toTable[:genericParams(T)[0], genericParams(T)[1]]()` doesn't work either, with the same internal error
11:29:06FromDiscord<sealmove> sent a code paste, see https://play.nim-lang.org/#ix=48V3
11:29:20*jmd_ joined #nim
11:30:51*jmdaemon quit (Ping timeout: 268 seconds)
11:35:08FromDiscord<sealmove> this error looks weird :p
11:35:56FromDiscord<sealmove> sent a code paste, see https://play.nim-lang.org/#ix=48V8
11:36:13FromDiscord<sealmove> This spins up a a wasi reactor :D
11:37:07FromDiscord<Forest [She/Her]> In reply to @EyeCon "<@909883978717204561> you might use": Neat
11:38:14FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=48Va
11:38:52*jmd_ quit (Ping timeout: 268 seconds)
11:41:14FromDiscord<Geiseric> Hellow! I'm trying to compile nim binaries with obfuscator-llvm, but i always get `fatal error: 'windows.h' file not found` or funnier errors like `# define NIM_NIL ((void)0) / C's NULL is fucked up in some C compilers, so`
11:43:08*piertoni joined #nim
11:44:28piertoniHi! please, what is the option to give to the nim compiler to output C source code?
11:45:23FromDiscord<Geiseric> In reply to @piertoni "Hi! please, what is": I'm using this to compile the binary `nim c -d=release --cc:clang --opt:size --passL:-s --passC:'-mllvm -bcf -mllvm -sub -mllvm -fla -mllvm -split' -d=mingw --hints=on --app=console --cpu=amd64 --hint[Pattern]:off stub.nim`
11:48:24FromDiscord<Geiseric> Oh, i realized you weren't talking to me lol
11:48:54piertoni:)  was a big weird:)
11:51:38FromDiscord<sealmove> In reply to @Rika "What did you do": I don't know xD once I got my code straight, this error went away. But still I thought it's a weird error.
11:53:00FromDiscord<Rika> What’s the code
11:54:13FromDiscord<konsumlamm> In reply to @EyeCon "Why doesn't this work?": internal errors are always bugs, no matter if the code should work or not
11:54:29FromDiscord<ravinder387> In reply to @Rika "What’s the code": hi rika how are you today?
11:54:37FromDiscord<sealmove> In reply to @Rika "What’s the code": Too lazy to reproduce. I was doing stuff with the export statement.
11:55:19FromDiscord<sealmove> In reply to @konsumlamm "internal errors are always": true but if the code doesn't work then they are more important bugs :p
11:55:39FromDiscord<sealmove> I mean if it _should_ work at least
11:55:42*piertoni quit (Quit: Ping timeout (120 seconds))
11:56:56FromDiscord<ravinder387> i fixed blurry problem.. https://media.discordapp.net/attachments/371759389889003532/1013416893018816614/Screenshot_from_2022-08-28_17-26-33.png
11:57:31FromDiscord<ravinder387> now i wanna remove all drawing from canvas. I can't find clearRect function in dom in nim
12:02:31NimEventerNew thread by Planetis: Dr. Chaos released!, see https://forum.nim-lang.org/t/9415
12:06:36FromDiscord<Forest [She/Her]> piertoni: Use the `nimcache` flag, so `nim c --nimcache:cache main.nim`
12:06:46FromDiscord<Forest [She/Her]> Can also pass other flags too of course
12:25:24FromDiscord<dom96> In reply to @รєคɭ๓๏שє "<@132595483838251008> I managed to": cool cool
12:27:30FromDiscord<sealmove> it is really cool >< i am so excited
12:29:07FromDiscord<sealmove> sent a code paste, see https://play.nim-lang.org/#ix=48Vp
12:29:17FromDiscord<sealmove> the beauty of nim... :D
12:30:18*arkurious joined #nim
12:36:48FromDiscord<Geiseric> sent a code paste, see https://play.nim-lang.org/#ix=48Vq
13:27:07FromDiscord<aruZeta> sent a code paste, see https://paste.rs/gnw
13:28:15FromDiscord<aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=48Vy
13:29:38FromDiscord<aruZeta> any way to disable dockhack when using `nim doc`?
13:30:04FromDiscord<aruZeta> (edit) "dockhack" => "dochack"
13:30:08FromDiscord<aruZeta> (edit) "dochack" => "docack"
13:30:13FromDiscord<aruZeta> (edit) "docack" => "dochack"
13:33:34FromDiscord<aruZeta> or if someones knows, how to build the tools directory to add it to the buildsteps in the derivation
13:33:46FromDiscord<aruZeta> (edit) "buildsteps" => "build steps"
13:34:37FromDiscord<aruZeta> (edit) "or if someones knows, how to build the tools directory to add it to the build steps in the derivation ... " added "(although i guess it should be just copying it ?)"
14:16:19FromDiscord<!Patitotective> In reply to @Elegantbeef "I like me exceptions": ill have to do a lot of catching for OR statements (`pattern 1 | pattern2`) tho
14:21:14FromDiscord<aruZeta> im able to copy the tools dir in the install phase, but what i need is to compile dochack.nim into dochack.js, what's the koch command for that?
14:22:25FromDiscord<aruZeta> https://github.com/nim-lang/Nim/blob/v1.6.6/koch.nim#L254-L258 seems this is not compiled tho
14:22:38*disso_peach joined #nim
14:32:09FromDiscord<aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=48VO
14:38:02FromDiscord<aruZeta> lmao https://media.discordapp.net/attachments/371759389889003532/1013457434997706852/unknown.png
14:45:30FromDiscord<deech> Is there any existing function that can list the fields of an object at compile time as NimNodes? `fieldPairs` isn't exactly what I want.
15:07:00FromDiscord<Phil> Why not? Do a compile time proc on fieldpairs, add the fieldnames to a seq[string] and you have your list of fields.
15:07:41FromDiscord<Phil> (edit) "on" => "that contains an iteration over the type with"
15:09:15FromDiscord<deech> Those names will then show up in the binary.
15:10:14FromDiscord<deech> Oh wait, they won't. I see what you mean.
15:10:27FromDiscord<Phil> And another proc handing you the list of fields wouldn't? I'm not sure of the kind of problem you're trying to solve, cybersec and you need to fields but they must be secret?
15:12:15FromDiscord<Phil> Anyway, typically when I have stuff I want to do at compile time I tend to almost always use compileTime proc with either my "getField" macro, "setField" template or just using the `fieldPairs` iterator to check for the existence of something
15:13:33FromDiscord<Phil> It's kind of amazing how far a simple ability to do dot expressions and the fieldpairs iterator get you tbh
15:17:36*pech joined #nim
15:19:47*def-- joined #nim
15:20:45*xet7_ joined #nim
15:20:52*estiquelapice joined #nim
15:21:29*cornfeedhobo quit (Ping timeout: 252 seconds)
15:21:30*disso_peach quit (Ping timeout: 252 seconds)
15:21:30*droidrage quit (Ping timeout: 252 seconds)
15:21:30*vicecea quit (Ping timeout: 252 seconds)
15:21:30*def- quit (Ping timeout: 252 seconds)
15:21:30*adium quit (Ping timeout: 252 seconds)
15:21:30*joast quit (Ping timeout: 252 seconds)
15:21:30*estiquelapice_ quit (Ping timeout: 252 seconds)
15:21:31*xet7 quit (Ping timeout: 252 seconds)
15:21:31*sagax quit (Ping timeout: 252 seconds)
15:21:34*def-- is now known as def-
15:22:55*vicecea joined #nim
15:26:27FromDiscord<! Yes, i hoist> How would i go about sending a get request to a website in nim?
15:27:50*adium joined #nim
15:27:55FromDiscord<aruZeta> https://nim-lang.org/docs/httpclient.html#get%2CAsyncHttpClient%2C
15:28:25FromDiscord<aruZeta> In reply to @aruZeta "but it's generating this": btw solved this with `--path:src`
15:29:40FromDiscord<! Yes, i hoist> In reply to @aruZeta "https://nim-lang.org/docs/httpclient.html#get%2CAsy": thanks
15:29:44FromDiscord<aruZeta> :)
15:29:47FromDiscord<aruZeta> (edit)
15:31:44*cornfeedhobo joined #nim
15:47:01FromDiscord<! Yes, i hoist> Are there formatted sitrings in nim?
15:48:36pmp-phi, is there a reason nim 32bits does not pass "--passC:-m32 --passL:-m32" automatically to gcc/clang in run mode ?
15:49:24FromDiscord<aruZeta> In reply to @not logged in "Are there formatted sitrings": yes, import std/strformat↵let val = 2↵echo fmt"Val: {val}"
15:49:35FromDiscord<aruZeta> (edit) "In reply to @not logged in "Are there formatted sitrings": yes, import std/strformat↵let val = 2↵echo fmt"Val: {val}"" => "sent a code paste, see https://play.nim-lang.org/#ix=48Wp"
15:50:28FromDiscord<! Yes, i hoist> sent a code paste, see https://play.nim-lang.org/#ix=48Wr
15:52:30FromDiscord<! Yes, i hoist> My problem is this: `echo &"Completed in {b-a}"`. Gives me `Completed in (seconds: x, nanoseconds: x)` instead of `Completed in 0.000000000x` or smth
15:52:39FromDiscord<! Yes, i hoist> How would i fix that?
15:53:20FromDiscord<aruZeta> it's `fmt` not `&`
15:53:46FromDiscord<! Yes, i hoist> In reply to @aruZeta "it's `fmt` not `&`": Is there a problem with &?
15:53:59FromDiscord<Phil> In reply to @not logged in "Is there a problem": & is string concatenation
15:54:17FromDiscord<Phil> You do taht for `"bla" & "blub" == "blablub"`
15:54:32FromDiscord<Phil> fmt from `std/strformat` is for format strings
15:54:59FromDiscord<! Yes, i hoist> In reply to @Isofruit "fmt from `std/strformat` is": But they have the same result?
15:55:10FromDiscord<aruZeta> well there is https://nim-lang.org/docs/strformat.html#%26.m
15:55:24FromDiscord<Phil> Did they alias fmt and &?
15:55:56FromDiscord<Rainbow Asteroids> No
15:56:05FromDiscord<! Yes, i hoist> In reply to @not logged in "My problem is this:": Well, i switched to fmt, but still need help with this. A and b are both monotimes
15:56:19FromDiscord<Rainbow Asteroids> `fmt` uses raw strings, `&` doesn't.
15:56:24FromDiscord<aruZeta> yes
15:56:31FromDiscord<aruZeta> i was going to cmment that
15:56:46FromDiscord<aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=48Ws
15:57:04FromDiscord<aruZeta> (edit) "https://play.nim-lang.org/#ix=48Ws" => "https://play.nim-lang.org/#ix=48Wt"
15:57:32FromDiscord<aruZeta> In reply to @not logged in "Well, i switched to": could you echo the variable and show what it looks like?
15:58:16FromDiscord<Rainbow Asteroids> What even is `b-a`
15:58:18FromDiscord<! Yes, i hoist> In reply to @aruZeta "could you echo the": a orb
15:58:22FromDiscord<! Yes, i hoist> (edit) "orb" => "or b"
15:58:34FromDiscord<aruZeta> In reply to @Rainbow Asteroids "What even is `b-a`": he said they were both montime
15:58:39FromDiscord<aruZeta> https://nim-lang.org/docs/monotimes.html#-%2CMonoTime%2CMonoTime
15:58:46FromDiscord<Phil> TIL and likely tomorrow forget because I keep not running into scenarios where the distinction matters.↵AS s for monotime, can you calc the difference ahead of doing the fmt string?
15:59:07FromDiscord<Phil> In that scenario all you'd need is use a parsing proc in times to convert from monotime to string
15:59:17FromDiscord<aruZeta> but remember that when a monotime is printed, it first is converted to string, https://nim-lang.org/docs/monotimes.html#%24%2CMonoTime
16:00:39FromDiscord<Phil> Or even simpler, I assume you do not care about nanoseconds?
16:00:47FromDiscord<! Yes, i hoist> In reply to @Isofruit "Or even simpler, I": I do
16:01:28FromDiscord<! Yes, i hoist> b and a or both numbers: xxxxxxx, xxxx but when i do math on them they get all funky.
16:01:39FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=48Wu
16:01:59FromDiscord<Phil> Oh wait, no it wouldn't the fields are private
16:02:04FromDiscord<! Yes, i hoist> sent a code paste, see https://paste.rs/Pwp
16:02:52FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=48Wv
16:03:11FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=48Wv" => "https://play.nim-lang.org/#ix=48Ww"
16:03:15FromDiscord<Phil> In nanoseconds you'll get out of `std/times`
16:03:36FromDiscord<Phil> if monotimes doesn't export times itself already
16:04:04FromDiscord<voidwalker> I need some code. Trying to asynchronously get n URLs which need to be parsed, and then for each such URL save the parsed URL to disk. All async, so the gui in which this happens doesn't block. Any idea how the code would look like ?
16:04:37FromDiscord<aruZeta> In reply to @Isofruit "if monotimes doesn't export": it imports them but doesn't export anything
16:04:57FromDiscord<voidwalker> (edit) "I need some code. Trying to asynchronously get n URLs which need to be parsed, and then for each such URL save the ... parsed" added "(another)"
16:04:59FromDiscord<! Yes, i hoist> sent a code paste, see https://play.nim-lang.org/#ix=48Wx
16:05:08FromDiscord<Phil> Had a type, the seconds is small, thus I edited
16:05:13FromDiscord<Phil> typo
16:05:28FromDiscord<Phil> See: https://nim-lang.org/docs/times.html#inNanoseconds%2CDuration
16:05:42FromDiscord<Rainbow Asteroids> `import std/times`
16:06:19FromDiscord<leorize> pmp-p\: it doesn't know about compilers basically, it just assumes that the configured compiler will generate the right code by default
16:06:31FromDiscord<Phil> Ah, right, by stating that you'll get the proc I was also meaning to say you'd need to import the lib
16:06:38FromDiscord<Phil> that being std/times
16:11:48FromDiscord<! Yes, i hoist> I think something is wrong with timing, nim only completed in 0.29 seconds for a http request, shouldn’t it be faster? I think my time thing is off
16:13:15FromDiscord<aruZeta> if you want to bench time it takes to do x, maybe you want to use benchy
16:14:47FromDiscord<aruZeta> (edit) "bench" => "benchmark"
16:20:54FromDiscord<! Yes, i hoist> In reply to @aruZeta "if you want to": say more
16:21:13FromDiscord<aruZeta> https://github.com/treeform/benchy
16:30:18FromDiscord<leorize> Nim http being slow is not that weird, it's full of copies
16:34:45FromDiscord<! Yes, i hoist> In reply to @leorize "Nim http being slow": Is there a fast nim http?
16:36:38*jmdaemon joined #nim
16:40:54FromDiscord<dom96> In reply to @not logged in "I think something is": 290ms for a http request? how is that slow?
16:41:14FromDiscord<dom96> also how do you know you're not just measuring the http server's slowness or your internet latency?
16:43:37*jmd_ joined #nim
16:44:19*jmdaemon quit (Ping timeout: 248 seconds)
16:59:59FromDiscord<Phil> In reply to @not logged in "I think something is": As in a server received a request executed a proc and returned a response in barely less than 300ms
17:01:26FromDiscord<Phil> Given that my potato linode server running a prologue web application that has authentication and a whole lot of other bells and whistles managed requests in 50-100ms my first guess is you might not be compiling with release flag
17:02:20FromDiscord<aru> `-d:release` makes a huge difference
17:02:25FromDiscord<Phil> Like, your description doesn't tell me what exactly is slow so I'm left to assume that you have a server that handles requests
17:02:38FromDiscord<Phil> Release is basically 10x speed up
17:12:33FromDiscord<halc> sent a code paste, see https://play.nim-lang.org/#ix=48WZ
17:14:25FromDiscord<halc> didn't even know `RootRef` existed, but I saw it on the std/asyncdispatch source
17:16:00FromDiscord<halc> sent a code paste, see https://play.nim-lang.org/#ix=48X0
17:18:35FromDiscord<halc> it's apparently just a `ref RootObj`, so I'd assume not, but still weird to see it
17:25:37FromDiscord<pruno> sent a code paste, see https://play.nim-lang.org/#ix=48X2
17:25:49FromDiscord<pruno> (edit) "https://play.nim-lang.org/#ix=48X2" => "https://play.nim-lang.org/#ix=48X3"
17:26:37FromDiscord<Forest [She/Her]> Nimpiler is taking ages to figure out because i am keep changing my approach
17:27:31FromDiscord<Forest [She/Her]> (Formerly Nim2IR (Formerly Nim2JSON))
17:32:24FromDiscord<halc> In reply to @pruno "I'm building a table": use an `OrderedTable`
17:32:54FromDiscord<halc> https://nim-lang.org/docs/tables.html#OrderedTable
17:33:04FromDiscord<pruno> sent a code paste, see https://play.nim-lang.org/#ix=48X4
17:33:20FromDiscord<pruno> Declared it like this : `var myCorresTable = initOrderedTable[string, int]()`
17:35:58FromDiscord<halc> In reply to @pruno "I tried that but": Are words repeated? `OrderedTable` remembers insertion order, if you increase the number after, well, it won't change the order
17:36:55FromDiscord<pruno> In reply to @halc "Are words repeated? `OrderedTable`": Do you mean the same words several times in the list ? no, every word is unique in the list
17:39:54*CyberTailor joined #nim
17:40:32FromDiscord<halc> In reply to @pruno "Do you mean the": yeah, that's what I meant, weird, I assume you're just printing the table with `echo`? Maybe it's just the `$` implementation that prints the table out of order? try iterating through the table and printing each value individually
17:40:44FromDiscord<pruno> Gonna try that
17:42:21FromDiscord<pruno> sent a code paste, see https://play.nim-lang.org/#ix=48X8
17:45:21*jmd_ quit (Quit: ZNC 1.8.2 - https://znc.in)
17:46:59FromDiscord<Rainbow Asteroids> sent a code paste, see https://play.nim-lang.org/#ix=48Xb
17:47:01FromDiscord<Rainbow Asteroids> @pruno
17:47:54FromDiscord<pruno> I a have a list of words, i pick a certain number of random ones then put them in a table and assign a number to each one
17:48:04FromDiscord<pruno> I want to preserve the order from 0 to X
17:48:14FromDiscord<pruno> Which does not work somehow
17:48:49*mahlon joined #nim
17:49:13FromDiscord<Rainbow Asteroids> by "preserve the order from 0 to X", do you mean the order in which they appear in the word list or the order in which you insert them into your dictionary?
17:49:18FromDiscord<Rainbow Asteroids> (edit) "dictionary?" => "table?"
17:49:31FromDiscord<pruno> The order i insert them in the table
17:50:01FromDiscord<aru> hmm
17:50:21FromDiscord<aru> sent a code paste, see https://play.nim-lang.org/#ix=48Xe
17:51:16FromDiscord<aru> indeed https://play.nim-lang.org/#ix=48Xf
17:52:42FromDiscord<aru> remember it's sorted by order of insertion not alphanumerically or anything
17:54:30FromDiscord<pruno> Mmh, i may have messed something up
17:54:41FromDiscord<halc> In reply to @pruno "I'm building a table": this exact snippet (with an `OrderedTable`) seems to work for me, are you sure every word is unique in your list? I'd say test it in the nim playground
17:55:00FromDiscord<pruno> I just did, and it works in the nim playground lol
17:55:14FromDiscord<pruno> https://play.nim-lang.org/#ix=48Xh
17:55:28FromDiscord<pruno> Weird
17:55:41FromDiscord<aru> lol
17:56:33FromDiscord<aru> maybe it has smth to do with nim version? `nim --version`
17:56:43FromDiscord<pruno> 1.6.4
17:58:30FromDiscord<Rainbow Asteroids> sent a code paste, see https://play.nim-lang.org/#ix=48Xi
18:02:18FromDiscord<! Yes, i hoist> Why do i get httprequesterror ssl support is unavailable
18:02:30FromDiscord<Rainbow Asteroids> compile with `-d:ssl`
18:03:41FromDiscord<! Yes, i hoist> ok
18:03:56FromDiscord<pruno> In reply to @Rainbow Asteroids "The only way this": This seems to be working, it however stops before iterating over the whole wordlist
18:04:24FromDiscord<pruno> I have 255 words in my worldlist, stops at 224, so i guess, duplicates ?
18:04:56FromDiscord<Rainbow Asteroids> Yeah. It creates a set and then uses that set to create the table, so if you have less words, that probably means you do have duplicates
18:05:23FromDiscord<pruno> Okay weird, gonna redo the code that picks the list then
18:05:27FromDiscord<! Yes, i hoist> In reply to @Rainbow Asteroids "compile with `-d:ssl`": it says arguments only work with the —run option
18:05:39FromDiscord<Rainbow Asteroids> `nim -d:ssl c blah.nim`
18:06:22FromDiscord<! Yes, i hoist> In reply to @Rainbow Asteroids "`nim -d:ssl c blah.nim`": k
18:06:26FromDiscord<pruno> Ah indeed, i have duplicates, i failed my code pick the words
18:06:27FromDiscord<pruno> Thanks
18:09:12FromDiscord<EyeCon> In reply to @not logged in "Why do i get": It can be a pain for the newcomers, I use puppy which doesn't need any compiler switches or extra files: https://github.com/treeform/puppy
18:18:46FromDiscord<Rainbow Asteroids> sent a code paste, see https://play.nim-lang.org/#ix=48Xu
18:22:04*om3ga joined #nim
18:24:39FromDiscord<pruno> In reply to @Rainbow Asteroids "In the future, consider": Alright, thanks for the tips ! :)
18:33:52FromDiscord<! Yes, i hoist> do you need a when defining a type?
18:34:49FromDiscord<aru> `` is just for making it public, in order to be able to import it from other modules
18:35:31FromDiscord<! Yes, i hoist> In reply to @aru "`*` is just for": oh
18:35:44FromDiscord<! Yes, i hoist> Also what is the diffrence between proc and method
18:37:33FromDiscord<! Yes, i hoist> And where is the initiation in a type?
18:40:03NimEventerNew thread by Dlesnoff: Add Nim version for introduction of new feature, see https://forum.nim-lang.org/t/9416
18:40:23FromDiscord<aru> i know the difference between `proc` and `func`, but I'm not that sure of what `method` actually does, it's smth related to dynamic dispatch, but I'm not sure of how it work↵(@not logged in)
18:41:13FromDiscord<aru> sent a code paste, see https://play.nim-lang.org/#ix=48XB
18:42:47FromDiscord<! Yes, i hoist> In reply to @aru "Do you mean to": No, like when you do that, inititation gets called and you can set class attrbuites
18:44:01FromDiscord<aru> by class attributes ig you mean object attributes
18:44:06FromDiscord<aru> there are no classes in nim
18:44:53FromDiscord<aru> sent a code paste, see https://play.nim-lang.org/#ix=48XD
18:45:03FromDiscord<aru> that's how you initialize an object
18:45:37FromDiscord<! Yes, i hoist> In reply to @aru "that's how you initialize": hmmm, ok.
18:45:49FromDiscord<Rainbow Asteroids> sent a code paste, see https://play.nim-lang.org/#ix=48XE
18:46:07FromDiscord<aru> sent a code paste, see https://play.nim-lang.org/#ix=48XF
18:46:15FromDiscord<Forest [She/Her]> How would i get all objects in Nim with the compiler/ast module?
18:46:32FromDiscord<aru> ohh, so method is for OOP then ig?↵(@Rainbow Asteroids)
18:46:37FromDiscord<Rainbow Asteroids> yes
18:46:50*Burt_Harbinson__ joined #nim
18:47:00FromDiscord<aru> nice to know, ty
18:47:40FromDiscord<Forest [She/Her]> Since Java is class based sooo i need a way to get all objects so i can base classes off of them
18:49:11Burt_Harbinson__Good Sunday everyone. I am learning Nim... How do I create an array of nil references without declaring reference variables? In the following code, is it possible to somehow avoid the third line (var ref1...): type X = ref int
18:49:11Burt_Harbinson__type TwoX = array[2, X]
18:49:11Burt_Harbinson__var ref1, ref2: X
18:49:11Burt_Harbinson__var xs: TwoX = [ref1, ref2]
18:50:10Burt_Harbinson__xs array now contains nil references. But I had to declare but not initialize ref1 and ref2 variable.
18:50:32*CyberTailor left #nim (Konversation terminated!)
18:52:33FromDiscord<Rainbow Asteroids> sent a code paste, see https://play.nim-lang.org/#ix=48XL
18:55:04*xet7_ is now known as xet7
18:58:28FromDiscord<! Yes, i hoist> How would i get a response string from httpclient response type?
19:01:13Burt_Harbinson__@Rainbow Asteroids: thanks it works...
19:06:56FromDiscord<Rainbow Asteroids> np mate
19:10:59FromDiscord<! Yes, i hoist> In reply to @not logged in "How would i get": ?
19:12:24FromDiscord<domosokrat> `body(response)`
19:12:47FromDiscord<Forest [She/Her]> How expensive is it to convert strings to ropes? and is it worth using ropes for a code generation library?
19:15:04FromDiscord<pruno> Quick question, how do you convert an hex string, like "F4 FF EE" to its decimal values ? (should be "244 255 238") ?
19:15:31FromDiscord<Rainbow Asteroids> https://nim-lang.org/docs/strutils.html#fromHex%2Cstring
19:15:37FromDiscord<pruno> Ooh
19:15:38FromDiscord<pruno> Right
19:15:38FromDiscord<pruno> Lol
19:15:43FromDiscord<pruno> Forgot about that
19:16:04FromDiscord<pruno> Thanks 😅
19:21:26FromDiscord<! Yes, i hoist> sent a code paste, see https://play.nim-lang.org/#ix=48Y4
19:22:43FromDiscord<Forest [She/Her]> Is std/ropes and compiler/ropes the same?
19:27:54FromDiscord<! Yes, i hoist> In reply to @not logged in "im getting `error: type": I am very confused.
19:33:59*xet7 quit (Quit: Leaving)
19:35:03FromDiscord<domosokrat> JObject is not a type, you want JsonNode
19:35:59FromDiscord<! Yes, i hoist> In reply to @domosokrat "JObject is not a": ok
19:37:16*droidrage joined #nim
19:56:33*derpydoo joined #nim
19:58:02FromDiscord<Ras> nim mentioned on HN https://media.discordapp.net/attachments/371759389889003532/1013537965303136416/Screenshot_2022-08-28-22-57-39-59_948cd9899890cbd5c2798760b2b95377.jpg
20:06:55FromDiscord<Forest [She/Her]> Making a code generator in Nim for java now lmao
20:08:29FromDiscord<EyeCon> What's the easiest way to copy a reference's contents (where just assigning makes it the same object because of the reference semantics)?
20:09:05FromDiscord<EyeCon> Can I use `deepCopy`?
20:10:57FromDiscord<aru> nice!↵(@Ras)
20:15:53FromDiscord<Generic> In reply to @EyeCon "What's the easiest way": if you only want to copy one layer of references use `myref[] = myref[]`
20:25:00FromDiscord<Forest [She/Her]> Is making a glorified code generator macro cheating? To generate Java code with Nim syntax? Lmao
20:25:24FromDiscord<Elegantbeef> That's what macros are for
20:33:16FromDiscord<Forest [She/Her]> By cheating i mean if using it while i procrastinate on making a proper Java backend
20:33:47FromDiscord<aru> cheat as much as you want
20:35:05FromDiscord<Forest [She/Her]> Sweet
20:45:02FromDiscord<Forest [She/Her]> Oh, aruZeta, do you want me to ping you once i have something decent and working?
20:45:20FromDiscord<Forest [She/Her]> Since this definitely seems like something you're interested in haha
20:50:40FromDiscord<aruZeta> Oh yh
20:51:50FromDiscord<IDF> nim on jvm, incredible
20:51:54FromDiscord<aruZeta> Writing a boilerplate language using a language with metaprogramming? Im sold
20:53:27FromDiscord<Forest [She/Her]> Sweet
20:54:20FromDiscord<Forest [She/Her]> In reply to @IDF "nim on jvm, incredible": I'm planning on creating a full-blown JVM backend for Nim at some point, but for now this just builds a java file using strings
20:55:14FromDiscord<Forest [She/Her]> codegen/java.nim: https://hastebin.com/tiratejoye.properties↵javatest.nim: https://hastebin.com/epawekorud.properties↵↵`/home/[name]/projects/Nim/CodegenLib/tests/javatest.nim(8, 9) Error: in expression 'javafile.extends("Object")': identifier expected, but found 'javafile.extends'`
20:55:28FromDiscord<IDF> quite scary
20:55:30FromDiscord<Forest [She/Her]> For some reason running the test file gives that error and i am completely unsure why
20:55:52FromDiscord<Forest [She/Her]> In reply to @IDF "quite scary": The project is very complicated for a noob programmer like me lmao
20:56:10FromDiscord<sealmove> What are you doing forest?
20:56:22FromDiscord<Elegantbeef> Ropes really arent that useful afaik, they're outperformed by just normal strings
20:56:28FromDiscord<Elegantbeef> Unless you have a bunch of repeated nodes that is
20:56:38FromDiscord<shoot_in_foot()> can you make a discord bot in nim?
20:56:39FromDiscord<Elegantbeef> Or are moving text around
20:57:06FromDiscord<Forest [She/Her]> In reply to @รєคɭ๓๏שє "What are you doing": Trying to build a valid java file with a string
20:57:09FromDiscord<sealmove> In reply to @Elegantbeef "Ropes really arent that": Just special use case
20:57:18FromDiscord<EyeCon> In reply to @pim pimling "can you make a": https://github.com/krisppurg/dimscord↵https://github.com/ire4ever1190/dimscmd
20:57:21FromDiscord<sealmove> In reply to @pim pimling "can you make a": Of course
20:57:25FromDiscord<shoot_in_foot()> In reply to @EyeCon "https://github.com/krisppurg/dimscord https://githu": tjhx
20:57:26FromDiscord<Forest [She/Her]> In reply to @Elegantbeef "Ropes really arent that": Ah so just using strings is good enough? I'll switch to them then
20:57:27FromDiscord<shoot_in_foot()> (edit) "tjhx" => "thx"
20:57:51FromDiscord<Elegantbeef> Ropes is only really good for if you're moving segments around or have many duplicated segments
20:58:03FromDiscord<Elegantbeef> It implements the text as a node tree instead of linearly
20:58:46FromDiscord<aruZeta> In reply to @pim pimling "thx": There exists nimble.directory to search for nimble packages too
20:59:10FromDiscord<aruZeta> You may find others if they are published
21:00:55FromDiscord<sealmove> In reply to @Forest "Trying to build a": Why? :D
21:02:27*Burt_Harbinson__ quit (Quit: Leaving)
21:03:42FromDiscord<Forest [She/Her]> In reply to @Elegantbeef "Ropes is only really": Does building potentially large Java files count that have repeated tokens? Or?
21:03:52FromDiscord<Forest [She/Her]> Should it be better to stick with strings?
21:04:02FromDiscord<Elegantbeef> You'd have to cache the ropes
21:04:34FromDiscord<Elegantbeef> Araq i'm fairly certain has said that for the compiler atleast ropes is pretty much useless
21:05:10FromDiscord<Elegantbeef> The only time you have benefit from ropes is when you're moving text around a lot, it prevents long iterations as each part of a string is a tree
21:05:19FromDiscord<Elegantbeef> Well that and when you're caching i guess
21:05:43FromDiscord<Elegantbeef> But it's generally not an overly great data type as everything is no indirected and you get a complicated tree for something that is otherwise simple
21:06:53FromDiscord<Forest [She/Her]> Ah fair enough then
21:07:54FromDiscord<Forest [She/Her]> In reply to @รєคɭ๓๏שє "Why? :D": So Nim can be used on the JVM! What I'm writing rn is a generalised code generation library
21:09:46FromDiscord<Yardanico> i think it's a bit too early to be excited since it's quite a major task
21:12:00FromDiscord<sealmove> In reply to @Forest "So Nim can be": Bold
21:12:42FromDiscord<Forest [She/Her]> Yeah aha
21:13:34FromDiscord<Forest [She/Her]> In reply to @Yardanico "i think it's a": The basic code generation (that has near 0 intergration with Nim) is fairly easy, making a macro that provides a limited subset of Nim should also be relatively alright, the full JVM backend is what I'm kinda procrastinating on
21:13:46FromDiscord<Forest [She/Her]> In reply to @Forest "codegen/java.nim: https://hastebin.com/tiratejoye.p": But yeah, anyone able to help?
21:14:48FromDiscord<Phil> In reply to @Forest "So Nim can be": procedural java code incomiiiiing
21:14:57FromDiscord<Yardanico> In reply to @Forest "The basic code generation": I don't think making a Java generator that understands most of Nim is "easy", just my opinion
21:15:43FromDiscord<Phil> I would assume squeezing nim into a java suit beyond just writing procedural code in it can not be easy, to due the different core principles in language design
21:16:36FromDiscord<Forest [She/Her]> In reply to @Yardanico "I don't think making": Absolutely not
21:17:03FromDiscord<Forest [She/Her]> I'm being very hopeful, I'm going to try getting as much as i can working
21:17:41FromDiscord<Forest [She/Her]> I know it won't work 100%, or even 60-80%, but as long as i can make the core syntax work neatly? I'm considering my job done well
21:24:03FromDiscord<Forest [She/Her]> It was a naming issue apparently
21:24:55FromDiscord<@adrianperreault-58ab7b11d73408c> sent a code paste, see https://play.nim-lang.org/#ix=48YC
21:30:29FromDiscord<shoot_in_foot()> sent a long message, see http://ix.io/48YH
21:31:56FromDiscord<shoot_in_foot()> sent a code paste, see https://play.nim-lang.org/#ix=48YK
21:32:03FromDiscord<shoot_in_foot()> Don't quote me tho
21:32:08FromDiscord<@adrianperreault-58ab7b11d73408c> (This is an error upstream in the chronos library - not my own code needing a MediaType. But thanks.)↵(@pim pimling)
21:33:07FromDiscord<shoot_in_foot()> In reply to @@adrianperreault-58ab7b11d73408c "(This is an error": Oh, ok. I personally don't use the chronos library, but good luck! 😁
21:34:12FromDiscord<Yardanico> In reply to @pim pimling "ok so what im": not sure what list comprehension are you talking about here
21:34:15FromDiscord<Yardanico> (edit) "here" => "here?"
21:34:41FromDiscord<@adrianperreault-58ab7b11d73408c> (Sounds like a bot maybe?)↵(@Yardanico)
21:36:55FromDiscord<Yardanico> maybe he had it in his clipboard? from https://github.com/nim-lang/Nim/issues/9540
21:37:07FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/1013562892911640586/unknown.png
21:37:27FromDiscord<shoot_in_foot()> In reply to @Yardanico "": Yep
21:37:33FromDiscord<Yardanico> but it's not related at all
21:37:44FromDiscord<IDF> In reply to @@adrianperreault-58ab7b11d73408c "(This is an error": it should work since its the example, but it seems someone raised an issue regarding it back in 2019, so all i can say is you should take examples from the tests instead
21:38:19FromDiscord<shoot_in_foot()> sent a code paste, see https://play.nim-lang.org/#ix=48YM
21:38:19FromDiscord<@adrianperreault-58ab7b11d73408c> lol. Nailed it.↵(@Yardanico)
21:38:20FromDiscord<Yardanico> what for?
21:38:36FromDiscord<Yardanico> In reply to @pim pimling "Anyway, like I said,": his problem is that the library can't find some identifier that should be defined
21:38:41FromDiscord<Yardanico> i don't see how checking if it's defined would help
21:39:36FromDiscord<shoot_in_foot()> 🤍 ok well im just dumb so i'll leave 😉 ↵↵(lol)
21:40:39FromDiscord<c++Developer> Hello
21:40:47FromDiscord<shoot_in_foot()> sent a code paste, see https://play.nim-lang.org/#ix=48YP
21:40:48FromDiscord<shoot_in_foot()> In reply to @c++Developer "Hello": 👋
21:41:19FromDiscord<c++Developer> How old is this language?
21:41:36FromDiscord<Yardanico> 2008 is the official release year
21:41:43FromDiscord<Yardanico> I mean when it became public, not 1.0 :)
21:41:50FromDiscord<shoot_in_foot()> In reply to @c++Developer "How old is this": dev started in 200,
21:41:52FromDiscord<shoot_in_foot()> (edit) "200," => "2005,"
21:42:00FromDiscord<Yardanico> wikipedia has quite a lot of this info if you're interested
21:42:16FromDiscord<shoot_in_foot()> the first version of the compiler was released in 2008
21:43:14FromDiscord<c++Developer> In reply to @pim pimling "the first version of": Understood, thank you. I heard about this language 1 hour ago, and it looks really incredible
21:43:26FromDiscord<@adrianperreault-58ab7b11d73408c> Running various tests results in\:↵`nim-chronos/chronos/apps/http/multipart.nim(103, 14) Error: undeclared identifier: 'parseDisposition'`↵(@IDF)
21:44:05FromDiscord<shoot_in_foot()> In reply to @c++Developer "Understood, thank you. I": really!
21:44:22FromDiscord<@adrianperreault-58ab7b11d73408c> Thought you were on your way out... 😉↵(@pim pimling)
21:44:34FromDiscord<shoot_in_foot()> In reply to @@adrianperreault-58ab7b11d73408c "Thought you were on": Of the convo with you 😉
21:45:04FromDiscord<IDF> In reply to @@adrianperreault-58ab7b11d73408c "Running various tests results": rather odd
21:45:41FromDiscord<shoot_in_foot()> In reply to @c++Developer "Understood, thank you. I": I learned about this language through replit, out of all things lmao
21:46:06FromDiscord<IDF> i learned about it from the dev of nitter 😎
21:46:25FromDiscord<shoot_in_foot()> What's that?
21:46:36FromDiscord<Elegantbeef> I cannot learn things i just know things, beep boop beep
21:47:00FromDiscord<Elegantbeef> A twitter frontend that removes all the shit twitter does
21:47:16FromDiscord<IDF> In reply to @pim pimling "What's that?": nitter.net↵you put stuff in the input box and then it says "ratelimit exceeded"
21:47:21FromDiscord<shoot_in_foot()> In reply to @IDF "nitter.net you put stuff": nice
21:47:44FromDiscord<shoot_in_foot()> I see https://media.discordapp.net/attachments/371759389889003532/1013565573340344411/unknown.png
21:48:50FromDiscord<shoot_in_foot()> Also Nim has so much potential for being a golfing language 👑
21:49:25FromDiscord<IDF> apl is the only golfing language
21:50:25FromDiscord<shoot_in_foot()> In reply to @IDF "apl is the only": theres literally golfscript lol
21:50:32FromDiscord<shoot_in_foot()> And V
21:50:47FromDiscord<Elegantbeef> Ah v the quickest way to a memory leak
21:50:49FromDiscord<Yardanico> In reply to @pim pimling "And V": what
21:50:56FromDiscord<IDF> In reply to @Elegantbeef "Ah v the quickest": this
21:51:04FromDiscord<Elegantbeef> Wait you werent golfing for a memory leak?
21:51:15FromDiscord<Yardanico> do you mean vim or actual V?
21:51:22FromDiscord<Yardanico> https://codegolf.meta.stackexchange.com/questions/21955/language-of-the-month-for-april-2021-vim
21:51:24FromDiscord<IDF> least instructions to cause a memleak
21:51:53FromDiscord<shoot_in_foot()> In reply to @Yardanico "do you mean vim": actual V
21:52:00FromDiscord<Yardanico> and how is it good for golfing?
21:54:23FromDiscord<shoot_in_foot()> In reply to @Yardanico "and how is it": like really goood
21:54:26FromDiscord<shoot_in_foot()> (edit) "goood" => "good"
21:54:31FromDiscord<Yardanico> i don't understand if you're joking or not
21:54:43FromDiscord<IDF> what makes it really good at codegolfing im legit curious
21:54:52FromDiscord<IDF> ive never heard of it in that context before
21:55:59FromDiscord<shoot_in_foot()> In reply to @IDF "what makes it really": You can use characters like NUL, which act as null in 1 character,
21:56:24FromDiscord<IDF> wild
21:56:49FromDiscord<Yardanico> In reply to @pim pimling "You can use characters": and how does that change anything? 🤔
21:57:01FromDiscord<Yardanico> maybe there's a code example you can show that shows how code can be short for golfing with v?
21:58:09FromDiscord<shoot_in_foot()> In reply to @Yardanico "and how does that": Its codegolf? less bytes = better chance of winning
21:58:44FromDiscord<Yardanico> i asked if you can explain how using characters like nul can make code shorter? i just don't understand
21:59:17FromDiscord<@adrianperreault-58ab7b11d73408c> Have you heard about Rust?... Their community might be able to use your helpful thought leadership.↵(@pim pimling)
21:59:40FromDiscord<IDF> i agree
22:00:28FromDiscord<EyeCon> @dom96 is there a way to shut down jester cleanly, if possible by a route? I didn't see an easy way to stop the server.
22:01:41FromDiscord<Elegantbeef> Rust is the language that removes ALL bugs right?
22:01:42FromDiscord<Elegantbeef> I always forget
22:02:17FromDiscord<dom96> In reply to @EyeCon "<@132595483838251008> is there a": not supported at the minute
22:02:41FromDiscord<dom96> https://github.com/dom96/httpbeast/blob/master/src/httpbeast.nim#L556
22:02:52FromDiscord<dom96> needs support in httpbeast first
22:03:06FromDiscord<dom96> though you might be able to do it hackishly by force closing the server fd
22:03:34FromDiscord<EyeCon> In reply to @dom96 "though you might be": Yes, that's what I'm doing but it feels a bit rough, thanks!
22:12:12FromDiscord<Varriount> @Araq Could you please re-review https://github.com/nim-lang/Nim/pull/19926 and https://github.com/nim-lang/Nim/pull/19652 ?
22:12:14FromDiscord<Varriount> I know that you feel that bumping up against numeric limits isn't something that should happen in the first place, but the fact is that there are algorithms and use-cases out there that rely on using the entire range of these types. Switching to something like a BigInt isn't always feasible either, because using such a type comes with inherent performance and memory costs.
22:12:15FromDiscord<Forest [She/Her]> The beginnings of https://github.com/Mythical-Forest-Collective/CodeGenLib
22:20:04FromDiscord<EyeCon> In reply to @Forest "The beginnings of https://github.com/Mythical-Fores": Any specific reason you're targeting Python 3.8? Just curious.
22:20:18FromDiscord<EyeCon> I mean, rather than 3.9 or 3.10
22:21:18FromDiscord<EyeCon> system
22:22:40FromDiscord<Forest [She/Her]> Python 3.8's EoL is in 2 years so eh, i think it's a safe bet
22:23:03FromDiscord<Forest [She/Her]> Will upgrade when needed but all of 3.8 is supported in later versions so
22:23:21FromDiscord<EyeCon> Thanks!
22:27:13FromDiscord<Elegantbeef> Really saving keystroks with `extnds` and `imprts`
22:27:41FromDiscord<aruZeta> Yh lol
22:27:46*derpydoo quit (Quit: derpydoo)
22:27:59FromDiscord<aruZeta> Thought it was a typo
22:28:33FromDiscord<Elegantbeef> Also capitalised module names arent idiomatic nim
22:28:37FromDiscord<Forest [She/Her]> In reply to @Elegantbeef "Really saving keystroks with": It gives me a weird issue when using the full name, try it
22:28:43FromDiscord<Elegantbeef> It doesnt
22:28:48FromDiscord<Forest [She/Her]> In reply to @Elegantbeef "Also capitalised module names": I'll fix that tomorrow then
22:28:51FromDiscord<Elegantbeef> `imports` and `extends` are valid identifiers
22:29:03FromDiscord<Forest [She/Her]> In reply to @Forest "codegen/java.nim: https://hastebin.com/tiratejoye.p": Here
22:29:25FromDiscord<Forest [She/Her]> I gotta sleep so night now
22:29:28FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=48YR
22:29:40FromDiscord<Forest [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=48YS
22:29:41FromDiscord<Forest [She/Her]> How about for extends? Implements?
22:29:54FromDiscord<Elegantbeef> dont export the field?
22:30:22FromDiscord<Elegantbeef> Or dont name the property the same
22:30:31FromDiscord<Elegantbeef> The property will be removed ostensibly when you use strings
22:30:49FromDiscord<Forest [She/Her]> Oh wait the property could be causing issues
22:30:53FromDiscord<Forest [She/Her]> Thaaaat didn't occur to me
22:31:03FromDiscord<Elegantbeef> Nim's dot operator prefers fields
22:31:04FromDiscord<Forest [She/Her]> Welp, shall fix tomorrow, see y'all
23:32:41*wallabra quit (Ping timeout: 260 seconds)