<< 01-09-2022 >>

00:13:35FromDiscord<sealmove> New one I think
00:24:03*tinystoat quit (Remote host closed the connection)
00:24:13*tinystoat joined #nim
00:53:34FromDiscord<auxym> is there a max size to nim enums? 16 bits?
00:53:46FromDiscord<Elegantbeef> Dont think so
00:55:22FromDiscord<auxym> ah ok. 16 bits the max size for set[T], which is why I had that in mind probably...
00:55:44FromDiscord<Elegantbeef> you mean a 16 bit range is the max size 😄
00:56:08FromDiscord<Elegantbeef> Given that a set is a bitvector if it could only have 16 bits we'd be in a weird place
00:58:40FromDiscord<auxym> I mean max sizeof(T) is 2 bytes for set[T], at least if I understand the manual correctly
00:58:47FromDiscord<auxym> I think we're saying the same thing 😄
00:59:03FromDiscord<Elegantbeef> We are i'm just being dumbly pedantics
00:59:51FromDiscord<Elegantbeef> Eitherway if you have more than 65k enum fields you're just purposely being silly
01:01:54FromDiscord<auxym> yeah, not going there, but I want to stuff USB language IDs inside a holey enum. They are 2 bytes, but there aren't really that many values, a couple hundred I think
02:06:34*LuxuryMode quit (Quit: Connection closed for inactivity)
02:09:36*arkurious quit (Quit: Leaving)
02:19:40FromDiscord<ravinder387> how to import chart.js library in nim
02:19:49FromDiscord<ravinder387> using jsffi
02:22:00FromDiscord<ravinder387> `<script>↵const ctx = document.getElementById("myCanvas").getContext('2d')↵const myChart = new Chart(ctx, {... })↵</script>`
02:22:20FromDiscord<ravinder387> how to map Chart js object in nim
03:00:26FromDiscord<TheOctoberSurprise> Anyone else getting "No definition found" when trying to view definitions in vscode?
03:01:58FromDiscord<TheOctoberSurprise> https://media.discordapp.net/attachments/371759389889003532/1014731819230437476/Screen_Shot_2022-08-31_at_11.01.10_PM.png
03:02:35FromDiscord<Elegantbeef> If you arent already grab the nimsaem extension
03:02:42FromDiscord<Elegantbeef> If that doesnt help welcome to Nim tooling, it's the worst aspect
03:08:02FromDiscord<TheOctoberSurprise> There was a vscode update that was pending. That plus reinstalling the nimasem extension seems to have done the trick
03:08:08FromDiscord<TheOctoberSurprise> Thanks again @ElegantBeef
03:08:14FromDiscord<Elegantbeef> No problem
03:08:36FromDiscord<Elegantbeef> Now to joking insult your code tsk tsk using return in a procedure that doesnt have any indention
03:09:35FromDiscord<Elegantbeef> `(this.lastTicks - lastTicks) / 1000` is already a float, also `float` is 64bits which is probably something worth noting as you're making a game
03:12:31FromDiscord<TheOctoberSurprise> https://media.discordapp.net/attachments/371759389889003532/1014734471695700028/Screen_Shot_2022-08-31_at_11.11.50_PM.png
03:12:43FromDiscord<Elegantbeef> `1000u32` 😄
03:13:03FromDiscord<Elegantbeef> I'm saying turn it into a expression
03:13:09FromDiscord<Elegantbeef> It's the nim way 😛
03:13:51FromDiscord<Elegantbeef> Ah nevermind `/` is only defined for `int`
03:14:04FromDiscord<Elegantbeef> smoke bomb
03:14:41FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=49ji
03:14:42FromDiscord<TheOctoberSurprise> Ah ok, I feel slightly better
03:15:03FromDiscord<TheOctoberSurprise> I will go with god's intentions in this case 🙂
03:15:04FromDiscord<Elegantbeef> Also i'm dubious of your usage of `ref Timer`
03:15:09FromDiscord<Elegantbeef> What's your definition of `Timer`?
03:15:28FromDiscord<Elegantbeef> `ref` in Nim does not mean what it does in C#
03:15:34FromDiscord<TheOctoberSurprise> sent a code paste, see https://play.nim-lang.org/#ix=49jj
03:15:41FromDiscord<Elegantbeef> You wouldnt use `method` or `base` here then
03:15:45FromDiscord<Elegantbeef> Since it's not capable of being inherited
03:15:56FromDiscord<TheOctoberSurprise> so just a proc?
03:16:02FromDiscord<Elegantbeef> it'd be `proc getElapsed(timer: var Timer): float32 = ...`
03:16:30FromDiscord<TheOctoberSurprise> i've probably abused methods
03:16:37FromDiscord<Elegantbeef> `method` is only used for runtime dispatch of inheritable objects
03:16:46FromDiscord<Elegantbeef> If it's not a `object of X` it's not capable of utilising method properly
03:17:15FromDiscord<Elegantbeef> Nim doesnt use a vtable for dispatch of methods so it'll slow your program down misusing it
03:17:39FromDiscord<TheOctoberSurprise> ah so of RootObj would make this a valid use of method?
03:19:02FromDiscord<Generic> only if you'd want that method to be overwriteable by objects inheriting from Timer
03:19:40FromDiscord<TheOctoberSurprise> right. this might not be a good use for methods
03:19:49FromDiscord<Elegantbeef> Method in Nim is much like a overridable method in C# they can be overidden in children
03:19:56FromDiscord<Elegantbeef> `object` in Nim is pretty much `struct` in C#
03:20:22FromDiscord<Elegantbeef> So there is no reason to have an overidable procedure
03:20:29FromDiscord<Generic> it doesn't have weird mutability restrictions I haven't fully understood even today though 😄
03:20:51FromDiscord<Elegantbeef> and `ref T` in Nim is a heap allocated reference to T it's not just "pass by reference"
03:21:39FromDiscord<Elegantbeef> Nim will optimise a the program to pass it by reference when it's needed, but if you want a mutable reference you use `var T` like i did above
03:21:55FromDiscord<TheOctoberSurprise> i see
03:22:10FromDiscord<Elegantbeef> `var T` is literally just a pointer that is checked to not outlive the procedure
03:22:50FromDiscord<Elegantbeef> And this concludes me helping you with your VSCode issue 😛
03:23:06FromDiscord<TheOctoberSurprise> it is appreciated
03:23:28FromDiscord<Elegantbeef> Yea given I came from C# like i mentioned previously i went through all of this aswell
03:24:04FromDiscord<TheOctoberSurprise> the explanation of the distinction between ref and var is helpful
03:25:35FromDiscord<Elegantbeef> Generic you write Intepreters and VMs, why no WASM interpreter 😛
03:55:54FromDiscord<Girvo> Speaking of WASM, hows wasm3 going beef 😛
03:56:47FromDiscord<Elegantbeef> That falls into it lacks documentation
03:57:18FromDiscord<Elegantbeef> I was going to wrap it but i looked at it and i'm at a loss of what needs wrapped 😄
03:58:19FromDiscord<Elegantbeef> I did then throw c2nim at the expanded preprocessor version of wasmer, it did ok
04:17:24FromDiscord<Girvo> Ah nice
04:17:28FromDiscord<Girvo> gcc -E or cpp?
04:17:38FromDiscord<Elegantbeef> `gcc -E`
04:17:45FromDiscord<Girvo> Okay nice
04:18:15FromDiscord<Girvo> I've been meaning to do that for some of the more complicated headers in ESP-IDF. I wonder if pre-processor expansion has changed across GCC versions much
04:18:39FromDiscord<Elegantbeef> Well aside from some lacking type definitions it got most of the funky macros down
04:18:39FromDiscord<Girvo> I have mingw gcc easily available, but ESP-IDF uses its weird Xtensa fork and is a pain to run outside of CMake lol
04:18:46FromDiscord<Girvo> Hell yeah
04:19:06FromDiscord<Elegantbeef> Combined with https://github.com/nim-lang/c2nim/blob/master/doc/c2nim.rst#header-directive it might be pretty usable
04:19:38FromDiscord<Girvo> I'll definitely look at doing that for Nesper. It'll mean I can move all the esp_modem code out of C and into Nim instead
04:19:39FromDiscord<Elegantbeef> Whoops i meant to grab the dynlib 😄
04:20:10FromDiscord<Girvo> Hah for me I already use `--header`
04:20:31FromDiscord<Elegantbeef> I just learend about the def directive
04:20:37FromDiscord<Elegantbeef> learned even
04:20:39FromDiscord<Girvo> Yeah its handy as hell
04:21:08FromDiscord<Girvo> The various directives are nice
04:38:15FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1014756045555519560/image.png
04:38:16FromDiscord<Elegantbeef> Mmmmh yes wasm types
04:45:12FromDiscord<Elegantbeef> Fuck yea successfully dynamically linking all procedures
05:03:04*disso_peach quit (Quit: Leaving)
05:12:31FromDiscord<hcorion> sent a code paste, see https://play.nim-lang.org/#ix=49jw
05:16:30FromDiscord<Elegantbeef> That should be all required
05:16:38FromDiscord<Elegantbeef> Does it work with the C compiler?
05:16:42FromDiscord<hcorion> I'm using latest Nim 1.6.6 downloaded via choosenim
05:16:47FromDiscord<hcorion> Yeah c compiler works fine
05:18:42FromDiscord<Girvo> Is a 32 byte "string" going to be passed by-copy in most instances?
05:19:02FromDiscord<Elegantbeef> Nim strings always pass by copy, but since they're pointers that's 'free'
05:19:13FromDiscord<Girvo> I think maybe I need to turn this into a cstring because it's being passed to xQueueSend which does its own internal copy
05:19:35FromDiscord<Elegantbeef> Nim passes all types smaller than 3 floats as copy
05:19:35FromDiscord<Girvo> So copying the pointer going across threads isn't ideal, I think. I'll test it though
05:19:39FromDiscord<Girvo> Okay sweet
05:19:58FromDiscord<hcorion> Actually, the code doesn't even seem to be running at all 🤔 I tried doing a `writeFile` and no file gets written if I compile with cpp
05:20:11FromDiscord<Elegantbeef> You can also annotate types `{.bycopy.}` or `{.byref.}`
05:20:23FromDiscord<Elegantbeef> `nim cpp -r ./myfile.nim` does what?
05:21:26FromDiscord<Elegantbeef> Well girvo i'm presently at a nice place with the wasmer bindings, copying their example code for the most part(changing some things cause i dont care about wat2wasm) i have a spontanous error
05:21:45FromDiscord<hcorion> It doesn't seem to like executing via `-r` 🤔
05:21:55FromDiscord<hcorion> `Error: execution of an external program failed: 'E:\Projects\NimScriptingTest\Plugins\NimForUE\test.exe '`
05:22:09FromDiscord<Girvo> oooh spontaneous errors are always great lol
05:22:40FromDiscord<Elegantbeef> Aside from not compiling wat to wasm i have their exact code but mine errors... this is dumb
05:22:56FromDiscord<Girvo> That is really dumb :/
05:25:02FromDiscord<b1rdf00d> I'm doing wasm stuff too currently 😂 took my a while to figure out last night that building with threads on by default means you need to make your app "cross origin isolated" https://web.dev/coop-coep/↵↵Has anyone got this to work?
05:25:16FromDiscord<b1rdf00d> For now I just disabled threads
05:29:27FromDiscord<Elegantbeef> Oh whew the error is just cause I have WASI enabled
05:30:18FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=49jx
05:30:54FromDiscord<Elegantbeef> I cannot really say much b1rd, i'm using a local runtime and using it for plugin/scripting
05:31:34FromDiscord<b1rdf00d> That's cool 🙂 I'll work it out and post back
05:31:54FromDiscord<b1rdf00d> Are these plugins for your game/engine?
05:32:02FromDiscord<Elegantbeef> For a game like project
05:32:35*disso_peach joined #nim
05:32:40FromDiscord<Elegantbeef> to toy with wasm I have the idea to make a AI vs AI game that is controlled by wasm scripted AI
05:33:27FromDiscord<Elegantbeef> I had a runtime picked out but it started behaving weird so i've been looking at other ones
05:34:22FromDiscord<b1rdf00d> 😂 sounds pretty interesting! what are you using for ai? I want to explore doing some player vs/with ai stuff but I'm not sure what concept yet
05:34:22FromDiscord<Elegantbeef> wasmer is actually quite nice in many regards though 😄
05:34:35FromDiscord<Elegantbeef> What do you mean "what am i using for AI"
05:34:53FromDiscord<b1rdf00d> like pytorch/arraymancer/your own?
05:35:38FromDiscord<b1rdf00d> game ai is often still hand made as opposed to ML stuff yeah?
05:38:28FromDiscord<Elegantbeef> I mean the entire point is to let people write their own AI
05:39:49FromDiscord<b1rdf00d> _oh right!_
05:40:17FromDiscord<Elegantbeef> A player might be able to play with the AI but it's really just a turnbased tank arena game
05:40:39FromDiscord<b1rdf00d> this sounds cool
05:40:55FromDiscord<Elegantbeef> Only really cool if i can get a fucking runtime to work 😉
05:42:25FromDiscord<Elegantbeef> I just have to make it look purdy and people will toy with it is my hope
05:43:12FromDiscord<b1rdf00d> I think having an entry level to building a game ai would attract people
05:43:57FromDiscord<b1rdf00d> off the top of my head the other options are: board game of some kind, or star craft 1
05:44:44FromDiscord<Elegantbeef> Yea i mean it's basically a board game
05:45:00FromDiscord<Elegantbeef> It's turnbased an any action causes your move to be up
05:45:07madpropshttps://store.steampowered.com/app/280220/Creeper_World_3_Arc_Eternal/
05:45:32FromDiscord<Elegantbeef> Bad paste or is this in reference to something?
05:45:42madpropsreference to game ideas
05:46:11FromDiscord<Elegantbeef> I do have another much deeper game idea that uses wasm for a factorio like puzzle game
05:46:51FromDiscord<Elegantbeef> Each machine would be implemented in a wasm module so I can easily modify the game, but point would be to make a machine that gets your input to a designated output tile
05:47:12madpropsreminds me of https://store.steampowered.com/app/1302860/Assembly_Planter/
05:48:21FromDiscord<b1rdf00d> you could make a game based on plugging different wasm binaries together to make better binaries
05:48:56FromDiscord<b1rdf00d> end goal: build a wasm run time that hosts tge game
05:49:01FromDiscord<b1rdf00d> (edit) "tge" => "the"
05:49:23madpropsi invented a game from scratch once
05:49:24madpropsit's a terrible game
05:50:06FromDiscord<Elegantbeef> Yea madprops that's basically the game, just using wasm moddable components 😄
05:50:26FromDiscord<Elegantbeef> People generally like the games i make, so i pretend to be a good game designer
05:51:57madpropswhat's your best game?
05:52:03madpropslink me
05:52:28FromDiscord<Elegantbeef> I mean aside from game jams i only really have a single game https://jbeetham.itch.io/linerino
05:52:35FromDiscord<Elegantbeef> And even that is quite simplistic
05:52:42FromDiscord<Elegantbeef> But i know pmunch has been addicted to it
05:53:06FromDiscord<Girvo> Turning a heap allocated `string` to a `cstring` on the stack: copyMem from the string to the `var newStr: cstring`? Or is there a better way? ↵↵Probably just going to move to channels properly instead, but figured I'd ask anyway
05:54:55FromDiscord<Elegantbeef> copymem is the best way, perhaps strbasics aswell
05:55:01FromDiscord<Girvo> Ah I'll check strbasics too
05:55:04FromDiscord<Girvo> Cheers
05:55:36FromDiscord<Elegantbeef> Nevermind on strbasics it's all str lefthand
05:55:41FromDiscord<Girvo> Yep haha just checked
05:55:45FromDiscord<Girvo> copyMem it is!
05:55:54FromDiscord<Girvo> Oh well, makes it clear what and why at least
05:56:13FromDiscord<Elegantbeef> also 'to a cstring on the stack' is a scary sentence 😛
05:56:25FromDiscord<Girvo> 😛 welcome to embedded my friend
05:56:49FromDiscord<Girvo> Though I'm going to refactor this, it'll be to a static buffer instead shortly
05:57:27FromDiscord<Girvo> But need to keep moving and passing ref counted things to xQueueSend across thread boundaries still gives me the heebie jeebies
05:59:20FromDiscord<b1rdf00d> In reply to @Elegantbeef "I mean aside from": this is nice! I really liked these puzzles in Oracle of Ages. What did you use to make the graphics?
05:59:35FromDiscord<Elegantbeef> It's made in Nico with aseprite graphics
05:59:49FromDiscord<Elegantbeef> I have to credit @impbox [ftsf] with the graphics as they really made it look better than i did 😄
06:00:06FromDiscord<Elegantbeef> I drew them but impbox gave some good references on how they'd do it
06:00:15madpropsi don't get why i can't get the south tile https://i.imgur.com/7SnZYt9.jpg
06:01:14FromDiscord<Elegantbeef> You can only move on a tile if you have 1 move left
06:01:22madpropsohh ok
06:01:30FromDiscord<Elegantbeef> Moves indicated on your player and on the tile you started from
06:01:51FromDiscord<Elegantbeef> There might me multiple solutions to a puzzle but the hand crafted ones and the proc gen ones do not know if there are
06:04:04madpropsi like the mechanics
06:04:10madpropsseems straightforward enough
06:04:15madpropsbut not simple
06:05:17FromDiscord<Elegantbeef> I like to think of it as deceptively simple, since it's literally just "visit all the tiles" 😄
06:05:27FromDiscord<Elegantbeef> but when you're greeted with
06:05:27FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1014777992095993866/image.png
06:05:41FromDiscord<Elegantbeef> It's a bit more than simple
06:06:55madpropsoh nice it can be maximized
06:07:11madpropsi was playing in a small window
06:08:00madpropsare t he proc gen ones too hard?
06:08:12FromDiscord<Elegantbeef> There's a difficulty slider for them
06:08:44FromDiscord<Elegantbeef> Easy is like \<=20 tiles
06:09:00FromDiscord<Elegantbeef> big brain is like 30-40 tiles
06:10:12FromDiscord<Elegantbeef> The wonderful part about proc gen in this game is that the level generator is just a player that moves around using the same mechanics as you playing it, so it's deterministically capable of making a level whether it's interesting is another thing
06:12:08madpropsis it possible to make the wrong move very early in the game ?
06:12:08FromDiscord<b1rdf00d> yep that's cool, I want to do a similar thing to ensure proc gens levels are possible to complete
06:12:54FromDiscord<Elegantbeef> It is madprops, you can undo using z or fully rest using x
06:13:09madpropsyeah im just wondering because i got to a choke
06:13:15madpropsand i don't know if the problem was in the initial moves
06:13:18madpropsso im restarting it
06:15:34madpropsheh it's possible to get stuck if you teleport with 1 move left
06:16:09FromDiscord<b1rdf00d> In reply to @madprops "heh it's possible to": you can press z to undo
06:16:27madpropsyeah
06:17:32FromDiscord<Elegantbeef> I kinda do that for level complexity
06:17:34FromDiscord<Elegantbeef> Jesus this code is fugly
06:17:39FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=49jE
06:18:00FromDiscord<Elegantbeef> Yea it's not full stuck, it's just not capable of backtracking, there really isnt a good solution to that problem
06:18:32madpropsyeah it's just a funny thing
06:20:31madpropsthis one is interesting https://i.imgur.com/lWtZV90.jpg
06:23:14madpropsnext one is harder
06:26:10madpropsif you land on them https://i.imgur.com/mXXwlyE.jpg
06:26:20madpropson a refill square
06:27:20FromDiscord<b1rdf00d> In reply to @Elegantbeef "The dumb solution is": I've done a similar thing before and it works so 🤷
06:33:20madpropsit can be a bit hard to see how many squares are left if the active square is on the other side of the map
06:35:37madpropsok im done playing but it's fun
06:36:01madpropsbaba is you players would like it
06:39:03FromDiscord<retkid> please tell me theres a better way
06:39:06FromDiscord<retkid> sent a code paste, see https://paste.rs/3r7
06:39:34FromDiscord<d4rckh> any cool scripting lang i can embed into my nim program?
06:39:42FromDiscord<retkid> yea its called python
06:40:03FromDiscord<retkid> or bash if you're bold
06:40:40FromDiscord<d4rckh> does the python lib require python installed?
06:40:59FromDiscord<d4rckh> (edit) "does the python lib require python ... installed?" added "to be"
06:41:24FromDiscord<retkid> how else would it work
06:41:25FromDiscord<d4rckh> i want to have the scripts call nim functions
06:41:36FromDiscord<retkid> well
06:41:39FromDiscord<retkid> I use bash for that
06:41:50FromDiscord<retkid> just program your stuff to work with std
06:41:57FromDiscord<retkid> then you can pipe and do everything you could ever want
06:42:11FromDiscord<retkid> python has interop in nim already done tho
06:42:21FromDiscord<retkid> its probably the only scripting language thats big that has it
06:45:30FromDiscord<Rika> You can embed a NimScript VM into your program
06:45:42FromDiscord<retkid> i thought that was a meme
06:46:56FromDiscord<retkid> i dont think thats what they want tho
06:47:17madpropsis ruby an option at all Rika ?
06:47:24FromDiscord<Rika> I don’t know
06:47:52FromDiscord<retkid> > Ruby
06:47:56FromDiscord<retkid> have we stooped that low
06:47:59FromDiscord<d4rckh> https://github.com/jangko/nimLUA
06:48:05FromDiscord<d4rckh> lua is an option 😄
06:48:13madpropsim liking ruby >_<
06:48:37madpropsas a scripting language
06:49:31FromDiscord<retkid> In reply to @d4rckh "https://github.com/jangko/nimLUA": https://media.discordapp.net/attachments/371759389889003532/1014789078874587156/unknown.png
06:49:36FromDiscord<retkid> yo nim JVM when
06:49:45FromDiscord<Rika> How many times
06:49:46FromDiscord<retkid> wait that was a thing
06:49:47FromDiscord<retkid> and I did that
06:49:49FromDiscord<retkid> oh
06:49:53FromDiscord<retkid> i forgot
06:50:10FromDiscord<retkid> why did i try to do that again
06:50:54FromDiscord<retkid> you see this https://media.discordapp.net/attachments/371759389889003532/1014789429388386415/unknown.png
06:51:01FromDiscord<retkid> if java had this it might be usable \
06:51:09FromDiscord<retkid> (edit) removed "\"
06:55:01*rockcavera quit (Remote host closed the connection)
06:56:06FromDiscord<retkid> i hate my code and love it at the same time, its so pretty and elegant and frustratingly complex at the same time
06:56:41madpropslink?
06:56:49FromDiscord<retkid> maybe tomorrow
06:56:53FromDiscord<retkid> writing unit tests
06:59:25FromDiscord<d4rckh> good boi, writing tests
07:00:03FromDiscord<retkid> i want a job
07:00:07FromDiscord<retkid> im only doing this for that
07:00:13FromDiscord<retkid> otherwise Im sure my code works fine
07:00:41FromDiscord<retkid> im kinda obsessive about testing my code
07:00:47FromDiscord<Rika> If you want a job you wouldn’t want to be writing Nim no?
07:00:56FromDiscord<retkid> this is why next project wont be in nim
07:01:10FromDiscord<retkid> probably R
07:01:14FromDiscord<d4rckh> i getting a green ticks so i write a lot of tests
07:01:17FromDiscord<d4rckh> (edit) "i ... getting" added "like"
07:01:33FromDiscord<retkid> but idk if R is general purpose or not
07:01:42FromDiscord<retkid> writing a game in R sounds like the worst best idea
07:01:53FromDiscord<d4rckh> isnt R used for analyzing data?
07:02:10FromDiscord<d4rckh> like pandas in python
07:02:14FromDiscord<d4rckh> but all the functions are built in
07:02:18FromDiscord<Rika> R is not general purpose
07:02:20FromDiscord<retkid> shite
07:02:24FromDiscord<enthus1ast> R is used to make your brain explode
07:02:26FromDiscord<retkid> I already did all of that in nim
07:02:26FromDiscord<Rika> You will be writing analytical data systems or whatnot
07:02:31FromDiscord<retkid> .-.
07:02:37FromDiscord<retkid> I can use R here but
07:02:40FromDiscord<retkid> i dont wanna... do this anymore
07:02:48FromDiscord<retkid> this project is hurting my brain
07:02:51FromDiscord<d4rckh> just embed R in nim
07:02:53FromDiscord<retkid> yea
07:02:58FromDiscord<retkid> i would if i continued this project
07:02:59FromDiscord<Rika> R is definitely (I guess almost) never used for anything but data analysis
07:03:13FromDiscord<enthus1ast> R is kinda different, but very powerful
07:03:15FromDiscord<Rika> In reply to @retkid "this project is hurting": Split it into smaller goals
07:03:59FromDiscord<enthus1ast> and its somehow based on tabular data structures called data frames
07:04:04FromDiscord<retkid> the smaller goals are statistical analysis of the corruption of the data, make a system to identify it, then use hamming codes to reduce corruption to sub 3%
07:04:16FromDiscord<retkid> but
07:04:18FromDiscord<retkid> i need to read books
07:04:20FromDiscord<retkid> to do this
07:04:35FromDiscord<retkid> and this project has been in my brain since january
07:04:37FromDiscord<retkid> i want to be done
07:04:54FromDiscord<Rika> I don’t remember the last time I had a project where I didn’t need to read a book or an article or two
07:05:14FromDiscord<retkid> I usually fumble my way around it like drunk dark sex
07:05:16FromDiscord<Rika> Or a few data sheets
07:05:22FromDiscord<retkid> eventually it comes out but it takes a bit
07:05:38FromDiscord<Rika> M8 you don’t sound old enough to be having sex
07:05:41FromDiscord<enthus1ast> i can recommend https://benwhalley.github.io/just-enough-r/
07:05:44FromDiscord<retkid> im 19 .-.
07:06:18FromDiscord<retkid> Rika i know im incredibly immature but im an adult
07:06:19FromDiscord<retkid> somehow
07:06:26FromDiscord<retkid> its quite scary
07:06:40FromDiscord<Rika> I know
07:07:08FromDiscord<Rika> I’m not sure what you’re doing exactly to have put you in some state of despair
07:07:37FromDiscord<retkid> family life sucks
07:07:43FromDiscord<retkid> need job to escape
07:07:57FromDiscord<retkid> dedicated the last year to nim
07:08:04FromDiscord<retkid> (edit) "dedicated the last year to nim ... " added "and js"
07:08:24FromDiscord<retkid> all reasons for depression
07:09:52FromDiscord<Rika> Well I’m no counsellor so
07:11:03FromDiscord<retkid> next project will be Odin or Haskell
07:11:12FromDiscord<retkid> I liked F# but it was a pain in the ass to write
07:11:18FromDiscord<retkid> anyway this is offtopic, sorryu
07:11:29*PMunch joined #nim
07:11:29FromDiscord<Elegantbeef> Neither of those are overly better for a job
07:11:37FromDiscord<retkid> what do i do then
07:11:56FromDiscord<d4rckh> how can i make threads use windows thread instead of the libwinpthread?
07:12:01FromDiscord<d4rckh> (edit) "libwinpthread?" => "libwinpthread-1.dll?"
07:12:07FromDiscord<d4rckh> (edit) "thread" => "threads"
07:12:07FromDiscord<creikey> In reply to @retkid "what do i do": probably start networking using your ineteresting nim projects
07:12:23FromDiscord<retkid> In reply to @creikey "probably start networking using": Thats what I bee doing but nobody care .-.
07:12:26FromDiscord<Elegantbeef> If you really want a job webdev is the way to go 😄
07:12:28FromDiscord<Rika> Networking or start using a popular language
07:12:39FromDiscord<retkid> i use node
07:12:41FromDiscord<retkid> i like node
07:12:44FromDiscord<retkid> i have big projects in node
07:12:48FromDiscord<Rika> Then go try for a job in Node
07:12:53FromDiscord<retkid> they still ignore me
07:12:55FromDiscord<retkid> .-,.
07:12:56FromDiscord<Rika> Why
07:12:58FromDiscord<retkid> (edit) ".-,." => ".-."
07:13:00FromDiscord<Rika> Do you have no resume
07:13:08FromDiscord<retkid> i have a pretty interesting resume
07:13:16FromDiscord<Rika> Then send it to a few tens of companies
07:13:24FromDiscord<creikey> In reply to @retkid "Thats what I bee": it's very hard to start in an oversaturated field like software engineering, you aren't odd for having a tough time
07:13:25FromDiscord<Elegantbeef> Rika no flame↵(@Rika)
07:13:26FromDiscord<retkid> I've been doing that since may or so
07:13:26FromDiscord<Elegantbeef> 😄
07:13:46FromDiscord<creikey> basically if you want a job with no real experience you need to have an in, like a person who will hire you
07:13:49FromDiscord<Rika> In reply to @Elegantbeef "Rika no flame (<@259277943275126785>)": I have no idea how it works over there so
07:13:50FromDiscord<creikey> because you know them
07:13:53FromDiscord<creikey> uploading resume pdfs does like nothing
07:14:06FromDiscord<retkid> yea
07:14:13FromDiscord<Rika> Job culture here in Japan is very drastically different
07:14:28FromDiscord<retkid> I have systematically retreated from programming circles because I only joined them for help
07:14:42FromDiscord<retkid> and... as you grow... it becomes more and more superfluous
07:14:48FromDiscord<creikey> my greatest accomplishment is 3 years ago the lead of youtube VR said my PR for godot was "nice"
07:14:49FromDiscord<retkid> In reply to @Rika "Job culture here in": and scary
07:14:53FromDiscord<creikey> I've been riding off that high ever since
07:15:06FromDiscord<retkid> i would cry
07:15:21FromDiscord<retkid> a google engineer told me my node code was "archaic and disgusting"
07:15:34FromDiscord<creikey> In reply to @retkid "a google engineer told": it is what it is
07:15:47FromDiscord<retkid> but she fixed me
07:15:52FromDiscord<creikey> I spent like 1 week reverse engineering android apk manifest bytecode all for that one thumbs up on github
07:16:04FromDiscord<Rika> In reply to @retkid "but she fixed me": “I can fix him”
07:16:11FromDiscord<Elegantbeef> Wait people compliment code and dont jusut shit on it?
07:16:12FromDiscord<retkid> she fixed me, then broke my heart
07:16:18FromDiscord<retkid> its google man
07:16:19FromDiscord<retkid> they evil
07:16:22FromDiscord<Rika> In reply to @Elegantbeef "Wait people compliment code": Lol
07:16:31FromDiscord<creikey> In reply to @Elegantbeef "Wait people compliment code": I know I should've like connected with him on linkedin or something, missed opportunity
07:16:35FromDiscord<retkid> In reply to @Elegantbeef "Wait people compliment code": I've complimented your code before
07:16:51FromDiscord<retkid> you've just shitted on my code tho
07:16:54FromDiscord<creikey> In reply to @retkid "they evil": at least 10% of google software works though
07:17:02FromDiscord<Elegantbeef> I dont know why. It always looks like what my dog leaves after eating
07:17:09FromDiscord<retkid> it would be 20% if they stopped fucking using python
07:17:18FromDiscord<Rika> ?
07:17:31FromDiscord<Rika> What’s wrong with Python at their level?
07:18:49FromDiscord<retkid> python at large scales is just...
07:18:52FromDiscord<retkid> i dont like it
07:19:08FromDiscord<creikey> In reply to @Rika "What’s wrong with Python": In my experience python makes it very easy to write poorly architected code which breaks in mysterious ways the more complicated the program gets
07:19:17FromDiscord<retkid> exactly
07:19:20FromDiscord<retkid> beyond like 300 lines of code
07:19:22FromDiscord<Rika> In reply to @creikey "In my experience python": I know that well enough lol
07:19:26FromDiscord<retkid> python just becomes mush
07:19:34FromDiscord<creikey> if everybody is like 10 years experience python and they know what they're doing maybe it doesn't matter
07:19:53FromDiscord<Rika> I’m maybe about 4 or so
07:19:54FromDiscord<retkid> i cant imagine what 10 years of python would do to someone
07:20:14FromDiscord<creikey> In reply to @retkid "i cant imagine what": actually gods. people with 10 years of numpy/python can just spit out the matrix multiplies to do anything, and it runs really fast
07:20:28FromDiscord<Rika> Well that side of Python is another thing
07:20:29FromDiscord<retkid> 10 years of numpy is a demon
07:20:33FromDiscord<creikey> that's true
07:20:40FromDiscord<retkid> thats how you make a monster
07:20:47FromDiscord<retkid> https://tenor.com/view/coronavirus-out-of-this-house-cross-get-out-gif-16681717
07:20:52FromDiscord<creikey> I think my most mind blowing part of python was finding out classes are objects, and that one trick with the class objects with singletons
07:21:16FromDiscord<retkid> in 3 years of python I've never written a single class
07:21:26FromDiscord<creikey> In reply to @retkid "in 3 years of": I don't understand how this is possible
07:21:27FromDiscord<Rika> What
07:21:31FromDiscord<Rika> The FUCK have you been doing
07:21:42FromDiscord<retkid> for example
07:21:48FromDiscord<Elegantbeef> Also retkid dont worry i've seen some code on nim's codewars that really makes me question my sanity
07:21:50FromDiscord<Rika> I’m reminded of myself when I started Python
07:21:53FromDiscord<creikey> you guys my genetic simulation in nim and arraymancer has actually learned some things
07:22:04FromDiscord<retkid> until like 2 months ago i didn't know what a 2 dimensional array was
07:22:07FromDiscord<retkid> until arraymancer taught me
07:22:08FromDiscord<Rika> Your simulation can learn things?
07:22:23FromDiscord<creikey> In reply to @Rika "Your simulation can learn": yeah average creature lifespan has doubled after 14 hours of simulation time
07:22:24FromDiscord<retkid> genetic algorithms learn things
07:22:32FromDiscord<Rika> Oh you mean that way
07:22:33FromDiscord<retkid> for survival
07:22:33FromDiscord<Rika> Okay
07:22:40FromDiscord<Rika> My brain didn’t connect that for a moment
07:22:46FromDiscord<creikey> In reply to @retkid "genetic algorithms learn things": my special idea with this though is a genetic algorithm where the creatures learn to remember things
07:22:46FromDiscord<Elegantbeef> creikey are we at levels of deepbeef saying bullshittery?
07:22:58FromDiscord<creikey> In reply to @Elegantbeef "creikey are we at": I wish I could make deepbeef but the bot I made has not been added
07:23:09FromDiscord<Rika> Can we have a very bad sarcasm and humour bot that’s just trained on beef’s messages
07:23:11FromDiscord<retkid> In reply to @creikey "my special idea with": hmmmmmmmmmmmmm
07:23:11FromDiscord<creikey> In reply to @creikey "my special idea with": recurrent neural network instead of perceptron
07:23:18FromDiscord<Elegantbeef> That was the point of deepbeef rika
07:23:31FromDiscord<creikey> deepbeef wouldnt' even be hard, I already did that with a friend of mine and it was sooo funny
07:23:37FromDiscord<Rika> I’ve never heard of it so I assume I wasn’t there when you discussed it
07:23:51FromDiscord<creikey> the AI made up a new word that like he would say, it was incredibly funny
07:23:52FromDiscord<Elegantbeef> Rika you've laughed at my jokes, so you dont get to call it "very bad sarcasm and humour"
07:24:11FromDiscord<creikey> In reply to @retkid "hmmmmmmmmmmmmm": I'm gonna make a visualizer to track a creature's memory over time to see if it actually uses it, I think the simulation is too simple right now for that to be happening
07:24:13FromDiscord<retkid> @creikey basically you want a creature to become prometheus and steal fire from the heavens, and learn some trick to extending lifespan
07:24:16FromDiscord<Rika> Dude what do you mean, I never denied that I had a similar sense
07:24:26FromDiscord<Elegantbeef> accepting even one joke validates all!
07:24:32FromDiscord<Rika> Sure
07:24:40FromDiscord<retkid> if you make memory finite and have a changing enviroment
07:24:44FromDiscord<retkid> you can track when things get forgotten
07:25:02FromDiscord<creikey> In reply to @retkid "you can track when": well no right now I'm not sure there's much reason for the creatures to evolve intelligent use of memory
07:25:07FromDiscord<creikey> that's what I meant by make the simulation more complex
07:25:21FromDiscord<retkid> yes
07:25:27FromDiscord<retkid> im giving ideas
07:25:40FromDiscord<creikey> it's open source i'll send it to once I push my changes right now
07:25:43FromDiscord<retkid> memory should be finite, some should get passed down between generations and some should die
07:25:44FromDiscord<Rika> Honestly the more I work on programming jobs the more I desire just moving to some forest and opening a mechanic shed shop or something
07:25:52FromDiscord<creikey> I'm thinking I might add some UI so you can play with it and put it on itch for a dollar because I need money
07:26:10FromDiscord<Elegantbeef> Come make a wood furniture shop here and i'll join↵(@Rika)
07:26:18FromDiscord<creikey> In reply to @retkid "memory should be finite,": the memory is copied on mutation, but the weights and biases are changed
07:27:22FromDiscord<retkid> make a way to store memory outside of people, then see them develop libraries
07:27:55FromDiscord<retkid> i would steal your idea if it wasn't open source and i should just work on it myself
07:28:01*GreaseMonkey quit (Remote host closed the connection)
07:28:05FromDiscord<Rika> In reply to @Elegantbeef "Come make a wood": If it’s Canada I’d deffo be fixing bikes lmao
07:28:20FromDiscord<creikey> In reply to @retkid "make a way to": it's hard to make a genetic simulation learn behavior this complex because as number of parameters increase so does "training time"
07:28:29FromDiscord<Elegantbeef> You'd think, but unless you're in a city there are very few bikes
07:28:38FromDiscord<Elegantbeef> Bikes are for those hippies
07:28:41FromDiscord<creikey> so I've done some cursory optimations to make it run around 5x faster than real time, I think there's the possibility for a lot more
07:28:53FromDiscord<Elegantbeef> dude your code runs in the future?
07:29:01madpropsdon't lobotomize your creatures >_<
07:29:06FromDiscord<creikey> In reply to @Elegantbeef "dude your code runs": true
07:29:08*greaser|q joined #nim
07:29:11FromDiscord<Rika> In reply to @Elegantbeef "You'd think, but unless": Heard there are plenty of bike parks near the cities so
07:29:24FromDiscord<creikey> In reply to @madprops "don't lobotomize your creatures": I wonder if I could have them change their brain architecture over time, and the bigger brain consumes more food or something
07:29:26FromDiscord<creikey> that would be interesting
07:29:34FromDiscord<creikey> then it would optimize for the right brain size instead of me just picking it
07:29:53FromDiscord<creikey> although I still have no way to properly profile this so I have no idea if their brain thinking is actually impacting performance
07:29:59FromDiscord<Elegantbeef> There probably are, but i'm in bumfuckery country very few people use bikes for transport and mainly just as exercise here
07:30:05FromDiscord<creikey> I made my own profiling tool and it says it doesn't so I don't think it does, but I think my profiling tool could also be bugged
07:30:45FromDiscord<Elegantbeef> Well what's your profiling tool do?
07:30:54FromDiscord<creikey> here I'll send the file on github
07:30:56FromDiscord<creikey> just what I said yesterday
07:31:07FromDiscord<creikey> In reply to @creikey "here I'll send the": once I finish adding this camera and memory visualization
07:31:36FromDiscord<creikey> dude i need to go to bed and work on my game I'm trying to release instead of this but it's so cool
07:32:54FromDiscord<b1rdf00d> In reply to @Rika "If it’s Canada I’d": There was a cool co-op bike mechanic when I was in Calgary 12 years ago. Riding in -20c in the snow was interesting
07:33:37FromDiscord<Rika> In reply to @Elegantbeef "There probably are, but": I mean that’s what I mean, people who use it for fun
07:33:40FromDiscord<Rika> Not for transport
07:33:44FromDiscord<Elegantbeef> Ah
07:33:53FromDiscord<Elegantbeef> B1rd all the way down in yeehaw country?
07:35:17FromDiscord<Rika> All this real life talk has gotten me stressed now
07:36:43FromDiscord<creikey> I wonder what a really nice nim editing environment made in nim would look like
07:36:51FromDiscord<creikey> vscode with nimsuggest has random 3 second stutters while I type
07:37:02FromDiscord<Rika> One with a working suggestion engine would be nice
07:37:17FromDiscord<creikey> I spent like an hour setting up neovim because I thought it would be faster but it had the same latency, I think nimsuggest just struggles
07:37:30FromDiscord<Elegantbeef> nimsuggest v3 soonTM
07:37:48FromDiscord<creikey> I'm not even sure I understand nim's architecture, from what I understand on file save it reanalyzes every nim file used right?
07:38:10FromDiscord<creikey> I mean that's never going to be fast if the language is complicated and the libraries get big, it should be like only reanalyzing what's changed I'd imagine
07:38:34FromDiscord<Elegantbeef> I mean that's what IC is for, but IC is still not usable
07:38:45FromDiscord<Elegantbeef> nimsuggest v3 also helps there
07:38:54FromDiscord<Elegantbeef> But still not in a stable release
07:40:26FromDiscord<creikey> honestly I would prefer some compromises in a language, but the editor and debugging is just incredible
07:40:46FromDiscord<creikey> I feel like that's much better than needing to type slightly more because you don't have gigantic macro DSL for your objects
07:41:09FromDiscord<b1rdf00d> In reply to @Elegantbeef "B1rd all the way": Yeah I’m from Australia so I had no idea what I was getting myself into. Snowboarding in Banff was fun
07:41:12FromDiscord<Rika> I personally haven’t minded the lack of editor support or anything
07:41:15FromDiscord<Rika> Not sure why exactly
07:41:25FromDiscord<Rika> Maybe too used to using bone stock vim and stuff
07:41:36FromDiscord<creikey> In reply to @Rika "I personally haven’t minded": I come from game development where you really need something like that to be productive in a lot of codebases
07:41:56FromDiscord<Rika> Well I’m coming from backend web development so I don’t know about you
07:42:13FromDiscord<Rika> I guess I’m just patient with reading? I don’t know
07:42:32FromDiscord<creikey> In reply to @Rika "I guess I’m just": I mean right now I just dislike the stuttering as I type, aggravating
07:42:47FromDiscord<Rika> Stuttering? What do you mean
07:42:54FromDiscord<Rika> As in it actually lags your editorB
07:42:57FromDiscord<Rika> (edit) "editorB" => "editor?"
07:43:01FromDiscord<creikey> In reply to @Rika "I guess I’m just": but on some level I noticed I would often make mistakes and wrong assumptions while reading code, this is where bugs come from, good debugger can show you program state you didn't realize you were wrong about
07:43:03FromDiscord<Rika> That’s just a bad editor then no?
07:43:04FromDiscord<creikey> In reply to @Rika "As in it actually": yes in vscode
07:43:07FromDiscord<creikey> and in vim
07:43:14FromDiscord<Rika> Haven’t had that issue in neovim
07:43:21FromDiscord<Elegantbeef> Nimsuggest should only run on save
07:43:29FromDiscord<creikey> I think it's because I use arraymancer so nimsuggest slugs
07:43:39FromDiscord<creikey> for their GRU layer
07:43:51FromDiscord<Rika> In reply to @creikey "but on some level": Maybe my way of debugging is good enough to make me not waste 5 hours on a bug 😛
07:43:53FromDiscord<creikey> In reply to @Elegantbeef "Nimsuggest should only run": in vim it seems to be trying to run as I type to get suggestions
07:44:10FromDiscord<Elegantbeef> I mean it would be but it's not recompiling it's just suggesting symbols
07:44:18FromDiscord<Elegantbeef> That's not a complex task
07:44:25FromDiscord<creikey> In reply to @Rika "Maybe my way of": I don't understand, are you saying I spent 5 hours on a bug one time?
07:44:29FromDiscord<Rika> No
07:44:34FromDiscord<Rika> Some people do though
07:44:52FromDiscord<creikey> I've spent so long on such stupid bugs so many times I think it's just how the software world is at this time
07:45:00FromDiscord<Rika> Perhaps
07:45:03FromDiscord<creikey> disappointing
07:45:12FromDiscord<creikey> imagine if that didn't happen
07:45:23FromDiscord<creikey> https://tenor.com/view/car-flying-car-coche-automobil-coche-volando-gif-19204586
07:46:07FromDiscord<Rika> Programming interfaces which are fool friendly, hmm
07:47:06FromDiscord<creikey> In reply to @Rika "Programming interfaces which are": golang tried to do this but I've used golang to ship production stuff before, although it is quite reliable and I do get things done the experience of programming in go is kind of sad. the google sheets API is pretty bad
07:47:32FromDiscord<Rika> I don’t know man, interface{} doesn’t sound too fool friendly to me
07:48:09FromDiscord<creikey> In reply to @Rika "I don’t know man,": yeah that was actually pretty discerning in a lot of the code that I wrote, probably weakest point in golang
07:48:32FromDiscord<Rika> It was the one thing that really pushed me away from it
08:03:02FromDiscord<creikey> why does running without --debugger:native freeze my program but with it it works fine 😭
08:34:08*rb quit (Quit: ZNC - https://znc.in)
08:34:24*rwb joined #nim
08:36:16*cornfeedhobo quit (Quit: ZNC - https://znc.in)
08:47:17*cornfeedhobo joined #nim
09:01:30*rwb is now known as rb
09:02:29FromDiscord<creikey> beef, this is my profiler: https://github.com/creikey/recurrent-evolution/blob/main/src/profile.nim anything look wrong? I think cpuTime is not the right way to do this because I'm getting a negative number for some blocks of my prgoram
09:02:30FromDiscord<creikey> (edit) "prgoram" => "program"
09:05:31FromDiscord<Elegantbeef> Firstly use monotimes it's much much cheaper
09:07:28FromDiscord<Elegantbeef> Secondly you can just do `some(val)` `none(type)`
09:10:16FromDiscord<Elegantbeef> You `lastTotalTime` calculation makes no sense
09:12:48FromDiscord<creikey> In reply to @Elegantbeef "Secondly you can just": 6\lib\pure\options.nim(148, 12) Error: cannot instantiate: 'T'
09:12:52FromDiscord<creikey> I get this compiler error when I do that
09:13:02FromDiscord<creikey> oh none type
09:13:34FromDiscord<creikey> In reply to @Elegantbeef "You `lastTotalTime` calculation makes": what I want is the time spent in each function ,but not spent in other profiling blocks
09:14:17FromDiscord<creikey> In reply to @Elegantbeef "Firstly use monotimes it's": oh wow monotime is a lot better
09:14:35FromDiscord<creikey> I saw that treeform's profiler used it and thought I should probably do the same
09:14:55FromDiscord<creikey> (edit) "profiler" => "benchy"
09:15:26FromDiscord<Elegantbeef> Also any reason you have `profileStart` and `profileEnd` public?
09:15:33FromDiscord<creikey> In reply to @Elegantbeef "Also any reason you": so that the template works
09:15:42FromDiscord<Elegantbeef> Templates bind scope
09:16:00FromDiscord<creikey> In reply to @Elegantbeef "Templates bind scope": I got a compile error when they weren't public I thnk
09:16:02FromDiscord<creikey> (edit) "thnk" => "think"
09:16:10FromDiscord<Elegantbeef> You can also do `bind profileStart, profileEnd`
09:19:16FromDiscord<Elegantbeef> I also dont know about the `deque` usage
09:19:36FromDiscord<creikey> In reply to @Elegantbeef "I also dont know": do you get why I want it though? fixed number of samples of execution time
09:19:54FromDiscord<creikey> I have no idea why but the recurrent_evolution.nim completely hangs in `nim r`, but runs fine with `nim --debugger:native r`
09:19:54FromDiscord<Elegantbeef> Given this is ostensibly in a the hotpath is it better than just a sequence stack?
09:20:16FromDiscord<creikey> In reply to @Elegantbeef "Given this is ostensibly": what do you mean sequence stack?
09:20:34FromDiscord<Elegantbeef> `seq[float]` instead of `Deque[float]`
09:20:37FromDiscord<creikey> I need to remove the time spent in profileStart and profileEnd from the calculations as well, haven't done that
09:21:02FromDiscord<creikey> In reply to @Elegantbeef "`seq[float]` instead of `Deque[float]`": seq.remove(first) or whatever it is is worse than dequeue though, for thousands of samples (which I might want)
09:21:08FromDiscord<creikey> also cleaner to just use a deque and not have to worry about that
09:21:16FromDiscord<Elegantbeef> dont you always pop though?
09:21:28FromDiscord<creikey> In reply to @Elegantbeef "dont you always pop": what do you mean pop what?
09:21:50FromDiscord<Elegantbeef> It's a FILO queue?
09:22:03FromDiscord<creikey> no the samples is a FIFO
09:22:23FromDiscord<creikey> I mean I don't care what order it is I just need fixed buffer size + constant insert
09:22:35FromDiscord<creikey> because I average them all anyways, order doesn't matter
09:23:08FromDiscord<Elegantbeef> Eh i misread code
09:23:31FromDiscord<creikey> In reply to @Elegantbeef "You `lastTotalTime` calculation makes": this calculation seems to work though, the test I made if you run the file as an executable works
09:23:41FromDiscord<creikey> I should make it an actual test with asserts
09:25:51FromDiscord<Elegantbeef> Also if you want to make your printing a tinge faster make `results` an iterator instead of a table 😄
09:26:15FromDiscord<creikey> In reply to @Elegantbeef "Also if you want": I wanted to do asserts on values of the table for testing
09:26:39FromDiscord<Elegantbeef> You still can with a sequence
09:26:40FromDiscord<creikey> I found out why it was hanging in just `nim r`, the simulation was running slower than real time so it spent forever trying to catch up
09:26:43FromDiscord<Elegantbeef> i mean iterator and toseq
09:27:22FromDiscord<Elegantbeef> also you probably should put a \`\`when defined(profiling)\` inside the profile template
09:27:31FromDiscord<creikey> yeah that's better
09:27:41FromDiscord<Ducko> is there a way not to get cmd (on windows) to not open when running the compiled exe, and just have it output only if it's being ran in cmd? i know there's `--app:gui` but then that just gives no output at all even when running in an already open cmd session. thanks!
09:27:45FromDiscord<Elegantbeef> My tired brain cannot see much wrong with this presently
09:28:10FromDiscord<creikey> In reply to @Elegantbeef "My tired brain cannot": now there's all the squiggles when I do this https://media.discordapp.net/attachments/371759389889003532/1014829009655320666/unknown.png
09:28:25FromDiscord<Elegantbeef> Inside the template
09:28:35FromDiscord<creikey> yeah I was hoping with the variables too
09:28:44FromDiscord<creikey> but because they aren't accessible outside the module it's not necessary
09:28:54FromDiscord<Elegantbeef> The squiggles are cause you dont have the config.nims to define profiling
09:29:11FromDiscord<creikey> yeah, then wouldn't it always profile ?
09:29:18FromDiscord<creikey> I would have to configure nimsuggest cmdline arguments in my editor
09:29:24FromDiscord<creikey> too annoying
09:29:27FromDiscord<Elegantbeef> The tooling uses the config.nims
09:29:36FromDiscord<creikey> same with cli right?
09:29:40FromDiscord<Elegantbeef> How is it supposed to know what define to go through
09:29:51FromDiscord<Elegantbeef> The cli does use the config yes
09:30:09FromDiscord<Elegantbeef> You might be able to do `when defined(nimsuggest)` but i dont know
09:31:05FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/Y2r
09:31:30FromDiscord<creikey> I think the bigger problem is the code doesn't compile but is still imported
09:32:06FromDiscord<creikey> I wish I had like a heatmap in my editor for which lines took the longest to execute
09:32:11FromDiscord<Elegantbeef> Wrap all the procedures with the define aswell
09:32:24FromDiscord<creikey> yeah
09:36:50FromDiscord<creikey> just realized that this profiling is useless, what I want is to see how much time each block is executing per frame
09:37:07FromDiscord<creikey> so I want to just add to that block's time then manually call a function on end of frame or something
09:57:13FromDiscord<Nalmyth> I'm guessing there's no way to return a variant of types from a nim function?
09:57:23FromDiscord<Nalmyth> sent a code paste, see https://play.nim-lang.org/#ix=49ky
09:57:42FromDiscord<Nalmyth> sent a code paste, see https://play.nim-lang.org/#ix=49kz
10:02:35FromDiscord<Ducko> In reply to @Ducko "is there a way": this thread talks about using `echo` and `--app:gui` but I get no output so unsure
10:02:36FromDiscord<retkid> how do i assign to variables to one output
10:02:39FromDiscord<Ducko> (edit) "In reply to @Ducko "is there a way": this thread talks about using `echo` and `--app:gui` but I get no output so unsure ... " added "https://forum.nim-lang.org/t/7320"
10:02:44FromDiscord<retkid> let x, y = proc()
10:02:48FromDiscord<retkid> i forget
10:03:03FromDiscord<retkid> (edit) "let x, y = proc() ... " added ": (int, int)"
10:04:04FromDiscord<Ducko> (edit) "https://forum.nim-lang.org/t/7320" => "https://forum.nim-lang.org/t/7320. `stdout.write` doesn't work either"
10:07:32FromDiscord<retkid> i got it
10:07:34FromDiscord<retkid> gotta be a tuple
10:07:36FromDiscord<retkid> :)
10:11:24FromDiscord<planetis> In reply to @Nalmyth "I'm guessing there's no": You need this https://nim-lang.github.io/Nim/manual.html#types-object-variants
10:12:03FromDiscord<kaddkaka> Hi, if I want to update nim version, can I ran `curl https://nim-lang.org/choosenim/init.sh -sSf | sh`?
10:13:28FromDiscord<planetis> no clue, I just clone the nim repo then run ./build_all_sh
10:13:42FromDiscord<planetis> (edit) "./build_all_sh" => "./build_all.sh"
10:31:28FromDiscord<aru> never used it, but what about choosenim?
10:31:35FromDiscord<kaddkaka> didnt update, still at 1.6.0 (`via :crown: v1.6.0 via :crystal_ball: v1.5.0` aha! I wanted to ask what the emojis was for now I know, `nim` and `crystal`!)
10:32:23FromDiscord<kaddkaka> maybe 1.6.0 is latest stable?
10:32:33FromDiscord<aru> 1.6.6 is
10:33:01FromDiscord<kaddkaka> (I havent used choosenim before) `choosenim stable` did not upgrade
10:34:48PMunch`choosenim update stable`
10:35:09PMunch`choosenim stable` just selects the last stable branch you installed
10:36:14FromDiscord<kaddkaka> thanks 🙂
10:44:09FromDiscord<Ducko> sent a code paste, see https://play.nim-lang.org/#ix=49kG
10:47:24PMunch@Ducko, maybe make a comment in the winim documentation about that and create a PR?
11:00:50FromDiscord<b1rdf00d> I have been thinking it'd be pretty handy if we could capture the information on discord and turn it into docs. Like maybe if there was a question template and some discord bot?
11:03:30FromDiscord<Ducko> In reply to @PMunch "@Ducko, maybe make a": do you know where i should? i just started nim a few days ago haha
11:03:41FromDiscord<Ducko> don't know where's the best place to add this random tip
11:05:35FromDiscord<Ducko> also looks like docs/ is generated but unsure where from
11:10:26FromDiscord<Ducko> made a PR to add to examples/ https://github.com/CanadaHonk/winim/pull/1
11:11:34FromDiscord<Ducko> made a pr to add it to examples/ https://github.com/khchen/winim/pull/95
11:29:15PMunch@Ducko, yeah I guess that's a fair place to put it :)
11:30:25FromDiscord<Ducko> cool, thanks
11:32:05FromDiscord<dom96> In reply to @kaddkaka "thanks 🙂": run `choosenim --help` to see the commands with examples :)
11:33:17FromDiscord<Ras> holy necro
11:33:18FromDiscord<Ras> https://forum.nim-lang.org/t/566#61920
11:34:16FromDiscord<retkid> whats the proc to convert an int to a hex encoded character
11:34:47FromDiscord<dom96> In reply to @Ras "https://forum.nim-lang.org/t/566#61920": 8 years later, that must be a new record
11:38:08*arkurious joined #nim
11:38:14FromDiscord<dom96> interesting link too
11:44:36FromDiscord<retkid> i like this tho https://media.discordapp.net/attachments/371759389889003532/1014863337034633226/unknown.png
11:44:51FromDiscord<retkid> it makes me happy when i get to use it
11:45:01FromDiscord<retkid> but the only chance i got to use it i decided not to for clarity
11:45:21FromDiscord<Superstart033> : <- this is bad? Lol
11:46:09FromDiscord<retkid> hes referring to the else
11:46:18FromDiscord<Require Support> feels like a while since we got a nim update
11:46:21FromDiscord<retkid> loops can be falsey in pytho
11:46:21*Guest4495 joined #nim
11:46:26FromDiscord<retkid> (edit) "pytho" => "python"
11:46:47FromDiscord<retkid> if execution fails or breaks the else branch can be triggered
11:48:39PMunchI sometimes do a similar thing with blocks
11:49:17PMunchName a block outside the for loop, then have the for loop and some statements after it inside the block. If I want to break out of the loop and not run the things after it I can break to the outer named block
11:52:29FromDiscord<domosokrat> @retkid\: it's the other way round\: if the loop does not break, the else branch is executed
11:52:54FromDiscord<retkid> really
11:53:06FromDiscord<retkid> are you sure?
11:55:05FromDiscord<domosokrat> sent a code paste, see https://play.nim-lang.org/#ix=49kW
11:55:52FromDiscord<b1rdf00d> combined with loops being expressions it's a nice feature
11:57:21FromDiscord<domosokrat> @b1rdf00d\: this is python code. Did python make loops into expressions?
11:58:04FromDiscord<b1rdf00d> zig does
11:59:42FromDiscord<b1rdf00d> erroring for not finding something you expect is one use case, but having a default case value is also pretty handy
12:02:20FromDiscord<kaddkaka> In reply to @dom96 "run `choosenim --help` to": Yes I did that, it was messy 🙈
12:09:50FromDiscord<ShalokShalom> Does anyone use immutable data structures?
12:13:18PMunch@ShalokShalom, I wrote persistent vectors for Nim
12:13:24PMunchHaven't used them terribly much though
12:15:05FromDiscord<ShalokShalom> Wonderful
12:15:24FromDiscord<ShalokShalom> You used to implement a lot of useful functional stuff, am I right?
12:15:41FromDiscord<ShalokShalom> I read your name already a couple of times in relationship to functional programming
12:15:52FromDiscord<ShalokShalom> And valuable Nim libraries in general
12:17:15*oddish joined #nim
12:23:15PMunchWell I've done some functional stuff, but not that much
12:23:24PMunchDefinitely like functional stuff though :)
12:23:50PMunchI want to have persistant hash maps as well, but haven't gotten around to implementing those yet..
12:25:42FromDiscord<ShalokShalom> And do you see any persistent datastructes in Nim, that you can recommend? ↵↵Like, by other authors
12:26:00FromDiscord<ShalokShalom> Pretty amazing, that a complete language like Nim lacks something so fundamental
12:27:05FromDiscord<Rika> its not considered fundamental to most people
12:27:30FromDiscord<Rika> i think its completely natural for languages to lack things that you may find fundamental but is not widely considered as
12:29:35FromDiscord<ShalokShalom> Yeah, sure
12:29:59FromDiscord<ShalokShalom> Fundamental in the sense, that I consider a lot of other things fundamental as well, that Nim provides and others not
12:30:17FromDiscord<ShalokShalom> It struck me a bit, since Nim seems to check so many other boxes
12:30:24Guest4495Just discovered nim and it is pretty impressive. But I'm confused by the memory/object model. There are many GC algorithms available, but also destructors and even move-semantics. How does this play together?
12:30:36FromDiscord<ShalokShalom> func being able to tell, if a function is truly a function
12:30:42FromDiscord<ShalokShalom> Very little languages have that
12:30:45Guest4495=destroy for example functions like a c++ destructor it seems. Called during stack unwinding (leaving 'scope' according to the docs). But what if the object has indeterminate lifetime? Are there also indeterminate calls to destructors?
12:31:32FromDiscord<ShalokShalom> In reply to @Guest4495 "Just discovered nim and": Its intended that you pick one for the project and then stick to it, I think?
12:31:39FromDiscord<ShalokShalom> I might be probably wrong
12:32:43Guest4495can libraries that assume different memory collection models be mixed?
12:33:37FromDiscord<ShalokShalom> @Guest4495 ↵↵What does the branching factor mean?
12:34:05FromDiscord<ShalokShalom> (edit) "@Guest4495 ↵↵What does the branching factor mean?" => "sent a long message, see http://ix.io/49l2"
12:36:54FromDiscord<Rika> In reply to @Guest4495 "=destroy for example functions": what would an object with an indeterminate lifetime look like?
12:36:59FromDiscord<Rika> In reply to @Guest4495 "can libraries that assume": no
12:37:16FromDiscord<ShalokShalom> I guess you did find nothing at the documentation about that?↵↵Might be worth to improve that then.
12:38:07FromDiscord<Recruit_main707> In reply to @Rika "no": which is a shame imo
12:39:01*brainfunnel joined #nim
12:39:20FromDiscord<Rika> im not sure how mixing mms would works
12:39:21FromDiscord<Rika> (edit) "works" => "work"
12:40:04PMunchI think the simple answer is that it doesn't
12:40:17PMunchYou pick one memory management strategy for you project
12:40:41PMunchI guess technically you could do it with dynamic libraries, but I wouldn't recommend it :P
12:41:15FromDiscord<ShalokShalom> Is this documented?
12:41:17PMunch@ShalokShalom, can't think of any other libraries that offer persistent data structures unfortunately..
12:41:24PMunchIs what documented?
12:41:24FromDiscord<ShalokShalom> Thanks 👍🏻
12:41:57PMunch@ShalokShalom, found this though: https://forum.nim-lang.org/t/5251
12:43:33PMunchbbtree looks nice, but they where last updated for 0.20.0 so might need a little update
12:44:28Guest4495in real-time environments you would need gc:none or gc:arc. if the boundary of memory management modes is on the process level then that would complicate things a lot, because often just a tiny fraction is required to run in real-time threads for example.
12:46:47FromDiscord<Rika> in refc you can disable the GC in-code "temporarily"
12:55:04Guest4495of course. or don't alloc anything in the real-time thread if your allocator isn't O(1). I actually try to understand destructors and when they are called (if at all) and what assumptions may be made by library creators.
12:56:22FromDiscord<Rika> oh okay let me think about that then
12:58:20FromDiscord<ShalokShalom> In reply to @PMunch "Is what documented?": The details about mixing memory models
12:58:26FromDiscord<ShalokShalom> I guess the docs could provide this
13:01:18Guest4495for example if I write a library in nim, should I assume something like gc:boehm where finalization is inderminate and thus destruction is also indeterminate? Should an explicit cleanup function be provided then? Like close() or whatever, like we do in python and so on when deterministic clean-up is required. Is there a best practice?
13:07:31FromDiscord<mratsim> In reply to @Guest4495 "for example if I": you're projecting, there is no need to assume that.
13:07:53FromDiscord<Superstart033> Will Nim in action had a new edition some time soon? Nim has go beyond 1.0 a while ago, and the book was written before it hit 1.0.
13:08:33*Guest4495 quit (Quit: Client closed)
13:08:47*Guest4439 joined #nim
13:09:54FromDiscord<mratsim> sent a long message, see http://ix.io/49la
13:11:23FromDiscord<mratsim> You can mix all 3.↵↵If the kind of memory management you use becomes important, you're likely in a situation where your `ref object` don't cross libraries boundaries and are just stuff inside a context.
13:11:35FromDiscord<mratsim> (edit) "stuff" => "stuffed"
13:12:43FromDiscord<mratsim> And that context has an init and close procedures
13:14:53PMunch@Superstart033, it should still be valid for Nim post 1.0. There is an errata out there for the few instances of stuff that has updated since the book came out
13:21:50FromDiscord<aru> here it is https://deepakg.github.io/nim/2019/09/28/nim-in-action-errata.html
13:22:16FromDiscord<aru> unless there is a newer one that i'm not aware of
13:24:33FromDiscord<insomniac> what is the best way within a nim script to run shell commands like this one `sudo yum install sudo yum-utils perl-JSON perl-Sys-Syslog -y > /dev/null`
13:24:50FromDiscord<insomniac> trying to re-write my bash script to nim
13:25:23PMunchIn NimScript, or in Nim?
13:26:13FromDiscord<insomniac> Nim
13:26:43madpropsis nimscript an actual serious thing?
13:27:15FromDiscord<Rika> What do you mean
13:27:25FromDiscord<Rika> Yes, it’s something used often enough
13:27:29FromDiscord<Agrilus celti> I am debugging having used this guide <https://github.com/saem/vscode-nim#debugging> but the variables are unnamed. It this something unavoidable because of the "transpiler" nature of Nim?
13:27:32madpropslike is it a good enough choice for system scripting
13:27:44FromDiscord<Rika> For system scripting personally I don’t think so
13:27:57FromDiscord<insomniac> What do you think is the best approach to do what i was thinking?
13:28:29FromDiscord<Prestige> I'd rather write nim and use that instead of nims
13:29:13FromDiscord<insomniac> yea thats what i am doing,but is there a "good" way to execute shell commands like you would in a bash script
13:29:53PMunchmadprops, I mean it's mostly used to write Nim macros :P
13:30:07PMunchIt's not meant to be run as a stand-alone scripting language
13:30:22PMunchAlthough it works pretty well as a configuration language
13:30:57FromDiscord<insomniac> so do you not recommend doing that in nim?
13:31:01FromDiscord<planetis> osproc.execShellCmd
13:31:02PMunch@insomniac, osproc.execCmd
13:31:27FromDiscord<insomniac> thanks i will play with that
13:31:29FromDiscord<Agrilus celti> In reply to @Agrilus celti "I am debugging having": To further clarify, I am looking for a solution to make debugging easier by displaying variable names properly, if that is even possible.
13:31:45PMunch@insomniac, there's also execCmdEx if you need more
13:32:01FromDiscord<insomniac> thanks!
13:32:10PMunch@insomniac, doing what in Nim?
13:32:44FromDiscord<insomniac> so im converting a shell script that basically checks your distribution of linux then installs some packages and makes some config changes
13:33:21FromDiscord<insomniac> sent a code paste, see https://play.nim-lang.org/#ix=49le
13:33:39FromDiscord<dom96> In reply to @Superstart033 "Will Nim in action": No plans currently to do so.
13:33:41FromDiscord<insomniac> then obviously more things below but where im stuck is the yum part
13:34:33FromDiscord<Superstart033> In reply to @dom96 "No plans currently to": I see, has the language change a lot since the first edition?
13:36:20*brainfunnel quit (Quit: thanks, bye!)
13:37:03FromDiscord<dom96> The errata that somebody else posted is very thorough
13:37:47FromDiscord<dom96> for the bigger examples in the book: https://github.com/dom96/nim-in-action-code/compare/master...v1.2.6
13:38:41FromDiscord<dom96> `master` supports 0.17.6/1.0.6 and the `1.2.6` branch supports 1.2.6+ (or at least it should, I haven't tested with latest versions in a while)
13:40:31FromDiscord<aru> mine does work with 1.6.6 https://github.com/aruZeta/nim-in-action
13:46:55FromDiscord<!&luke> In reply to @madprops "like is it a": Probably not, u should use luaJIT python or ruby, or this new lang called wren, it's fast, I've used it a couple times <https://wren.io>
13:49:02*Guest4439 quit (Ping timeout: 252 seconds)
13:54:26madpropshttps://i.imgur.com/BQwURcr.jpg
13:55:24FromDiscord<ShalokShalom> In reply to @Rika "For system scripting personally": Why do you think so?
13:57:08FromDiscord<Rika> Just in case you might have missed it, this is referring to NimScript
13:57:26FromDiscord<ShalokShalom> In reply to @insomniac "thanks!": For something that stays at the command line (no/little GUI) I recommend fish↵↵https://fishshell.com/docs/current/language.html
13:57:38FromDiscord<ShalokShalom> You can use KDialog and similar for simple UI stuff
13:57:47FromDiscord<ShalokShalom> In reply to @Rika "Just in case you": Yes, I know
13:57:49FromDiscord<insomniac> let me check it out
13:57:59FromDiscord<ShalokShalom> But why wouldn't you recommend it for system scripting
13:58:39FromDiscord<Rika> My thought is that “why not just use Nim then”
13:58:52*xcodz-dot joined #nim
13:59:53*xcodz-dot quit (Client Quit)
14:03:33FromDiscord<insomniac> So should i stick with nim im confused
14:05:34PMunchWhen in doubt, stick with Nim
14:05:49PMunchWren looks pretty neat though, but it's dynamic..
14:07:18FromDiscord<insomniac> yea i am liking nim so far so going to stick with it and see if i can get this working
14:07:32FromDiscord<! Yes, i hoist> How do i add mingw on nixos for cross-compiling nim?
14:07:58*robertmeta quit (Ping timeout: 240 seconds)
14:08:43*robertmeta joined #nim
14:11:23madpropsi wouldn't use nim for bash script replacements
14:11:30madpropsi would use either ruby or python
14:11:56madpropsin ruby you can just do: result = `this is some command`
14:12:08madpropsso that's easier
14:12:35madpropsuse nim for more heavy stuff
14:13:54FromDiscord<insomniac> so my shell script is a CLI that basically installs our custom software and configures it, also does health checks etc so thats why i thought nim was a good idea
14:15:52FromDiscord<! Yes, i hoist> In reply to @insomniac "so my shell script": yes, but you could not do that with a bash script at all. Only use nim if your main code is not running cmds.
14:16:17FromDiscord<insomniac> what do you mean? i did do it with a bash script
14:16:28FromDiscord<! Yes, i hoist> In reply to @insomniac "what do you mean?": Then keep it as a bash script
14:16:29PMunchmadprops, I mean it's pretty simple to make a nice template or macro for commands: https://play.nim-lang.org/#ix=49mE
14:16:34FromDiscord<! Yes, i hoist> She
14:16:45*luis_ joined #nim
14:16:59FromDiscord<! Yes, i hoist> Shell scripts are completely diffrent from most programming languages
14:17:02FromDiscord<insomniac> In reply to @not logged in "Then keep it as": why do you say that? sorry just trying to learn why nim is not ideal for this?
14:17:13madpropswhat is ¤ o_O
14:17:15PMunchWell not completele..
14:17:26PMunchmadprops, haha, it's a symbol known as scarab
14:17:41PMunchIt's what you get when you hit Shift+4 on a Norwegian keyboard
14:17:50madpropsi kinda like it
14:17:50FromDiscord<! Yes, i hoist> In reply to @insomniac "why do you say": Are you running commands more in bash or processing stuff?
14:18:35FromDiscord<insomniac> In reply to @not logged in "Are you running commands": so some commands to install the software and configure it, then others to like check system health and build reports etc
14:19:13PMunchCreated back before Unicode to be a "locale dependant currency symbol" to avoid someone sending an e-mail with "Please send me €100" and someone read that as "Please send me ¥100" because of locale settings
14:19:53FromDiscord<! Yes, i hoist> In reply to @insomniac "so some commands to": You really should not be using nim if you are planning to run more than 3 commands in your entire code in my opinion. Nim was built for computing, not running commands like bash script.
14:19:56PMunchSo you would send "Please send me ¤100" and the receiver where supposed to think, ah since this guy is European he probably means euros.
14:20:07FromDiscord<insomniac> ok i see thanks
14:20:27PMunchNim was made to do whatever you damn well want to do with it
14:20:46FromDiscord<insomniac> 🙂
14:20:56FromDiscord<! Yes, i hoist> In reply to @PMunch "Nim was made to": yes, but there is no reason to switch if you already have a bash script….
14:21:25FromDiscord<insomniac> well main reason i wanted to is because wanted something statically compiled
14:21:29madpropsbash scripting is the worst
14:21:31FromDiscord<insomniac> and Go is not ideal for what i want
14:21:48FromDiscord<! Yes, i hoist> I mean it is possible just not ideal
14:22:05PMunchWell bash scripting isn't ideal either..
14:22:08FromDiscord<! Yes, i hoist> I would probably use nim to make the software itself instead of the checker
14:22:10PMunchIt can get messy fast
14:22:17FromDiscord<Prestige> I still write a lot of bash, maybe I should switch over to just nim binaries.. but sometimes that makes things more complicated, for small stuff
14:22:19PMunchJust something like escaping stuff properly
14:22:20FromDiscord<Superstart033> In reply to @PMunch "Nim was made to": I mean, no lang is perfect for every job.
14:22:58FromDiscord<! Yes, i hoist> Well at least nim is better then python for running commands, python is absolutely trash at it.
14:23:05FromDiscord<Superstart033> Lmao
14:23:45FromDiscord<insomniac> yea python is terrible at it
14:23:56FromDiscord<! Yes, i hoist> In reply to @not logged in "How do i add": Also, can anyone help me w/ this?
14:24:16madpropsresponse = `ls -a`
14:24:19madpropsthat's ruby
14:24:34madpropsand it has a more complex command system
14:24:36madpropsif you need more
14:25:03FromDiscord<Superstart033> Ruby should do the work for this person then
14:25:32FromDiscord<Prestige> I might be writing ruby soon for work. Should be interesting
14:25:51FromDiscord<Superstart033> Ruby is a great language
14:25:54FromDiscord<Superstart033> Imo
14:26:01FromDiscord<Superstart033> Better than python
14:27:21FromDiscord<! Yes, i hoist> The only downsides of python are that it is slow and that every single command runner is a subproccess so you can’t run commands the only work in there own process
14:28:05FromDiscord<insomniac> and is nim good for configuring files, so example you have a database server and want to write a nim file to configure it automatically
14:30:43qwrfor me terrible downside for any dynamically typed language is that productivity goes to drain as the codebase grows, nothing warns if you forget something, and you'll have to emulate static type checks with testing every stupid thing
14:31:44FromDiscord<domosokrat> @not logged in\: what does "own process" mean to you? On linux the only process that is not a subprocess is the init process
14:31:45FromDiscord<auxym> sent a code paste, see https://play.nim-lang.org/#ix=49mK
14:31:48FromDiscord<Prestige> Yeah, I agree with qwr
14:32:00qwrits less noticable if only statically typed languages you know are C, C++ and java, but after using reasonable statically typed languages like haskell or nim its really painful
14:32:37qwrso i don't want to write like more than few hundred lines big scripts with dynamically typed languages
14:32:49*PMunch quit (Quit: Leaving)
14:32:57FromDiscord<! Yes, i hoist> In reply to @domosokrat "<@910899642236043294>\: what does "own": Like python subprocess itself, so some tools can’t run becuase they have the python settings, not the cmd line swttings.
14:34:00*rockcavera joined #nim
14:34:00*rockcavera quit (Changing host)
14:34:00*rockcavera joined #nim
14:34:14FromDiscord<domosokrat> well that problem would also exist if you use nim or most other languages
14:34:14FromDiscord<auxym> In reply to @auxym "hm how can I": answering my own question 😅 `ptr UncheckedArray[uint16]`
14:35:04FromDiscord<domosokrat> since the tool will run as a subprocess of your program instead of the shell
14:35:29FromDiscord<! Yes, i hoist> oh no
14:35:52FromDiscord<! Yes, i hoist> Well anyway, Can somone explain templates?
14:36:38FromDiscord<exelotl> In reply to @insomniac "and is nim good": are you talking about using Nim as a configuration language, or Nim to generate config files in some other language?
14:36:52FromDiscord<Forest [She/Her]> Is it possible to run any code at compiletime?
14:37:00FromDiscord<insomniac> In reply to @exelotl "are you talking about": so example lets say i need to generate an xml file
14:37:27FromDiscord<Forest [She/Her]> In reply to @Forest "Is it possible to": Or specifically, object creation, sequences and ordered tables?
14:38:01FromDiscord<exelotl> Nim is pretty good for that, it has a built-in templating system (stdtmpl filter): https://nim-lang.org/docs/filters.html
14:38:04FromDiscord<Forest [She/Her]> I wanna make macros that use the field of an object to emit function calling and stuff
14:38:24FromDiscord<insomniac> In reply to @exelotl "Nim is pretty good": awesome
14:38:56FromDiscord<exelotl> In reply to @Forest "Or specifically, object creation,": yes these should all work in the VM
14:39:09FromDiscord<Forest [She/Her]> At compiletime?
14:39:16FromDiscord<exelotl> yeah, I believe so
14:39:33FromDiscord<Forest [She/Her]> I'm using ref objects too so they can be referred to so idk if that'd work or
14:40:28FromDiscord<exelotl> ref objects in the VM are fine, you might have trouble with more low-level stuff (pointers and casting)
14:40:34FromDiscord<Forest [She/Her]> Fair
14:40:40FromDiscord<Forest [She/Her]> Hmm idk what to do then
14:41:43FromDiscord<Forest [She/Her]> I'm trying to make it so that i can dynamically generate 'procs' (they're not actually procs, they're just gonna be a macro that points to a dedicated function) that passes it's arguments as a seq, since they're done dynamically
14:44:59FromDiscord<auxym> In reply to @not logged in "Well anyway, Can somone": have you read the tutorial/manual? Is there something specific you have trouble understanding? Templates are a sort of "simple" macro. You can think of them sort of like macros in C, except they are hygienic. (They don't actually work at the simple text level like C, they won't pollute your scope...)
14:46:14FromDiscord<auxym> In reply to @Forest "I'm trying to make": not sure I follow, share some example code in playground maybe?
14:46:56FromDiscord<auxym> everything you mentioned, proc types, seqs, etc are fine in the VM (at compile time, in macros, etc)
14:49:57*nim123 joined #nim
14:52:02FromDiscord<aru> nice svg qr codes
14:52:03FromDiscord<aru> image.png https://media.discordapp.net/attachments/371759389889003532/1014910514696036453/image.png
14:53:15FromDiscord<Forest [She/Her]> In reply to @auxym "not sure I follow,": Sure
14:54:32FromDiscord<aru> wondering if i should release the first version or QRgen as 1.0.0 or 0.1.0 😅
14:54:43FromDiscord<Forest [She/Her]> I say 1.0.0
14:54:49FromDiscord<Forest [She/Her]> It's the first stable version so
14:55:04FromDiscord<aru> yh i think so too
14:55:10FromDiscord<aru> and the first version too lol
14:55:37FromDiscord<aru> need to document some stuff left and will release it
14:55:54*nisstyre quit (Ping timeout: 264 seconds)
14:56:44FromDiscord<Forest [She/Her]> Fair
14:56:58FromDiscord<! Yes, i hoist> In reply to @auxym "have you read the": I just read that part!
14:58:18FromDiscord<! Yes, i hoist> I get error getenv this might be cuased by a recursive module dependency when trying to cross compile with `-d:mingw`
14:59:08FromDiscord<auxym> why would this have anything to do with templates?
15:00:55FromDiscord<! Yes, i hoist> In reply to @auxym "why would this have": The top one does, the bottom one does not.
15:01:12*nim123 quit (Quit: Client closed)
15:02:15FromDiscord<Forest [She/Her]> In reply to @auxym "not sure I follow,": Just writing it up rn, I'll share after ^^
15:02:32FromDiscord<auxym> oh sorry, didn't read. If you want help debugging this you'd need to post a minimal reproduction code sample, including, the compiler command, that produces the issue. @not logged in
15:03:30FromDiscord<Forest [She/Her]> Yeah i can't even figure out how to write this lmao-
15:03:38*luis_ quit (Quit: luis_)
15:03:48FromDiscord<Forest [She/Her]> I can just use Nim typing ig?
15:04:07FromDiscord<Forest [She/Her]> Bleh my issue is i can't even write up the code that generates a Java method being called because it's just, complex-
15:04:11FromDiscord<! Yes, i hoist> sent a code paste, see https://play.nim-lang.org/#ix=49mZ
15:04:28FromDiscord<! Yes, i hoist> What are you trying to make?
15:06:12FromDiscord<Forest [She/Her]> I'm working on a way to generate Java code in Nim, later I'm going to make macros that make it so you can write Java in a way that feels closer to Nim
15:06:45FromDiscord<Forest [She/Her]> Right now I'm trying to work on a base that is flexible enough for actually doing that
15:08:10FromDiscord<! Yes, i hoist> In reply to @Forest "Right now I'm trying": I did a thing like that except that you could write c++ in python syntax. Tho python does the parsing part for you.
15:08:37FromDiscord<Forest [She/Her]> Oh? Neat! I'm just making macros to handle it, i have code generation mostly down
15:08:47FromDiscord<auxym> In reply to @not logged in "np `nim compile -d:mingw": yeah not sure. try posting on the forums. if there is a circular import issue in the stdlib thats definitely a nim bug
15:09:25FromDiscord<Forest [She/Her]> Hm... Tbh, i could probably just write the functions of a class individually and make it return X code? And then use the Java naming scheme or whatever?
15:10:42FromDiscord<auxym> why not use methods in nim? they are the closest thing to java oop
15:10:42FromDiscord<Forest [She/Her]> Not the cleanest but, would probably work
15:10:51FromDiscord<Forest [She/Her]> In reply to @auxym "why not use methods": Wdym?
15:11:05FromDiscord<Forest [She/Her]> I'm just creating a barebones code generation library for now
15:11:20FromDiscord<auxym> ah
15:15:53FromDiscord<Forest [She/Her]> Yeah, so I'm probably just gonna make a long ass structure now for importing :p
15:16:13FromDiscord<Forest [She/Her]> So you can do `import java/lang/Object` for example, definitely not the cleanest but, works so-
15:18:35FromDiscord<Forest [She/Her]> Or i could make it `import java/lang/Object`
15:18:45FromDiscord<Forest [She/Her]> I still need a way to reference the classes themselves tbh
15:18:56FromDiscord<Forest [She/Her]> (edit) "java/lang/Object`" => "java/lang`"
15:20:46*crem quit (Ping timeout: 260 seconds)
15:20:51FromDiscord<auxym> so I need to convert utf8 to utf16 (LE), except at compile-time so I can't use std/encodings. Anyone have an idea?
15:21:09FromDiscord<ajusa> In reply to @auxym "so I need to": treeform has a library for this
15:21:44FromDiscord<ajusa> In reply to @auxym "so I need to": https://github.com/treeform/flatty/blob/master/src/flatty/encode.nim
15:23:00FromDiscord<auxym> In reply to @ajusa "https://github.com/treeform/flatty/blob/master/src/": oh awesome, ty for the info
15:23:14FromDiscord<Rainbow Asteroids> it's its own standalone library too: https://github.com/treeform/encode
15:23:39*crem joined #nim
15:26:33*nisstyre joined #nim
15:27:40FromDiscord<! Yes, i hoist> I can’t seem to put an error in a code block in the fourms.
15:27:45FromDiscord<Superstart033> I was reading the std/terminal doc and “Changing the style is permanent even after program termination! Use the code exitprocs.addExitProc(resetAttributes) to restore the defaults. Similarly, if you hide the cursor, make sure to unhide it with showCursor before quitting.”↵Wth, so if I change the color of my terminal to yellow is going to stay yellow? Why it doesn’t reset after the program ends?
15:28:11FromDiscord<Superstart033> (edit) "“Changing" => "↵“Changing"
15:33:54FromDiscord<halc> because that's how it'd work if you changed it manually I guess?
15:34:04FromDiscord<auxym> because (historical thing that probably started with teletypes in the 70s)
15:36:01FromDiscord<! Yes, i hoist> In reply to @auxym "yeah not sure. try": I did but it says im moderated so I probably won’t get a fast answer.
15:38:36*piertoni joined #nim
15:39:03piertoniHi! Please, I cannot understand where is the error in this simple code: https://play.nim-lang.org/#ix=49nb    any help is really appreciated!
15:39:30NimEventerNew thread by Nlits: Error when cross-compiling Nim with mingw, see https://forum.nim-lang.org/t/9428
15:40:38FromDiscord<halc> In reply to @piertoni "Hi! Please, I cannot": you need to use a var parameter
15:40:54FromDiscord<Tanguy> `proc add[T](stack: var StrawStack[T], obj: T) =`
15:40:54FromDiscord<! Yes, i hoist> In reply to @piertoni "Hi! Please, I cannot": You are messing with the defualt add proc. You should not have any proc named add
15:41:05FromDiscord<halc> `stack: var StrawStack[T]` in your `add` function
15:41:37piertonimmm, that is not easy to discover :)
15:42:16FromDiscord<halc> proc parameters are not directly mutable by default
15:42:34FromDiscord<auxym> In reply to @not logged in "You are messing with": nope, its perfectly fine. the issue is missing var keyword as others have mentioned
15:42:55FromDiscord<ShalokShalom> In reply to @Avahe "I might be writing": I think Ruby is one of the most sane languages to work with for money
15:43:11FromDiscord<Tanguy> Yeah, the `but expected one of:` should really sort by likely hood instead of dumping everything randomly
15:43:35piertoniAs proc parameters are not mutable, Shoud I always use references?
15:43:52FromDiscord<! Nilts> In reply to @auxym "nope, its perfectly fine.": ok, im mistaken then
15:44:10FromDiscord<ShalokShalom> In reply to @madprops "response = `ls -a`": I would question this. Backticks, system() and couple of other buildins exist
15:44:17*LuxuryMode joined #nim
15:44:19FromDiscord<ShalokShalom> I personally use and recommend Frontkick
15:45:28FromDiscord<ShalokShalom> In reply to @Rika "My thought is that": Ah, I assumed this is what you mean
15:46:42FromDiscord<ShalokShalom> @insomniac And for Nim, there exists https://github.com/Vindaar/shell
15:47:12madpropsyeah you can also do: res = %x|ls -a|
15:47:20FromDiscord<insomniac> awesome
15:47:42FromDiscord<ShalokShalom> In reply to @madprops "yeah you can also": Do you mean in Ruby?
15:47:52madpropsyeah since you questioned the backticks
15:48:47madpropsres = %x|echo #{name}|
15:49:02FromDiscord<Prestige> In reply to @ShalokShalom "I think Ruby is": That's good news
15:49:45FromDiscord<! Nilts> What does \`\` mean in proc or template names in nim?
15:51:26*piertoni quit (Quit: Client closed)
15:51:38FromDiscord<aru> it's mostly to put special character's to it's name
15:52:12FromDiscord<aru> sent a code paste, see https://play.nim-lang.org/#ix=49ng
15:52:22FromDiscord<aru> try removing the \`\`\`\`
15:52:48FromDiscord<aru> try removing the \`\`
15:53:11FromDiscord<aru> funny you can't put \`\` in a code block lol
16:01:34FromDiscord<ShalokShalom> In reply to @madprops "res = %x|echo #{name}|": Yeah, I know about %x↵↵But your first example shows a simple binding
16:01:48FromDiscord<ShalokShalom> I think your backticks got eaten 🙂
16:02:00madpropsoh right, discord
16:03:06FromDiscord<ShalokShalom> And backticks in Ruby have an issue
16:03:11FromDiscord<ShalokShalom> No STDERR
16:03:25madpropsim using open3 for more complex stuff
16:03:30madpropswhich is also nice
16:03:35FromDiscord<ShalokShalom> That's why Frontkick: https://github.com/sonots/frontkick
16:03:51FromDiscord<ShalokShalom> Unified and declarative API as well
16:04:01FromDiscord<ShalokShalom> Yeah, open3 is what most sane people use
16:04:19FromDiscord<ShalokShalom> It still looks much more convoluted than frontkick, imho
16:04:35FromDiscord<ShalokShalom> Like, more "put on top of it" and less of a clean room implementation
16:04:42FromDiscord<ShalokShalom> If you know, what I mean. 🙂
16:05:09madpropsit does look nice
16:06:29FromDiscord<insomniac> In reply to @ShalokShalom "Ah, I assumed this": how do i import this?
16:08:14FromDiscord<ShalokShalom> Vindaar/shell?
16:08:28FromDiscord<insomniac> yes
16:08:40FromDiscord<ShalokShalom> import shell
16:09:37FromDiscord<insomniac> but how do install it
16:10:08FromDiscord<vindaar> `nimble install shell`
16:10:24FromDiscord<insomniac> 😮‍💨 fail on my part
16:10:55FromDiscord<planetis> fun fact object variants can have multiple cases https://play.nim-lang.org/#ix=49nr
16:10:58FromDiscord<ShalokShalom> In reply to @vindaar "`nimble install shell`": Oh, hi 😃
16:11:07FromDiscord<ShalokShalom> Thanks for this project 😊
16:11:55FromDiscord<planetis> thats nice!
16:12:01FromDiscord<ShalokShalom> @planetis it kinda strikes me, that Nim has useful objects
16:12:05FromDiscord<vindaar> hello, you summoned me 🧙
16:12:05FromDiscord<vindaar> you're welcome 😅
16:12:09FromDiscord<ShalokShalom> And is not object oriented 😅
16:12:31FromDiscord<ShalokShalom> In reply to @vindaar "hello, you summoned me": https://tenor.com/view/cat-spiritus-summon-vintage-fountain-pen-gif-22872604
16:12:35FromDiscord<insomniac> yes thanks @Vindaar
16:18:42FromDiscord<insomniac> sent a code paste, see https://play.nim-lang.org/#ix=49nw
16:19:21FromDiscord<! Nilts> In reply to @insomniac "<@150345911057252352> with shell how": You can’t mention properly becuase they are talking over a link, not in discord
16:20:03FromDiscord<insomniac> oh ok
16:23:29FromDiscord<vindaar> Oh, it does work. Matrix / element pings me for any appearance of my nick
16:23:45FromDiscord<insomniac> nice!
16:25:15FromDiscord<ShalokShalom> sent a long message, see http://ix.io/49ny
16:25:25FromDiscord<insomniac> any idea how i achieve that?
16:25:30FromDiscord<vindaar> the whole "shell syntax in a nim macro" is in the end just a hack. It's good to be aware of that 😁
16:25:34FromDiscord<vindaar> sent a code paste, see https://play.nim-lang.org/#ix=49nz
16:25:48FromDiscord<ShalokShalom> A good hack 🙂
16:26:06FromDiscord<insomniac> great let me test 🙂
16:26:08FromDiscord<vindaar> the bridge is very sleepy right now
16:26:35FromDiscord<ShalokShalom> I had a look into a couple of languages, since I plan a project heavily using that kind of stuff, and I have to say I am amazed of how overlooked that feature is often
16:26:39FromDiscord<dom96> Might be time for someone to write a Discord<->Matrix bridge in Nim ;)
16:27:02FromDiscord<ShalokShalom> I think the Matrix bridges are pretty nice, no?
16:27:25FromDiscord<ShalokShalom> They were used by a lot pf projects not really using Matrix, just because they are so good.
16:27:30FromDiscord<insomniac> In reply to @vindaar "depending on what kind": that does it!!!
16:27:31FromDiscord<insomniac> thans
16:27:36FromDiscord<insomniac> (edit) "thans" => "thanks"
16:28:34FromDiscord<vindaar> hey, if you want to do a PR to restructure that README that'd be really appreciated!↵(@ShalokShalom)
16:29:00FromDiscord<ShalokShalom> Yeah, I consider this↵↵Let me play around with it, to find a couple more 'real life examples'
16:29:59FromDiscord<ShalokShalom> Your examples seem to cover especially the edge cases, I try to provide a couple more simple examples, if you allow 🙂
16:31:17FromDiscord<vindaar> cool, gladly
16:32:10FromDiscord<dom96> In reply to @vindaar "hey, if you want": even for how the bridge handles replies it's not ideal
16:32:15FromDiscord<dom96> but maybe that's a Discord limitation
16:32:19FromDiscord<dom96> though I doubt it
16:32:27FromDiscord<dom96> but also the bridge lags often
16:36:03FromDiscord<ShalokShalom> In reply to @dom96 "but also the bridge": I guess that could be Matrix being slow
16:36:14FromDiscord<ShalokShalom> I experience it often as very laggy.
16:36:24FromDiscord<dom96> hah true
16:36:36FromDiscord<dom96> one of the reasons I don't use it
16:36:44FromDiscord<dom96> even IRC is faster
16:38:10*neceve joined #nim
16:40:50FromDiscord<aru> yh I have noticed some lag some times
16:42:57FromDiscord<ShalokShalom> @dom96 main issue is, that they use some python based server, and the go rewrite is in the making for years
16:43:18FromDiscord<ShalokShalom> And practially all channels are hosted on the Matrix owned server
16:43:42FromDiscord<ShalokShalom> So, in theory, it can be fast. Its just not as p2p as they advertise, essentially being centralized.
16:52:59FromDiscord<leorize> channels are not hosted on any one server btw↵(@ShalokShalom)
16:53:23FromDiscord<leorize> the server is more or less a namespace and the channels are replicated across all participating servers
16:54:23FromDiscord<Forest [She/Her]> In reply to @dom96 "Might be time for": I may write one myself ngl....does Matrix have native support for IRC or?
16:54:27FromDiscord<ShalokShalom> Whatever↵↵There is one central inszance
16:54:33FromDiscord<ShalokShalom> In reply to @Forest "I may write one": Yes
16:54:45FromDiscord<Forest [She/Her]> Sweet
16:54:58FromDiscord<ShalokShalom> That's why NeoChat, the KDE chat app has support for both
16:55:07FromDiscord<Forest [She/Her]> Oh sweet
16:55:18FromDiscord<@thatrandomperson5-6310e3b26da03> Where does this connect to?
16:55:28FromDiscord<@thatrandomperson5-6310e3b26da03> Oh, nvm
16:55:28FromDiscord<Yardanico> In reply to @Forest "I may write one": no, but the official Matrix homeserver has a bot that connects it to IRC
16:55:54FromDiscord<Forest [She/Her]> Ah fair
16:56:20FromDiscord<Yardanico> it's mainly an agreement between matrix and libera chat (in the past freenode), it doesn't work for every network
16:56:24FromDiscord<dom96> In reply to @Forest "I may write one": If you're thinking of writing a bridge via IRC then that's not the way to do it :)
16:56:34FromDiscord<Forest [She/Her]> May just make a Discord Matrix bridge, not yet though since kinda tryna get my project done as much as possible
16:56:49FromDiscord<Yardanico> or actually they allow for other irc servers too https://matrix-org.github.io/matrix-appservice-irc/latest/usage.html
16:56:56FromDiscord<Forest [She/Her]> In reply to @dom96 "If you're thinking of": Oh absolutely not lmao, Matrix has support for editing messages so if possible I'd wanna support that
16:57:02FromDiscord<Forest [She/Her]> In reply to @Yardanico "or actually they allow": Neat!
16:59:03FromDiscord<@thatrandomperson5-6310e3b26da03> Is there any other channels from gitter?
16:59:26FromDiscord<Yardanico> yes, you can connect to all nim matrix channels from there
16:59:33FromDiscord<dom96> you shouldn't though
16:59:34FromDiscord<Yardanico> although I don't know how, but gitter is matrix :)
16:59:37FromDiscord<dom96> just use Discord or Matrix directly
16:59:47FromDiscord<Yardanico> maybe they like gitter's UI
17:01:49FromDiscord<ShalokShalom> Gitter is Matrix?
17:02:01FromDiscord<ShalokShalom> Matrix was not even around, when Gitter launched
17:02:02FromDiscord<ShalokShalom> No?
17:02:06FromDiscord<! Nilts> The link if broken, :P
17:02:55FromDiscord<Forest [She/Her]> In reply to @dom96 "you shouldn't though": Oh? Why not?
17:03:38FromDiscord<@thatrandomperson5-6310e3b26da03> itsbackupits backupitsbackup
17:03:38FromDiscord<dom96> because Gitter->Matrix->Discord has bugs
17:03:44FromDiscord<dom96> when pasting code samples
17:03:48FromDiscord<Rainbow Asteroids> In reply to @ShalokShalom "Gitter is Matrix?": > On September 30, 2020, New Vector Limited acquired Gitter from GitLab,[5][6] and announced upcoming support for the Matrix protocol in Gitter, which went live by the end of the year.[16] Gitter's features would eventually be moved to New Vector's flagship product, Element, thereby replacing Gitter entirely.[7]↵https://en.wikipedia.org/wiki/Gitter
17:04:18FromDiscord<dom96> seems like a silly purchase really
17:05:01FromDiscord<@thatrandomperson5-6310e3b26da03> I can’t see any other channels 😛
17:06:29FromDiscord<@thatrandomperson5-6310e3b26da03> Hmmm
17:07:12FromDiscord<aru> logo.svg https://media.discordapp.net/attachments/371759389889003532/1014944529645846538/logo.svg
17:07:18FromDiscord<aru> thoughts on the logo?l
17:07:46FromDiscord<aru> doesn't render huh
17:07:49FromDiscord<@thatrandomperson5-6310e3b26da03> can’t see de code from gitter
17:07:57FromDiscord<aru> image.png https://media.discordapp.net/attachments/371759389889003532/1014944715763884112/image.png
17:08:06FromDiscord<aru> a screenshot is better
17:08:42FromDiscord<aru> the colors of the crown are a lil weird with the green I used, but idk if I should change them
17:08:51FromDiscord<@thatrandomperson5-6310e3b26da03> Looks cool on discord↵> [image.png](https://gitter.ems.host/_matrix/media/v1/download/matrix.org/fhIdTEdRpdXRjLgMWuSWtVIG)
17:08:54FromDiscord<Rainbow Asteroids> thats neato
17:09:05FromDiscord<aru> the qr code works btw
17:09:13FromDiscord<@thatrandomperson5-6310e3b26da03> Nice
17:09:15FromDiscord<Rainbow Asteroids> i just tested it, lol
17:09:18FromDiscord<aru> it just points to the repo
17:09:30FromDiscord<Rainbow Asteroids> I would just make the whole thing the nim yellow tbh
17:09:30FromDiscord<aru> unless I made a typo
17:09:31FromDiscord<ShalokShalom> In reply to @Rainbow Asteroids "> On September 30,": Ah, interesting
17:09:33FromDiscord<@thatrandomperson5-6310e3b26da03> How do you test a qr code inside your device
17:09:42FromDiscord<aru> hmm, lemme try
17:09:44FromDiscord<ShalokShalom> I remember when Gitlab bought Gitter
17:09:53FromDiscord<aru> i use my phone lol
17:09:57FromDiscord<Rika> good job on the generator
17:10:00FromDiscord<Rainbow Asteroids> In reply to @@thatrandomperson5-6310e3b26da03 "How do you test": you recite the details of the qr code to your computer
17:10:02FromDiscord<Prestige> Very nice
17:10:05FromDiscord<ShalokShalom> They were like 'we are gonna restore that thing' just to find out HOW broken it was
17:10:14FromDiscord<aru> ty rika
17:10:17FromDiscord<@thatrandomperson5-6310e3b26da03> Ah, i found a way
17:10:19FromDiscord<ShalokShalom> And actually implementing and using Mattermost for Gitlab
17:10:28FromDiscord<Rainbow Asteroids> so does it make svgs or just pngs
17:10:34FromDiscord<ShalokShalom> Despite having paid a lot for Gitter
17:10:49FromDiscord<Forest [She/Her]> In reply to @dom96 "because Gitter->Matrix->Discord has bugs": Ah
17:11:08FromDiscord<aru> for the moment it can display them on stdout (terminal) and svgs↵(@Rainbow Asteroids)
17:11:09FromDiscord<ShalokShalom> Matrix swallowing Gitter might be a good thing
17:11:17FromDiscord<Forest [She/Her]> Probably lol
17:11:33FromDiscord<aru> the actual logo was generated with svg and then edited it on inkscape
17:17:20FromDiscord<aru> it's not the nim yellow but the yellow from gruvbox, to fit the background
17:17:35FromDiscord<aru> I think this one looks more consistent
17:17:43FromDiscord<aru> than the green one I mean
17:17:48FromDiscord<! Nilts> How long does it ussally take to get help on the forums?
17:18:12FromDiscord<Yardanico> there's no estimate
17:18:21FromDiscord<Yardanico> and what forum thread you're referring to?
17:18:38FromDiscord<! Nilts> fourm.nim-lang.org?
17:18:45FromDiscord<Yardanico> what forum thread specifically
17:18:57FromDiscord<Yardanico> or did you not make a thread yet?
17:19:06FromDiscord<Yardanico> ah you mean https://forum.nim-lang.org/t/9428
17:19:18FromDiscord<Yardanico> well first of all, can you try with nim 1.6.6. instead of 1.4.8 ?
17:19:51FromDiscord<dom96> In reply to @not logged in "How long does it": what did you call your module?
17:21:08FromDiscord<! Nilts> In reply to @Yardanico "well first of all,": idk how with nixos
17:21:27FromDiscord<Yardanico> well nixpkgs has nim 1.6.6
17:21:30FromDiscord<Yardanico> can't you just update
17:21:43FromDiscord<aru> using 1.6.6 is easy
17:21:54FromDiscord<planetis> top-down type inference is 🔥
17:22:10FromDiscord<Yardanico> In reply to @planetis "top-down type inference is": i mean it's not such a big deal, but it's nice, yeah
17:22:17FromDiscord<aru> if you want to use any other version you would need to check if it was packaged
17:22:19FromDiscord<! Nilts> In reply to @Yardanico "well nixpkgs has nim": like what is the pkg name? pkgs.nim_166?
17:22:41FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/1014948422337433630/unknown.png
17:22:42FromDiscord<Yardanico> just nim? or `pkgs.nim`
17:22:48FromDiscord<planetis> I dunno, its quality of life updates that i miss the most.
17:22:57FromDiscord<Yardanico> `nix-env -iA nixos.nim`
17:23:15FromDiscord<! Nilts> ok
17:24:41FromDiscord<! Nilts> Well, now the nim complie command does not work at all :p
17:25:18FromDiscord<! Nilts> it just freezes and i have to close shell
17:25:40FromDiscord<! Nilts> nvm
17:25:41FromDiscord<! Nilts> wait
17:26:22FromDiscord<! Nilts> it still freezes
17:28:58FromDiscord<aru> it will give you an error with the actual `sha256`
17:28:59FromDiscord<aru> or you could use `nix-prefetch-url`
17:29:04FromDiscord<aru> sent a code paste, see https://play.nim-lang.org/#ix=49nU
17:30:51FromDiscord<! Nilts> I don’t have a shell.nix
17:32:03FromDiscord<aru> just create one
17:36:38FromDiscord<ShalokShalom> In reply to @planetis "top-down type inference is": Top down?
17:37:30FromDiscord<planetis> previously var x: seq[byte] = @[1, 2, 3] didn't compile. it's enabled by default in devel but under experimental features
17:38:31FromDiscord<aru> no need to do `var x: seq[uint8] = @[1'u8, 2, 3]` you mean?
17:38:35FromDiscord<Rika> oh i usually call that backwards inference
17:38:35FromDiscord<Yardanico> yes
17:38:42FromDiscord<Rika> might have a different meaning though, my usage
17:38:55FromDiscord<aru> nice
17:44:23FromDiscord<creikey> Does anybody have any idea what are even the high level steps of making a good nim debugger? I would like to, but it's so far beyond me I'm not even sure where to start
18:04:02*LuxuryMode quit (Quit: Connection closed for inactivity)
18:05:18FromDiscord<Forest [She/Her]> Anyone know if there's an up-to-date binding for antlr4? And if it's possible to dump antlr4-parsed AST to JSON?
18:05:51FromDiscord<! Nilts> In reply to @Forest "Anyone know if there's": I looked, and i don’t think there is (First Q)
18:06:03FromDiscord<Forest [She/Her]> Rip fair
18:07:55FromDiscord<Forest [She/Her]> Hm there is https://github.com/jan0sc/antlr4nim
18:08:07FromDiscord<Forest [She/Her]> Sadly it's JS but ehhhh that's good enough for my needs
18:19:22*estiquelapice quit (Ping timeout: 268 seconds)
18:20:48FromDiscord<! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=49ob
18:35:18FromDiscord<huantian> In reply to @aru "A shell.nix with nim": Smh not using flakes
18:36:42FromDiscord<dom96> In reply to @not logged in "It tried, it does": honestly at this point just try choosenim
18:37:58FromDiscord<! Nilts> In reply to @dom96 "honestly at this point": what is that?
18:38:35FromDiscord<huantian> I don’t think choosenim will work on NixOS
18:38:40FromDiscord<! Nilts> `curl https://nim-lang.org/choosenim/init.sh -sSf | sh` does not work either
18:38:51FromDiscord<Yardanico> In reply to @huantian "I don’t think choosenim": maybe it'll work if you patch it
18:38:57FromDiscord<Yardanico> but honestly yeah, just install nim manually
18:39:00FromDiscord<Yardanico> (edit) "but honestly yeah, just install nim manually ... " added "at this point"
18:39:01FromDiscord<Yardanico> it's not that hard
18:39:17FromDiscord<dom96> In reply to @huantian "I don’t think choosenim": huh, why not
18:39:19FromDiscord<huantian> In reply to @Yardanico "maybe it'll work if": Hmmm you’d probably have to use a FHS env
18:39:24FromDiscord<Yardanico> In reply to @huantian "Hmmm you’d probably have": no, why?
18:39:25FromDiscord<dom96> does NixOS use musl?
18:39:30FromDiscord<Yardanico> In reply to @dom96 "does NixOS use musl?": no, it just doesn't use FHS
18:39:35FromDiscord<! Nilts> In reply to @Yardanico "but honestly yeah, just": how?
18:39:57FromDiscord<dom96> eh
18:39:58FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=49oi
18:40:02FromDiscord<dom96> no ~ on NixOS?
18:40:10FromDiscord<dom96> (edit) "no ~ ... on" added "($HOME)"
18:40:17FromDiscord<Yardanico> In reply to @dom96 "no ~ ($HOME) on": FHS is mainly about the system itself, home is still there
18:40:20FromDiscord<Yardanico> but there's no /usr/lib
18:40:22FromDiscord<Yardanico> or similar stuff
18:40:25FromDiscord<dom96> choosenim just needs $HOME
18:40:27FromDiscord<huantian> Mm what’s the issue with just adding `nim` to your environment.systemPackages
18:40:35FromDiscord<Yardanico> In reply to @dom96 "choosenim just needs $HOME": but it's not statically linked is it
18:40:49FromDiscord<huantian> In reply to @Yardanico "no, why?": That’s patch choosenim itself but not any of the Nim binaries
18:41:10*estiquelapice joined #nim
18:41:16FromDiscord<huantian> Wait does the Nim compiler need patching on NixOS?
18:41:18FromDiscord<dom96> DYLD_LIBRARY_PATH should still point to the right place
18:41:36FromDiscord<Forest [She/Her]> I uh, understand nothing about antlr-
18:44:48FromDiscord<! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=49ol
18:44:54FromDiscord<! Nilts> nim to big
18:45:30FromDiscord<Yardanico> why is your system so broken :D
18:45:32FromDiscord<planetis> add to git clone --depth=1
18:46:37FromDiscord<huantian> Yeah I don’t understand how nixpkgs#Nim doesn’t work
18:46:46FromDiscord<huantian> (edit) "nixpkgs#Nim" => "nixpkgs#nim"
18:46:49FromDiscord<huantian> It should just work
18:47:02FromDiscord<! Nilts> In reply to @huantian "It should just work": Nim crashes
18:47:31FromDiscord<Yardanico> you said before that it freezes, not crashes
18:47:36FromDiscord<Yardanico> maybe you can try running it under strace?
18:48:45FromDiscord<! Nilts> In reply to @Yardanico "you said before that": well, i force cash it becuse my cpu usage goes sky-high and it says nothing
18:49:09FromDiscord<! Nilts> In reply to @planetis "add to git clone": It is working, thanks
18:58:29*mahlon quit (Quit: PotatoTech)
19:16:40*mahlon joined #nim
19:19:30*LuxuryMode joined #nim
19:23:36FromDiscord<Tuatarian> has anyone tried using dawn/wgpu-native in Nim?
19:23:39FromDiscord<Tuatarian> wrong channel
19:39:39FromDiscord<Forest [She/Her]> In reply to @iWonderAboutTuatara "has anyone tried using": Me and @Bubblie tried to wrap gfx/rs/WGPU-Native in Nim but using it was such a struggle we gave up
19:39:57FromDiscord<Forest [She/Her]> We used Futhark to automatically generate bindings but, it sucks (the library in Nim)
19:40:07*neceve quit (Ping timeout: 268 seconds)
19:40:53FromDiscord<Tuatarian> futhark sucks or using futhark for the bindings is just more painful than its worth?
19:41:15FromDiscord<Forest [She/Her]> The latter
19:41:16FromDiscord<Tuatarian> have either of you tried using Dawn's C api with futhark or c2nim or something like that?
19:41:19FromDiscord<Forest [She/Her]> Futhark is great
19:41:19FromDiscord<Tuatarian> ok
19:41:34FromDiscord<Forest [She/Her]> Haven't tried Dawn's C API though, no
19:41:55FromDiscord<Tuatarian> isn't there a c api for wgpu?
19:42:03FromDiscord<Forest [She/Her]> Yeah, wgpu-native
19:42:07FromDiscord<Forest [She/Her]> There's headers for it
19:42:18FromDiscord<Forest [She/Her]> But it's just, a pretty big struggle tbh
19:42:33FromDiscord<Forest [She/Her]> https://github.com/Mythical-Forest-Collective/ngpu
19:44:17FromDiscord<Tuatarian> lmao that last line of the readme says it all I guess
19:44:22FromDiscord<Tuatarian> what did you guys end up using instead?
19:44:31FromDiscord<Forest [She/Her]> Yupp
19:44:34FromDiscord<Tuatarian> currently I use raylib-forever (guevara-chan raylib bindings)
19:44:46FromDiscord<Tuatarian> but I'd like to learn something a bit lower level
19:44:59FromDiscord<Tuatarian> mostly the fallback will be nimgl with glfw/opengl etc
19:45:15FromDiscord<Tuatarian> I'd like to build a 3d renderer in the end so I'll restrict myself to only using ogl to draw 2d things
19:45:23FromDiscord<Forest [She/Her]> That's fair, we were planning on using bgfx but Bubblie is handling creating the wrapper
19:45:30FromDiscord<Forest [She/Her]> You could use Vulkan maybe?
19:45:59FromDiscord<Tuatarian> vulkan is a bit too much
19:46:01FromDiscord<Tuatarian> bgfx is nice
19:46:08FromDiscord<Tuatarian> why bgfx over raylib?
19:46:16FromDiscord<Tuatarian> api agnosticism?
19:47:37FromDiscord<Tuatarian> how would I go about generating bindings for bgfx?
19:47:41FromDiscord<! Nilts> How would i make nimble auto-maticly download a pkg from the web without asking?
19:47:53FromDiscord<Tuatarian> would I use c2nim or futhark?
19:49:46FromDiscord<aru> maybe with `--accept` ?↵(@not logged in)
19:50:08FromDiscord<aru> never tried it so idk
19:54:20FromDiscord<! Nilts> In reply to @aru "maybe with `--accept` ?": Where do you find the list of flags?
19:55:30*adium quit (Write error: Connection reset by peer)
20:03:02FromDiscord<tandy> -y↵(@not logged in)
20:03:09FromDiscord<tandy> nimble -h↵(@not logged in)
20:10:27FromDiscord<Forest [She/Her]> In reply to @iWonderAboutTuatara "why bgfx over raylib?": It's way more flexible in terms of what environments it'll run on
20:10:32FromDiscord<Forest [She/Her]> And what renderers it uses
20:12:20*adium joined #nim
20:14:29FromDiscord<voidwalker> Is it possible to "alias" a user defined operator to an existing one ? For example if I want to use := instead of =
20:15:01FromDiscord<Tuatarian> In reply to @Forest "It's way more flexible": how are you guys going about generating the bindings for it?
20:15:11FromDiscord<Tuatarian> there seem to be existing bindings, and they don't seem to be very good at all
20:15:29FromDiscord<Forest [She/Her]> You have to write the generator yourself, but they haven't finished so
20:16:20FromDiscord<Tuatarian> you can't use futhark/c2nim?
20:19:04FromDiscord<! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=49oP
20:24:22FromDiscord<demotomohiro> Updating your Nim to ver1.6.6 might fix the problem.
20:24:40FromDiscord<! Nilts> In reply to @demotomohiro "Updating your Nim to": ok!
20:27:58FromDiscord<huantian> btw this is my basic nim flake https://media.discordapp.net/attachments/371759389889003532/1014995049660026890/flake.nix
20:30:36FromDiscord<bariali07> Is the C programming language important nowadays with the development we are seeing ↵now?
20:31:40FromDiscord<Rainbow Asteroids> i didn't even ask: someone just make a nix flake of my program and someone else starred it. lol↵https://github.com/nim-nix-pkgs/crowncalc
20:32:23FromDiscord<Rainbow Asteroids> (edit) "ask:" => "ask;"
20:34:09*Nilts joined #nim
20:34:18Niltshmmmm
20:44:13FromDiscord<Forest [She/Her]> In reply to @iWonderAboutTuatara "you can't use futhark/c2nim?": Idk
20:44:26FromDiscord<Forest [She/Her]> Does anyone know how i'd have a table with duplicate keys?
20:46:01FromDiscord<!Patitotective> In reply to @Forest "Does anyone know how": why would you want that? better use an array of tuples
20:46:19FromDiscord<Forest [She/Her]> I wanna have something that i can iterate through, represented as something similar to `OrderedTable[string, seq[string]]`, but `add` is deprecated
20:46:51FromDiscord<!Patitotective> In reply to @Forest "I wanna have something": `seq[(string, T)]`
20:46:52FromDiscord<Forest [She/Her]> In reply to @Patitotective "why would you want": Representing blocks of code with a list of strings
20:46:58FromDiscord<Forest [She/Her]> In reply to @Patitotective "`seq[(string, T)]`": How does that work?
20:47:26FromDiscord<Forest [She/Her]> like how do i access them?
20:47:54FromDiscord<Forest [She/Her]> And how about when it comes to a structure like `OrderedTable[string, seq[MyType]]`?
20:48:24FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=49oU
20:48:37FromDiscord<!Patitotective> In reply to @Forest "And how about when": that looks nice too
20:49:04FromDiscord<Forest [She/Her]> In reply to @Patitotective "that looks nice too": Imo this looks better than using a seq but the add proc is deprecated so
20:49:08FromDiscord<huantian> why not just use `OrderedTable[string, seq[MyType]]`?
20:49:17FromDiscord<!Patitotective> In reply to @Forest "Imo this looks better": make your own
20:49:28FromDiscord<!Patitotective> plus deprecated doesnt mean that it doesnt work
20:49:28FromDiscord<Forest [She/Her]> Just copy and paste it? lmao
20:49:38FromDiscord<huantian> add for tables is kinda cursed tho
20:49:44FromDiscord<Forest [She/Her]> In reply to @Patitotective "plus deprecated doesnt mean": True but i don't want it removed in the future
20:49:56FromDiscord<Forest [She/Her]> In reply to @huantian "add for tables is": Makes sense in my head
20:49:59FromDiscord<!Patitotective> In reply to @Forest "True but i don't": just make your own when that happens or w/e
20:50:06FromDiscord<!Patitotective> In reply to @huantian "add for tables is": its a duplicated table :p
20:50:13FromDiscord<huantian> a map isn't a map anymroe if it maps one key to multiple values
20:51:03FromDiscord<tandy> how can i use filter on a seq with multiple parameters?
20:51:40FromDiscord<!Patitotective> In reply to @tandy "how can i use": https://nim-lang.org/docs/sequtils.html#filterIt.t%2Cuntyped%2Cuntyped
20:51:57FromDiscord<Forest [She/Her]> In reply to @huantian "a map isn't a": Yeah, i don't really need a map tho really, just something clean for representing different values with the same name
20:52:06FromDiscord<Forest [She/Her]> Idk what the word would be called tho
20:52:35FromDiscord<!Patitotective> just use a `Table[key, seq[T]`
20:52:35FromDiscord<huantian> or `someSeq.filter(x => procWithPrams(1, "asdf", x)`
20:54:32FromDiscord<Forest [She/Her]> In reply to @Patitotective "just use a `Table[key,": For something that could look like `if: (value1, value2), elif: (value3, value4), elif: (value5, value6)`?
20:54:40FromDiscord<Forest [She/Her]> Also order is very important
20:55:05FromDiscord<huantian> well seq preserves order
20:55:23*ggsx joined #nim
20:55:56FromDiscord<Forest [She/Her]> Yeah but i also need names to each value
20:56:11FromDiscord<Forest [She/Her]> Idk how to explain it, words are shit today
20:56:21FromDiscord<huantian> can you give an example of your data
20:56:58FromDiscord<!Patitotective> In reply to @Forest "Yeah but i also": you need to name each duplicated key?
20:58:44FromDiscord<domosokrat> `Table[string, seq[(string, string)] ]`
20:59:18FromDiscord<!Patitotective> better `Table[string, Table[string, string]]`
21:00:14FromDiscord<Forest [She/Her]> In reply to @Patitotective "you need to name": Yup
21:00:27FromDiscord<domosokrat> The example data was `if: (value1, value2), elif: (value3, value4), elif: (value5, value6)` so I thought the data would be pairs of strings
21:00:49FromDiscord<Forest [She/Her]> In reply to @Patitotective "better `Table[string, Table[string, string]]`": how would that work?
21:00:58FromDiscord<Forest [She/Her]> In reply to @Patitotective "you need to name": Yup
21:01:17FromDiscord<Forest [She/Her]> data will be MyType, if and elif are strings
21:01:26FromDiscord<domosokrat> `t['elif'] = @[(value3, value4), (value5, value6)`
21:02:51FromDiscord<domosokrat> Or, if it's not pairs\: `Table[string, seq[seq[MyType]]`
21:02:58FromDiscord<huantian> sent a code paste, see https://play.nim-lang.org/#ix=49p0
21:03:28FromDiscord<Forest [She/Her]> Hm okay, thanks!
21:03:49FromDiscord<huantian> (edit) "https://play.nim-lang.org/#ix=49p0" => "https://play.nim-lang.org/#ix=49p1"
21:05:16ggsxis there an option like –passL that passes the options earlier; before the linked (-lm ...) libraries?
21:19:17*NimBot joined #nim
21:19:34FromDiscord<Elegantbeef> `for i in 0..min(a.high, b.high)`
21:20:24FromDiscord<Forest [She/Her]> aight then
21:20:39FromDiscord<Elegantbeef> you can make your own iterator if you need
21:21:35FromDiscord<Forest [She/Her]> Eh it should be fine
21:21:43FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=49p3
21:21:48FromDiscord<Forest [She/Her]> Oh nice
21:22:03FromDiscord<Elegantbeef> The second one might not work though cause i think you can only borrow from first parameter
21:22:36*ggsx quit (Ping timeout: 252 seconds)
21:22:49*ggsx joined #nim
21:27:15*ggsx quit (Client Quit)
21:38:37FromDiscord<! Nilts> Who is the most skilled at nim here?
21:39:06FromDiscord<auxym> araq?
21:44:57*Nilts quit (Quit: Client closed)
21:45:38FromDiscord<! Nilts> In reply to @auxym "araq?": ok
21:47:45FromDiscord<aru> ig but don't tag araq for questions
21:47:55FromDiscord<aru> just ask them here
21:49:20FromDiscord<Elegantbeef> I'm sure he'd love them "How do I handle an exception"
21:49:39FromDiscord<! Nilts> In reply to @Elegantbeef "I'm sure he'd love": ik how
21:50:00FromDiscord<aruZeta> Imagine spamming araq with that question lol
21:50:06*genpaku quit (Remote host closed the connection)
21:50:53FromDiscord<Forest [She/Her]> In reply to @Elegantbeef "The second one might": That's fine with me
21:59:06*NimBot joined #nim
22:00:14*arkurious joined #nim
22:01:43*madprops joined #nim
22:01:43*madprops quit (Changing host)
22:01:43*madprops joined #nim
22:01:54*dom96 joined #nim
22:06:33*deadmarshal joined #nim
22:08:27*laintree is now known as lain
22:24:59FromDiscord<Elegantbeef> @Girvo\: ehhh it verks https://github.com/beef331/wasmer/blob/master/tests/test1.nim
22:25:19FromDiscord<Elegantbeef> Now i just need to wrap all the C code with idiomatic Nim then cry deeply
23:23:51*atk is now known as tk