00:13:35 | FromDiscord | <sealmove> New one I think |
00:24:03 | * | tinystoat quit (Remote host closed the connection) |
00:24:13 | * | tinystoat joined #nim |
00:53:34 | FromDiscord | <auxym> is there a max size to nim enums? 16 bits? |
00:53:46 | FromDiscord | <Elegantbeef> Dont think so |
00:55:22 | FromDiscord | <auxym> ah ok. 16 bits the max size for set[T], which is why I had that in mind probably... |
00:55:44 | FromDiscord | <Elegantbeef> you mean a 16 bit range is the max size 😄 |
00:56:08 | FromDiscord | <Elegantbeef> Given that a set is a bitvector if it could only have 16 bits we'd be in a weird place |
00:58:40 | FromDiscord | <auxym> I mean max sizeof(T) is 2 bytes for set[T], at least if I understand the manual correctly |
00:58:47 | FromDiscord | <auxym> I think we're saying the same thing 😄 |
00:59:03 | FromDiscord | <Elegantbeef> We are i'm just being dumbly pedantics |
00:59:51 | FromDiscord | <Elegantbeef> Eitherway if you have more than 65k enum fields you're just purposely being silly |
01:01:54 | FromDiscord | <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:40 | FromDiscord | <ravinder387> how to import chart.js library in nim |
02:19:49 | FromDiscord | <ravinder387> using jsffi |
02:22:00 | FromDiscord | <ravinder387> `<script>↵const ctx = document.getElementById("myCanvas").getContext('2d')↵const myChart = new Chart(ctx, {... })↵</script>` |
02:22:20 | FromDiscord | <ravinder387> how to map Chart js object in nim |
03:00:26 | FromDiscord | <TheOctoberSurprise> Anyone else getting "No definition found" when trying to view definitions in vscode? |
03:01:58 | FromDiscord | <TheOctoberSurprise> https://media.discordapp.net/attachments/371759389889003532/1014731819230437476/Screen_Shot_2022-08-31_at_11.01.10_PM.png |
03:02:35 | FromDiscord | <Elegantbeef> If you arent already grab the nimsaem extension |
03:02:42 | FromDiscord | <Elegantbeef> If that doesnt help welcome to Nim tooling, it's the worst aspect |
03:08:02 | FromDiscord | <TheOctoberSurprise> There was a vscode update that was pending. That plus reinstalling the nimasem extension seems to have done the trick |
03:08:08 | FromDiscord | <TheOctoberSurprise> Thanks again @ElegantBeef |
03:08:14 | FromDiscord | <Elegantbeef> No problem |
03:08:36 | FromDiscord | <Elegantbeef> Now to joking insult your code tsk tsk using return in a procedure that doesnt have any indention |
03:09:35 | FromDiscord | <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:31 | FromDiscord | <TheOctoberSurprise> https://media.discordapp.net/attachments/371759389889003532/1014734471695700028/Screen_Shot_2022-08-31_at_11.11.50_PM.png |
03:12:43 | FromDiscord | <Elegantbeef> `1000u32` 😄 |
03:13:03 | FromDiscord | <Elegantbeef> I'm saying turn it into a expression |
03:13:09 | FromDiscord | <Elegantbeef> It's the nim way 😛 |
03:13:51 | FromDiscord | <Elegantbeef> Ah nevermind `/` is only defined for `int` |
03:14:04 | FromDiscord | <Elegantbeef> smoke bomb |
03:14:41 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=49ji |
03:14:42 | FromDiscord | <TheOctoberSurprise> Ah ok, I feel slightly better |
03:15:03 | FromDiscord | <TheOctoberSurprise> I will go with god's intentions in this case 🙂 |
03:15:04 | FromDiscord | <Elegantbeef> Also i'm dubious of your usage of `ref Timer` |
03:15:09 | FromDiscord | <Elegantbeef> What's your definition of `Timer`? |
03:15:28 | FromDiscord | <Elegantbeef> `ref` in Nim does not mean what it does in C# |
03:15:34 | FromDiscord | <TheOctoberSurprise> sent a code paste, see https://play.nim-lang.org/#ix=49jj |
03:15:41 | FromDiscord | <Elegantbeef> You wouldnt use `method` or `base` here then |
03:15:45 | FromDiscord | <Elegantbeef> Since it's not capable of being inherited |
03:15:56 | FromDiscord | <TheOctoberSurprise> so just a proc? |
03:16:02 | FromDiscord | <Elegantbeef> it'd be `proc getElapsed(timer: var Timer): float32 = ...` |
03:16:30 | FromDiscord | <TheOctoberSurprise> i've probably abused methods |
03:16:37 | FromDiscord | <Elegantbeef> `method` is only used for runtime dispatch of inheritable objects |
03:16:46 | FromDiscord | <Elegantbeef> If it's not a `object of X` it's not capable of utilising method properly |
03:17:15 | FromDiscord | <Elegantbeef> Nim doesnt use a vtable for dispatch of methods so it'll slow your program down misusing it |
03:17:39 | FromDiscord | <TheOctoberSurprise> ah so of RootObj would make this a valid use of method? |
03:19:02 | FromDiscord | <Generic> only if you'd want that method to be overwriteable by objects inheriting from Timer |
03:19:40 | FromDiscord | <TheOctoberSurprise> right. this might not be a good use for methods |
03:19:49 | FromDiscord | <Elegantbeef> Method in Nim is much like a overridable method in C# they can be overidden in children |
03:19:56 | FromDiscord | <Elegantbeef> `object` in Nim is pretty much `struct` in C# |
03:20:22 | FromDiscord | <Elegantbeef> So there is no reason to have an overidable procedure |
03:20:29 | FromDiscord | <Generic> it doesn't have weird mutability restrictions I haven't fully understood even today though 😄 |
03:20:51 | FromDiscord | <Elegantbeef> and `ref T` in Nim is a heap allocated reference to T it's not just "pass by reference" |
03:21:39 | FromDiscord | <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:55 | FromDiscord | <TheOctoberSurprise> i see |
03:22:10 | FromDiscord | <Elegantbeef> `var T` is literally just a pointer that is checked to not outlive the procedure |
03:22:50 | FromDiscord | <Elegantbeef> And this concludes me helping you with your VSCode issue 😛 |
03:23:06 | FromDiscord | <TheOctoberSurprise> it is appreciated |
03:23:28 | FromDiscord | <Elegantbeef> Yea given I came from C# like i mentioned previously i went through all of this aswell |
03:24:04 | FromDiscord | <TheOctoberSurprise> the explanation of the distinction between ref and var is helpful |
03:25:35 | FromDiscord | <Elegantbeef> Generic you write Intepreters and VMs, why no WASM interpreter 😛 |
03:55:54 | FromDiscord | <Girvo> Speaking of WASM, hows wasm3 going beef 😛 |
03:56:47 | FromDiscord | <Elegantbeef> That falls into it lacks documentation |
03:57:18 | FromDiscord | <Elegantbeef> I was going to wrap it but i looked at it and i'm at a loss of what needs wrapped 😄 |
03:58:19 | FromDiscord | <Elegantbeef> I did then throw c2nim at the expanded preprocessor version of wasmer, it did ok |
04:17:24 | FromDiscord | <Girvo> Ah nice |
04:17:28 | FromDiscord | <Girvo> gcc -E or cpp? |
04:17:38 | FromDiscord | <Elegantbeef> `gcc -E` |
04:17:45 | FromDiscord | <Girvo> Okay nice |
04:18:15 | FromDiscord | <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:39 | FromDiscord | <Elegantbeef> Well aside from some lacking type definitions it got most of the funky macros down |
04:18:39 | FromDiscord | <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:46 | FromDiscord | <Girvo> Hell yeah |
04:19:06 | FromDiscord | <Elegantbeef> Combined with https://github.com/nim-lang/c2nim/blob/master/doc/c2nim.rst#header-directive it might be pretty usable |
04:19:38 | FromDiscord | <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:39 | FromDiscord | <Elegantbeef> Whoops i meant to grab the dynlib 😄 |
04:20:10 | FromDiscord | <Girvo> Hah for me I already use `--header` |
04:20:31 | FromDiscord | <Elegantbeef> I just learend about the def directive |
04:20:37 | FromDiscord | <Elegantbeef> learned even |
04:20:39 | FromDiscord | <Girvo> Yeah its handy as hell |
04:21:08 | FromDiscord | <Girvo> The various directives are nice |
04:38:15 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1014756045555519560/image.png |
04:38:16 | FromDiscord | <Elegantbeef> Mmmmh yes wasm types |
04:45:12 | FromDiscord | <Elegantbeef> Fuck yea successfully dynamically linking all procedures |
05:03:04 | * | disso_peach quit (Quit: Leaving) |
05:12:31 | FromDiscord | <hcorion> sent a code paste, see https://play.nim-lang.org/#ix=49jw |
05:16:30 | FromDiscord | <Elegantbeef> That should be all required |
05:16:38 | FromDiscord | <Elegantbeef> Does it work with the C compiler? |
05:16:42 | FromDiscord | <hcorion> I'm using latest Nim 1.6.6 downloaded via choosenim |
05:16:47 | FromDiscord | <hcorion> Yeah c compiler works fine |
05:18:42 | FromDiscord | <Girvo> Is a 32 byte "string" going to be passed by-copy in most instances? |
05:19:02 | FromDiscord | <Elegantbeef> Nim strings always pass by copy, but since they're pointers that's 'free' |
05:19:13 | FromDiscord | <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:35 | FromDiscord | <Elegantbeef> Nim passes all types smaller than 3 floats as copy |
05:19:35 | FromDiscord | <Girvo> So copying the pointer going across threads isn't ideal, I think. I'll test it though |
05:19:39 | FromDiscord | <Girvo> Okay sweet |
05:19:58 | FromDiscord | <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:11 | FromDiscord | <Elegantbeef> You can also annotate types `{.bycopy.}` or `{.byref.}` |
05:20:23 | FromDiscord | <Elegantbeef> `nim cpp -r ./myfile.nim` does what? |
05:21:26 | FromDiscord | <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:45 | FromDiscord | <hcorion> It doesn't seem to like executing via `-r` 🤔 |
05:21:55 | FromDiscord | <hcorion> `Error: execution of an external program failed: 'E:\Projects\NimScriptingTest\Plugins\NimForUE\test.exe '` |
05:22:09 | FromDiscord | <Girvo> oooh spontaneous errors are always great lol |
05:22:40 | FromDiscord | <Elegantbeef> Aside from not compiling wat to wasm i have their exact code but mine errors... this is dumb |
05:22:56 | FromDiscord | <Girvo> That is really dumb :/ |
05:25:02 | FromDiscord | <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:16 | FromDiscord | <b1rdf00d> For now I just disabled threads |
05:29:27 | FromDiscord | <Elegantbeef> Oh whew the error is just cause I have WASI enabled |
05:30:18 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=49jx |
05:30:54 | FromDiscord | <Elegantbeef> I cannot really say much b1rd, i'm using a local runtime and using it for plugin/scripting |
05:31:34 | FromDiscord | <b1rdf00d> That's cool 🙂 I'll work it out and post back |
05:31:54 | FromDiscord | <b1rdf00d> Are these plugins for your game/engine? |
05:32:02 | FromDiscord | <Elegantbeef> For a game like project |
05:32:35 | * | disso_peach joined #nim |
05:32:40 | FromDiscord | <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:27 | FromDiscord | <Elegantbeef> I had a runtime picked out but it started behaving weird so i've been looking at other ones |
05:34:22 | FromDiscord | <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:22 | FromDiscord | <Elegantbeef> wasmer is actually quite nice in many regards though 😄 |
05:34:35 | FromDiscord | <Elegantbeef> What do you mean "what am i using for AI" |
05:34:53 | FromDiscord | <b1rdf00d> like pytorch/arraymancer/your own? |
05:35:38 | FromDiscord | <b1rdf00d> game ai is often still hand made as opposed to ML stuff yeah? |
05:38:28 | FromDiscord | <Elegantbeef> I mean the entire point is to let people write their own AI |
05:39:49 | FromDiscord | <b1rdf00d> _oh right!_ |
05:40:17 | FromDiscord | <Elegantbeef> A player might be able to play with the AI but it's really just a turnbased tank arena game |
05:40:39 | FromDiscord | <b1rdf00d> this sounds cool |
05:40:55 | FromDiscord | <Elegantbeef> Only really cool if i can get a fucking runtime to work 😉 |
05:42:25 | FromDiscord | <Elegantbeef> I just have to make it look purdy and people will toy with it is my hope |
05:43:12 | FromDiscord | <b1rdf00d> I think having an entry level to building a game ai would attract people |
05:43:57 | FromDiscord | <b1rdf00d> off the top of my head the other options are: board game of some kind, or star craft 1 |
05:44:44 | FromDiscord | <Elegantbeef> Yea i mean it's basically a board game |
05:45:00 | FromDiscord | <Elegantbeef> It's turnbased an any action causes your move to be up |
05:45:07 | madprops | https://store.steampowered.com/app/280220/Creeper_World_3_Arc_Eternal/ |
05:45:32 | FromDiscord | <Elegantbeef> Bad paste or is this in reference to something? |
05:45:42 | madprops | reference to game ideas |
05:46:11 | FromDiscord | <Elegantbeef> I do have another much deeper game idea that uses wasm for a factorio like puzzle game |
05:46:51 | FromDiscord | <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:12 | madprops | reminds me of https://store.steampowered.com/app/1302860/Assembly_Planter/ |
05:48:21 | FromDiscord | <b1rdf00d> you could make a game based on plugging different wasm binaries together to make better binaries |
05:48:56 | FromDiscord | <b1rdf00d> end goal: build a wasm run time that hosts tge game |
05:49:01 | FromDiscord | <b1rdf00d> (edit) "tge" => "the" |
05:49:23 | madprops | i invented a game from scratch once |
05:49:24 | madprops | it's a terrible game |
05:50:06 | FromDiscord | <Elegantbeef> Yea madprops that's basically the game, just using wasm moddable components 😄 |
05:50:26 | FromDiscord | <Elegantbeef> People generally like the games i make, so i pretend to be a good game designer |
05:51:57 | madprops | what's your best game? |
05:52:03 | madprops | link me |
05:52:28 | FromDiscord | <Elegantbeef> I mean aside from game jams i only really have a single game https://jbeetham.itch.io/linerino |
05:52:35 | FromDiscord | <Elegantbeef> And even that is quite simplistic |
05:52:42 | FromDiscord | <Elegantbeef> But i know pmunch has been addicted to it |
05:53:06 | FromDiscord | <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:55 | FromDiscord | <Elegantbeef> copymem is the best way, perhaps strbasics aswell |
05:55:01 | FromDiscord | <Girvo> Ah I'll check strbasics too |
05:55:04 | FromDiscord | <Girvo> Cheers |
05:55:36 | FromDiscord | <Elegantbeef> Nevermind on strbasics it's all str lefthand |
05:55:41 | FromDiscord | <Girvo> Yep haha just checked |
05:55:45 | FromDiscord | <Girvo> copyMem it is! |
05:55:54 | FromDiscord | <Girvo> Oh well, makes it clear what and why at least |
05:56:13 | FromDiscord | <Elegantbeef> also 'to a cstring on the stack' is a scary sentence 😛 |
05:56:25 | FromDiscord | <Girvo> 😛 welcome to embedded my friend |
05:56:49 | FromDiscord | <Girvo> Though I'm going to refactor this, it'll be to a static buffer instead shortly |
05:57:27 | FromDiscord | <Girvo> But need to keep moving and passing ref counted things to xQueueSend across thread boundaries still gives me the heebie jeebies |
05:59:20 | FromDiscord | <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:35 | FromDiscord | <Elegantbeef> It's made in Nico with aseprite graphics |
05:59:49 | FromDiscord | <Elegantbeef> I have to credit @impbox [ftsf] with the graphics as they really made it look better than i did 😄 |
06:00:06 | FromDiscord | <Elegantbeef> I drew them but impbox gave some good references on how they'd do it |
06:00:15 | madprops | i don't get why i can't get the south tile https://i.imgur.com/7SnZYt9.jpg |
06:01:14 | FromDiscord | <Elegantbeef> You can only move on a tile if you have 1 move left |
06:01:22 | madprops | ohh ok |
06:01:30 | FromDiscord | <Elegantbeef> Moves indicated on your player and on the tile you started from |
06:01:51 | FromDiscord | <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:04 | madprops | i like the mechanics |
06:04:10 | madprops | seems straightforward enough |
06:04:15 | madprops | but not simple |
06:05:17 | FromDiscord | <Elegantbeef> I like to think of it as deceptively simple, since it's literally just "visit all the tiles" 😄 |
06:05:27 | FromDiscord | <Elegantbeef> but when you're greeted with |
06:05:27 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1014777992095993866/image.png |
06:05:41 | FromDiscord | <Elegantbeef> It's a bit more than simple |
06:06:55 | madprops | oh nice it can be maximized |
06:07:11 | madprops | i was playing in a small window |
06:08:00 | madprops | are t he proc gen ones too hard? |
06:08:12 | FromDiscord | <Elegantbeef> There's a difficulty slider for them |
06:08:44 | FromDiscord | <Elegantbeef> Easy is like \<=20 tiles |
06:09:00 | FromDiscord | <Elegantbeef> big brain is like 30-40 tiles |
06:10:12 | FromDiscord | <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:08 | madprops | is it possible to make the wrong move very early in the game ? |
06:12:08 | FromDiscord | <b1rdf00d> yep that's cool, I want to do a similar thing to ensure proc gens levels are possible to complete |
06:12:54 | FromDiscord | <Elegantbeef> It is madprops, you can undo using z or fully rest using x |
06:13:09 | madprops | yeah im just wondering because i got to a choke |
06:13:15 | madprops | and i don't know if the problem was in the initial moves |
06:13:18 | madprops | so im restarting it |
06:15:34 | madprops | heh it's possible to get stuck if you teleport with 1 move left |
06:16:09 | FromDiscord | <b1rdf00d> In reply to @madprops "heh it's possible to": you can press z to undo |
06:16:27 | madprops | yeah |
06:17:32 | FromDiscord | <Elegantbeef> I kinda do that for level complexity |
06:17:34 | FromDiscord | <Elegantbeef> Jesus this code is fugly |
06:17:39 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=49jE |
06:18:00 | FromDiscord | <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:32 | madprops | yeah it's just a funny thing |
06:20:31 | madprops | this one is interesting https://i.imgur.com/lWtZV90.jpg |
06:23:14 | madprops | next one is harder |
06:26:10 | madprops | if you land on them https://i.imgur.com/mXXwlyE.jpg |
06:26:20 | madprops | on a refill square |
06:27:20 | FromDiscord | <b1rdf00d> In reply to @Elegantbeef "The dumb solution is": I've done a similar thing before and it works so 🤷 |
06:33:20 | madprops | it 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:37 | madprops | ok im done playing but it's fun |
06:36:01 | madprops | baba is you players would like it |
06:39:03 | FromDiscord | <retkid> please tell me theres a better way |
06:39:06 | FromDiscord | <retkid> sent a code paste, see https://paste.rs/3r7 |
06:39:34 | FromDiscord | <d4rckh> any cool scripting lang i can embed into my nim program? |
06:39:42 | FromDiscord | <retkid> yea its called python |
06:40:03 | FromDiscord | <retkid> or bash if you're bold |
06:40:40 | FromDiscord | <d4rckh> does the python lib require python installed? |
06:40:59 | FromDiscord | <d4rckh> (edit) "does the python lib require python ... installed?" added "to be" |
06:41:24 | FromDiscord | <retkid> how else would it work |
06:41:25 | FromDiscord | <d4rckh> i want to have the scripts call nim functions |
06:41:36 | FromDiscord | <retkid> well |
06:41:39 | FromDiscord | <retkid> I use bash for that |
06:41:50 | FromDiscord | <retkid> just program your stuff to work with std |
06:41:57 | FromDiscord | <retkid> then you can pipe and do everything you could ever want |
06:42:11 | FromDiscord | <retkid> python has interop in nim already done tho |
06:42:21 | FromDiscord | <retkid> its probably the only scripting language thats big that has it |
06:45:30 | FromDiscord | <Rika> You can embed a NimScript VM into your program |
06:45:42 | FromDiscord | <retkid> i thought that was a meme |
06:46:56 | FromDiscord | <retkid> i dont think thats what they want tho |
06:47:17 | madprops | is ruby an option at all Rika ? |
06:47:24 | FromDiscord | <Rika> I don’t know |
06:47:52 | FromDiscord | <retkid> > Ruby |
06:47:56 | FromDiscord | <retkid> have we stooped that low |
06:47:59 | FromDiscord | <d4rckh> https://github.com/jangko/nimLUA |
06:48:05 | FromDiscord | <d4rckh> lua is an option 😄 |
06:48:13 | madprops | im liking ruby >_< |
06:48:37 | madprops | as a scripting language |
06:49:31 | FromDiscord | <retkid> In reply to @d4rckh "https://github.com/jangko/nimLUA": https://media.discordapp.net/attachments/371759389889003532/1014789078874587156/unknown.png |
06:49:36 | FromDiscord | <retkid> yo nim JVM when |
06:49:45 | FromDiscord | <Rika> How many times |
06:49:46 | FromDiscord | <retkid> wait that was a thing |
06:49:47 | FromDiscord | <retkid> and I did that |
06:49:49 | FromDiscord | <retkid> oh |
06:49:53 | FromDiscord | <retkid> i forgot |
06:50:10 | FromDiscord | <retkid> why did i try to do that again |
06:50:54 | FromDiscord | <retkid> you see this https://media.discordapp.net/attachments/371759389889003532/1014789429388386415/unknown.png |
06:51:01 | FromDiscord | <retkid> if java had this it might be usable \ |
06:51:09 | FromDiscord | <retkid> (edit) removed "\" |
06:55:01 | * | rockcavera quit (Remote host closed the connection) |
06:56:06 | FromDiscord | <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:41 | madprops | link? |
06:56:49 | FromDiscord | <retkid> maybe tomorrow |
06:56:53 | FromDiscord | <retkid> writing unit tests |
06:59:25 | FromDiscord | <d4rckh> good boi, writing tests |
07:00:03 | FromDiscord | <retkid> i want a job |
07:00:07 | FromDiscord | <retkid> im only doing this for that |
07:00:13 | FromDiscord | <retkid> otherwise Im sure my code works fine |
07:00:41 | FromDiscord | <retkid> im kinda obsessive about testing my code |
07:00:47 | FromDiscord | <Rika> If you want a job you wouldn’t want to be writing Nim no? |
07:00:56 | FromDiscord | <retkid> this is why next project wont be in nim |
07:01:10 | FromDiscord | <retkid> probably R |
07:01:14 | FromDiscord | <d4rckh> i getting a green ticks so i write a lot of tests |
07:01:17 | FromDiscord | <d4rckh> (edit) "i ... getting" added "like" |
07:01:33 | FromDiscord | <retkid> but idk if R is general purpose or not |
07:01:42 | FromDiscord | <retkid> writing a game in R sounds like the worst best idea |
07:01:53 | FromDiscord | <d4rckh> isnt R used for analyzing data? |
07:02:10 | FromDiscord | <d4rckh> like pandas in python |
07:02:14 | FromDiscord | <d4rckh> but all the functions are built in |
07:02:18 | FromDiscord | <Rika> R is not general purpose |
07:02:20 | FromDiscord | <retkid> shite |
07:02:24 | FromDiscord | <enthus1ast> R is used to make your brain explode |
07:02:26 | FromDiscord | <retkid> I already did all of that in nim |
07:02:26 | FromDiscord | <Rika> You will be writing analytical data systems or whatnot |
07:02:31 | FromDiscord | <retkid> .-. |
07:02:37 | FromDiscord | <retkid> I can use R here but |
07:02:40 | FromDiscord | <retkid> i dont wanna... do this anymore |
07:02:48 | FromDiscord | <retkid> this project is hurting my brain |
07:02:51 | FromDiscord | <d4rckh> just embed R in nim |
07:02:53 | FromDiscord | <retkid> yea |
07:02:58 | FromDiscord | <retkid> i would if i continued this project |
07:02:59 | FromDiscord | <Rika> R is definitely (I guess almost) never used for anything but data analysis |
07:03:13 | FromDiscord | <enthus1ast> R is kinda different, but very powerful |
07:03:15 | FromDiscord | <Rika> In reply to @retkid "this project is hurting": Split it into smaller goals |
07:03:59 | FromDiscord | <enthus1ast> and its somehow based on tabular data structures called data frames |
07:04:04 | FromDiscord | <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:16 | FromDiscord | <retkid> but |
07:04:18 | FromDiscord | <retkid> i need to read books |
07:04:20 | FromDiscord | <retkid> to do this |
07:04:35 | FromDiscord | <retkid> and this project has been in my brain since january |
07:04:37 | FromDiscord | <retkid> i want to be done |
07:04:54 | FromDiscord | <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:14 | FromDiscord | <retkid> I usually fumble my way around it like drunk dark sex |
07:05:16 | FromDiscord | <Rika> Or a few data sheets |
07:05:22 | FromDiscord | <retkid> eventually it comes out but it takes a bit |
07:05:38 | FromDiscord | <Rika> M8 you don’t sound old enough to be having sex |
07:05:41 | FromDiscord | <enthus1ast> i can recommend https://benwhalley.github.io/just-enough-r/ |
07:05:44 | FromDiscord | <retkid> im 19 .-. |
07:06:18 | FromDiscord | <retkid> Rika i know im incredibly immature but im an adult |
07:06:19 | FromDiscord | <retkid> somehow |
07:06:26 | FromDiscord | <retkid> its quite scary |
07:06:40 | FromDiscord | <Rika> I know |
07:07:08 | FromDiscord | <Rika> I’m not sure what you’re doing exactly to have put you in some state of despair |
07:07:37 | FromDiscord | <retkid> family life sucks |
07:07:43 | FromDiscord | <retkid> need job to escape |
07:07:57 | FromDiscord | <retkid> dedicated the last year to nim |
07:08:04 | FromDiscord | <retkid> (edit) "dedicated the last year to nim ... " added "and js" |
07:08:24 | FromDiscord | <retkid> all reasons for depression |
07:09:52 | FromDiscord | <Rika> Well I’m no counsellor so |
07:11:03 | FromDiscord | <retkid> next project will be Odin or Haskell |
07:11:12 | FromDiscord | <retkid> I liked F# but it was a pain in the ass to write |
07:11:18 | FromDiscord | <retkid> anyway this is offtopic, sorryu |
07:11:29 | * | PMunch joined #nim |
07:11:29 | FromDiscord | <Elegantbeef> Neither of those are overly better for a job |
07:11:37 | FromDiscord | <retkid> what do i do then |
07:11:56 | FromDiscord | <d4rckh> how can i make threads use windows thread instead of the libwinpthread? |
07:12:01 | FromDiscord | <d4rckh> (edit) "libwinpthread?" => "libwinpthread-1.dll?" |
07:12:07 | FromDiscord | <d4rckh> (edit) "thread" => "threads" |
07:12:07 | FromDiscord | <creikey> In reply to @retkid "what do i do": probably start networking using your ineteresting nim projects |
07:12:23 | FromDiscord | <retkid> In reply to @creikey "probably start networking using": Thats what I bee doing but nobody care .-. |
07:12:26 | FromDiscord | <Elegantbeef> If you really want a job webdev is the way to go 😄 |
07:12:28 | FromDiscord | <Rika> Networking or start using a popular language |
07:12:39 | FromDiscord | <retkid> i use node |
07:12:41 | FromDiscord | <retkid> i like node |
07:12:44 | FromDiscord | <retkid> i have big projects in node |
07:12:48 | FromDiscord | <Rika> Then go try for a job in Node |
07:12:53 | FromDiscord | <retkid> they still ignore me |
07:12:55 | FromDiscord | <retkid> .-,. |
07:12:56 | FromDiscord | <Rika> Why |
07:12:58 | FromDiscord | <retkid> (edit) ".-,." => ".-." |
07:13:00 | FromDiscord | <Rika> Do you have no resume |
07:13:08 | FromDiscord | <retkid> i have a pretty interesting resume |
07:13:16 | FromDiscord | <Rika> Then send it to a few tens of companies |
07:13:24 | FromDiscord | <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:25 | FromDiscord | <Elegantbeef> Rika no flame↵(@Rika) |
07:13:26 | FromDiscord | <retkid> I've been doing that since may or so |
07:13:26 | FromDiscord | <Elegantbeef> 😄 |
07:13:46 | FromDiscord | <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:49 | FromDiscord | <Rika> In reply to @Elegantbeef "Rika no flame (<@259277943275126785>)": I have no idea how it works over there so |
07:13:50 | FromDiscord | <creikey> because you know them |
07:13:53 | FromDiscord | <creikey> uploading resume pdfs does like nothing |
07:14:06 | FromDiscord | <retkid> yea |
07:14:13 | FromDiscord | <Rika> Job culture here in Japan is very drastically different |
07:14:28 | FromDiscord | <retkid> I have systematically retreated from programming circles because I only joined them for help |
07:14:42 | FromDiscord | <retkid> and... as you grow... it becomes more and more superfluous |
07:14:48 | FromDiscord | <creikey> my greatest accomplishment is 3 years ago the lead of youtube VR said my PR for godot was "nice" |
07:14:49 | FromDiscord | <retkid> In reply to @Rika "Job culture here in": and scary |
07:14:53 | FromDiscord | <creikey> I've been riding off that high ever since |
07:15:06 | FromDiscord | <retkid> i would cry |
07:15:21 | FromDiscord | <retkid> a google engineer told me my node code was "archaic and disgusting" |
07:15:34 | FromDiscord | <creikey> In reply to @retkid "a google engineer told": it is what it is |
07:15:47 | FromDiscord | <retkid> but she fixed me |
07:15:52 | FromDiscord | <creikey> I spent like 1 week reverse engineering android apk manifest bytecode all for that one thumbs up on github |
07:16:04 | FromDiscord | <Rika> In reply to @retkid "but she fixed me": “I can fix him” |
07:16:11 | FromDiscord | <Elegantbeef> Wait people compliment code and dont jusut shit on it? |
07:16:12 | FromDiscord | <retkid> she fixed me, then broke my heart |
07:16:18 | FromDiscord | <retkid> its google man |
07:16:19 | FromDiscord | <retkid> they evil |
07:16:22 | FromDiscord | <Rika> In reply to @Elegantbeef "Wait people compliment code": Lol |
07:16:31 | FromDiscord | <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:35 | FromDiscord | <retkid> In reply to @Elegantbeef "Wait people compliment code": I've complimented your code before |
07:16:51 | FromDiscord | <retkid> you've just shitted on my code tho |
07:16:54 | FromDiscord | <creikey> In reply to @retkid "they evil": at least 10% of google software works though |
07:17:02 | FromDiscord | <Elegantbeef> I dont know why. It always looks like what my dog leaves after eating |
07:17:09 | FromDiscord | <retkid> it would be 20% if they stopped fucking using python |
07:17:18 | FromDiscord | <Rika> ? |
07:17:31 | FromDiscord | <Rika> What’s wrong with Python at their level? |
07:18:49 | FromDiscord | <retkid> python at large scales is just... |
07:18:52 | FromDiscord | <retkid> i dont like it |
07:19:08 | FromDiscord | <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:17 | FromDiscord | <retkid> exactly |
07:19:20 | FromDiscord | <retkid> beyond like 300 lines of code |
07:19:22 | FromDiscord | <Rika> In reply to @creikey "In my experience python": I know that well enough lol |
07:19:26 | FromDiscord | <retkid> python just becomes mush |
07:19:34 | FromDiscord | <creikey> if everybody is like 10 years experience python and they know what they're doing maybe it doesn't matter |
07:19:53 | FromDiscord | <Rika> I’m maybe about 4 or so |
07:19:54 | FromDiscord | <retkid> i cant imagine what 10 years of python would do to someone |
07:20:14 | FromDiscord | <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:28 | FromDiscord | <Rika> Well that side of Python is another thing |
07:20:29 | FromDiscord | <retkid> 10 years of numpy is a demon |
07:20:33 | FromDiscord | <creikey> that's true |
07:20:40 | FromDiscord | <retkid> thats how you make a monster |
07:20:47 | FromDiscord | <retkid> https://tenor.com/view/coronavirus-out-of-this-house-cross-get-out-gif-16681717 |
07:20:52 | FromDiscord | <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:16 | FromDiscord | <retkid> in 3 years of python I've never written a single class |
07:21:26 | FromDiscord | <creikey> In reply to @retkid "in 3 years of": I don't understand how this is possible |
07:21:27 | FromDiscord | <Rika> What |
07:21:31 | FromDiscord | <Rika> The FUCK have you been doing |
07:21:42 | FromDiscord | <retkid> for example |
07:21:48 | FromDiscord | <Elegantbeef> Also retkid dont worry i've seen some code on nim's codewars that really makes me question my sanity |
07:21:50 | FromDiscord | <Rika> I’m reminded of myself when I started Python |
07:21:53 | FromDiscord | <creikey> you guys my genetic simulation in nim and arraymancer has actually learned some things |
07:22:04 | FromDiscord | <retkid> until like 2 months ago i didn't know what a 2 dimensional array was |
07:22:07 | FromDiscord | <retkid> until arraymancer taught me |
07:22:08 | FromDiscord | <Rika> Your simulation can learn things? |
07:22:23 | FromDiscord | <creikey> In reply to @Rika "Your simulation can learn": yeah average creature lifespan has doubled after 14 hours of simulation time |
07:22:24 | FromDiscord | <retkid> genetic algorithms learn things |
07:22:32 | FromDiscord | <Rika> Oh you mean that way |
07:22:33 | FromDiscord | <retkid> for survival |
07:22:33 | FromDiscord | <Rika> Okay |
07:22:40 | FromDiscord | <Rika> My brain didn’t connect that for a moment |
07:22:46 | FromDiscord | <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:46 | FromDiscord | <Elegantbeef> creikey are we at levels of deepbeef saying bullshittery? |
07:22:58 | FromDiscord | <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:09 | FromDiscord | <Rika> Can we have a very bad sarcasm and humour bot that’s just trained on beef’s messages |
07:23:11 | FromDiscord | <retkid> In reply to @creikey "my special idea with": hmmmmmmmmmmmmm |
07:23:11 | FromDiscord | <creikey> In reply to @creikey "my special idea with": recurrent neural network instead of perceptron |
07:23:18 | FromDiscord | <Elegantbeef> That was the point of deepbeef rika |
07:23:31 | FromDiscord | <creikey> deepbeef wouldnt' even be hard, I already did that with a friend of mine and it was sooo funny |
07:23:37 | FromDiscord | <Rika> I’ve never heard of it so I assume I wasn’t there when you discussed it |
07:23:51 | FromDiscord | <creikey> the AI made up a new word that like he would say, it was incredibly funny |
07:23:52 | FromDiscord | <Elegantbeef> Rika you've laughed at my jokes, so you dont get to call it "very bad sarcasm and humour" |
07:24:11 | FromDiscord | <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:13 | FromDiscord | <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:16 | FromDiscord | <Rika> Dude what do you mean, I never denied that I had a similar sense |
07:24:26 | FromDiscord | <Elegantbeef> accepting even one joke validates all! |
07:24:32 | FromDiscord | <Rika> Sure |
07:24:40 | FromDiscord | <retkid> if you make memory finite and have a changing enviroment |
07:24:44 | FromDiscord | <retkid> you can track when things get forgotten |
07:25:02 | FromDiscord | <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:07 | FromDiscord | <creikey> that's what I meant by make the simulation more complex |
07:25:21 | FromDiscord | <retkid> yes |
07:25:27 | FromDiscord | <retkid> im giving ideas |
07:25:40 | FromDiscord | <creikey> it's open source i'll send it to once I push my changes right now |
07:25:43 | FromDiscord | <retkid> memory should be finite, some should get passed down between generations and some should die |
07:25:44 | FromDiscord | <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:52 | FromDiscord | <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:10 | FromDiscord | <Elegantbeef> Come make a wood furniture shop here and i'll join↵(@Rika) |
07:26:18 | FromDiscord | <creikey> In reply to @retkid "memory should be finite,": the memory is copied on mutation, but the weights and biases are changed |
07:27:22 | FromDiscord | <retkid> make a way to store memory outside of people, then see them develop libraries |
07:27:55 | FromDiscord | <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:05 | FromDiscord | <Rika> In reply to @Elegantbeef "Come make a wood": If it’s Canada I’d deffo be fixing bikes lmao |
07:28:20 | FromDiscord | <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:29 | FromDiscord | <Elegantbeef> You'd think, but unless you're in a city there are very few bikes |
07:28:38 | FromDiscord | <Elegantbeef> Bikes are for those hippies |
07:28:41 | FromDiscord | <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:53 | FromDiscord | <Elegantbeef> dude your code runs in the future? |
07:29:01 | madprops | don't lobotomize your creatures >_< |
07:29:06 | FromDiscord | <creikey> In reply to @Elegantbeef "dude your code runs": true |
07:29:08 | * | greaser|q joined #nim |
07:29:11 | FromDiscord | <Rika> In reply to @Elegantbeef "You'd think, but unless": Heard there are plenty of bike parks near the cities so |
07:29:24 | FromDiscord | <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:26 | FromDiscord | <creikey> that would be interesting |
07:29:34 | FromDiscord | <creikey> then it would optimize for the right brain size instead of me just picking it |
07:29:53 | FromDiscord | <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:59 | FromDiscord | <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:05 | FromDiscord | <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:45 | FromDiscord | <Elegantbeef> Well what's your profiling tool do? |
07:30:54 | FromDiscord | <creikey> here I'll send the file on github |
07:30:56 | FromDiscord | <creikey> just what I said yesterday |
07:31:07 | FromDiscord | <creikey> In reply to @creikey "here I'll send the": once I finish adding this camera and memory visualization |
07:31:36 | FromDiscord | <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:54 | FromDiscord | <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:37 | FromDiscord | <Rika> In reply to @Elegantbeef "There probably are, but": I mean that’s what I mean, people who use it for fun |
07:33:40 | FromDiscord | <Rika> Not for transport |
07:33:44 | FromDiscord | <Elegantbeef> Ah |
07:33:53 | FromDiscord | <Elegantbeef> B1rd all the way down in yeehaw country? |
07:35:17 | FromDiscord | <Rika> All this real life talk has gotten me stressed now |
07:36:43 | FromDiscord | <creikey> I wonder what a really nice nim editing environment made in nim would look like |
07:36:51 | FromDiscord | <creikey> vscode with nimsuggest has random 3 second stutters while I type |
07:37:02 | FromDiscord | <Rika> One with a working suggestion engine would be nice |
07:37:17 | FromDiscord | <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:30 | FromDiscord | <Elegantbeef> nimsuggest v3 soonTM |
07:37:48 | FromDiscord | <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:10 | FromDiscord | <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:34 | FromDiscord | <Elegantbeef> I mean that's what IC is for, but IC is still not usable |
07:38:45 | FromDiscord | <Elegantbeef> nimsuggest v3 also helps there |
07:38:54 | FromDiscord | <Elegantbeef> But still not in a stable release |
07:40:26 | FromDiscord | <creikey> honestly I would prefer some compromises in a language, but the editor and debugging is just incredible |
07:40:46 | FromDiscord | <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:09 | FromDiscord | <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:12 | FromDiscord | <Rika> I personally haven’t minded the lack of editor support or anything |
07:41:15 | FromDiscord | <Rika> Not sure why exactly |
07:41:25 | FromDiscord | <Rika> Maybe too used to using bone stock vim and stuff |
07:41:36 | FromDiscord | <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:56 | FromDiscord | <Rika> Well I’m coming from backend web development so I don’t know about you |
07:42:13 | FromDiscord | <Rika> I guess I’m just patient with reading? I don’t know |
07:42:32 | FromDiscord | <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:47 | FromDiscord | <Rika> Stuttering? What do you mean |
07:42:54 | FromDiscord | <Rika> As in it actually lags your editorB |
07:42:57 | FromDiscord | <Rika> (edit) "editorB" => "editor?" |
07:43:01 | FromDiscord | <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:03 | FromDiscord | <Rika> That’s just a bad editor then no? |
07:43:04 | FromDiscord | <creikey> In reply to @Rika "As in it actually": yes in vscode |
07:43:07 | FromDiscord | <creikey> and in vim |
07:43:14 | FromDiscord | <Rika> Haven’t had that issue in neovim |
07:43:21 | FromDiscord | <Elegantbeef> Nimsuggest should only run on save |
07:43:29 | FromDiscord | <creikey> I think it's because I use arraymancer so nimsuggest slugs |
07:43:39 | FromDiscord | <creikey> for their GRU layer |
07:43:51 | FromDiscord | <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:53 | FromDiscord | <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:10 | FromDiscord | <Elegantbeef> I mean it would be but it's not recompiling it's just suggesting symbols |
07:44:18 | FromDiscord | <Elegantbeef> That's not a complex task |
07:44:25 | FromDiscord | <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:29 | FromDiscord | <Rika> No |
07:44:34 | FromDiscord | <Rika> Some people do though |
07:44:52 | FromDiscord | <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:00 | FromDiscord | <Rika> Perhaps |
07:45:03 | FromDiscord | <creikey> disappointing |
07:45:12 | FromDiscord | <creikey> imagine if that didn't happen |
07:45:23 | FromDiscord | <creikey> https://tenor.com/view/car-flying-car-coche-automobil-coche-volando-gif-19204586 |
07:46:07 | FromDiscord | <Rika> Programming interfaces which are fool friendly, hmm |
07:47:06 | FromDiscord | <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:32 | FromDiscord | <Rika> I don’t know man, interface{} doesn’t sound too fool friendly to me |
07:48:09 | FromDiscord | <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:32 | FromDiscord | <Rika> It was the one thing that really pushed me away from it |
08:03:02 | FromDiscord | <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:29 | FromDiscord | <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:30 | FromDiscord | <creikey> (edit) "prgoram" => "program" |
09:05:31 | FromDiscord | <Elegantbeef> Firstly use monotimes it's much much cheaper |
09:07:28 | FromDiscord | <Elegantbeef> Secondly you can just do `some(val)` `none(type)` |
09:10:16 | FromDiscord | <Elegantbeef> You `lastTotalTime` calculation makes no sense |
09:12:48 | FromDiscord | <creikey> In reply to @Elegantbeef "Secondly you can just": 6\lib\pure\options.nim(148, 12) Error: cannot instantiate: 'T' |
09:12:52 | FromDiscord | <creikey> I get this compiler error when I do that |
09:13:02 | FromDiscord | <creikey> oh none type |
09:13:34 | FromDiscord | <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:17 | FromDiscord | <creikey> In reply to @Elegantbeef "Firstly use monotimes it's": oh wow monotime is a lot better |
09:14:35 | FromDiscord | <creikey> I saw that treeform's profiler used it and thought I should probably do the same |
09:14:55 | FromDiscord | <creikey> (edit) "profiler" => "benchy" |
09:15:26 | FromDiscord | <Elegantbeef> Also any reason you have `profileStart` and `profileEnd` public? |
09:15:33 | FromDiscord | <creikey> In reply to @Elegantbeef "Also any reason you": so that the template works |
09:15:42 | FromDiscord | <Elegantbeef> Templates bind scope |
09:16:00 | FromDiscord | <creikey> In reply to @Elegantbeef "Templates bind scope": I got a compile error when they weren't public I thnk |
09:16:02 | FromDiscord | <creikey> (edit) "thnk" => "think" |
09:16:10 | FromDiscord | <Elegantbeef> You can also do `bind profileStart, profileEnd` |
09:19:16 | FromDiscord | <Elegantbeef> I also dont know about the `deque` usage |
09:19:36 | FromDiscord | <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:54 | FromDiscord | <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:54 | FromDiscord | <Elegantbeef> Given this is ostensibly in a the hotpath is it better than just a sequence stack? |
09:20:16 | FromDiscord | <creikey> In reply to @Elegantbeef "Given this is ostensibly": what do you mean sequence stack? |
09:20:34 | FromDiscord | <Elegantbeef> `seq[float]` instead of `Deque[float]` |
09:20:37 | FromDiscord | <creikey> I need to remove the time spent in profileStart and profileEnd from the calculations as well, haven't done that |
09:21:02 | FromDiscord | <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:08 | FromDiscord | <creikey> also cleaner to just use a deque and not have to worry about that |
09:21:16 | FromDiscord | <Elegantbeef> dont you always pop though? |
09:21:28 | FromDiscord | <creikey> In reply to @Elegantbeef "dont you always pop": what do you mean pop what? |
09:21:50 | FromDiscord | <Elegantbeef> It's a FILO queue? |
09:22:03 | FromDiscord | <creikey> no the samples is a FIFO |
09:22:23 | FromDiscord | <creikey> I mean I don't care what order it is I just need fixed buffer size + constant insert |
09:22:35 | FromDiscord | <creikey> because I average them all anyways, order doesn't matter |
09:23:08 | FromDiscord | <Elegantbeef> Eh i misread code |
09:23:31 | FromDiscord | <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:41 | FromDiscord | <creikey> I should make it an actual test with asserts |
09:25:51 | FromDiscord | <Elegantbeef> Also if you want to make your printing a tinge faster make `results` an iterator instead of a table 😄 |
09:26:15 | FromDiscord | <creikey> In reply to @Elegantbeef "Also if you want": I wanted to do asserts on values of the table for testing |
09:26:39 | FromDiscord | <Elegantbeef> You still can with a sequence |
09:26:40 | FromDiscord | <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:43 | FromDiscord | <Elegantbeef> i mean iterator and toseq |
09:27:22 | FromDiscord | <Elegantbeef> also you probably should put a \`\`when defined(profiling)\` inside the profile template |
09:27:31 | FromDiscord | <creikey> yeah that's better |
09:27:41 | FromDiscord | <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:45 | FromDiscord | <Elegantbeef> My tired brain cannot see much wrong with this presently |
09:28:10 | FromDiscord | <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:25 | FromDiscord | <Elegantbeef> Inside the template |
09:28:35 | FromDiscord | <creikey> yeah I was hoping with the variables too |
09:28:44 | FromDiscord | <creikey> but because they aren't accessible outside the module it's not necessary |
09:28:54 | FromDiscord | <Elegantbeef> The squiggles are cause you dont have the config.nims to define profiling |
09:29:11 | FromDiscord | <creikey> yeah, then wouldn't it always profile ? |
09:29:18 | FromDiscord | <creikey> I would have to configure nimsuggest cmdline arguments in my editor |
09:29:24 | FromDiscord | <creikey> too annoying |
09:29:27 | FromDiscord | <Elegantbeef> The tooling uses the config.nims |
09:29:36 | FromDiscord | <creikey> same with cli right? |
09:29:40 | FromDiscord | <Elegantbeef> How is it supposed to know what define to go through |
09:29:51 | FromDiscord | <Elegantbeef> The cli does use the config yes |
09:30:09 | FromDiscord | <Elegantbeef> You might be able to do `when defined(nimsuggest)` but i dont know |
09:31:05 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/Y2r |
09:31:30 | FromDiscord | <creikey> I think the bigger problem is the code doesn't compile but is still imported |
09:32:06 | FromDiscord | <creikey> I wish I had like a heatmap in my editor for which lines took the longest to execute |
09:32:11 | FromDiscord | <Elegantbeef> Wrap all the procedures with the define aswell |
09:32:24 | FromDiscord | <creikey> yeah |
09:36:50 | FromDiscord | <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:07 | FromDiscord | <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:13 | FromDiscord | <Nalmyth> I'm guessing there's no way to return a variant of types from a nim function? |
09:57:23 | FromDiscord | <Nalmyth> sent a code paste, see https://play.nim-lang.org/#ix=49ky |
09:57:42 | FromDiscord | <Nalmyth> sent a code paste, see https://play.nim-lang.org/#ix=49kz |
10:02:35 | FromDiscord | <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:36 | FromDiscord | <retkid> how do i assign to variables to one output |
10:02:39 | FromDiscord | <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:44 | FromDiscord | <retkid> let x, y = proc() |
10:02:48 | FromDiscord | <retkid> i forget |
10:03:03 | FromDiscord | <retkid> (edit) "let x, y = proc() ... " added ": (int, int)" |
10:04:04 | FromDiscord | <Ducko> (edit) "https://forum.nim-lang.org/t/7320" => "https://forum.nim-lang.org/t/7320. `stdout.write` doesn't work either" |
10:07:32 | FromDiscord | <retkid> i got it |
10:07:34 | FromDiscord | <retkid> gotta be a tuple |
10:07:36 | FromDiscord | <retkid> :) |
10:11:24 | FromDiscord | <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:03 | FromDiscord | <kaddkaka> Hi, if I want to update nim version, can I ran `curl https://nim-lang.org/choosenim/init.sh -sSf | sh`? |
10:13:28 | FromDiscord | <planetis> no clue, I just clone the nim repo then run ./build_all_sh |
10:13:42 | FromDiscord | <planetis> (edit) "./build_all_sh" => "./build_all.sh" |
10:31:28 | FromDiscord | <aru> never used it, but what about choosenim? |
10:31:35 | FromDiscord | <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:23 | FromDiscord | <kaddkaka> maybe 1.6.0 is latest stable? |
10:32:33 | FromDiscord | <aru> 1.6.6 is |
10:33:01 | FromDiscord | <kaddkaka> (I havent used choosenim before) `choosenim stable` did not upgrade |
10:34:48 | PMunch | `choosenim update stable` |
10:35:09 | PMunch | `choosenim stable` just selects the last stable branch you installed |
10:36:14 | FromDiscord | <kaddkaka> thanks 🙂 |
10:44:09 | FromDiscord | <Ducko> sent a code paste, see https://play.nim-lang.org/#ix=49kG |
10:47:24 | PMunch | @Ducko, maybe make a comment in the winim documentation about that and create a PR? |
11:00:50 | FromDiscord | <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:30 | FromDiscord | <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:41 | FromDiscord | <Ducko> don't know where's the best place to add this random tip |
11:05:35 | FromDiscord | <Ducko> also looks like docs/ is generated but unsure where from |
11:10:26 | FromDiscord | <Ducko> made a PR to add to examples/ https://github.com/CanadaHonk/winim/pull/1 |
11:11:34 | FromDiscord | <Ducko> made a pr to add it to examples/ https://github.com/khchen/winim/pull/95 |
11:29:15 | PMunch | @Ducko, yeah I guess that's a fair place to put it :) |
11:30:25 | FromDiscord | <Ducko> cool, thanks |
11:32:05 | FromDiscord | <dom96> In reply to @kaddkaka "thanks 🙂": run `choosenim --help` to see the commands with examples :) |
11:33:17 | FromDiscord | <Ras> holy necro |
11:33:18 | FromDiscord | <Ras> https://forum.nim-lang.org/t/566#61920 |
11:34:16 | FromDiscord | <retkid> whats the proc to convert an int to a hex encoded character |
11:34:47 | FromDiscord | <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:14 | FromDiscord | <dom96> interesting link too |
11:44:36 | FromDiscord | <retkid> i like this tho https://media.discordapp.net/attachments/371759389889003532/1014863337034633226/unknown.png |
11:44:51 | FromDiscord | <retkid> it makes me happy when i get to use it |
11:45:01 | FromDiscord | <retkid> but the only chance i got to use it i decided not to for clarity |
11:45:21 | FromDiscord | <Superstart033> : <- this is bad? Lol |
11:46:09 | FromDiscord | <retkid> hes referring to the else |
11:46:18 | FromDiscord | <Require Support> feels like a while since we got a nim update |
11:46:21 | FromDiscord | <retkid> loops can be falsey in pytho |
11:46:21 | * | Guest4495 joined #nim |
11:46:26 | FromDiscord | <retkid> (edit) "pytho" => "python" |
11:46:47 | FromDiscord | <retkid> if execution fails or breaks the else branch can be triggered |
11:48:39 | PMunch | I sometimes do a similar thing with blocks |
11:49:17 | PMunch | Name 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:29 | FromDiscord | <domosokrat> @retkid\: it's the other way round\: if the loop does not break, the else branch is executed |
11:52:54 | FromDiscord | <retkid> really |
11:53:06 | FromDiscord | <retkid> are you sure? |
11:55:05 | FromDiscord | <domosokrat> sent a code paste, see https://play.nim-lang.org/#ix=49kW |
11:55:52 | FromDiscord | <b1rdf00d> combined with loops being expressions it's a nice feature |
11:57:21 | FromDiscord | <domosokrat> @b1rdf00d\: this is python code. Did python make loops into expressions? |
11:58:04 | FromDiscord | <b1rdf00d> zig does |
11:59:42 | FromDiscord | <b1rdf00d> erroring for not finding something you expect is one use case, but having a default case value is also pretty handy |
12:02:20 | FromDiscord | <kaddkaka> In reply to @dom96 "run `choosenim --help` to": Yes I did that, it was messy 🙈 |
12:09:50 | FromDiscord | <ShalokShalom> Does anyone use immutable data structures? |
12:13:18 | PMunch | @ShalokShalom, I wrote persistent vectors for Nim |
12:13:24 | PMunch | Haven't used them terribly much though |
12:15:05 | FromDiscord | <ShalokShalom> Wonderful |
12:15:24 | FromDiscord | <ShalokShalom> You used to implement a lot of useful functional stuff, am I right? |
12:15:41 | FromDiscord | <ShalokShalom> I read your name already a couple of times in relationship to functional programming |
12:15:52 | FromDiscord | <ShalokShalom> And valuable Nim libraries in general |
12:17:15 | * | oddish joined #nim |
12:23:15 | PMunch | Well I've done some functional stuff, but not that much |
12:23:24 | PMunch | Definitely like functional stuff though :) |
12:23:50 | PMunch | I want to have persistant hash maps as well, but haven't gotten around to implementing those yet.. |
12:25:42 | FromDiscord | <ShalokShalom> And do you see any persistent datastructes in Nim, that you can recommend? ↵↵Like, by other authors |
12:26:00 | FromDiscord | <ShalokShalom> Pretty amazing, that a complete language like Nim lacks something so fundamental |
12:27:05 | FromDiscord | <Rika> its not considered fundamental to most people |
12:27:30 | FromDiscord | <Rika> i think its completely natural for languages to lack things that you may find fundamental but is not widely considered as |
12:29:35 | FromDiscord | <ShalokShalom> Yeah, sure |
12:29:59 | FromDiscord | <ShalokShalom> Fundamental in the sense, that I consider a lot of other things fundamental as well, that Nim provides and others not |
12:30:17 | FromDiscord | <ShalokShalom> It struck me a bit, since Nim seems to check so many other boxes |
12:30:24 | Guest4495 | Just 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:36 | FromDiscord | <ShalokShalom> func being able to tell, if a function is truly a function |
12:30:42 | FromDiscord | <ShalokShalom> Very little languages have that |
12:30:45 | Guest4495 | =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:32 | FromDiscord | <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:39 | FromDiscord | <ShalokShalom> I might be probably wrong |
12:32:43 | Guest4495 | can libraries that assume different memory collection models be mixed? |
12:33:37 | FromDiscord | <ShalokShalom> @Guest4495 ↵↵What does the branching factor mean? |
12:34:05 | FromDiscord | <ShalokShalom> (edit) "@Guest4495 ↵↵What does the branching factor mean?" => "sent a long message, see http://ix.io/49l2" |
12:36:54 | FromDiscord | <Rika> In reply to @Guest4495 "=destroy for example functions": what would an object with an indeterminate lifetime look like? |
12:36:59 | FromDiscord | <Rika> In reply to @Guest4495 "can libraries that assume": no |
12:37:16 | FromDiscord | <ShalokShalom> I guess you did find nothing at the documentation about that?↵↵Might be worth to improve that then. |
12:38:07 | FromDiscord | <Recruit_main707> In reply to @Rika "no": which is a shame imo |
12:39:01 | * | brainfunnel joined #nim |
12:39:20 | FromDiscord | <Rika> im not sure how mixing mms would works |
12:39:21 | FromDiscord | <Rika> (edit) "works" => "work" |
12:40:04 | PMunch | I think the simple answer is that it doesn't |
12:40:17 | PMunch | You pick one memory management strategy for you project |
12:40:41 | PMunch | I guess technically you could do it with dynamic libraries, but I wouldn't recommend it :P |
12:41:15 | FromDiscord | <ShalokShalom> Is this documented? |
12:41:17 | PMunch | @ShalokShalom, can't think of any other libraries that offer persistent data structures unfortunately.. |
12:41:24 | PMunch | Is what documented? |
12:41:24 | FromDiscord | <ShalokShalom> Thanks 👍🏻 |
12:41:57 | PMunch | @ShalokShalom, found this though: https://forum.nim-lang.org/t/5251 |
12:43:33 | PMunch | bbtree looks nice, but they where last updated for 0.20.0 so might need a little update |
12:44:28 | Guest4495 | in 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:47 | FromDiscord | <Rika> in refc you can disable the GC in-code "temporarily" |
12:55:04 | Guest4495 | of 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:22 | FromDiscord | <Rika> oh okay let me think about that then |
12:58:20 | FromDiscord | <ShalokShalom> In reply to @PMunch "Is what documented?": The details about mixing memory models |
12:58:26 | FromDiscord | <ShalokShalom> I guess the docs could provide this |
13:01:18 | Guest4495 | for 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:31 | FromDiscord | <mratsim> In reply to @Guest4495 "for example if I": you're projecting, there is no need to assume that. |
13:07:53 | FromDiscord | <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:54 | FromDiscord | <mratsim> sent a long message, see http://ix.io/49la |
13:11:23 | FromDiscord | <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:35 | FromDiscord | <mratsim> (edit) "stuff" => "stuffed" |
13:12:43 | FromDiscord | <mratsim> And that context has an init and close procedures |
13:14:53 | PMunch | @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:50 | FromDiscord | <aru> here it is https://deepakg.github.io/nim/2019/09/28/nim-in-action-errata.html |
13:22:16 | FromDiscord | <aru> unless there is a newer one that i'm not aware of |
13:24:33 | FromDiscord | <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:50 | FromDiscord | <insomniac> trying to re-write my bash script to nim |
13:25:23 | PMunch | In NimScript, or in Nim? |
13:26:13 | FromDiscord | <insomniac> Nim |
13:26:43 | madprops | is nimscript an actual serious thing? |
13:27:15 | FromDiscord | <Rika> What do you mean |
13:27:25 | FromDiscord | <Rika> Yes, it’s something used often enough |
13:27:29 | FromDiscord | <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:32 | madprops | like is it a good enough choice for system scripting |
13:27:44 | FromDiscord | <Rika> For system scripting personally I don’t think so |
13:27:57 | FromDiscord | <insomniac> What do you think is the best approach to do what i was thinking? |
13:28:29 | FromDiscord | <Prestige> I'd rather write nim and use that instead of nims |
13:29:13 | FromDiscord | <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:53 | PMunch | madprops, I mean it's mostly used to write Nim macros :P |
13:30:07 | PMunch | It's not meant to be run as a stand-alone scripting language |
13:30:22 | PMunch | Although it works pretty well as a configuration language |
13:30:57 | FromDiscord | <insomniac> so do you not recommend doing that in nim? |
13:31:01 | FromDiscord | <planetis> osproc.execShellCmd |
13:31:02 | PMunch | @insomniac, osproc.execCmd |
13:31:27 | FromDiscord | <insomniac> thanks i will play with that |
13:31:29 | FromDiscord | <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:45 | PMunch | @insomniac, there's also execCmdEx if you need more |
13:32:01 | FromDiscord | <insomniac> thanks! |
13:32:10 | PMunch | @insomniac, doing what in Nim? |
13:32:44 | FromDiscord | <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:21 | FromDiscord | <insomniac> sent a code paste, see https://play.nim-lang.org/#ix=49le |
13:33:39 | FromDiscord | <dom96> In reply to @Superstart033 "Will Nim in action": No plans currently to do so. |
13:33:41 | FromDiscord | <insomniac> then obviously more things below but where im stuck is the yum part |
13:34:33 | FromDiscord | <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:03 | FromDiscord | <dom96> The errata that somebody else posted is very thorough |
13:37:47 | FromDiscord | <dom96> for the bigger examples in the book: https://github.com/dom96/nim-in-action-code/compare/master...v1.2.6 |
13:38:41 | FromDiscord | <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:31 | FromDiscord | <aru> mine does work with 1.6.6 https://github.com/aruZeta/nim-in-action |
13:46:55 | FromDiscord | <!&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:26 | madprops | https://i.imgur.com/BQwURcr.jpg |
13:55:24 | FromDiscord | <ShalokShalom> In reply to @Rika "For system scripting personally": Why do you think so? |
13:57:08 | FromDiscord | <Rika> Just in case you might have missed it, this is referring to NimScript |
13:57:26 | FromDiscord | <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:38 | FromDiscord | <ShalokShalom> You can use KDialog and similar for simple UI stuff |
13:57:47 | FromDiscord | <ShalokShalom> In reply to @Rika "Just in case you": Yes, I know |
13:57:49 | FromDiscord | <insomniac> let me check it out |
13:57:59 | FromDiscord | <ShalokShalom> But why wouldn't you recommend it for system scripting |
13:58:39 | FromDiscord | <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:33 | FromDiscord | <insomniac> So should i stick with nim im confused |
14:05:34 | PMunch | When in doubt, stick with Nim |
14:05:49 | PMunch | Wren looks pretty neat though, but it's dynamic.. |
14:07:18 | FromDiscord | <insomniac> yea i am liking nim so far so going to stick with it and see if i can get this working |
14:07:32 | FromDiscord | <! 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:23 | madprops | i wouldn't use nim for bash script replacements |
14:11:30 | madprops | i would use either ruby or python |
14:11:56 | madprops | in ruby you can just do: result = `this is some command` |
14:12:08 | madprops | so that's easier |
14:12:35 | madprops | use nim for more heavy stuff |
14:13:54 | FromDiscord | <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:52 | FromDiscord | <! 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:17 | FromDiscord | <insomniac> what do you mean? i did do it with a bash script |
14:16:28 | FromDiscord | <! Yes, i hoist> In reply to @insomniac "what do you mean?": Then keep it as a bash script |
14:16:29 | PMunch | madprops, I mean it's pretty simple to make a nice template or macro for commands: https://play.nim-lang.org/#ix=49mE |
14:16:34 | FromDiscord | <! Yes, i hoist> She |
14:16:45 | * | luis_ joined #nim |
14:16:59 | FromDiscord | <! Yes, i hoist> Shell scripts are completely diffrent from most programming languages |
14:17:02 | FromDiscord | <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:13 | madprops | what is ¤ o_O |
14:17:15 | PMunch | Well not completele.. |
14:17:26 | PMunch | madprops, haha, it's a symbol known as scarab |
14:17:41 | PMunch | It's what you get when you hit Shift+4 on a Norwegian keyboard |
14:17:50 | madprops | i kinda like it |
14:17:50 | FromDiscord | <! Yes, i hoist> In reply to @insomniac "why do you say": Are you running commands more in bash or processing stuff? |
14:18:35 | FromDiscord | <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:13 | PMunch | Created 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:53 | FromDiscord | <! 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:56 | PMunch | So 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:07 | FromDiscord | <insomniac> ok i see thanks |
14:20:27 | PMunch | Nim was made to do whatever you damn well want to do with it |
14:20:46 | FromDiscord | <insomniac> 🙂 |
14:20:56 | FromDiscord | <! 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:25 | FromDiscord | <insomniac> well main reason i wanted to is because wanted something statically compiled |
14:21:29 | madprops | bash scripting is the worst |
14:21:31 | FromDiscord | <insomniac> and Go is not ideal for what i want |
14:21:48 | FromDiscord | <! Yes, i hoist> I mean it is possible just not ideal |
14:22:05 | PMunch | Well bash scripting isn't ideal either.. |
14:22:08 | FromDiscord | <! Yes, i hoist> I would probably use nim to make the software itself instead of the checker |
14:22:10 | PMunch | It can get messy fast |
14:22:17 | FromDiscord | <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:19 | PMunch | Just something like escaping stuff properly |
14:22:20 | FromDiscord | <Superstart033> In reply to @PMunch "Nim was made to": I mean, no lang is perfect for every job. |
14:22:58 | FromDiscord | <! Yes, i hoist> Well at least nim is better then python for running commands, python is absolutely trash at it. |
14:23:05 | FromDiscord | <Superstart033> Lmao |
14:23:45 | FromDiscord | <insomniac> yea python is terrible at it |
14:23:56 | FromDiscord | <! Yes, i hoist> In reply to @not logged in "How do i add": Also, can anyone help me w/ this? |
14:24:16 | madprops | response = `ls -a` |
14:24:19 | madprops | that's ruby |
14:24:34 | madprops | and it has a more complex command system |
14:24:36 | madprops | if you need more |
14:25:03 | FromDiscord | <Superstart033> Ruby should do the work for this person then |
14:25:32 | FromDiscord | <Prestige> I might be writing ruby soon for work. Should be interesting |
14:25:51 | FromDiscord | <Superstart033> Ruby is a great language |
14:25:54 | FromDiscord | <Superstart033> Imo |
14:26:01 | FromDiscord | <Superstart033> Better than python |
14:27:21 | FromDiscord | <! 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:05 | FromDiscord | <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:43 | qwr | for 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:44 | FromDiscord | <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:45 | FromDiscord | <auxym> sent a code paste, see https://play.nim-lang.org/#ix=49mK |
14:31:48 | FromDiscord | <Prestige> Yeah, I agree with qwr |
14:32:00 | qwr | its 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:37 | qwr | so 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:57 | FromDiscord | <! 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:14 | FromDiscord | <domosokrat> well that problem would also exist if you use nim or most other languages |
14:34:14 | FromDiscord | <auxym> In reply to @auxym "hm how can I": answering my own question 😅 `ptr UncheckedArray[uint16]` |
14:35:04 | FromDiscord | <domosokrat> since the tool will run as a subprocess of your program instead of the shell |
14:35:29 | FromDiscord | <! Yes, i hoist> oh no |
14:35:52 | FromDiscord | <! Yes, i hoist> Well anyway, Can somone explain templates? |
14:36:38 | FromDiscord | <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:52 | FromDiscord | <Forest [She/Her]> Is it possible to run any code at compiletime? |
14:37:00 | FromDiscord | <insomniac> In reply to @exelotl "are you talking about": so example lets say i need to generate an xml file |
14:37:27 | FromDiscord | <Forest [She/Her]> In reply to @Forest "Is it possible to": Or specifically, object creation, sequences and ordered tables? |
14:38:01 | FromDiscord | <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:04 | FromDiscord | <Forest [She/Her]> I wanna make macros that use the field of an object to emit function calling and stuff |
14:38:24 | FromDiscord | <insomniac> In reply to @exelotl "Nim is pretty good": awesome |
14:38:56 | FromDiscord | <exelotl> In reply to @Forest "Or specifically, object creation,": yes these should all work in the VM |
14:39:09 | FromDiscord | <Forest [She/Her]> At compiletime? |
14:39:16 | FromDiscord | <exelotl> yeah, I believe so |
14:39:33 | FromDiscord | <Forest [She/Her]> I'm using ref objects too so they can be referred to so idk if that'd work or |
14:40:28 | FromDiscord | <exelotl> ref objects in the VM are fine, you might have trouble with more low-level stuff (pointers and casting) |
14:40:34 | FromDiscord | <Forest [She/Her]> Fair |
14:40:40 | FromDiscord | <Forest [She/Her]> Hmm idk what to do then |
14:41:43 | FromDiscord | <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:59 | FromDiscord | <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:14 | FromDiscord | <auxym> In reply to @Forest "I'm trying to make": not sure I follow, share some example code in playground maybe? |
14:46:56 | FromDiscord | <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:02 | FromDiscord | <aru> nice svg qr codes |
14:52:03 | FromDiscord | <aru> image.png https://media.discordapp.net/attachments/371759389889003532/1014910514696036453/image.png |
14:53:15 | FromDiscord | <Forest [She/Her]> In reply to @auxym "not sure I follow,": Sure |
14:54:32 | FromDiscord | <aru> wondering if i should release the first version or QRgen as 1.0.0 or 0.1.0 😅 |
14:54:43 | FromDiscord | <Forest [She/Her]> I say 1.0.0 |
14:54:49 | FromDiscord | <Forest [She/Her]> It's the first stable version so |
14:55:04 | FromDiscord | <aru> yh i think so too |
14:55:10 | FromDiscord | <aru> and the first version too lol |
14:55:37 | FromDiscord | <aru> need to document some stuff left and will release it |
14:55:54 | * | nisstyre quit (Ping timeout: 264 seconds) |
14:56:44 | FromDiscord | <Forest [She/Her]> Fair |
14:56:58 | FromDiscord | <! Yes, i hoist> In reply to @auxym "have you read the": I just read that part! |
14:58:18 | FromDiscord | <! 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:08 | FromDiscord | <auxym> why would this have anything to do with templates? |
15:00:55 | FromDiscord | <! 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:15 | FromDiscord | <Forest [She/Her]> In reply to @auxym "not sure I follow,": Just writing it up rn, I'll share after ^^ |
15:02:32 | FromDiscord | <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:30 | FromDiscord | <Forest [She/Her]> Yeah i can't even figure out how to write this lmao- |
15:03:38 | * | luis_ quit (Quit: luis_) |
15:03:48 | FromDiscord | <Forest [She/Her]> I can just use Nim typing ig? |
15:04:07 | FromDiscord | <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:11 | FromDiscord | <! Yes, i hoist> sent a code paste, see https://play.nim-lang.org/#ix=49mZ |
15:04:28 | FromDiscord | <! Yes, i hoist> What are you trying to make? |
15:06:12 | FromDiscord | <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:45 | FromDiscord | <Forest [She/Her]> Right now I'm trying to work on a base that is flexible enough for actually doing that |
15:08:10 | FromDiscord | <! 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:37 | FromDiscord | <Forest [She/Her]> Oh? Neat! I'm just making macros to handle it, i have code generation mostly down |
15:08:47 | FromDiscord | <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:25 | FromDiscord | <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:42 | FromDiscord | <auxym> why not use methods in nim? they are the closest thing to java oop |
15:10:42 | FromDiscord | <Forest [She/Her]> Not the cleanest but, would probably work |
15:10:51 | FromDiscord | <Forest [She/Her]> In reply to @auxym "why not use methods": Wdym? |
15:11:05 | FromDiscord | <Forest [She/Her]> I'm just creating a barebones code generation library for now |
15:11:20 | FromDiscord | <auxym> ah |
15:15:53 | FromDiscord | <Forest [She/Her]> Yeah, so I'm probably just gonna make a long ass structure now for importing :p |
15:16:13 | FromDiscord | <Forest [She/Her]> So you can do `import java/lang/Object` for example, definitely not the cleanest but, works so- |
15:18:35 | FromDiscord | <Forest [She/Her]> Or i could make it `import java/lang/Object` |
15:18:45 | FromDiscord | <Forest [She/Her]> I still need a way to reference the classes themselves tbh |
15:18:56 | FromDiscord | <Forest [She/Her]> (edit) "java/lang/Object`" => "java/lang`" |
15:20:46 | * | crem quit (Ping timeout: 260 seconds) |
15:20:51 | FromDiscord | <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:09 | FromDiscord | <ajusa> In reply to @auxym "so I need to": treeform has a library for this |
15:21:44 | FromDiscord | <ajusa> In reply to @auxym "so I need to": https://github.com/treeform/flatty/blob/master/src/flatty/encode.nim |
15:23:00 | FromDiscord | <auxym> In reply to @ajusa "https://github.com/treeform/flatty/blob/master/src/": oh awesome, ty for the info |
15:23:14 | FromDiscord | <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:40 | FromDiscord | <! Yes, i hoist> I can’t seem to put an error in a code block in the fourms. |
15:27:45 | FromDiscord | <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:11 | FromDiscord | <Superstart033> (edit) "“Changing" => "↵“Changing" |
15:33:54 | FromDiscord | <halc> because that's how it'd work if you changed it manually I guess? |
15:34:04 | FromDiscord | <auxym> because (historical thing that probably started with teletypes in the 70s) |
15:36:01 | FromDiscord | <! 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:03 | piertoni | Hi! 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:30 | NimEventer | New thread by Nlits: Error when cross-compiling Nim with mingw, see https://forum.nim-lang.org/t/9428 |
15:40:38 | FromDiscord | <halc> In reply to @piertoni "Hi! Please, I cannot": you need to use a var parameter |
15:40:54 | FromDiscord | <Tanguy> `proc add[T](stack: var StrawStack[T], obj: T) =` |
15:40:54 | FromDiscord | <! 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:05 | FromDiscord | <halc> `stack: var StrawStack[T]` in your `add` function |
15:41:37 | piertoni | mmm, that is not easy to discover :) |
15:42:16 | FromDiscord | <halc> proc parameters are not directly mutable by default |
15:42:34 | FromDiscord | <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:55 | FromDiscord | <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:11 | FromDiscord | <Tanguy> Yeah, the `but expected one of:` should really sort by likely hood instead of dumping everything randomly |
15:43:35 | piertoni | As proc parameters are not mutable, Shoud I always use references? |
15:43:52 | FromDiscord | <! Nilts> In reply to @auxym "nope, its perfectly fine.": ok, im mistaken then |
15:44:10 | FromDiscord | <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:19 | FromDiscord | <ShalokShalom> I personally use and recommend Frontkick |
15:45:28 | FromDiscord | <ShalokShalom> In reply to @Rika "My thought is that": Ah, I assumed this is what you mean |
15:46:42 | FromDiscord | <ShalokShalom> @insomniac And for Nim, there exists https://github.com/Vindaar/shell |
15:47:12 | madprops | yeah you can also do: res = %x|ls -a| |
15:47:20 | FromDiscord | <insomniac> awesome |
15:47:42 | FromDiscord | <ShalokShalom> In reply to @madprops "yeah you can also": Do you mean in Ruby? |
15:47:52 | madprops | yeah since you questioned the backticks |
15:48:47 | madprops | res = %x|echo #{name}| |
15:49:02 | FromDiscord | <Prestige> In reply to @ShalokShalom "I think Ruby is": That's good news |
15:49:45 | FromDiscord | <! Nilts> What does \`\` mean in proc or template names in nim? |
15:51:26 | * | piertoni quit (Quit: Client closed) |
15:51:38 | FromDiscord | <aru> it's mostly to put special character's to it's name |
15:52:12 | FromDiscord | <aru> sent a code paste, see https://play.nim-lang.org/#ix=49ng |
15:52:22 | FromDiscord | <aru> try removing the \`\`\`\` |
15:52:48 | FromDiscord | <aru> try removing the \`\` |
15:53:11 | FromDiscord | <aru> funny you can't put \`\` in a code block lol |
16:01:34 | FromDiscord | <ShalokShalom> In reply to @madprops "res = %x|echo #{name}|": Yeah, I know about %x↵↵But your first example shows a simple binding |
16:01:48 | FromDiscord | <ShalokShalom> I think your backticks got eaten 🙂 |
16:02:00 | madprops | oh right, discord |
16:03:06 | FromDiscord | <ShalokShalom> And backticks in Ruby have an issue |
16:03:11 | FromDiscord | <ShalokShalom> No STDERR |
16:03:25 | madprops | im using open3 for more complex stuff |
16:03:30 | madprops | which is also nice |
16:03:35 | FromDiscord | <ShalokShalom> That's why Frontkick: https://github.com/sonots/frontkick |
16:03:51 | FromDiscord | <ShalokShalom> Unified and declarative API as well |
16:04:01 | FromDiscord | <ShalokShalom> Yeah, open3 is what most sane people use |
16:04:19 | FromDiscord | <ShalokShalom> It still looks much more convoluted than frontkick, imho |
16:04:35 | FromDiscord | <ShalokShalom> Like, more "put on top of it" and less of a clean room implementation |
16:04:42 | FromDiscord | <ShalokShalom> If you know, what I mean. 🙂 |
16:05:09 | madprops | it does look nice |
16:06:29 | FromDiscord | <insomniac> In reply to @ShalokShalom "Ah, I assumed this": how do i import this? |
16:08:14 | FromDiscord | <ShalokShalom> Vindaar/shell? |
16:08:28 | FromDiscord | <insomniac> yes |
16:08:40 | FromDiscord | <ShalokShalom> import shell |
16:09:37 | FromDiscord | <insomniac> but how do install it |
16:10:08 | FromDiscord | <vindaar> `nimble install shell` |
16:10:24 | FromDiscord | <insomniac> 😮💨 fail on my part |
16:10:55 | FromDiscord | <planetis> fun fact object variants can have multiple cases https://play.nim-lang.org/#ix=49nr |
16:10:58 | FromDiscord | <ShalokShalom> In reply to @vindaar "`nimble install shell`": Oh, hi 😃 |
16:11:07 | FromDiscord | <ShalokShalom> Thanks for this project 😊 |
16:11:55 | FromDiscord | <planetis> thats nice! |
16:12:01 | FromDiscord | <ShalokShalom> @planetis it kinda strikes me, that Nim has useful objects |
16:12:05 | FromDiscord | <vindaar> hello, you summoned me 🧙 |
16:12:05 | FromDiscord | <vindaar> you're welcome 😅 |
16:12:09 | FromDiscord | <ShalokShalom> And is not object oriented 😅 |
16:12:31 | FromDiscord | <ShalokShalom> In reply to @vindaar "hello, you summoned me": https://tenor.com/view/cat-spiritus-summon-vintage-fountain-pen-gif-22872604 |
16:12:35 | FromDiscord | <insomniac> yes thanks @Vindaar |
16:18:42 | FromDiscord | <insomniac> sent a code paste, see https://play.nim-lang.org/#ix=49nw |
16:19:21 | FromDiscord | <! 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:03 | FromDiscord | <insomniac> oh ok |
16:23:29 | FromDiscord | <vindaar> Oh, it does work. Matrix / element pings me for any appearance of my nick |
16:23:45 | FromDiscord | <insomniac> nice! |
16:25:15 | FromDiscord | <ShalokShalom> sent a long message, see http://ix.io/49ny |
16:25:25 | FromDiscord | <insomniac> any idea how i achieve that? |
16:25:30 | FromDiscord | <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:34 | FromDiscord | <vindaar> sent a code paste, see https://play.nim-lang.org/#ix=49nz |
16:25:48 | FromDiscord | <ShalokShalom> A good hack 🙂 |
16:26:06 | FromDiscord | <insomniac> great let me test 🙂 |
16:26:08 | FromDiscord | <vindaar> the bridge is very sleepy right now |
16:26:35 | FromDiscord | <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:39 | FromDiscord | <dom96> Might be time for someone to write a Discord<->Matrix bridge in Nim ;) |
16:27:02 | FromDiscord | <ShalokShalom> I think the Matrix bridges are pretty nice, no? |
16:27:25 | FromDiscord | <ShalokShalom> They were used by a lot pf projects not really using Matrix, just because they are so good. |
16:27:30 | FromDiscord | <insomniac> In reply to @vindaar "depending on what kind": that does it!!! |
16:27:31 | FromDiscord | <insomniac> thans |
16:27:36 | FromDiscord | <insomniac> (edit) "thans" => "thanks" |
16:28:34 | FromDiscord | <vindaar> hey, if you want to do a PR to restructure that README that'd be really appreciated!↵(@ShalokShalom) |
16:29:00 | FromDiscord | <ShalokShalom> Yeah, I consider this↵↵Let me play around with it, to find a couple more 'real life examples' |
16:29:59 | FromDiscord | <ShalokShalom> Your examples seem to cover especially the edge cases, I try to provide a couple more simple examples, if you allow 🙂 |
16:31:17 | FromDiscord | <vindaar> cool, gladly |
16:32:10 | FromDiscord | <dom96> In reply to @vindaar "hey, if you want": even for how the bridge handles replies it's not ideal |
16:32:15 | FromDiscord | <dom96> but maybe that's a Discord limitation |
16:32:19 | FromDiscord | <dom96> though I doubt it |
16:32:27 | FromDiscord | <dom96> but also the bridge lags often |
16:36:03 | FromDiscord | <ShalokShalom> In reply to @dom96 "but also the bridge": I guess that could be Matrix being slow |
16:36:14 | FromDiscord | <ShalokShalom> I experience it often as very laggy. |
16:36:24 | FromDiscord | <dom96> hah true |
16:36:36 | FromDiscord | <dom96> one of the reasons I don't use it |
16:36:44 | FromDiscord | <dom96> even IRC is faster |
16:38:10 | * | neceve joined #nim |
16:40:50 | FromDiscord | <aru> yh I have noticed some lag some times |
16:42:57 | FromDiscord | <ShalokShalom> @dom96 main issue is, that they use some python based server, and the go rewrite is in the making for years |
16:43:18 | FromDiscord | <ShalokShalom> And practially all channels are hosted on the Matrix owned server |
16:43:42 | FromDiscord | <ShalokShalom> So, in theory, it can be fast. Its just not as p2p as they advertise, essentially being centralized. |
16:52:59 | FromDiscord | <leorize> channels are not hosted on any one server btw↵(@ShalokShalom) |
16:53:23 | FromDiscord | <leorize> the server is more or less a namespace and the channels are replicated across all participating servers |
16:54:23 | FromDiscord | <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:27 | FromDiscord | <ShalokShalom> Whatever↵↵There is one central inszance |
16:54:33 | FromDiscord | <ShalokShalom> In reply to @Forest "I may write one": Yes |
16:54:45 | FromDiscord | <Forest [She/Her]> Sweet |
16:54:58 | FromDiscord | <ShalokShalom> That's why NeoChat, the KDE chat app has support for both |
16:55:07 | FromDiscord | <Forest [She/Her]> Oh sweet |
16:55:18 | FromDiscord | <@thatrandomperson5-6310e3b26da03> Where does this connect to? |
16:55:28 | FromDiscord | <@thatrandomperson5-6310e3b26da03> Oh, nvm |
16:55:28 | FromDiscord | <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:54 | FromDiscord | <Forest [She/Her]> Ah fair |
16:56:20 | FromDiscord | <Yardanico> it's mainly an agreement between matrix and libera chat (in the past freenode), it doesn't work for every network |
16:56:24 | FromDiscord | <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:34 | FromDiscord | <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:49 | FromDiscord | <Yardanico> or actually they allow for other irc servers too https://matrix-org.github.io/matrix-appservice-irc/latest/usage.html |
16:56:56 | FromDiscord | <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:02 | FromDiscord | <Forest [She/Her]> In reply to @Yardanico "or actually they allow": Neat! |
16:59:03 | FromDiscord | <@thatrandomperson5-6310e3b26da03> Is there any other channels from gitter? |
16:59:26 | FromDiscord | <Yardanico> yes, you can connect to all nim matrix channels from there |
16:59:33 | FromDiscord | <dom96> you shouldn't though |
16:59:34 | FromDiscord | <Yardanico> although I don't know how, but gitter is matrix :) |
16:59:37 | FromDiscord | <dom96> just use Discord or Matrix directly |
16:59:47 | FromDiscord | <Yardanico> maybe they like gitter's UI |
17:01:49 | FromDiscord | <ShalokShalom> Gitter is Matrix? |
17:02:01 | FromDiscord | <ShalokShalom> Matrix was not even around, when Gitter launched |
17:02:02 | FromDiscord | <ShalokShalom> No? |
17:02:06 | FromDiscord | <! Nilts> The link if broken, :P |
17:02:55 | FromDiscord | <Forest [She/Her]> In reply to @dom96 "you shouldn't though": Oh? Why not? |
17:03:38 | FromDiscord | <@thatrandomperson5-6310e3b26da03> itsbackupits backupitsbackup |
17:03:38 | FromDiscord | <dom96> because Gitter->Matrix->Discord has bugs |
17:03:44 | FromDiscord | <dom96> when pasting code samples |
17:03:48 | FromDiscord | <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:18 | FromDiscord | <dom96> seems like a silly purchase really |
17:05:01 | FromDiscord | <@thatrandomperson5-6310e3b26da03> I can’t see any other channels 😛 |
17:06:29 | FromDiscord | <@thatrandomperson5-6310e3b26da03> Hmmm |
17:07:12 | FromDiscord | <aru> logo.svg https://media.discordapp.net/attachments/371759389889003532/1014944529645846538/logo.svg |
17:07:18 | FromDiscord | <aru> thoughts on the logo?l |
17:07:46 | FromDiscord | <aru> doesn't render huh |
17:07:49 | FromDiscord | <@thatrandomperson5-6310e3b26da03> can’t see de code from gitter |
17:07:57 | FromDiscord | <aru> image.png https://media.discordapp.net/attachments/371759389889003532/1014944715763884112/image.png |
17:08:06 | FromDiscord | <aru> a screenshot is better |
17:08:42 | FromDiscord | <aru> the colors of the crown are a lil weird with the green I used, but idk if I should change them |
17:08:51 | FromDiscord | <@thatrandomperson5-6310e3b26da03> Looks cool on discord↵> [image.png](https://gitter.ems.host/_matrix/media/v1/download/matrix.org/fhIdTEdRpdXRjLgMWuSWtVIG) |
17:08:54 | FromDiscord | <Rainbow Asteroids> thats neato |
17:09:05 | FromDiscord | <aru> the qr code works btw |
17:09:13 | FromDiscord | <@thatrandomperson5-6310e3b26da03> Nice |
17:09:15 | FromDiscord | <Rainbow Asteroids> i just tested it, lol |
17:09:18 | FromDiscord | <aru> it just points to the repo |
17:09:30 | FromDiscord | <Rainbow Asteroids> I would just make the whole thing the nim yellow tbh |
17:09:30 | FromDiscord | <aru> unless I made a typo |
17:09:31 | FromDiscord | <ShalokShalom> In reply to @Rainbow Asteroids "> On September 30,": Ah, interesting |
17:09:33 | FromDiscord | <@thatrandomperson5-6310e3b26da03> How do you test a qr code inside your device |
17:09:42 | FromDiscord | <aru> hmm, lemme try |
17:09:44 | FromDiscord | <ShalokShalom> I remember when Gitlab bought Gitter |
17:09:53 | FromDiscord | <aru> i use my phone lol |
17:09:57 | FromDiscord | <Rika> good job on the generator |
17:10:00 | FromDiscord | <Rainbow Asteroids> In reply to @@thatrandomperson5-6310e3b26da03 "How do you test": you recite the details of the qr code to your computer |
17:10:02 | FromDiscord | <Prestige> Very nice |
17:10:05 | FromDiscord | <ShalokShalom> They were like 'we are gonna restore that thing' just to find out HOW broken it was |
17:10:14 | FromDiscord | <aru> ty rika |
17:10:17 | FromDiscord | <@thatrandomperson5-6310e3b26da03> Ah, i found a way |
17:10:19 | FromDiscord | <ShalokShalom> And actually implementing and using Mattermost for Gitlab |
17:10:28 | FromDiscord | <Rainbow Asteroids> so does it make svgs or just pngs |
17:10:34 | FromDiscord | <ShalokShalom> Despite having paid a lot for Gitter |
17:10:49 | FromDiscord | <Forest [She/Her]> In reply to @dom96 "because Gitter->Matrix->Discord has bugs": Ah |
17:11:08 | FromDiscord | <aru> for the moment it can display them on stdout (terminal) and svgs↵(@Rainbow Asteroids) |
17:11:09 | FromDiscord | <ShalokShalom> Matrix swallowing Gitter might be a good thing |
17:11:17 | FromDiscord | <Forest [She/Her]> Probably lol |
17:11:33 | FromDiscord | <aru> the actual logo was generated with svg and then edited it on inkscape |
17:17:20 | FromDiscord | <aru> it's not the nim yellow but the yellow from gruvbox, to fit the background |
17:17:35 | FromDiscord | <aru> I think this one looks more consistent |
17:17:43 | FromDiscord | <aru> than the green one I mean |
17:17:48 | FromDiscord | <! Nilts> How long does it ussally take to get help on the forums? |
17:18:12 | FromDiscord | <Yardanico> there's no estimate |
17:18:21 | FromDiscord | <Yardanico> and what forum thread you're referring to? |
17:18:38 | FromDiscord | <! Nilts> fourm.nim-lang.org? |
17:18:45 | FromDiscord | <Yardanico> what forum thread specifically |
17:18:57 | FromDiscord | <Yardanico> or did you not make a thread yet? |
17:19:06 | FromDiscord | <Yardanico> ah you mean https://forum.nim-lang.org/t/9428 |
17:19:18 | FromDiscord | <Yardanico> well first of all, can you try with nim 1.6.6. instead of 1.4.8 ? |
17:19:51 | FromDiscord | <dom96> In reply to @not logged in "How long does it": what did you call your module? |
17:21:08 | FromDiscord | <! Nilts> In reply to @Yardanico "well first of all,": idk how with nixos |
17:21:27 | FromDiscord | <Yardanico> well nixpkgs has nim 1.6.6 |
17:21:30 | FromDiscord | <Yardanico> can't you just update |
17:21:43 | FromDiscord | <aru> using 1.6.6 is easy |
17:21:54 | FromDiscord | <planetis> top-down type inference is 🔥 |
17:22:10 | FromDiscord | <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:17 | FromDiscord | <aru> if you want to use any other version you would need to check if it was packaged |
17:22:19 | FromDiscord | <! Nilts> In reply to @Yardanico "well nixpkgs has nim": like what is the pkg name? pkgs.nim_166? |
17:22:41 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/1014948422337433630/unknown.png |
17:22:42 | FromDiscord | <Yardanico> just nim? or `pkgs.nim` |
17:22:48 | FromDiscord | <planetis> I dunno, its quality of life updates that i miss the most. |
17:22:57 | FromDiscord | <Yardanico> `nix-env -iA nixos.nim` |
17:23:15 | FromDiscord | <! Nilts> ok |
17:24:41 | FromDiscord | <! Nilts> Well, now the nim complie command does not work at all :p |
17:25:18 | FromDiscord | <! Nilts> it just freezes and i have to close shell |
17:25:40 | FromDiscord | <! Nilts> nvm |
17:25:41 | FromDiscord | <! Nilts> wait |
17:26:22 | FromDiscord | <! Nilts> it still freezes |
17:28:58 | FromDiscord | <aru> it will give you an error with the actual `sha256` |
17:28:59 | FromDiscord | <aru> or you could use `nix-prefetch-url` |
17:29:04 | FromDiscord | <aru> sent a code paste, see https://play.nim-lang.org/#ix=49nU |
17:30:51 | FromDiscord | <! Nilts> I don’t have a shell.nix |
17:32:03 | FromDiscord | <aru> just create one |
17:36:38 | FromDiscord | <ShalokShalom> In reply to @planetis "top-down type inference is": Top down? |
17:37:30 | FromDiscord | <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:31 | FromDiscord | <aru> no need to do `var x: seq[uint8] = @[1'u8, 2, 3]` you mean? |
17:38:35 | FromDiscord | <Rika> oh i usually call that backwards inference |
17:38:35 | FromDiscord | <Yardanico> yes |
17:38:42 | FromDiscord | <Rika> might have a different meaning though, my usage |
17:38:55 | FromDiscord | <aru> nice |
17:44:23 | FromDiscord | <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:18 | FromDiscord | <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:51 | FromDiscord | <! Nilts> In reply to @Forest "Anyone know if there's": I looked, and i don’t think there is (First Q) |
18:06:03 | FromDiscord | <Forest [She/Her]> Rip fair |
18:07:55 | FromDiscord | <Forest [She/Her]> Hm there is https://github.com/jan0sc/antlr4nim |
18:08:07 | FromDiscord | <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:48 | FromDiscord | <! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=49ob |
18:35:18 | FromDiscord | <huantian> In reply to @aru "A shell.nix with nim": Smh not using flakes |
18:36:42 | FromDiscord | <dom96> In reply to @not logged in "It tried, it does": honestly at this point just try choosenim |
18:37:58 | FromDiscord | <! Nilts> In reply to @dom96 "honestly at this point": what is that? |
18:38:35 | FromDiscord | <huantian> I don’t think choosenim will work on NixOS |
18:38:40 | FromDiscord | <! Nilts> `curl https://nim-lang.org/choosenim/init.sh -sSf | sh` does not work either |
18:38:51 | FromDiscord | <Yardanico> In reply to @huantian "I don’t think choosenim": maybe it'll work if you patch it |
18:38:57 | FromDiscord | <Yardanico> but honestly yeah, just install nim manually |
18:39:00 | FromDiscord | <Yardanico> (edit) "but honestly yeah, just install nim manually ... " added "at this point" |
18:39:01 | FromDiscord | <Yardanico> it's not that hard |
18:39:17 | FromDiscord | <dom96> In reply to @huantian "I don’t think choosenim": huh, why not |
18:39:19 | FromDiscord | <huantian> In reply to @Yardanico "maybe it'll work if": Hmmm you’d probably have to use a FHS env |
18:39:24 | FromDiscord | <Yardanico> In reply to @huantian "Hmmm you’d probably have": no, why? |
18:39:25 | FromDiscord | <dom96> does NixOS use musl? |
18:39:30 | FromDiscord | <Yardanico> In reply to @dom96 "does NixOS use musl?": no, it just doesn't use FHS |
18:39:35 | FromDiscord | <! Nilts> In reply to @Yardanico "but honestly yeah, just": how? |
18:39:57 | FromDiscord | <dom96> eh |
18:39:58 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=49oi |
18:40:02 | FromDiscord | <dom96> no ~ on NixOS? |
18:40:10 | FromDiscord | <dom96> (edit) "no ~ ... on" added "($HOME)" |
18:40:17 | FromDiscord | <Yardanico> In reply to @dom96 "no ~ ($HOME) on": FHS is mainly about the system itself, home is still there |
18:40:20 | FromDiscord | <Yardanico> but there's no /usr/lib |
18:40:22 | FromDiscord | <Yardanico> or similar stuff |
18:40:25 | FromDiscord | <dom96> choosenim just needs $HOME |
18:40:27 | FromDiscord | <huantian> Mm what’s the issue with just adding `nim` to your environment.systemPackages |
18:40:35 | FromDiscord | <Yardanico> In reply to @dom96 "choosenim just needs $HOME": but it's not statically linked is it |
18:40:49 | FromDiscord | <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:16 | FromDiscord | <huantian> Wait does the Nim compiler need patching on NixOS? |
18:41:18 | FromDiscord | <dom96> DYLD_LIBRARY_PATH should still point to the right place |
18:41:36 | FromDiscord | <Forest [She/Her]> I uh, understand nothing about antlr- |
18:44:48 | FromDiscord | <! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=49ol |
18:44:54 | FromDiscord | <! Nilts> nim to big |
18:45:30 | FromDiscord | <Yardanico> why is your system so broken :D |
18:45:32 | FromDiscord | <planetis> add to git clone --depth=1 |
18:46:37 | FromDiscord | <huantian> Yeah I don’t understand how nixpkgs#Nim doesn’t work |
18:46:46 | FromDiscord | <huantian> (edit) "nixpkgs#Nim" => "nixpkgs#nim" |
18:46:49 | FromDiscord | <huantian> It should just work |
18:47:02 | FromDiscord | <! Nilts> In reply to @huantian "It should just work": Nim crashes |
18:47:31 | FromDiscord | <Yardanico> you said before that it freezes, not crashes |
18:47:36 | FromDiscord | <Yardanico> maybe you can try running it under strace? |
18:48:45 | FromDiscord | <! 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:09 | FromDiscord | <! 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:36 | FromDiscord | <Tuatarian> has anyone tried using dawn/wgpu-native in Nim? |
19:23:39 | FromDiscord | <Tuatarian> wrong channel |
19:39:39 | FromDiscord | <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:57 | FromDiscord | <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:53 | FromDiscord | <Tuatarian> futhark sucks or using futhark for the bindings is just more painful than its worth? |
19:41:15 | FromDiscord | <Forest [She/Her]> The latter |
19:41:16 | FromDiscord | <Tuatarian> have either of you tried using Dawn's C api with futhark or c2nim or something like that? |
19:41:19 | FromDiscord | <Forest [She/Her]> Futhark is great |
19:41:19 | FromDiscord | <Tuatarian> ok |
19:41:34 | FromDiscord | <Forest [She/Her]> Haven't tried Dawn's C API though, no |
19:41:55 | FromDiscord | <Tuatarian> isn't there a c api for wgpu? |
19:42:03 | FromDiscord | <Forest [She/Her]> Yeah, wgpu-native |
19:42:07 | FromDiscord | <Forest [She/Her]> There's headers for it |
19:42:18 | FromDiscord | <Forest [She/Her]> But it's just, a pretty big struggle tbh |
19:42:33 | FromDiscord | <Forest [She/Her]> https://github.com/Mythical-Forest-Collective/ngpu |
19:44:17 | FromDiscord | <Tuatarian> lmao that last line of the readme says it all I guess |
19:44:22 | FromDiscord | <Tuatarian> what did you guys end up using instead? |
19:44:31 | FromDiscord | <Forest [She/Her]> Yupp |
19:44:34 | FromDiscord | <Tuatarian> currently I use raylib-forever (guevara-chan raylib bindings) |
19:44:46 | FromDiscord | <Tuatarian> but I'd like to learn something a bit lower level |
19:44:59 | FromDiscord | <Tuatarian> mostly the fallback will be nimgl with glfw/opengl etc |
19:45:15 | FromDiscord | <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:23 | FromDiscord | <Forest [She/Her]> That's fair, we were planning on using bgfx but Bubblie is handling creating the wrapper |
19:45:30 | FromDiscord | <Forest [She/Her]> You could use Vulkan maybe? |
19:45:59 | FromDiscord | <Tuatarian> vulkan is a bit too much |
19:46:01 | FromDiscord | <Tuatarian> bgfx is nice |
19:46:08 | FromDiscord | <Tuatarian> why bgfx over raylib? |
19:46:16 | FromDiscord | <Tuatarian> api agnosticism? |
19:47:37 | FromDiscord | <Tuatarian> how would I go about generating bindings for bgfx? |
19:47:41 | FromDiscord | <! Nilts> How would i make nimble auto-maticly download a pkg from the web without asking? |
19:47:53 | FromDiscord | <Tuatarian> would I use c2nim or futhark? |
19:49:46 | FromDiscord | <aru> maybe with `--accept` ?↵(@not logged in) |
19:50:08 | FromDiscord | <aru> never tried it so idk |
19:54:20 | FromDiscord | <! 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:02 | FromDiscord | <tandy> -y↵(@not logged in) |
20:03:09 | FromDiscord | <tandy> nimble -h↵(@not logged in) |
20:10:27 | FromDiscord | <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:32 | FromDiscord | <Forest [She/Her]> And what renderers it uses |
20:12:20 | * | adium joined #nim |
20:14:29 | FromDiscord | <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:01 | FromDiscord | <Tuatarian> In reply to @Forest "It's way more flexible": how are you guys going about generating the bindings for it? |
20:15:11 | FromDiscord | <Tuatarian> there seem to be existing bindings, and they don't seem to be very good at all |
20:15:29 | FromDiscord | <Forest [She/Her]> You have to write the generator yourself, but they haven't finished so |
20:16:20 | FromDiscord | <Tuatarian> you can't use futhark/c2nim? |
20:19:04 | FromDiscord | <! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=49oP |
20:24:22 | FromDiscord | <demotomohiro> Updating your Nim to ver1.6.6 might fix the problem. |
20:24:40 | FromDiscord | <! Nilts> In reply to @demotomohiro "Updating your Nim to": ok! |
20:27:58 | FromDiscord | <huantian> btw this is my basic nim flake https://media.discordapp.net/attachments/371759389889003532/1014995049660026890/flake.nix |
20:30:36 | FromDiscord | <bariali07> Is the C programming language important nowadays with the development we are seeing ↵now? |
20:31:40 | FromDiscord | <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:23 | FromDiscord | <Rainbow Asteroids> (edit) "ask:" => "ask;" |
20:34:09 | * | Nilts joined #nim |
20:34:18 | Nilts | hmmmm |
20:44:13 | FromDiscord | <Forest [She/Her]> In reply to @iWonderAboutTuatara "you can't use futhark/c2nim?": Idk |
20:44:26 | FromDiscord | <Forest [She/Her]> Does anyone know how i'd have a table with duplicate keys? |
20:46:01 | FromDiscord | <!Patitotective> In reply to @Forest "Does anyone know how": why would you want that? better use an array of tuples |
20:46:19 | FromDiscord | <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:51 | FromDiscord | <!Patitotective> In reply to @Forest "I wanna have something": `seq[(string, T)]` |
20:46:52 | FromDiscord | <Forest [She/Her]> In reply to @Patitotective "why would you want": Representing blocks of code with a list of strings |
20:46:58 | FromDiscord | <Forest [She/Her]> In reply to @Patitotective "`seq[(string, T)]`": How does that work? |
20:47:26 | FromDiscord | <Forest [She/Her]> like how do i access them? |
20:47:54 | FromDiscord | <Forest [She/Her]> And how about when it comes to a structure like `OrderedTable[string, seq[MyType]]`? |
20:48:24 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=49oU |
20:48:37 | FromDiscord | <!Patitotective> In reply to @Forest "And how about when": that looks nice too |
20:49:04 | FromDiscord | <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:08 | FromDiscord | <huantian> why not just use `OrderedTable[string, seq[MyType]]`? |
20:49:17 | FromDiscord | <!Patitotective> In reply to @Forest "Imo this looks better": make your own |
20:49:28 | FromDiscord | <!Patitotective> plus deprecated doesnt mean that it doesnt work |
20:49:28 | FromDiscord | <Forest [She/Her]> Just copy and paste it? lmao |
20:49:38 | FromDiscord | <huantian> add for tables is kinda cursed tho |
20:49:44 | FromDiscord | <Forest [She/Her]> In reply to @Patitotective "plus deprecated doesnt mean": True but i don't want it removed in the future |
20:49:56 | FromDiscord | <Forest [She/Her]> In reply to @huantian "add for tables is": Makes sense in my head |
20:49:59 | FromDiscord | <!Patitotective> In reply to @Forest "True but i don't": just make your own when that happens or w/e |
20:50:06 | FromDiscord | <!Patitotective> In reply to @huantian "add for tables is": its a duplicated table :p |
20:50:13 | FromDiscord | <huantian> a map isn't a map anymroe if it maps one key to multiple values |
20:51:03 | FromDiscord | <tandy> how can i use filter on a seq with multiple parameters? |
20:51:40 | FromDiscord | <!Patitotective> In reply to @tandy "how can i use": https://nim-lang.org/docs/sequtils.html#filterIt.t%2Cuntyped%2Cuntyped |
20:51:57 | FromDiscord | <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:06 | FromDiscord | <Forest [She/Her]> Idk what the word would be called tho |
20:52:35 | FromDiscord | <!Patitotective> just use a `Table[key, seq[T]` |
20:52:35 | FromDiscord | <huantian> or `someSeq.filter(x => procWithPrams(1, "asdf", x)` |
20:54:32 | FromDiscord | <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:40 | FromDiscord | <Forest [She/Her]> Also order is very important |
20:55:05 | FromDiscord | <huantian> well seq preserves order |
20:55:23 | * | ggsx joined #nim |
20:55:56 | FromDiscord | <Forest [She/Her]> Yeah but i also need names to each value |
20:56:11 | FromDiscord | <Forest [She/Her]> Idk how to explain it, words are shit today |
20:56:21 | FromDiscord | <huantian> can you give an example of your data |
20:56:58 | FromDiscord | <!Patitotective> In reply to @Forest "Yeah but i also": you need to name each duplicated key? |
20:58:44 | FromDiscord | <domosokrat> `Table[string, seq[(string, string)] ]` |
20:59:18 | FromDiscord | <!Patitotective> better `Table[string, Table[string, string]]` |
21:00:14 | FromDiscord | <Forest [She/Her]> In reply to @Patitotective "you need to name": Yup |
21:00:27 | FromDiscord | <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:49 | FromDiscord | <Forest [She/Her]> In reply to @Patitotective "better `Table[string, Table[string, string]]`": how would that work? |
21:00:58 | FromDiscord | <Forest [She/Her]> In reply to @Patitotective "you need to name": Yup |
21:01:17 | FromDiscord | <Forest [She/Her]> data will be MyType, if and elif are strings |
21:01:26 | FromDiscord | <domosokrat> `t['elif'] = @[(value3, value4), (value5, value6)` |
21:02:51 | FromDiscord | <domosokrat> Or, if it's not pairs\: `Table[string, seq[seq[MyType]]` |
21:02:58 | FromDiscord | <huantian> sent a code paste, see https://play.nim-lang.org/#ix=49p0 |
21:03:28 | FromDiscord | <Forest [She/Her]> Hm okay, thanks! |
21:03:49 | FromDiscord | <huantian> (edit) "https://play.nim-lang.org/#ix=49p0" => "https://play.nim-lang.org/#ix=49p1" |
21:05:16 | ggsx | is there an option like –passL that passes the options earlier; before the linked (-lm ...) libraries? |
21:19:17 | * | NimBot joined #nim |
21:19:34 | FromDiscord | <Elegantbeef> `for i in 0..min(a.high, b.high)` |
21:20:24 | FromDiscord | <Forest [She/Her]> aight then |
21:20:39 | FromDiscord | <Elegantbeef> you can make your own iterator if you need |
21:21:35 | FromDiscord | <Forest [She/Her]> Eh it should be fine |
21:21:43 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=49p3 |
21:21:48 | FromDiscord | <Forest [She/Her]> Oh nice |
21:22:03 | FromDiscord | <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:37 | FromDiscord | <! Nilts> Who is the most skilled at nim here? |
21:39:06 | FromDiscord | <auxym> araq? |
21:44:57 | * | Nilts quit (Quit: Client closed) |
21:45:38 | FromDiscord | <! Nilts> In reply to @auxym "araq?": ok |
21:47:45 | FromDiscord | <aru> ig but don't tag araq for questions |
21:47:55 | FromDiscord | <aru> just ask them here |
21:49:20 | FromDiscord | <Elegantbeef> I'm sure he'd love them "How do I handle an exception" |
21:49:39 | FromDiscord | <! Nilts> In reply to @Elegantbeef "I'm sure he'd love": ik how |
21:50:00 | FromDiscord | <aruZeta> Imagine spamming araq with that question lol |
21:50:06 | * | genpaku quit (Remote host closed the connection) |
21:50:53 | FromDiscord | <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:59 | FromDiscord | <Elegantbeef> @Girvo\: ehhh it verks https://github.com/beef331/wasmer/blob/master/tests/test1.nim |
22:25:19 | FromDiscord | <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 |