<< 04-10-2022 >>

00:43:14FromDiscord<jos> can you forward declare types?
00:43:35FromDiscord<jos> ah ok i see you can't really
00:43:36FromDiscord<Elegantbeef> Kinda but you really dont need to
00:43:46FromDiscord<Elegantbeef> There is an experiemental `packageType` which works like C's incomplete struct
00:45:02FromDiscord<jos> i kind of need to
00:45:13FromDiscord<Elegantbeef> Why?
00:45:17FromDiscord<jos> i realize i can restructure my code
00:45:21FromDiscord<jos> but in a lot of cases it's just nastier
00:45:41FromDiscord<jos> especially if you don't really have a good thing to call your new file
00:46:03FromDiscord<jos> maybe code reordering will just magically fix it
00:46:20FromDiscord<Elegantbeef> Eh i wouldnt rely on it
00:47:38FromDiscord<jos> well it did work 😁
00:47:47FromDiscord<jos> so for now i'll just roll with that lmao
00:48:02FromDiscord<Elegantbeef> What are you doing?
00:48:55FromDiscord<jos> writing a parser
00:49:10FromDiscord<Elegantbeef> That's not what i mean
00:49:21FromDiscord<jos> i have a file that declares a bunch of operators, and some operators need to invoke parsers
00:49:21FromDiscord<Elegantbeef> What is the code you're using reordering for
00:49:29FromDiscord<jos> but parsers need to invoke operators
00:51:28FromDiscord<jos> actually code reordering didn't work either, it just solved an early symptom
00:51:37FromDiscord<jos> i think i do need another module
00:51:53FromDiscord<Elegantbeef> If you were attempting to use code reordering for types, that isnt needed
00:52:05FromDiscord<Elegantbeef> Just declare your types in a single type block and move along
00:52:26FromDiscord<jos> well i can't really
00:52:35FromDiscord<jos> unless i really muck with the ordering of everything
00:53:01FromDiscord<jos> i'd have to put all the types at the top and then the rest of the impl at the bottom
00:53:03FromDiscord<Elegantbeef> I mean Nim's biggest problem in this regard is cyclical dependencies are disallowed which cause many odd design choices
00:53:09FromDiscord<jos> but i kind of like to keep them together
00:53:10FromDiscord<Elegantbeef> That's fine to do and preferable
00:53:16FromDiscord<jos> eh
00:53:19FromDiscord<jos> depends who you ask
00:53:45FromDiscord<jos> i'm making a language so i can have my own opinions, using nim because it's the closest thing to what i want my language to be
00:55:03FromDiscord<jos> and to that point the easiest thing would just be to move the operators into the parser file so.. i guess i'll do that for now
00:55:05FromDiscord<jos> :chatting:
01:00:12FromDiscord<SaAnd> I had a similar sounding issue with nimble in general, it couldn't download anything and even `nimble refresh` failed. What was the error message exactly?↵(@jan Apisu)
01:01:11*jmdaemon joined #nim
02:02:01*arkurious quit (Quit: Leaving)
02:44:04FromDiscord<Tuatarian> In reply to @Elegantbeef "`lexer` is your program": oh, even in this context
02:44:28FromDiscord<Tuatarian> I saw lexer.c and got confused lmao
02:44:38FromDiscord<Tuatarian> this is a nim bug though right, not my code's problem?
02:44:59FromDiscord<Elegantbeef> I mean it's your code problem but it's a compiler bug
02:45:21FromDiscord<Tuatarian> fair
02:46:08FromDiscord<Tuatarian> is there anything significant in #devel which is not in stable?
02:46:21FromDiscord<Tuatarian> this is still broken on stable btw
03:00:57*derpydoo quit (Quit: derpydoo)
03:06:07FromDiscord<Elegantbeef> It's likely some Nim compiler bug that allowed bad code
03:06:14FromDiscord<Elegantbeef> So look at all your proc types
03:06:20FromDiscord<wiga> is there any lib to copy files?
03:06:55FromDiscord<wiga> nvm imma make my own
03:09:07FromDiscord<Elegantbeef> std/os has copyFile
03:10:12FromDiscord<Elegantbeef> @Tuatarian\: do you know where you use proc types, if so ensure those are the same
04:12:51FromDiscord<wiga> In reply to @Elegantbeef "std/os has copyFile": Whenever i try to copy a sqlite database while it being opened, the destination file is empty
04:13:25FromDiscord<wiga> Any workaround for that? Without having the terminate the process using the db
04:13:33FromDiscord<wiga> (edit) "the" => "to"
04:15:55FromDiscord<Tuatarian> In reply to @Elegantbeef "<@284835054633353226>\: do you know": like a variable of type proc?
04:15:57FromDiscord<Tuatarian> never
04:17:47FromDiscord<Xenon> In reply to @iWonderAboutTuatara "like a variable of": maybe he means lambdas?
04:17:52FromDiscord<Xenon> ah wait
04:17:58FromDiscord<Xenon> just read what he meant
04:18:00FromDiscord<Xenon> lol
04:18:02FromDiscord<Xenon> oops
04:18:33FromDiscord<Elegantbeef> Oh bridge moment
04:18:39FromDiscord<Elegantbeef> I mean the variable or field that is a proctype
04:19:24FromDiscord<Xenon> lol
04:19:37FromDiscord<Elegantbeef> Any usage of pointer procs
04:20:04FromDiscord<Elegantbeef> Likely the procedure named `applyLexer`
04:22:46FromDiscord<Tuatarian> there's some lambdas, but no pointer procts/pointers to procs
04:22:56FromDiscord<Elegantbeef> what's the third parameter of `applyLexer`?
04:23:27FromDiscord<Tuatarian> there is no `applyLexer`
04:23:32FromDiscord<Tuatarian> I have no `applyLexer` function
04:23:42FromDiscord<Elegantbeef> `apply`?
04:23:51FromDiscord<Tuatarian> apply I'm using yeah
04:24:00FromDiscord<Elegantbeef> Ok so what's the apply
04:24:01FromDiscord<Tuatarian> `newTree.apply(x => x.left - shift)`
04:24:07FromDiscord<Tuatarian> this should work fine
04:24:24FromDiscord<Tuatarian> `newTree` is a `var`
04:24:29FromDiscord<Tuatarian> not a `let`
04:24:36FromDiscord<Elegantbeef> Likely Nim's generator not working well
04:24:41FromDiscord<Tuatarian> probalby
04:24:48FromDiscord<Tuatarian> anything I can do about this besides waiting
04:24:48FromDiscord<Elegantbeef> Who cares what the mutabillity is
04:25:06FromDiscord<Tuatarian> as in, it's not to do with me trying to mutate an immutable thing
04:25:11FromDiscord<Elegantbeef> try `newTree.apply(proc(x: YourType): yourResult = x.left - shift)`
04:25:16FromDiscord<Elegantbeef> That's unrelated
04:25:18FromDiscord<wiga> Difference between var and let ? Im curious
04:25:20FromDiscord<Elegantbeef> It's a codegen issue
04:25:24FromDiscord<Tuatarian> yeah
04:25:52FromDiscord<Tuatarian> In reply to @Elegantbeef "try `newTree.apply(proc(x: YourType): yourResult": same
04:26:53FromDiscord<Elegantbeef> What's the apply proc?
04:26:58FromDiscord<Elegantbeef> Is it `sequtils`?
04:27:12FromDiscord<Tuatarian> yes
04:27:38FromDiscord<Tuatarian> oh I see the problem
04:27:41FromDiscord<Elegantbeef> What about `newTree.applyIt(it.left - shift)`?
04:27:50FromDiscord<Tuatarian> wait nevermind
04:28:07FromDiscord<Elegantbeef> should be using applyit anyway imo
04:28:19FromDiscord<Tuatarian> actually this may be the `zero_functional` apply
04:28:47FromDiscord<Tuatarian> `d:\Scripts\Misc\Nim\Nim\nCas\lexer.nim(90, 37) Error: type mismatch: got 'int' for 'it.left - shift' but expected 'ASTNode = object'`
04:29:18FromDiscord<Elegantbeef> `discard it.left - shift`
04:29:21FromDiscord<Elegantbeef> I guess
04:29:33FromDiscord<Elegantbeef> No clue if it'll work
04:29:39FromDiscord<Tuatarian> nope
04:29:46FromDiscord<Tuatarian> expression expected, but found keyword discard
04:29:55FromDiscord<Tuatarian> that's weird that apply doesn't work this way
04:30:13FromDiscord<Elegantbeef> I mean it should work
04:30:19FromDiscord<Tuatarian> yeah
04:30:28FromDiscord<Elegantbeef> Something is causing it to generate a new procedure type
04:30:28FromDiscord<Elegantbeef> One that mismatches
04:31:13FromDiscord<Tuatarian> in the meantime, I could just use a for loop I guess and do it that way
04:31:29FromDiscord<Elegantbeef> I mean you can just copy `applyit`
04:32:16FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4ceT
04:32:57FromDiscord<Elegantbeef> But yea i'd just use a forloop, though i tend to avoid FPisms
04:33:10FromDiscord<Tuatarian> the FPisms are good if you're doing array stuff
04:33:18FromDiscord<Tuatarian> they're very concise and readable
04:33:24FromDiscord<Tuatarian> moreso than loops on both counts
04:33:28FromDiscord<Elegantbeef> Eh i dont find lambda syntax very readable
04:34:19FromDiscord<Tuatarian> personal preference I guess
04:34:42FromDiscord<Tuatarian> but in general I find reducing verbosity generally increases readability, at least for me
04:34:42FromDiscord<Elegantbeef> Though i dont see the point in the `apply` procedure when you're using `=>`
04:34:52FromDiscord<Elegantbeef> The point of `apply` to me is if you have an existing procedure
04:34:56FromDiscord<Elegantbeef> `applyit` is just better
04:35:04FromDiscord<Tuatarian> I was doing that since I think zero_functional requires you to use the lambdas
05:02:06FromDiscord<Rika> In reply to @wiga "Difference between var and": Mutability
05:02:39FromDiscord<wiga> Develop
05:04:19FromDiscord<Rika> What?
05:55:37*rockcavera quit (Remote host closed the connection)
06:06:43*kenran joined #nim
06:31:40*xet7 quit (Ping timeout: 268 seconds)
07:19:49*kenran quit (Remote host closed the connection)
07:21:43*kenran joined #nim
07:51:01*m5zs7k quit (Ping timeout: 265 seconds)
07:53:41*m5zs7k joined #nim
08:50:52*neceve quit (Quit: ZNC - https://znc.in)
08:52:27*neceve joined #nim
09:29:43*dnh joined #nim
09:48:24FromDiscord<Super Dev> sent a code paste, see https://play.nim-lang.org/#ix=4cfA
09:50:00FromDiscord<baalajimaestro> 😂😂
10:11:53*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:17:54FromDiscord<mahdibehkar> Does Case/of work at compile time?
10:26:43FromDiscord<mratsim> In reply to @mahdibehkar "Does Case/of work at": yes. Macros use that extensively
11:08:37*dnh joined #nim
11:19:39*jmdaemon quit (Ping timeout: 268 seconds)
11:26:12FromDiscord<Phil> So it acts kind of like a when statement? Neat
12:12:23*PMunch joined #nim
12:19:50*arkurious joined #nim
12:33:29FromDiscord<konsumlamm> no no, a normal `case` runs at runtime
12:33:41FromDiscord<konsumlamm> you can put it in a `static` block though
12:34:17FromDiscord<konsumlamm> (and then it still doesn't act like `when`, because it creates a new scope for each branch)
12:37:48*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:38:06FromDiscord<ChocolettePalette> When is kinda cool but static is cooler doe
12:41:32FromDiscord<Generic> it's two fundamentally different things
12:48:23*dnh joined #nim
13:01:33*derpydoo joined #nim
13:12:23*PMunch quit (Quit: Leaving)
13:30:03*kenran quit (Remote host closed the connection)
14:03:23FromDiscord<jos> they seem pretty similar to me, to the point where you could omit when from the language and just use static if
14:03:45FromDiscord<jos> unless I'm misunderstanding something
14:07:04FromDiscord<Rika> Static if would evaluate all the code including the body of the if on compile time
14:07:15FromDiscord<Rika> When does only the condition, then the body is pasted in
14:09:12FromDiscord<Takemichi Hanagaki> In reply to @Rainbow Asteroids "typically types are in": Got it, thank you!
14:13:13FromDiscord<jos> In reply to @Rika "Static if would evaluate": if static <expression>:?
14:14:14*kenran joined #nim
14:14:55FromDiscord<Rika> Then that would only evaluate the expression on compile time, no copy paste
14:15:08FromDiscord<Rika> Well of course unless folding I guess
14:27:57*LuxuryMode joined #nim
14:33:34*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:39:51*rockcavera joined #nim
14:39:51*rockcavera quit (Changing host)
14:39:51*rockcavera joined #nim
14:40:19*dnh joined #nim
15:07:20FromDiscord<halc> is it possible to move an existing `seq` to an object field without copying the data on the heap?
15:09:53FromDiscord<Yardanico> In reply to @halc "is it possible to": i don't think so, but with arc/orc the compiler itself might optimize it to a move if it deems it safe
15:11:23FromDiscord<halc> In reply to @Yardanico "i don't think so,": well, the output of `--expandArc` says otherwise
15:11:30FromDiscord<halc> 😔
15:13:17FromDiscord<halc> even if it can be "proven" the old seq won't be used again
15:14:14FromDiscord<halc> I guess potentially one could make a `ref seq`?
15:14:19FromDiscord<halc> (edit) "make" => "use"
15:15:54FromDiscord<halc> In reply to @Yardanico "i don't think so,": well, the output of `--expandArc` says otherwise
15:31:58*derpydoo quit (Ping timeout: 268 seconds)
16:08:37*gsalazar joined #nim
16:21:12*droidrage quit (*.net *.split)
16:21:13*ehmry quit (*.net *.split)
16:21:13*tanami quit (*.net *.split)
16:21:13*mahlon quit (*.net *.split)
16:21:13*adium quit (*.net *.split)
16:21:13*nyeaa4 quit (*.net *.split)
16:21:13*void09_ quit (*.net *.split)
16:21:13*dom96 quit (*.net *.split)
16:21:13*robertmeta quit (*.net *.split)
16:21:13*GreaseMonkey quit (*.net *.split)
16:21:13*Jovan quit (*.net *.split)
16:21:14*ormiret quit (*.net *.split)
16:21:14*Ekho quit (*.net *.split)
16:21:14*Onionhammer quit (*.net *.split)
16:21:14*mal`` quit (*.net *.split)
16:21:14*Jjp137 quit (*.net *.split)
16:21:14*koltrast quit (*.net *.split)
16:21:14*estiquelapice quit (*.net *.split)
16:21:14*madprops quit (*.net *.split)
16:21:14*oisota quit (*.net *.split)
16:21:14*deadmarshal quit (*.net *.split)
16:22:52*droidrage joined #nim
16:22:52*ehmry joined #nim
16:22:52*Onionhammer joined #nim
16:22:52*tanami joined #nim
16:22:52*mal`` joined #nim
16:22:52*nyeaa4 joined #nim
16:22:52*adium joined #nim
16:22:52*mahlon joined #nim
16:22:52*Jjp137 joined #nim
16:22:52*koltrast joined #nim
16:22:52*Ekho joined #nim
16:22:52*ormiret joined #nim
16:22:52*Jovan joined #nim
16:22:52*GreaseMonkey joined #nim
16:22:52*robertmeta joined #nim
16:22:52*dom96 joined #nim
16:22:52*void09_ joined #nim
16:22:52*estiquelapice joined #nim
16:22:52*deadmarshal joined #nim
16:22:52*oisota joined #nim
16:22:52*madprops joined #nim
16:26:48*gsalazar quit (Ping timeout: 264 seconds)
16:32:06FromDiscord<gibson> sent a code paste, see https://paste.rs/3UC
16:36:31FromDiscord<demotomohiro> `namespace` parameter in `markov` template replace both `namespane` in `n.namespace = namespace`.
16:37:46FromDiscord<gibson> ohhh, thank you. I see, the error is talking about the `n.namespace`
16:38:28FromDiscord<Horizon [She/Her]> Is there a tool that handles lexing and parsing with a few rules i can define so I don't have to do both myself?
16:38:56FromDiscord<Horizon [She/Her]> I'd implement the actual executing of the AST myself, just really can't be bothered building the AST from my tokens
16:39:03FromDiscord<Horizon [She/Her]> Irritating and annoying
16:39:05FromDiscord<gibson> @demotomohiro Awesome, knowing how to read that error made the fix incredibly obvious. Thanks again.
16:40:20FromDiscord<demotomohiro> @gibson https://nim-lang.org/docs/manual.html#templates-lookup-rules-for-template-parameters
16:41:02FromDiscord<gibson> I should've remembered those rules 🤦‍♂️
16:52:54*kenran quit (Remote host closed the connection)
16:56:27*wallabra_ joined #nim
16:58:12*wallabra quit (Ping timeout: 268 seconds)
16:58:15*wallabra_ is now known as wallabra
17:26:56NimEventerNew post on r/nim by unquietwiki: sortplz: initial release of a file-sorting tool; have ideas for more features to add later on. Enjoy!, see https://reddit.com/r/nim/comments/xvl1ys/sortplz_initial_release_of_a_filesorting_tool/
18:08:06*rez joined #nim
18:31:00FromDiscord<Horizon [She/Her]> Does Nim have a binding for `Bison`?
18:34:11FromDiscord<Horizon [She/Her]> Nvm found Nimly which is cool
19:09:36NimEventerNew thread by Araq: Threaded TLSF, see https://forum.nim-lang.org/t/9506
19:11:56FromDiscord<ShalokShalom> In reply to @Yardanico "I think so, yes": Thanks a lot, but how are strictEffects are related to strictFuncs?
19:22:45*arkurious quit (Quit: Leaving)
19:26:03*rez quit (Quit: much snoozes...)
19:57:56FromDiscord<ShalokShalom> sent a long message, see http://ix.io/4chZ
19:58:32*jmdaemon joined #nim
19:59:13FromDiscord<Horizon [She/Her]> It uses FFI yeah
19:59:16FromDiscord<Horizon [She/Her]> With Nimpy lmao
19:59:37*kenran joined #nim
19:59:44*kenran quit (Remote host closed the connection)
19:59:58FromDiscord<Horizon [She/Her]> Also, what's a good mix of the words Nim and "Revolt" for an API wrapper ;p
20:00:19*kenran joined #nim
20:00:42*kenran quit (Remote host closed the connection)
20:01:17*kenran joined #nim
20:08:36FromDiscord<Horizon [She/Her]> Ah... https://github.com/disruptek/openapi doesn't support OpenAPI 3, sad
20:22:15FromDiscord<Horizon [She/Her]> Is it better to use the C generator for OpenAPI or the Nim generator? Since the Nim generator is currently in beta and Futhark can wrap C files automatically
20:22:26FromDiscord<Horizon [She/Her]> https://openapi-generator.tech/docs/generators/c vs https://openapi-generator.tech/docs/generators/nim
20:32:06FromDiscord<Horizon [She/Her]> Nim has a `mixin` keyword?
20:32:34FromDiscord<Patitotective> yea, and bind
20:32:48FromDiscord<Patitotective> https://nim-lang.org/docs/manual.html#generics-mixin-statement
20:33:55FromDiscord<Horizon [She/Her]> Oh neat
20:51:10*rez joined #nim
21:06:06*qwr quit (Ping timeout: 268 seconds)
21:07:52*kenran quit (Remote host closed the connection)
21:15:49FromDiscord<Raynei486> how do we do left and right shifting in nim?
21:16:06FromDiscord<Elegantbeef> `shl` and `shr`
21:19:49FromDiscord<Raynei486> 👍
21:27:29*qwr joined #nim
22:51:28*rez quit (Quit: much snoozes...)
23:57:42*LuxuryMode quit (Quit: Connection closed for inactivity)