<< 12-08-2022 >>

00:10:54*jmdaemon quit (Ping timeout: 264 seconds)
00:12:12*jmdaemon joined #nim
00:15:03FromDiscord<Elegantbeef> A few
00:16:34FromDiscord<Elegantbeef> I have https://github.com/beef331/nimtrest/blob/master/goface.nim#L184-L212 and https://github.com/beef331/traitor
00:16:43FromDiscord<Elegantbeef> No clue how useful either are really
00:16:51NimEventerNew thread by Jasonfi: Request for example: one log file per thread in Chronicles, see https://forum.nim-lang.org/t/9362
00:19:40FromDiscord<Elegantbeef> traitor is a mess that needs rewritten i imagine
00:22:36*derpydoo joined #nim
00:43:06FromDiscord<leorize> why is byref required btw?
00:43:31FromDiscord<Elegantbeef> Cause the procedure is called in such away that the first parameter is a pointer
00:43:54FromDiscord<Elegantbeef> There are many assumptions inside traitor
00:44:43FromDiscord<leorize> I see
00:53:06*derpydoo quit (Quit: derpydoo)
01:05:44*derpydoo joined #nim
01:07:26*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
01:10:03*Lord_Nightmare joined #nim
01:42:09*vicecea quit (Remote host closed the connection)
01:42:39*vicecea joined #nim
01:48:37FromDiscord<Jakraes> Hey guys, I'm having a bit of a problem, I'm trying to compile an old project of mine and for some reason it gives me an error, and this is one of those errors that I can't understand although I assume it's because of the noisy package https://media.discordapp.net/attachments/371759389889003532/1007465601977036890/Screenshot_8.png
01:49:50FromDiscord<Elegantbeef> It's something that uses simd
01:49:58FromDiscord<Jakraes> simd?
01:50:19FromDiscord<Elegantbeef> CPU magic that speeds up concurrent calculations
01:50:27FromDiscord<Elegantbeef> A library uses it and your compiler doesnt like it's usage
01:50:57FromDiscord<Rainbow Asteroids> single instruction multiple data. the idea is that decoding an instruction is hard, so bunching up the data = faster operations
01:51:04FromDiscord<Rainbow Asteroids> afaik
01:51:33FromDiscord<Elegantbeef> Pretty much, it's a mini multithread 😄
01:51:45FromDiscord<Elegantbeef> But that's neither here or there for their issue
01:56:36FromDiscord<Jakraes> Oh I see, so how could I go around "fixing" that? Assuming that it's possible
01:57:14FromDiscord<Elegantbeef> see why said "target specific option mismatch" occurs
01:57:20FromDiscord<Elegantbeef> it's noisy that's the issue
02:19:27FromDiscord<Jakraes> Hmmm, is it really noisy? Perhaps it's my installation or something
02:19:45FromDiscord<Elegantbeef> I mean it's calling code your compiler doesnt like
02:20:41FromDiscord<leorize> try updating your gcc
02:21:27*jmd_ joined #nim
02:21:41FromDiscord<Jakraes> It's updated it seems, so it's not that for sure
02:21:50FromDiscord<Jakraes> I can't really understand what kind of code itt doesn't like
02:22:02FromDiscord<Jakraes> I mean, I can activate multithreading? Perhaps it'll work
02:22:23*jmdaemon quit (Ping timeout: 252 seconds)
02:22:28FromDiscord<Elegantbeef> SIMD and multithreading have no relation really
02:22:54FromDiscord<leorize> that's an sse2 function, so maybe `--passC:-msse2` would solve it
02:23:13FromDiscord<Elegantbeef> https://github.com/guzba/nimsimd/blob/master/examples/basic.nim try this to minimize the issue 😄
02:24:56FromDiscord<Jakraes> In reply to @leorize "that's an sse2 function,": Well, that works
02:25:13FromDiscord<Elegantbeef> Seems they dont pass the proper flag
02:25:13FromDiscord<Jakraes> In reply to @Elegantbeef "https://github.com/guzba/nimsimd/blob/master/exampl": And unfortunately that gives me errors on all 3 of the functions
02:25:32FromDiscord<Elegantbeef> does it work with `--passC:-msse2`?
02:26:02FromDiscord<Jakraes> It does with 0 errors
02:26:09FromDiscord<Elegantbeef> https://github.com/guzba/nimsimd/blob/master/src/nimsimd/sse2.nim yea they dont do `passC` here
02:26:30FromDiscord<Jakraes> https://media.discordapp.net/attachments/371759389889003532/1007475132748542022/Screenshot_13.png
02:26:31FromDiscord<Elegantbeef> https://github.com/guzba/nimsimd#compiler-flags
02:26:52FromDiscord<Jakraes> Would that be a problem on their part then?
02:27:25FromDiscord<Elegantbeef> I'd wager `noisy` should do this
02:27:43FromDiscord<Elegantbeef> So make an issue but use the flag leorize gave you until they fix it
02:32:07FromDiscord<Jakraes> Nice, I put up the issue, thank you guys for the help
02:32:15FromDiscord<Jakraes> Wouldn't be able to find this out myself for sure :p
02:32:52*jmdaemon joined #nim
02:33:36*jmd_ quit (Ping timeout: 244 seconds)
02:59:16FromDiscord<Superstart033> You guys think Nim macros and meta programming is as good as any lisp base language? Because I’ll like to try and do a small programming language in it someday
02:59:32FromDiscord<Elegantbeef> I think they're fantastic and allow alot
02:59:40FromDiscord<Elegantbeef> No clue if they're as good as lisp as i've never written it
03:00:06FromDiscord<Superstart033> Thanks for the answer!
03:00:25FromDiscord<Elegantbeef> you cannot change the syntax of the language so you're limited by the parser in most cases
03:00:43FromDiscord<Elegantbeef> But you can make expressive solutions to problems still(refer to npeg)
03:09:36*derpydoo quit (Ping timeout: 268 seconds)
03:50:39*arkurious quit (Quit: Leaving)
03:58:33FromDiscord<Girvo> Depends which Lisp dialect one is talking about 🙂
03:59:01FromDiscord<Girvo> But in general, Nims macro system is about as powerful as some of the common Lisp dialects, IMHO.
04:58:10FromDiscord<JosephFerano> Hello
04:59:44FromDiscord<Elegantbeef> Hello
05:03:09FromDiscord<JosephFerano> I'm evaluating nim as my next programming language. Been working with F# for the past 4 years, looking to move away from dotnet
05:16:18FromDiscord<Phil> Nice to hear, anything explicit we can help you with?
05:16:27FromDiscord<Bubblie> can you do import compiler/nim in a normal nim file or no
05:16:50FromDiscord<Elegantbeef> You can use the compiler as a library yes
05:17:02FromDiscord<Elegantbeef> you should do `--path:$nim` if you do use it though
05:17:35FromDiscord<Bubblie> got it
05:19:08FromDiscord<JosephFerano> How's the REPL experience?
05:19:26FromDiscord<Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=
05:19:37FromDiscord<Elegantbeef> There's inim, and `nim secret` the former isnt amazing due to having to re compile after each change
05:19:47FromDiscord<Elegantbeef> The latter isnt amazing due to the fact it's a subset of nim
05:20:13FromDiscord<Elegantbeef> Remove the quotes
05:20:16FromDiscord<fbpyr> I like inim for exploring and learning nim, but yes it is unfortunately slow..
05:20:35FromDiscord<Elegantbeef> Can you make it use TCC?
05:20:46FromDiscord<Elegantbeef> I've never really seen the benefit of a repl for a compiled language, just make small program
05:21:41FromDiscord<fbpyr> for me it is the instant feedback when I poke at things, where I find a repl very useful. (maybe just part of me learning style)
05:21:48FromDiscord<JosephFerano> I do REPL driven development all the time with F#
05:21:55FromDiscord<JosephFerano> It's part of the appeal, it's what makes lisps appealing as well
05:22:25FromDiscord<JosephFerano> I'm not suggesting working inside a command prompt and typing things into `inim` which I assume is the interactive CLI
05:22:51FromDiscord<JosephFerano> I generally use Emacs or Jetbrains, it's great just sending a function to the REPL and testing it out
05:22:58FromDiscord<fbpyr> Elegantbeef\: so you assume tcc could speed up inim?
05:23:09FromDiscord<Elegantbeef> No clue, depends what's causing the problem
05:23:23FromDiscord<Elegantbeef> I've never used inim seriously, i prefer a file inside /tmp
05:27:17FromDiscord<Bubblie> right
05:27:21FromDiscord<Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=47md
05:27:44FromDiscord<Elegantbeef> sure if you prefer `=` over `:` 😄
05:28:32FromDiscord<Bubblie> it is uh still asking me for a file name? odd
05:28:33FromDiscord<JosephFerano> One thing that is particularly interesting with Nim, I wonder if anyone has experience doing so, is prototyping quickly with the GC and then slowly refactoring the performance critical areas by using the arc/orc (I need to read up on them, but I have a little bit of rust experience)
05:28:54FromDiscord<JosephFerano> Or MM?
05:28:56FromDiscord<Elegantbeef> You use a single MM solution
05:28:56FromDiscord<JosephFerano> https://ramanlabs.in/static/blog/raw_memory_management_patterns_in_nim_language.html
05:28:59FromDiscord<Elegantbeef> Orc is a GC
05:29:03FromDiscord<Phil> I just solely use orc tbh, no reason to use default gc
05:29:20FromDiscord<Elegantbeef> Using Orc should be pretty 1\:1 to using refc
05:29:37FromDiscord<Elegantbeef> It has new features that enable more intelligent/faster code, but it's supposed to be near the same expereince
05:29:45FromDiscord<Elegantbeef> You just write Nim and get a small fast binary, in theory
05:30:37FromDiscord<JosephFerano> Yeah, one of the things that has me wanting to move away from F# is that a single self-contained binary starts at 60mb >=
05:30:37FromDiscord<Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=
05:30:45FromDiscord<Bubblie> oh yeah I never used Orc
05:30:50FromDiscord<Elegantbeef> you put `-d:nimCore` after the file name
05:30:59FromDiscord<Bubblie> oh
05:31:03FromDiscord<Bubblie> it goes before doesn't it
05:31:10FromDiscord<JosephFerano> OCaml is an obvious choice, but it's a little rough around the edges
05:31:11FromDiscord<Elegantbeef> We can get \~20kb for hello world! 😛
05:31:29FromDiscord<Elegantbeef> Yes otherwise it thinks it's an argument to pass to the program you're attempting to run but didnt use -r↵(@Bubblie)
05:31:44FromDiscord<Bubblie> god I suck at cli 💀 sorry
05:31:49FromDiscord<Elegantbeef> I think statically compiled musl gets 5kb for hello world
05:31:59FromDiscord<JosephFerano> In reply to @Elegantbeef "I think statically compiled": Holy moly
05:32:05FromDiscord<Phil> Can't say my Nim binaries of large-ish Webserver with 6 or so dependencies takes up more than 7 mb
05:32:09FromDiscord<JosephFerano> I wouldn't mind trying out musl
05:32:26FromDiscord<Elegantbeef> Eh statically compiled with musl isnt really suggested
05:32:39FromDiscord<Elegantbeef> You can do it, but it's very much not something most people suggest even in the C world
05:32:44FromDiscord<Phil> Though said Webserver is completely dynamically lined
05:32:47FromDiscord<Phil> Linked
05:33:26FromDiscord<Phil> Said dynamic linking is also with musl
05:33:51FromDiscord<fbpyr> hmm.. `inim -d:cc:tcc` feels a bit quicker indeed.↵but maybe it might also be just my imagination.. 🤔
05:34:03FromDiscord<Bubblie> apparantly it cannot open file: compiler/nim
05:34:13FromDiscord<Bubblie> im still doing something wrong arent I
05:34:18FromDiscord<Elegantbeef> `nim` isnt the name of the file
05:34:31FromDiscord<Elegantbeef> Ah nvm it is
05:34:58FromDiscord<Bubblie> odd
05:37:09FromDiscord<Elegantbeef> Seems you need `'$nim'`
05:37:16FromDiscord<Bubblie> oh so single quotes?
05:38:14FromDiscord<Bubblie> oh cool it worked
05:38:15FromDiscord<Bubblie> thanks
05:55:46*kenran joined #nim
06:12:38FromDiscord<Rainbow Asteroids> why does the cli use a dollar symbol?
06:12:54FromDiscord<Elegantbeef> What?
06:13:48FromDiscord<Elegantbeef> If you mean `--path:'$nim'` that's for getting the path of the nim compiler, and adding it to the search path
06:13:54FromDiscord<Elegantbeef> If you mean something else.... uhh what?
06:14:59FromDiscord<Girvo> In reply to @JosephFerano "One thing that is": This is effectively how I approach things right now. Though as I'm working in embedded firmware, it's basically as simple as me using `seq` and `string` initially because its easy, and moving them to known-length `cstring` and `array` buffers instead. We don't turn off ARC though, we still use it in places
06:15:53FromDiscord<Rainbow Asteroids> In reply to @Elegantbeef "If you mean `--path:'$nim'`": it seemed like a weird choice because in bash `$` is a special characer.
06:15:55FromDiscord<Elegantbeef> You should clarify that's not cause of the GC though 😛
06:16:03FromDiscord<Girvo> ^ what he said lol
06:16:20FromDiscord<Girvo> But the approach is still similar enough
06:16:47FromDiscord<Elegantbeef> I more mean that the issue isnt that ARC is causing slow downs, just that i assume you want to minimize memory consumption
06:17:16FromDiscord<Girvo> Yeah 🙂 Though, I'm sure if we were liberal with refs etc. ARC would maybe eat a few too many cycles
06:17:17FromDiscord<Elegantbeef> Atleast i hope you dont think manual memory management will give a massive performance boost
06:17:21FromDiscord<Girvo> But memory pressure is by far the most important reason
06:17:46FromDiscord<Girvo> We've got 512kb of SRAM local to the processor, so being sure of where its used is important haha
06:18:01FromDiscord<Elegantbeef> to be fair you can use Seq/String as fixed sized arrays, but not really worth the added effort
06:18:21FromDiscord<Girvo> Yeah pretty much what I found
06:18:47FromDiscord<Elegantbeef> Well you'd probably endup with `type FIxedSize[T] = distinct seq[T]`
06:19:01FromDiscord<Elegantbeef> So then you're just going through making weird C# like arrays
06:19:07FromDiscord<Girvo> shudder
06:19:35FromDiscord<Girvo> I prefer the clarity that comes from `seq` and `array` -- it makes it very for our team to go back and remove them where needed
06:20:07FromDiscord<Girvo> Though in some places we've kept it as the allocation only happens once anyway for the whole firmware, and being able to use it dynamically is nice
06:20:56FromDiscord<Elegantbeef> The nice thing is your program probably runs as fast as it did with dynamic collections
06:21:02FromDiscord<Elegantbeef> Or near as fast
06:21:22FromDiscord<Elegantbeef> And it probably only used like 20-30% more memory
06:21:48FromDiscord<Girvo> Yeah, and those buffers aren't big enough that it's problem. It's pretty lovely
06:24:31FromDiscord<Elegantbeef> Do you actually have any quantitative results from before/after?
06:25:22FromDiscord<Elegantbeef> It'd be interesting to see how far ARC alone can get you
06:26:02FromDiscord<Girvo> Nothing particularly useful, as too much changes internally at the moment to get clear numbers. But that'll be slowing down in the couple weeks and I'll have some time to profile it and see, so I'll let you know! PlatformIO and JTAG give me a _lot_ of visibility into this 🙂 should be neat to see
06:26:23FromDiscord<Elegantbeef> Ah cool
06:27:25FromDiscord<Elegantbeef> Would be something blog post worthy, assuming you were allowed to do that
06:27:32FromDiscord<Girvo> That's the plan!
06:27:39FromDiscord<Elegantbeef> Aw fuck yea
06:28:50FromDiscord<Girvo> I know others have done a decent amount of embedded work in Nim, but full production-level end-to-end stuff I'm not sure, so I'm excited to see the numbers. I can say that I have more functionality than the previous C++ firmware did, with 60% less memory usage and it runs about 1.5x faster in terms of processing lol
06:29:07FromDiscord<Elegantbeef> You left out the important part
06:29:11FromDiscord<Elegantbeef> The code is 90% more readable
06:29:15FromDiscord<Girvo> 99.9%
06:29:21FromDiscord<Girvo> You don't know how bad the original C++ was
06:29:29FromDiscord<Girvo> Just horrific lol
06:29:46FromDiscord<Girvo> Though I'm certain most of that is 1) we ditch the Arduino layer and went to ESP-IDF directly and 2) the C++ code was _so bad_
06:30:38FromDiscord<Elegantbeef> And Nim extensions havent been an issue? Just mark everything as `{.raises: [].}` and carry ong?
06:30:43FromDiscord<Elegantbeef> exceptions
06:30:45FromDiscord<Elegantbeef> Brain exceptions
06:31:26FromDiscord<Girvo> Actually they've been super useful in development haha, we get a nice print-out and everything and the firmware restarts, but yeah `raises: []` is next 🙂 For some of the internal stuff that's already in plce
06:31:28FromDiscord<Girvo> (edit) "plce" => "place"
06:32:08FromDiscord<Elegantbeef> Ah you're lucky I have 0 support for panics on the pico, plus no way to read anything from it when it dies
06:32:21FromDiscord<Girvo> Ooh unlucky, yeah that'd be annoying
06:32:54FromDiscord<Elegantbeef> I guess the panic override should print out to the uart device, but i dont know
06:32:59FromDiscord<Girvo> ESP-IDF does "exception like things" in it's C code already, and the `check` template in Nesper lets us turn `esp_error_t` into a Nim exception, to get real tracebacks and everything. Its quite nice.
06:33:09FromDiscord<Girvo> It's even colourised lol
06:33:16FromDiscord<Elegantbeef> Damn future over there
06:33:45FromDiscord<Girvo> The ESP is fascinating, especially the ESP32-S3. It's a microcontroller, but acts more like... I don't know, a real processor? Its awesome
06:33:55FromDiscord<Girvo> It's also allowed us to make the networking side of it amazing. Previously we were doing HTTP calls using AT commands to the 4G modem over UART, so it was slow as shit, with a heap of copying and buffering (the modem read in all of the data to itself, then copied it out over UART then copied again to the routine that needs to work with it. Terrible!↵↵Now I have PPPoS working, so it's literally a real network stack. Real sockets, `httpcl
06:35:02FromDiscord<Girvo> Only thing I don't have yet is TLS, because of the hard OpenSSL requirement in Nim -- there's an OpenSSL compat layer in IDF over `mbed_tls` but it's literally just header files. Theres no dynlib/.so/etc. for Nim to link to, so I couldn't get it working without hacking on the standard library
06:35:19FromDiscord<Elegantbeef> bearssl when
06:35:30FromDiscord<Girvo> arewebearsslyet.com
06:35:42FromDiscord<Elegantbeef> I mean status uses bearssl so sorta
06:35:54FromDiscord<Girvo> Interesting. I might have to look at how they've approached it
06:36:24FromDiscord<Girvo> Though I'm binding mbed_tls myself anyway, while it won't work nicely with httpclient etc., it should still be pretty easy to work with
06:36:27FromDiscord<Elegantbeef> As such https://github.com/status-im/nim-chronos works without openssl and passing `-d:ssl`
06:36:43FromDiscord<Girvo> Oh! _That_ is good to know, I'm going to take a look
06:42:19FromDiscord<Girvo> Oh I may be able to use how they've done this. I could not for the life of me work out how to make `-d:ssl` work but give it my own SSL/TLS implementation. All I want to do is basically change the `openssl.nim` definitions to not rely on the shared library and `importc` from the mbed_tls compat layer headers instead
06:42:22FromDiscord<Elegantbeef> I guess the general downside of bearssl doesnt effect you either since it's an IOT device
06:42:41FromDiscord<Girvo> Yeah
06:43:00FromDiscord<Elegantbeef> Statically linked, it's all statically linked?!
06:43:24FromDiscord<Girvo> Welcome to CMake/PlatformIO/ESP-IDF hell mwahahahaha
06:43:33FromDiscord<Girvo> Apparently BearSSL works great on ESP-IDF
06:43:40FromDiscord<Girvo> This might be the way to go. Neat.
06:43:46FromDiscord<Phil> blazing fast compiletimes... I mean blazing hot running CPUs due to eternal compilation time
06:43:50FromDiscord<Elegantbeef> Yea was going to say bearssl is ideal for that hell since it's a source file
06:43:56FromDiscord<Elegantbeef> source file library\
06:44:24FromDiscord<Girvo> In reply to @Isofruit "*blazing fast compiletimes*... *I": You should hear my laptops fans everytime the firmware rebuilds the whole tree. Its ridiculous lol
06:44:36FromDiscord<Phil> In reply to @Girvo "You should hear my": Houston we're ready for takeoff?
06:44:50FromDiscord<Elegantbeef> Can one compile the Nim compiler before you compile without cache?
06:44:51FromDiscord<Girvo> Yep. I have to walk out of my office if I'm on a call lol
06:45:14FromDiscord<Girvo> In reply to @Elegantbeef "Can one compile the": Yeah, should be able to
06:45:28FromDiscord<Elegantbeef> Jeez dont lose that cache
06:45:59FromDiscord<Elegantbeef> > BearSSL was written in Canada and is distributed from a server located on Canadian soil.↵Oh shit really, fuck yea!
06:46:04FromDiscord<Elegantbeef> Havent seen that before
06:46:21FromDiscord<Phil> Could've been LeafSSL then
06:46:26FromDiscord<Phil> Dissappointed
06:46:30FromDiscord<Girvo> I have a custom PlatformIO plugin that I'll be releasing soon that integrates Nim into a PlatformIO system a lot nicer than my current approach (`--compileOnly` via a Nimble custom task and tell CMake to pickup `nimcache` as the srcs directory)
06:46:34FromDiscord<Girvo> MapleSSL lol
06:46:35FromDiscord<Elegantbeef> We're like 90% forest, you dont think we have bears
06:47:06FromDiscord<Phil> I think you have bears dropping from the sky if I remember my weird news articles correctly
06:47:14FromDiscord<Elegantbeef> Probably
06:47:15FromDiscord<Phil> But you have a leaf on your flag and not a bear
06:47:21FromDiscord<Elegantbeef> No that's the aussies that have drop bears
06:47:27FromDiscord<Girvo> What? How dare Canada appropriate Australian culture 😠
06:47:46FromDiscord<Elegantbeef> Those mothers will end you before you can say "G'day mate how ya going"
06:47:47FromDiscord<Girvo> Drop bears are no joke. Gotta put vegemite behind your ears if you're heading out bush
06:48:07FromDiscord<Elegantbeef> Insert clip of scottish reporting in full sport armour
06:48:16FromDiscord<Phil> Is the vegemite to make you as salty externally as you would be internally as an aussie?
06:49:05FromDiscord<Girvo> Exactly
06:49:22FromDiscord<Phil> Hah! Knew I learned something during my 3 month stay there
06:50:07FromDiscord<Elegantbeef> You also always travel with a raw chicken leg in your pocket so you can always distract a croc
06:50:20FromDiscord<Phil> Beyond, yknow, that the sun can actually burn hot enough that if you don't smear the tip of your ears with sun blocker they will get 1st degree burns
06:50:28*GreaseMonkey quit (Remote host closed the connection)
06:50:39FromDiscord<Elegantbeef> To summarize this conversation, you just write Nim and it's generally very optimised if you dont go into pitfalls 😛
06:51:03FromDiscord<Girvo> Exactly lol
06:54:30*gsalazar joined #nim
06:58:01FromDiscord<creikey> sent a long message, see http://ix.io/47mF
06:58:06FromDiscord<creikey> I should also ask this in #appdev
06:59:28FromDiscord<Rika> That sounds more like a #gamedev question
06:59:50FromDiscord<creikey> In reply to @Rika "That sounds more like": yeah I suspect I'd need to write straight from opengl or something banans
06:59:51FromDiscord<creikey> (edit) "banans" => "bananas"
06:59:52FromDiscord<Phil> Is it gamedev? or is is just having windows with buttons and texts?
06:59:57FromDiscord<creikey> In reply to @Isofruit "Is it gamedev? or": not a game
07:00:20FromDiscord<creikey> application to help you analyze your workflow by screenshotting your desktop at random intervals and you review how much time you were distracted/what applications etc
07:00:21FromDiscord<Rika> If you’re gonna say IMGUI no it doesn’t satisfy everything he said
07:00:26FromDiscord<Phil> Like, the fast-food version of making GUIs will remain web-stuff I'd imagine. Ain't gonna be performant, but quick to write.
07:00:38FromDiscord<creikey> I already made this in python and used it, very nice, but no GUI
07:01:03FromDiscord<creikey> I want to make it like apple level and beyond, lot of animations/things scaling/fading in and out, blurring
07:01:38FromDiscord<Elegantbeef> Reallistically all GUI toolkits suck so you're on the track to make your own 😄
07:01:49FromDiscord<creikey> doomed 💀
07:02:15FromDiscord<creikey> honestly like windy/pixie not a bad route for this
07:02:30FromDiscord<Phil> CSS animations (there are thankfully people that wrote a bunch of animations in css already that you can just use with CSS classes)↵Gnome already uses JS in a native environment, though not sure if they use HTML... maybe?
07:02:31FromDiscord<Elegantbeef> Boxy is right there
07:02:34FromDiscord<creikey> yedah
07:02:36FromDiscord<creikey> (edit) "yedah" => "yeah"
07:02:50FromDiscord<Elegantbeef> Well if you do use web tech please dont use electron, thanks
07:02:56FromDiscord<creikey> In reply to @Isofruit "CSS animations (there are": I've done decent amount of webdev, I actually think making this and having it be reliable good software would take longer than opengl/c
07:02:58FromDiscord<Elegantbeef> Tauri or similar is mildly better
07:03:55FromDiscord<Phil> Huh, alrighty. I mean I can only speak from my webdev experience, doing native gui is still on my todo list.
07:04:15FromDiscord<creikey> In reply to @Isofruit "Huh, alrighty. I mean": there are just so many weird edge cases with CSS and multi-resolution, weird bugs where failure cases aren't visible
07:04:20FromDiscord<creikey> typescript improves this but it's still relatively abysmal
07:04:36FromDiscord<Phil> I mean, I wouldn't touch a JS project without a framework
07:04:37madpropsim going to experiment with qt and its webviews
07:04:38FromDiscord<Girvo> Though one benefit of web-tech is you get accesiblity "for free"
07:04:39FromDiscord<Phil> That's just inviting madness
07:04:43FromDiscord<Elegantbeef> Native guis all suck sincerely 😄↵(@Phil)
07:04:43FromDiscord<creikey> I've just had so many negative experiences with react/etc
07:04:49FromDiscord<Girvo> Doing that yourself in an immediate mode GUI system is nigh-impossible
07:04:49FromDiscord<Prestige> Just write your own GUI toolkit in Nim, ezpz
07:04:51FromDiscord<creikey> I suspect the best way to do it webdev would use Elm
07:04:58FromDiscord<creikey> (edit) "use" => "be"
07:05:02FromDiscord<creikey> I've heard good things
07:05:13FromDiscord<creikey> but elm unfortunately inherets the weirdness of js often
07:05:16FromDiscord<creikey> (edit) "inherets" => "inherits"
07:05:21FromDiscord<Phil> Really? I mean, I didn't touch react because it didn't provide structure, liked Angular for that reason though the performance is slightly worse
07:05:32FromDiscord<Elegantbeef> I wonder how fast one gets jumped saying "I've heard good things about C" in a rust real time chat 😄
07:05:32FromDiscord<creikey> In reply to @Isofruit "Really? I mean, I": yeah I mean angular might be beter
07:05:36FromDiscord<creikey> (edit) "beter" => "better"
07:05:41FromDiscord<creikey> In reply to @Elegantbeef "I wonder how fast": lol
07:05:42FromDiscord<Phil> And also Angular routing is a trashfire that belongs cast into the fire
07:05:50FromDiscord<Phil> In fact, ALL SPA routing belongs burned to the ground
07:05:54FromDiscord<creikey> I dunno nim is also cool and fun
07:06:05FromDiscord<creikey> wouldn't it be cool if there was this like actually useful piece of user facing software written in nim
07:06:15FromDiscord<Elegantbeef> Looks at nitter
07:06:30FromDiscord<creikey> nitter is still like backend technically I'd say
07:06:32FromDiscord<Phil> I actually use nitter a fair bit. A friend of mine keeps sending me twitter posts
07:06:39FromDiscord<creikey> and you only use nitter if you live in a cabin in the woods
07:06:51FromDiscord<Elegantbeef> I use Nitter cause twitter is a fucking stupid platform
07:06:53FromDiscord<Prestige> I just never look at anything on twitter
07:06:59FromDiscord<Phil> I live in a capital city young man!
07:07:00*rockcavera quit (Remote host closed the connection)
07:07:11FromDiscord<Prestige> What does that have to do with twitter
07:07:11FromDiscord<creikey> In reply to @Isofruit "I live in a": a capital cabin in the city?
07:07:21FromDiscord<Phil> In reply to @creikey "a capital cabin in": Damn, you got me
07:07:38FromDiscord<creikey> this application that's really just 2 buttons and it draws some images is actually going to take months because I used windy
07:07:42FromDiscord<creikey> (edit) "windy" => "opengl"
07:07:46FromDiscord<Prestige> Honestly if I make a GUI program in Nim, I'll likely be using sdl to do everything
07:07:48FromDiscord<creikey> then I'm instantly banned from apple
07:07:55FromDiscord<Elegantbeef> Hew prestige
07:07:58FromDiscord<Elegantbeef> Ew\
07:08:00FromDiscord<Phil> Anyway, I do not use twitter but for looking at the odd tweet every two weeks I love it, not having to deal with Twitter's client is always a good thing
07:08:03FromDiscord<Prestige> Why ew?
07:08:22FromDiscord<creikey> In reply to @Avahe "Honestly if I make": sdl/opengl is terrible I've heard from gamedeves who've actually shipped software, platform bugs on windows are a lot
07:08:27FromDiscord<Elegantbeef> Have to design everything from scratch 😄
07:08:38FromDiscord<creikey> (edit) "a lot" => "widespread"
07:08:44FromDiscord<Prestige> In reply to @Elegantbeef "Have to design everything": That's sort of my thing
07:08:44FromDiscord<Elegantbeef> Everything accessibility related
07:09:03FromDiscord<Prestige> In reply to @creikey "sdl/opengl is terrible I've": Oh, I only really care about linux tbh
07:09:05FromDiscord<creikey> In reply to @Elegantbeef "Everything accessibility related": how would I even deal with like screen readers if I did windy/boxy/etc
07:09:09madpropsi tried tauri. not on par as the firefox/chrome experience
07:09:11FromDiscord<creikey> (edit) "gamedeves" => "gamedevs"
07:09:16FromDiscord<Elegantbeef> You'd use the APIs they offer
07:09:28FromDiscord<creikey> In reply to @Elegantbeef "You'd use the APIs": wonder how nice a win32 ui api is
07:09:42madpropswhy can't firefox just ship a chromium-like engine for linux
07:09:50FromDiscord<Girvo> In reply to @creikey "wonder how nice a": Horrible, why lol
07:09:55FromDiscord<Elegantbeef> SDL2 offers APIs for this I presume
07:10:05FromDiscord<Elegantbeef> If SDL2 doesnt you then talk to the call that does
07:10:23FromDiscord<Prestige> sdl is pretty sweet
07:10:38FromDiscord<creikey> In reply to @Girvo "Horrible, why lol": is accessibility doomed if I do the whole ui with opengl and write shaders for everything
07:11:07FromDiscord<Prestige> What about accessibility are you concerned with?
07:11:08FromDiscord<creikey> I know on browsers it'd be done for me
07:11:12FromDiscord<creikey> In reply to @Avahe "What about accessibility are": like screen readers
07:11:21FromDiscord<Elegantbeef> Not if you support accessbillity
07:11:29FromDiscord<creikey> if I'm rasterizing my own text how are those things gonna know what to text to speech
07:11:34FromDiscord<Prestige> Idk how screen readers are supposed to work, assuming they don't use ocr
07:11:53FromDiscord<Elegantbeef> Screen readers, font scaling, text highlighting, calling any OS accessbillity
07:11:56FromDiscord<creikey> In reply to @Avahe "Idk how screen readers": I'm pretty sure you annotate what stuf flooks like on whatever platform
07:12:14FromDiscord<creikey> In reply to @Elegantbeef "Screen readers, font scaling,": text highlighting 😩
07:12:16FromDiscord<Prestige> Yeah you'd have to support things like what beef said manually
07:12:19FromDiscord<Elegantbeef> They do not use OCR
07:12:24FromDiscord<creikey> not implementing all the keyboard shortcuts in a line edit
07:12:27FromDiscord<creikey> (edit) "line" => "text" | "textedit ... " added "box"
07:12:43FromDiscord<Elegantbeef> Or atleast not by default
07:12:47FromDiscord<Prestige> or just use like gtk or something, idk
07:12:50FromDiscord<creikey> I looked at gtk
07:12:58FromDiscord<creikey> that makes a lot of sense for this imo, it just seems very like not dynamic
07:13:08FromDiscord<creikey> I want pretty animations because there aren't enough of those and computers are fast enough
07:13:09FromDiscord<Elegantbeef> creikey also likes windows so that's a whole ordeal
07:13:22FromDiscord<creikey> In reply to @Elegantbeef "creikey also likes windows": I do not like windows, the vast majority of users are on windows
07:13:29FromDiscord<Elegantbeef> Depending on your target
07:13:30FromDiscord<Prestige> Sucks to be them tbh
07:13:39FromDiscord<Elegantbeef> The vast majority of developers are on \nix
07:14:06FromDiscord<creikey> In reply to @Elegantbeef "The vast majority of": https://www.statista.com/statistics/869211/worldwide-software-development-operating-system/#:~:text=Software%20development%20operating%20system%20distribution%20globally%202018%20to%202021&text=Most%20software%20developers%20worldwide%20report,percent%20of%20developers%20preferring%20Linux.
07:14:27FromDiscord<creikey> no idea what this survey is but like
07:14:32FromDiscord<creikey> I mean most web developers are on nix I would agree
07:14:34FromDiscord<Elegantbeef> the fuck is this graph
07:14:36FromDiscord<creikey> because of docker and wsl is a pain
07:14:36FromDiscord<Prestige> My stance is: If it can be done with a cli tool, better do that than use a GUI
07:14:45FromDiscord<Prestige> for anything inherently non-visual
07:14:53FromDiscord<creikey> In reply to @Avahe "My stance is: If": I did this, but there is a visual component of this
07:15:01FromDiscord<Elegantbeef> 60% are on windows but 47% are on \nix and 44% are on mac?
07:15:02FromDiscord<creikey> where you review the screenshots of your desktop and label it as working/not working
07:15:05FromDiscord<creikey> or what you were working on
07:15:21FromDiscord<Elegantbeef> I'm not mathematician but i think that's above 100%
07:15:26FromDiscord<creikey> so you can reflect on how you work discover inefficiencies, what you get distracted by, how much you actually work per week
07:15:40FromDiscord<creikey> In reply to @Elegantbeef "I'm not mathematician but": yeah I don't know what's going on
07:15:43FromDiscord<creikey> apologies for sending a bad link
07:16:18FromDiscord<creikey> In reply to @creikey "where you review the": I accomplished this by writing the screenshots to a folder, then you go into it with your image viewer and delete the ones where you aren't working
07:16:22FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1007548082289922108/image.png
07:16:26FromDiscord<Elegantbeef> Stack overflow survey
07:16:27FromDiscord<Prestige> For an application like that, I don't think I'd care about screen readers, highlighting text, etc
07:16:31FromDiscord<creikey> then another program goes through the screenshots and adds up the time of the timestamps (gaps mean you're not working)
07:16:49FromDiscord<Prestige> 45% linux, nice
07:16:59FromDiscord<Elegantbeef> 55% 😛
07:17:11FromDiscord<Prestige> I can't do math
07:17:14FromDiscord<Prestige> lmao
07:17:19FromDiscord<creikey> In reply to @Elegantbeef "55% 😛": where do you see that number isn't it 39.89
07:17:24FromDiscord<Prestige> WSL
07:17:29FromDiscord<creikey> wsl does not count
07:17:33FromDiscord<Prestige> Why not?
07:17:35FromDiscord<Elegantbeef> It does
07:17:42FromDiscord<Elegantbeef> It's a linux environment that can run GUI applications
07:17:45FromDiscord<creikey> because the tooling around the work (spotify, the thing I'm building) would be a windows application
07:17:51FromDiscord<creikey> In reply to @Elegantbeef "It's a linux environment": is wsl gui good or not
07:18:01FromDiscord<Girvo> WSL2 GUI is... interesting
07:18:03FromDiscord<Girvo> Its getting better
07:18:04FromDiscord<Elegantbeef> No clue i dont use windows so cannot comment
07:18:12FromDiscord<Girvo> But its not what 99% of WSL2 users use it for
07:18:18FromDiscord<creikey> in any case I won't want to rely on some translation layer for my application to work
07:18:23FromDiscord<Prestige> Idk why people bother with WSL when they could just use Linux
07:18:25FromDiscord<creikey> I think wine probably works better than wsl2 gui
07:18:30FromDiscord<Prestige> Unless their job doesn't allow it
07:18:37FromDiscord<Girvo> In reply to @Avahe "Idk why people bother": Because my work mandates a Windows PC sadly
07:18:40FromDiscord<Elegantbeef> Point being that it seems \nix owns the dev market
07:18:52FromDiscord<Girvo> WSL2 and Docker let me get around that for the most part
07:18:55FromDiscord<Prestige> In reply to @Girvo "Because my work mandates": I would quit
07:18:56FromDiscord<creikey> osx is pretty different for a gui application?
07:19:05FromDiscord<Elegantbeef> You can use gtk overthere aswell
07:19:12FromDiscord<creikey> oh yeah gtk on windows works I'm pretty sure
07:19:24FromDiscord<creikey> my issue was gtk is just that it's retained mode and I don't know how I'd program what I want to program with that
07:19:27FromDiscord<Elegantbeef> It does but it's teddious
07:19:30FromDiscord<Elegantbeef> tedious\ rather
07:19:57FromDiscord<Elegantbeef> Dont think they ship an easy to use library, have to build from source, could be wrong
07:20:10FromDiscord<Girvo> Really the best cross-platform GUI system that can feel mostly native is Qt, and it can do really nice animations and such, and supports MacOS/Windows/etc. accessibility APIs
07:20:18FromDiscord<Girvo> But I've not used it from NIm, personally
07:20:25FromDiscord<creikey> oh yeah I used pyqt
07:20:35FromDiscord<creikey> pretty nice
07:20:39FromDiscord<Elegantbeef> QT is seems ugh to me due to being C++
07:20:39FromDiscord<Prestige> I've heard a lot of devs shit-talk Qt and GTK but I haven't touched either
07:20:41FromDiscord<Girvo> https://github.com/filcuc/nimqml exists
07:20:43FromDiscord<Elegantbeef> No clue how it's to use
07:20:51FromDiscord<Prestige> Ah, c++. No thanks
07:21:01FromDiscord<Girvo> QML isn't C++, for what it's worth
07:21:11FromDiscord<creikey> what does qml bindings even mean like the nim calls into the qml?
07:21:14FromDiscord<Girvo> Like the internal runtime is of course, but you don't have to work against that layer if you don't need to
07:21:23FromDiscord<Elegantbeef> I dont dislike code written in C++, just the fact that the library doesnt have a nice C-api to use makes it a pain afaict
07:21:27FromDiscord<creikey> based bindings no RAII https://media.discordapp.net/attachments/371759389889003532/1007549359824568422/unknown.png
07:21:42FromDiscord<Elegantbeef> ban @creikey
07:21:58FromDiscord<Girvo> hahahaha
07:22:00FromDiscord<creikey> In reply to @Elegantbeef "*ban @creikey*": I've suffered too much under RAII
07:22:13FromDiscord<Girvo> And yeah I agree in terms of prefering C libraries
07:22:14FromDiscord<creikey> too many random "I didn't know this happend when the object went out of scope/wasn't referenced anymore"
07:22:18FromDiscord<Elegantbeef> Nim'sRAII or C++/Rusts'?
07:22:22FromDiscord<creikey> (edit) "happend" => "happened"
07:22:26FromDiscord<creikey> rusts for the issues I had
07:22:32FromDiscord<Prestige> They should have called C++ "OOP C", pronounced Oopsie
07:22:36FromDiscord<creikey> I don't understand how nim's raii works I just don't get it
07:22:37FromDiscord<Girvo> But theres a reason GObject exists: modern GUIs are hard without a lot of mutable structure typically and C sucks at it lol
07:22:38FromDiscord<Elegantbeef> Rust i thought protected you
07:22:42FromDiscord<creikey> there's like two different systems or something
07:22:50FromDiscord<Elegantbeef> There's a single RAII
07:23:06FromDiscord<Elegantbeef> Nim copies when it has to to make you a happy dev that doesnt have to fight move semantics
07:23:10FromDiscord<Elegantbeef> It's quite a simple system
07:23:14FromDiscord<Girvo> But yeah, QML is neat: https://doc.qt.io/qt-6/qmlfirststeps.html
07:23:15FromDiscord<creikey> sent a code paste, see https://play.nim-lang.org/#ix=47mR
07:23:27FromDiscord<creikey> took hours
07:23:37FromDiscord<Elegantbeef> But then what would my Nim OOP helper library be called?!↵(@Prestige)
07:23:54FromDiscord<Prestige> Noop
07:24:02FromDiscord<Elegantbeef> I'm not patito
07:24:03FromDiscord<creikey> this project isn't happening anyways because I need to finish my game first and it needs to be good
07:24:12FromDiscord<Prestige> oh god I thought of a way worse name that I won't share
07:24:21FromDiscord<creikey> In reply to @Elegantbeef "Nim copies when it": so like when it copies doesn't that mean the destructor is called twice
07:24:21FromDiscord<Elegantbeef> Anyway what about Nim's RAII confuses you
07:24:23FromDiscord<creikey> and you don't know when it's copied
07:24:25FromDiscord<Elegantbeef> Prestige Poon isnt that bad 😄
07:24:48FromDiscord<Prestige> Oh that's a good one lol
07:24:53FromDiscord<Elegantbeef> It copies and moves the data then calls the destructor after
07:24:55FromDiscord<Prestige> Disruptek would've done that I'm sure
07:25:17FromDiscord<Elegantbeef> So yes the destructor is called twice but for separate objects
07:25:26FromDiscord<Elegantbeef> And you do know when a copy happens as you can enable a hint and error
07:25:33FromDiscord<creikey> In reply to @Elegantbeef "So yes the destructor": so if I do something like glFreeImage on the image handle in the destructor it's called twice?
07:25:48FromDiscord<Elegantbeef> You'd probably us a reference here no?
07:25:51FromDiscord<creikey> I'm supposed to use ref objects for stuff like that right
07:25:52FromDiscord<Elegantbeef> Or atleast a ref count
07:26:05FromDiscord<creikey> yeah what if I don't want to do that because then I don't know when the image is out of scope from reading the program
07:26:19FromDiscord<Elegantbeef> You'd just disallow the copy
07:26:26FromDiscord<Elegantbeef> Then you'd get an error when a copy was made
07:26:30FromDiscord<creikey> I mean I guess my complaints are just like what's the use of an RAII destructor if you don't know when it's copied
07:26:36FromDiscord<creikey> In reply to @Elegantbeef "You'd just disallow the": this is cool I didn't know you could do this
07:26:52FromDiscord<Elegantbeef> The point of RAII destructors is you dont care it's copied
07:27:01FromDiscord<creikey> https://nim-lang.org/docs/destructors.html this is the document I need to read right
07:27:10FromDiscord<Elegantbeef> Yes that explains the hooks
07:27:21FromDiscord<Elegantbeef> Raii should make it so you dont have to care about memory but still be fast
07:27:53FromDiscord<creikey> I don't know, I've liked defer in Go and never had issues there but have had issues with RAII
07:28:00FromDiscord<Elegantbeef> I do have a proper convoluted example of a custom allocated data type that uses the hooks to implement ref counters https://play.nim-lang.org/#ix=47m3
07:28:15FromDiscord<Elegantbeef> I've never had an issue with Nim's ARC
07:28:20FromDiscord<Elegantbeef> So i dont know what you're doing
07:28:22FromDiscord<creikey> In reply to @Elegantbeef "I do have a": https://tenor.com/view/tf2-meet-the-medic-kill-me-spy-tf2-gif-21065683
07:28:32FromDiscord<creikey> In reply to @Elegantbeef "So i dont know": never used arc
07:28:45FromDiscord<creikey> still don't understand what's going on with arc despite reading a total of 2 websites trying to explain it
07:29:13FromDiscord<Elegantbeef> It's literally just "insert `'=destroy'(a)` at end of scope for any variable that wasnt moved
07:29:30FromDiscord<Prestige> I still need to learn the difference between arc and orc, and which I should be using
07:29:33FromDiscord<creikey> In reply to @Elegantbeef "It's literally just "insert": so to be clear if it's copied it's double freed?
07:29:38FromDiscord<creikey> In reply to @Avahe "I still need to": orc detects cycles
07:29:40FromDiscord<creikey> and works with them
07:29:41FromDiscord<creikey> I know thta
07:29:41FromDiscord<Elegantbeef> No cause it's copied
07:29:42FromDiscord<creikey> (edit) "thta" => "that"
07:29:52FromDiscord<Elegantbeef> If you double free you do not have a proper destroy hook
07:29:52FromDiscord<creikey> but like the copy doesn't allocate memory again
07:30:08FromDiscord<Elegantbeef> Either your copy should be an error, or you do not guard destruction properly
07:30:13FromDiscord<creikey> In reply to @Elegantbeef "If you double free": right like this doesn't seem good style to me if putting a free in =destroy causes double free bug
07:30:13FromDiscord<Elegantbeef> Prestige you should use orc
07:30:16FromDiscord<Elegantbeef> It's that simple
07:30:26FromDiscord<Prestige> Cool
07:30:29FromDiscord<creikey> and like I'm not warned
07:30:30FromDiscord<creikey> I dunno
07:30:31FromDiscord<Prestige> Why does arc exist then
07:30:36FromDiscord<Elegantbeef> Embedded
07:30:42FromDiscord<Prestige> ah, cool
07:30:45FromDiscord<Elegantbeef> Places that dont have types that can reference themselves
07:30:58FromDiscord<Prestige> I'll keep that in mind
07:31:01FromDiscord<Prestige> Thanks
07:31:24FromDiscord<creikey> https://media.discordapp.net/attachments/371759389889003532/1007551864931368990/unknown.png
07:31:30FromDiscord<creikey> never seen this before
07:31:33FromDiscord<Elegantbeef> If you have any chance of cyclical types you use ORC and get a good MM system, if you dont use cyclical types ever you can safely use ARC and remove the possibility of a cycle collector
07:31:37FromDiscord<Elegantbeef> =trace is relatively new
07:31:45FromDiscord<Elegantbeef> But a required part of the ORC system
07:31:59FromDiscord<creikey> do I have to implement 4 functions to use RAII for my type in nim
07:32:01FromDiscord<creikey> or are these optional
07:32:07FromDiscord<creikey> like is there a default behavior
07:32:07FromDiscord<Elegantbeef> All hooks are optional
07:32:18FromDiscord<Elegantbeef> you can only implement at most 3
07:32:32FromDiscord<creikey> destroy trace copy sink?
07:32:39FromDiscord<Elegantbeef> Or destroy trace sink
07:32:46FromDiscord<Elegantbeef> sink and copy are an either or
07:32:51FromDiscord<Elegantbeef> You cannot have a sink and copy op
07:33:15FromDiscord<Elegantbeef> Atleast i dont think you can
07:33:24FromDiscord<creikey> I mean the example on the docs has that
07:33:28FromDiscord<creikey> https://nim-lang.org/docs/destructors.html
07:33:33FromDiscord<Elegantbeef> Maybe i'm misremembering with shit code
07:33:45FromDiscord<tandy> this sounds like a really cool project↵(@creikey)
07:34:00FromDiscord<Elegantbeef> Anyway point is if you're worried about double free you have an API flaw
07:34:01FromDiscord<tandy> godot?↵(@creikey)
07:34:02FromDiscord<creikey> In reply to @tandy "this sounds like a": yeah I would love to do it
07:34:07FromDiscord<Elegantbeef> Either error copy or have a ref count
07:34:12FromDiscord<creikey> In reply to @tandy "godot? (<@180866243819995136>)": lolll I've been using godot for 5 years now, it's what I'm making the game in
07:34:19FromDiscord<Elegantbeef> Or make your copy reallocate the data
07:34:54FromDiscord<creikey> In reply to @tandy "godot? (<@180866243819995136>)": godot is retained mode UI, honestly kind of annoying to do the stuff I want to do with it
07:35:00FromDiscord<creikey> and I want to use something else primarily
07:35:04FromDiscord<Elegantbeef> The best UI imo is declarative
07:35:07FromDiscord<creikey> I feel like all of my scripting in godot has made me a worst programmer
07:35:40FromDiscord<Elegantbeef> Sits on my throne of declarative game GUI↵https://github.com/beef331/truss3d/blob/master/examples/guitest.nim#L26-L141
07:36:10FromDiscord<creikey> I mean yeah
07:36:15FromDiscord<tandy> gtk has animations↵(@creikey)
07:36:16FromDiscord<creikey> what happens when onclick must hide another object
07:36:18FromDiscord<creikey> or shift around the UI
07:36:30FromDiscord<Elegantbeef> it access the object and changes it
07:36:35FromDiscord<Elegantbeef> No clue for gtk
07:36:36FromDiscord<creikey> how does it access the object
07:36:43FromDiscord<Elegantbeef> With closure procedures
07:36:58FromDiscord<creikey> what if two objects have to access eachother?
07:37:07FromDiscord<Elegantbeef> They can?
07:37:17FromDiscord<creikey> don't they need to be declared
07:37:17FromDiscord<Elegantbeef> I also have a `isVisible` closure capture
07:37:20FromDiscord<creikey> like you do var or something
07:37:33FromDiscord<Elegantbeef> With closures you ideal use `ref` but yes
07:38:01FromDiscord<Elegantbeef> https://streamable.com/tqie1r i do know the GUI does work 😛
07:39:29FromDiscord<creikey> it's time to work so I can finish my game then make this heinously complicated poorly engineered nim program that does 1 thing
07:39:43FromDiscord<creikey> thanks for the advice everyone
07:39:57FromDiscord<tandy> @creikey\: whats ur git
07:49:14FromDiscord<creikey> In reply to @tandy "<@180866243819995136>\: whats ur git": https://github.com/creikey
08:43:11FromDiscord<proton> Is there any webRTC library?
08:55:42FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=47n3
08:56:13FromDiscord<4zv4l> ooooh my bad
08:56:15FromDiscord<4zv4l> I know why
08:56:31FromDiscord<Elegantbeef> You're using split, that's indeed your bad
08:56:44FromDiscord<4zv4l> because of the split↵the file is all perfectly formatted just the first line which contains the number of line in the file which then isn't good for the spli
08:56:45FromDiscord<4zv4l> (edit) "spli" => "split"
08:56:56FromDiscord<4zv4l> In reply to @Elegantbeef "You're using split, that's": what should I use instead ?
08:58:40FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=47n4
08:58:54FromDiscord<Elegantbeef> And why are you making a result variable
08:58:58FromDiscord<Elegantbeef> Nim has an implicit result
08:59:22FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=47n5
09:00:08FromDiscord<enthus1ast> line.replace for this? \:)
09:00:19FromDiscord<enthus1ast> naah dont listen to him he's drunk
09:00:23FromDiscord<4zv4l> ahahahah
09:00:35FromDiscord<4zv4l> also I get a special variable shadowed with this proc
09:00:53FromDiscord<Elegantbeef> I'm tired, so what'd i miss?
09:00:56FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=47n7
09:01:01FromDiscord<Elegantbeef> Yes cause nim has an implicit result variable
09:01:13FromDiscord<enthus1ast> i bet its a csv right?
09:01:36FromDiscord<4zv4l> yes it is
09:01:51FromDiscord<enthus1ast> with just these two things?
09:02:09FromDiscord<4zv4l> I'm rewritting a C exam I had in high school in Nim so yeah
09:02:12FromDiscord<4zv4l> not an amazing program
09:02:23FromDiscord<4zv4l> just it asks for a postcode and show all cities which match that postcode
09:02:31FromDiscord<enthus1ast> does the csv just contains code and city?
09:02:35FromDiscord<4zv4l> yep
09:02:38FromDiscord<4zv4l> code,city
09:02:55FromDiscord<enthus1ast> ok then beefs thing does indeed work
09:03:43FromDiscord<4zv4l> indeed yeah !
09:04:00FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=47n9
09:04:04FromDiscord<4zv4l> because I didn't initialise the variable maybe ?
09:04:57FromDiscord<enthus1ast> sorry beef \:P
09:04:58FromDiscord<Elegantbeef> Really it'd be nice for a `replace(a, b, c: string, number: int)`
09:05:06FromDiscord<Elegantbeef> Cause there is a implicit result variable
09:05:17FromDiscord<Elegantbeef> All nim procedures that have a return type have a `result` variable
09:05:33FromDiscord<Elegantbeef> I do not declare `result` but i use it
09:05:33FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=47na
09:05:44FromDiscord<Elegantbeef> Cause the procedure declares an implicit `result: seq[string]`
09:06:02FromDiscord<4zv4l> wait so I don't have to declare that variable ?
09:06:07FromDiscord<Elegantbeef> Indeed
09:06:20FromDiscord<4zv4l> but if I chose another name that would be ok
09:06:21FromDiscord<Elegantbeef> All procedures with a return type have an implicit `result`
09:06:36FromDiscord<Elegantbeef> I mean sure, but why would you use another name, just use the implicit result
09:06:50FromDiscord<4zv4l> yeah, that's something I need to get used to I guess
09:06:52FromDiscord<Elegantbeef> If you're anal you can do `return result` at the end, but it's done implicitly
09:06:58FromDiscord<enthus1ast> yes, https://github.com/nim-lang/Nim/issues/18994
09:07:16FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=47nb
09:07:34FromDiscord<4zv4l> I could return the error message but except that, is it alright to do like this ?
09:07:35FromDiscord<enthus1ast> Elegantbeef\: still have the code somerwhere
09:07:58FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=47nc
09:08:00FromDiscord<Elegantbeef> Oh wait never mind
09:08:03FromDiscord<Elegantbeef> I'm dumb
09:08:18FromDiscord<4zv4l> cannot close the file if it isn't open isn't it ?
09:08:27FromDiscord<Elegantbeef> we can do better
09:08:57FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/yp9
09:09:09FromDiscord<Elegantbeef> then you can just `defer: file.close()` after that
09:10:18FromDiscord<Elegantbeef> To be fair araq isnt wrong, these would need to return whether they replaced so either people now need `discard s.replace` or they're discardable bool returning procs
09:10:46FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=47ne
09:10:47FromDiscord<4zv4l> is this because I don't do a newline after the try ?
09:10:49FromDiscord<Elegantbeef> Spaces
09:10:56FromDiscord<Elegantbeef> you need to indent the statement
09:11:04FromDiscord<4zv4l> why ?
09:11:09FromDiscord<4zv4l> oooh
09:11:28FromDiscord<4zv4l> alright
09:11:32FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=47ng
09:11:37FromDiscord<Elegantbeef> it's the "proper" way to write `let file = try: open(fileName) except: return "Couldnt open the file..\n"`
09:11:46FromDiscord<Elegantbeef> I personally despise same line expressions
09:11:48FromDiscord<Elegantbeef> But you do you
09:12:14FromDiscord<4zv4l> well I don't do it in one line↵just I avoid newline when there is only one line in the statement
09:12:31FromDiscord<Elegantbeef> I dislike that as it means you now need to reformat the code if you add more
09:13:01FromDiscord<4zv4l> well I probably won't change it so yeah↵but I get your point
09:13:07FromDiscord<Elegantbeef> I avoid it but i also prefer the same for `let`/`var`/`const`
09:14:21FromDiscord<Elegantbeef> Anywho try expressions are great for this type of thing
09:14:55FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=47nh
09:14:57FromDiscord<Elegantbeef> The former
09:15:09FromDiscord<Elegantbeef> The latter i'd never write
09:15:21FromDiscord<Elegantbeef> It's a code smell to me to having multiple variable declarations like that
09:16:01FromDiscord<Elegantbeef> I generally try to never have one entry typedefs or variable declarations if i dont have to
09:16:14*def- quit (Quit: -)
09:16:33FromDiscord<Elegantbeef> But when talking about types I never do `type A = b` i always do `type\n A = b`
09:16:48FromDiscord<Elegantbeef> But this is all bikeshedding
09:19:34FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=47nj
09:20:34FromDiscord<4zv4l> gotcha
09:20:40FromDiscord<4zv4l> looks better indeed
09:20:43FromDiscord<Elegantbeef> you were only using the string for error message propagation either make an exception
09:20:59FromDiscord<Elegantbeef> Jesus i cannot type
09:21:31FromDiscord<Elegantbeef> Point being is that if you want to propagate an error use an error mechanism 😄
09:22:00FromDiscord<4zv4l> yeah right xD
09:22:13*def- joined #nim
09:41:04FromDiscord<enthus1ast> i do not understand, why must this return that they replaced?
09:41:56FromDiscord<enthus1ast> they just replace up to x times
09:42:49FromDiscord<enthus1ast> the user should know their input and also when to use this functionallity
09:42:53FromDiscord<enthus1ast> same goes with split
09:43:04FromDiscord<enthus1ast> which is super handy
09:46:55NimEventerNew thread by Elcritch: Show Nim: CSS Grid layout engine! , see https://forum.nim-lang.org/t/9363
10:05:50*Guest19 joined #nim
10:06:08FromDiscord<flywind> !eval var x: set[int]
10:06:11NimBotCompile failed: /usercode/in.nim(1, 11) Error: set is too large
10:06:46FromDiscord<flywind> Wouldn't it better to hints that you probably need `std/sets`?
10:06:54FromDiscord<flywind> (edit) "Wouldn't it ... better" added "be"
10:07:03FromDiscord<flywind> (edit) "hints" => "hint" | "you" => ""you" | "`std/sets`?" => "`std/sets`"?"
10:07:05FromDiscord<Rika> Yes it would
10:07:24FromDiscord<Rika> And maybe also how large the largest set can be
10:07:38FromDiscord<flywind> I agree
10:16:18*gsalazar_ joined #nim
10:17:20*gsalazar quit (Read error: Connection reset by peer)
10:58:26NimEventerNew Nimble package! libpe - Nim wrapper for libpe library, see https://github.com/srozb/nim-libpe
11:39:22*CyberTailor quit (Remote host closed the connection)
11:41:19*CyberTailor joined #nim
12:46:08*CyberTailor quit (Remote host closed the connection)
12:47:49*CyberTailor joined #nim
13:03:57*CyberTailor quit (Remote host closed the connection)
13:04:54*CyberTailor joined #nim
13:09:31*kenran quit (Quit: WeeChat info:version)
13:26:46*Guest19 quit (Quit: Client closed)
13:37:39FromDiscord<leetnewb> Definitely a terrible question, but is there a web framework that best suits someone that hasn't touched html or web stuff since the mid-90s?
13:38:01FromDiscord<Rika> Doesn’t exist
13:41:30NimEventerNew thread by Planetis: How to make my library code aware of user provided overloads., see https://forum.nim-lang.org/t/9364
13:46:38FromDiscord<Phil> I have no idea what webdev even looked like back then
13:46:56FromDiscord<Phil> SSR and without an ORM?
13:47:18FromDiscord<Phil> And no js?
13:48:02FromDiscord<leetnewb> no js, no css
13:49:07FromDiscord<leetnewb> been long enough that I don't remember any of it, so ground zero one way or the other
13:57:53FromDiscord<enthus1ast> i could shamlessly recommend my nimja template engine, where you can template html like so that you have one (or several) "base" templates (which is the bloat around your actual content) and some "child" templates that extends the base template, with your actual content @leetnewb
13:58:54FromDiscord<enthus1ast> and for the webserver (if you actually need one, and not go fully static) i would look at jester (which is quite simple) or prologue which requires a little more code to get you going, but has more features
14:04:10FromDiscord<leetnewb> thanks, will take a closer look at nimja.
14:52:45*CyberTailor quit (Remote host closed the connection)
14:54:21*CyberTailor joined #nim
15:26:03*kenran joined #nim
15:31:21*kenran quit (Quit: WeeChat info:version)
15:54:13*rockcavera joined #nim
15:54:13*rockcavera quit (Changing host)
15:54:13*rockcavera joined #nim
15:57:23FromDiscord<foobar-85> sent a code paste, see https://play.nim-lang.org/#ix=47pa
15:57:28FromDiscord<foobar-85> it says "`=copy` signature is wrong"
15:58:06FromDiscord<Rika> `array` is not `object`,
15:58:09FromDiscord<Rika> (edit) "`object`," => "`object`"
15:58:21FromDiscord<foobar-85> ok - so the error was misleading...
15:58:28FromDiscord<Rika> not really
15:58:46FromDiscord<Rika> `signature for '=copy' must be proc[T: object](x: var T; y: T)`↵and `ABigData = array[128, int]` is not `object` so it doesnt fit `T`
15:59:48FromDiscord<foobar-85> ah ! that sneaky `: object` was the actual information I didn't grasp
16:00:17*arkurious joined #nim
16:00:35FromDiscord<foobar-85> Ok, since I attempted to create a =copy for an array, it means I understood something about copy really wrong - what would that be? arrays are ref by default? are non copiable?
16:01:04FromDiscord<Rika> arrays are copiable and you cannot override that without making a distinct
16:01:29FromDiscord<foobar-85> how do I make a distinct?
16:01:46FromDiscord<Rika> `ABigData = distinct array[128, int]` but now you have to borrow every array function 🙂
16:01:57FromDiscord<foobar-85> fun ! lemme try
16:03:27FromDiscord<Rika> i will be going for now
16:05:50FromDiscord<foobar-85> thank you Rika
16:07:48*cornfeedhobo quit (Quit: ZNC - https://znc.in)
16:13:37*cornfeedhobo joined #nim
16:24:29*gsalazar_ quit (Ping timeout: 268 seconds)
16:29:34FromDiscord<foobar-85> Running some tests, I've measured some numbers that hint when passing arrays to channels, copy are made. Is there anyway to avoid that without using allocShared?
16:37:56*krux02 joined #nim
16:39:39FromDiscord<MagPhi> Should I use nimscript or nim for scripting (os)?
16:48:15*tiorock joined #nim
16:48:15*tiorock quit (Changing host)
16:48:15*tiorock joined #nim
16:48:15*rockcavera is now known as Guest1008
16:48:15*tiorock is now known as rockcavera
16:48:34FromDiscord<foobar-85> another question: why `cap` was not implemented to fetch a `seq` capacity?
16:50:54FromDiscord<exelotl> In reply to @MagPhi "Should I use nimscript": probably Nim, unless you have a specific reason for Nimscript
16:51:35*Guest1008 quit (Ping timeout: 268 seconds)
17:12:36*wallabra_ joined #nim
17:14:32*wallabra quit (Ping timeout: 244 seconds)
17:14:32*wallabra_ is now known as wallabra
17:19:45FromDiscord<MagPhi> alright
17:21:54FromDiscord<MagPhi> How do I specify nim as a required dependency in a makefile?
17:36:18FromDiscord<Yardanico> In reply to @foobar-85 "another question: why `cap`": don't know the exact reason, but there's an RFC about it
17:36:18FromDiscord<Yardanico> https://github.com/nim-lang/RFCs/issues/460
17:36:29FromDiscord<Yardanico> doesn't look like it's approved, but I think it wouldn't hurt too much to add it
17:36:38FromDiscord<Yardanico> meanwhile you can access it yourself by casting the seq to its internal representation
17:36:55FromDiscord<Yardanico> just keep in mind that this representation is different between refc and arc/orc, so you need to conditionally define the type
17:45:08FromDiscord<MagPhi> In reply to @exelotl "probably Nim, unless you": what exactly is the difference?
17:46:07FromDiscord<Yardanico> In reply to @MagPhi "what exactly is the": Nim compiles to native binaries, NimScript is executed by the VM that's a part of the Nim compiler
17:46:20FromDiscord<Yardanico> the same VM also executes all Nim code that you need to be run at compile-time (macros, everything that is `const` , etc)
17:46:37FromDiscord<Yardanico> so really in most cases you can just use Nim, it's easy to use it as a scripting replacement with shebangs
17:47:14FromDiscord<Yardanico> and it will only have to compile the binary when you run your .nim file first time, because after that the binary will be cached
17:51:54FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=47pI
17:52:24FromDiscord<Yardanico> one minor detail with this approach is that you can't have the filename without `.nim`, because the Nim compiler will only compile Nim files that end with `.nim` :)
17:52:35*pro joined #nim
17:55:40*gsalazar joined #nim
18:15:29proevening lads
18:17:11*pro quit (Quit: pro)
18:17:26*pro joined #nim
18:17:29FromDiscord<Sabena Sema> does nimscript support the ffi yet?
18:19:05FromDiscord<Rika> No
18:27:51*rockcavera quit (Read error: Connection reset by peer)
18:28:20FromDiscord<Yardanico> In reply to @Sabena Sema "does nimscript support the": only with libffi, but I don't think anyone uses it and so it's not really tested well
18:28:36*rockcavera joined #nim
18:28:36*rockcavera quit (Changing host)
18:28:36*rockcavera joined #nim
18:31:18FromDiscord<Sabena Sema> yeah libffi is a reasonable way to do it
18:37:48*rockcavera quit (Read error: Connection reset by peer)
18:38:33*rockcavera joined #nim
18:38:33*rockcavera quit (Changing host)
18:38:33*rockcavera joined #nim
18:40:06FromDiscord<Forest> Does nimpretty add new lines after declarations? Making it put a space after procs, enums, etc would be good for example
18:40:15FromDiscord<Forest> Grouping together imports that can be grouped together
19:16:08FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=47q9
19:17:49FromDiscord<Rika> I think calling a macro in a macro is funky
19:18:08FromDiscord<Phil> Swapping to template and trying it out
19:18:12FromDiscord<Rika> How it works is kind of unclear, at least from what I know it’s not very clear
19:18:35FromDiscord<Phil> Huh
19:18:41FromDiscord<Phil> Yeah, swapping to template is what did it
19:19:15FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=47qb
19:25:19FromDiscord<Phil> On a sidenote, got to appreciate compile-time stuff
19:26:15FromDiscord<Phil> Just take norm's "convert row to Model" proc, move what you can to compile-time, bam, 10% speed-up when converting 1065 rows into an object with 5 fields when looked at with benchy
19:27:06*def- quit (Quit: -)
19:28:19*def- joined #nim
19:37:10*pro quit (Quit: pro)
20:46:31FromDiscord<br4n_d0n> I'm trying to grab a version of 1.6.6 for macos, but all I get is linux
20:48:21FromDiscord<br4n_d0n> I've mostly used nightlies, but I wanted to also go back and have a stable version as well
20:57:13FromDiscord<!Patitotective> are you using choosenim?
21:00:22FromDiscord<!Patitotective> are you following https://nim-lang.org/install_unix.html ?
21:00:35FromDiscord<!Patitotective> you can also install it manually from https://github.com/nim-lang/Nim/releases/tag/v1.6.6
21:38:20FromDiscord<Elegantbeef> If you return whether your replaced you can actually use it instead of a check
21:39:51FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=47qX
21:40:11FromDiscord<Elegantbeef> should be `1` after the `"=>"`
21:40:24FromDiscord<Elegantbeef> Point is you do not need to understand the string you can just replace the first instance and carry on
21:59:08FromDiscord<BiffBaff64> Hey all. First day learning Nim (1st hour actually :-))
22:01:11FromDiscord<BiffBaff64> I've put together a bit of code, which is probably garbage, which throws up the error "generic methods are deprecated". Not surprised, but I'd like to ask someone who knows what they're doing to point me in the right direction for doing this.
22:01:18FromDiscord<BiffBaff64> This is the code:-
22:01:51FromDiscord<BiffBaff64> sent a long message, see http://ix.io/47r4
22:02:17FromDiscord<BiffBaff64> I know it's bad, tbh that's not my issue.
22:02:55FromDiscord<BiffBaff64> What would be the better, and correct, way of having containsKey and containsValue ?
22:06:08FromDiscord<Forest> Dumb question but: can `else` statements be used for `when defined(X)`?
22:06:17FromDiscord<Elegantbeef> Also it'd be in a `proc`
22:06:18FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=47r5
22:06:25FromDiscord<Elegantbeef> Yes you use `elif` and `else` with `when`
22:07:55FromDiscord<BiffBaff64> map?
22:08:51FromDiscord<!Patitotective> In reply to @BiffBaff64 "map?": this
22:08:57FromDiscord<!Patitotective> (edit) "this" => "`this`"
22:09:15FromDiscord<BiffBaff64> I'm usinig 'this'
22:09:15FromDiscord<Forest> In reply to @Elegantbeef "Yes you use `elif`": Thanks! And when is like the compiletime version of if, right?
22:09:28FromDiscord<!Patitotective> In reply to @Forest "Thanks! And when is": yes
22:09:34FromDiscord<Forest> Sweet
22:11:52FromDiscord<Elegantbeef> I dont believe in using `this` as a parameter name↵(@BiffBaff64)
22:12:04FromDiscord<!Patitotective> self 🤨
22:12:08FromDiscord<Elegantbeef> No
22:12:16FromDiscord<Elegantbeef> I believe in using a descriptiive parameter name
22:12:24FromDiscord<!Patitotective> noOoOo
22:12:31FromDiscord<!Patitotective> verbose
22:12:34FromDiscord<Elegantbeef> Self and this only make sense in a OOP setting since you have a class wrapping definition
22:12:37FromDiscord<!Patitotective> notifications is too long to write
22:12:43FromDiscord<Elegantbeef> is `map` really more verbose than `this`
22:12:45FromDiscord<!Patitotective> In reply to @Elegantbeef "Self and this only": you can read the type hehe
22:12:56FromDiscord<!Patitotective> (edit) "notifications" => "`notifications`"
22:12:56FromDiscord<Elegantbeef> It's fewer characters but at least tells you where you are what you're working with
22:13:01FromDiscord<Elegantbeef> Lol
22:13:15FromDiscord<BiffBaff64> In reply to @Elegantbeef "Self and this only": It's OOP style i want
22:13:29FromDiscord<!Patitotective> nim doesn't support that oop↵oop is just sugar syntax
22:13:30FromDiscord<Elegantbeef> Then use oolib
22:15:12FromDiscord<BiffBaff64> In reply to @Patitotective "nim doesn't support that": OK. Maybe Nim is not the language to go for then.
22:15:15FromDiscord<Phil> In reply to @Patitotective "nim doesn't support that": Which oop?↵Nim does have dynamic dispatch, object call syntax, limited inheritance, which seems like enoughf or it
22:15:40FromDiscord<!Patitotective> In reply to @BiffBaff64 "type ObjectMap = ref": here beef↵can you pass any object to `ObjectMap.value`? seems weird to me
22:16:01FromDiscord<Elegantbeef> No you cannot
22:16:05FromDiscord<!Patitotective> In reply to @BiffBaff64 "OK. Maybe Nim is": why? just because you can't indent methods under a type?
22:16:14FromDiscord<Elegantbeef> It's probably a compile time error
22:16:33FromDiscord<!Patitotective> In reply to @Isofruit "Which oop? Nim does": wrapping methods of a class inside the class definition, i think
22:16:34FromDiscord<Elegantbeef> If you feel like classes are important https://github.com/Glasses-Neo/OOlib does exist
22:16:43FromDiscord<Elegantbeef> But if you really want OOP madness julia does exist
22:16:48FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=47r6
22:16:58FromDiscord<Elegantbeef> Should be `ObjectMap[T]` and `value: T` pat
22:17:01FromDiscord<BiffBaff64> I want ObjectMap.value to be a texture, textureregion, textureatlas, image, pixmap etc.
22:17:13FromDiscord<BiffBaff64> I'm trying to convert some Java code
22:17:22FromDiscord<!Patitotective> In reply to @Elegantbeef "Should be `ObjectMap[T]` and": silly me
22:17:48FromDiscord<Elegantbeef> Porting java to Nim verbatim is a problem
22:18:04FromDiscord<Elegantbeef> Nim and Java use different paradigms so the idiomatic solution differs
22:18:12FromDiscord<!Patitotective> buuut beef he would only be able to use one `ObjectMap` of each type↵and hes saying to store multiple types, so object variants may be the way to go
22:18:18FromDiscord<BiffBaff64> In reply to @Elegantbeef "Porting java to Nim": I know, that's what i was hoping
22:18:33FromDiscord<!Patitotective> also, biffbaff maybe what you want is just https://nim-lang.org/docs/tables.html
22:18:36FromDiscord<Phil> As someone who uses java professionally I can tell you how you can treat module files in general in respect to classes
22:18:38FromDiscord<Elegantbeef> You can use single parent inheritance, but generally you prefer tagged unions(object variants in nim) to that
22:18:54FromDiscord<BiffBaff64> Doesn't actually have to be verbatim, just have the same result.
22:19:11FromDiscord<Phil> But generally unlike java nim doesn't let you do complex inheritance trees so there's some limitations
22:20:05FromDiscord<Forest> In reply to @Elegantbeef "Porting java to Nim": Porting Nim to Java won't be an issue tho soon 😎
22:20:15FromDiscord<Phil> ?
22:20:32FromDiscord<Phil> Is some madlad working on jvm support for nim?
22:20:32FromDiscord<BiffBaff64> Yep, I'm picking up on that. I use Java a lot and fancied a 'challenge'
22:21:10FromDiscord<Elegantbeef> Forest is wanting to make a Java backend for Nimskull
22:21:12FromDiscord<Phil> Generally though, Java recently also picked up on the "composition over inheritance" trend and for that nim does work
22:21:14FromDiscord<Elegantbeef> I'm the odd one out cause i've never went "You know what i want to make Nim less fast"
22:21:21FromDiscord<!Patitotective> In reply to @Forest "*Porting Nim to Java": _soon_ - he said
22:22:01FromDiscord<BiffBaff64> In reply to @Elegantbeef "I'm the odd one": It's just for fun
22:22:12FromDiscord<!Patitotective> In reply to @Elegantbeef "Forest is wanting to": really? nimskull? damn
22:22:12FromDiscord<Forest> In reply to @Patitotective "_soon_ - he said": She but ye
22:22:27FromDiscord<!Patitotective> (edit) "he" => "she"
22:22:29FromDiscord<Phil> You can use Concept's to have generics that enforce their members to have certain abilities without caring how they're implemented. In fact, you don't even need methods for that, you can use normal procs as the concepts will only check if the procedures exist for this type and apply them accordingly.
22:22:46*gsalazar quit (Ping timeout: 268 seconds)
22:22:48FromDiscord<Forest> In reply to @Elegantbeef "I'm the odd one": Not about that, it's the fact Nim isn't usable for MC mods and Plugins https://cdn.discordapp.com/emojis/874393501201219764.png?quality=lossless&size=48
22:23:13FromDiscord<Forest> Being able to use it anywhere, making Nim/Cyo run everywhere would be neat af
22:23:38FromDiscord<Elegantbeef> Biff that comment wasnt to you
22:23:40FromDiscord<BiffBaff64> Thanks for the help/advice everyone. Gotta go pick my daughter up from work. Blessings
22:23:49FromDiscord<Phil> Enjoy!
22:24:18FromDiscord<!Patitotective> In reply to @Elegantbeef "Biff that comment wasnt": more like baff↵beef and biff conflict in my brain
22:24:28FromDiscord<Elegantbeef> Sucks for oyu
22:43:26*CyberTailor quit (Remote host closed the connection)
22:48:37*CyberTailor joined #nim
22:48:47FromDiscord<halc> So, I realize the answer is moooooost likely no, but is there a way to check during runtime if an implementation of a method for a specific object is available? Again, specifically a `method`, I can only imagine it possible with dynamic dispatching, if at all.
22:49:07FromDiscord<halc> (edit) "available?" => "available/defined?"
22:49:47FromDiscord<halc> but I got no idea how nim implements dynamic dispatching so, no clue if it would be possible
22:59:16*CyberTailor quit (Remote host closed the connection)
23:00:51*CyberTailor joined #nim
23:45:57FromDiscord<Elegantbeef> Nim's dynamic dispatch expands into a big `elif` chain so, it's technically capable but it's not really something you'd do at runtime↵(@halc)
23:46:57FromDiscord<halc> huh, I see then, thank you
23:53:21FromDiscord<Rainbow Asteroids> you can check for a specific proc using concepts, but concepts are for generics.
23:54:19NimEventerNew thread by Morturo: I need to alloc a string, see https://forum.nim-lang.org/t/9365
23:55:35*krux02 quit (Remote host closed the connection)