<< 19-08-2022 >>

00:29:48*rockcavera quit (Read error: Connection reset by peer)
00:30:07*rockcavera joined #nim
00:30:08*rockcavera quit (Changing host)
00:30:08*rockcavera joined #nim
00:43:54madpropsjakt is looking interesting
00:44:01madpropshttps://github.com/adleroliveira/jaktboy/tree/main/src
00:48:41FromDiscord<!Patitotective> In reply to @madprops "jakt is looking interesting": it looks like a less ugly c++ but still ugly↵js like syntax
00:49:08FromDiscord<Elegantbeef> It's atleast better than C++
00:49:22FromDiscord<Elegantbeef> But like this is just.... yea https://github.com/adleroliveira/jaktboy/blob/main/src/mmu.jakt#L63-L121
00:50:14FromDiscord<!Patitotective> hahah, case statements are useless they said
00:50:16FromDiscord<Elegantbeef> Range based switch statements anyone 😄
00:54:02FromDiscord<!&luke> In reply to @Patitotective "hahah, case statements are": 😄
01:16:39*wallabra quit (Ping timeout: 256 seconds)
01:25:57*derpydoo joined #nim
01:42:45*arkurious quit (Quit: Leaving)
02:15:01NimEventerNew thread by Archnim: Math graphics in Nim, see https://forum.nim-lang.org/t/9391
02:36:19FromDiscord<proton> Does '\u0001' present signal bit of 1?
02:59:53FromDiscord<Prestige> What?
03:00:29FromDiscord<Rika> No it represents the first Unicode code point iirc
03:02:22FromDiscord<!Patitotective> DLE https://media.discordapp.net/attachments/371759389889003532/1010020874465845310/unknown.png
03:05:06FromDiscord<!Patitotective> actually it seems to be SOH↵which means START OF HEADING https://media.discordapp.net/attachments/371759389889003532/1010021559257284628/unknown.png
03:08:12*wallabra joined #nim
03:14:07*derpydoo quit (Quit: derpydoo)
04:26:10*hochata joined #nim
04:31:59FromDiscord<!&luke> What type can I use if I want to have a list of key/values and whenever I add to the list, if the key is the same then the value associated with that key gets changed
04:32:21FromDiscord<Elegantbeef> You're describing a table
04:32:38FromDiscord<Elegantbeef> A table and a count table
04:33:14FromDiscord<!&luke> What
04:33:34FromDiscord<Elegantbeef> https://nim-lang.org/docs/tables.html#basic-usage-counttable
04:35:35FromDiscord<!&luke> In reply to @Elegantbeef "https://nim-lang.org/docs/tables.html#basic-usage-c": Umm that takes a string and converts it to a table
04:38:20FromDiscord<Rika> What?
04:38:49FromDiscord<Rainbow Asteroids> sent a code paste, see https://play.nim-lang.org/#ix=4801
04:42:02FromDiscord<Rainbow Asteroids> (you can replace the index with any hashable type and the value with any type)
04:42:21FromDiscord<Rika> You can make custom types hashable as well
04:45:11FromDiscord<!&luke> Oh thx
06:08:06*wallabra_ joined #nim
06:08:29*wallabra quit (Ping timeout: 256 seconds)
06:10:13*wallabra_ is now known as wallabra
06:36:38*wallabra_ joined #nim
06:37:57*wallabra quit (Ping timeout: 256 seconds)
06:38:36*PMunch joined #nim
06:38:59*wallabra_ is now known as wallabra
07:09:09*hochata quit (Ping timeout: 244 seconds)
07:11:39FromDiscord<Zectbumo> how would I make a template named `echos` to call `echo` and put a space between every argument?
07:15:32FromDiscord<Elegantbeef> Dont need a template
07:15:42FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/0WK
07:17:36FromDiscord<Zectbumo> hmm, okay
07:18:30FromDiscord<Elegantbeef> that `$arg` is redundant
07:18:37FromDiscord<Elegantbeef> `arg` is sufficient
07:19:11FromDiscord<Zectbumo> ah right because the varargs already $ for you
07:19:51madpropsi ended up not making rumsfeld
07:20:10madpropsi was going to make a qt thing to select files and count lines of the selected files
07:20:16madpropsbut it was a mess
07:20:31madpropswho needs to count lines anyway
07:21:07madpropsmy next approach would be have a file and specify the files there
07:21:12madpropsmakes more sense, since it can be repeated easily
07:22:13madpropslike the opposite of a .gitignore
08:21:23FromDiscord<voidwalker> https://github.com/yglukhov/nimx/issues/500 - nimx question if anyone wants to take a look at it. Maybe I should post this on the forum as well
08:40:36*attah quit (Ping timeout: 244 seconds)
08:41:31FromDiscord<nocturn9x> man we need to get rid of the refc gc ASAP
08:41:35FromDiscord<nocturn9x> it has more bugs than features
08:41:36*rockcavera quit (Remote host closed the connection)
08:41:56FromDiscord<nocturn9x> I had to switch to mark and sweep just because the refc gc would randomly segfault on objects that are perfectly in scope
08:42:31FromDiscord<Elegantbeef> Cant say i've ever had that happen
08:42:59FromDiscord<Elegantbeef> I can say for certain i've never ran into the refc GC bugging out, though i do use orc mainly now
08:44:32*attah joined #nim
08:58:50NimEventerNew thread by Void09: How to draw images on collectionView elements (rects), with nimx ?, see https://forum.nim-lang.org/t/9392
09:19:43FromDiscord<lantos> In reply to @m4ul3r "Were you ever able": I got really close
09:20:35FromDiscord<lantos> (edit) "close" => "close↵https://github.com/lantos-lgtm/nim_docker_api"
09:21:10FromDiscord<lantos> (edit) "close↵https://github.com/lantos-lgtm/nim_docker_api" => "close↵https://github.com/lantos-lgtm/nim_docker_api↵↵I ran out of time doing it but essentially this at one point was both async+sync docker"
09:26:50PMunchOooh, I wonder if this can be used for the playground
09:34:04FromDiscord<lantos> was actually going to message you on that, something I'm working on
09:34:09FromDiscord<lantos> (edit) "was actually going to message you on that, something I'm working on ... " added "(was)"
09:34:35FromDiscord<lantos> (edit) "(was)" => "(was :()"
09:35:28FromDiscord<lantos> (edit) ":()" => "😦 )"
09:35:39FromDiscord<lantos> (edit) "was actually going to message you on that, something I'm working on (was 😦 ) ... " added "but needed to approach from a different angle"
09:35:49FromDiscord<lantos> (edit) "approach" => "re-approach"
09:36:02FromDiscord<enthus1ast> you transpile ts? \:) crazy
09:36:14FromDiscord<lantos> hahaha
09:37:04FromDiscord<lantos> (edit) "hahaha" => "hahaha, don't judge me xd. just trying to get to a solution faster"
09:37:41FromDiscord<enthus1ast> no not judging
09:38:07FromDiscord<enthus1ast> i mean, winim is created from msdn website afaik
09:39:48FromDiscord<lantos> what I was trying to do was expose the functions to typescript via some sort of RPC/API.
09:40:04FromDiscord<lantos> (edit) "RPC/API." => "RPC/API to be consumed on a FE."
09:40:29FromDiscord<lantos> (edit) "what I was trying to do was expose the functions to typescript via some sort of RPC/API to be consumed on a FE. ... " added "Dom mentioned apache thrift"
10:04:59PMunchI mean the commands used by the playground are pretty few, I think there are like three commands in total
10:10:36FromDiscord<dom96> just use json :)
10:11:16madpropsi started to use yaml
10:11:24madpropsfor configs that are meant to be edited by hand
10:11:41madpropsjson is bad for that
10:25:41FromDiscord<lantos> In reply to @dom96 "just use json :)": yeah but need the types, otherwise no need for extra complicated steps↵I was experimenting with extracting the json then creating the types from that, there are things like quick type that could help but theres a series of decisions around it. nim-nerve and the status json-rpc is the direction I was thinking but again theres more to be said on this
10:25:47FromDiscord<lantos> In reply to @madprops "i started to use": also this
10:26:06FromDiscord<lantos> (edit) "In reply to @madprops "i started to use": also this ... " added "is a good point"
10:39:07FromDiscord<lantos> sent a code paste, see https://play.nim-lang.org/#ix=481h
10:39:40FromDiscord<lantos> (edit) "https://play.nim-lang.org/#ix=481h" => "https://play.nim-lang.org/#ix=481i"
10:40:47FromDiscord<lantos> (edit) "https://play.nim-lang.org/#ix=481i" => "https://play.nim-lang.org/#ix=481l"
10:41:06FromDiscord<lantos> (edit) "https://play.nim-lang.org/#ix=481l" => "https://play.nim-lang.org/#ix=481n"
10:54:15*vsantana joined #nim
11:22:45FromDiscord<ShalokShalom> Whats the secret behind Nim`s macro system?
11:23:23FromDiscord<ShalokShalom> If it doesnt mutate the language itself, as Lisp does, how else does it achieve its flexibility?
11:30:05FromDiscord<aruZeta> macro's change the AST
11:30:39FromDiscord<aruZeta> template's are more like what LISP calls a macro
11:30:47FromDiscord<aruZeta> (edit) "template's" => "templates"
11:30:52FromDiscord<aruZeta> (edit) "macro's" => "macros"
11:36:29FromDiscord<ShalokShalom> but nim has no homoiconicity, so there cant be anything like in lisp
11:36:43FromDiscord<ShalokShalom> so there is no special secret behind your macros?
11:36:50FromDiscord<ShalokShalom> they are just doing, what all the macros do?
11:37:20FromDiscord<Generic> macros are just a function evaluated at compile time producing an AST
11:38:11FromDiscord<Generic> I think one special thing about Nim is how much is allowed at compile time
11:38:59FromDiscord<Generic> like constexpr in C++ is getting better with every revision, but it's still behind Nim's compile time capabilities
11:39:25FromDiscord<Generic> and well if a macro is a function running at compile time, the more things you can do at compile time, the more flexible macros are
11:40:46PMunchNim macros work on the AST, the Abstract Syntax Tree. When your code enters the compiler it is parsed into a tree structure, this is the AST. When macro calls are encountered they are fed this pre-parsed syntax tree and have to return a new syntax tree to replace it with. So essentially you're able to write code in a macro that will write more code during compilation.
11:40:51PMunchThat's really all there is to it
11:52:34*d4rckh joined #nim
12:00:49FromDiscord<auxym> yes, which is also why macros cannot change the nim syntax. macros are evaluated after the parser builds an AST from nim syntax. then, macros can manipulate that AST as you see fit.
12:03:03FromDiscord<auxym> btw, if you are interested in parsers and ASTs, I can recommend Crafting Interpreters, really fun to read and play with the ideas. speaking as someone without any formal CS background and trying the wikipedia article on LL parsers and formal grammars made my head hurt
12:10:54FromDiscord<lantos> In reply to @auxym "btw, if you are": yeah my experience, tried to leverage some of pm's blog and other blogs. I heard from some MIT thing that CS101 that most uni's taught lisp as a first programming language so alot of people who had done that had understandings of macros
12:11:05FromDiscord<lantos> (edit) "experience," => "experience also, I" | "blogs." => "blogs but still."
12:11:12FromDiscord<lantos> (edit) "I" => "↵↵I"
12:12:01PMunchI never had Lisp in university, wish I did though :(
12:17:11FromDiscord<lantos> oh snap I found it↵https://www.youtube.com/watch?v=-J_xL4IGhJA↵1986
12:17:18FromDiscord<lantos> there you go pm xd
12:19:18FromDiscord<lantos> sent a code paste, see https://play.nim-lang.org/#ix=4824
12:25:25FromDiscord<aruZeta> is it just me who considers LISP macros to be what nim calls a template?
12:25:33FromDiscord<Generic> if professors say something which isn't correct by mathematical proof, expect it to be have been valid 20 years ago
12:28:11FromDiscord<Generic> well Lisp is mostly an interpreted language with no distinction between compile and runtime
12:28:24FromDiscord<Generic> that makes clear comparisions more difficult
12:28:33*PMunch quit (Remote host closed the connection)
12:28:48*PMunch joined #nim
12:28:57*nyeaa4 quit (Quit: Ping timeout (120 seconds))
12:29:14*nyeaa4 joined #nim
12:31:48FromDiscord<aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=482a
12:32:04FromDiscord<aruZeta> (too long I wrote some lisp, may be wrong with the ` and ,)
12:32:15FromDiscord<aruZeta> (edit) "(too long ... I" added "since"
12:32:53PMunchSimple macros, sure. Nims template system is basically just a way to create simple macros
12:33:08PMunchBut I believe Lisp also has full AST-level macros
12:33:37FromDiscord<aruZeta> oh, if it has then I didn't learn about them
12:33:38FromDiscord<aruZeta> cool
12:34:24FromDiscord<aruZeta> I have written some common lisp for fun, and the most lisp I have written is my emacs config in emacs lisp
12:35:52FromDiscord<Generic> I mean since code = data in Lisp, can't you just use a normal function to generate data which is valid code
12:35:56FromDiscord<Generic> and call that?
12:38:17FromDiscord<aruZeta> yh I know that
12:41:57FromDiscord<Generic> it was more of a question, because I don't really have any practical experience with LISP
12:42:18FromDiscord<Generic> because PMunch said, there are also AST macros
12:44:43FromDiscord<aruZeta> the AST macros in LISP idk, never seen anything like creating nnkTree's and the like
12:45:45FromDiscord<aruZeta> in lisp what a macro is is just a function which is run at compiletime and returns a list
12:46:10FromDiscord<aruZeta> (edit) "in lisp what a macro is is just a function which is run at compiletime and returns a list ... " added "which is placed where the macro was called"
12:46:48FromDiscord<aruZeta> for example, return a list which is just the declaration of a new function or whatever
12:47:12FromDiscord<lantos> In reply to @Generic "I mean since code": wait huh? are they types?
12:47:39FromDiscord<Generic> what are types?
12:48:08FromDiscord<lantos> as in ↵Type↵ Person = object↵ blah blah
12:49:24FromDiscord<aruZeta> you can have types yh
12:49:31FromDiscord<Generic> well in the classical Lisp there are only atom types (int, float, string) and lists
12:49:39FromDiscord<Generic> (edit) "string)" => "string, ...)"
12:50:03FromDiscord<lantos> In reply to @Generic "well in the classical": I like this
12:50:11FromDiscord<aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=482f
12:50:24FromDiscord<lantos> (edit) "this" => "this, although we have ended up in offtopic not main discord"
12:50:37FromDiscord<aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=482g
12:50:54FromDiscord<aruZeta> In reply to @lantos "I like this, although": yh we did lol
12:59:09*derpydoo joined #nim
13:00:58*vsantana quit (Read error: Connection reset by peer)
13:18:01*d4rckh quit (Ping timeout: 252 seconds)
13:20:21*jmd_ quit (Quit: ZNC 1.8.2 - https://znc.in)
13:22:55*jmdaemon joined #nim
13:28:09*xet7 joined #nim
13:33:53*d4rckh joined #nim
13:40:13*arkurious joined #nim
14:05:33*PMunch quit (Quit: Leaving)
14:20:57*rockcavera joined #nim
14:20:57*rockcavera quit (Changing host)
14:20:57*rockcavera joined #nim
14:49:11*kenran joined #nim
14:56:24NimEventerNew Nimble package! clipper2 - Bindings for Clipper2Lib: Polygon Clipping and Offsetting Library from Angus Johnson, see https://github.com/scemino/clipper2
14:57:25*kenran quit (Quit: WeeChat info:version)
15:22:36FromDiscord<voidwalker> Is there any lib that can be used to get something like a binary tools package manager for your program ? Something that can download/extract/update/remove various utilities that you might need to run besides your program
15:47:12*d4rckh quit ()
15:48:16*d4rckh joined #nim
15:49:34*d4rckh left #nim (#nim)
16:09:05FromDiscord<SaAnd> Why does this break? https://play.nim-lang.org/#ix=483h
16:10:16FromDiscord<SaAnd> oh sorry, even when i fix `BitSet` to be `BitSet[len: static int]`, it breaks with `cannot generate VM code for and`
16:10:33FromDiscord<SaAnd> isn't bitwise and supported in nimvm?
16:22:07FromDiscord<gibson> Anyone try running the Fidget demo on linux? I know linux is "less" supported than windows, but the demo errors out with a read from nil error in `commandsToShapes`.
16:22:35FromDiscord<gibson> @dom96 Did you have a UI lib in mind for dependency-free installer generation? My best guess is to require wxWidgets. Libs like NApp or LibUI do not support trees, which I find vital in installer configuration options for users. Thoughts?
16:22:55FromDiscord<aruZeta> In reply to @SaAnd "Why does this break?": what's the len in there?
16:23:23FromDiscord<aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=483s
16:33:38*sagax quit (Ping timeout: 248 seconds)
16:35:44FromDiscord<dom96> In reply to @gibson "<@132595483838251008> Did you have": Native Windows UI :)
16:35:58FromDiscord<Bung> sent a code paste, see https://play.nim-lang.org/#ix=483w
16:37:33FromDiscord<gibson> In reply to @dom96 "Native Windows UI :)": Yup, that would work for windows. I was hoping to come up with something that could be used for any of the platforms... but for the immediate purpose, that would totally work.
16:38:33FromDiscord<Bung> in most case only winodws need installer in some case.
16:38:52FromDiscord<gibson> most/some?
16:39:18FromDiscord<Bung> in common use case
16:40:53FromDiscord<gibson> osx could also use one, or a proper .app bundle.
16:41:16FromDiscord<Bung> but that's not a installer
16:41:40FromDiscord<gibson> an installer, or an app bundle.
16:42:27FromDiscord<Bung> yeah, but I only see few mac app use installer
16:43:52FromDiscord<gibson> GUI is required even for CMake installation on osx, where the initial "install" is just a drag'n'drop into the App library, but upon first run it walks you through modifying the path if you need (most people need). [choose]Nim would probably benefit from path modification as well.
16:44:45FromDiscord<gibson> Anyway, I think I've veered off topic. I'll go think about it.
16:46:51FromDiscord<Bung> yeah, worth it(create new installer builder) or not
16:47:23FromDiscord<Bung> In reply to @Bung "any reason compile fails": back to my problem
16:50:22FromDiscord<SaAnd> noticed it here
16:50:22FromDiscord<dom96> yeah, I don't see much point in building it for other platforms
16:50:22FromDiscord<SaAnd> yeah something like that, i also noticed that, but too late↵(@aruZeta)
16:52:21FromDiscord<gibson> In reply to @dom96 "yeah, I don't see": On that note, do you know why there is no prebuilt binary for osx, as there is for windows and linux?
16:52:42FromDiscord<dom96> no idea
16:53:17FromDiscord<aruZeta> if the prebuild binaries are made with GH actions, there may be no mac ones
16:56:05*mahlon quit (Ping timeout: 268 seconds)
16:56:53FromDiscord<Bung> prebuilt binary ? .app is plain directory
16:57:10FromDiscord<aruZeta> i have no idea how macs work
16:57:38FromDiscord<gibson> @Bung Yes, but shipping nim as a directory of source code is not that useful...
16:57:39FromDiscord<Bung> https://github.com/bung87/crowncli check this out
16:57:55FromDiscord<gibson> So I think I'll try at some point to add the GH actions for an osx build.
16:58:14FromDiscord<aruZeta> yh, if there aren't it should be made
16:58:16FromDiscord<Bung> it's my tool build app for mac and windows
16:58:44FromDiscord<Rainbow Asteroids> no README?
16:59:10FromDiscord<Bung> sorry, it's side project of a gui project
16:59:19FromDiscord<Rainbow Asteroids> No doc comments :skull
16:59:23FromDiscord<Rainbow Asteroids> (edit) ":skull" => "💀"
17:00:09FromDiscord<gibson> @Bung What is a tool build app?
17:00:37FromDiscord<Bung> https://github.com/bung87/crowngui is it for, build web base gui app
17:01:03FromDiscord<aruZeta> In reply to @gibson "<@714152700920594493> What is a": i guess it's a "build tool"
17:08:52FromDiscord<dom96> In reply to @gibson "<@714152700920594493> Yes, but shipping": choosenim will build it for you :)
17:11:18FromDiscord<gibson> Yeah, that's fantastic about Choosenim! My point is only that there needs to be a binary somewhere in a `.app` or that the bootstrapping is completely written in a script osx can understand.
17:23:51FromDiscord<David> Any libraries I should know about for making a DSL or should I be fine with just macros?
17:28:46FromDiscord<aruZeta> In reply to @David "Any libraries I should": never used it but https://github.com/PMunch/macroutils exists
17:29:14FromDiscord<Bung> +1
17:29:32FromDiscord<aruZeta> for what I saw in the readme it makes the code more readeable
17:30:45FromDiscord<aruZeta> and also the sameTree to check if your DSL is as you want it to be
17:31:42FromDiscord<David> Awesome, thanks for the info!
17:31:43FromDiscord<David> Oh the sameTree function does look really useful
17:31:43FromDiscord<Bung> I always use macros.dumpAstGen then copy past
17:32:45FromDiscord<aruZeta> also superQuote is rly useful
17:33:21FromDiscord<Bung> oh, I can't compile any nim file, compiles not out file no error
17:33:45FromDiscord<aruZeta> In reply to @Bung "any reason compile fails": that problem?
17:34:05FromDiscord<aruZeta> could you show an actual full copy paste of the terminal
17:34:13FromDiscord<aruZeta> the command used too
17:36:14FromDiscord<Bung> https://github.com/bung87/webview2 just nim c any file under src directory
17:36:48*mahlon joined #nim
17:36:50FromDiscord<Bung> I commented some code of test1.nim it compiles fine, so maybe my project source file cause that.
17:39:56FromDiscord<Bung> only syscall.nim compile, I've never seen such a problem before.
17:40:04FromDiscord<aruZeta> https://media.discordapp.net/attachments/371759389889003532/1010241753615446016/unknown.png
17:40:09FromDiscord<aruZeta> this is what I get
17:40:21FromDiscord<Bung> yeah, should nimble install -d first
17:40:36FromDiscord<aruZeta> yh ig you have some deps
17:41:44FromDiscord<Bung> winim and memlib that's all, I've installed
17:43:22FromDiscord<aruZeta> hmm
17:43:25FromDiscord<aruZeta> take a look
17:43:28FromDiscord<aruZeta> https://media.discordapp.net/attachments/371759389889003532/1010242610788565002/unknown.png
17:43:35FromDiscord<aruZeta> it segfaults
17:44:08FromDiscord<Bung> ah, segfaults when compile , I have no idea.
17:44:31FromDiscord<aruZeta> ig your terminal does not tell you
17:44:39FromDiscord<Bung> you are on linux ?
17:44:45FromDiscord<aruZeta> yh
17:45:18FromDiscord<Bung> the project is for windows
17:45:37FromDiscord<aruZeta> winim suggest its something for nim
17:45:41FromDiscord<aruZeta> so yh ik
17:46:18FromDiscord<aruZeta> but anyway (just guessing) I should get an error like I don't have some dep from windows, not a segfault
17:46:56FromDiscord<aruZeta> so your code, when compiled, segfaults
17:47:15FromDiscord<aruZeta> are you using any macro or smth run at compiletime?
17:47:21FromDiscord<Bung> that logic usually handle in code
17:47:57FromDiscord<Bung> memlib does
17:48:24FromDiscord<Bung> there's `staticReadDll`
17:56:51FromDiscord<Bung> maybe some ilegall code will cause this.
17:58:13*vicecea quit (Remote host closed the connection)
18:00:43*vicecea joined #nim
19:06:31*toluene joined #nim
19:13:30*sagax joined #nim
19:33:52FromDiscord<Felipe Lavratti> helps! ↵how to check if a file exists at compile time?
19:34:22FromDiscord<Felipe Lavratti> (I am experimenting with writing a compile time "import injection" thing)
19:35:35*kenran joined #nim
19:40:16FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=484A
19:43:11FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=484B
19:46:25FromDiscord<Sabena Sema> wait are new style concepts actually implemented?
19:50:42FromDiscord<Felipe Lavratti> thank you!
19:51:29FromDiscord<Felipe Lavratti> sent a code paste, see https://play.nim-lang.org/#ix=484F
19:51:35FromDiscord<Felipe Lavratti> sent a code paste, see https://play.nim-lang.org/#ix=484G
19:51:54FromDiscord<!Patitotective> you're not passing arg
19:52:00FromDiscord<Felipe Lavratti> (edit) "https://play.nim-lang.org/#ix=484F" => "https://play.nim-lang.org/#ix=484H"
19:52:30FromDiscord<Felipe Lavratti> what do you mean ?
19:54:23FromDiscord<!Patitotective> not sure why
19:54:33FromDiscord<Felipe Lavratti> gotcha tabks!
19:54:41FromDiscord<Felipe Lavratti> (edit) "tabks!" => "thanks!"
19:55:19FromDiscord<Phil> In reply to @Sabena Sema "wait are new style": I don't think I understand your question, what style concepts?↵There is the `concepts` feature and there is stuff regarding style e.g. `style insensitivity`, but `style concepts` don't ring a bell
19:57:25FromDiscord<enthus1ast> he's talking about New-style concepts
19:57:42FromDiscord<enthus1ast> https://github.com/nim-lang/Nim/pull/15251
19:58:16FromDiscord<enthus1ast> i do not know how they differ from the old style concepts to be honest
19:58:57FromDiscord<Phil> Strong start in that PR: Merged, but the first post says "Don't merge yet" with an incomplete todo list 😄
19:59:36FromDiscord<Phil> Also, from what I'm seeing surprisingly few people like commit messages
20:00:22FromDiscord<Phil> So basically it's about being able to use concepts as proc param types?
20:01:13FromDiscord<enthus1ast> they define what a type must be capable of to be a param for the proc
20:01:24FromDiscord<enthus1ast> and what functions etc must be implemented
20:02:10FromDiscord<Phil> Isn't that just the definition of what concepts are?
20:02:28FromDiscord<enthus1ast> yeah guess yes \:)
20:08:29FromDiscord<Sabena Sema> In reply to @Isofruit "I don't think I": old style concepts are a zah feature, and they work essentially exactly like C++ concepts. New style ones are simpler and more like haskell typeclasses or rust traits
20:31:31*wallabra quit (Ping timeout: 248 seconds)
20:35:23FromDiscord<enthus1ast> what exactly do i get, when i `choosenim devel` ?
20:35:32FromDiscord<Elegantbeef> Nightly build
20:35:35FromDiscord<enthus1ast> ah
20:50:07FromDiscord<pruno> sent a code paste, see https://play.nim-lang.org/#ix=4851
20:50:32FromDiscord<pruno> (i know my code is not 'valid', it's just a short extract example)
20:51:51*kenran quit (Quit: WeeChat info:version)
20:54:07FromDiscord<enthus1ast> found this https://stackoverflow.com/questions/10486116/what-does-this-gcc-error-relocation-truncated-to-fit-mean
20:56:54FromDiscord<pruno> Ah, i saw that post previously but indeed, there was a little option that i did not see in one of the responses, thanks lol
21:08:36FromDiscord<demotomohiro> Maybe you need to use rax register instead of eax if you are compiling it for x86_64.
21:12:10FromDiscord<aruZeta> yep, eax is for 32 bits
21:13:35FromDiscord<pruno> Same error when using the rax register
21:13:43FromDiscord<pruno> (compiling for 64 bits indeed)
21:14:30FromDiscord<pruno> Passing the following options `--passL:-Wl,--image-base --passL:-Wl,0x10000000`
21:14:44FromDiscord<pruno> (edit) "Passing the following options `--passL:-Wl,--image-base --passL:-Wl,0x10000000` ... " added "make it work, not entirely sure why the image base needs to be set manually"
21:14:48FromDiscord<aruZeta> what if myVar is a int?
21:14:54FromDiscord<aruZeta> yours is a string
21:15:39FromDiscord<aruZeta> although idk if it's passing the pointer of the string
21:15:45FromDiscord<aruZeta> (edit) "although idk if it's ... passing" added "actually"
21:15:47*xet7 quit (Ping timeout: 252 seconds)
21:16:50FromDiscord<pruno> Actually, in my code, it's of type `WORD`, maybe i need to use a `DWORD` or even `DWORD64` ?
21:18:24FromDiscord<aruZeta> maybe
21:18:44FromDiscord<aruZeta> haven't actually tried asm in nim so sry to not be of help 😅
21:19:02FromDiscord<pruno> No probs, gives me some ideas on what could be wrong, thanks :)
21:19:13FromDiscord<aruZeta> (and I have only touched 32 bit asm anyway)
21:20:59FromDiscord<pruno> Well, eax is the 32 bits part of rax, so from my point of view it should not be an issue, but maybe the compiler actually treats it as en error
21:21:05FromDiscord<pruno> (edit) "en" => "an"
21:21:23FromDiscord<pruno> As it will fill the first 32 fist bits of rax
21:23:47FromDiscord<aruZeta> if you are storing a word (16 bits) in eax there should be no problem
21:24:01FromDiscord<aruZeta> so idk
21:28:21FromDiscord<demotomohiro> Doesnt gcc uses AT&T/UNIX assemble syntax?↵http://tuttlem.github.io/2014/03/25/assembly-syntax-intel-at-t.html
21:32:21FromDiscord<pruno> passing `-masm=intel` makes it use intel syntas
21:32:23FromDiscord<pruno> (edit) "syntas" => "syntax"
21:33:46FromDiscord<aruZeta> i have written 32 bits asm using the "Intel code" syntax in linux, compiling with `nasm -f elf32`
21:35:35FromDiscord<aruZeta> @pruno maybe you need to specify `mov word eax, `val``
21:35:52FromDiscord<aruZeta> (edit) "https://play.nim-lang.org/#ix=4858" => "https://paste.rs/XCo"
21:35:53FromDiscord<aruZeta> (edit) "@pruno maybe you need to specify `mov word eax, `val``" => "sent a code paste, see https://paste.rs/fgq"
21:36:08FromDiscord<aruZeta> (edit) "https://play.nim-lang.org/#ix=485a" => "https://play.nim-lang.org/#ix=4859"
21:36:38FromDiscord<aruZeta> (edit)
21:36:59FromDiscord<aruZeta> (edit) "https://play.nim-lang.org/#ix=4859" => "https://play.nim-lang.org/#ix=485b"
21:40:03FromDiscord<pruno> And this does not work
21:40:04FromDiscord<pruno> sent a code paste, see https://play.nim-lang.org/#ix=485c
21:40:21FromDiscord<pruno> (edit) "https://play.nim-lang.org/#ix=485c" => "https://play.nim-lang.org/#ix=485d"
21:41:53FromDiscord<pruno> sent a code paste, see https://play.nim-lang.org/#ix=485f
21:43:23FromDiscord<aruZeta> In reply to @pruno "This is not valid": i think the ptr is not neccessary
21:44:56FromDiscord<Generic> `xor eax, eax`
21:45:12FromDiscord<aruZeta> that will make eax = 0
21:45:28FromDiscord<aruZeta> "cleaning" it
21:45:31FromDiscord<Generic> ah yeah, I'm too tired to still write things
21:45:45FromDiscord<aruZeta> happens to all of us lol
21:46:59*derpydoo quit (Ping timeout: 244 seconds)
22:40:03*wallabra joined #nim
22:44:59FromDiscord<EyeCon> How do I debug matrix-nim-sdk? It gives me a `[MatrixError:ObjectType]` which is as unhelpful as it gets.
22:45:28FromDiscord<Elegantbeef> tandy\: ^ 😄
22:47:48FromDiscord<Rainbow Asteroids> Here's your typedef https://media.discordapp.net/attachments/371759389889003532/1010319198213378048/Screenshot_20220819-184714.png
22:47:55FromDiscord<Elegantbeef> I think the issue is that presently the sdk doesnt properly raise errors, but dont recall
22:49:58FromDiscord<EyeCon> I'mma go insert `echo`s everywhere
22:50:16FromDiscord<Elegantbeef> You do that
22:50:47FromDiscord<EyeCon> sent a code paste, see https://play.nim-lang.org/#ix=485t
22:50:58FromDiscord<EyeCon> So I could catch and then print the message properly, it seems
22:51:04FromDiscord<EyeCon> Let's try that first
22:51:19FromDiscord<Elegantbeef> Yea though would be smarter if it just had Errors per each errorcode i imagine
22:51:43FromDiscord<Elegantbeef> That way you can bubble up specific errors when you want them
22:53:00FromDiscord<EyeCon> That's the dream... Let me tackle the first step of understanding what went wrong first
22:53:42FromDiscord<EyeCon> sent a code paste, see https://play.nim-lang.org/#ix=485v
22:53:55FromDiscord<Rainbow Asteroids> 5xx :)
22:54:17FromDiscord<EyeCon> Apparently
22:54:24FromDiscord<EyeCon> Why can I login with everything else then
22:54:43FromDiscord<EyeCon> This will end up being a dumb mistake, won't it
22:54:54FromDiscord<Elegantbeef> Quite possibly
22:55:55FromDiscord<Rainbow Asteroids> What are the error codes?
22:56:18FromDiscord<Elegantbeef> I imagine they're not request error codes, but matrix specificed error codes
22:56:22FromDiscord<Elegantbeef> But i really dont know the matrix spec
22:58:29FromDiscord<EyeCon> The M_UNKNOWN is supposed to be the error returned in the protocol, but seeing that Internal server error I'm not that sure about it
22:59:26FromDiscord<EyeCon> Yes, it is a dumb mistake
22:59:29FromDiscord<EyeCon> Aaaaargh
23:01:15FromDiscord<EyeCon> Correction: at least 1
23:01:44FromDiscord<Rainbow Asteroids> programming: the art of creating and finding dumb mistakes
23:02:47FromDiscord<EyeCon> Yes! I'll proceed to beer-supported rubber duck debugging in a minute - the heavy weapons
23:03:46FromDiscord<EyeCon> Total # of dumb mistakes: 2, it connects now at least
23:04:37FromDiscord<EyeCon> This experience taught me that some matrix servers really do not like empty passwords to the point of responding 500s to them
23:19:55FromDiscord<EyeCon> sent a code paste, see https://play.nim-lang.org/#ix=485D
23:37:35FromDiscord<EyeCon> After entering my credentials, the package tests fail too, I think this time it's not me
23:38:00FromDiscord<EyeCon> So I can perform a whoAmI but lot a login
23:38:04FromDiscord<EyeCon> (edit) "lot" => "not"
23:39:19FromDiscord<Rainbow Asteroids> maybe you should open an issue
23:39:59FromDiscord<EyeCon> After making extra sure that it's not me 🙂
23:52:30FromDiscord<Elegantbeef> I've got login to worrk and a list of my joined channels
23:53:53FromDiscord<EyeCon> sent a code paste, see https://play.nim-lang.org/#ix=485J
23:54:05FromDiscord<Elegantbeef> Want me to just send my "working" client
23:54:13FromDiscord<EyeCon> That is even better, sure
23:54:21FromDiscord<Elegantbeef> dodger.tar.xz https://media.discordapp.net/attachments/371759389889003532/1010335947176542318/dodger.tar.xz
23:54:34FromDiscord<Elegantbeef> Really should throw it on a repo but it's mostly dumb code
23:57:33FromDiscord<EyeCon> Thank you! That's what I'm doing, the only part that remains to be checked is in which format you're entering the userId