00:27:38 | * | blackbeard420 quit (Quit: ZNC 1.8.2 - https://znc.in) |
00:27:57 | * | blackbeard420 joined #nim |
00:36:55 | FromDiscord | <codic> is there a way in std to iterate over all files in a given directory (recursively ideally) |
00:37:16 | * | stefantalpalaru joined #nim |
00:37:17 | FromDiscord | <ElegantBeef> `walkdirrec` |
00:37:24 | FromDiscord | <ElegantBeef> Should be in os |
00:37:26 | * | stefantalpalaru quit (Changing host) |
00:37:26 | * | stefantalpalaru joined #nim |
00:42:51 | * | blackbeard420 quit (Quit: ZNC 1.8.2 - https://znc.in) |
00:57:17 | * | ZoomZoomZoom quit (Ping timeout: 240 seconds) |
01:17:58 | * | lain quit (Quit: kthxbai) |
01:32:32 | * | arkurious quit (Quit: Leaving) |
01:35:05 | * | arecaceae quit (Remote host closed the connection) |
01:53:36 | FromDiscord | <Avahe> Bridge down? |
01:54:15 | * | hpyc9 quit (Quit: 420) |
01:54:38 | FromDiscord | <ElegantBeef> Maybe irc -> discord |
01:54:51 | FromDiscord | <Avahe> I think freenode just stood up a new server |
01:59:13 | FromDiscord | <ElegantBeef> I can pretend to agree to that |
02:03:46 | FromDiscord | <Avahe> hm? They did |
02:03:55 | FromDiscord | <Avahe> i just got on the new one |
02:04:31 | FromDiscord | <ElegantBeef> Prestige mistaking my comments for sincere doubt, shame |
02:05:23 | FromDiscord | <Avahe> for some reason we all have to register our accounts and channels again |
02:05:28 | FromDiscord | <codic> freenode will hopefully all die soon |
02:05:36 | FromDiscord | <codic> yeah the korean prince guy has all the old data |
02:05:45 | FromDiscord | <ElegantBeef> Yea cant wait for paidnode to take off |
02:05:49 | FromDiscord | <codic> not the in-exile freenode staff which moved it to librechat |
02:05:54 | FromDiscord | <codic> In reply to @ElegantBeef "Yea cant wait for": 👍 |
02:16:25 | * | rockcavera quit (Remote host closed the connection) |
02:17:36 | FromDiscord | <deech> I maybe missing this but what is the default initialization value for a `proc`? |
02:17:47 | FromDiscord | <ElegantBeef> nil |
02:18:16 | FromDiscord | <ElegantBeef> Procs are pointers in nim as such they're nilable |
02:20:27 | * | rockcavera joined #nim |
02:27:18 | FromDiscord | <brainproxy> In reply to @brainproxy "weird thing... There's": fwiw, this turned out to be a matter of (w.r.t. the summary-example I used above), accidentally masking `var a {.threadvar.}` with a `let a` inside a proc where the compound let statement was spread across several lines and it just wasn't easy to spot the masking. |
02:27:54 | FromDiscord | <brainproxy> with `a =` dedented two spaces, everything worked wonderfully and as expected |
02:28:28 | FromDiscord | <brainproxy> (edit) "expected" => "expected." |
02:29:16 | FromDiscord | <brainproxy> somtimes whitespace delimiting is awesome... other times it gives me longings for a curl-braced dialect as a compile-time option 😿 😄 |
02:29:56 | FromDiscord | <ElegantBeef> rainbow indentation + indention lines |
02:29:56 | FromDiscord | <Rika> A braced version would not save you from your error |
02:31:14 | FromDiscord | <brainproxy> In reply to @ElegantBeef "rainbow indentation + indention": is there such a thing in Emacs running in a terminal? wherein my being resides... always |
02:31:24 | FromDiscord | <Rika> Sure why not |
02:31:34 | FromDiscord | <Rika> Terminals have coloured support |
02:32:08 | FromDiscord | <ElegantBeef> Yea i dont see why not, indention lines can just be `|` and yea they can render an indent as a coloured block char if the bg cannot be set for an empty char |
02:32:16 | FromDiscord | <ElegantBeef> I know the indention line i have for my vim |
02:32:17 | FromDiscord | <brainproxy> I meant... do I have to write it myself 🤪 |
02:32:34 | FromDiscord | <Rika> Likely |
02:32:37 | FromDiscord | <Rika> Oh |
02:32:41 | FromDiscord | <Rika> Misread |
02:32:43 | FromDiscord | <ElegantBeef> https://github.com/DarthFennec/highlight-indent-guides |
02:32:43 | FromDiscord | <Rika> Likely not |
02:32:57 | FromDiscord | <ElegantBeef> https://github.com/funkenblatt/rainbow-indent |
02:33:15 | FromDiscord | <Rika> I seriously don’t think a braced language would have saved you from that either |
02:33:29 | FromDiscord | <brainproxy> In reply to @Rika "I seriously don’t think": it's a good point, trying to think of why it would |
02:33:51 | FromDiscord | <brainproxy> coming mostly from a JS / lisp POV (in the latter would be a matter of parens, of course) |
02:34:02 | FromDiscord | <Rika> You’d still need to look for the matching braces, which usually is an extra feature |
02:34:13 | FromDiscord | <Rika> For the text editor |
02:34:14 | FromDiscord | <ElegantBeef> I think it's generally easy to blame things aside from yourself |
02:34:30 | FromDiscord | <ElegantBeef> Just say the sun was in your eyes and carry on |
02:34:57 | FromDiscord | <brainproxy> oh, I definitely blame myself, just feeling the 🔥 of wasting as much time as I did on this |
02:35:16 | FromDiscord | <ElegantBeef> If you dont waste time with stupid things are you even programming |
02:35:17 | FromDiscord | <brainproxy> otoh, wondering aloud if there's a way to make it easier to spot |
02:35:28 | FromDiscord | <Rika> To make what easier to spot |
02:35:28 | FromDiscord | <brainproxy> In reply to @ElegantBeef "If you dont waste": wisdom |
02:35:31 | FromDiscord | <Rika> Braces? |
02:35:55 | FromDiscord | <ElegantBeef> Eh they bitched and moaned and now know about indention guides + rainbow 😄 |
02:36:09 | FromDiscord | <ElegantBeef> So now it's certainly their own fault |
02:37:33 | FromDiscord | <brainproxy> rainbow parens are nice, love 'em when I'm doing lisp/racket/etc..... sadly so little these days |
02:38:04 | FromDiscord | <Rika> I don’t use guides and rainbow |
02:38:05 | FromDiscord | <brainproxy> but Nim is awesome, actually thinking hard about why it was so easy to trip on this |
02:38:09 | FromDiscord | <Rika> I usually use folds |
02:38:21 | FromDiscord | <brainproxy> what editor do you use? |
02:38:36 | FromDiscord | <Rika> Neovim |
02:38:49 | FromDiscord | <ElegantBeef> I generally avoid folds |
02:39:07 | FromDiscord | <Rika> What why they’re so nice |
02:39:16 | FromDiscord | <Rika> Helps you focus on what you want |
02:39:31 | FromDiscord | <brainproxy> Cool. Emacs has folds too, I think, but I'm (at my own fault) stuck with patterns/practices that have become familiar, guess I need to start thinking out of the box |
02:39:35 | FromDiscord | <Rika> Hides the shitty code someone else made |
02:39:48 | FromDiscord | <brainproxy> In reply to @Rika "Neovim": Cool. Emacs has folds too, I think, but I'm (at my own fault) stuck with patterns/practices that have become familiar, guess I need to start thinking out of the box |
02:40:03 | FromDiscord | <Rika> Okay, that’s fine, it’s common |
02:40:14 | FromDiscord | <ElegantBeef> I occasionally use them when there is a lot of noise, but i dislike having code hidden from me 😄 |
02:40:34 | FromDiscord | <Rika> Odd thing to dislike but ok |
02:41:30 | FromDiscord | <brainproxy> if had folds as an occasional tool I reach for when things are going weirdly wrong, that probably would have saved me today, much faster than just luckily–eventually noticing the inadvertent two extra spaces before `a = ...` |
02:41:38 | FromDiscord | <brainproxy> (edit) "as" => "was" |
02:41:54 | FromDiscord | <brainproxy> food for thought, for me, anyway |
02:42:34 | * | icebattle quit (Quit: leaving) |
02:42:41 | FromDiscord | <Rika> Well if you used it regularly you’d also notice some part of the code goes missing when it’s not supposed to so |
02:46:58 | FromDiscord | <ElegantBeef> Or if you used the fancy indention stuff you'd notice that it wasnt colour properly |
02:47:15 | FromDiscord | <ElegantBeef> Finally if you just didnt write code you'd never have had this issue to begin with |
02:48:50 | FromDiscord | <Rika> I don’t recognise color well so I don’t use rainbow indentations lol |
02:48:57 | FromDiscord | <brainproxy> sent a code paste, see https://play.nim-lang.org/#ix=3pZf |
02:49:23 | FromDiscord | <brainproxy> (edit) "https://play.nim-lang.org/#ix=3pZf" => "https://play.nim-lang.org/#ix=3pZg" |
02:50:15 | FromDiscord | <ElegantBeef> Or dont do that |
02:50:44 | FromDiscord | <Rika> In reply to @brainproxy "Or maybe I'll just": Why would that help? |
02:50:56 | FromDiscord | <ElegantBeef> Well the issue was due to using block let, they aliased a variable in the block |
02:51:36 | FromDiscord | <ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=3pZh |
02:51:41 | FromDiscord | <brainproxy> because it was a `blah =` in the last `...` in the second code example of my code above was that accidentally indented into the let block |
02:51:48 | FromDiscord | <Rika> Then that’s just you being fuckin blind isn’t it |
02:51:52 | FromDiscord | <brainproxy> In reply to @Rika "Why would that help?": because it was a `blah =` in the last `...` in the second code example of my code above was that accidentally indented into the let block |
02:51:58 | FromDiscord | <ElegantBeef> Indeed |
02:52:22 | FromDiscord | <brainproxy> In reply to @Rika "Then that’s just you": yeah....... I guess, but still I struggled to spot it. |
02:52:36 | FromDiscord | <brainproxy> not "I guess", it was |
02:52:38 | FromDiscord | <Rika> Aren’t there shadowing warnings as well? |
02:52:50 | FromDiscord | <Rika> If not maybe that’s a good idea |
02:53:49 | FromDiscord | <brainproxy> I'll check later if there were shadowing warnings, maybe there were! something good to look or |
02:54:04 | FromDiscord | <brainproxy> (edit) "warnings," => "warnings (by reproducing my error)," | "or" => "for" |
02:54:14 | FromDiscord | <ElegantBeef> I dont think there is |
02:54:53 | FromDiscord | <Rika> Well maybe shadowing should be more explicit |
02:55:26 | FromDiscord | <ElegantBeef> Eh i think a hint of shadowing that can be turned into an error is better |
02:55:43 | FromDiscord | <Rika> And if you have shadows that are intended? |
02:55:59 | FromDiscord | <Rika> But want the error |
02:56:02 | FromDiscord | <ElegantBeef> Well i personally wouldnt have the hint on |
02:56:03 | FromDiscord | <brainproxy> maybe okay, still could have been a helpful clue to me today |
02:56:29 | FromDiscord | <ElegantBeef> Something more explict like `let a {.shadowed.} = 100` just seems annoying |
02:58:17 | FromDiscord | <Rika> Well it should probably be as you said hint as error, but also be able to be disabled per variable |
02:58:28 | FromDiscord | <Rika> Now get working on it beef lol |
02:58:31 | FromDiscord | <Rika> I kid |
02:58:31 | FromDiscord | <brainproxy> right, a mechanism to pint it down |
02:58:40 | FromDiscord | <Rika> To what? |
02:58:44 | FromDiscord | <brainproxy> (edit) "pint" => "pin" | "down" => "down, in dire straits" |
02:58:49 | FromDiscord | <Rika> Is this a beer joke I don’t understand |
02:58:59 | FromDiscord | <brainproxy> typo, long day 🤪 |
02:59:22 | FromDiscord | <Rika> Yeah nowadays for the north hemisphere the days are long indeed |
02:59:26 | FromDiscord | <brainproxy> plus vindo |
02:59:31 | FromDiscord | <brainproxy> (edit) "vindo" => "vino" |
02:59:53 | FromDiscord | <Rika> I don’t know what vino is other than it means something in Esperanto probably |
03:00:26 | FromDiscord | <brainproxy> Italian |
03:01:12 | FromDiscord | <brainproxy> anyway, late here, thanks for the feedback, quite helpful, for thinking outside the box I sometimes pack myself into |
03:33:45 | * | joast quit (Quit: Leaving.) |
03:43:42 | * | spiderstew quit (Ping timeout: 260 seconds) |
03:51:50 | FromDiscord | <fenrave> choosenim forgot to add the path variables to my .profile, what were the commands for it? |
03:57:15 | FromDiscord | <fenrave> ah nevermind |
03:57:22 | FromDiscord | <fenrave> just had to remember how bash worked |
03:58:10 | FromDiscord | <fenrave> for future reference to anyone who can't run any nim related commands, this is how you set up the path variable https://media.discordapp.net/attachments/371759389889003532/854208134121127936/unknown.png |
03:58:22 | FromDiscord | <fenrave> god speed to all who search in discord for the answer |
04:08:32 | * | rockcavera quit (Remote host closed the connection) |
05:38:09 | FromDiscord | <codic> how do I define a packed struct in nim? |
05:45:01 | FromDiscord | <ElegantBeef> @codic https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-bitsize-pragma and align i assume, though i'm a numpty that doesnt know what "packed struct" actually means 😄 |
05:45:56 | FromDiscord | <codic> a packed struct is one where there is no padding between the elements, not a bitfield |
05:46:08 | FromDiscord | <codic> in c/c++ there is only compiler specific attributes no proper way to do it |
05:46:13 | FromDiscord | <codic> https://nim-lang.org/docs/manual.html#foreign-function-interface-packed-pragma oh here |
05:46:34 | FromDiscord | <codic> ok that's fine I don't need to define a packed struct which would use gc'd memory, just bind to one |
06:23:30 | FromDiscord | <codic> sent a code paste, see https://play.nim-lang.org/#ix=3pZQ |
06:24:41 | FromDiscord | <codic> sent a code paste, see https://play.nim-lang.org/#ix=3pZR |
06:24:58 | FromDiscord | <codic> cuz it works |
06:25:02 | FromDiscord | <codic> but idk if im relying on u |
06:25:03 | FromDiscord | <codic> (edit) "u" => "ub" |
06:25:30 | FromDiscord | <codic> ig its not if nim structs compile directly to C ones without adding anything else |
06:30:19 | FromDiscord | <Rika> They do I believe |
06:30:51 | FromDiscord | <codic> should be fine then |
06:34:51 | FromDiscord | <codic> sent a code paste, see https://play.nim-lang.org/#ix=3pZT |
06:35:15 | FromDiscord | <Rika> No |
06:37:14 | FromDiscord | <codic> using `{.experimental: "codeReordering".}` works, i very much wish it was default because i really want to develop with it |
06:45:10 | FromDiscord | <Rika> It is not stable and may cause unexpected effects |
06:47:41 | FromDiscord | <codic> yeah ill just do the former |
06:47:57 | FromDiscord | <ElegantBeef> Plus there is even debate whether it should exist 😛 |
06:48:29 | FromDiscord | <codic> forward declarations are bad bad bad |
06:48:36 | FromDiscord | <codic> tho i realize it might be hard to implement a good one |
06:48:47 | FromDiscord | <codic> (edit) "one" => "lookahead algorithm" |
06:50:59 | FromDiscord | <ElegantBeef> I mean they're somewhat annoying but atleast the code only has one flow 😄 |
07:18:47 | * | clemens3 quit (*.net *.split) |
07:49:38 | * | planetis[m] left #nim (#nim) |
07:50:05 | * | planetis[m] joined #nim |
08:11:01 | FromDiscord | <Clonkk> https://media.discordapp.net/attachments/371759389889003532/854271763734986752/Screenshot_from_2021-06-15_10-09-55.png |
08:11:06 | FromDiscord | <Clonkk> Nim suggest being itself again |
08:11:44 | FromDiscord | <Clonkk> At least 30 process of over 200 MiB of RAM each |
08:22:04 | FromDiscord | <ElegantBeef> Properly organized project? |
08:22:27 | FromDiscord | <Clonkk> Typical Nimble package with say, ~10 files |
08:22:32 | FromDiscord | <Clonkk> less than 1k loc |
08:22:37 | FromDiscord | <ElegantBeef> Are you using saems extension? |
08:22:55 | FromDiscord | <Clonkk> On Onivim2, yes |
08:23:05 | FromDiscord | <ElegantBeef> I more just mean is there a single entry or have you setup the project paths if there is more than one |
08:24:51 | FromDiscord | <Clonkk> I don't know, I just openend the project as usual. Computer was getting slow, fan started blowing I was just able to take this screenshot before having to maunally reboot |
08:26:02 | FromDiscord | <ElegantBeef> Generally speaking i dont think the extension dispatches more than a single instance of nimsuggest unless the project isnt setup "properly", is it a open project? |
08:27:16 | FromDiscord | <ElegantBeef> by open i mean open source of course |
08:27:28 | FromDiscord | <Clonkk> No it is not open source. I don't use projects setup (compile everything in command line). There's no setup to do. I just use the extension for auto completion and highlighting |
08:28:07 | FromDiscord | <ElegantBeef> That's my point though, if the project isnt setup properly as in single entry and the extension doesnt know that it goes a little haywire with the nimsuggest instances |
08:28:47 | FromDiscord | <ElegantBeef> I could be wrong about the cause of this, but just spreading what it might be |
08:32:13 | FromDiscord | <haxscramper> It seems like IRC bot died along with all the freenode, but discord → matrix, gitter → matrix is working fine |
08:33:19 | FromDiscord | <ElegantBeef> Yea freenode axed all users/servers |
08:33:40 | FromDiscord | <ElegantBeef> As such the irc bridge to libera or w/e is also dead since it was hosted on freenode |
08:36:50 | FromDiscord | <Rika> In reply to @ElegantBeef "Yea freenode axed all": What lol |
08:37:32 | FromDiscord | <ElegantBeef> https://www.reddit.com/r/linux/comments/o0263h/all_freenode_channels_and_users_gone/ atleast according to this |
08:42:01 | FromDiscord | <Rika> yeah i read |
08:45:58 | FromDiscord | <Clonkk> In reply to @ElegantBeef "I could be wrong": Could also be related to Onivim itself, it had an error message in logs regarding the extension, I opened an issue on the Onivim repo |
08:46:12 | FromDiscord | <Clonkk> Can't reproduce ith VSCOdium 🙂 |
08:46:13 | FromDiscord | <Rainbow Asteroids> they killed freenode entirely now? |
08:46:20 | FromDiscord | <Rika> yes |
08:46:23 | FromDiscord | <Rainbow Asteroids> why |
08:46:42 | FromDiscord | <Rika> because rasengan thought it was needed |
08:46:48 | FromDiscord | <ElegantBeef> Ah sounds good then, do you have the issue still where autocomplete inserts another character? |
08:47:06 | FromDiscord | <ElegantBeef> Couldnt use it anymore because of that just too annoying to have to go back to the first character and delete it |
08:47:56 | FromDiscord | <Clonkk> In reply to @ElegantBeef "Ah sounds good then,": Eh, no I don't have this one. Just nimsuggest go crazy sometimes. It's not even systematic |
08:48:24 | FromDiscord | <Clonkk> I switch back and forth between onivim and neovim |
08:48:30 | FromDiscord | <Clonkk> (edit) "I switch back and forth between onivim and neovim ... " added "anyway" |
08:52:40 | FromDiscord | <ElegantBeef> I cannot get around to setting up nvim to my liking so just avoid using vim 😄 |
08:52:56 | FromDiscord | <Rika> what? |
08:52:59 | FromDiscord | <Rika> how? |
08:53:41 | FromDiscord | <ElegantBeef> What do you mean |
08:54:15 | FromDiscord | <Rika> arent you already using vim or something |
08:54:19 | FromDiscord | <Rika> you just copy the configs |
08:54:31 | FromDiscord | <ElegantBeef> Nah i default to vscode, and was testing out onivim2 |
08:55:04 | FromDiscord | <ElegantBeef> onivim2 isnt actually vim, it does graphical rendering and has a vscode like gui |
08:55:11 | FromDiscord | <Rika> smh, fucking numpties |
08:55:21 | FromDiscord | <ElegantBeef> Indeed |
08:55:28 | FromDiscord | <Rika> even then would the configs not be the same? |
08:55:37 | FromDiscord | <ElegantBeef> Nope it supports vscode extensions |
08:56:16 | FromDiscord | <Rika> eh |
08:56:37 | FromDiscord | <ElegantBeef> just to show what onivim has 😄 https://media.discordapp.net/attachments/371759389889003532/854283238029393934/unknown.png |
08:58:03 | FromDiscord | <Rika> e h h |
09:03:14 | FromDiscord | <mlokis> sent a code paste, see https://play.nim-lang.org/#ix=3q0y |
09:06:12 | FromDiscord | <mlokis> at this point my game is randomly crashing at different places, guess i cannot use threads after all |
09:07:25 | FromDiscord | <System64 ~ Flandre Scarlet> I want to try something↵Is it possible to generate sound with the PC beeper with Nim? |
09:09:24 | FromDiscord | <ElegantBeef> Fairly certain it's not possible to do that with anything but your motherboards firmware, and it'd be odd if you could |
09:09:43 | FromDiscord | <ElegantBeef> So probably technically yes, but practically no |
09:10:09 | FromDiscord | <Rainbow Asteroids> why use onivim of nvim |
09:10:28 | FromDiscord | <Rainbow Asteroids> (edit) "of" => "over" |
09:11:16 | FromDiscord | <ElegantBeef> Vscode extensions, gui rendered, easier to setup |
09:13:38 | FromDiscord | <mlokis> when nim runtime is crashing its maybe best to give up on threads |
09:14:02 | FromDiscord | <ElegantBeef> Or find a minimal reproduction and make an issue 😄 |
09:14:22 | FromDiscord | <mlokis> its really vierd though |
09:14:47 | FromDiscord | <mlokis> when i stress test it in minimal environment it works |
09:15:02 | FromDiscord | <mlokis> worst thing is that its a data race problem |
09:15:19 | FromDiscord | <ElegantBeef> How are you sharing the object, just casting gcsafe? |
09:15:25 | FromDiscord | <mlokis> no |
09:18:24 | FromDiscord | <mlokis> In reply to @ElegantBeef "How are you sharing": compiler is not complaining about my code. All i em doing is sharing state between threads. I would expect my code crashes because of data race but problem is not in my logic. Stacktrace always points to some internal runtime code |
09:19:00 | FromDiscord | <ElegantBeef> Yea i know it's not, i was just curious about how you were going about it and how the data race was introduced |
09:21:34 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @ElegantBeef "just to show what": What's your theme? I like it |
09:21:40 | FromDiscord | <ElegantBeef> Ayu-mirage |
09:21:46 | FromDiscord | <System64 ~ Flandre Scarlet> Thanks! |
09:21:59 | FromDiscord | <mlokis> sent a code paste, see https://play.nim-lang.org/#ix=3q0B |
09:22:33 | FromDiscord | <ElegantBeef> Yea i'm not interested in the underlying Nim code 😄 |
09:22:33 | FromDiscord | <mlokis> but i also happens on different places, seems like memory is freen on multiple places at the same time |
09:23:18 | FromDiscord | <mlokis> (edit) "freen" => "freed" |
09:23:50 | FromDiscord | <mlokis> should i ask Araq? |
09:23:54 | * | zopsi joined #nim |
09:26:05 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @ElegantBeef "Fairly certain it's not": I did it in C https://media.discordapp.net/attachments/371759389889003532/854290658695839744/beep.exe |
09:26:33 | FromDiscord | <ElegantBeef> Ah yes a random binary for an OS i dont run |
09:26:44 | FromDiscord | <ElegantBeef> Well then you can do what ever you did in C in Nim |
09:27:19 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=3q0D |
09:27:37 | FromDiscord | <ElegantBeef> Why did you post that |
09:27:50 | FromDiscord | <ElegantBeef> That's longer than my display is tall and it's a portrait display |
09:27:57 | FromDiscord | <System64 ~ Flandre Scarlet> To show you how it's done↵Ah sorry |
09:28:14 | FromDiscord | <System64 ~ Flandre Scarlet> you prefer a pastebin / sending a text file? |
09:29:14 | FromDiscord | <Rika> prolly look into winim |
09:29:18 | FromDiscord | <Rainbow Asteroids> In reply to @System64 "I want to try": I know of `beep`, which is a program for Linux systems that does this. IDK much about windows tho. https://github.com/johnath/beep/ |
09:29:51 | FromDiscord | <ElegantBeef> A simple function doc would've been enough to show what it does |
09:30:01 | FromDiscord | <ElegantBeef> I'm rather surprised this is actually possible to be honest 😄 |
09:31:53 | FromDiscord | <Rainbow Asteroids> well, windows skipped version 9 to avoid breaking programs that were made for windows 95/98, so im not too suprised the kernel has code for the PC speaker |
09:31:57 | FromDiscord | <qqtop> sent a code paste, see https://play.nim-lang.org/#ix=3q0H |
09:33:28 | FromDiscord | <ElegantBeef> Well i'm just more suprised that the cpu can actually send a signal to it, would've figured no one would've connected to two 😄 |
09:33:45 | FromDiscord | <ElegantBeef> It's not an overly useful thing atleast in my view |
09:37:59 | FromDiscord | <Rainbow Asteroids> how else is the computer supposed to communicate to it :monkaHmm: |
09:42:47 | * | Yardanico joined #nim |
09:44:46 | * | skelett joined #nim |
09:50:04 | * | grobe0ba joined #nim |
09:53:12 | FromDiscord | <System64 ~ Flandre Scarlet> For me it's a sine wave |
09:59:24 | FromDiscord | <System64 ~ Flandre Scarlet> that's a deception↵I wanted a square wave |
10:00:17 | FromDiscord | <Rika> use lower level constructs then |
10:01:33 | FromDiscord | <System64 ~ Flandre Scarlet> what's that? |
10:14:55 | FromDiscord | <mlokis> the bug was actually on my side |
10:15:03 | FromDiscord | <mlokis> thank god |
10:18:29 | FromDiscord | <Rainbow Asteroids> lower level constructs, as in constructs that are lower level, so implement the square wave stuff yourself with libraries that let you access the beeper |
10:19:13 | FromDiscord | <Rainbow Asteroids> (edit) "lower level constructs, as in constructs that are lower level, so implement the square wave stuff yourself with libraries that let you ... access" added "directly" |
10:21:29 | * | ebb joined #nim |
10:31:01 | FromDiscord | <System64 ~ Flandre Scarlet> https://github.com/johnnovak/nim-riff↵Is it normal I can't nimble install that? |
10:38:06 | * | xet7 quit (Quit: Leaving) |
10:41:39 | FromDiscord | <pointystick> I couldn't see that package on the main Nimble directory. Perhaps he hasn't published it? I was able to install it using the URL: ↵↵nimble install https://github.com/johnnovak/nim-riff |
10:44:07 | FromDiscord | <System64 ~ Flandre Scarlet> ah I can do that |
11:40:05 | FromDiscord | <shirleyquirk> @mlokis it could be a bug in arc but you're using unsafe `ptr` so much everywhere its hard to say. a MRE if you can would be excellent, either so someone can fix the bug in arc or can help fix the bug in your code. |
11:40:28 | FromDiscord | <mlokis> In reply to @shirleyquirk "<@343028072095809536> it could be": no i fixed the issue |
11:40:33 | FromDiscord | <mlokis> it was my fault |
11:40:38 | FromDiscord | <shirleyquirk> sweet! what was it? |
11:41:10 | FromDiscord | <mlokis> well i thought i don't have to allocate channels on shared heap since i em using arc |
11:41:36 | FromDiscord | <mlokis> but it seams i have to at least allocate them manually |
11:41:48 | FromDiscord | <mlokis> (edit) "seams" => "seems" |
11:43:34 | FromDiscord | <shirleyquirk> ah, so they don't get collected by the gc. still seems like something that should work, but glad you found a workaround |
11:44:20 | FromDiscord | <mlokis> In reply to @shirleyquirk "ah, so they don't": no they just do not work properly whe not allocated |
11:44:51 | FromDiscord | <mlokis> memory leaks do not crash your program with that kind of error |
11:45:06 | FromDiscord | <shirleyquirk> double free's do, am i miles off? |
11:45:20 | FromDiscord | <shirleyquirk> sorry, use-after-free |
11:46:29 | FromDiscord | <mlokis> i was reusing same channels for duration of program |
11:47:33 | FromDiscord | <shirleyquirk> i was hypothesizing that they were `=destroy`ed prematurely |
11:47:49 | FromDiscord | <mlokis> maybe |
11:49:51 | FromDiscord | <Zachary Carter> It's never good news when your program also crashes dr. memory |
13:00:40 | FromDiscord | <System64 ~ Flandre Scarlet> If I a question about rounding↵If the decimals are above 0.5, alright I round up↵if the decimals are under 0.5, alright I round down↵But what if the decimals are 0.5? |
13:02:26 | FromDiscord | <Rika> up |
13:02:33 | FromDiscord | <Rika> usually up |
13:03:04 | FromDiscord | <System64 ~ Flandre Scarlet> alright |
13:08:25 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=3q1R |
13:08:54 | FromDiscord | <Rika> complicated |
13:09:19 | FromDiscord | <haxscramper> There is a round in stdlib, you can just truncate results from `int` to `uint16` |
13:10:07 | FromDiscord | <System64 ~ Flandre Scarlet> oh alright, and this rounding up or down depending if it's over x.5 or under x.5? |
13:10:42 | FromDiscord | <mlokis> use floor and ceil |
13:12:42 | FromDiscord | <mlokis> sent a code paste, see https://play.nim-lang.org/#ix=3q1T |
13:13:15 | FromDiscord | <mlokis> (edit) "https://play.nim-lang.org/#ix=3q1T" => "https://play.nim-lang.org/#ix=3q1U" |
13:13:25 | FromDiscord | <mlokis> you get the idea |
13:13:28 | FromDiscord | <mlokis> (edit) "https://play.nim-lang.org/#ix=3q1U" => "https://play.nim-lang.org/#ix=3q1V" |
13:13:41 | FromDiscord | <System64 ~ Flandre Scarlet> isn't it a.uint16 at the end? |
13:14:03 | FromDiscord | <mlokis> no |
13:14:09 | FromDiscord | <mlokis> why? |
13:14:31 | FromDiscord | <mlokis> i em returning implicitly |
13:14:54 | FromDiscord | <System64 ~ Flandre Scarlet> Ah I see |
13:15:41 | FromDiscord | <System64 ~ Flandre Scarlet> and a.round() floor by default? |
13:15:57 | FromDiscord | <mlokis> round rounds |
13:16:15 | FromDiscord | <mlokis> it cuts the decimal |
13:16:22 | FromDiscord | <System64 ~ Flandre Scarlet> ah yeah so floor |
13:16:35 | FromDiscord | <mlokis> you can use floor if you want |
13:18:42 | FromDiscord | <System64 ~ Flandre Scarlet> https://media.discordapp.net/attachments/371759389889003532/854349195904942110/unknown.png |
13:20:19 | FromDiscord | <haxscramper> `round` is in `math` |
13:20:43 | FromDiscord | <haxscramper> You can use search in the nim docs to figure out where function comes from |
13:21:01 | FromDiscord | <System64 ~ Flandre Scarlet> alright |
13:42:09 | FromDiscord | <Zachary Carter> app verifier on windows is a godsend |
13:42:20 | FromDiscord | <Zachary Carter> (edit) "godsend" => "god send" |
13:42:45 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=3q26 |
13:50:40 | FromDiscord | <shirleyquirk> if you start with uint, stick with int math. If you want 4 most significant bits of a uint, that's a `shr` |
13:51:28 | FromDiscord | <System64 ~ Flandre Scarlet> what does it mean? |
13:55:54 | FromDiscord | <shirleyquirk> hmm. Maybe I walked into something I can't handle. |
13:58:12 | FromDiscord | <Rika> quantize just means "value / max_value_for_bytesize = value_new / max_value_for_new_bytesize" |
13:58:48 | FromDiscord | <System64 ~ Flandre Scarlet> yeah |
13:59:01 | FromDiscord | <Rika> In reply to @Rika "quantize just means "value": oops, max + 1 actually |
13:59:07 | FromDiscord | <Rika> wait no, no +1 |
14:00:21 | FromDiscord | <Rika> so (round(a.float/uint16.high16)) i guess? |
14:00:52 | FromDiscord | <Rika> no clamp needed |
14:01:19 | FromDiscord | <System64 ~ Flandre Scarlet> what is clamp? Sorry I usually speak french |
14:02:33 | FromDiscord | <shirleyquirk> limiter? Keep values within a range |
14:02:55 | FromDiscord | <System64 ~ Flandre Scarlet> ah yeah |
14:03:27 | FromDiscord | <System64 ~ Flandre Scarlet> isn't it ((round(a.float/uint16.high)16))? |
14:04:06 | FromDiscord | <shirleyquirk> It's the same while you're using floats |
14:05:40 | FromDiscord | <Zachary Carter> that won't work |
14:06:09 | FromDiscord | <Zachary Carter> `((round(a.float/uint16.high.float)16))` probably |
14:06:23 | FromDiscord | <Zachary Carter> if you want to divide integers use `div` not `/` |
14:08:25 | FromDiscord | <Rika> why round over the percentage? that will give literal 0 or 1 |
14:08:31 | FromDiscord | <Rika> you do it once you multiply from 16 |
14:08:52 | FromDiscord | <Rika> i forgot the bridge is down |
14:10:40 | FromDiscord | <Rika> https://media.discordapp.net/attachments/371759389889003532/854362273619771422/unknown.png |
14:14:14 | FromDiscord | <System64 ~ Flandre Scarlet> You just converted to 1-bit |
14:15:04 | FromDiscord | <Rika> i did not |
14:15:35 | FromDiscord | <Rika> https://media.discordapp.net/attachments/371759389889003532/854363510284222474/unknown.png |
14:15:40 | FromDiscord | <Rika> the OTHER one |
14:15:42 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://paste.rs/pJS |
14:15:51 | FromDiscord | <Rika> zach converted to one bit |
14:20:53 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Rika "so (round(a.float/uint16.high*16)) i guess?": That? |
14:21:20 | FromDiscord | <Rika> ((round(a.float/uint16.high.float16))) |
14:21:36 | FromDiscord | <Rika> (edit) "((round(a.float/uint16.high.float16)))" => "round(a.float/uint16.high.float16)" |
14:22:32 | FromDiscord | <Rika> ah fuck wait |
14:22:33 | FromDiscord | <Rika> 15 |
14:23:07 | FromDiscord | <Rika> a.float/uint16.high.float == 1↵a.float/uint16.high.float 16 == 16 # wrong |
14:23:15 | FromDiscord | <Rika> so its `round(a.float/uint16.high.float15)` |
14:25:14 | FromDiscord | <Zachary Carter> sent a long message, see http://ix.io/3q2b |
14:31:06 | FromDiscord | <System64 ~ Flandre Scarlet> It's already more accurate but |
14:31:13 | FromDiscord | <System64 ~ Flandre Scarlet> it's signed |
14:32:54 | FromDiscord | <Rika> what do you mean? |
14:33:31 | FromDiscord | <Rika> a cannot be negative -> a.float cannot be negative -> a.float/uint16.high.float cannot be negative -> etc.etc. -> the whole expression is never negative |
14:33:55 | FromDiscord | <System64 ~ Flandre Scarlet> I'll inspect what's happened |
14:35:19 | FromDiscord | <System64 ~ Flandre Scarlet> Ah it's fixed I just had to add 128 to the result |
14:35:49 | FromDiscord | <Rika> what? why? |
14:46:30 | FromDiscord | <mlokis> @System64 ~ Flandre Scarlet are you like doing your homework or something |
14:48:22 | FromDiscord | <Zachary Carter> In reply to @Zachary Carter "I think I found": here's the bug report: https://github.com/nim-lang/Nim/issues/18271 |
14:53:54 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @mlokis "<@!380360389377916939> are you": No just for fun |
14:54:15 | FromDiscord | <System64 ~ Flandre Scarlet> Like a challenge for myself |
14:55:35 | FromDiscord | <mlokis> In reply to @System64 "Like a challenge for": You want a challenge ha? Make a quicksort then. |
14:55:56 | FromDiscord | <System64 ~ Flandre Scarlet> I didn't learned that sort lol |
14:55:57 | FromDiscord | <mlokis> its not that hard but not too easy |
14:56:14 | FromDiscord | <mlokis> then just learn it, its usefull |
14:56:25 | FromDiscord | <mlokis> or binary search thats simpler |
14:56:26 | FromDiscord | <System64 ~ Flandre Scarlet> I'll check it |
14:56:44 | FromDiscord | <System64 ~ Flandre Scarlet> Ah didn't learned binary search |
14:57:24 | FromDiscord | <mlokis> or you can visit leetcode they have lot of coding challenges |
14:58:17 | FromDiscord | <System64 ~ Flandre Scarlet> Oh I should check it↵I want to make a Danmaku engine too |
14:58:29 | FromDiscord | <mlokis> what is that? |
14:58:36 | FromDiscord | <System64 ~ Flandre Scarlet> Bullet hell |
14:59:05 | FromDiscord | <System64 ~ Flandre Scarlet> Like Touhou Project |
14:59:56 | FromDiscord | <mlokis> i see, well that should be easy. its all just angles and hacks |
15:00:44 | FromDiscord | <System64 ~ Flandre Scarlet> I think using vectors is a good idea |
15:01:21 | FromDiscord | <mlokis> what else for a love of god would you use, complex numbers? |
15:01:51 | FromDiscord | <System64 ~ Flandre Scarlet> By vectors I meant the ones you use in physics |
15:02:03 | FromDiscord | <Rika> arent complex numbers still vector |
15:02:04 | FromDiscord | <Rika> s |
15:02:17 | FromDiscord | <mlokis> thats a joke he did not get |
15:02:45 | FromDiscord | <mlokis> poor joke though |
15:02:58 | FromDiscord | <Rika> not a lot of people know that complex numbers can be vectors... |
15:03:23 | FromDiscord | <mlokis> In reply to @Rika "not a lot of": its really sad |
15:03:35 | FromDiscord | <Rika> its pretty handy |
15:03:39 | FromDiscord | <Rika> to know, i mean |
15:03:52 | FromDiscord | <mlokis> no whole concept of complex numbers is useles |
15:04:10 | FromDiscord | <mlokis> the `i` exists just so you cannot add app that numbers |
15:04:11 | * | johnnynitwits quit (Read error: Connection reset by peer) |
15:04:20 | FromDiscord | <mlokis> (edit) "app" => "up" |
15:04:41 | FromDiscord | <System64 ~ Flandre Scarlet> But if you have a better idea, don't hésitate to suggest |
15:04:44 | FromDiscord | <mlokis> i feel like complex numbers are just reinvention of vectors |
15:05:13 | FromDiscord | <InventorMatt> I believe complex numbers came before vectors |
15:05:22 | FromDiscord | <mlokis> not really |
15:05:30 | FromDiscord | <mlokis> vector is an axiom |
15:05:35 | FromDiscord | <mlokis> thats really old |
15:05:54 | FromDiscord | <System64 ~ Flandre Scarlet> In physics, a move vector is described by a direction and speed (by the lenght of the vector) |
15:06:28 | FromDiscord | <mlokis> vector can be described in multiple wais |
15:06:51 | FromDiscord | <mlokis> `x y` or `angle length` |
15:06:59 | FromDiscord | <System64 ~ Flandre Scarlet> and that's why I was thinking to vectors↵To describe the direction of the bullet and the speed of it |
15:07:13 | FromDiscord | <mlokis> you can easily convert between the two but it is rather costy calculation |
15:07:27 | FromDiscord | <InventorMatt> Even quaternions are older than vectors as we know them. It's why in the 1800s alot of physics was described using quaternions |
15:07:29 | FromDiscord | <mlokis> in game you usually need both |
15:07:51 | FromDiscord | <System64 ~ Flandre Scarlet> I should check how a bullet hell is built |
15:08:04 | FromDiscord | <mlokis> its very simple |
15:08:19 | FromDiscord | <mlokis> you have 3 axioms i can think off |
15:08:24 | FromDiscord | <mlokis> bullet source |
15:08:27 | FromDiscord | <mlokis> bullets |
15:08:29 | FromDiscord | <mlokis> player |
15:08:53 | * | blackbeard420 joined #nim |
15:09:02 | FromDiscord | <mlokis> all you have to define is rendering collision detection and phizics |
15:09:24 | FromDiscord | <mlokis> phyzics are simple as all you need is linear movement |
15:09:40 | FromDiscord | <System64 ~ Flandre Scarlet> for the player I can just use X and Y movement |
15:10:02 | FromDiscord | <System64 ~ Flandre Scarlet> for the bullet source too |
15:11:13 | FromDiscord | <mlokis> sent a code paste, see https://play.nim-lang.org/#ix=3q2B |
15:11:15 | * | blackbeard420 quit (Client Quit) |
15:11:36 | FromDiscord | <mlokis> you could also add a texture data |
15:11:54 | FromDiscord | <mlokis> but its lot better to use ecs |
15:12:06 | FromDiscord | <mlokis> it makes things simpler and faster |
15:12:31 | FromDiscord | <System64 ~ Flandre Scarlet> Oh that's not so hard I guess |
15:12:58 | FromDiscord | <mlokis> i have to publish my ecs library |
15:13:09 | FromDiscord | <mlokis> you can use it if you want |
15:13:15 | FromDiscord | <System64 ~ Flandre Scarlet> what is ECS? for textures? |
15:13:34 | FromDiscord | <mlokis> no its a EntityComponentSystem |
15:13:41 | * | teasea quit (Quit: teasea) |
15:13:51 | FromDiscord | <mlokis> for example |
15:14:03 | FromDiscord | <mlokis> both bullet player and turret |
15:14:08 | FromDiscord | <mlokis> can be drawn |
15:14:20 | FromDiscord | <mlokis> so you can make texture component |
15:14:28 | FromDiscord | <mlokis> all tree have a position |
15:14:37 | FromDiscord | <mlokis> this is a position component |
15:14:59 | FromDiscord | <mlokis> each entity that has both position and texture can be drawn |
15:15:39 | FromDiscord | <mlokis> what ecs does is that it allows you to define one logic for all entities with given components |
15:16:32 | FromDiscord | <mlokis> you can read about all this on internet btw |
15:17:00 | FromDiscord | <System64 ~ Flandre Scarlet> Oh seem interesting↵Did you already gamedev? |
15:19:17 | FromDiscord | <mlokis> i made one kid of complete game but newer made any money so maybe |
15:19:27 | FromDiscord | <mlokis> (edit) "kid" => "kind" |
15:19:42 | FromDiscord | <System64 ~ Flandre Scarlet> I want to make games |
15:19:50 | FromDiscord | <mlokis> so do them |
15:20:13 | FromDiscord | <System64 ~ Flandre Scarlet> I already made a platformer prototype on GameMaker Studio |
15:20:22 | FromDiscord | <mlokis> but if a would recomend you something dont do it in nim from the beginning |
15:20:49 | FromDiscord | <mlokis> In reply to @System64 "I already made a": is see so you made some games |
15:21:01 | FromDiscord | <System64 ~ Flandre Scarlet> Why and which language should I use? |
15:21:05 | FromDiscord | <mlokis> i also made platformer as my first game |
15:21:08 | FromDiscord | <Rika> the one you already know |
15:21:41 | FromDiscord | <mlokis> when i was starting i used python but then i changed to dodot engine |
15:21:46 | FromDiscord | <mlokis> (edit) "dodot" => "godot" |
15:21:51 | FromDiscord | <System64 ~ Flandre Scarlet> I know Java well and I have a bit of experience with C#↵C# is a pretty good language for games |
15:21:58 | FromDiscord | <mlokis> godot engine is really good but slow |
15:22:12 | FromDiscord | <System64 ~ Flandre Scarlet> 'cause of interpreted language? |
15:22:40 | FromDiscord | <mlokis> yes, its written in c++ but it uses python like scripting langiuage |
15:22:53 | FromDiscord | <mlokis> good enough for most of the games |
15:22:59 | FromDiscord | <System64 ~ Flandre Scarlet> I'm feared of C++ |
15:23:25 | FromDiscord | <mlokis> you normalid dont use c++ when wirting games in godot |
15:23:39 | FromDiscord | <mlokis> only if you want to add custom plugins and stuff |
15:24:07 | FromDiscord | <System64 ~ Flandre Scarlet> The reason why I'm feared of C++ is 'cause of this demonic thing called Pointer |
15:24:24 | FromDiscord | <mlokis> and what do you think nim has |
15:24:34 | FromDiscord | <mlokis> it also has them |
15:24:54 | FromDiscord | <System64 ~ Flandre Scarlet> they're not as necessary as in C, and I find them more explicits |
15:25:48 | FromDiscord | <haxscramper> pointers are the least scary thing in C++ |
15:26:26 | FromDiscord | <mlokis> C++ is just big pile of shit that will be compiling for days |
15:26:40 | FromDiscord | <mlokis> because of poor design decisions |
15:26:56 | FromDiscord | <mlokis> if you want to use something, then use zig |
15:27:07 | FromDiscord | <System64 ~ Flandre Scarlet> is it a programming language? |
15:27:13 | FromDiscord | <mlokis> yes |
15:27:37 | FromDiscord | <VesperSparrow> In reply to @System64 "is it a programming": no, it is superset. |
15:28:00 | FromDiscord | <mlokis> In reply to @VesperSparrow "no, it is superset.": oh no you call you serpent zig |
15:28:26 | FromDiscord | <mlokis> fuck |
15:28:36 | FromDiscord | <haxscramper> I don't think Zig is a superset of anything, even C, and I don't think it qualifies as C++ replacement either way |
15:28:40 | FromDiscord | <Zachary Carter> In reply to @mlokis "C++ is just big": huh? |
15:28:41 | FromDiscord | <mlokis> my dislexi got me |
15:28:59 | FromDiscord | <System64 ~ Flandre Scarlet> I'm interested in Python too but I'm worried about its slowness |
15:29:49 | FromDiscord | <Zachary Carter> also did you say pointers aren't necessary in C? |
15:29:51 | FromDiscord | <mlokis> In reply to @Zachary Carter "huh?": i em joking of course but language is so overfeatured that the compile time can get to an hour |
15:30:25 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Zachary Carter "also did you say": They are necessary in C |
15:30:39 | FromDiscord | <haxscramper> well, C without raw pointers is just ... what? |
15:30:41 | FromDiscord | <Zachary Carter> compile times can be long in any language if you're doing stupid shit |
15:30:59 | FromDiscord | <Zachary Carter> C++ compile times are long, but there are ways to alleviate that |
15:31:12 | FromDiscord | <haxscramper> like bying more servers |
15:31:14 | FromDiscord | <leorize> you don't have to do stupid things for compile time to be long in nim :p |
15:31:18 | FromDiscord | <Zachary Carter> Zig isn't even really comparable to C++ though. It's meant to be a C replacement. |
15:32:08 | FromDiscord | <mlokis> yes but i still consider it better then cpp |
15:32:11 | FromDiscord | <VesperSparrow> What is Zig? |
15:32:12 | FromDiscord | <Zachary Carter> So I wouldn't tell someone not to use C++ and to just use Zig instead, because it doesn't really make much sense? |
15:32:31 | FromDiscord | <Zachary Carter> then you probably consider C better than C++ |
15:32:36 | FromDiscord | <Zachary Carter> and this is all subjective |
15:32:44 | FromDiscord | <leorize> In reply to @VesperSparrow "What is Zig?": ziglang.org |
15:33:06 | FromDiscord | <Zachary Carter> the fact is, Zig is much simpler than C++ |
15:33:09 | FromDiscord | <Zachary Carter> by design |
15:33:17 | FromDiscord | <Zachary Carter> C++ is popular for a reason |
15:33:23 | FromDiscord | <mlokis> i like simplicity |
15:33:26 | FromDiscord | <Zachary Carter> Well that's cool |
15:33:45 | FromDiscord | <Zachary Carter> but I wouldn't compare apples to oranges and tell someone that wants an orange to go eat an apple 🙂 |
15:34:06 | FromDiscord | <Zachary Carter> Zig is great, especially zigcc |
15:34:15 | FromDiscord | <Zachary Carter> but I don't think C++ developers are jumping ship to Zig anytime soon |
15:34:19 | FromDiscord | <Zachary Carter> or like, ever |
15:34:39 | FromDiscord | <Zachary Carter> maybe C++ will get a zig backend |
15:34:46 | FromDiscord | <Zachary Carter> some c++ compiler |
15:35:11 | FromDiscord | <Zachary Carter> but they're just not on the same level of abstraction |
15:35:12 | FromDiscord | <VesperSparrow> like rust oh. |
15:35:35 | FromDiscord | <Zachary Carter> I don't know what Rust has to do with this haha |
15:35:40 | FromDiscord | <System64 ~ Flandre Scarlet> Nim is compiled to C and after compiled to binary right? |
15:35:49 | FromDiscord | <mlokis> rust is safe, but sometimes safeness is not efficiency |
15:35:55 | FromDiscord | <Zachary Carter> Nim is compiled to C or C++ or Objective-C or JavaScript |
15:36:26 | FromDiscord | <Zachary Carter> if it's compiled to C or C++ or Objective-C it will invoke a compiler for one of those languages after compiling the Nim code to the specified language |
15:36:29 | FromDiscord | <mlokis> i mean rust sometimes disalows both |
15:36:50 | FromDiscord | <Zachary Carter> you can of course override the compiler |
15:37:07 | FromDiscord | <Zachary Carter> so, for instance, you can compile Nim code to C and then invoke zigcc and target another platform |
15:37:31 | FromDiscord | <System64 ~ Flandre Scarlet> and can I change the compiler?↵Using TCC instead of GCC for exemple |
15:37:44 | FromDiscord | <Recruit_main707> ys |
15:37:49 | FromDiscord | <VesperSparrow> Hey, I was just talking about Zig's syntax. |
15:37:53 | FromDiscord | <Recruit_main707> --cc:[compiler] |
15:38:08 | FromDiscord | <Recruit_main707> write something random and a list of compilers will appear |
15:38:16 | FromDiscord | <VesperSparrow> None of these languages have a clean, self-explanatory syntax.↵I pass Golang alone. |
15:38:23 | FromDiscord | <Zachary Carter> In reply to @VesperSparrow "Hey, I was just": I don't think Rust and Zig's syntax are at all alike |
15:38:23 | FromDiscord | <Rika> zig rust go nim d, theyre all languages for different folk |
15:39:10 | FromDiscord | <mlokis> In reply to @VesperSparrow "None of these languages": golang is love |
15:39:30 | FromDiscord | <Zachary Carter> minus generics |
15:39:34 | FromDiscord | <VesperSparrow> I'm just talking about syntax.↵What I'm using the language for is out of context. |
15:39:42 | FromDiscord | <mlokis> but it will get less simple after generics |
15:39:44 | FromDiscord | <Zachary Carter> I dislike golang personally |
15:40:00 | FromDiscord | <Rika> simple does not mean good |
15:40:01 | FromDiscord | <Zachary Carter> yeah, well parametric polymorphism is nice |
15:40:11 | FromDiscord | <Rika> simple usually means repetition |
15:40:28 | FromDiscord | <System64 ~ Flandre Scarlet> do you like Java? |
15:40:39 | FromDiscord | <Rika> yeah its simple, yeah you can read the code at a glance, you have to read a lot of code though |
15:40:46 | FromDiscord | <mlokis> In reply to @System64 "do you like Java?": 💩 |
15:41:06 | FromDiscord | <Zachary Carter> this is all kind of #off-topic just FYI |
15:41:43 | FromDiscord | <Zachary Carter> (edit) "#off-topic" => "#offtopic" |
15:42:05 | FromDiscord | <Zachary Carter> can have your language holy wars there 🙂 |
15:42:20 | FromDiscord | <System64 ~ Flandre Scarlet> Let's go there! |
15:51:23 | FromDiscord | <VesperSparrow> Does Nim have destruction for objects? |
15:51:45 | FromDiscord | <leorize> yes |
15:52:05 | FromDiscord | <leorize> via a mechanism called destructors: http://nim-lang.github.io/Nim/destructors.html |
15:52:40 | FromDiscord | <leorize> though I'd note that only when used with `--gc:orc` or `--gc:arc` would it be reliable |
16:24:13 | * | willyboar joined #nim |
16:44:49 | FromDiscord | <codic> https://github.com/nim-lang/Nim/blob/devel/compiler/ccgliterals.nim#L15 interesting, seqs need some language support? |
16:46:48 | FromDiscord | <haxscramper> For literal creation |
16:48:19 | FromDiscord | <codic> so if I wanted to implement my own data structure I couldn't use this syntax? `var x: data[T] = [a,b,c]` |
16:48:32 | FromDiscord | <codic> id have to do `var x: data[T] = data(a,b,c)` or something? |
16:49:44 | FromDiscord | <haxscramper> BTW `@` is an operator, not a special syntax, so you can do `@![a, b, c]` |
16:50:17 | FromDiscord | <haxscramper> But in general I don't think you can implement `var x: <T> = not <T>` |
16:50:47 | FromDiscord | <haxscramper> Just as you can' implement `=(x: var T, other: not T)` |
16:50:57 | FromDiscord | <haxscramper> (edit) "can'" => "can't" |
16:52:05 | FromDiscord | <haxscramper> But this is a language design choice I think - `Error: signature for '=' must be proc[T: object](x: var T; y: T)` |
16:58:14 | FromDiscord | <codic> oh i see |
16:58:20 | FromDiscord | <codic> but @! is possible? |
16:58:28 | FromDiscord | <codic> what's `!` doing? |
17:00:30 | FromDiscord | <haxscramper> Just as an example, you can create ``func `@@@@@@@@@@@@@`(elements: openarray[T])``if you need |
17:00:47 | FromDiscord | <haxscramper> Or ``func `@!`(`` |
17:02:29 | FromDiscord | <haxscramper> I mean in `let a: seq[int] = @[1,2,3]` only `[1,2,3]` part cannot be changed, but you are free to write your own shorthand prefix operator and then use it `let a: data[T] = @$[a,b,c]` |
17:19:44 | * | willyboar quit () |
19:31:55 | * | save_freenode joined #nim |
19:32:08 | * | save_freenode left #nim ("Leaving") |
19:38:18 | * | NimBot joined #nim |
19:38:23 | * | crem joined #nim |
19:38:24 | * | voltist joined #nim |
19:38:24 | * | xace joined #nim |
19:39:33 | * | zopsi joined #nim |
19:40:16 | * | stefantalpalaru joined #nim |
19:40:39 | * | zopsi quit (Connection closed) |
19:41:46 | * | skelett joined #nim |
19:41:49 | * | dom96 joined #nim |
20:05:08 | * | Zevv joined #nim |
20:05:49 | * | zsoltiv quit (Client exited) |
20:06:53 | * | ebb joined #nim |
20:07:30 | * | Zevv left #nim ("WeeChat 3.0.1") |
20:20:51 | * | Willyboar[m] left #nim (#nim) |
20:21:59 | * | Q-Master joined #nim |
20:22:09 | * | Onionhammer6 joined #nim |
20:22:13 | * | EastByte joined #nim |
20:22:18 | * | letto joined #nim |
20:22:19 | * | kitech1 joined #nim |
20:22:25 | * | kaliy joined #nim |
20:22:33 | * | Cthalupa joined #nim |
23:12:54 | * | NimBot joined #nim |