00:34:42 | FromDiscord | <Alea> Why does the div throw an error that size is immutable, but not the mult? https://media.discordapp.net/attachments/371759389889003532/969033885616832602/unknown.png |
00:43:22 | FromDiscord | <demotomohiro> !eval echo typeof( 7 / 3) |
00:43:25 | NimBot | float |
00:44:02 | FromDiscord | <demotomohiro> !eval echo typeof(7 div 3) |
00:44:05 | NimBot | int |
00:46:18 | FromDiscord | <Alea> no idea why this is ok but the other way isn't https://media.discordapp.net/attachments/371759389889003532/969036805150236702/unknown.png |
00:48:14 | FromDiscord | <demotomohiro> In Nim, operator / always return float type like python. |
00:49:47 | FromDiscord | <demotomohiro> If font.size and scale are `int` type and you want int division, you need to use `div` binary operator. |
00:50:09 | FromDiscord | <Alea> font.size is a float |
00:50:13 | FromDiscord | <Alea> so is scale |
00:53:06 | FromDiscord | <huantian> could you try to reproduce it? |
00:54:51 | FromDiscord | <Alea> what was the nim playground beef used? the official one is broken |
00:56:36 | FromDiscord | <demotomohiro> Is this beef used one?↵https://wandbox.org/ |
00:56:42 | FromDiscord | <Alea> yeah |
00:59:11 | * | noeontheend joined #nim |
01:03:24 | FromDiscord | <Alea> can't get that compiler to not throw an "expression expected" error↵too tired ig, so I'll come back to it tomorrow |
01:08:59 | FromDiscord | <huantian> In reply to @Alea "what was the nim": huh it's fine for me |
01:12:08 | FromDiscord | <ElegantBeef> I swear i'm going to kill the matrix bridge myself if i have to |
01:12:21 | FromDiscord | <ElegantBeef> Anyway yes i use wandbox when the playground dies |
01:13:17 | FromDiscord | <ElegantBeef> Post the full error if you havent gone yet 😄 |
01:23:03 | * | arkurious quit (Quit: Leaving) |
01:29:39 | * | noeontheend quit (Ping timeout: 276 seconds) |
01:30:51 | FromDiscord | <!Patitotective> In reply to @ElegantBeef "I swear i'm going": its nice to see another dog pfp time to time |
01:31:46 | FromDiscord | <Elegantbeef> Except that's the more annoying one 😛 |
01:38:01 | FromDiscord | <spoon> In reply to @Alea "what was the nim": what's wrong with the official one? |
01:40:06 | FromDiscord | <Elegantbeef> It occasionally goes down and you need to get pmunch to reboot it, but other than that it only accepts a single file |
01:40:39 | FromDiscord | <spoon> ah |
01:40:56 | FromDiscord | <spoon> i did `echo NimVersion` on wandbox and it is using 1.6.4 |
01:41:00 | FromDiscord | <spoon> even replit doesn't have that |
01:42:47 | FromDiscord | <spoon> sent a code paste, see https://play.nim-lang.org/#ix=3Wr2 |
01:42:50 | FromDiscord | <spoon> oh that did not format very good at all |
01:43:05 | FromDiscord | <Elegantbeef> TIHI |
01:43:23 | FromDiscord | <spoon> but there has to be a better way to do that, doing wave function collapse and need to specify each adjacent tile |
01:44:34 | FromDiscord | <Elegantbeef> I'd personally make an iterator that yields the neighbour tiles |
01:44:56 | FromDiscord | <spoon> yea, keep forgetting about iterators and my mind went to templates |
01:44:59 | FromDiscord | <Elegantbeef> Dont really know why the tile stores it's neighbours |
01:45:18 | FromDiscord | <Elegantbeef> Well it'd be `toSeq(myTile.neighbours)` or w/e |
01:45:54 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Wr4 |
01:46:46 | * | irfanns joined #nim |
01:46:53 | FromDiscord | <spoon> ye, reference passing into an iterator, didn't know if that would be best practice or not |
01:47:11 | FromDiscord | <spoon> haven't used iterators at all, how would that work? |
01:47:12 | FromDiscord | <Elegantbeef> Eh the best practice is the simples code |
01:47:22 | FromDiscord | <demotomohiro> When you find wandbox doesn't provde latest Nim version, you can send Pull request like this: https://github.com/melpon/wandbox-builder/pull/113↵Just add new version number to `.github/workflows/build.yml`. |
01:47:40 | FromDiscord | <spoon> ah |
01:47:54 | FromDiscord | <spoon> where can i do that to replit :\ |
01:47:54 | FromDiscord | <Elegantbeef> ` for (lastIndex, nextIndex) in world.tilesInDir(start, direction):` |
01:48:09 | FromDiscord | <Elegantbeef> Iterators are used just like procedure calls |
01:48:14 | FromDiscord | <Elegantbeef> There isnt anything special |
01:49:03 | FromDiscord | <Elegantbeef> Iterators are actually preferred in `for` loops and as such you do slices cheaper if you use `[]` for instance |
01:50:18 | FromDiscord | <Elegantbeef> Well you can do slices cheaper if you make a `[]` iterator 😄 |
01:50:47 | FromDiscord | <huantian> In reply to @spoon "where can i do": you can probably spin up a NixOS instance on replit, add unstable nixpkgs and get nim 1.6.4 from there |
01:50:52 | FromDiscord | <huantian> since they use nixos in the backend |
01:51:31 | FromDiscord | <spoon> hm, my issue is i need to clarify each possible neighbor manually |
01:51:52 | FromDiscord | <Elegantbeef> This is a square grid no? |
01:52:00 | FromDiscord | <Elegantbeef> If so there is no reason to store this information on the object |
01:52:27 | FromDiscord | <Elegantbeef> Just iterate the surrounding tiles either in a cross or all around |
01:53:13 | FromDiscord | <spoon> well, wave function collapse takes possible neighbors, once one is "collapsed" it communicates it to the neighbors so they can reduce their possible tiles, repeat etc |
01:53:28 | FromDiscord | <Elegantbeef> It doesnt need to communicate to them though |
01:53:40 | FromDiscord | <spoon> wdym? |
01:54:02 | FromDiscord | <Elegantbeef> Afaik the way it works is a random pick of the tile then a random paint of the tile with the valid tiles |
01:55:27 | FromDiscord | <spoon> yeah, you can pick a random tile and then give it a random sprite, but then it needs to remove the tiles that don't align from its neighbors, then its neighbors need to remove non-aligning tiles from their neighbors, etc |
01:56:00 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Wr5 |
01:56:05 | FromDiscord | <Elegantbeef> It doesnt need to remove any neighbours |
01:56:09 | * | noeontheend joined #nim |
01:56:16 | FromDiscord | <Elegantbeef> You're thinking of the problem wrong |
01:56:34 | FromDiscord | <Elegantbeef> The valid tile is the overlap of all neighbours, this can be reasoned when attempting to paint a tile |
01:56:48 | FromDiscord | <Elegantbeef> You do not need to propagate this as you go |
01:57:59 | FromDiscord | <spoon> well, currently i'm just assigning possible neighbors to each sprite |
01:58:15 | FromDiscord | <spoon> are you familiar with wfc? |
01:58:33 | FromDiscord | <Elegantbeef> I've briefly watched a video about it so i'm an expert |
01:58:52 | FromDiscord | <spoon> was it by the guy who implemented it in godot? |
02:02:01 | FromDiscord | <spoon> sent a code paste, see https://paste.rs/St5 |
02:03:11 | FromDiscord | <spoon> sent a code paste, see https://play.nim-lang.org/#ix=3Wr8 |
02:05:30 | FromDiscord | <spoon> what's the colon syntax for procedures with multiple arguments? |
02:05:59 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Wr9 |
02:07:10 | FromDiscord | <spoon> guess i'll just get sidetracked reading dsl source code |
02:12:59 | FromDiscord | <Elegantbeef> WFC done in 63 loc |
02:13:06 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3Wra |
02:13:51 | FromDiscord | <Elegantbeef> Shit never mind i fucked something up |
02:14:31 | FromDiscord | <spoon> https://media.discordapp.net/attachments/371759389889003532/969059006087852052/unknown.png |
02:14:43 | FromDiscord | <Elegantbeef> Like i said i fucked something up |
02:15:36 | FromDiscord | <spoon> how heck you make things so fast |
02:19:38 | FromDiscord | <spoon> what i am currently working on was something similar to <https://bolddunkley.itch.io/wfc-mixed> where you're capable of selecting a tile and clicking the option you want to collapse, and it will automatically collapse single possibilities |
02:19:40 | FromDiscord | <Elegantbeef> Guess the proper way to do this is to propagate from the first place tile instead of random darting every time |
02:22:47 | * | termer quit (Quit: ZNC 1.7.5+deb4 - https://znc.in) |
02:24:51 | * | termer joined #nim |
02:30:06 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3Wrd here we go |
02:36:25 | FromDiscord | <spoon> havent used sets before |
02:36:36 | FromDiscord | <spoon> and what does multiplying a set on line 64 do? |
02:36:42 | FromDiscord | <Elegantbeef> It's a union |
02:36:59 | FromDiscord | <Elegantbeef> `` is the union between two sets so only overlap survives |
02:37:53 | FromDiscord | <spoon> ah |
02:38:02 | * | oisota quit (Quit: The Lounge - https://thelounge.chat) |
02:38:05 | FromDiscord | <spoon> that's useful |
02:39:37 | * | noeontheend quit (Ping timeout: 272 seconds) |
02:39:56 | FromDiscord | <Elegantbeef> In the case of the `set[0..WorldArea]` that will only work if the area is sub uint16, but really it's not ideal if it gets relatively large |
02:40:13 | FromDiscord | <spoon> what's going on on line 49? |
02:40:29 | FromDiscord | <spoon> should probably read about sets |
02:40:39 | * | oisota joined #nim |
02:40:47 | FromDiscord | <Elegantbeef> Integer sets are limited to a range of 65k |
02:40:53 | FromDiscord | <Elegantbeef> AS such you need to make a set of a range |
02:41:01 | FromDiscord | <Elegantbeef> In this case we only need 0..WorldSize |
02:41:56 | FromDiscord | <spoon> not very familiar with the curly braces or the start keyword either |
02:42:04 | FromDiscord | <Elegantbeef> start isnt a keyword |
02:42:07 | FromDiscord | <Elegantbeef> It's a variable |
02:42:14 | FromDiscord | <Elegantbeef> Curly braces is the nim set constructorr |
02:42:47 | FromDiscord | <spoon> oh, start is the argument for generate gotcha |
02:43:10 | FromDiscord | <Elegantbeef> Yea it really should've been done internally but i was being lazy 😄 |
02:45:12 | FromDiscord | <spoon> so how does start impact range? still a bit unclear on how that works |
02:45:41 | FromDiscord | <Elegantbeef> It's a type conversion |
02:46:03 | FromDiscord | <Elegantbeef> `range[0..WorldArea] start` converts `start` to a checked `range[0..WorldArea]` |
02:46:45 | FromDiscord | <spoon> oh right, since range is a type |
02:46:48 | FromDiscord | <Elegantbeef> It's needed for the set construction cause like i said it doesnt have a range |
02:47:51 | FromDiscord | <Elegantbeef> You can drop the type annotation i just forgot |
02:48:05 | FromDiscord | <Elegantbeef> This was after all hastily written to showcase how to more eloquently solve this |
02:52:16 | FromDiscord | <spoon> this collapses by checking each space in order, right? |
02:52:46 | FromDiscord | <Elegantbeef> Yes |
02:53:09 | FromDiscord | <Elegantbeef> You could use random indices and it'd also work |
02:53:25 | FromDiscord | <spoon> ah alright |
02:53:39 | FromDiscord | <spoon> thanks |
03:18:55 | * | irfanns quit (Ping timeout: 256 seconds) |
03:23:19 | * | irfanns joined #nim |
03:28:07 | Zectbumo | I'm reading up on nim and it seems nim has been the language I've been wishing for for about 14 years ago and I just saw nim was made 14 years ago :P |
03:29:03 | Zectbumo | 2008 because I remember it being right after the first iPhone was released |
03:29:45 | Zectbumo | but what a bummer that I just now heard about this. maybe for the better since I'm presuming it's more stable and usable now and the community has grown |
03:32:07 | FromDiscord | <Elegantbeef> Welcome, hope you have fun here 😄 |
03:34:28 | Zectbumo | thx, I come from python 2, loved it, and I went into python 3 recently, I'm hating it. so now I'm looking for that dream language I wanted and found this nice looking language with lots of promises. thx, so what are the typical gotchas here? |
03:34:56 | Zectbumo | oh, and I looked at Rust, but I don't think it's going to be my cup of tea |
03:35:41 | Zectbumo | and I had a requirement that the language must have await and supported on openbsd. nim checks both |
03:35:59 | FromDiscord | <Elegantbeef> Nim's await is done in macros 😛 |
03:36:14 | Zectbumo | no prob there. as long as it works as expected |
03:36:28 | Zectbumo | very cool, btw |
03:37:27 | FromDiscord | <Alea> In reply to @ElegantBeef "Post the full error": Made a note to myself to do it tomorrow <:meow_sleep:817830639700017182> |
03:37:31 | Zectbumo | I'm used to await in javascript and I didn't really get it in python |
03:38:43 | FromDiscord | <huantian> I thought python async/await was pretty decent imo |
03:38:58 | FromDiscord | <Elegantbeef> For the gotchas it's going to be about tagged unions and static types are static types 😄 |
03:39:43 | FromDiscord | <deadmeme77> Is there a way to refer to another nim source code in a different dictionary without compiling or using nimble install on it? |
03:40:42 | FromDiscord | <Elegantbeef> different dictionary? |
03:44:08 | FromDiscord | <deadmeme77> sorry, I meant directory |
03:45:33 | FromDiscord | <Elegantbeef> You mean aside from `--nimblePath:path/to/my/code`? |
03:45:42 | FromDiscord | <Elegantbeef> Dont really get the question |
03:45:47 | FromDiscord | <Elegantbeef> If you want to use Nim code you import it |
03:52:24 | FromDiscord | <deadmeme77> I see import /dir1/dir2/othercode.nim works? |
03:52:32 | FromDiscord | <Elegantbeef> Yes |
03:52:43 | FromDiscord | <deadmeme77> ok, thank you! |
03:52:46 | FromDiscord | <Elegantbeef> well it's relative |
03:52:54 | FromDiscord | <Rika> ./ |
03:52:57 | FromDiscord | <Rika> Must start with dot |
03:53:02 | FromDiscord | <Rika> Or no leading slash |
03:53:04 | FromDiscord | <deadmeme77> Thanks |
03:53:05 | FromDiscord | <Rika> One or the other |
03:53:35 | FromDiscord | <Elegantbeef> I would suggest using `nimble develop` but that's between you and your god |
03:53:48 | FromDiscord | <deadmeme77> wait, if the main .nim file is in, say, dir1↵and the library is in dir2/dir3↵should I write ./dir2/dir3/library.nim↵or dir1/dir2/dir3/library.nim? |
03:54:29 | FromDiscord | <Elegantbeef> the latter is more idiomatic |
03:54:34 | FromDiscord | <Elegantbeef> Assuming `dir1` is a subdir next to `main.nim` |
03:54:39 | FromDiscord | <Elegantbeef> nim's modules use file paths for importing logic |
03:54:56 | FromDiscord | <Zectbumo> @ElegantBeef why does it say BOT on your name? |
03:54:57 | FromDiscord | <Elegantbeef> A module in a subdir has that subdir's name in it's import path |
03:55:12 | FromDiscord | <Elegantbeef> I'm using the matrix protocol which is bridged to discord |
03:55:19 | FromDiscord | <deadmeme77> In reply to @Zectbumo "<@145405730571288577> why does it": he's talking to us through a bridge, either matrix, gitter, or IRC |
03:55:39 | FromDiscord | <Zectbumo> hmm matrix, never heard of it |
03:55:50 | FromDiscord | <Elegantbeef> Or i'm a sophisticated bot programmed with the turing test beating Nim AI library 😛 |
03:56:10 | FromDiscord | <Zectbumo> that's what I hoping 😄 |
03:56:21 | FromDiscord | <Zectbumo> one day... |
03:56:23 | FromDiscord | <Elegantbeef> It's a modern multimedia messaging protocol |
03:56:27 | FromDiscord | <deadmeme77> GPT-nim-j |
03:56:35 | FromDiscord | <Zectbumo> do you recommend it? |
03:56:48 | FromDiscord | <Elegantbeef> I prefer FOSS to proprietary software so yes |
03:56:56 | FromDiscord | <deadmeme77> btw just saw that the topic in IRC is still saying "Latest version 1.6.0", just saying |
03:58:06 | FromDiscord | <Zectbumo> hey how come nim isn't on the language list 😛 https://matrix.org/docs/projects/try-matrix-now/ |
03:58:29 | FromDiscord | <Elegantbeef> Cause the matrix sdk isnt sufficiently developped |
03:58:34 | FromDiscord | <Elegantbeef> Consider contributing to see it there 😛 |
03:58:50 | FromDiscord | <Elegantbeef> https://github.com/dylhack/matrix-nim-sdk 😉 |
03:59:05 | FromDiscord | <Elegantbeef> Though https://github.com/tandy-1000/simple-matrix-client is made using that |
03:59:15 | FromDiscord | <Zectbumo> really? they sure have a lot of languages for not having a decent sdx |
03:59:44 | FromDiscord | <Elegantbeef> I dont know I dont touch the sdk |
03:59:57 | FromDiscord | <deadmeme77> Well, early adopters of Matrix are mostly programmer-adjacent... |
04:00:03 | FromDiscord | <Zectbumo> lol tandy 1000. that was actually my first computer |
04:10:03 | FromDiscord | <Elegantbeef> How dare you insult me↵(@deadmeme77) |
04:11:48 | FromDiscord | <Josef> I have read↵ https://lilybon.medium.com/binary-function-hooking-via-dll-injection-nim-ghidra-b90a53570718 |
04:12:13 | FromDiscord | <Josef> Is it actually a good idea to use Nim for api hooking? |
04:12:48 | FromDiscord | <Elegantbeef> I mean you can, given the malicious usage of this idea, i have to say no 😛 |
04:13:57 | FromDiscord | <Josef> I had the idea that it's important to use the same language and compiler as the source, in order to have ABI compatibility. |
04:14:39 | FromDiscord | <Elegantbeef> Eh you can declare everything compatible |
04:14:48 | * | duuude quit (Ping timeout: 248 seconds) |
04:15:10 | FromDiscord | <Josef> Sure, but question is how much pain you will suffer in the process. |
04:15:23 | FromDiscord | <Elegantbeef> No clue I dont do malicious things 😛 |
04:16:22 | FromDiscord | <Josef> I don't do either. My usecase is modding of an ancient game. |
04:16:48 | FromDiscord | <Elegantbeef> Ah well you just write everything with `cdecl` and c types instead of Nim tyles |
04:16:51 | FromDiscord | <Elegantbeef> Atleast afaik |
04:16:55 | FromDiscord | <Elegantbeef> types\ |
04:19:13 | FromDiscord | <deadmeme77> In reply to @Elegantbeef "How dare you insult": I was describing myself to be fair but haha sorry I just realise it could be taken as a hostile joke as well |
04:19:32 | FromDiscord | <Josef> Hm, but what if I want to use more complex types from C++ stdlib like string or vector? |
04:19:51 | FromDiscord | <Elegantbeef> You can include them 😄 |
04:20:05 | FromDiscord | <Elegantbeef> Nim has C++ interop |
04:21:20 | FromDiscord | <Josef> Hm, that sounds simple. |
04:22:33 | FromDiscord | <Josef> Doesn't it require something like rust unsafe blocks? |
04:22:45 | FromDiscord | <Elegantbeef> Nim doesnt have unsafe blocks |
04:22:52 | FromDiscord | <Elegantbeef> It's unsafe logic is a like 6 keywords |
04:23:49 | FromDiscord | <Elegantbeef> https://scripter.co/binding-nim-to-c-plus-plus-std-list/ will interest you |
04:24:19 | FromDiscord | <Josef> Finally, the author mentions api patching at the end, as a potentially simpler solution. |
04:24:37 | FromDiscord | <Josef> I feel like it also fits better my usecase. |
04:25:11 | FromDiscord | <Josef> As I can distribute self-contained executable. |
04:25:30 | FromDiscord | <Elegantbeef> Clearly the solution is to reimplement the old game 😄 |
04:25:33 | FromDiscord | <Elegantbeef> What's the game anywho? |
04:26:09 | FromDiscord | <Josef> But there was no followup post, and I was not able to google it. Api patching returns garbage. |
04:26:27 | FromDiscord | <Josef> Any idea what's the correct term? |
04:28:04 | FromDiscord | <Josef> In reply to @Elegantbeef "What's the game anywho?": HeroesV (might&magic). |
04:28:30 | FromDiscord | <Elegantbeef> Time to reimplement it 😜 |
04:28:56 | FromDiscord | <Josef> In reply to @Elegantbeef "Clearly the solution is": Fortunately, the scope of the modifications is small :D |
04:29:44 | FromDiscord | <spoon> lol actually saw a nim repo that was literally a gui for dll injections before |
04:30:15 | FromDiscord | <Josef> But I know projects which aim to reimplement games by API hooking one method at a time. |
04:31:51 | FromDiscord | <morgan> In reply to @Zectbumo "I'm reading up on": oh wow i had no clue nim had been around so long |
04:33:14 | FromDiscord | <Josef> In reply to @spoon "lol actually saw a": Link? |
04:33:40 | FromDiscord | <spoon> In reply to @Josef "Link?": <https://github.com/srozb/parasite>↵not i have not used it at all |
04:33:44 | FromDiscord | <spoon> (edit) "<https://github.com/srozb/parasite>↵not" => "<https://github.com/srozb/parasite>↵note" |
04:35:10 | FromDiscord | <Josef> Ah, that's not very useful for me, but cool project nevertheless. |
04:35:42 | FromDiscord | <spoon> yeah, it might still be useful to see its implementation |
04:43:48 | FromDiscord | <impbox [ftsf]> is there a way to convert TimeInterval to a Duration? |
04:46:17 | FromDiscord | <impbox [ftsf]> or specifically, I want to get the number of nanoseconds between now and a specific DateTime |
04:47:32 | FromDiscord | <Elegantbeef> `myTime + myInterval - myType`? |
04:47:37 | FromDiscord | <Elegantbeef> `- myTime` 😄 |
04:47:51 | * | slowButPresent quit (Quit: leaving) |
04:49:42 | FromDiscord | <Elegantbeef> Also where did you get the time interval? |
04:50:07 | FromDiscord | <impbox [ftsf]> DateTime (target) - DateTime (now) -> TimeInterval |
04:50:29 | FromDiscord | <impbox [ftsf]> oh wait... |
04:50:49 | FromDiscord | <impbox [ftsf]> I guess I misread |
04:52:27 | * | irfanns quit (Ping timeout: 276 seconds) |
04:52:37 | FromDiscord | <impbox [ftsf]> awesome, thanks! |
05:15:28 | FromDiscord | <narimiran> A new 1.6.6 RC is available, please give it a try:↵https://forum.nim-lang.org/t/9100#59572 |
05:23:07 | rockcavera | narimiran, why was the commit 8bfc396a4dfa722239818f399a119452a53fe07f not added to this release candidate? |
05:24:36 | FromDiscord | <narimiran> In reply to @rockcavera "<@719992187890434069>, why was the": it wasn't marked as `[backport]`. i'll check with araq if it should be part of the final release |
05:25:45 | rockcavera | I understand and thanks for the answer |
05:32:08 | FromDiscord | <-|-> In reply to @Elegantbeef "I mean you can,": I've done API hooking for "legit" reasons—usually enabling game modding |
05:32:26 | FromDiscord | <-|-> or debugging proprietary software that hates debuggers |
05:33:50 | FromDiscord | <Rika> We’re just wary of malware writers because they’ve been more common lately |
05:34:25 | FromDiscord | <-|-> Do malware writers really come here and ask "how can I write this malware"? |
05:35:13 | FromDiscord | <Josef> In reply to @-|- "I've done API hooking": Have you done it in Nim or C++? |
05:35:13 | FromDiscord | <Elegantbeef> They ask questions that relate to writing malicious code yes |
05:35:23 | FromDiscord | <-|-> In reply to @Josef "Have you done it": Only in C |
05:36:33 | * | duuude joined #nim |
05:37:46 | FromDiscord | <-|-> In reply to @Elegantbeef "They ask questions that": ... I'm not sure why they'd think that'd work |
05:43:53 | FromDiscord | <Rika> In reply to @-|- "Only in C": Let me guess, it’s related to visual novels |
05:56:19 | FromDiscord | <-|-> In reply to @Rika "Let me guess, it’s": Sorry, it wasn't a texthooker. |
06:03:21 | * | duuude quit (Quit: Konversation terminated!) |
06:03:28 | FromDiscord | <Rika> In reply to @-|- "Sorry, it wasn't a": :KannaKMS: |
06:03:36 | * | duuude joined #nim |
06:04:45 | * | jjido joined #nim |
06:19:18 | FromDiscord | <2F42BBA1> In reply to @Rika "Let me guess, it’s": I know a guy who reimplements RenPy on Zig |
06:19:20 | FromDiscord | <2F42BBA1> lol |
06:33:19 | * | rockcavera quit (Remote host closed the connection) |
06:42:36 | FromDiscord | <konsumlamm> In reply to @Elegantbeef "It's unsafe logic is": may i introduce you to the shift operators? |
06:42:58 | FromDiscord | <Elegantbeef> How are they unsafe? |
06:43:08 | FromDiscord | <Elegantbeef> I guess there is possible UB |
06:49:36 | * | PMunch joined #nim |
06:51:06 | FromDiscord | <konsumlamm> ye, they just use the C shift operators under the hood, which have UB when the shift is bigger than the bit size |
06:53:09 | FromDiscord | <Rika> Sounds fun |
06:53:18 | FromDiscord | <Rika> I remember dealing with that UB before |
06:53:28 | FromDiscord | <Rika> Though it wasn’t with Nim |
06:53:33 | FromDiscord | <morgan> huh interesting |
07:02:07 | PMunch | Hmm, I see in the logs that the playground was apparently down tonight |
07:02:22 | PMunch | But it's up now and I didn't touch it.. |
07:26:01 | FromDiscord | <2F42BBA1> Can I use readline on playground? |
07:26:49 | FromDiscord | <Rika> No |
07:26:55 | FromDiscord | <Rika> Use wandbox for such |
07:27:08 | FromDiscord | <⎝⪩﹏⪨⎠> ? https://media.discordapp.net/attachments/371759389889003532/969137678610202634/unknown.png |
07:27:20 | FromDiscord | <Rika> In reply to @2F42BBA1 "Can I use readline": https://wandbox.org |
07:28:03 | FromDiscord | <⎝⪩﹏⪨⎠> In reply to @⎝⪩﹏⪨⎠ "?": Last time worked at first attempt. |
07:28:34 | FromDiscord | <⎝⪩﹏⪨⎠> It seems my system is really fucked up. |
07:28:48 | FromDiscord | <⎝⪩﹏⪨⎠> And is freshly install. |
07:29:01 | PMunch | @Rika, you can use readLine, just not stdin.readLine |
07:29:34 | FromDiscord | <Rika> What would you read a line out of |
07:30:20 | FromDiscord | <⎝⪩﹏⪨⎠> Why can't I install choosenim? |
07:31:13 | PMunch | @Rika, a file? |
07:34:32 | FromDiscord | <Rika> And how would you get that file on the playground |
07:35:34 | FromDiscord | <⎝⪩﹏⪨⎠> Ok seems nobody is gonna help me again. |
07:35:42 | FromDiscord | <⎝⪩﹏⪨⎠> I hate being a programming noob. |
07:36:29 | FromDiscord | <2F42BBA1> In reply to @Rika "https://wandbox.org": thanks |
07:36:46 | * | duuude quit (Read error: Connection reset by peer) |
07:38:08 | FromDiscord | <enthus1ast> @⎝⪩﹏⪨⎠\: maybe update ssl |
07:38:17 | FromDiscord | <enthus1ast> no idea sorry |
07:38:43 | FromDiscord | <enthus1ast> or update the whole system |
07:38:52 | FromDiscord | <⎝⪩﹏⪨⎠> In reply to @enthus1ast "<@438504181876129803>\: maybe update ssl": https://media.discordapp.net/attachments/371759389889003532/969140629332439040/unknown.png |
07:39:09 | FromDiscord | <⎝⪩﹏⪨⎠> Everybody is telling me to re-install again the whole OS. |
07:39:50 | FromDiscord | <enthus1ast> and updateing your whole system? |
07:41:26 | FromDiscord | <⎝⪩﹏⪨⎠> Nothing to update. https://media.discordapp.net/attachments/371759389889003532/969141276366753792/unknown.png |
07:53:46 | * | duuude joined #nim |
07:58:31 | * | Arrrrrrr joined #nim |
08:01:54 | FromDiscord | <2F42BBA1> `k:=((2a+b(c-1))/2)c;`↵↵how this pascal formula will look like in nim? |
08:02:16 | FromDiscord | <Elegantbeef> The same |
08:02:28 | FromDiscord | <Rika> The same except for the := ? |
08:02:43 | FromDiscord | <Phil> All of them forgetting the semicolon at the end ! |
08:02:46 | FromDiscord | <2F42BBA1> like i just set var = and here goes formula? |
08:02:46 | PMunch | And with a couple extra *'s |
08:02:53 | FromDiscord | <Rika> The semicolon is valid in Nim |
08:02:55 | FromDiscord | <Elegantbeef> `var k = ((2 a + b (c - 1)) / 2) c` |
08:02:59 | FromDiscord | <Phil> Heresy! |
08:03:08 | FromDiscord | <2F42BBA1> thx |
08:03:14 | FromDiscord | <Rika> In reply to @PMunch "And with a couple": Bridge ate them for you |
08:03:15 | FromDiscord | <Elegantbeef> Pmunch is on irc he gets bad asterixs |
08:03:26 | FromDiscord | <Rika> Asterisk, it’s spelled |
08:03:27 | PMunch | Oh.. |
08:03:32 | PMunch | Silly bridge.. |
08:03:37 | FromDiscord | <Phil> It's Asterix |
08:03:41 | FromDiscord | <Phil> For sure |
08:03:45 | FromDiscord | <Phil> Definitely |
08:03:49 | FromDiscord | <Elegantbeef> Yea I ruined my spelling due to asterix |
08:03:50 | FromDiscord | <Rika> Lmao |
08:03:59 | FromDiscord | <Rika> I don’t know where that comes from |
08:04:06 | FromDiscord | <Phil> Ohhhh |
08:04:14 | FromDiscord | <Elegantbeef> It's a comic book series |
08:04:22 | FromDiscord | <Phil> I think it's decently famous at least in europe, not sure about the US |
08:04:37 | FromDiscord | <Phil> In germany and france basically everyone has at least heard of it once |
08:05:10 | FromDiscord | <Rika> I don’t live in either of those continents |
08:05:25 | FromDiscord | <enthus1ast> I have Asterix "Babbelt Hessisch", Asterix with terrible Hessisch accent |
08:05:26 | FromDiscord | <Phil> It's ancient though, like 1960's ancient, though stuff is still being published I think |
08:05:41 | FromDiscord | <Elegantbeef> hell there are games 😄 |
08:05:54 | FromDiscord | <enthus1ast> and Movies \:) |
08:06:04 | FromDiscord | <Phil> Basically an IP that is strong in Europe and not sure about anywhere else |
08:06:24 | FromDiscord | <Elegantbeef> I've seen some books in Canada afterall it's what ruined my spelling 😄 |
08:08:19 | FromDiscord | <Elegantbeef> Anyway it's relatively similar in Nim |
08:14:36 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
08:16:33 | FromDiscord | <deadmeme77> @⎝⪩﹏⪨⎠ hey I'm using popOS too and I could install choosenim from the sh 🤔 |
08:16:57 | FromDiscord | <⎝⪩﹏⪨⎠> In reply to @deadmeme77 "<@438504181876129803> hey I'm using": As I said: |
08:17:07 | FromDiscord | <⎝⪩﹏⪨⎠> In reply to @⎝⪩﹏⪨⎠ "It seems my system": . |
08:17:10 | FromDiscord | <deadmeme77> Just updated to 22.04 yesterday, R went bork but everything else is fine |
08:17:13 | FromDiscord | <Elegantbeef> have you tried `sudo apt reinstall openssl`? |
08:17:14 | FromDiscord | <deadmeme77> Ah yeah, that can happen |
08:17:23 | FromDiscord | <deadmeme77> Go refresh your Pop OS installation |
08:17:37 | FromDiscord | <deadmeme77> It's in settings > software update and upgrade > refresh |
08:18:04 | FromDiscord | <deadmeme77> Basically reinstall but they maintain your files. No need to copy off /home/ to a NAS disk again |
08:18:38 | FromDiscord | <deadmeme77> In reply to @Isofruit "Basically an IP that": It's also famous here↵Asterix↵Tintin↵And uh that's it I think |
08:22:07 | FromDiscord | <⎝⪩﹏⪨⎠> In reply to @deadmeme77 "It's in settings >": What settings. |
08:22:44 | FromDiscord | <⎝⪩﹏⪨⎠> I entered to the Settings and there's no "software and upgrade". |
08:26:51 | FromDiscord | <⎝⪩﹏⪨⎠> I'll go to sleep. |
08:26:58 | FromDiscord | <⎝⪩﹏⪨⎠> Ping me before is too late. |
08:27:09 | FromDiscord | <deadmeme77> I'm napping as well. Siesta time. But uh |
08:31:46 | FromDiscord | <dom96> In reply to @⎝⪩﹏⪨⎠ "Why can't I install": See latest choosenim issue on GitHub. I think you have too new an OpenSSL. |
08:32:15 | FromDiscord | <Elegantbeef> choosenim appimage when? |
08:32:48 | * | jmdaemon quit (Ping timeout: 276 seconds) |
08:32:50 | FromDiscord | <dom96> Choosenim needs to have even lesssss dependencies |
08:33:06 | FromDiscord | <Elegantbeef> Eh appimage would solve it for the most part |
08:33:58 | * | Gustavo6046 quit (Quit: Goodbye! Leave messages at my XMPP @ [email protected] or my Discord Gustavo6046#9009 or possibly my Mastodon [email protected] – I don't check my email often since it's full of crap, but in any case, [email protected]) |
08:38:33 | FromDiscord | <dom96> What even is appimage? |
08:39:20 | FromDiscord | <Elegantbeef> It's a portable linux binary format equvilent to windows portable executables |
08:41:33 | FromDiscord | <Elegantbeef> It's ideal for shipping binaries not on a package manager or with a runtime |
08:41:51 | FromDiscord | <Elegantbeef> May want to consider it and flatpak/snapcraft |
08:42:03 | FromDiscord | <Elegantbeef> But i'm just a silly person |
08:42:41 | FromDiscord | <deadmeme77> flatpak and snap has the issue of sandboxing |
08:43:21 | FromDiscord | <fbpyr> which could be disabled in flatpak |
08:43:28 | FromDiscord | <Elegantbeef> Yea |
08:43:47 | FromDiscord | <Elegantbeef> flatpak/appimage are clearly the best distribution method here |
08:45:51 | FromDiscord | <Elegantbeef> The main thing is getting a repeatable environment, the main thing with appimage is that the image was made with the earliest libc you want support since you ship all the other deps with it |
08:46:08 | FromDiscord | <Elegantbeef> So i'd say consider looking at that for a solution to your choosenim woes |
08:46:19 | * | xet7 quit (Ping timeout: 240 seconds) |
08:47:02 | FromDiscord | <dom96> Is appimage supported only by recent distros though? |
08:47:26 | FromDiscord | <dom96> Honestly the easy fix here is to just have choosenim use curl on Linux |
08:47:42 | FromDiscord | <dom96> Most users should have that installed |
08:47:48 | FromDiscord | <Elegantbeef> What do you mean by recent? |
08:47:51 | FromDiscord | <dom96> And choosenim already supports that |
08:47:56 | FromDiscord | <2F42BBA1> Already installed relax |
08:48:20 | FromDiscord | <2F42BBA1> There's should be no issue |
08:48:26 | FromDiscord | <Elegantbeef> Appimages ship a runtime so the only thing that matters is the libc version on the OS |
08:48:39 | FromDiscord | <Elegantbeef> If your libc is newer or equal to the compiled version you should mostly be fine |
08:48:43 | FromDiscord | <2F42BBA1> so better to build against something like debian xd |
08:48:44 | FromDiscord | <dom96> In reply to @Elegantbeef "Appimages ship a runtime": I see. Interesting. |
08:49:08 | PMunch | Or, and hear me out here, we add choosenim to package managers |
08:49:19 | PMunch | You know, like Linux is supposed to work.. |
08:49:33 | FromDiscord | <Elegantbeef> Flatpak might be the sanest though |
08:49:48 | FromDiscord | <Elegantbeef> It allows the easiest support to every platform |
08:49:55 | PMunch | Technically I guess we should add Nim to package managers, but some of them are sooo slow at updating |
08:50:13 | PMunch | So throwing choosenim in there is a good compromise |
08:50:24 | PMunch | Instead of trying to install programs on Linux the Windows way |
08:50:42 | FromDiscord | <Elegantbeef> Yea in an ideal world it'd be on a package manager but i think the best thing is to use flatpak to make it so it's 1 deployment to all users |
08:51:29 | FromDiscord | <Elegantbeef> I mean does it even solve the issue though pmunch in this case the openssl is too recent |
08:52:06 | PMunch | Well, kinda |
08:52:17 | PMunch | We could require a certain version of SSL |
08:52:32 | PMunch | Then depending on the package manager we might be able to get the old version |
08:52:38 | FromDiscord | <2F42BBA1> Uh... What's alternative to real numbers in Nim? |
08:52:39 | FromDiscord | <Elegantbeef> Yea |
08:52:47 | PMunch | Of course the actual fix to that problem is updating the SSL version.. |
08:52:48 | FromDiscord | <Elegantbeef> That's the issue it depends on the package manager allowing it |
08:52:52 | FromDiscord | <Elegantbeef> If it doesnt you're yet again SOL |
08:53:06 | FromDiscord | <2F42BBA1> It would be cool to have something like rustls |
08:53:10 | FromDiscord | <2F42BBA1> but nimtls |
08:53:25 | FromDiscord | <Elegantbeef> Eh i'm firmly in flatpak/appimage being the best solution here |
08:53:26 | FromDiscord | <Elegantbeef> Also pmunch what about my solution didnt work? |
08:53:44 | PMunch | I hate flatpak/appimage.. |
08:53:55 | FromDiscord | <Elegantbeef> I did say you'd have to do `proc doGet(_: typedesc[User]): User` |
08:54:08 | PMunch | Yeah, that works |
08:54:15 | PMunch | I'm working on integrating it now |
08:54:23 | FromDiscord | <Elegantbeef> Ah ok |
08:54:28 | FromDiscord | <Elegantbeef> Thought there was a big missing issue here |
08:54:33 | PMunch | It requires me to make the type I'm trying to get available as a parameter |
08:54:58 | FromDiscord | <Elegantbeef> I guess in your case you could also just do `_: var T` |
08:55:00 | PMunch | But the sym != sym issue is still bugging me |
08:55:15 | FromDiscord | <Elegantbeef> well not `_` but yea |
08:55:20 | PMunch | I feel like I'm doing something wrong that will fail in subtle ways, but I'm not entirely sure what.. |
08:55:43 | FromDiscord | <Elegantbeef> Well i can take a glance if you want more eyes 😄 |
08:55:48 | PMunch | @Elegantbeef, instead of having a return type pass in a var argument of the kind I want? |
08:55:55 | FromDiscord | <Elegantbeef> Yes |
08:55:57 | PMunch | That's nifty but not very "royale" |
08:56:24 | FromDiscord | <Elegantbeef> Hey it was a idea for not needing the typedesc passed! 😛 |
08:56:49 | FromDiscord | <Elegantbeef> also werent you comparing types? |
08:56:54 | FromDiscord | <Elegantbeef> `sameType` exists |
08:56:55 | PMunch | This is what I have currently: http://ix.io/3Wsw |
08:57:14 | PMunch | sameType wasn't working correctly.. |
08:57:27 | FromDiscord | <Elegantbeef> Yea it doesnt always |
08:57:40 | FromDiscord | <Elegantbeef> typed ast is always fucky |
08:57:52 | PMunch | If you send me a public key I can give you access to my private Git repo |
08:58:31 | FromDiscord | <Elegantbeef> What too fancy for the manual invite? |
08:59:17 | PMunch | Manual invite? |
08:59:41 | FromDiscord | <Elegantbeef> Ostensibly it's a github repo |
08:59:55 | PMunch | Nah, private server |
09:00:03 | FromDiscord | <Elegantbeef> Ah |
09:02:13 | FromDiscord | <Elegantbeef> http://ix.io/3Wsy there you go mister |
09:02:38 | madprops | ElegantBeef and Rika are always here |
09:02:48 | madprops | how much expert can you get in a language |
09:02:48 | FromDiscord | <Elegantbeef> Hey i'm soon to sleep |
09:02:50 | FromDiscord | <Rika> Not really |
09:03:09 | FromDiscord | <Elegantbeef> Always being he is a side effect of being perpetually unemployed for me |
09:03:11 | FromDiscord | <Rika> I haven’t delved into the compiler, beef has |
09:03:11 | madprops | :) |
09:04:22 | madprops | what did you see in the compiler? |
09:04:37 | FromDiscord | <Elegantbeef> Lots of things people forgot to implement |
09:08:50 | madprops | lots of ToDo's |
09:09:00 | madprops | did you push contributions to it? |
09:09:25 | FromDiscord | <Elegantbeef> There are fixes by me yes |
09:09:40 | FromDiscord | <Elegantbeef> Most of what i fix is 'X should work but doesnt' |
09:10:16 | PMunch | There you go @Elegantbeef |
09:10:28 | PMunch | Now you should be able to clone [email protected]:deriveabletypes.git |
09:10:58 | PMunch | You can read every branch (currently only master branch), and you can do whatever you want to branches starting with the name elegantbeef/ |
09:11:57 | PMunch | Oh hi madprops, been a while since I've seen you in here |
09:12:02 | madprops | hi |
09:12:17 | madprops | doing more talks? |
09:12:21 | madprops | i remember you had a video up there |
09:12:33 | madprops | you looked younger than i imagined |
09:12:45 | FromDiscord | <Elegantbeef> Wait until madprops sees me.... wait he never will |
09:12:55 | PMunch | Haha, haven't gotten any talks planned |
09:13:01 | madprops | the beef podcast |
09:13:14 | FromDiscord | <Elegantbeef> When i shave i look around 12 |
09:13:20 | PMunch | My girlfriend moved in with me so streaming in the living room isn't as easy as it once was |
09:13:31 | FromDiscord | <Elegantbeef> And when i dont shave i look homeless |
09:14:10 | madprops | my bears get too long sometimes |
09:14:14 | madprops | beard even |
09:14:18 | PMunch | @Elegantbeef, I still want to give the podcast idea a try though.. |
09:14:51 | madprops | i've never done that |
09:15:09 | FromDiscord | <Elegantbeef> Yea but we're too far apart time wise |
09:15:38 | FromDiscord | <Elegantbeef> Well mostly cause i have a silly sleep schedule |
09:15:45 | FromDiscord | <Rika> It would be just as bad if you asked me either so lmao |
09:16:03 | FromDiscord | <Rika> TFW Asia-Europe-America group |
09:16:09 | FromDiscord | <Elegantbeef> Pmunch is 8 hours ahead of me, you're fewer ahead of him no? |
09:16:23 | FromDiscord | <Rika> I’m at +9, you tell me |
09:16:34 | FromDiscord | <Elegantbeef> I'm -7 |
09:16:37 | FromDiscord | <Elegantbeef> He's +1 iirc |
09:16:45 | FromDiscord | <Elegantbeef> So exactly same |
09:16:49 | FromDiscord | <Rika> Lmao so we’re equally distant |
09:17:28 | FromDiscord | <Rika> We’re all equally distant from each other how delightful |
09:18:11 | FromDiscord | <Elegantbeef> To be fair it's ideal no way in hell i'd want to be closer to either of you |
09:18:23 | madprops | if not a podcast then a book by both of you could be a nice alternative |
09:18:31 | madprops | about nim |
09:18:36 | FromDiscord | <Elegantbeef> Ehh the podcast would be related to tmwn |
09:18:49 | FromDiscord | <Elegantbeef> Also who wants a book by someone that's never wrote code professionally 😛 |
09:19:04 | madprops | probably lots of people |
09:20:04 | FromDiscord | <Elegantbeef> Anyway pmunch i'll probably take a look tomorrow, |
09:23:13 | FromDiscord | <Elegantbeef> Also using assert for macros.... that's a paddling |
09:25:07 | FromDiscord | <Elegantbeef> With that i'm out of here |
09:30:42 | * | lumo_e joined #nim |
09:33:34 | PMunch | @Elegantbeef, wait, what am I supposed to use? |
09:34:33 | PMunch | I write code for a living |
09:35:07 | PMunch | And @Elegantbeef I think you just insulted everyone who bought Nim in Action, I don't think Dominik had started working yet by the time he wrote that book :P |
09:35:20 | * | ozzz joined #nim |
09:37:21 | * | ozzz is now known as om3ga |
10:15:25 | FromDiscord | <dom96> hah, sorry to disappoint but I was on my fourth internship by the time the book was finished. Dunno, maybe that doesn't count as writing code professionally still :P |
10:59:43 | PMunch | I mean it depends on the internship |
11:00:36 | PMunch | I got my first programming job when I was 18, didn't really count myself as a professional programmer though |
11:09:41 | FromDiscord | <Andreas> hi, i fail on zipping slices - sequtils/zip wants two openArrays ? howto make a openArray from a Slice ? |
11:10:47 | FromDiscord | <Solitude> write your own zip for slices |
11:11:09 | FromDiscord | <Solitude> Slice is just two number, openArray is a collection |
11:11:17 | FromDiscord | <Solitude> (edit) "number," => "numbers," |
11:11:41 | FromDiscord | <Andreas> In reply to @Solitude "write your own zip": ok, nice, i'll try that - would you recommend a macro or a template ? |
11:11:50 | FromDiscord | <Solitude> a function or iterator |
11:12:03 | FromDiscord | <Solitude> the hell you need templates for |
11:13:11 | FromDiscord | <Andreas> thx `toSeq( 0..list.high() )` does is |
11:13:20 | FromDiscord | <Andreas> (edit) "is" => "it for me" |
11:13:29 | FromDiscord | <Solitude> ... |
11:18:51 | Arrrrrrr | Do you mean you want to convert 1 .. 5 into @[1, 2, 3, 4, 5] ? |
11:25:48 | FromDiscord | <Josef> Who came up with `when, elif, else`. |
11:26:45 | PMunch | @Josef, just reusing the same keywords to not have to introduce too many new one |
11:27:56 | Arrrrrrr | Probably Araq, he is the architect of Nim. Before him there was only darkness. |
11:30:30 | FromDiscord | <Solitude> amazing performance from irc bridge |
11:39:37 | PMunch | @Solitude, huh? |
11:41:08 | FromDiscord | <Solitude> https://media.discordapp.net/attachments/371759389889003532/969201595504013372/unknown.png |
11:43:44 | PMunch | Hmm, messages out of order? Or did you lose a message? |
11:45:41 | Arrrrrrr | lol |
11:45:53 | Arrrrrrr | Really confusing. |
11:50:54 | FromDiscord | <eyecon> Quick question: I have a string with a length of at least 8. The following is OK, right?↵↵`cast[uint32](frameContents[4..7])` |
11:51:31 | FromDiscord | <Solitude> no |
11:52:14 | FromDiscord | <Solitude> string[a..b] returns new string |
11:52:59 | FromDiscord | <Solitude> just write a function that copymems the contents into uint32 |
11:53:27 | FromDiscord | <eyecon> In reply to @Solitude "string[a..b] returns new string": But even so, wouldn't it work? |
11:53:31 | FromDiscord | <Solitude> no |
11:53:32 | PMunch | Or you could do `cast[ptr uint32](frameContents[4].addr)[]` |
11:53:50 | FromDiscord | <Solitude> In reply to @PMunch "Or you could do": this is the closest to your code |
11:53:58 | PMunch | @eyecon, casting a string like that won't work, strings in Nim are not like strings in C |
11:54:11 | FromDiscord | <eyecon> In reply to @PMunch "Or you could do": Thanks! Any downsides I should be aware of? |
11:54:14 | PMunch | They have a size and a capacity field, which is all you would get if you cast it |
11:55:00 | PMunch | @eyecon, well it's unsafe, if the string is deallocated the pointer won't be valid any longer. But since you're creating a uint32 that should be fine since it's a value |
11:55:55 | FromDiscord | <eyecon> But I cannot assign this cast pointer to an uint32 field, right? I should dereference that? |
11:56:26 | FromDiscord | <eyecon> I have a new object with a field I'll be assigning this to. |
11:56:32 | FromDiscord | <Solitude> if you look carefully at the snippet, it already dereferences |
11:57:02 | FromDiscord | <eyecon> In reply to @Solitude "if you look carefully": Ah, I'm on mobile and didn't see the last two characters, my bad |
11:57:11 | FromDiscord | <eyecon> Thanks a lot, both of you |
11:57:48 | PMunch | No problem |
11:59:09 | FromDiscord | <eyecon> In reply to @Solitude "if you look carefully": I thought there was a character which is not supported on mobile (a box) https://media.discordapp.net/attachments/371759389889003532/969206128854593536/Screenshot_2022-04-28-14-57-59-796_com.discord.png |
11:59:18 | FromDiscord | <eyecon> 😬 |
11:59:38 | FromDiscord | <Rika> Cursed, your phone shows what is supposed to be in monospace in sans serif |
11:59:52 | FromDiscord | <eyecon> In reply to @Rika "Cursed, your phone shows": Yes! That annoys me to no end |
12:00:59 | FromDiscord | <jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=3Wte |
12:03:30 | * | acidsys left #nim (One channel less.) |
12:04:33 | FromDiscord | <jmgomez> I guess I can make a var or something and do tree.add() but would be nice to know if there is a way to do it inline |
12:06:04 | PMunch | @eyecon, haha well that's a dumb font |
12:07:01 | PMunch | @jmgomez, not quite sure what you mena |
12:07:03 | PMunch | mean* |
12:09:40 | FromDiscord | <jmgomez> In reply to @PMunch "<@726017160115126333>, not quite sure": if there somehow a way to expand a seq[NimNode] righ there, like i.e. if they were just strings you could reduce/fold via concatenate them with "," not sure if there is a concatenate operation for NimNodes where you can join them together (aka treat them as monoids) |
12:10:11 | PMunch | You can create a new statement list |
12:10:17 | PMunch | Those can go in a lot of places |
12:11:09 | FromDiscord | <jmgomez> okay, will look into those, thanks! |
12:18:32 | * | derfflinger joined #nim |
12:30:24 | * | slowButPresent joined #nim |
12:50:48 | * | derfflinger left #nim (Leaving) |
12:52:01 | * | Zectbumo quit (Remote host closed the connection) |
12:58:56 | FromDiscord | <narimiran> In reply to @rockcavera "I understand and thanks": it will most likely be a part of a future release (1.6.8) |
13:05:06 | FromDiscord | <Zodey> how can i add -d:ssl compiler flag to "nimble run"? |
13:05:57 | PMunch | If you program requires -d:ssl you should put in in a mymodule.nims file |
13:07:09 | FromDiscord | <Zodey> In reply to @PMunch "If you program requires": i dont have that |
13:07:14 | FromDiscord | <Zodey> i used nimble init |
13:07:38 | FromDiscord | <Zodey> and i only have a .nimble with a src dir |
13:09:37 | FromDiscord | <Yardanico> In reply to @Zodey "i dont have that": you can just create that |
13:09:43 | FromDiscord | <Solitude> Create it near souce file |
13:09:46 | FromDiscord | <Yardanico> nimble doesn't create it by default because it's not needed by default |
13:09:49 | FromDiscord | <Solitude> Source |
13:09:52 | FromDiscord | <Yardanico> In reply to @Solitude "Source": source? |
13:09:59 | FromDiscord | <Solitude> Surs |
13:10:07 | FromDiscord | <Zodey> i should create it in the src dir? |
13:10:12 | FromDiscord | <Yardanico> In reply to @Zodey "i should create it": yes |
13:10:17 | FromDiscord | <Yardanico> with the name `mymainname.nims` |
13:10:25 | FromDiscord | <Yardanico> so if you have `myapp.nim` you create `myapp.nims` |
13:11:02 | FromDiscord | <Zodey> "undeclared identifier: 'd'" |
13:11:20 | FromDiscord | <Solitude> --d:ssl |
13:11:34 | FromDiscord | <Zodey> "expression '--' cannot be called" XD |
13:11:41 | FromDiscord | <Solitude> Its over |
13:11:43 | FromDiscord | <Yardanico> In reply to @Zodey ""expression '--' cannot be": check the actual compilation |
13:11:47 | FromDiscord | <Yardanico> don't care about syntax errors in the vscode |
13:12:10 | FromDiscord | <Yardanico> nim check support for nims has been fixed in devel, not in stable |
13:12:16 | FromDiscord | <Zodey> its the same |
13:12:23 | FromDiscord | <Yardanico> can you show the exact contents of your .nims file? |
13:12:28 | FromDiscord | <Yardanico> and how you build the program |
13:12:45 | FromDiscord | <Zodey> In reply to @Yardanico "can you show the": https://media.discordapp.net/attachments/371759389889003532/969224650565484544/unknown.png |
13:12:50 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/969224673533517884/unknown.png |
13:12:53 | FromDiscord | <Yardanico> two dashes |
13:12:53 | FromDiscord | <Zodey> In reply to @Yardanico "and how you build": nimble run |
13:13:24 | FromDiscord | <Zodey> In reply to @Yardanico "two dashes": works now, thank you very much, sorry for being noob 😅 |
13:13:55 | FromDiscord | <Zodey> can i somehow remove syntax check for that file? |
13:14:07 | FromDiscord | <Yardanico> no, just ignore it or install latest nim 1.6 rc |
13:14:10 | FromDiscord | <Yardanico> (or devel) |
13:14:21 | FromDiscord | <Yardanico> https://forum.nim-lang.org/t/9100#59572 |
13:14:23 | FromDiscord | <Zodey> okay, np |
13:14:26 | FromDiscord | <Zodey> i will ignore it |
13:14:31 | FromDiscord | <Zodey> thank you |
13:18:36 | * | oprypin quit (Remote host closed the connection) |
13:19:46 | * | oprypin joined #nim |
13:20:31 | * | rockcavera joined #nim |
13:20:31 | * | rockcavera quit (Changing host) |
13:20:32 | * | rockcavera joined #nim |
13:30:21 | * | arkurious joined #nim |
13:31:27 | FromDiscord | <System64 ~ Flandre Scarlet> Do I need OpenGL knowledge if I want to use the ImGUI library? |
13:31:42 | FromDiscord | <Rika> Beginner level, I believe |
13:36:03 | FromDiscord | <System64 ~ Flandre Scarlet> so I need OpenGL? |
13:36:46 | FromDiscord | <Rika> I think so but you can always opt for GLFW |
13:42:13 | FromDiscord | <System64 ~ Flandre Scarlet> what is GLFW? |
13:43:37 | FromDiscord | <Rika> Search it up, it’s a helper for OpenGL |
13:43:53 | FromDiscord | <2F42BBA1> Is there a way on Nim to create a temp file? |
13:44:05 | FromDiscord | <Solitude> std/tempfiles |
13:44:09 | FromDiscord | <2F42BBA1> gotcha |
13:44:11 | FromDiscord | <2F42BBA1> thanks |
14:04:35 | FromDiscord | <dom96> In reply to @Zodey "": use myapp.nim.cfg to avoid dealing with .nims, your `-d:ssl` will then work :) |
14:05:23 | * | rockcavera quit (Remote host closed the connection) |
14:05:50 | FromDiscord | <theduke> Hey there.↵Is there any effort to compile Nim to webassembly? More specifically with `wasi` syscall support in the standard library? |
14:07:25 | FromDiscord | <Rika> Emscripten? |
14:11:54 | FromDiscord | <theduke> No, not emscripten. |
14:12:31 | FromDiscord | <theduke> Emscripten targets the browser, I'm asking about a generic target (what clang calls `wasm32-wasi`) |
14:12:55 | FromDiscord | <theduke> wasi is a Wasm syscall interface for IO etc |
14:13:09 | FromDiscord | <Rika> Then I do not know |
14:13:16 | FromDiscord | <dom96> not familiar with anything like that for Nim |
14:13:31 | FromDiscord | <dom96> I have done some experiments to compile Nim directly to wasm |
14:13:44 | FromDiscord | <dom96> It's likely I will pursue this further soon |
14:14:02 | FromDiscord | <dom96> but I am more interested in the browser target |
14:17:41 | FromDiscord | <theduke> I guess the `nlvm` backend could also compile to wasm, but one would need to extend the standard library to support wasi.↵Even not considering `wasi`, there'd need to be a way to specify imports and exports.↵wasm imports and exports have a module name and a name.↵Wasm also supports multi-value returns, basically tuples of the primitive values (i32,i64,f32,f64), so that would probably also need some ABI compatibility work |
14:19:31 | FromDiscord | <dom96> out of curiosity, what is your use case for this? |
14:20:14 | FromDiscord | <Zodey> sent a code paste, see https://play.nim-lang.org/#ix=3Wtz |
14:20:50 | FromDiscord | <aph> yep |
14:21:30 | FromDiscord | <Zodey> cool, thanks, i came from java and i really didnt know which to use |
14:21:59 | FromDiscord | <Zodey> damm, these "mixed" languages are hard |
14:22:04 | FromDiscord | <aph> im not sure if there are standards on this, id say choose what you're comfortable with lol |
14:22:33 | FromDiscord | <Zodey> i mean, in java you cant use the second one i think |
14:22:42 | FromDiscord | <Rika> Choose whichever most appropriate. Usually the first |
14:23:00 | FromDiscord | <Rika> In reply to @Zodey "i mean, in java": In pretty much all languages you can’t use either. It’s one or the other |
14:23:05 | FromDiscord | <theduke> I'm working on a distributed Webassembly runtime, somewhat similar to a blend of Erlang and Kubernetes, and I'd love to support Nim as a language.↵Server-side Wasm is getting a lot of attention anyway (see the WasmCloud / Spin / Lunatic / WAVM, etc) projects↵(@dom96) |
14:23:07 | FromDiscord | <Rika> There are some few exceptions |
14:23:19 | FromDiscord | <aph> In reply to @Rika "In pretty much all": i think d lang have it probably |
14:23:28 | FromDiscord | <Rika> That is one exception as I’ve said |
14:23:40 | FromDiscord | <Zodey> i see, thanks guys |
14:24:20 | FromDiscord | <Zodey> btw, the code isnt working up there, so dont try to use lol |
14:37:56 | * | genpaku joined #nim |
14:38:16 | FromDiscord | <SnowNeo> people use nim? |
14:39:13 | PMunch | Yup |
14:39:19 | FromDiscord | <SnowNeo> what for? |
14:39:37 | FromDiscord | <huantian> Programming |
14:39:48 | FromDiscord | <SnowNeo> Very cool |
14:39:50 | FromDiscord | <Zodey> you can use it for anything you want |
14:39:54 | FromDiscord | <Solitude> for rustards to seethe |
14:40:10 | FromDiscord | <SnowNeo> In reply to @Solitude "for rustards to seethe": Is that like an insult for people who use rust lmfao |
14:40:27 | FromDiscord | <Solitude> In reply to @SnowNeo "Is that like an": why are you here |
14:40:51 | FromDiscord | <SnowNeo> To learn about what people mainly use nim for |
14:41:11 | FromDiscord | <Solitude> nothing, its a psyop, run along |
14:41:26 | FromDiscord | <SnowNeo> no no |
14:41:28 | FromDiscord | <SnowNeo> i want to know |
14:41:52 | FromDiscord | <Zodey> well, some people makes games with it, look at #gamedev |
14:42:09 | FromDiscord | <huantian> People make websites, applications, games, other programming langs, whatever you want in your life |
14:42:15 | FromDiscord | <Solitude> https://media.discordapp.net/attachments/371759389889003532/969247175039139840/unknown.png |
14:42:19 | FromDiscord | <SnowNeo> cool cool |
14:42:31 | FromDiscord | <SnowNeo> alright well have a good day :D |
14:42:51 | FromDiscord | <Solitude> :DD |
14:47:31 | FromDiscord | <Zodey> In reply to @Zodey "well, some people makes": @SnowNeo basically, you can make anything you want, its easy to read, and its very fast (for speed: <https://plummerssoftwarellc.github.io/PrimeView/report?id=davepl-1650624419.json&hi=False&hf=False&hp=False&fi=&fp=mt&fa=wh~ot&ff=uf&fb=uk~ot&tp=True&sc=pp&sd=True>)↵libraries arent a big problem, because you can use c libraries as well |
14:48:25 | FromDiscord | <SnowNeo> Ah |
14:48:30 | FromDiscord | <SnowNeo> Oh nim's faster than go |
14:48:48 | FromDiscord | <Zodey> with 2 cores its even faster than rust |
14:48:50 | FromDiscord | <Zodey> <https://plummerssoftwarellc.github.io/PrimeView/report?id=davepl-1651136147.json&hi=False&hf=False&hp=False&fi=&fp=mt&fa=wh~ot&ff=uf&fb=uk~ot&tp=True&sc=pp&sd=True> |
14:49:14 | FromDiscord | <SnowNeo> Cool |
14:49:22 | FromDiscord | <SnowNeo> Any big companies using it? |
14:49:47 | FromDiscord | <Yardanico> In reply to @SnowNeo "Any big companies using": status is probably the biggest if you mean "publicly" and "a lot" |
14:49:58 | FromDiscord | <Zodey> sadly not |
14:49:59 | FromDiscord | <Yardanico> there are probably other big companies that have some employees using them somewhere for something |
14:50:08 | FromDiscord | <SnowNeo> In reply to @Zodey "sadly not": Ah |
14:50:24 | FromDiscord | <Yardanico> In reply to @Zodey "<https://plummerssoftwarellc.github.io/PrimeView/re": this is not representative of a language performance at all |
14:50:50 | FromDiscord | <Yardanico> there you can optimize code for your language as far as you want, so the only limit is how much effort you spend on optimizing that specific benchmark |
14:51:35 | FromDiscord | <Zodey> Well, I think every fan wants his language to win, so in this benchmark everybody tried his best↵<https://github.com/PlummersSoftwareLLC/Primes> |
14:51:43 | FromDiscord | <Yardanico> again, no |
14:51:47 | FromDiscord | <Yardanico> "everybody tried his best" |
14:52:17 | FromDiscord | <Yardanico> those benchmarks are really not good for comparing languages |
14:52:21 | FromDiscord | <SnowNeo> Someone made one in brainfuck |
14:52:23 | FromDiscord | <Yardanico> they're only good for comparing people who wrote them |
14:52:24 | FromDiscord | <SnowNeo> Very cool |
14:53:42 | * | vicfred quit (Quit: Leaving) |
14:54:24 | FromDiscord | <Zodey> okay, im sure you are more experienced than me, so i will believe in you↵but still, Nim isnt "slow" :DD |
14:54:30 | FromDiscord | <Yardanico> that is true |
14:54:54 | FromDiscord | <Yardanico> nim is one of the best languages (not just my opinion, but of a lot of others) by performance/effort ratio |
14:55:10 | FromDiscord | <Zodey> In reply to @Yardanico "nim is one of": yeah, thats what i wanted to say before |
14:55:21 | FromDiscord | <Zodey> In reply to @Zodey "<@772794463789252659> basically, you can": with this xD |
14:55:25 | FromDiscord | <SnowNeo> Y |
14:56:00 | FromDiscord | <SnowNeo> (edit) "Y" => "You guys probably use nim more than me so tell me this, is there any other reason for me to move to nim from rust other than just raw speed" |
14:56:14 | FromDiscord | <Zodey> In reply to @SnowNeo "You guys probably use": effort radio |
14:56:21 | FromDiscord | <Zodey> its way more easier to read and write |
14:56:23 | FromDiscord | <Yardanico> if you already use rust, you don't need to move to nim for speed |
14:56:33 | FromDiscord | <Yardanico> but yes, the syntax is usually much nicer and less verbose |
14:56:43 | FromDiscord | <larroteeno> hello everyone, I am doing some exercises and I stumbled upon one that requires me to define an object constructor. I ve seen examples but none works. can someone share one?↵↵say the class is called Deck and when you say Deck(cards:10) on object creation I want to get a seq of 10 cards as a side effect. |
14:56:44 | FromDiscord | <Yardanico> also AST macros allow to have some really nice DSLs |
14:56:51 | FromDiscord | <SnowNeo> Alright, I've made my choice, enjoy your day! :D |
14:57:07 | FromDiscord | <Yardanico> In reply to @larroteeno "hello everyone, I am": nim doesn't have overridable "object constructors" as a language feature |
14:57:17 | FromDiscord | <Yardanico> the idiom is to just create something like `initFoo` for value types or `newFoo` for ref types |
14:57:34 | FromDiscord | <Yardanico> Deck(cards: 10) is the built-in object construction syntax, it only works if you have cards literally as that field in an object |
14:57:49 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3WtL |
14:58:38 | FromDiscord | <Zodey> did snow has just leave? XDDD |
15:12:45 | FromDiscord | <larroteeno> how can i make that do a side effect, so instead of int that cards is an array of object of type card, that newFoo or initFoo is not too clear, and dont seem to work when I tried, is there any example so say, in your example when you do Deck(card:10) you also print a "creating cards" or something? |
15:13:56 | FromDiscord | <Yardanico> In reply to @larroteeno "how can i make": no, it's not possible if the type itself is Deck |
15:14:05 | FromDiscord | <Yardanico> as I said, the nim idiom is to just create a separate proc called `initFoo` or `newFoo` |
15:20:44 | FromDiscord | <larroteeno> weird that this website suggests that you could init part of an object without specifying it, thanks |
15:21:46 | FromDiscord | <larroteeno> sent a code paste, see https://paste.rs/Iae |
15:22:04 | FromDiscord | <larroteeno> this is what they suggest, you create this allergies object and magically that lst becomes something, a subset of a full list |
15:22:18 | FromDiscord | <larroteeno> is there any way of doing this or is this exercise wrong? |
15:22:20 | FromDiscord | <Rika> That will not work ever |
15:22:23 | FromDiscord | <Rika> It is wrong |
15:23:41 | FromDiscord | <Yardanico> In reply to @larroteeno "this is what they": this is invalid then, I assume this is exercism |
15:23:47 | FromDiscord | <Yardanico> they probably translated the code from another language the wrong way |
15:26:04 | FromDiscord | <larroteeno> yeah that is hat I thought, thanks for confirming it, I was going nuts |
15:31:29 | FromDiscord | <huantian> Maybe lst is a proc and not a field? |
15:32:25 | FromDiscord | <Rika> That would be crazy of them but it would work |
15:32:26 | FromDiscord | <Rika> As a workaround |
15:35:07 | FromDiscord | <tandy> can i import from the root of my project? rather than using ../ |
15:36:03 | FromDiscord | <Yardanico> In reply to @huantian "Maybe lst is a": i did say that it'll work, but it's not idiomatic at all |
15:36:08 | FromDiscord | <Yardanico> and exercism tries to be idiomatic |
15:39:14 | * | duuude quit (Read error: Connection reset by peer) |
15:39:26 | * | duuude joined #nim |
15:43:18 | FromDiscord | <Rika> In reply to @tandy "can i import from": Probably with adding path to your Nim config but I’m not sure about how well it works |
15:44:27 | FromDiscord | <tandy> ok figured it |
15:49:13 | Amun-Ra | what would be a proper way to have a pointer of value of 1? |
15:49:30 | FromDiscord | <Yardanico> do you mean a pointer to an int with value of 1? |
15:49:39 | FromDiscord | <Yardanico> or literally a pointer that's equal to 1 ? |
15:49:57 | FromDiscord | <Yardanico> if the former, then `var myptr = create(int); myptr[] = 1` |
15:50:03 | FromDiscord | <Yardanico> of course replace ; with a new line |
15:50:08 | Amun-Ra | I need something like (void *) 1 |
15:50:18 | FromDiscord | <Yardanico> `cast[pointer](1)` |
15:50:32 | FromDiscord | <Yardanico> `pointer` in Nim is what `void ` is in C |
15:50:59 | Amun-Ra | hmm, right, I've tested it before, but the problem was elsewhere |
15:51:01 | Amun-Ra | thanks |
15:51:03 | FromDiscord | <Yardanico> but again, this is only useful for C FFI, I hope you're not using this for pure Nim code :) |
15:51:49 | Amun-Ra | yes, I'm writing an interface :> |
15:53:16 | * | xet7 joined #nim |
15:53:52 | Amun-Ra | Yardanico: what's the cause of the error? https://play.nim-lang.org/#ix=3Wuf |
15:54:15 | FromDiscord | <Rika> Const |
15:54:20 | FromDiscord | <Yardanico> VM generally doesn't support pointers, make it a `let` |
15:54:30 | Amun-Ra | oh |
15:54:37 | Amun-Ra | thank you |
15:55:15 | Amun-Ra | that error wasn't clear tbh |
15:55:25 | FromDiscord | <Rika> It wasn’t |
15:56:17 | Amun-Ra | I mean at least for me |
15:56:28 | FromDiscord | <Yardanico> Rika agreed with you |
16:01:35 | NimEventer | New Nimble package! periapsisEngine - A 2D game engine made by Periapsis Studios, see https://github.com/Periapsis-Studios/Periapsis-Engine |
16:18:07 | * | xet7 quit (Ping timeout: 240 seconds) |
16:18:36 | * | duuude quit (Ping timeout: 240 seconds) |
16:24:04 | * | vicfred joined #nim |
16:31:29 | * | xet7 joined #nim |
16:32:00 | * | xet7 quit (Remote host closed the connection) |
16:32:21 | * | xet7 joined #nim |
16:40:57 | FromDiscord | <larroteeno> In reply to @huantian "Maybe lst is a": can you use a proc without parentheses? |
16:43:08 | FromDiscord | <Rika> Yes |
16:43:10 | * | duuude joined #nim |
16:51:25 | FromDiscord | <Tyrone Wiggums> can you write asm in nim |
16:52:50 | FromDiscord | <Yardanico> yes |
16:53:10 | FromDiscord | <Yardanico> https://nim-lang.org/docs/manual.html#statements-and-expressions-assembler-statement |
17:02:44 | * | duuude quit (Quit: Konversation terminated!) |
17:02:56 | * | duuude joined #nim |
17:06:19 | Amun-Ra | I can never remember when parentheses are mandatory and when they're not |
17:06:48 | FromDiscord | <Yardanico> they're not mandatory most of the time |
17:06:54 | FromDiscord | <Yardanico> when you do procedure/method/etc calls |
17:07:31 | FromDiscord | <Yardanico> https://nim-lang.org/docs/manual.html#procedures-command-invocation-syntax works in most cases |
17:17:00 | FromDiscord | <Phil> Erm... can you not make a table that uses an object variant as key? |
17:17:21 | FromDiscord | <Phil> No wait, you can, you just have to define your own `[]=`, don't you? |
17:20:24 | FromDiscord | <Phil> No wait... how the hell do you define a `[]=` that inserts into a table? |
17:21:08 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3WuL |
17:21:35 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=3WuL" => "https://play.nim-lang.org/#ix=3WuM" |
17:22:11 | FromDiscord | <Phil> Explodes at the `[]=` access in the last line:↵`/home/philipp/.choosenim/toolchains/nim-1.6.4/lib/system.nim(1877, 7) Error: parallel 'fields' iterator does not work for 'case' objects` |
17:24:01 | FromDiscord | <vindaar> @Phil\: the error is a bit confusing. The problem is that to have an object as a key, it needs a comparison operator `==`. The compiler tries to generate the operator automatically for your object by using the `fields` iterator. However, that doesn't work for case objects |
17:24:39 | FromDiscord | <Phil> Ohhhh so I can just write an ==, that I can do |
17:25:17 | FromDiscord | <vindaar> yup! |
17:29:10 | * | xet7 quit (Quit: Leaving) |
17:32:47 | * | xet7 joined #nim |
17:42:03 | FromDiscord | <Phil> Hmmmm |
17:42:11 | FromDiscord | <Phil> Same thing as above, wanted to write a convenience method |
17:43:42 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3WuT |
17:45:00 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=3WuT" => "https://play.nim-lang.org/#ix=3WuU" |
17:46:07 | FromDiscord | <vindaar> will check, give me a few min |
17:46:29 | FromDiscord | <Yardanico> @Phil that's because you're passing a copy of the table |
17:46:33 | FromDiscord | <Yardanico> which is non-mutable |
17:46:41 | FromDiscord | <Yardanico> `Table` is a value type while `TableRef` is a ref type |
17:46:55 | FromDiscord | <Yardanico> so you either add `var` to `table: var CampaignMemberships` in []= proc or change your Table to TableRef |
17:46:59 | FromDiscord | <Phil> Oh damnit, the classic of forgetting to var your params |
17:47:37 | FromDiscord | <Phil> Actually, that likely should be a tablerefe |
17:47:38 | FromDiscord | <Phil> (edit) "tablerefe" => "tableref" |
17:48:18 | FromDiscord | <vindaar> yup, was just about to write that |
17:48:19 | FromDiscord | <vindaar> 😅 |
17:50:32 | FromDiscord | <Yardanico> In reply to @Isofruit "Actually, that likely should": if you want to share it between different objects (shared ownership), then yeah |
17:50:36 | FromDiscord | <Yardanico> but generally a Table is enough |
17:53:36 | FromDiscord | <Arathanis> Are there any docs for how to define nimble tasks? |
17:53:39 | FromDiscord | <Arathanis> I've been looking |
17:53:56 | FromDiscord | <Arathanis> (edit) "looking" => "looking, but haven't been able to find anything concrete." |
17:57:26 | * | irfanns joined #nim |
18:18:53 | FromDiscord | <Phil> Scanning over the strutils stdlib, do we not have a proc to check whether a string like "451" is a number?↵I mean, we can parse, I just don't see an "isNumber" proc, only isDigit for chars |
18:21:34 | FromDiscord | <Arathanis> sent a code paste, see https://play.nim-lang.org/#ix=3Wv6 |
18:22:05 | FromDiscord | <Solitude> In reply to @Arathanis "You can use `parseInt`": thats an overkill when you can just iterate over characters and check if they are digits |
18:22:27 | FromDiscord | <Arathanis> Is it overkill? I don't think I agree. |
18:22:52 | FromDiscord | <Phil> I mean, I just now implemented both approaches and have since then been contemplating which is more expensive |
18:22:52 | FromDiscord | <Arathanis> Though maybe their intention is not to convert it to an actual integer, just check if its a integer. |
18:23:09 | FromDiscord | <Arathanis> That might be my mistake. I was under the assumption the end goal was converting a string to an integer. |
18:23:10 | FromDiscord | <Solitude> In reply to @Arathanis "Though maybe their intention": its literally what he wrote |
18:24:40 | FromDiscord | <d4rckh> i couldnt find much info on google about custom compiler flags, could anyone link me to a small guide or something similar? |
18:24:51 | FromDiscord | <mratsim> In reply to @Sway.rb "can you write asm": I wrote a compile-time assembler in Nim: https://github.com/mratsim/constantine/blob/master/constantine/math/arithmetic/assembly/limbs_asm_x86.nim#L81-L86= |
18:24:58 | FromDiscord | <mratsim> and a JIT as well |
18:25:01 | FromDiscord | <d4rckh> In reply to @d4rckh "i couldnt find much": i want to compile my programs with specific values and access them in my code |
18:25:17 | FromDiscord | <Arathanis> In reply to @Solitude "its literally what he": Sure. And that was my mistake. I assumed the intention was checking before parsing. |
18:25:25 | FromDiscord | <mratsim> In reply to @d4rckh "i want to compile": const foo {.intdefine.} = 1 |
18:25:35 | FromDiscord | <d4rckh> In reply to @mratsim "const foo {.intdefine.} =": and how do i pass it? |
18:25:36 | FromDiscord | <mratsim> you have booldefine and strdefine as well |
18:25:44 | FromDiscord | <Yardanico> In reply to @d4rckh "i want to compile": docs - https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-compileminustime-define-pragmas |
18:25:47 | FromDiscord | <mratsim> -d:foo=3 |
18:25:49 | FromDiscord | <d4rckh> ah, thanks! |
18:26:16 | FromDiscord | <Phil> In reply to @Arathanis "Sure. And that was": I do some of the time in this case... it's a bit of a mess |
18:26:39 | FromDiscord | <d4rckh> how can i use the flags to compile only specific parts of a file e.g. using `when defined(flag)` |
18:26:45 | FromDiscord | <Arathanis> In reply to @Isofruit "I do *some* of": I do think that is a good approach for the times when you are going to ultimately parse it into an int. |
18:27:16 | FromDiscord | <mratsim> In reply to @d4rckh "how can i use": -d:flag |
18:27:34 | FromDiscord | <Yardanico> In reply to @Arathanis "I *do* think that": it depends, like what if he wants to check if the number is too big to fit? |
18:27:35 | FromDiscord | <d4rckh> amazing |
18:27:44 | FromDiscord | <Yardanico> yes you can catch ValueError but it's a bit unclean |
18:28:20 | FromDiscord | <Arathanis> In reply to @Yardanico "it depends, like what": I don't know if I think there is a cleaner way to check if the number is too big to fit. |
18:28:31 | FromDiscord | <Arathanis> I'd love to see one. |
18:30:04 | FromDiscord | <Phil> Question, where does it come from that we add stuff to sets by using "incl"? |
18:30:12 | FromDiscord | <Arathanis> looks like it raises `integerOutOfRangeError` rather than `ValueError` in that case. |
18:30:15 | * | rockcavera joined #nim |
18:30:15 | * | rockcavera quit (Changing host) |
18:30:15 | * | rockcavera joined #nim |
18:30:23 | FromDiscord | <Phil> First time I've seen "include" as the keyword to add something to a set |
18:30:28 | FromDiscord | <Phil> (edit) "First time I've seen "include" as the keyword to add something to a set ... " added "in any language" |
18:30:45 | FromDiscord | <Yardanico> In reply to @Isofruit "First time I've seen": from math terminology |
18:31:39 | FromDiscord | <Yardanico> In reply to @Arathanis "looks like it raises": nonono |
18:31:45 | FromDiscord | <Yardanico> `integerOutOfRangeError` is a proc that raises ValueError |
18:31:53 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/969304967229882388/unknown.png |
18:32:06 | FromDiscord | <Arathanis> ah got it |
18:32:10 | FromDiscord | <Arathanis> the output is confusing |
18:32:23 | FromDiscord | <Yardanico> actually you can just check the pragmas in the docs |
18:32:31 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/969305124579209296/unknown.png |
18:32:34 | FromDiscord | <Yardanico> just click on the dots to expand them |
18:32:48 | FromDiscord | <Yardanico> nim has automatic effect tracking so it knows that exceptions a proc can raise |
18:33:16 | FromDiscord | <Yardanico> of course sometimes it will just show a generic "Exception", usually this is when a proc calls a callback either directly or indirectly, or something like that |
18:54:32 | * | irfanns quit (Remote host closed the connection) |
18:54:52 | * | irfanns joined #nim |
18:55:14 | * | xet7 quit (Remote host closed the connection) |
19:04:06 | * | Arrrrrrr quit (Quit: Arrrrrrr) |
19:09:28 | * | pro joined #nim |
19:20:36 | FromDiscord | <Phil> gnaaa, why is extending std/json always such a pain to get working, which kind of goat do you need to sacrifice for it |
19:21:37 | FromDiscord | <Solitude> what are you trying to do? |
19:33:14 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3Wvz |
19:33:58 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=3Wvz" => "https://play.nim-lang.org/#ix=3WvA" |
19:34:03 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=3WvA" => "https://paste.rs/So3" |
19:34:08 | FromDiscord | <Phil> sent a code paste, see https://paste.rs/jVu |
19:34:22 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=3WvD" => "https://play.nim-lang.org/#ix=3WvC" |
19:35:27 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3WvE |
19:35:58 | FromDiscord | <Phil> Given I imported jsonutils I should have the necessary procs available to serialize a damn table |
19:36:00 | FromDiscord | <Solitude> haha, yeah |
19:36:45 | FromDiscord | <Solitude> so, why arent you using jsony? |
19:37:00 | FromDiscord | <Phil> Because jsony does object --> String, not object --> JsonNode |
19:37:23 | FromDiscord | <Solitude> think it does both, but the hell you need JsonNode for |
19:37:39 | FromDiscord | <Phil> And I need `JsonNode` for a proc from a jwt library, that builds a token out of a JsonNode |
19:38:04 | FromDiscord | <Phil> ... Which they then turn into a string again, making it super painful |
19:38:28 | FromDiscord | <huantian> In reply to @Solitude "think it does both,": It does do both |
19:38:28 | FromDiscord | <Solitude> yeah, i would just sidestep JsonNode there and patch library if it doesnt allow that |
19:38:30 | FromDiscord | <Solitude> but you do you |
19:39:16 | FromDiscord | <Phil> If it does both I'm jumping ship because fuck me is extending std/json painful |
19:40:50 | FromDiscord | <Phil> Which hook in jsony allows you to convert object --> JsonNode? |
19:40:56 | FromDiscord | <huantian> It’s at the bottom of the readme |
19:41:00 | FromDiscord | <Phil> dumpHook is object --> String |
19:41:01 | FromDiscord | <Solitude> also, im just shilling for jsony, dont blame me if you're gonna do even more work |
19:41:29 | FromDiscord | <Phil> from Json is string (in json format) --> object |
19:41:34 | FromDiscord | <Phil> (edit) "from Json" => "fromJson" |
19:42:14 | FromDiscord | <huantian> You can just do to(JsonNode) |
19:42:17 | FromDiscord | <Phil> parseHook is also string --> object |
19:42:54 | FromDiscord | <Phil> Is that jsony? or do you mean the `to` method of std/json? |
19:43:22 | FromDiscord | <huantian> Wait it’s not to I can’t remember the name |
19:43:29 | FromDiscord | <Solitude> fromJson |
19:43:49 | FromDiscord | <huantian> Just scroll down to the bottom of the readme |
19:44:59 | FromDiscord | <Phil> What I found there is parsing string --> object (which could be JsonNode object sure).↵I'm looking for object --> JsonNode, the only way I'd get there would be object --> string --> JsonNode |
19:45:13 | * | Gustavo6046 joined #nim |
19:45:29 | FromDiscord | <huantian> I see |
19:45:31 | FromDiscord | <Phil> That's why I originally wanted to just use std/json for that single step |
19:45:31 | FromDiscord | <Solitude> In reply to @Isofruit "What I found there": forget everything we told you, its doomed |
19:45:58 | FromDiscord | <Phil> touching std/json is just a cursed experience every time I had to |
19:46:04 | FromDiscord | <huantian> Yeah I don’t think jsony does object to JsonNode |
19:46:14 | FromDiscord | <Solitude> why would anything do that |
19:46:24 | FromDiscord | <Solitude> ugh |
19:47:44 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3WvJ |
19:47:54 | FromDiscord | <Solitude> holy... |
19:49:34 | * | duuude quit (Ping timeout: 250 seconds) |
19:50:13 | * | duuude joined #nim |
19:50:19 | FromDiscord | <Phil> I'm writing my own fucking proc to parse that damn table, hooks be damned |
19:50:25 | FromDiscord | <Phil> (edit) removed "fucking" |
20:03:42 | FromDiscord | <treeform> In reply to @Isofruit "Because the JWT data": I hate JWT so much... |
20:03:49 | FromDiscord | <treeform> just want that to be known |
20:04:05 | FromDiscord | <Phil> The general idea or that particular data-type? |
20:04:19 | FromDiscord | <Phil> (edit) "data-type?" => "data-type/lib?" |
20:10:08 | * | Zectbumo joined #nim |
20:13:29 | * | gsalazar quit (Ping timeout: 272 seconds) |
20:17:33 | FromDiscord | <treeform> general idea |
20:19:08 | FromDiscord | <treeform> i have my own jwt lib though https://github.com/treeform/quickjwt/blob/master/src/quickjwt.nim |
20:19:19 | FromDiscord | <treeform> and I guess I kind of hate that it has to exist |
20:29:44 | FromDiscord | <Yardanico> mimalloc is fast |
20:30:15 | FromDiscord | <Yardanico> https://github.com/nim-lang/Nim/issues/18146 with mimalloc the bench i tested is actually _faster_ than with default nim's allocator (both with orc) |
20:30:49 | FromDiscord | <Yardanico> i made a small project template (nims + two patched files + mimalloc distribution) so you can easily add it to your project |
20:31:00 | FromDiscord | <Yardanico> need to publish as a separate repo and make a forum post I guess |
20:42:52 | * | pro quit (Quit: pro) |
20:52:33 | * | rez joined #nim |
21:07:21 | * | PMunch quit (Quit: leaving) |
21:24:23 | FromDiscord | <Phil> Somehow the conversion of string into JWT encoding fucks up unicode characters |
21:24:26 | FromDiscord | <Phil> God dangit |
21:29:18 | FromDiscord | <Phil> In reply to @treeform "i have my own": Before I invest another 2 hours, do you perhaps know if quickjwt handles unicode characters well?↵Currently battling with it turning " Jōzai Corp " into "JÅ\u008dzai Corp" |
21:29:56 | FromDiscord | <Phil> (edit) "it" => "my current jwt lib" | "my current jwt libturning " Jōzai Corp " into "JÅ\u008dzai Corp" ... " added " during conversion of JsonNode to JWT" |
22:00:54 | * | adium quit (Quit: Stable ZNC by #bnc4you) |
22:01:28 | * | duuude quit (Ping timeout: 248 seconds) |
22:07:53 | FromDiscord | <Ruby fan.rb> is nim fast, like jvm fast |
22:08:07 | FromDiscord | <Yardanico> In reply to @Ruby fan.rb "is nim fast, like": its usually like "jvm faster" |
22:08:13 | FromDiscord | <Ruby fan.rb> In reply to @Yardanico "its usually like "jvm": what! |
22:08:17 | FromDiscord | <Yardanico> that! |
22:08:20 | rb | depends on the backend i suppose |
22:08:21 | FromDiscord | <Ruby fan.rb> i thought that java was the fastest programming language ever |
22:08:31 | FromDiscord | <Yardanico> In reply to @Ruby fan.rb "i thought that java": for jokes go to #memes or #offtopic |
22:08:39 | FromDiscord | <Ruby fan.rb> im definetly learning this! |
22:08:59 | FromDiscord | <Ruby fan.rb> In reply to @Yardanico "for jokes go to": dont know how thats relevant to what i was saying but ok |
22:09:12 | FromDiscord | <Yardanico> because it very much looks like you were joking |
22:09:39 | FromDiscord | <Ruby fan.rb> In reply to @Yardanico "because it very much": Why would I joke about that |
22:09:50 | FromDiscord | <Ruby fan.rb> my teacher told me that java was the fastest programming language ever |
22:11:37 | FromDiscord | <konsumlamm> your teacher lied |
22:13:32 | FromDiscord | <Ruby fan.rb> In reply to @konsumlamm "your teacher lied": why would he do that |
22:14:14 | FromDiscord | <Yardanico> still experimenting with mimalloc, and I'm baffled that for some reason _statically_ linked mimalloc is like 10x slower |
22:14:22 | FromDiscord | <Yardanico> than with dynamic linking |
22:14:32 | FromDiscord | <Recruit_main707> so that you didnt go on a year long search for the fastest programming language and just settled with java |
22:14:46 | FromDiscord | <konsumlamm> idk why anyone would say that java is the fastestlanguage ever |
22:14:55 | FromDiscord | <konsumlamm> but it's definitely not true |
22:16:06 | FromDiscord | <Ruby fan.rb> In reply to @Recruit_main707 "so that you didnt": well if java isnt the fastest programming language, then what is |
22:16:26 | FromDiscord | <Yardanico> i still think that @Ruby fan.rb is just joking around |
22:16:27 | FromDiscord | <Recruit_main707> fastest is a very hard title to defend, but generally c is considered the fastest high level programming language, some people defend assembly is faster, but its low level, and others directly say optimizing compilers are better than humans optimizng code |
22:17:15 | FromDiscord | <Ruby fan.rb> In reply to @Recruit_main707 "fastest is a very": oh ok |
22:17:20 | FromDiscord | <Recruit_main707> so, the usual answer is c, but its not always true for all cases |
22:18:06 | FromDiscord | <Ruby fan.rb> In reply to @Recruit_main707 "so, the usual answer": wait so what could possibly be faster than the fastest programming language |
22:19:32 | FromDiscord | <dom96> Holy C obviously |
22:19:45 | FromDiscord | <Recruit_main707> aka based C |
22:19:48 | FromDiscord | <Ruby fan.rb> In reply to @dom96 "Holy C obviously": but he just said thats the fastest language |
22:19:54 | FromDiscord | <Ruby fan.rb> c cant be faster than c |
22:20:43 | FromDiscord | <Recruit_main707> holy c is not c |
22:20:48 | FromDiscord | <-|-> Holy C is holier than normal C |
22:21:20 | FromDiscord | <treeform> In reply to @Isofruit "Before I invest another": Sounds like a json issue not a jwt, create a minimum example. I have not run into this. |
22:23:28 | FromDiscord | <Recruit_main707> @Ruby fan.rb for instance, check this benchmark of different languages implementing the same algorithm, any decent language without much or any runtime bloat will be capable of performing as good as possible, the rest is about how you implement stuff↵https://plummerssoftwarellc.github.io/PrimeView/report?id=rbergen-1650948878.json&hi=False&hf=False&hp=False&fi=&fp=mt&fa=wh~ot&ff=uf&fb=uk~ot&tp=False&sc=pp&sd=True |
22:25:51 | * | ehmry quit (Ping timeout: 256 seconds) |
22:27:17 | FromDiscord | <treeform> In reply to @Ruby fan.rb "wait so what could": Obviously hand-rolled-assembly done by a very good assembly programmer using the best algorithm would the theoretically fastest. But it just take so much to do assembly well its almost never worth it. |
22:27:29 | * | rez quit (Quit: l8r) |
22:27:38 | * | lumo_e quit (Quit: Quit) |
22:29:17 | FromDiscord | <treeform> normal JAVA can't be the fastest because it has compacting GC which had double indirection! |
22:30:22 | FromDiscord | <treeform> Java also does not allow you to have use fully stack based data structures, it loves stuff on the heap. |
22:30:45 | FromDiscord | <treeform> (edit) "had" => "has" |
22:30:54 | FromDiscord | <treeform> (edit) removed "have" |
22:30:56 | FromDiscord | <Sway.rb> speaking of java |
22:31:04 | FromDiscord | <Sway.rb> java implementation of OO in #offtopic |
22:31:12 | FromDiscord | <Sway.rb> but for ruby |
22:35:00 | FromDiscord | <morgan> 😬 kekistani flag |
22:40:48 | FromDiscord | <morgan> (basically 4chan's edit of nazi symbolism replacing the swastika with ks and adding a 4chan logo) |
22:40:58 | FromDiscord | <morgan> https://media.discordapp.net/attachments/371759389889003532/969367647152136252/unknown.png |
22:43:11 | FromDiscord | <exelotl> that's a yikes from me |
22:43:22 | FromDiscord | <morgan> yeppppp |
22:43:59 | * | firq quit (Ping timeout: 240 seconds) |
22:44:23 | FromDiscord | <morgan> and iirc 14 (in his bio) is a dogwhistle referring to 14 words i think, from some old bit of nazi stuff |
22:45:36 | FromDiscord | <morgan> often followed by 88 which means replace with the 8th letter of the alphabet and remember back to when you learned about ww2 and stuff nazis said that was two words starting with the same letter |
22:46:16 | FromDiscord | <Yardanico> In reply to @MorganAlyssa "and iirc 14 (in": can you stop trying to find nazi stuff everywhere? |
22:46:20 | FromDiscord | <Yardanico> and it's just 14 in his bio without the 88 |
22:46:33 | FromDiscord | <Yardanico> i don't think you should judge the person based on that they used a flag of a fictional country |
22:46:39 | FromDiscord | <Yardanico> would you judge them if they had pepe as their profile picture? |
22:46:46 | FromDiscord | <Yardanico> because some people think it's "nazi" too |
22:48:07 | FromDiscord | <morgan> https://www.splcenter.org/hatewatch/2017/08/12/flags-and-other-symbols-used-far-right-groups-charlottesville literally the second image on their list https://media.discordapp.net/attachments/371759389889003532/969369449935298610/unknown.png |
22:48:35 | FromDiscord | <Yardanico> I still don't see why you brought that up |
22:48:56 | FromDiscord | <Yardanico> also discussions like these are much more suitable for #offtopic rather than #main |
22:49:01 | FromDiscord | <Recruit_main707> lol the 14 is because of Fernando Alonso but ok bro |
22:49:21 | FromDiscord | <morgan> sent a long message, see http://ix.io/3WwF |
22:49:59 | FromDiscord | <Yardanico> again, can you stop copy-pasting random text and explain the actual problem? |
22:51:01 | FromDiscord | <morgan> that text literally explains it |
22:51:16 | FromDiscord | <Yardanico> it doesn't explain to me why did you mention that in this server |
22:52:02 | FromDiscord | <morgan> the point is that if you allow nazis in a space, it will push out lots of reasonable people, and the nazis will bring their friends, and by the time you realize it's a problem it's too late, the space has become a nazi space |
22:52:36 | FromDiscord | <-|-> but there's no definitive proof he's a nazi |
22:52:41 | FromDiscord | <Yardanico> Sorry, from my standpoint this flag is just a meme flag of a fictional country and doesn't show that the person is a "nazi" |
22:52:55 | FromDiscord | <-|-> the flag isn't a literal swastika |
22:53:00 | FromDiscord | <Recruit_main707> i wish i had time to debate why im not a nazi but i have better things to do |
22:53:11 | FromDiscord | <-|-> and i see no triple parentheses or "heil hitler" calls |
22:53:54 | FromDiscord | <Yardanico> In reply to @MorganAlyssa "the point is that": Also, Recruit has been around on this server for far much than you were, and they didn't bring any "nazi friends" |
22:54:26 | * | ehmry joined #nim |
22:56:24 | FromDiscord | <Recruit_main707> but as a simple point, i guess everyone using this as a pfp, or an stalin one for the matter is a dangerous person that wants homosexuals to be put into gulags, i wont ellaborate more, i have a lot to study, but yeah, its just a meme flag of a fictional country https://media.discordapp.net/attachments/371759389889003532/969371531396399165/unknown.png |
22:57:13 | FromDiscord | <hmmm> In reply to @Recruit_main707 "i wish i had": rm707 is a bro and not a nazi |
22:57:39 | FromDiscord | <⎝⪩﹏⪨⎠> Well, I guess I'll install choosenim until the issue with OpenSSL is fixed. |
23:08:01 | * | adium joined #nim |
23:14:17 | FromDiscord | <Alea> person with pronoun website in bio joins server, immediately starts calling long-time user nazis, elaborates way too much↵seems on brand :EmotiCool: |
23:14:46 | FromDiscord | <ElegantBeef> Yall need jesus |
23:15:03 | FromDiscord | <Yardanico> ok at least I found out why mimalloc was slow when statically compiled |
23:15:10 | FromDiscord | <Yardanico> that's because it has default asserts so you need to pass -DNDEBUG |
23:15:12 | FromDiscord | <Recruit_main707> In reply to @ElegantBeef "Yall need jesus": trust me i need him very hard right now |
23:15:37 | FromDiscord | <ElegantBeef> Like everyone can everyone fuck off with all the accusations for 1 minute 😄 |
23:15:44 | FromDiscord | <ElegantBeef> (edit) removed "everyone" |
23:16:02 | FromDiscord | <Alea> and please use the programming server for programming discussions |
23:16:16 | FromDiscord | <ElegantBeef> Hey you dog piled so you dont get to comment |
23:16:27 | FromDiscord | <Alea> fair :pepenod: |
23:17:07 | FromDiscord | <Alea> anyway I'm gonna try and recreate the dividing issue again |
23:18:56 | FromDiscord | <Alea> ok I must be doing something wrong https://media.discordapp.net/attachments/371759389889003532/969377205727674368/unknown.png https://media.discordapp.net/attachments/371759389889003532/969377205991931964/unknown.png |
23:19:16 | FromDiscord | <Recruit_main707> `type`missing |
23:19:16 | FromDiscord | <ElegantBeef> No type |
23:19:26 | FromDiscord | <ElegantBeef> Shut up you fucking nazi! 😛 |
23:19:43 | FromDiscord | <Recruit_main707> cant argue with such an structed argument |
23:20:09 | FromDiscord | <Alea> ah shit that's it, treeform declared a ton of types at once so the thing was way up above |
23:22:01 | FromDiscord | <Alea> there we go: https://play.nim-lang.org/#ix=3WwH |
23:22:43 | FromDiscord | <Alea> It seems to be an issue between mixing float32 and float64, but a) why does that throw an error about mutability on on div, b) why aren't they similar enough types? |
23:24:11 | FromDiscord | <Alea> ig I'll just have to type cast it, but weird that = doesn't need it |
23:25:06 | FromDiscord | <ElegantBeef> Odd that the implicit type conversion is not mutable for float64 |
23:25:48 | FromDiscord | <Alea> I see that it's because = mixes all 3 types, but /= has 2 different variants not mixing types https://media.discordapp.net/attachments/371759389889003532/969378930979127346/unknown.png |
23:26:02 | FromDiscord | <ElegantBeef> Yea the difference is it lacks the `float64` it seems |
23:26:15 | FromDiscord | <Alea> weird choice why |
23:26:32 | FromDiscord | <Recruit_main707> wasnt float the same as float64 now anyways? |
23:26:42 | FromDiscord | <ElegantBeef> Yea it is |
23:27:12 | FromDiscord | <Alea> maybe I'll make a forum post about it |
23:27:40 | FromDiscord | <ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=3WwI |
23:27:55 | FromDiscord | <Alea> :hmmNoted: |
23:28:08 | FromDiscord | <Alea> nim once again being a willy beast |
23:51:54 | FromDiscord | <Yardanico> yeah, mimalloc is fast |
23:51:54 | FromDiscord | <Yardanico> like fast fast |
23:52:14 | FromDiscord | <Yardanico> for `--threads:on` with ARC/ORC it's the best solution if you want to retain non-`threads:on` performance |
23:52:32 | FromDiscord | <Yardanico> by speed it goes like this: |
23:53:18 | FromDiscord | <Yardanico> `--mm:orc --threads:on` < `--mm:orc --threads:on -d:useMalloc` (so it uses glibc's malloc in my case) < `--mm:orc --threads:on -d:useMalloc` with mimalloc - from worst to best performance |
23:53:32 | FromDiscord | <Yardanico> funny thing is that `--mm:orc` is slower than useMalloc with mimalloc |