<< 29-06-2023 >>

00:18:46FromDiscord<cy_tek> sent a code paste, see https://play.nim-lang.org/#ix=4zma
00:20:19FromDiscord<Elegantbeef> Cause Nim doesnt do flow typing
00:20:37FromDiscord<Elegantbeef> Or if it does it's pretty limited
00:20:53FromDiscord<cy_tek> Hmm, I'll have to look up what flow typing is haha, unless you want to share?
00:21:07FromDiscord<Elegantbeef> It's narrowing the type based off static values
00:21:17FromDiscord<cy_tek> Ahhh, awesome, thanks 🙂
00:21:41FromDiscord<Elegantbeef> So like in the above you'd look at `Box(empty: false)` and go "Ok so everywhere we use `Box` we assume it's not empty"
00:22:21FromDiscord<cy_tek> I'm studying language/compiler design right now, so this is really interesting to me 😄 Thanks for the insights!
00:22:24FromDiscord<huantian> There’s times where the compiler will catch things like that but I’m not sure when exactly
00:22:25FromDiscord<Elegantbeef> This also can be used on flow control, but Nim does not do it(I think it does it mildly in some places, but do not recall)
00:23:29FromDiscord<Elegantbeef> Yea huan I've seem a hint about it before a few times, just do not recall the triggering logic
00:23:55FromDiscord<Elegantbeef> Rust and friends get around this runtime logic by forcing unpacking using pattern matching
00:24:09FromDiscord<Elegantbeef> https://github.com/beef331/fungus attempts to mimic that logic inside Nim using distinct objects and tuples
00:32:45*tanami_ quit (Ping timeout: 240 seconds)
00:33:10*flouer quit (Remote host closed the connection)
00:33:35*flouer joined #nim
01:01:09FromDiscord<taquion> zig
01:01:34FromDiscord<bolibompa> I just found nim and i get the impression that everything you can do in for example C you can do in nim, is that correct?
01:01:42FromDiscord<Elegantbeef> Yes
01:02:06FromDiscord<bolibompa> That is so nice!
01:02:30FromDiscord<bolibompa> A powerful and fast language with easy syntax? Yes please!
02:39:59*Arthur quit (*.net *.split)
02:39:59*rockcavera quit (*.net *.split)
02:40:00*Lord_Nightmare quit (*.net *.split)
02:40:00*noeontheend quit (*.net *.split)
02:40:00*henrytill quit (*.net *.split)
02:40:00*oddish quit (*.net *.split)
02:40:27*Lord_Nightmare joined #nim
02:46:29*Arthur joined #nim
02:46:29*rockcavera joined #nim
02:46:29*noeontheend joined #nim
02:46:29*henrytill joined #nim
02:46:29*oddish joined #nim
03:11:34FromDiscord<ringabout> Runtime access to `compileTime` variables is full of holes. Why backend initialize the variable again...
03:47:51FromDiscord<JJ> can i have a macro take "normal" parameters and do logic with them?
03:48:09FromDiscord<Elegantbeef> `static T`
03:48:33FromDiscord<Elegantbeef> You mean you want compile time values?
03:48:35FromDiscord<JJ> oh so it's gotta be static eh 🫤
03:51:04FromDiscord<Elegantbeef> You want a macro to run code on runtime code?
03:51:14FromDiscord<Elegantbeef> It needs to be static if you want to use it to influence the macro of course
03:51:19FromDiscord<Elegantbeef> Macros are evaluated statically afterall
03:51:41FromDiscord<JJ> In reply to @Elegantbeef "You want a macro": yeah, pretty much
03:51:54FromDiscord<JJ> ideally i would be returning a `var T` but i don't think that works
03:52:16FromDiscord<Elegantbeef> What are you trying to do?
03:52:28FromDiscord<JJ> i guess macro-on-runtime-code is dumb though, how are you going to operate on the ast
03:52:42FromDiscord<Elegantbeef> More importantly how are you going to compile it? 😄
03:52:56FromDiscord<JJ> 😅
03:52:57FromDiscord<Elegantbeef> The NimVm exists of course so it's valid, but compiling is not
03:53:18FromDiscord<Elegantbeef> What are you actually trying to achieve?
03:54:43FromDiscord<JJ> In reply to @Elegantbeef "More importantly how are": hmm. thinking again runtime-code-in-macros is obviously dumb, but i wonder if that unison language could actually support it
03:54:51FromDiscord<JJ> In reply to @omentic "like, i've got this": it's this still actually
03:54:58FromDiscord<Elegantbeef> I mean Nim technically can 😄
03:55:08FromDiscord<JJ> oh god
03:55:20FromDiscord<JJ> eval arbitrary compiled bytecode
03:56:22FromDiscord<Elegantbeef> You can do `ptr Stack` if `Program` never moves
03:57:07FromDiscord<Elegantbeef> Otherwise you can make `Stack` a `ref object`, or use the property like i showed
03:57:35FromDiscord<JJ> would `var Stack` as a return type work if `Program` was heap allocated?
03:58:09FromDiscord<Elegantbeef> Of course
03:59:29FromDiscord<JJ> neat. i'll probably just go with `ref object` unless i think of something better then
03:59:55FromDiscord<Elegantbeef> Well like I showed you can just use a flag
03:59:59FromDiscord<JJ> i was hoping to keep it all stack allocated but it really doesn't matter
04:00:23FromDiscord<JJ> yeah a flag would probably be the best tradeoff for performance if i was allocating a lot of programs
04:01:33FromDiscord<Elegantbeef> You're not really helping performance really
04:01:53FromDiscord<Elegantbeef> Regardless you are unlikely to have many Program's stack allocated 😄
04:02:33FromDiscord<Elegantbeef> Likely to have a sequence or similar heap allocated anyway and your not really going to benefit from lacking pointer indirection
04:03:00FromDiscord<Elegantbeef> But yea using `ref` for `Program` and `Stack` is clearly fine
04:03:03FromDiscord<JJ> yeah that's true
04:04:25FromDiscord<Elegantbeef> I assume the stacks are fixed size?
04:04:35FromDiscord<JJ> yeah
04:05:00FromDiscord<JJ> actually on the topic of `ref`: there's no way to say "ref to immutable memory" is there?
04:06:01FromDiscord<Elegantbeef> technically `func` in Nim2.0 is that
04:06:03FromDiscord<Elegantbeef> You can also just make a `type Immutable[T] = distinct T`
04:06:26FromDiscord<JJ> hmm
04:07:36FromDiscord<JJ> In reply to @Elegantbeef "technically `func` in Nim2.0": it'd be kind of interesting if that logic was pulled out to make `var ref` a reference to mutable memory and `ref` a reference to immutable memory. the current `var ref` as "this reference can be modified" is kinda less helpful
04:07:55FromDiscord<JJ> but i suppose that'd break too much code. and someone out there probably finds the current `var ref` behavior helpful idk
04:11:57FromDiscord<Elegantbeef> I mean there are places where you want to pass a mutable reference to a reference
04:12:19FromDiscord<Elegantbeef> `var T` behaving differently makes little sense
04:16:24FromDiscord<Elegantbeef> how would you then pass a mutable reference? `var var T`?
04:21:56FromDiscord<JJ> yeah
04:21:59FromDiscord<JJ> i mean no
04:22:17FromDiscord<JJ> yeah the current behavior makes sense
04:22:41FromDiscord<Elegantbeef> I will say there is one place where `var` behaves differently and thats `openArray`
04:22:55FromDiscord<Elegantbeef> There is no point to the open array it's just mutability logic for Nim
04:23:02FromDiscord<Elegantbeef> no pointer
04:32:44FromDiscord<JJ> oh interesting
04:33:55FromDiscord<JJ> In reply to @Elegantbeef "I mean there are": i suppose that's fine since you can and should do `var string` or a specific type if you're doing this
04:34:10FromDiscord<Elegantbeef> Right `openArray` is a type erasure
04:38:31FromDiscord<JJ> damn. found this blog post. it's really demystifying these macros for me.
04:39:08FromDiscord<JJ> i was going to scream and run away from my computer towards the nearest ditch but it's convinced me otherwise
04:39:25FromDiscord<Elegantbeef> Really mocking my writing style, or lack therefore
04:40:57FromDiscord<JJ> i've had it bookmarked to work through for ages actually
04:41:20FromDiscord<JJ> finally have a situation where i need (lots) of metaprogramming
04:42:08FromDiscord<Elegantbeef> I may contribute to your uxn work if I get bored enough 😄
05:17:16FromDiscord<JJ> ahaha
05:17:24FromDiscord<JJ> uxn is really throwing me for a loop
05:18:02FromDiscord<JJ> there's one particular part, this goddamn "short mode", that's almost impossible to implement cleanly in a type-safe language
05:18:48FromDiscord<Elegantbeef> Didnt I show you how 😄
05:20:45FromDiscord<Elegantbeef> Or is there another issue aside from the flow logic?
05:21:49FromDiscord<JJ> there's another issue, yeah
05:22:32FromDiscord<JJ> the "short mode" says that it operates on shorts instead of bytes (for popping and pushing)
05:22:38FromDiscord<JJ> but that's not always true
05:22:41FromDiscord<Elegantbeef> Right
05:22:51FromDiscord<Elegantbeef> Wait that's not always true.... nice 😄
05:23:32FromDiscord<JJ> there are a couple of instructions that need to be shorts / bytes, ex. for relative or absolute addressing
05:23:47FromDiscord<JJ> and since you're popping them indiscriminately...
05:25:15FromDiscord<JJ> the best way forward is to write a case statement macro to replace `.pop()` with `.pop8()` or `.pop16()` as needed in the branch i think
05:25:43FromDiscord<Elegantbeef> I disagree 😄
05:25:48FromDiscord<JJ> hilariously, this is just emulating type checking at runtime. it'll look quite like the javascript impl
05:26:04FromDiscord<JJ> (edit) "runtime." => "runtime (aesthetically at least)."
05:26:51FromDiscord<Elegantbeef> Inject a `pop` template inside each branch that passes along a static to your `pop` function
05:28:04FromDiscord<JJ> oh hmm
05:29:02FromDiscord<JJ> sent a code paste, see https://play.nim-lang.org/#ix=4zmL
05:29:13FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4zmM
05:29:17FromDiscord<Elegantbeef> Wait you need runtime information?
05:29:33FromDiscord<JJ> i don't think so with if exprs
05:29:59FromDiscord<Elegantbeef> Well the above will error since `pop8` returns `uint8` and `pop16` returns `uint16`
05:30:00FromDiscord<JJ> oh wait yes nvm
05:30:04FromDiscord<JJ> mine is bad
05:30:14FromDiscord<Elegantbeef> Mine I think is the way to go
05:30:27FromDiscord<Elegantbeef> `isShort` would be a static bool
05:30:48FromDiscord<JJ> well what i'm trying to avoid is logic duplication though
05:30:58FromDiscord<Elegantbeef> Sure but you're hiding it in the macro
05:31:25FromDiscord<JJ> what are the two `of Str` cases for?
05:31:50FromDiscord<Elegantbeef> One is for short mode the other in byte mode
05:32:05FromDiscord<JJ> i'd like to unify those
05:32:07FromDiscord<Elegantbeef> Hence the `{.short.}` pragma
05:32:14FromDiscord<Elegantbeef> But the logic isnt always the same
05:32:17FromDiscord<Elegantbeef> So why would you unify them
05:32:31FromDiscord<Elegantbeef> Some places have 2 operands others have 1 no?
05:32:39FromDiscord<JJ> other than the types the logic is the same (for most cases)
05:33:01FromDiscord<Elegantbeef> Then just do the template idea
05:33:09FromDiscord<JJ> ex. the javascript implementation of ldz looks like this: `case 0x10: / LDZ / this.push(this.peek(this.src.pop8())); break;`
05:33:28FromDiscord<Elegantbeef> And if you want an escape do `{.manual.}` or something
05:33:28FromDiscord<JJ> where `push` and `peek` are returning either uint8 or uint16 at runtime
05:33:51FromDiscord<JJ> the template idea?
05:33:55FromDiscord<Elegantbeef> Yes
05:34:05FromDiscord<Elegantbeef> Emit a template that passes a generic parameter inside an if statement
05:35:42FromDiscord<JJ> hmm what do you mean
05:36:10FromDiscord<JJ> oh, like `of Str[uint8]:`?
05:36:17FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/dcCw6
05:36:19FromDiscord<Elegantbeef> No
05:36:31FromDiscord<Elegantbeef> I mean I did mean that beore
05:36:32FromDiscord<Elegantbeef> before
05:36:43FromDiscord<Elegantbeef> But you said "No I don't want to duplicate code"
05:36:52FromDiscord<JJ> bluh yeah
05:37:24FromDiscord<JJ> why do i ask for help when tired lol
05:37:31FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4zmP
05:37:31FromDiscord<JJ> you constantly have to reexplain things to me
05:38:57FromDiscord<JJ> ah it's not static though
05:39:12FromDiscord<Elegantbeef> It is static though
05:39:19FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/jLWCu
05:39:27FromDiscord<Elegantbeef> The logic is branched statically, the branches are not taken statically
05:39:42FromDiscord<Elegantbeef> Like i showed in my example `doIt` is called with a different value that is not static
05:40:08FromDiscord<Elegantbeef> `if isShort` is really `prog.isShortMode` or w/e
05:40:36FromDiscord<Elegantbeef> `isShort = true` overrides the default parameter and `template pop` aliases the module level one for your local version
05:41:09FromDiscord<Elegantbeef> The nice part is you really can convert that body logic into a template
05:41:27FromDiscord<JJ> oh i get it. that's really neat
05:41:43FromDiscord<JJ> nice use of `auto`
05:41:45FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/zNM99
05:42:43FromDiscord<Elegantbeef> Whoops those `prog.push(prog.peek(prog.pop()))` in that latter template should be `body`
05:42:47FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4zmQ
05:42:54FromDiscord<Elegantbeef> And just like this we have successfully reduce redundant code
05:46:13NimEventerNew thread by alexeypetrushin: Twitter Clone in 60 lines of Nim, see https://forum.nim-lang.org/t/10310
05:46:18*flouer_ joined #nim
05:47:21FromDiscord<Elegantbeef> If unclear you do not need `{.manual.}` and `{.shortable.}` only depends on what you'd want the default logic to be
05:47:27FromDiscord<Elegantbeef> You need an escape hatch one way
05:47:42*flouer quit (Ping timeout: 260 seconds)
05:49:12FromDiscord<Elegantbeef> Not that you even really need a special case statement if you have that template 😛
05:49:54FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4zmT
05:51:14FromDiscord<JJ> hmm okay i will work through this tomorrow
05:51:23FromDiscord<JJ> tysm for the help
05:51:39FromDiscord<Elegantbeef> As always, no problem
05:52:00FromDiscord<Elegantbeef> Just delaying me from realising I have no idea what to work on myself
05:53:17FromDiscord<JJ> you could fix the singular long-standing bug in npeg
05:53:34FromDiscord<Elegantbeef> I more meant in my game
05:53:39FromDiscord<Elegantbeef> Nah I cannot make npeg bad
05:53:45FromDiscord<JJ> ah ic
05:54:06FromDiscord<odexine> Why would beef want to work on IC
05:54:13FromDiscord<odexine> :baqua:
05:54:14FromDiscord<JJ> npeg is ridiculous. i wanted to play around with different approaches to fixing the backtracking codeblocks problem but i don't understand it
05:54:28FromDiscord<JJ> ooh but actually
05:55:08FromDiscord<Elegantbeef> Aww zevv closed it https://github.com/zevv/npeg/issues/42
05:55:10FromDiscord<JJ> simply implement ic. all of it. justify it as for your game or something
05:55:30FromDiscord<Elegantbeef> My game has like a 5s compile time from a clean cache
05:55:41FromDiscord<Elegantbeef> Even on shitty hardware
05:55:41FromDiscord<JJ> damn
05:56:07FromDiscord<odexine> Liquid is not really here anymore so there’s not much of a driving force
05:56:11FromDiscord<Elegantbeef> I'm also not even qualified to add thunking for all proc types to closures
05:56:12FromDiscord<JJ> actually, do you know if there's a roadmap for ic anywhere?
05:56:22FromDiscord<Elegantbeef> "Make it work" is the roadmap
05:56:25FromDiscord<Elegantbeef> Post 2.0
05:56:33*PMunch joined #nim
05:56:34FromDiscord<JJ> lol
05:57:32FromDiscord<Elegantbeef> It's like the big promise of fixing all of the problems in tooling, whether it does is another story
05:58:12FromDiscord<huantian> In reply to @NimEventer "New thread by alexeypetrushin:": Me when the db is a json file
05:59:11NimEventerNew post on r/nim by h234sd: Twitter Clone in 60 lines of Nim, see https://reddit.com/r/nim/comments/14lwqso/twitter_clone_in_60_lines_of_nim/
06:00:14FromDiscord<Elegantbeef> Like if i want to contribute or use it I have to download an inane stdlib file
06:00:53FromDiscord<JJ> In reply to @Elegantbeef "It's like the big": yeah, i have no issues with nimsuggest when it works
06:01:13FromDiscord<JJ> it's just that it'll crash or stall all the time
06:01:37FromDiscord<odexine> Using other languages feels so different with regards to tooling
06:01:45FromDiscord<JJ> i guess ic can relegate those to compiler bugs, but
06:02:05FromDiscord<Elegantbeef> Well with IC the compiler doesnt do anything but generate a cache
06:02:16FromDiscord<Elegantbeef> Right now a lot of bugs are with how the suggest instance has to recompile code
06:02:53FromDiscord<Elegantbeef> With fast IC you recompile the parts that changed and then just update the cache and can quickly fetch
06:04:33FromDiscord<JJ> In reply to @odexine "Using other languages feels": tooling for every other language i write is either much better (rust, python) or nonexistent (idris)
06:04:53FromDiscord<Elegantbeef> How can't python tooling be better it literally just suggests everything
06:05:26FromDiscord<JJ> nothing else is in the weird middle ground of incredibly buggy but works well when it works
06:06:05FromDiscord<JJ> In reply to @Elegantbeef "*How can't python tooling": well type inference actually it's kinda interesting
06:07:08FromDiscord<JJ> it's really, really hard to nail down the type the programmer was thinking of for an unannotated function. there's been a bunch of improvements recently with heuristics and a "typeshed"
06:09:18FromDiscord<odexine> Gradual typing be crazy
06:12:37*ntat joined #nim
06:24:08FromDiscord<_gumbercules> speaking of typing... https://typex.fly.dev/
06:25:24FromDiscord<Elegantbeef> I opened that page and looked the typecheck result of one of the snippets and I felt my intelligence increase atleast twofold
06:31:21FromDiscord<huantian> functional languages do be functional
06:40:13om3gaanybody tried zig compiler with nim?
06:40:35FromDiscord<Elegantbeef> Many
06:40:46FromDiscord<Elegantbeef> There is even a zigcc package to easily use it
06:41:15om3gaoh great
06:41:20FromDiscord<Elegantbeef> https://github.com/enthus1ast/zigcc
06:41:46om3gathank you Elegantbeef, I will try it right now
06:42:23om3gahow you find it comparing to gcc or clang?
06:42:38FromDiscord<Elegantbeef> It's easier to do crossplatform things
06:42:48FromDiscord<Elegantbeef> Aside from the linker work it's just clang
06:43:31FromDiscord<Elegantbeef> I've never used it myself
06:43:59*GoldLeader87 joined #nim
06:44:47om3gainteresting how fast code it will produce with my code
06:44:58om3gaI also want to try icc
06:57:28FromDiscord<_gumbercules> In reply to @Elegantbeef "I opened that page": you should give Scala a spin
06:58:01FromDiscord<Yardanico> In reply to @om3ga "how you find it": maybe you have some kind of misconception, zig cc isn't a fully separate C compiler
06:58:15FromDiscord<Yardanico> it's a wrapper for clang with caching and much easier cross-compilation (because all the different headers and stuff are bundled)
06:58:36FromDiscord<Yardanico> i mean clang is built-in into zig cc statically, but zig cc itself is still essentially a wrapper
07:11:18om3gahmm well it is really fast
07:11:54om3gasome submodules used aroudn 8-10 seconds to process ~1million of packets
07:12:32om3ganow time dropped to 2-5 seconds
07:13:47om3gaYardanico, really? strange. articles I read say it is separate compiler
07:14:29om3gawhile yes, it was built using clang, using clang includes etc
07:15:10om3gawhat's the point to wrap clang and call it "own compiler"?
07:16:12FromDiscord<Elegantbeef> They ship a bunch of linker related stuff making it one of the best crossplatform toolchains
07:16:16om3gait's engineering, not the circus right
07:18:28om3gaeh, llvm can handle cross platform support easily, idk what the reason should be to use zig then
07:19:41FromDiscord<Yardanico> In reply to @om3ga "now time dropped to": Have you tried clang itself?
07:20:03FromDiscord<Elegantbeef> llvm can cross compile sure, you just have to get a linker for the target you want
07:20:03FromDiscord<Yardanico> In reply to @om3ga "eh, llvm can handle": Because zig cc does extra stuff like bundling headers for mingw/glibc, source code for musl etc
07:23:11FromDiscord<Elegantbeef> https://kobzol.github.io/rust/ci/2021/05/07/building-rust-binaries-in-ci-that-work-with-older-glibc.html to demonstrate a problem this solves
07:24:47FromDiscord<Elegantbeef> https://andrewkelley.me/post/zig-cc-powerful-drop-in-replacement-gcc-clang.html for a more zig centric response
07:27:34om3gaYardanico, sure, but seems the difference in speed caused by optimization
07:27:58FromDiscord<Yardanico> zig doesn't do any extra optimizations, maybe your distro just has an older clang?
07:28:11FromDiscord<Elegantbeef> Alternatively zigcc has `--passC:"-flto" --passL:"-flto"` or similar by default
07:28:16FromDiscord<Elegantbeef> No clue if it does
07:28:21FromDiscord<Yardanico> Zig cc actually does the opposite, it defaults to compile with ubsan turned on
07:28:21FromDiscord<Elegantbeef> But it seems like a possibillity
07:28:26FromDiscord<Yardanico> So your code will be slower
07:28:29FromDiscord<Yardanico> a tiny bit
07:28:34FromDiscord<Elegantbeef> Ah
07:28:37om3gano, I copy-pasted option --opt:speed
07:28:37Amun-Ramhm
07:28:50FromDiscord<Elegantbeef> `-d:release`
07:28:58FromDiscord<Elegantbeef> `--opt:speed` doesnt do anything but make me laugh
07:29:29om3gahmm :) idk then, something made it faster sure
07:29:45om3gaI will compare later properly
07:30:07FromDiscord<Elegantbeef> Different clang version than the version zig depends on likely
07:30:08Amun-Rabut zig turns ubsan on only for unomptilized builds
07:30:22Amun-Raoptimized* ;)
07:30:41om3gait leaves ubsan in resulting build?
07:30:44Amun-Raargh, I mean unoptimized
07:31:27Amun-Raom3ga: yes, in debug builds
07:33:44*azimut quit (Ping timeout: 240 seconds)
07:35:52FromDiscord<odexine> doesnt it do so as well with releasesafe
07:41:40*disso-peach joined #nim
08:04:40*xet7 joined #nim
08:05:36NimEventerNew thread by zhouhaiming: I can't understand the func parseTime, see https://forum.nim-lang.org/t/10311
08:08:53FromDiscord<odexine> impossible to read lol
08:30:03PMunch@djazz, I think I might have another solution to the macro problem. Looking at reparseTranslationUnit, basically you can give it "unsaved files" and tell it to parse the thing again. It should be faster if Clang is smart enough to not actually redo the work it did that can't change
08:31:26FromDiscord<djazz> Aha
08:33:45PMunchUnfortunately it messes with the original translation unit, so it's a bit cumbersome to use
08:35:35PMunchHmm, if only I had some simple macro definition which would take Clang a while to parse
08:35:52PMunchThat would make it easier to debug how smart this reparsing is
08:48:29*om3ga quit (Ping timeout: 240 seconds)
08:54:00*fallback quit (Ping timeout: 240 seconds)
08:54:31*GreaseMonkey quit (Ping timeout: 240 seconds)
08:55:08*greaser|q joined #nim
09:05:36*fallback joined #nim
09:17:09*notchris quit (Server closed connection)
09:17:18*notchris joined #nim
09:30:17*Guest84 joined #nim
09:30:47*Guest84 quit (Client Quit)
09:41:39*GoldLeader87 quit (Quit: GoldLeader87)
09:42:45*greaser|q quit (Changing host)
09:42:45*greaser|q joined #nim
09:43:12*greaser|q is now known as GreaseMonkey
10:37:03FromDiscord<Andreas> I have asked the Geany-devs to include a Scintilla-Lexer for Nim. There are two lexers avail at https://github.com/ScintillaOrg/lexilla/tree/master/lexers named `LexNim.cxx` by Jad Altahan (2009) and `LexNimrod.cxx` by Neil Hodgson (2002). Have there been significant syntax-changes to Nim from 2009 ? which would require a update on the lexer ?
10:38:19FromDiscord<gentk> 2002?
10:38:44FromDiscord<Andreas> In reply to @gentk "2002?": 2002 ? it says so in the file ?
10:43:48FromDiscord<Yardanico> In reply to @Andreas "I have asked the": yes, there have been quite a lot, you should use the one from the notepad++ if it's compatible
10:44:46FromDiscord<Yardanico> err i mean sublime text
10:44:57FromDiscord<Yardanico> https://github.com/nim-lang/NimLime github uses the lexer from here to highlight Nim code too
10:45:14FromDiscord<Yardanico> although idk if it's compatible with scintilla really, if it's not you're kind of out of luck
10:45:45FromDiscord<Yardanico> I mean most basic things will of course work, but anything new won't be shown properly, like fmt from strformat, new keywords or stuff
10:52:07FromDiscord<Andreas> In reply to @yardanico "https://github.com/nim-lang/NimLime github uses the": Notepad++ is based on Scintilla - so doe Notepad have good support for Nim ? i can't check, no Windows around ? The NimLime-lexer won't fit into the Scintilla/Lexilla-framework..
10:52:18FromDiscord<Andreas> (edit) "doe" => "does"
10:52:23FromDiscord<Yardanico> i do think notepad++ lexer got some updates, lemme see
10:52:45FromDiscord<Andreas> In reply to @yardanico "i do think notepad++": that would be the easiest sollution..
10:52:48FromDiscord<Yardanico> okay, i don't think it did
10:52:55FromDiscord<Yardanico> so yeah, you can just use the one you linked, the LexNim.cxx
10:53:01FromDiscord<Yardanico> it'll work for basic syntax highlighting
10:53:20FromDiscord<Yardanico> although I don't think it's such of a big deal nowadays, LSP and stuff are much more important :)
10:53:51FromDiscord<Andreas> In reply to @yardanico "it'll work for basic": ok, do you think it needs updates ? it'll be butter than the Python-lexer wihich is the default in Geany..
10:54:15FromDiscord<Andreas> (edit) "butter" => "better"
10:54:19FromDiscord<Yardanico> In reply to @Andreas "ok, do you think": I just don't think syntax highlighting is that important for basic editing :)
10:54:23FromDiscord<Yardanico> but ofc it'll be much better than using a python lexer
10:56:48FromDiscord<Andreas> In reply to @yardanico "I just don't think": well agreed, but it should be either off or show some meanigfull colorizations. LSP for Geany has been discussed, nobody has integrated it so-far. But even without i like it much more than what i tested before. Though SublimeText might be a interesting editor to try..
10:58:21FromDiscord<Andreas> (edit) "meanigfull" => "meaningfull"
11:25:19FromDiscord<mohamed> I was wondering does nim lsp(numsugest) have support for macros or not ↵because from what I see the lsp does not understand what the macro does
11:26:56PMunchIt should have macro support, yes
11:27:10PMunchnimsuggest is basically the same as the compiler, just with modified output
11:32:56*om3ga joined #nim
11:34:41om3gaYardanico: zigcc -c -w -ferror-limit=3 -pthread -O3
11:36:42om3gaYardanico: so, it used optimization definitely, --opt:speed option works
11:37:06FromDiscord<Yardanico> you maybe didn't understand me, I mean that zigcc won't be magically faster than clang because it does not do any modifications to clang or llvm to change performance
11:37:18FromDiscord<Yardanico> it might use some different flags by default (like using ubsan by default), but it doesn't do anything like icc/aocc
11:37:46om3gabut my previous clang build was without any optimizations enabled, that's what I said
11:38:46om3garegarding icc, I will have access to it at evening
11:39:35om3gaI measured differences previously with C code, interesting what will be with nim now
12:11:49*koperak joined #nim
12:14:59*tanami joined #nim
12:59:40*lucasta joined #nim
13:12:58*koperak quit (Remote host closed the connection)
14:13:07FromDiscord<nervecenter> I need to conditionally rebind non-var parameters to a proc. Basically, under a specific edge case, a proc that takes a column name and column unit needs to have the name and unit transformed, because that column's data needs to be transformed. Doesn't happen in any other case.
14:13:14FromDiscord<nervecenter> (edit) "I need to conditionally rebind non-var parameters to a proc. Basically, under a specific edge case, a proc that takes a column name and column unit needs to have the name and unit transformed, because that column's data needs to be transformed. Doesn't happen in any other case. ... " added "Is this possible?"
14:13:21FromDiscord<nervecenter> (edit) "to" => "of"
14:13:57FromDiscord<nervecenter> It only needs to happen inside the proc, I do not want to mutate the inputs
14:14:06FromDiscord<nervecenter> Not unless it's absolutely necessary
14:15:26FromDiscord<nervecenter> Actually...I might be able to pass them as var because I don't use them after that...but I still don't like it
14:16:23*PMunch quit (Quit: Leaving)
14:16:49FromDiscord<nervecenter> I would guess that the other method is to rebind those parameters to new internal bindings?
14:29:20FromDiscord<vindaar> can you expand? or maybe show a trivial example of what you want?↵(@nervecenter)
14:32:21FromDiscord<vindaar> from what I understand (but I might be misunderstanding!) this is what I would do. Just do a `var X = X; var Y = Y` inside the body and depending on the values modify them↵(@nervecenter)
14:33:43FromDiscord<nervecenter> sent a code paste, see https://paste.rs/tYTl4
14:34:11FromDiscord<nervecenter> (edit) "https://play.nim-lang.org/#ix=4zog" => "https://paste.rs/Rugrc"
14:35:00FromDiscord<vindaar> sent a code paste, see https://play.nim-lang.org/#ix=4zoh
14:35:25FromDiscord<nervecenter> Okay, so a local var will overshadow the parameter, that's useful to know
14:35:44FromDiscord<vindaar> yup
14:39:33FromDiscord<Andreas> In reply to @nervecenter "Okay, so a local": i did this accidently and got a compiler-warning..
15:13:28FromDiscord<mohamed> is there a better documentation for nim because I cant find anything about generic constraints
15:13:50termerBetter documentation for Nim? In the official docs, almost certainly not
15:13:55termerIn 3rd party resources? maybe
15:14:53FromDiscord<mohamed> is there any examples about generic constraints all i can find is talk about concepts
15:16:55FromDiscord<odexine> like `proc something[T: SomeInteger](a: T): T = return a` or whatever?
15:17:10FromDiscord<odexine> T will be limited to whatever SomeInteger says it can be
15:17:15FromDiscord<odexine> in which case, any integer type
15:18:01FromDiscord<mohamed> yeah but what about limiting it to multiple types or to only types that have a specific field
15:18:49FromDiscord<odexine> limiting it to multiple types: `something[T: int or float or ...]`↵specific field: concept
15:21:13termerjust don't try using generics in concepts lol
15:21:20termerIt gets all messed up with them
15:21:41termerConcepts, the Nim construct, not the actual English word "concept"
15:22:54FromDiscord<odexine> this is more of concepts in generics than the reverse
15:32:43termerok good
15:56:11FromDiscord<ripluke.> How could I print out a void pointer
15:57:15FromDiscord<_alkamist_> In reply to @ripluke. "How could I print": I think you would have to know what it is and cast it to the type.
15:58:28FromDiscord<ripluke.> Is there a way I could figure out what type it is
16:00:40FromDiscord<_alkamist_> I don't think so. Void pointers don't carry type info as far as I know so you would have to know what it is. Maybe you are looking for `any`, but I'm not sure what you want to accomplish. https://nim-lang.org/docs/typeinfo.html
16:01:20FromDiscord<_alkamist_> I don't use runtime type info too much so I don't know much about it.
16:06:38FromDiscord<that_dude.> The point of a void pointer is that you don't know what type it is.
16:06:54FromDiscord<ripluke.> Yea
16:07:04FromDiscord<that_dude.> sent a code paste, see https://play.nim-lang.org/#ix=4zoG
16:07:08FromDiscord<auxym> do you want to print out the memory address or the data at that address? If data, and you don't know its type or length, i guess you could dump the first X bytes in hex or something like that
16:07:54FromDiscord<ripluke.> In reply to @auxym "do you want to": How would I do something like that
16:08:18FromDiscord<that_dude.> sent a code paste, see https://play.nim-lang.org/#ix=4zoH
16:08:31FromDiscord<ripluke.> Ok
16:09:21FromDiscord<that_dude.> `pointer` is basically a void pointer with no known type information, `ptr type` such as `ptr int` means it's a pointer to an int
16:09:48FromDiscord<that_dude.> And then you can deref it with `[]`
16:10:38FromDiscord<ripluke.> Yea
16:39:13*mahlon_ is now known as mahlon
17:11:03*azimut joined #nim
18:01:04FromDiscord<_alkamist_> sent a code paste, see https://paste.rs/3nJir
18:01:16FromDiscord<_alkamist_> Ideally without having to overload `doStuff`
18:04:03*xet7 quit (Remote host closed the connection)
18:09:28*lucasta quit (Remote host closed the connection)
18:10:48FromDiscord<_alkamist_> sent a code paste, see https://play.nim-lang.org/#ix=4zp4
18:46:28FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4zpb
18:56:20FromDiscord<odexine> Var is not a property of the type but the parameter so it cant be part of the type alias or whatever it is called
18:57:02FromDiscord<_alkamist_> Hmmm, maybe I need to rethink my approach then.
19:01:09FromDiscord<Phil> Self answered SO question incomiiiiing
19:03:12NimEventerNew question by Philipp Doerner: How to set up a small websocket client-server example with nim/prologue?, see https://stackoverflow.com/questions/76583938/how-to-set-up-a-small-websocket-client-server-example-with-nim-prologue
19:03:26FromDiscord<that_dude.> What a prophet
19:03:47FromDiscord<Phil> You'll never figure out how I knew this ahead of time
19:04:00FromDiscord<that_dude.> A magician never shares their secrets
19:04:22FromDiscord<that_dude.> lol
19:04:36FromDiscord<Phil> But yeah, mostly just wanted to document my playing around with nim websockets and how absolutely stupidly easy dealing with it can be if you just don't have to deal with god damn abstraction layers
19:06:09FromDiscord<Phil> Setting up a small little client for playing around was honestly almost as much work as the entire server implementation
19:10:40FromDiscord<djazz> @pmunch thanks for the merge! Can you tag version bumps for nimbleutils and futhark and update https://github.com/PMunch/futhark/blob/master/futhark.nimble#L18C11-L18C48 ?
19:10:56FromDiscord<djazz> (edit) "https://github.com/PMunch/futhark/blob/master/futhark.nimble#L18C11-L18C48" => "https://github.com/PMunch/futhark/blob/master/futhark.nimble#L18"
19:26:45*brisanet joined #nim
19:27:39FromDiscord<bolibompa> Anyone have any poc's for windows kernel drivers in nim?
19:27:57FromDiscord<bolibompa> I want to make one but i really dont know where to start
19:35:44*brisanet quit (Quit: Leaving)
19:47:50*xet7 joined #nim
19:49:29NimEventerNew question by lshlsh: Can I create a thread from gc-UNsafe procedure? (Nim), see https://stackoverflow.com/questions/76584199/can-i-create-a-thread-from-gc-unsafe-procedure-nim
20:06:45*om3ga quit (Ping timeout: 245 seconds)
20:07:30FromDiscord<auxym> In reply to @bolibompa "I want to make": recent forum thread; https://forum.nim-lang.org/t/10303
20:08:45FromDiscord<auxym> In reply to @ripluke. "How would I do": late but,
20:10:39FromDiscord<bolibompa> In reply to @auxym "recent forum thread; https://forum.nim-lang.org/t/1": I could be completely wrong, but isnt there a significant difference between linux and windows kernel drivers?
20:12:22FromDiscord<auxym> In reply to @bolibompa "I could be completely": oh damn sorry, I saw "kernel" and missed the "windows" part
20:12:28FromDiscord<auxym> no idea about windows, sorry
20:12:38FromDiscord<bolibompa> Alright thanks anyway
20:12:54FromDiscord<bolibompa> Do you know if its even possible?
20:14:57FromDiscord<auxym> maybe, with ARC and being careful to not require calling NimMain() (so mostly, no global variable needing initialization), I wouldn't see why not. I assume you'd need to figure out the right incantation of VCC to create a .inf driver.
20:15:17FromDiscord<auxym> Not that I know anything about programming windows drivers in the first place, though
20:18:16FromDiscord<.alea.> is there any way to write multiple version of a proc for different enum members the same way that you can for different types?
20:18:21FromDiscord<.alea.> (edit) "version" => "versions"
20:18:39FromDiscord<.alea.> Besides just a case statement in a single proc
20:24:27FromDiscord<Elegantbeef> Nope
20:24:31*om3ga joined #nim
20:26:15FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/FXYD3
20:48:54*ntat quit (Quit: Leaving)
21:17:09FromDiscord<demotomohiro> In reply to @.alea. "is there any way": You can also do `proc myProc(e: static MyEnum) = when e == Red: ... else: ...`
21:24:13FromDiscord<demotomohiro> In reply to @bolibompa "Anyone have any poc's": If you dont find good tutorial for Nimmer to develop windows kernel drivers, here is where to start: https://learn.microsoft.com/en-us/windows-hardware/drivers/develop/getting-started-with-windows-drivers
21:28:09FromDiscord<demotomohiro> I don't know whether Nim can make windows driver. If C lang can do it, Nim probably can do it.↵If you are the first person try to make windows kernel driver with Nim, you would need to start from official documents about it.
21:30:51FromDiscord<demotomohiro> https://learn.microsoft.com/en-us/windows-hardware/drivers/develop/visual-studio-driver-development-environment
21:36:01FromDiscord<Andreas> @Beef why is a object with two pointer-members 32-byte ? 16-for nim plus 2 x 8-byte-pointer ?
21:36:14FromDiscord<Andreas> (edit) "@Beef" => "@elegantbeef "
21:36:19FromDiscord<Elegantbeef> is it an `object of`?
21:36:29FromDiscord<Elegantbeef> Also you can just write `beef` or `elegantbeef` to ping me
21:36:30FromDiscord<Andreas> In reply to @Elegantbeef "is it an `object": no, just object
21:36:46FromDiscord<Elegantbeef> What's the typedef?
21:37:17FromDiscord<Andreas> sent a code paste, see https://paste.rs/OvhZp
21:37:47FromDiscord<Andreas> (edit) "https://play.nim-lang.org/#ix=4zpJ" => "https://play.nim-lang.org/#ix=4zpI"
21:38:00FromDiscord<Andreas> (edit) "https://play.nim-lang.org/#ix=4zpI" => "https://paste.rs/ftAiO"
21:38:38FromDiscord<Elegantbeef> Afaik an atomic is the size of the internal element
21:39:00FromDiscord<Andreas> In reply to @Elegantbeef "Afaik an atomic is": thats what i thought, too.
21:39:52FromDiscord<Andreas> (edit) "In reply to @Elegantbeef "Afaik an atomic is": thats what i thought, too. ... " added "Then its the generics.."
21:40:49FromDiscord<Elegantbeef> Nah
21:40:55FromDiscord<Elegantbeef> A generic wouldnt change the size
21:42:05FromDiscord<Elegantbeef> I get 16 here on x86 linux
21:42:10FromDiscord<Elegantbeef> What os/compiler are you using?
21:42:36FromDiscord<Andreas> sent a code paste, see https://paste.rs/HfWAF
21:42:53FromDiscord<Andreas> In reply to @Elegantbeef "What os/compiler are you": osx Clang i guess,,
21:43:10FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/GL1Qu
21:43:22FromDiscord<Elegantbeef> Arch or amd64?
21:43:41FromDiscord<Andreas> In reply to @Elegantbeef "Arch or amd64?": intel/amd
21:44:18FromDiscord<demotomohiro> There are 32bit and 64bit intel/amd isa.
21:44:18FromDiscord<Elegantbeef> Odd using clang with the above i get 16
21:46:25FromDiscord<Andreas> sry, my bad - i did `sizeof( node[] )` which is just the dereferenced NodeObj. The NodeObj gives me 16-Byze, dereferenced 32 ?
21:46:41FromDiscord<Andreas> (edit) "16-Byze," => "16-Byte,"
21:47:05FromDiscord<Elegantbeef> But node is an object?
21:47:23FromDiscord<Andreas> (edit) "sry, my bad - i did `sizeof( node[] )` which is just the dereferenced NodeObj. The NodeObj gives me 16-Byte, dereferenced 32 ... ?" added "?↵do i need to use `{.align.}`-magics"
21:48:07FromDiscord<Andreas> In reply to @Elegantbeef "But node is an": yes, `NodeObj` as defined above and `Node[T] = ptr NodeObj[T]`
21:48:52FromDiscord<demotomohiro> !eval echo sizeof(Atomic[int])
21:48:55NimBotCompile failed: /usercode/in.nim(1, 13) Error: undeclared identifier: 'Atomic'
21:49:39FromDiscord<demotomohiro> I cannot add --threads:on to NimBot
21:52:22FromDiscord<Andreas> In reply to @NimBot "Compile failed: /usercode/in.nim(1, 13)": gives me 8-Byte as expected..
22:00:26FromDiscord<Andreas> just for the record https://play.nim-lang.org/#ix=4zpN In the playground alls well. On my system i get 32-bytes for `sizeof(node)`
22:01:00FromDiscord<Andreas> (edit) "`sizeof(node)`" => "`sizeof(node)`↵but i'm using `threading/atomics`"
22:01:16FromDiscord<Andreas> (edit) "`sizeof(node)`↵but" => "`sizeof( node[] )`↵but"
22:04:11FromDiscord<Elegantbeef> I'd say `NodeObj[T]{.packed.}`
22:05:09FromDiscord<Elegantbeef> With threading it's still 16bytes here on gcc
22:05:17FromDiscord<Elegantbeef> Same with clang
22:05:30FromDiscord<Andreas> In reply to @Elegantbeef "With threading it's still": i tested the wrong obj - my typo,,, solved
22:06:46FromDiscord<Elegantbeef> Lol sometimes I feel like I'm being tested
22:07:28FromDiscord<Andreas> beef i put a pic in the #test - channel, can u tell me what the yellow thing is ?
22:07:59FromDiscord<Elegantbeef> Perhaps
22:08:07FromDiscord<Elegantbeef> It's a dandelion
22:08:09FromDiscord<Elegantbeef> Lemon
22:08:16FromDiscord<Elegantbeef> Pencil
22:09:21FromDiscord<Andreas> "don't eat yellow snow."
22:09:28FromDiscord<Elegantbeef> Why are sets so slow
22:09:32FromDiscord<Elegantbeef> Also you could've posted that here
22:09:55FromDiscord<Elegantbeef> Oh wait that's a hashset
22:11:56FromDiscord<Elegantbeef> I assume this is a benchmark of different solutions to your problem you're optimising, or is this actually a question? 😄
22:12:11FromDiscord<Andreas> In reply to @Elegantbeef "Why are sets so": perfect observation - why is the Table[int] so darn fast. or the Set[int] so slow..
22:12:48FromDiscord<Andreas> the yellow thinggy is a `IntSet`. All container are prefilled and only the access was measured..
22:14:02FromDiscord<Elegantbeef> Not to insult your intelligence but you did benchmark `-d:release`?
22:14:21FromDiscord<Andreas> In reply to @Elegantbeef "Not to insult your": -d:danger -d:useMalloc
22:14:49FromDiscord<Elegantbeef> Why with `-d:useMalloc`?
22:15:38FromDiscord<Elegantbeef> The fact that a `HashSet[int]` was that much slower than a `Table[int, int]` makes very little sense
22:16:05FromDiscord<Andreas> In reply to @Elegantbeef "Why with `-d:useMalloc`?": cos' `New[T]` needs it.. but i can quickly check if that makes a difference - i'll try -d:release and -mm:orc..
22:16:24*cedb quit (Quit: WeeChat 3.8)
22:16:39FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/G23Bx
22:18:33FromDiscord<demotomohiro> `intSet` is actually `packedSet` that is implemented as a sparse bit set https://github.com/nim-lang/Nim/blob/devel/lib/std/packedsets.nim
22:19:01FromDiscord<Elegantbeef> Like there is no reason table is faster
22:19:03FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4zpR
22:19:14FromDiscord<Elegantbeef> Right that's faster for obvious reasons
22:19:27FromDiscord<Elegantbeef> But `HashSet[int]` and `Table[int, int]` are the same thing technically speaking
22:20:19FromDiscord<Elegantbeef> Different results makes me assume something was off in their testing methodology
22:20:54FromDiscord<Andreas> In reply to @Elegantbeef "But `HashSet[int]` and `Table[int,": the `Set[T]` must win against the `Table[T]`and `-d:release --mm:orc` for the Set, shows a minimal slowdown
22:21:10FromDiscord<Elegantbeef> "must win"?
22:22:00FromDiscord<Andreas> In reply to @Elegantbeef ""must win"?": yes, i'd expect a Set to be faster - must be faster - does not carry a value
22:22:24FromDiscord<Andreas> (edit) "In reply to @Elegantbeef ""must win"?": yes, i'd expect a Set to be faster - must be faster - does not carry a ... valueonly.." added "index/value, but a" | "index/value, but avalue ... " added "only.."
22:22:26FromDiscord<Elegantbeef> Is `Set[T]` `HashSet[T]`?
22:22:26FromDiscord<Elegantbeef> If so it does carry the value
22:23:26FromDiscord<Andreas> In reply to @Elegantbeef "Is `Set[T]` `HashSet[T]`?": yes it's from `std/set` the `system/set`is limited to 16-bit.
22:23:42FromDiscord<Elegantbeef> Then yes it should be identical to `Table`
22:25:32FromDiscord<Elegantbeef> I showed the APIs, they're identical implementations just with different user facing APIs
22:26:40FromDiscord<Andreas> In reply to @Elegantbeef "I showed the APIs,": hmm, strange, i run the `Table[int,int]`-bench again and its still 60-percent above the `Set[int]`
22:27:15FromDiscord<Andreas> (edit) "60-percent" => "45-percent"
22:32:06FromDiscord<Andreas> beef i added the write-performance-bench, which is rather not surprising..
22:36:30FromDiscord<Elegantbeef> Making a graph with two similar colours and showing it to someone slightly colour deficient is a being an ass 😄
22:36:31FromDiscord<Elegantbeef> Where is `Set[T]` on that graph?
22:37:32FromDiscord<Andreas> In reply to @Elegantbeef "Where is `Set[T]` on": its in the lower-area among the other synchronized dudes from `std/lib`
22:38:56FromDiscord<Andreas> (edit) "`std/lib`" => "`std/lib`↵What you see in that picture is not my fantasy - you can find that in any paper on lock-free containers from the last 20yrs."
22:38:58FromDiscord<Elegantbeef> Are you sure... there are only 2 numbers there 😄
22:39:34FromDiscord<Andreas> In reply to @Elegantbeef "Are you sure... there": i can send you the spreadsheet..
22:41:31FromDiscord<Andreas> My expectation was, that it takes 2-3 threads to get more work done than a `Table` does on one thread - but two threads are enough..
22:42:14*flouer_ quit (Ping timeout: 260 seconds)
22:43:06*flouer_ joined #nim
22:56:02FromDiscord<uninnocent> sent a code paste, see https://play.nim-lang.org/#ix=4zpX
22:56:09FromDiscord<uninnocent> (edit)
22:56:30FromDiscord<uninnocent> C:\Users\Jennifer\Desktop\testing.nim(18, 105) Error: ambiguous call; both system.==(x: bool, y: bool) [proc declared in C:\Users\Jennifer\.choosenim\toolchains\nim-1.6.12\lib\system\comparisons.nim(27, 6)] and system.==(x: int32, y: int32) [proc declared in C:\Users\Jennifer\.choosenim\toolchains\nim-1.6.12\lib\system\comparisons.nim(145, 6)] match for: (bool, int32)
22:56:36FromDiscord<uninnocent> I can't undrestand this error
22:56:44FromDiscord<uninnocent> What's an ambiuous call
23:00:10FromDiscord<Andreas> In reply to @uninnocent "What's an ambiuous call": ambiguos-call could mean, that there are two procs with identical signature in yout program and the compiler cannot decide which one to choose. Maybe try using full-qualified-names to figure that out..
23:00:36FromDiscord<Andreas> (edit) "signature" => "signatures" | "yout" => "the scope of your"
23:01:09FromDiscord<Andreas> (edit) "In reply to @uninnocent "What's an ambiuous call": ambiguos-call could mean, that there are two procs with identical signatures ... in" added "(maybe from different modules)"
23:04:19FromDiscord<Elegantbeef> Seems like winim has a converter causing issues as they do
23:04:55*jmdaemon joined #nim
23:05:19FromDiscord<uninnocent> sent a code paste, see https://play.nim-lang.org/#ix=4zpY
23:05:29FromDiscord<uninnocent> let peData: ptr = cast[ptr](readFile("putty.exe"))
23:06:07FromDiscord<Elegantbeef> `ptr` is a generic
23:08:12FromDiscord<Elegantbeef> No only that but `readFile` returns a string so `ptr char` is not right
23:08:46FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/DCwV9
23:12:49FromDiscord<uninnocent> sent a code paste, see https://play.nim-lang.org/#ix=4zq1
23:13:24FromDiscord<Elegantbeef> stop trying to `cast[ptr]`
23:14:04FromDiscord<Elegantbeef> also Nim doesnt have pointer arithmetic build int so `cast[pointer](bleh) + blugh` doesnt mean anything
23:14:19FromDiscord<Elegantbeef> `ptr` in Nim is a generic
23:14:23FromDiscord<Elegantbeef> you mean `ptr T`
23:14:26FromDiscord<Elegantbeef> Where `T` is the type of the pointer
23:14:32FromDiscord<Elegantbeef> `void` is `pointer` in Nim
23:58:31*termer quit (Server closed connection)
23:59:00*termer joined #nim