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:54 | madprops | jakt is looking interesting |
00:44:01 | madprops | https://github.com/adleroliveira/jaktboy/tree/main/src |
00:48:41 | FromDiscord | <!Patitotective> In reply to @madprops "jakt is looking interesting": it looks like a less ugly c++ but still ugly↵js like syntax |
00:49:08 | FromDiscord | <Elegantbeef> It's atleast better than C++ |
00:49:22 | FromDiscord | <Elegantbeef> But like this is just.... yea https://github.com/adleroliveira/jaktboy/blob/main/src/mmu.jakt#L63-L121 |
00:50:14 | FromDiscord | <!Patitotective> hahah, case statements are useless they said |
00:50:16 | FromDiscord | <Elegantbeef> Range based switch statements anyone 😄 |
00:54:02 | FromDiscord | <!&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:01 | NimEventer | New thread by Archnim: Math graphics in Nim, see https://forum.nim-lang.org/t/9391 |
02:36:19 | FromDiscord | <proton> Does '\u0001' present signal bit of 1? |
02:59:53 | FromDiscord | <Prestige> What? |
03:00:29 | FromDiscord | <Rika> No it represents the first Unicode code point iirc |
03:02:22 | FromDiscord | <!Patitotective> DLE https://media.discordapp.net/attachments/371759389889003532/1010020874465845310/unknown.png |
03:05:06 | FromDiscord | <!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:59 | FromDiscord | <!&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:21 | FromDiscord | <Elegantbeef> You're describing a table |
04:32:38 | FromDiscord | <Elegantbeef> A table and a count table |
04:33:14 | FromDiscord | <!&luke> What |
04:33:34 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/tables.html#basic-usage-counttable |
04:35:35 | FromDiscord | <!&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:20 | FromDiscord | <Rika> What? |
04:38:49 | FromDiscord | <Rainbow Asteroids> sent a code paste, see https://play.nim-lang.org/#ix=4801 |
04:42:02 | FromDiscord | <Rainbow Asteroids> (you can replace the index with any hashable type and the value with any type) |
04:42:21 | FromDiscord | <Rika> You can make custom types hashable as well |
04:45:11 | FromDiscord | <!&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:39 | FromDiscord | <Zectbumo> how would I make a template named `echos` to call `echo` and put a space between every argument? |
07:15:32 | FromDiscord | <Elegantbeef> Dont need a template |
07:15:42 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/0WK |
07:17:36 | FromDiscord | <Zectbumo> hmm, okay |
07:18:30 | FromDiscord | <Elegantbeef> that `$arg` is redundant |
07:18:37 | FromDiscord | <Elegantbeef> `arg` is sufficient |
07:19:11 | FromDiscord | <Zectbumo> ah right because the varargs already $ for you |
07:19:51 | madprops | i ended up not making rumsfeld |
07:20:10 | madprops | i was going to make a qt thing to select files and count lines of the selected files |
07:20:16 | madprops | but it was a mess |
07:20:31 | madprops | who needs to count lines anyway |
07:21:07 | madprops | my next approach would be have a file and specify the files there |
07:21:12 | madprops | makes more sense, since it can be repeated easily |
07:22:13 | madprops | like the opposite of a .gitignore |
08:21:23 | FromDiscord | <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:31 | FromDiscord | <nocturn9x> man we need to get rid of the refc gc ASAP |
08:41:35 | FromDiscord | <nocturn9x> it has more bugs than features |
08:41:36 | * | rockcavera quit (Remote host closed the connection) |
08:41:56 | FromDiscord | <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:31 | FromDiscord | <Elegantbeef> Cant say i've ever had that happen |
08:42:59 | FromDiscord | <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:50 | NimEventer | New thread by Void09: How to draw images on collectionView elements (rects), with nimx ?, see https://forum.nim-lang.org/t/9392 |
09:19:43 | FromDiscord | <lantos> In reply to @m4ul3r "Were you ever able": I got really close |
09:20:35 | FromDiscord | <lantos> (edit) "close" => "close↵https://github.com/lantos-lgtm/nim_docker_api" |
09:21:10 | FromDiscord | <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:50 | PMunch | Oooh, I wonder if this can be used for the playground |
09:34:04 | FromDiscord | <lantos> was actually going to message you on that, something I'm working on |
09:34:09 | FromDiscord | <lantos> (edit) "was actually going to message you on that, something I'm working on ... " added "(was)" |
09:34:35 | FromDiscord | <lantos> (edit) "(was)" => "(was :()" |
09:35:28 | FromDiscord | <lantos> (edit) ":()" => "😦 )" |
09:35:39 | FromDiscord | <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:49 | FromDiscord | <lantos> (edit) "approach" => "re-approach" |
09:36:02 | FromDiscord | <enthus1ast> you transpile ts? \:) crazy |
09:36:14 | FromDiscord | <lantos> hahaha |
09:37:04 | FromDiscord | <lantos> (edit) "hahaha" => "hahaha, don't judge me xd. just trying to get to a solution faster" |
09:37:41 | FromDiscord | <enthus1ast> no not judging |
09:38:07 | FromDiscord | <enthus1ast> i mean, winim is created from msdn website afaik |
09:39:48 | FromDiscord | <lantos> what I was trying to do was expose the functions to typescript via some sort of RPC/API. |
09:40:04 | FromDiscord | <lantos> (edit) "RPC/API." => "RPC/API to be consumed on a FE." |
09:40:29 | FromDiscord | <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:59 | PMunch | I mean the commands used by the playground are pretty few, I think there are like three commands in total |
10:10:36 | FromDiscord | <dom96> just use json :) |
10:11:16 | madprops | i started to use yaml |
10:11:24 | madprops | for configs that are meant to be edited by hand |
10:11:41 | madprops | json is bad for that |
10:25:41 | FromDiscord | <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:47 | FromDiscord | <lantos> In reply to @madprops "i started to use": also this |
10:26:06 | FromDiscord | <lantos> (edit) "In reply to @madprops "i started to use": also this ... " added "is a good point" |
10:39:07 | FromDiscord | <lantos> sent a code paste, see https://play.nim-lang.org/#ix=481h |
10:39:40 | FromDiscord | <lantos> (edit) "https://play.nim-lang.org/#ix=481h" => "https://play.nim-lang.org/#ix=481i" |
10:40:47 | FromDiscord | <lantos> (edit) "https://play.nim-lang.org/#ix=481i" => "https://play.nim-lang.org/#ix=481l" |
10:41:06 | FromDiscord | <lantos> (edit) "https://play.nim-lang.org/#ix=481l" => "https://play.nim-lang.org/#ix=481n" |
10:54:15 | * | vsantana joined #nim |
11:22:45 | FromDiscord | <ShalokShalom> Whats the secret behind Nim`s macro system? |
11:23:23 | FromDiscord | <ShalokShalom> If it doesnt mutate the language itself, as Lisp does, how else does it achieve its flexibility? |
11:30:05 | FromDiscord | <aruZeta> macro's change the AST |
11:30:39 | FromDiscord | <aruZeta> template's are more like what LISP calls a macro |
11:30:47 | FromDiscord | <aruZeta> (edit) "template's" => "templates" |
11:30:52 | FromDiscord | <aruZeta> (edit) "macro's" => "macros" |
11:36:29 | FromDiscord | <ShalokShalom> but nim has no homoiconicity, so there cant be anything like in lisp |
11:36:43 | FromDiscord | <ShalokShalom> so there is no special secret behind your macros? |
11:36:50 | FromDiscord | <ShalokShalom> they are just doing, what all the macros do? |
11:37:20 | FromDiscord | <Generic> macros are just a function evaluated at compile time producing an AST |
11:38:11 | FromDiscord | <Generic> I think one special thing about Nim is how much is allowed at compile time |
11:38:59 | FromDiscord | <Generic> like constexpr in C++ is getting better with every revision, but it's still behind Nim's compile time capabilities |
11:39:25 | FromDiscord | <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:46 | PMunch | Nim 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:51 | PMunch | That's really all there is to it |
11:52:34 | * | d4rckh joined #nim |
12:00:49 | FromDiscord | <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:03 | FromDiscord | <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:54 | FromDiscord | <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:05 | FromDiscord | <lantos> (edit) "experience," => "experience also, I" | "blogs." => "blogs but still." |
12:11:12 | FromDiscord | <lantos> (edit) "I" => "↵↵I" |
12:12:01 | PMunch | I never had Lisp in university, wish I did though :( |
12:17:11 | FromDiscord | <lantos> oh snap I found it↵https://www.youtube.com/watch?v=-J_xL4IGhJA↵1986 |
12:17:18 | FromDiscord | <lantos> there you go pm xd |
12:19:18 | FromDiscord | <lantos> sent a code paste, see https://play.nim-lang.org/#ix=4824 |
12:25:25 | FromDiscord | <aruZeta> is it just me who considers LISP macros to be what nim calls a template? |
12:25:33 | FromDiscord | <Generic> if professors say something which isn't correct by mathematical proof, expect it to be have been valid 20 years ago |
12:28:11 | FromDiscord | <Generic> well Lisp is mostly an interpreted language with no distinction between compile and runtime |
12:28:24 | FromDiscord | <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:48 | FromDiscord | <aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=482a |
12:32:04 | FromDiscord | <aruZeta> (too long I wrote some lisp, may be wrong with the ` and ,) |
12:32:15 | FromDiscord | <aruZeta> (edit) "(too long ... I" added "since" |
12:32:53 | PMunch | Simple macros, sure. Nims template system is basically just a way to create simple macros |
12:33:08 | PMunch | But I believe Lisp also has full AST-level macros |
12:33:37 | FromDiscord | <aruZeta> oh, if it has then I didn't learn about them |
12:33:38 | FromDiscord | <aruZeta> cool |
12:34:24 | FromDiscord | <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:52 | FromDiscord | <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:56 | FromDiscord | <Generic> and call that? |
12:38:17 | FromDiscord | <aruZeta> yh I know that |
12:41:57 | FromDiscord | <Generic> it was more of a question, because I don't really have any practical experience with LISP |
12:42:18 | FromDiscord | <Generic> because PMunch said, there are also AST macros |
12:44:43 | FromDiscord | <aruZeta> the AST macros in LISP idk, never seen anything like creating nnkTree's and the like |
12:45:45 | FromDiscord | <aruZeta> in lisp what a macro is is just a function which is run at compiletime and returns a list |
12:46:10 | FromDiscord | <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:48 | FromDiscord | <aruZeta> for example, return a list which is just the declaration of a new function or whatever |
12:47:12 | FromDiscord | <lantos> In reply to @Generic "I mean since code": wait huh? are they types? |
12:47:39 | FromDiscord | <Generic> what are types? |
12:48:08 | FromDiscord | <lantos> as in ↵Type↵ Person = object↵ blah blah |
12:49:24 | FromDiscord | <aruZeta> you can have types yh |
12:49:31 | FromDiscord | <Generic> well in the classical Lisp there are only atom types (int, float, string) and lists |
12:49:39 | FromDiscord | <Generic> (edit) "string)" => "string, ...)" |
12:50:03 | FromDiscord | <lantos> In reply to @Generic "well in the classical": I like this |
12:50:11 | FromDiscord | <aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=482f |
12:50:24 | FromDiscord | <lantos> (edit) "this" => "this, although we have ended up in offtopic not main discord" |
12:50:37 | FromDiscord | <aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=482g |
12:50:54 | FromDiscord | <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:24 | NimEventer | New 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:36 | FromDiscord | <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:05 | FromDiscord | <SaAnd> Why does this break? https://play.nim-lang.org/#ix=483h |
16:10:16 | FromDiscord | <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:33 | FromDiscord | <SaAnd> isn't bitwise and supported in nimvm? |
16:22:07 | FromDiscord | <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:35 | FromDiscord | <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:55 | FromDiscord | <aruZeta> In reply to @SaAnd "Why does this break?": what's the len in there? |
16:23:23 | FromDiscord | <aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=483s |
16:33:38 | * | sagax quit (Ping timeout: 248 seconds) |
16:35:44 | FromDiscord | <dom96> In reply to @gibson "<@132595483838251008> Did you have": Native Windows UI :) |
16:35:58 | FromDiscord | <Bung> sent a code paste, see https://play.nim-lang.org/#ix=483w |
16:37:33 | FromDiscord | <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:33 | FromDiscord | <Bung> in most case only winodws need installer in some case. |
16:38:52 | FromDiscord | <gibson> most/some? |
16:39:18 | FromDiscord | <Bung> in common use case |
16:40:53 | FromDiscord | <gibson> osx could also use one, or a proper .app bundle. |
16:41:16 | FromDiscord | <Bung> but that's not a installer |
16:41:40 | FromDiscord | <gibson> an installer, or an app bundle. |
16:42:27 | FromDiscord | <Bung> yeah, but I only see few mac app use installer |
16:43:52 | FromDiscord | <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:45 | FromDiscord | <gibson> Anyway, I think I've veered off topic. I'll go think about it. |
16:46:51 | FromDiscord | <Bung> yeah, worth it(create new installer builder) or not |
16:47:23 | FromDiscord | <Bung> In reply to @Bung "any reason compile fails": back to my problem |
16:50:22 | FromDiscord | <SaAnd> noticed it here |
16:50:22 | FromDiscord | <dom96> yeah, I don't see much point in building it for other platforms |
16:50:22 | FromDiscord | <SaAnd> yeah something like that, i also noticed that, but too late↵(@aruZeta) |
16:52:21 | FromDiscord | <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:42 | FromDiscord | <dom96> no idea |
16:53:17 | FromDiscord | <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:53 | FromDiscord | <Bung> prebuilt binary ? .app is plain directory |
16:57:10 | FromDiscord | <aruZeta> i have no idea how macs work |
16:57:38 | FromDiscord | <gibson> @Bung Yes, but shipping nim as a directory of source code is not that useful... |
16:57:39 | FromDiscord | <Bung> https://github.com/bung87/crowncli check this out |
16:57:55 | FromDiscord | <gibson> So I think I'll try at some point to add the GH actions for an osx build. |
16:58:14 | FromDiscord | <aruZeta> yh, if there aren't it should be made |
16:58:16 | FromDiscord | <Bung> it's my tool build app for mac and windows |
16:58:44 | FromDiscord | <Rainbow Asteroids> no README? |
16:59:10 | FromDiscord | <Bung> sorry, it's side project of a gui project |
16:59:19 | FromDiscord | <Rainbow Asteroids> No doc comments :skull |
16:59:23 | FromDiscord | <Rainbow Asteroids> (edit) ":skull" => "💀" |
17:00:09 | FromDiscord | <gibson> @Bung What is a tool build app? |
17:00:37 | FromDiscord | <Bung> https://github.com/bung87/crowngui is it for, build web base gui app |
17:01:03 | FromDiscord | <aruZeta> In reply to @gibson "<@714152700920594493> What is a": i guess it's a "build tool" |
17:08:52 | FromDiscord | <dom96> In reply to @gibson "<@714152700920594493> Yes, but shipping": choosenim will build it for you :) |
17:11:18 | FromDiscord | <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:51 | FromDiscord | <David> Any libraries I should know about for making a DSL or should I be fine with just macros? |
17:28:46 | FromDiscord | <aruZeta> In reply to @David "Any libraries I should": never used it but https://github.com/PMunch/macroutils exists |
17:29:14 | FromDiscord | <Bung> +1 |
17:29:32 | FromDiscord | <aruZeta> for what I saw in the readme it makes the code more readeable |
17:30:45 | FromDiscord | <aruZeta> and also the sameTree to check if your DSL is as you want it to be |
17:31:42 | FromDiscord | <David> Awesome, thanks for the info! |
17:31:43 | FromDiscord | <David> Oh the sameTree function does look really useful |
17:31:43 | FromDiscord | <Bung> I always use macros.dumpAstGen then copy past |
17:32:45 | FromDiscord | <aruZeta> also superQuote is rly useful |
17:33:21 | FromDiscord | <Bung> oh, I can't compile any nim file, compiles not out file no error |
17:33:45 | FromDiscord | <aruZeta> In reply to @Bung "any reason compile fails": that problem? |
17:34:05 | FromDiscord | <aruZeta> could you show an actual full copy paste of the terminal |
17:34:13 | FromDiscord | <aruZeta> the command used too |
17:36:14 | FromDiscord | <Bung> https://github.com/bung87/webview2 just nim c any file under src directory |
17:36:48 | * | mahlon joined #nim |
17:36:50 | FromDiscord | <Bung> I commented some code of test1.nim it compiles fine, so maybe my project source file cause that. |
17:39:56 | FromDiscord | <Bung> only syscall.nim compile, I've never seen such a problem before. |
17:40:04 | FromDiscord | <aruZeta> https://media.discordapp.net/attachments/371759389889003532/1010241753615446016/unknown.png |
17:40:09 | FromDiscord | <aruZeta> this is what I get |
17:40:21 | FromDiscord | <Bung> yeah, should nimble install -d first |
17:40:36 | FromDiscord | <aruZeta> yh ig you have some deps |
17:41:44 | FromDiscord | <Bung> winim and memlib that's all, I've installed |
17:43:22 | FromDiscord | <aruZeta> hmm |
17:43:25 | FromDiscord | <aruZeta> take a look |
17:43:28 | FromDiscord | <aruZeta> https://media.discordapp.net/attachments/371759389889003532/1010242610788565002/unknown.png |
17:43:35 | FromDiscord | <aruZeta> it segfaults |
17:44:08 | FromDiscord | <Bung> ah, segfaults when compile , I have no idea. |
17:44:31 | FromDiscord | <aruZeta> ig your terminal does not tell you |
17:44:39 | FromDiscord | <Bung> you are on linux ? |
17:44:45 | FromDiscord | <aruZeta> yh |
17:45:18 | FromDiscord | <Bung> the project is for windows |
17:45:37 | FromDiscord | <aruZeta> winim suggest its something for nim |
17:45:41 | FromDiscord | <aruZeta> so yh ik |
17:46:18 | FromDiscord | <aruZeta> but anyway (just guessing) I should get an error like I don't have some dep from windows, not a segfault |
17:46:56 | FromDiscord | <aruZeta> so your code, when compiled, segfaults |
17:47:15 | FromDiscord | <aruZeta> are you using any macro or smth run at compiletime? |
17:47:21 | FromDiscord | <Bung> that logic usually handle in code |
17:47:57 | FromDiscord | <Bung> memlib does |
17:48:24 | FromDiscord | <Bung> there's `staticReadDll` |
17:56:51 | FromDiscord | <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:52 | FromDiscord | <Felipe Lavratti> helps! ↵how to check if a file exists at compile time? |
19:34:22 | FromDiscord | <Felipe Lavratti> (I am experimenting with writing a compile time "import injection" thing) |
19:35:35 | * | kenran joined #nim |
19:40:16 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=484A |
19:43:11 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=484B |
19:46:25 | FromDiscord | <Sabena Sema> wait are new style concepts actually implemented? |
19:50:42 | FromDiscord | <Felipe Lavratti> thank you! |
19:51:29 | FromDiscord | <Felipe Lavratti> sent a code paste, see https://play.nim-lang.org/#ix=484F |
19:51:35 | FromDiscord | <Felipe Lavratti> sent a code paste, see https://play.nim-lang.org/#ix=484G |
19:51:54 | FromDiscord | <!Patitotective> you're not passing arg |
19:52:00 | FromDiscord | <Felipe Lavratti> (edit) "https://play.nim-lang.org/#ix=484F" => "https://play.nim-lang.org/#ix=484H" |
19:52:30 | FromDiscord | <Felipe Lavratti> what do you mean ? |
19:54:23 | FromDiscord | <!Patitotective> not sure why |
19:54:33 | FromDiscord | <Felipe Lavratti> gotcha tabks! |
19:54:41 | FromDiscord | <Felipe Lavratti> (edit) "tabks!" => "thanks!" |
19:55:19 | FromDiscord | <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:25 | FromDiscord | <enthus1ast> he's talking about New-style concepts |
19:57:42 | FromDiscord | <enthus1ast> https://github.com/nim-lang/Nim/pull/15251 |
19:58:16 | FromDiscord | <enthus1ast> i do not know how they differ from the old style concepts to be honest |
19:58:57 | FromDiscord | <Phil> Strong start in that PR: Merged, but the first post says "Don't merge yet" with an incomplete todo list 😄 |
19:59:36 | FromDiscord | <Phil> Also, from what I'm seeing surprisingly few people like commit messages |
20:00:22 | FromDiscord | <Phil> So basically it's about being able to use concepts as proc param types? |
20:01:13 | FromDiscord | <enthus1ast> they define what a type must be capable of to be a param for the proc |
20:01:24 | FromDiscord | <enthus1ast> and what functions etc must be implemented |
20:02:10 | FromDiscord | <Phil> Isn't that just the definition of what concepts are? |
20:02:28 | FromDiscord | <enthus1ast> yeah guess yes \:) |
20:08:29 | FromDiscord | <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:23 | FromDiscord | <enthus1ast> what exactly do i get, when i `choosenim devel` ? |
20:35:32 | FromDiscord | <Elegantbeef> Nightly build |
20:35:35 | FromDiscord | <enthus1ast> ah |
20:50:07 | FromDiscord | <pruno> sent a code paste, see https://play.nim-lang.org/#ix=4851 |
20:50:32 | FromDiscord | <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:07 | FromDiscord | <enthus1ast> found this https://stackoverflow.com/questions/10486116/what-does-this-gcc-error-relocation-truncated-to-fit-mean |
20:56:54 | FromDiscord | <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:36 | FromDiscord | <demotomohiro> Maybe you need to use rax register instead of eax if you are compiling it for x86_64. |
21:12:10 | FromDiscord | <aruZeta> yep, eax is for 32 bits |
21:13:35 | FromDiscord | <pruno> Same error when using the rax register |
21:13:43 | FromDiscord | <pruno> (compiling for 64 bits indeed) |
21:14:30 | FromDiscord | <pruno> Passing the following options `--passL:-Wl,--image-base --passL:-Wl,0x10000000` |
21:14:44 | FromDiscord | <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:48 | FromDiscord | <aruZeta> what if myVar is a int? |
21:14:54 | FromDiscord | <aruZeta> yours is a string |
21:15:39 | FromDiscord | <aruZeta> although idk if it's passing the pointer of the string |
21:15:45 | FromDiscord | <aruZeta> (edit) "although idk if it's ... passing" added "actually" |
21:15:47 | * | xet7 quit (Ping timeout: 252 seconds) |
21:16:50 | FromDiscord | <pruno> Actually, in my code, it's of type `WORD`, maybe i need to use a `DWORD` or even `DWORD64` ? |
21:18:24 | FromDiscord | <aruZeta> maybe |
21:18:44 | FromDiscord | <aruZeta> haven't actually tried asm in nim so sry to not be of help 😅 |
21:19:02 | FromDiscord | <pruno> No probs, gives me some ideas on what could be wrong, thanks :) |
21:19:13 | FromDiscord | <aruZeta> (and I have only touched 32 bit asm anyway) |
21:20:59 | FromDiscord | <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:05 | FromDiscord | <pruno> (edit) "en" => "an" |
21:21:23 | FromDiscord | <pruno> As it will fill the first 32 fist bits of rax |
21:23:47 | FromDiscord | <aruZeta> if you are storing a word (16 bits) in eax there should be no problem |
21:24:01 | FromDiscord | <aruZeta> so idk |
21:28:21 | FromDiscord | <demotomohiro> Doesnt gcc uses AT&T/UNIX assemble syntax?↵http://tuttlem.github.io/2014/03/25/assembly-syntax-intel-at-t.html |
21:32:21 | FromDiscord | <pruno> passing `-masm=intel` makes it use intel syntas |
21:32:23 | FromDiscord | <pruno> (edit) "syntas" => "syntax" |
21:33:46 | FromDiscord | <aruZeta> i have written 32 bits asm using the "Intel code" syntax in linux, compiling with `nasm -f elf32` |
21:35:35 | FromDiscord | <aruZeta> @pruno maybe you need to specify `mov word eax, `val`` |
21:35:52 | FromDiscord | <aruZeta> (edit) "https://play.nim-lang.org/#ix=4858" => "https://paste.rs/XCo" |
21:35:53 | FromDiscord | <aruZeta> (edit) "@pruno maybe you need to specify `mov word eax, `val``" => "sent a code paste, see https://paste.rs/fgq" |
21:36:08 | FromDiscord | <aruZeta> (edit) "https://play.nim-lang.org/#ix=485a" => "https://play.nim-lang.org/#ix=4859" |
21:36:38 | FromDiscord | <aruZeta> (edit) |
21:36:59 | FromDiscord | <aruZeta> (edit) "https://play.nim-lang.org/#ix=4859" => "https://play.nim-lang.org/#ix=485b" |
21:40:03 | FromDiscord | <pruno> And this does not work |
21:40:04 | FromDiscord | <pruno> sent a code paste, see https://play.nim-lang.org/#ix=485c |
21:40:21 | FromDiscord | <pruno> (edit) "https://play.nim-lang.org/#ix=485c" => "https://play.nim-lang.org/#ix=485d" |
21:41:53 | FromDiscord | <pruno> sent a code paste, see https://play.nim-lang.org/#ix=485f |
21:43:23 | FromDiscord | <aruZeta> In reply to @pruno "This is not valid": i think the ptr is not neccessary |
21:44:56 | FromDiscord | <Generic> `xor eax, eax` |
21:45:12 | FromDiscord | <aruZeta> that will make eax = 0 |
21:45:28 | FromDiscord | <aruZeta> "cleaning" it |
21:45:31 | FromDiscord | <Generic> ah yeah, I'm too tired to still write things |
21:45:45 | FromDiscord | <aruZeta> happens to all of us lol |
21:46:59 | * | derpydoo quit (Ping timeout: 244 seconds) |
22:40:03 | * | wallabra joined #nim |
22:44:59 | FromDiscord | <EyeCon> How do I debug matrix-nim-sdk? It gives me a `[MatrixError:ObjectType]` which is as unhelpful as it gets. |
22:45:28 | FromDiscord | <Elegantbeef> tandy\: ^ 😄 |
22:47:48 | FromDiscord | <Rainbow Asteroids> Here's your typedef https://media.discordapp.net/attachments/371759389889003532/1010319198213378048/Screenshot_20220819-184714.png |
22:47:55 | FromDiscord | <Elegantbeef> I think the issue is that presently the sdk doesnt properly raise errors, but dont recall |
22:49:58 | FromDiscord | <EyeCon> I'mma go insert `echo`s everywhere |
22:50:16 | FromDiscord | <Elegantbeef> You do that |
22:50:47 | FromDiscord | <EyeCon> sent a code paste, see https://play.nim-lang.org/#ix=485t |
22:50:58 | FromDiscord | <EyeCon> So I could catch and then print the message properly, it seems |
22:51:04 | FromDiscord | <EyeCon> Let's try that first |
22:51:19 | FromDiscord | <Elegantbeef> Yea though would be smarter if it just had Errors per each errorcode i imagine |
22:51:43 | FromDiscord | <Elegantbeef> That way you can bubble up specific errors when you want them |
22:53:00 | FromDiscord | <EyeCon> That's the dream... Let me tackle the first step of understanding what went wrong first |
22:53:42 | FromDiscord | <EyeCon> sent a code paste, see https://play.nim-lang.org/#ix=485v |
22:53:55 | FromDiscord | <Rainbow Asteroids> 5xx :) |
22:54:17 | FromDiscord | <EyeCon> Apparently |
22:54:24 | FromDiscord | <EyeCon> Why can I login with everything else then |
22:54:43 | FromDiscord | <EyeCon> This will end up being a dumb mistake, won't it |
22:54:54 | FromDiscord | <Elegantbeef> Quite possibly |
22:55:55 | FromDiscord | <Rainbow Asteroids> What are the error codes? |
22:56:18 | FromDiscord | <Elegantbeef> I imagine they're not request error codes, but matrix specificed error codes |
22:56:22 | FromDiscord | <Elegantbeef> But i really dont know the matrix spec |
22:58:29 | FromDiscord | <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:26 | FromDiscord | <EyeCon> Yes, it is a dumb mistake |
22:59:29 | FromDiscord | <EyeCon> Aaaaargh |
23:01:15 | FromDiscord | <EyeCon> Correction: at least 1 |
23:01:44 | FromDiscord | <Rainbow Asteroids> programming: the art of creating and finding dumb mistakes |
23:02:47 | FromDiscord | <EyeCon> Yes! I'll proceed to beer-supported rubber duck debugging in a minute - the heavy weapons |
23:03:46 | FromDiscord | <EyeCon> Total # of dumb mistakes: 2, it connects now at least |
23:04:37 | FromDiscord | <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:55 | FromDiscord | <EyeCon> sent a code paste, see https://play.nim-lang.org/#ix=485D |
23:37:35 | FromDiscord | <EyeCon> After entering my credentials, the package tests fail too, I think this time it's not me |
23:38:00 | FromDiscord | <EyeCon> So I can perform a whoAmI but lot a login |
23:38:04 | FromDiscord | <EyeCon> (edit) "lot" => "not" |
23:39:19 | FromDiscord | <Rainbow Asteroids> maybe you should open an issue |
23:39:59 | FromDiscord | <EyeCon> After making extra sure that it's not me 🙂 |
23:52:30 | FromDiscord | <Elegantbeef> I've got login to worrk and a list of my joined channels |
23:53:53 | FromDiscord | <EyeCon> sent a code paste, see https://play.nim-lang.org/#ix=485J |
23:54:05 | FromDiscord | <Elegantbeef> Want me to just send my "working" client |
23:54:13 | FromDiscord | <EyeCon> That is even better, sure |
23:54:21 | FromDiscord | <Elegantbeef> dodger.tar.xz https://media.discordapp.net/attachments/371759389889003532/1010335947176542318/dodger.tar.xz |
23:54:34 | FromDiscord | <Elegantbeef> Really should throw it on a repo but it's mostly dumb code |
23:57:33 | FromDiscord | <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 |