00:10:02 | PMunch | @ambient, I have written a macro in Nim which reads BMP files and used them for sprites and levels on the Arduboy (Arduino Leonardo based) |
00:10:37 | PMunch | So reading files in at compile-time and generating the required arrays is indeed a good solution for micro-controller programming |
00:11:21 | PMunch | rockcavera, well there has been a bigger focus on stability and fixing stuff instead of introducing too many new features |
00:11:37 | PMunch | I don't think development has slowed down, but it has changed to a less visible focus |
00:13:10 | rockcavera | i don't see that many fixes. |
00:18:20 | FromDiscord | <xflywind> Yeah, the number of commit is lower than last. |
00:18:34 | FromDiscord | <xflywind> (edit) "last." => "that of last year." |
00:18:38 | FromDiscord | <xflywind> https://media.discordapp.net/attachments/371759389889003532/969754617804095549/unknown.png |
00:21:57 | FromDiscord | <xflywind> I think Nim needs more helper from the community. Imo the main reason why the number of commits descreased is that timothercour has been inactive since 1.6.0 is released. |
00:27:01 | PMunch | Well not everything you do with programming leads to a great amount of commits or lines |
00:33:29 | nrds | <Prestige99> My friend is writing code on windows and when --app:gui is defined, there's no output to the terminal where the application was launched. Is there a way to have both? |
00:35:56 | PMunch | Don't define that switch? |
00:36:06 | PMunch | Isn't that switch only to hide the terminal output on Windows? |
00:37:26 | nrds | <Prestige99> Well it opens like a second terminal window. but if you're running code with `nim r` from a terminal, there's other output but no output from "echo" |
00:39:04 | PMunch | Other output? |
00:39:15 | nrds | <Prestige99> yeah like from the compiler |
00:39:22 | PMunch | Oh right |
00:39:44 | PMunch | To be honest I'm the wrong person to ask about this, haven't used a Windows machine in about 10 years |
00:40:49 | nrds | <Prestige99> Yeah I'm in the same boat |
00:41:18 | rockcavera | the answer has already been given, if you want to continue with the stdout output just don't compile with --app:gui |
00:41:52 | rockcavera | I use nim 99% of the time on Windows |
00:42:14 | nrds | <Prestige99> Then the other terminal window shows up, which I don't want |
00:43:26 | FromDiscord | <Rika> Then don’t open another terminal window? Where is the other one coming from even |
00:43:34 | nrds | <Prestige99> From nim I guess |
00:43:38 | rockcavera | as far as i can remember stdout is still in the same window it used "nim r" |
00:43:48 | nrds | <Prestige99> Only happens on windows |
00:44:16 | nrds | <Prestige99> No echo statements print if you use --app:gui |
00:44:22 | rockcavera | would you have an example code? |
00:44:50 | rockcavera | if you compile with --app:gui, echo won't print anything |
00:45:02 | nrds | <Prestige99> Yes that's the problem I'm having |
00:45:48 | rockcavera | so don't compile with --app:gui, as this is the expected behavior of echo |
00:46:29 | rockcavera | if you are compiling for debugging, don't use --app:gui |
00:46:49 | nrds | <Prestige99> But then how do I prevent another terminal from spawning? |
00:47:21 | rockcavera | now if you want to debug with --app:gui the operation of your program, create a log, send messages by msgbox from windows... |
00:47:48 | nrds | <Prestige99> don't know why nim is opening a terminal |
00:48:04 | rockcavera | depends on the code you are using |
00:48:29 | nrds | <Prestige99> is it not just a compiler flag? |
00:49:18 | rockcavera | are you saying that your program when compiled with --app:gui is opening a terminal in Windows that doesn't print anything with echo? |
00:49:46 | nrds | <Prestige99> no |
00:50:25 | nrds | <Prestige99> without --app:gui there's an external terminal launched, which I don't want. However, I get the output from `echo` in the terminal from which I started the code |
00:50:33 | nrds | <Prestige99> I just don't want that terminal nim is spawning |
00:51:31 | rockcavera | could you show the code? |
00:52:06 | * | PMunch quit (Quit: leaving) |
01:37:55 | * | Zectbumo quit (Remote host closed the connection) |
01:50:24 | * | vicecea quit (Remote host closed the connection) |
01:50:52 | * | vicecea joined #nim |
02:23:41 | * | noeontheend joined #nim |
02:25:21 | * | Zectbumo joined #nim |
02:27:38 | FromDiscord | <Phil> I just did a quick search but wanted to ask anyway on the off chance:↵Do we have a lib for stripping html tags out of text? |
02:28:04 | FromDiscord | <Elegantbeef> Parse it then get inner text |
02:28:18 | * | noeontheend quit (Ping timeout: 276 seconds) |
02:28:20 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/htmlparser.html#parseHtml%2Cstring 😄 |
02:40:49 | FromDiscord | <Phil> Ohhhh that worked really nicely! |
02:41:24 | * | duuude quit (Ping timeout: 240 seconds) |
02:41:41 | FromDiscord | <Elegantbeef> Weird how that works 😄 |
03:01:51 | * | arkurious quit (Quit: Leaving) |
03:03:53 | FromDiscord | <!Patitotective> In reply to @Isofruit "I just did a": i-i just removed everything inside `<>`... 💀 |
03:05:43 | FromDiscord | <Phil> In reply to @Patitotective "i-i just removed everything": I would like my users to not want to murder me simply because they chose to put something in between brackets |
03:05:52 | FromDiscord | <Phil> 😛 |
03:06:11 | FromDiscord | <!Patitotective> i guess, me too hehe |
03:06:23 | FromDiscord | <Elegantbeef> I dont think it's reasonable to do it without parsing but you may disagree |
03:25:48 | * | Zectbumo quit (Remote host closed the connection) |
03:34:09 | FromDiscord | <Phil> My lord it feels so good to be able to start getting to the point where I can test my frontend with my new backend |
03:34:21 | FromDiscord | <Phil> It's like formula 1 |
03:35:20 | FromDiscord | <Phil> Pages load so fast I locally manage to hit single digits in ms when compiled with d-release and lto flag. ↵Really looking forward to how that'll look once deployed |
03:51:07 | FromDiscord | <Elegantbeef> What GC? |
05:12:24 | * | slowButPresent quit (Quit: leaving) |
05:59:59 | * | rockcavera quit (Remote host closed the connection) |
06:13:06 | * | duuude joined #nim |
06:33:08 | FromDiscord | <SirElephant> how do i find if a string contains a particular character? |
06:33:50 | nrds | <Prestige99> maybe https://nim-lang.org/docs/strutils.html#contains%2Cstring%2Cset%5Bchar%5D |
06:34:04 | nrds | <Prestige99> just needs import strutils |
06:34:09 | FromDiscord | <huantian> or just `in` I think if you do that |
06:34:27 | FromDiscord | <Elegantbeef> That's for a set prestige |
06:34:51 | FromDiscord | <Elegantbeef> You dont need strutils for just a single character |
06:35:03 | nrds | <Prestige99> well nvm then :P |
06:40:34 | FromDiscord | <SirElephant> ok i got it |
06:40:37 | FromDiscord | <SirElephant> working |
06:41:13 | FromDiscord | <SirElephant> but now how do i replace the particular character(for eg. "a") with some other character |
06:41:21 | FromDiscord | <SirElephant> using a for loop? |
06:41:26 | FromDiscord | <Elegantbeef> replace |
06:41:30 | FromDiscord | <Elegantbeef> might need strutils |
06:41:36 | FromDiscord | <SirElephant> i have it |
06:42:00 | FromDiscord | <SirElephant> but i just want to replace the single char from a large string |
06:42:25 | FromDiscord | <SirElephant> for eg. "my name is idk" -> "my neme is idk" |
06:42:35 | FromDiscord | <SirElephant> notice i changed the a to e |
06:42:46 | FromDiscord | <SirElephant> i want to do that using nim |
06:42:57 | FromDiscord | <Elegantbeef> `myStre.replace('a', 'e')` |
06:45:01 | FromDiscord | <Elegantbeef> if you only want to change the first i'd be `myStr[myStr.find('a')] = 'e'` |
06:45:18 | FromDiscord | <SirElephant> lol didn't think it would be that easy |
06:47:31 | FromDiscord | <SirElephant> what does this error mean `cannot evaluate at compile time`? |
06:51:37 | FromDiscord | <SirElephant> sent a code paste, see https://paste.rs/PlQ |
06:52:28 | FromDiscord | <Yardanico> In reply to @SirElephant "this is the code": `case` only switches on constant values |
06:52:41 | FromDiscord | <SirElephant> so should i make input const? |
06:52:43 | FromDiscord | <Yardanico> your `of` branch has `input.contains("a")` which is a runtime value |
06:53:11 | FromDiscord | <Yardanico> In reply to @SirElephant "so should i make": no, `const` means a compile-time variable, so `readLine` then will also be executed at compile time (well in reality it wouldn't, because readLine doesn't work at compile time in Nim) |
06:53:17 | FromDiscord | <Yardanico> you should instead use `if` |
06:53:18 | FromDiscord | <SirElephant> yup |
06:53:46 | FromDiscord | <Yardanico> sent a code paste, see https://paste.rs/zo6 |
06:54:31 | FromDiscord | <Elegantbeef> you want `if` not `case of` |
06:54:34 | FromDiscord | <Elegantbeef> you also dont need the contains check |
06:56:51 | FromDiscord | <Yardanico> true |
07:08:54 | FromDiscord | <Is> In reply to @MorganAlyssa "and iirc 14 (in": you sounding like a schizzo not gonna lie |
07:09:06 | FromDiscord | <Is> you went to this kids profile and got him banned from some server |
07:09:39 | FromDiscord | <Is> literally no evidence that he is a nazi |
07:09:55 | FromDiscord | <morgan> you literally just joined to say that |
07:10:00 | FromDiscord | <Is> In reply to @MorganAlyssa "https://www.splcenter.org/hatewatch/2017/08/12/flag": there are articles online stating the OK hand sign is white supremacy |
07:10:15 | FromDiscord | <morgan> yeah it's a dogwhistle |
07:10:24 | FromDiscord | <Is> you mentioned it on the other server so i looked it up yes |
07:11:12 | FromDiscord | <Is> In reply to @MorganAlyssa "the point is that": you can say this about anybody though |
07:13:34 | FromDiscord | <kaletaa> In reply to @MorganAlyssa "https://www.splcenter.org/hatewatch/2017/08/12/flag": the problem with these sites is that they interpret complete jokes as reality and truth |
07:14:03 | FromDiscord | <kaletaa> In reply to @MorganAlyssa "and iirc 14 (in": take your meds |
07:28:01 | FromDiscord | <Is> In reply to @MorganAlyssa "> I was at": that entire story is a strawman |
07:28:10 | FromDiscord | <Is> are you trolling or serious |
07:28:18 | FromDiscord | <Solitude> guys, get the fuck out to offtopic |
07:28:26 | FromDiscord | <Solitude> this chat is for bullying newbs |
07:28:36 | FromDiscord | <Is> lol idc |
07:28:43 | FromDiscord | <Is> i dont evne know what nim is |
07:29:07 | FromDiscord | <Is> i would get banned for talking about it in the other server |
07:30:11 | FromDiscord | <Solitude> we really need a bot that ask for fizzbuzz in nim before allowing to write in main |
07:30:23 | FromDiscord | <Is> yup |
07:31:15 | FromDiscord | <morgan> In reply to @Is "i would get banned": yeah you would and that's why you came here to continue harassing me |
07:31:58 | FromDiscord | <Is> In reply to @MorganAlyssa "yeah you would and": u got some guy who seems to be well respected in this server to be banned in the other server for no real reason |
07:32:01 | FromDiscord | <Phil> In reply to @Elegantbeef "What GC?": Default so far |
07:32:11 | FromDiscord | <Is> you claim im harassing but you got someone banned for you political agenda |
07:32:30 | FromDiscord | <Elegantbeef> I wish we could go back to when the internet was pointless |
07:32:49 | FromDiscord | <Is> In reply to @Elegantbeef "I wish we could": never was |
07:33:06 | FromDiscord | <Is> it was invented by scientists to share reports or something |
07:33:10 | FromDiscord | <Elegantbeef> Well this conversation is, now please kindly sod off to offtopic |
07:33:28 | FromDiscord | <Is> https://tenor.com/view/trying-not-to-say-the-nword-spongebob-n-word-trying-memes-gif-23544688 |
07:34:53 | FromDiscord | <morgan> ~~maybe sod off to not saying anything~~ |
07:35:13 | FromDiscord | <Elegantbeef> ... ok |
07:36:39 | FromDiscord | <Is> In reply to @MorganAlyssa "~~maybe sod off to": that advice is more relevant to you than me |
07:36:48 | FromDiscord | <Elegantbeef> Phill will be nice to see if you get faster with arc/orc |
07:37:20 | FromDiscord | <Elegantbeef> The next person that doesnt talk about nim deserves atleast half their brain turned into mulch |
07:38:13 | FromDiscord | <Phil> <@&371760044473319454> We have people demonstratively refusing to move an offtopic debate to offtopic to the great annoyance of anyone in main chat that wants to actually talk about the language |
07:38:44 | FromDiscord | <Elegantbeef> Uh oh phill say buh bye to half your brain |
07:38:59 | FromDiscord | <Solitude> nim |
07:39:18 | FromDiscord | <Yardanico> @Is @morgan if you want to continue this discussion, go to #offtopic or better just get over it, I thought it was a done topic but apparently not |
07:39:30 | FromDiscord | <Phil> I barely got up from my second nap in a row, it was already mulch before you stated.↵Aaaaaaaanyway, I just tried with orc and deepcopy on flags |
07:39:35 | FromDiscord | <Yardanico> aaaaaaaaaaanyway |
07:39:37 | FromDiscord | <Is> i was already gone though |
07:40:04 | FromDiscord | <morgan> i've been ignoring this and interacting as little as possible |
07:40:18 | FromDiscord | <Yardanico> ok, so just move to #offtopic , you didn't have to respond to my previous message to start this discussion yet againb |
07:40:19 | FromDiscord | <Is> anyone want to tell me what nim is now |
07:40:19 | FromDiscord | <Yardanico> (edit) "againb" => "again" |
07:40:22 | FromDiscord | <Yardanico> In reply to @Is "anyone want to tell": a language |
07:40:24 | FromDiscord | <Yardanico> programming |
07:40:27 | FromDiscord | <Yardanico> clicky clicky keyboard |
07:40:35 | FromDiscord | <Yardanico> In reply to @Isofruit "I barely got up": so what was the result |
07:40:46 | FromDiscord | <Phil> I don't think it made things faster. That was on prologue 5.8 that xflywind earlier made explicitly for orc compilation |
07:41:03 | FromDiscord | <Phil> In reply to @Yardanico "so what was the": A young man is no high-speed train! My brain is barely awake! |
07:41:06 | FromDiscord | <Is> how is nim better than python |
07:41:14 | FromDiscord | <Solitude> In reply to @Is "how is nim better": its not shit |
07:41:18 | FromDiscord | <Yardanico> In reply to @Is "how is nim better": merely by the fact that it's compiled into native binaries |
07:41:22 | FromDiscord | <Yardanico> not interpreted |
07:41:34 | FromDiscord | <JSONBash> a good type system |
07:41:39 | FromDiscord | <Yardanico> while still being easy to write |
07:41:49 | FromDiscord | <Yardanico> basically performance/effort ratio is one of the highest out of all existing languages |
07:41:49 | FromDiscord | <Is> isnt python already easy to write |
07:42:01 | FromDiscord | <JSONBash> it is, but isnt fast |
07:42:04 | FromDiscord | <Yardanico> In reply to @Is "isnt python already easy": but it's slow and you can't make portable native binaries with it (so they won't bundle the whole interpreter) |
07:42:21 | FromDiscord | <Is> can nim do all python can do |
07:42:25 | FromDiscord | <Yardanico> yes, and more |
07:42:28 | FromDiscord | <Phil> In reply to @Is "isnt python already easy": You have never written a large python project where the non-enforcable duck-typing kicks your ass so hard you want to cry |
07:42:48 | FromDiscord | <Yardanico> In reply to @Is "can nim do all": python can't do kernel, driver, etc development |
07:42:50 | FromDiscord | <kaletaa> In reply to @Is "it was invented by": porn. it was invented for porn |
07:42:52 | FromDiscord | <Phil> The amount of errors that python forces you to experience at runtime and that you can't avoid is insane |
07:43:18 | * | Zectbumo joined #nim |
07:43:20 | FromDiscord | <Is> can nim be used to bot in runescape |
07:43:21 | FromDiscord | <Elegantbeef> Runtime errors are the best errors↵(@Phil) |
07:43:25 | FromDiscord | <kaletaa> In reply to @Is "can nim be used": probably |
07:43:35 | FromDiscord | <Elegantbeef> Imagine knowing ahead of time if there would be type errors, that's too easy |
07:43:49 | FromDiscord | <kaletaa> there's xdolib for x11, you can use that to emulate mouse movement and key presses |
07:43:58 | FromDiscord | <Phil> It's a contrast you only really notice when you write in a language with a more defensive compiler such as nim |
07:44:01 | FromDiscord | <Is> can it recognize images and stuff |
07:44:06 | FromDiscord | <JSONBash> beef uses python becuase he programs in hard mode |
07:44:08 | FromDiscord | <Yardanico> In reply to @Is "can it recognize images": you can use existing libraries like opencv |
07:44:10 | FromDiscord | <Is> lets say i want to click a certain item |
07:44:13 | FromDiscord | <Yardanico> In reply to @Is "lets say i want": yes |
07:44:21 | FromDiscord | <Is> damn damn |
07:44:22 | FromDiscord | <kaletaa> In reply to @Is "lets say i want": anything you can do in C and C++ you can do here |
07:44:23 | FromDiscord | <Elegantbeef> Lol like i'd ever write python↵(@JSONBash) |
07:44:26 | FromDiscord | <kaletaa> since it compiles to c/c++ |
07:44:32 | FromDiscord | <kaletaa> and some other useless languages like js |
07:44:35 | FromDiscord | <kaletaa> and objective c |
07:44:56 | FromDiscord | <Elegantbeef> Well the JS compilation isnt useless if you want to do webdev like a sadomasochist |
07:45:25 | FromDiscord | <JSONBash> @ElegantBeef I am sure at some point the nim code you have written was valid python code |
07:46:01 | FromDiscord | <Phil> Anyway, overall in terms of time, with limited testing, both orc and default gave me backends that respond generally in ~20-40 ms depending on the API endpoint.↵The one endpoint with endlesss scrolling that I hit repeatedly via frontend on default GC felt like it ran more often near the 10 ms mark and below, while the orc version more often ran near the 20ms mark |
07:46:12 | FromDiscord | <Solitude> In reply to @JSONBash "<@145405730571288577> I am sure": with yardanicos forbidden library, it for sure could |
07:46:34 | FromDiscord | <Phil> That is, locally on a machine with a pretty fast CPU; I expect that to slow down by a factor 3-4 or so once deployed. |
07:46:35 | FromDiscord | <Yardanico> In reply to @JSONBash "<@145405730571288577> I am sure": is this enough? |
07:46:36 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/969867349274542131/unknown.png |
07:46:49 | FromDiscord | <kaletaa> the best languages are those that unironically just slam you into the wall for the slightest error |
07:46:53 | FromDiscord | <kaletaa> at compile time |
07:46:54 | FromDiscord | <kaletaa> i love haskell |
07:46:58 | FromDiscord | <Yardanico> or maybe this? https://media.discordapp.net/attachments/371759389889003532/969867440878129182/unknown.png |
07:47:02 | FromDiscord | <Elegantbeef> Fuck off yard you even support stupid doc comments |
07:47:04 | FromDiscord | <Elegantbeef> I fucking hate you |
07:47:07 | FromDiscord | <Yardanico> lol |
07:47:13 | FromDiscord | <Yardanico> hey, it was really easy to support them |
07:47:13 | FromDiscord | <kaletaa> In reply to @Yardanico "or maybe this?": what the fuck |
07:47:17 | FromDiscord | <Yardanico> just triple quotes to nim doc comment |
07:47:17 | FromDiscord | <JSONBash> @Yardanico plz stop you're hurting me |
07:47:24 | FromDiscord | <Is> can nim be used on react |
07:47:34 | FromDiscord | <Yardanico> ReactOS? |
07:47:36 | FromDiscord | <kaletaa> In reply to @Is "can nim be used": if you compile to js |
07:47:37 | FromDiscord | <Phil> In reply to @Yardanico "just triple quotes to": Heresy! I need those for my raw SQL Statements! |
07:47:43 | FromDiscord | <Yardanico> https://github.com/Yardanico/nimpylib if you want to see man-made horrors beyond comprehension |
07:47:56 | FromDiscord | <Is> react is the front end thing |
07:48:05 | FromDiscord | <kaletaa> but i wouldn't recommend front end development with nim though |
07:48:05 | FromDiscord | <Elegantbeef> !ban @Yardanico for crimes against humanity |
07:48:07 | FromDiscord | <Is> In reply to @kaletaa "if you compile to": what does this mean |
07:48:09 | FromDiscord | <kaletaa> i wouldn't recommend front end in general |
07:48:13 | FromDiscord | <kaletaa> front end is painful |
07:48:18 | FromDiscord | <kaletaa> i'd rather shoot myself in the head |
07:48:26 | FromDiscord | <Is> i thought it was opposite |
07:48:28 | FromDiscord | <Elegantbeef> Eh tjere is karax for a VDOM library |
07:48:29 | FromDiscord | <Yardanico> i need to add this `def` macro to the nimpylib properly though |
07:48:30 | FromDiscord | <kaletaa> In reply to @Is "what does this mean": nim code turn into javascript code yes |
07:48:36 | FromDiscord | <Solitude> In reply to @kaletaa "i'd rather shoot myself": thats not a fair comparison |
07:48:52 | FromDiscord | <Phil> In reply to @Is "react is the front": React is a frontend, You don't write frontends such as Vue/Angular/React within nim. You can still achieve something similar, but you'd be using the nim-framework karax. |
07:48:52 | FromDiscord | <kaletaa> In reply to @Solitude "thats not a fair": yeah, shooting yourself in the head is a preferable alternative |
07:48:52 | FromDiscord | <Is> In reply to @kaletaa "nim code turn into": but then theres no point of using nim? |
07:48:59 | FromDiscord | <kaletaa> In reply to @Is "but then theres no": why not |
07:49:06 | FromDiscord | <Yardanico> In reply to @Is "but then theres no": you get to write Nim in the end though, not JS |
07:49:09 | FromDiscord | <Elegantbeef> C turns into asm there's still reason to use C |
07:49:10 | FromDiscord | <Is> why use nim just to turn it into javascript |
07:49:14 | FromDiscord | <JSONBash> JS === bad |
07:49:18 | FromDiscord | <Yardanico> In reply to @Is "why use nim just": why use Python just to turn it into bytecode |
07:49:19 | FromDiscord | <kaletaa> In reply to @Is "why use nim just": because it's less shit |
07:49:21 | FromDiscord | <Elegantbeef> Why use C to just turn it into asm |
07:49:34 | FromDiscord | <Solitude> In reply to @Is "why use nim just": why use food... |
07:49:38 | FromDiscord | <Yardanico> lol |
07:49:41 | FromDiscord | <kaletaa> eat shit theory |
07:49:49 | FromDiscord | <Phil> In reply to @Is "why use nim just": Js is slow, Js does not have a type system, and even if you use typescript it does not catch errors at compile time as effectively. |
07:49:55 | FromDiscord | <Phil> Also ya'll should just write assembly |
07:50:03 | FromDiscord | <JSONBash> why use asm when we have magic lightning rocks? |
07:50:05 | FromDiscord | <kaletaa> In reply to @Isofruit "Js is slow, Js": the slow argument doesn't really apply when you're compilling to js |
07:50:07 | FromDiscord | <Yardanico> In reply to @Isofruit "Js is slow, Js": he's about using Nim for the frontend |
07:50:09 | FromDiscord | <Phil> I've only been humouring you this entire time, assembly was the only sensible option! |
07:50:09 | FromDiscord | <Yardanico> when it compiles to JS |
07:50:29 | FromDiscord | <Phil> Check, the same reason people got it into their heads to use JS in the backend |
07:50:35 | FromDiscord | <Phil> Convenience of using a single language everywhere |
07:51:28 | FromDiscord | <Phil> (edit) "Check, the same reason people ... got" added "who" |
07:51:31 | FromDiscord | <Yardanico> ~~at least you can't compile to PHP with Nim anymore ~~ |
07:51:52 | FromDiscord | <kaletaa> at least the compiler isn't pascal anymore |
07:52:04 | FromDiscord | <Elegantbeef> Eh jsgen is only a few thousand lines of code how hard could phpgen be 😄 |
07:52:16 | FromDiscord | <JSONBash> at least Nim doesn't refer to https://en.wikipedia.org/wiki/Nim_Chimpsky anymore |
07:52:17 | FromDiscord | <Yardanico> In reply to @Elegantbeef "Eh jsgen is only": well it was in jsgen as well :D |
07:52:21 | FromDiscord | <Elegantbeef> Nim is a pascal dialecct |
07:52:23 | FromDiscord | <Yardanico> yes |
07:52:24 | FromDiscord | <kaletaa> invoke kernel panic when user tries to compile to php |
07:52:29 | FromDiscord | <Yardanico> Nim was supposed to be called Pascal++ |
07:52:37 | FromDiscord | <Phil> Generally working within the JS ecosystem is going to give you a better experience imo because you have access to more tools. |
07:52:52 | FromDiscord | <Phil> (edit) "Generally working within the JS ecosystem is going to give you a better experience imo ... because" added "for frontend" |
07:52:58 | FromDiscord | <kaletaa> the JS ecosystem only provides a better experience because it has everything already |
07:53:12 | FromDiscord | <Elegantbeef> Except for pad left |
07:53:16 | FromDiscord | <kaletaa> it's great for mass-produced webdevs because you don't have to thing |
07:53:17 | FromDiscord | <kaletaa> (edit) "thing" => "think" |
07:53:34 | FromDiscord | <Phil> You're also not buying into the inherent possibly issues of problems arising during the nim --> JS translation step |
07:53:36 | FromDiscord | <Elegantbeef> Now now put the superiority complex up your ass |
07:53:50 | FromDiscord | <kaletaa> sorry that's like 1/3 of my personality |
07:53:52 | FromDiscord | <Phil> (edit) "possibly issues" => "possibility" |
07:54:19 | FromDiscord | <kaletaa> but the web development industry is generally filled with people who are only there for the money |
07:54:25 | FromDiscord | <kaletaa> and programming is a secondary to them |
07:54:27 | FromDiscord | <kaletaa> it's a shame really |
07:54:45 | FromDiscord | <Is> In reply to @kaletaa "but the web development": https://tenor.com/view/pedro-monkey-puppet-meme-awkward-gif-15268759 |
07:54:47 | FromDiscord | <JSONBash> i think its more 'it's a job really' |
07:55:11 | FromDiscord | <Phil> Anyway, ignoring that inane off-shoot |
07:55:20 | FromDiscord | <kaletaa> "mald" |
07:55:41 | FromDiscord | <Is> can nim be used to mine bitcoin |
07:55:47 | FromDiscord | <Yardanico> yes |
07:55:48 | FromDiscord | <kaletaa> yes |
07:56:01 | FromDiscord | <kaletaa> but you probably shouldn't roll your own mining software |
07:56:13 | FromDiscord | <Yardanico> all of you "can nim " question will be answerred with "true" as long as C/C++/or any other compiled language can do it |
07:56:16 | FromDiscord | <Is> can i make my own crypto with nym |
07:56:18 | FromDiscord | <Yardanico> yes |
07:56:21 | FromDiscord | <kaletaa> stop asking |
07:56:23 | FromDiscord | <kaletaa> dumb questions |
07:56:24 | FromDiscord | <Is> damn damn |
07:56:24 | FromDiscord | <Yardanico> yes |
07:56:31 | FromDiscord | <Yardanico> In reply to @kaletaa "dumb questions": hey don't be rude |
07:56:40 | FromDiscord | <kaletaa> that's like another 1/3 of my personality |
07:56:54 | FromDiscord | <Elegantbeef> Soon your personality is going be be 5/3 |
07:57:01 | FromDiscord | <kaletaa> maybe |
07:57:08 | nrds | <Prestige99> I hear they have great deals for personalities at Walmart |
07:57:13 | FromDiscord | <Is> 1/3 of his personality is being bad at math |
07:57:25 | FromDiscord | <kaletaa> no that's 3/2th of my personality |
07:57:33 | FromDiscord | <Yardanico> https://answers.launchpad.net/nimrod/+question/69317 |
07:57:36 | FromDiscord | <Yardanico> "No and I am undetermined what a good mascot would be. Maybe a crown (for obvious reasons)?" |
07:57:46 | FromDiscord | <Yardanico> 🤔 |
07:57:50 | FromDiscord | <Solitude> Lore |
07:57:52 | FromDiscord | <Phil> Alright, move the flaming to off-topic once more please, thanks. |
07:58:18 | FromDiscord | <Is> who made nim tho |
07:58:21 | FromDiscord | <kaletaa> i did |
07:58:27 | FromDiscord | <Is> cope |
07:58:38 | FromDiscord | <Is> it was made by a very humble man as i dont see credits anywhere |
07:58:51 | FromDiscord | <Yardanico> Alright, move to #offtopic |
07:59:09 | FromDiscord | <Phil> Araq aka Andreas Rumpf, there'a host of contributors as well, many of which are in this discord, you can check them out on github |
07:59:09 | FromDiscord | <kaletaa> In reply to @Is "it was made by": https://github.com/nim-lang/Nim/graphs/contributors |
07:59:15 | FromDiscord | <Yardanico> Having a little bit of spam once in a while is nice, but not enough |
07:59:18 | FromDiscord | <Phil> (edit) "Araq aka Andreas Rumpf, there'a host of ... contributors" added "other" |
07:59:44 | FromDiscord | <Elegantbeef> "but not enough" Oh you want more spam? |
07:59:52 | FromDiscord | <kaletaa> |
08:00:00 | FromDiscord | <JSONBash> https://tenor.com/view/spam-spamalert-gif-20933994 |
08:00:23 | FromDiscord | <Elegantbeef> Ok i have to appreciate this person lurking on matrix right now, their name is unseenspy |
08:00:33 | FromDiscord | <Elegantbeef> That's a prestine lurker name |
08:00:41 | FromDiscord | <JSONBash> https://media.discordapp.net/attachments/371759389889003532/969870895852158976/spam.webp |
08:01:41 | FromDiscord | <Yardanico> More lore - https://www.mail-archive.com/[email protected]/msg244793.html |
08:01:43 | FromDiscord | <JSONBash> he's also a liar he's now seen |
08:02:12 | FromDiscord | <JSONBash> (edit) "he's also a liar he's now seen ... " added "(to beef's comment)" |
08:10:04 | FromDiscord | <Phil> Man, once my serialization layer actually works fully correctly and I don't randomly have my frontend explode because was lowercase where it should've been uppercase or somesuch, I'll really need to look into how to generalize that stuff |
08:11:06 | FromDiscord | <Phil> The amount of code written to press my model-objects into objects with the field-names feels slightly ridiculous and highlighted a bit that for serialization purposes, duck-typed languages are pretty strongly favored |
08:11:26 | FromDiscord | <Phil> (edit) "The amount of code written to press my model-objects into objects with the field-names ... feels" added "I actually need" |
08:11:49 | FromDiscord | <Elegantbeef> Generics go brr |
08:12:10 | FromDiscord | <Phil> Sadly not in this case, because there's enough one-off differences that I can't generically solve them all |
08:12:23 | FromDiscord | <Elegantbeef> I mean use generic interfaces |
08:12:31 | FromDiscord | <Elegantbeef> Concepts + Generics interfaces |
08:13:03 | FromDiscord | <Is> what OS u using |
08:13:13 | FromDiscord | <Phil> I don't think I've ever heard the term "Generic interface" in the context of nim, when you mentioned that I though you meant concepts only |
08:13:46 | FromDiscord | <Phil> Or did you mean generic concepts? |
08:13:56 | FromDiscord | <Elegantbeef> I mean generic interfaces |
08:14:07 | FromDiscord | <Elegantbeef> Use polymorphism to make interfaces for your types |
08:14:45 | nrds | <Prestige99> MI when? |
08:14:51 | FromDiscord | <Phil> Ohhhh like, have them all inherent from the same base, then write generic procs that take variations of that base class? |
08:14:55 | FromDiscord | <Elegantbeef> No |
08:14:57 | FromDiscord | <Elegantbeef> Jesus |
08:15:01 | FromDiscord | <Elegantbeef> Inheritance is dead |
08:16:02 | FromDiscord | <Phil> I believe I likely should focus on breakfast to get the brain actually going, I currently can't get a mental image of what you've described |
08:16:20 | FromDiscord | <Phil> Or if I have seen it before, I'm currently not associating it with the name "generic interface" |
08:17:38 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3WD9 |
08:17:38 | FromDiscord | <Elegantbeef> There is a generic interface |
08:18:01 | FromDiscord | <Elegantbeef> You overload `saveToString` for your given type else it uses the built in |
08:19:33 | FromDiscord | <Phil> Ohhh auto |
08:19:38 | FromDiscord | <Phil> Man I have not touched that one yet |
08:19:40 | FromDiscord | <Elegantbeef> Not auto |
08:19:46 | FromDiscord | <Yardanico> In reply to @Isofruit "Man I have *not*": auto is no different than a generic proc |
08:19:55 | FromDiscord | <Yardanico> it's literally same as `proc doSomething[T](arg: T)` |
08:19:57 | FromDiscord | <Elegantbeef> it's the same as `saveToString[T](a: T` |
08:19:58 | FromDiscord | <Yardanico> just shorter syntax |
08:20:04 | FromDiscord | <Phil> Ah, check |
08:20:07 | FromDiscord | <Yardanico> the main thing here is `mixin` |
08:20:17 | FromDiscord | <Phil> Wait, I do that in my generic repository |
08:20:44 | FromDiscord | <Elegantbeef> Well this is how you make generic interfaces and with this simple logic you can make entire serialization libraries |
08:20:56 | FromDiscord | <Elegantbeef> Jsony uses this pattern for instance |
08:21:06 | FromDiscord | <Yardanico> flatty as well |
08:21:13 | FromDiscord | <Yardanico> https://github.com/treeform/flatty/blob/master/src/flatty.nim @Phil |
08:21:20 | FromDiscord | <Elegantbeef> It gives full user control with sane defaults |
08:21:29 | FromDiscord | <Elegantbeef> I mean most do sense it's a fucking awesome setup |
08:21:35 | FromDiscord | <Elegantbeef> since\ |
08:22:10 | FromDiscord | <Phil> Hmm once I'm in the refactoring stage I'll likely meditate over this type of solution |
08:22:59 | FromDiscord | <Elegantbeef> It's the best solution |
08:23:04 | FromDiscord | <Elegantbeef> It's basically rust traits but dumb |
08:23:46 | FromDiscord | <Phil> If I wanted to provide custom compile-time-error-messages, I'd check for the existance of the procs in a concept and throw that there, correct? |
08:23:53 | FromDiscord | <Elegantbeef> No |
08:23:55 | FromDiscord | <Phil> (edit) "If I wanted to provide custom compile-time-error-messages, I'd check for the existance of the procs ... in" added "I mixin" |
08:24:00 | FromDiscord | <Elegantbeef> You just use a concept |
08:24:07 | FromDiscord | <Elegantbeef> There is no need for error messages |
08:24:21 | FromDiscord | <Elegantbeef> If a type doesnt match the concept it's not implemented |
08:25:11 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3WDa |
08:25:22 | FromDiscord | <Elegantbeef> You now have a static error message that `X is not Serializable` on attempted dispatch |
08:26:10 | * | vicecea quit (Remote host closed the connection) |
08:26:38 | * | vicecea joined #nim |
08:26:47 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3WDb |
08:26:48 | FromDiscord | <Elegantbeef> Compile this and see what `{.explain.}` gives you |
08:26:59 | FromDiscord | <Elegantbeef> Oh actually it's not needed |
08:27:04 | FromDiscord | <Elegantbeef> It already explains the reason it fails |
08:27:45 | FromDiscord | <Elegantbeef> Might not with more `saveToString` procedures |
08:28:33 | FromDiscord | <Phil> Why the s after the key-word "concept"? |
08:28:58 | FromDiscord | <Yardanico> because saveToString takes some type |
08:29:03 | FromDiscord | <Yardanico> and you're describing that type in the concept |
08:29:15 | FromDiscord | <Yardanico> i mean it takes an object of some type |
08:29:25 | FromDiscord | <Phil> Ohhh and after concept you assign the symbol you'll use within the concept |
08:29:33 | FromDiscord | <Phil> (edit) "Ohhh and after concept you assign the symbol you'll use within the concept ... " added "as placeholder for the type" |
08:32:37 | FromDiscord | <Phil> In reply to @Elegantbeef "It already explains the": Yeh, basically goes "type no match, is no string". ↵For the most part, that basically only says "This fails the concept"; though not where in the concept it fails. So for the most part, you're recommended to use small-ish concepts so that you don't have to troubleshoot which of the n checks just failed. |
08:32:51 | FromDiscord | <Phil> (edit) "In reply to @Elegantbeef "It already explains the": Yeh, basically goes "type no match, is no string". ↵For the most part, that basically only says "This fails the concept"; though not where in the concept it fails. So for the most part, you're ... recommended" added "seemingly" |
08:34:15 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3WDg |
08:34:37 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=3WDg" => "https://play.nim-lang.org/#ix=3WDh" |
08:35:15 | FromDiscord | <Elegantbeef> In old concepts thats how you bind a variable to that type |
08:35:15 | FromDiscord | <Elegantbeef> so it's a variable `s` that is the type you're checking |
08:35:22 | FromDiscord | <Elegantbeef> I did mess up the new concepts |
08:35:35 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3WDj |
08:36:14 | FromDiscord | <Elegantbeef> I mean it states the error is at line 2 |
08:36:44 | FromDiscord | <Elegantbeef> Hmm would be nice if it explicitly stated the reason for failure |
08:37:07 | FromDiscord | <Elegantbeef> But i doubt a PR would be accepted for that due to concepts 2.0 being on the horizon |
08:37:47 | FromDiscord | <mratsim> {.explain.} kind of help but the output ressembles C++ or Java type errors, reeeeaaaallllllyyyyy a brain dump |
08:38:25 | FromDiscord | <Elegantbeef> Yea i mean it should just iterate through the concept entries that it's attempting to match and print out the statement verbatim and the result |
08:38:49 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3WDk |
08:39:37 | FromDiscord | <Elegantbeef> Or some other message than `false` of course |
08:40:34 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3WDl |
08:40:37 | FromDiscord | <Phil> I mean, false is sort of implied, imo just the statement itself would already be nice |
08:40:56 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3WDm |
08:41:04 | FromDiscord | <Elegantbeef> I have 0 clue if a PR would be accepted for old concepts |
08:41:13 | * | 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:41:38 | FromDiscord | <Phil> If they have a limited lifespan I'm not sure it'd be worth the time assuming that the next concept-iteration will drop within months or sth |
08:41:51 | FromDiscord | <Elegantbeef> Lol |
08:41:58 | FromDiscord | <Elegantbeef> The new concepts are already here |
08:42:05 | FromDiscord | <Elegantbeef> They just are limited |
08:42:09 | FromDiscord | <Phil> Ohhh check |
08:42:10 | FromDiscord | <Yardanico> unfinished :) |
08:42:12 | FromDiscord | <Elegantbeef> And some say poorly implemented |
08:43:26 | FromDiscord | <Phil> wow, my eyes scanned over the "new concept" thing and didn't even notice that the "new concept" thingy has a proc in its declaration |
08:43:45 | FromDiscord | <Elegantbeef> Yea they're basically rust traits |
08:43:55 | FromDiscord | <Elegantbeef> Only need to add field support to make me happy |
08:44:00 | FromDiscord | <Yardanico> if you want runtime interfaces, there's also https://github.com/yglukhov/iface with almost the same syntax |
08:44:04 | FromDiscord | <Phil> sent a code paste, see https://paste.rs/9Cj |
08:44:06 | FromDiscord | <Yardanico> yes |
08:44:07 | FromDiscord | <Phil> and outputs string? |
08:44:09 | FromDiscord | <Yardanico> and that it returns a string |
08:44:12 | FromDiscord | <Phil> Check |
08:44:18 | FromDiscord | <Elegantbeef> How dare you yard not talk about traitors 😛 |
08:44:22 | FromDiscord | <Yardanico> whaaat |
08:44:28 | FromDiscord | <Elegantbeef> https://github.com/beef331/traitor |
08:44:34 | FromDiscord | <Yardanico> never seen it |
08:44:38 | FromDiscord | <Elegantbeef> Traitor is my silly runtime trait system |
08:44:44 | FromDiscord | <Elegantbeef> And compile time i guess |
08:44:54 | FromDiscord | <Yardanico> how fast is it compared to iface? :P |
08:45:02 | FromDiscord | <Elegantbeef> Probably slow as dog shit |
08:45:08 | FromDiscord | <Elegantbeef> I wrote it for fun after talking to prestige |
08:45:17 | FromDiscord | <Elegantbeef> I do have a vtable |
08:45:21 | FromDiscord | <Yardanico> oh so you don't require them to be `ref`s ? |
08:45:23 | FromDiscord | <Yardanico> the objects themselves |
08:45:26 | FromDiscord | <Elegantbeef> Nope |
08:45:27 | FromDiscord | <Yardanico> but you have byref |
08:45:33 | FromDiscord | <sheerluck> In reply to @Elegantbeef "Probably slow as dog": but elegant |
08:45:39 | FromDiscord | <Yardanico> oh okay, iface requires that objects need `ref` |
08:45:44 | FromDiscord | <Elegantbeef> Yes cause I havent made an procedure to alias it |
08:46:02 | FromDiscord | <Elegantbeef> I should emit a procedure that takes a `ptr T` |
08:46:11 | FromDiscord | <Elegantbeef> The code is a mess though, was mostly for fun |
08:46:59 | FromDiscord | <Elegantbeef> It should properly support `ref` objects and keep them alive for the lifetime but heavily untested 😄 |
09:11:57 | * | Zectbumo quit (Remote host closed the connection) |
09:14:14 | FromDiscord | <Phil> Errr... url encoding isn't really a proper encoding in the sense that it is covered by std/encodings right?↵Basically I'm trying to parse a URL string and replace the URL-encoded characters (such as spaces that are in there as %20).↵I couldn't find anything in std/encodings and std/httpclient, is there something in the std? |
09:14:31 | FromDiscord | <Elegantbeef> `import std/uri` |
09:14:54 | FromDiscord | <Phil> My ctrl+F game is so effing weak |
09:15:10 | FromDiscord | <Phil> Thanks beef, I'm dumb |
09:19:37 | * | neceve joined #nim |
09:21:30 | FromDiscord | <Elegantbeef> Yea there are a bunch of modules in the stdlib that are a surprise to see |
09:38:49 | FromDiscord | <Phil> What kills me is I ctr+F'd `url` and didn't find it, didn't even think about uri |
09:39:41 | FromDiscord | <dom96> That’s my bad sorry |
09:40:00 | FromDiscord | <dom96> We’ll really it’s whoever write the URI RFCs fault :) |
09:40:07 | FromDiscord | <dom96> (edit) "write" => "wrote" |
09:40:17 | FromDiscord | <dom96> (edit) "We’ll" => "Well" |
09:52:03 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=3WDz |
09:54:01 | FromDiscord | <Yardanico> sent a code paste, see https://paste.rs/v1r |
09:54:01 | FromDiscord | <Yardanico> --passC:"-m32" --passL:"-m32" |
09:57:39 | * | jmdaemon quit (Ping timeout: 272 seconds) |
10:04:38 | FromDiscord | <System64 ~ Flandre Scarlet> ah alright |
10:04:51 | FromDiscord | <System64 ~ Flandre Scarlet> but why ---passL? isn't it for libs? |
10:16:09 | FromDiscord | <Solitude> passl is for linker |
10:17:00 | FromDiscord | <System64 ~ Flandre Scarlet> ah alright |
10:18:49 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Solitude "passl is for linker": Even worse! https://media.discordapp.net/attachments/371759389889003532/969905658860285962/message.txt |
10:22:54 | FromDiscord | <Yardanico> In reply to @System64 "Even worse!": are you sure your mingw supports 32-bit compilation? |
10:28:07 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Yardanico "are you sure your": it should |
10:28:17 | FromDiscord | <System64 ~ Flandre Scarlet> is it the mingw included with Nim? |
10:31:57 | FromDiscord | <System64 ~ Flandre Scarlet> I have mingw64 in my Nim folder |
10:40:22 | * | xet7 joined #nim |
10:44:20 | FromDiscord | <FireLite> How can I pointer scan the signature in the process? |
10:45:24 | * | firq quit (Ping timeout: 240 seconds) |
10:46:49 | FromDiscord | <d4rckh> what do i need to compile for linux on windows? |
10:49:28 | FromDiscord | <Recruit_main707> `--os:linux` |
10:50:19 | FromDiscord | <Recruit_main707> https://nim-lang.org/docs/nimc.html#crossminuscompilation |
10:56:02 | FromDiscord | <System64 ~ Flandre Scarlet> Do I absolutely need a 32-bits version of Nim to compile for 32-bits? |
10:56:17 | FromDiscord | <Yardanico> no, you need 32-bit C compiler |
10:56:26 | FromDiscord | <Yardanico> 64-bit nim will compile 32-bit programs without issue |
10:57:12 | FromDiscord | <ambient> how do I know if function call copies a value or it's moved by reference? is there a trap that I can accidentally copy instead of just pointer or ref? |
10:57:21 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Yardanico "no, you need 32-bit": I have that in my dist https://media.discordapp.net/attachments/371759389889003532/969915351607439410/unknown.png |
10:57:25 | FromDiscord | <Yardanico> In reply to @ambient "how do I know": is there a reason you want to know that? |
10:57:41 | FromDiscord | <Yardanico> Nim will pass by reference for objects too large, and copy for small objects |
10:57:54 | FromDiscord | <System64 ~ Flandre Scarlet> and there is mingw32 here https://media.discordapp.net/attachments/371759389889003532/969915493026775050/unknown.png |
10:58:02 | FromDiscord | <ambient> In reply to @Yardanico "is there a reason": I never want to copy unless it's done explicitly (like .clone) |
10:58:21 | FromDiscord | <Yardanico> In reply to @ambient "I never want to": then you want to use destructors semantics and override =copy for your type |
10:58:27 | FromDiscord | <Recruit_main707> i think it passes by reference if the size is `size(float64) 3` or larger |
10:58:40 | FromDiscord | <ambient> In reply to @Yardanico "then you want to": ty |
10:58:43 | FromDiscord | <Recruit_main707> or the `{.bycopy.}` pragma no? |
10:58:44 | FromDiscord | <Yardanico> In reply to @Recruit_main707 "i think it passes": yes, but that's an internal detail |
10:58:52 | FromDiscord | <Yardanico> In reply to @Recruit_main707 "or the `{.bycopy.}` pragma": that will always pass by copy, yes, it's for C FFI |
10:59:05 | FromDiscord | <Recruit_main707> thats what he wants doesnt he? |
10:59:16 | FromDiscord | <Rika> He said he wanted to disallow copies |
10:59:35 | FromDiscord | <Rika> Well, implicit ones |
11:00:01 | FromDiscord | <Yardanico> yes, the only real reason to do that is to override =copy so that it errors |
11:00:08 | FromDiscord | <Yardanico> so copies are prevented at compile time |
11:00:56 | FromDiscord | <Recruit_main707> ah, sorry |
11:03:15 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @System64 "and there is mingw32": @Yardanico does this setup allows me to compile in 32-bits? |
11:04:33 | FromDiscord | <Yardanico> not sure really |
11:07:09 | FromDiscord | <System64 ~ Flandre Scarlet> And how can I switch to 32-bits setup? |
11:17:44 | FromDiscord | <demotomohiro> Set Path environment variable so that gcc for 32bit is executed and try nim c --cpu:i386 mycode.nim. |
11:19:14 | FromDiscord | <demotomohiro> https://nim-lang.org/docs/nimc.html#crossminuscompilation |
11:20:15 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "Set Path environment variable": This is the Path to Nim https://media.discordapp.net/attachments/371759389889003532/969921119593332766/unknown.png |
11:24:30 | FromDiscord | <demotomohiro> If you already can call nim from command line, you dont need to add a path to that directory in PATH. |
11:45:35 | FromDiscord | <d4rckh> hmm, how can i hook the esc key in my terminal app? similarly how you can hook the ctrl+c combo |
11:45:39 | FromDiscord | <d4rckh> (edit) removed "hmm," |
11:48:15 | FromDiscord | <Solitude> You can try illwill. |
11:48:29 | FromDiscord | <d4rckh> cant i do it with the terminal library? |
11:53:20 | FromDiscord | <System64 ~ Flandre Scarlet> Finally! I compiled! |
11:54:25 | FromDiscord | <enthus1ast> @d4rckh\: this depends how you get your keys |
11:54:41 | FromDiscord | <enthus1ast> if you just do stdin.readline or similar i think you cannot hook esc |
11:55:03 | FromDiscord | <2F42BBA1> I want to add Windows autostartup for my thing on Nim. Software first asks if user wants so and if he says yes then it will go and add itself to the Windows startup. How do I implement that? |
11:55:34 | FromDiscord | <enthus1ast> @2F42BBA1\: create a registry key? |
11:55:35 | FromDiscord | <2F42BBA1> As for now I think either copying a file to a directory related to autostartup, or use registry stuff via winim. |
11:55:51 | FromDiscord | <2F42BBA1> In reply to @enthus1ast "<@790153860130799616>\: create a registry": That's what I thought so |
11:56:51 | FromDiscord | <2F42BBA1> not sure how it should look like via winim, so examples would be appriciated |
12:00:21 | FromDiscord | <Rika> In reply to @enthus1ast "if you just do": You can with effort and losing windows support I believe |
12:00:41 | FromDiscord | <Rika> Or without losing windows support but a good bit more code |
12:00:57 | FromDiscord | <2F42BBA1> https://nim-lang.org/docs/registry.html↵hm... |
12:01:05 | FromDiscord | <enthus1ast> i would just use illwill |
12:01:12 | FromDiscord | <enthus1ast> or copy out the solution |
12:01:30 | * | duuude quit (Read error: Connection reset by peer) |
12:01:56 | FromDiscord | <deadmeme77> In reply to @2F42BBA1 "I want to add": just copy a shortcut to this folder no? https://media.discordapp.net/attachments/371759389889003532/969931608532615188/unknown.png |
12:01:57 | FromDiscord | <enthus1ast> @2F42BBA1\: i found old code that does this, but its using nim\_win\_registry |
12:02:20 | FromDiscord | <deadmeme77> (edit) "no?" => "no?↵↵Might need admin access AND UAC confirmation" |
12:02:23 | * | duuude joined #nim |
12:02:24 | FromDiscord | <2F42BBA1> In reply to @enthus1ast "<@790153860130799616>\: i found old": anything will help |
12:02:48 | FromDiscord | <enthus1ast> i mean, calling some winapi functions should not be that hard as well |
12:02:56 | FromDiscord | <enthus1ast> but sure will paste it, sec |
12:03:26 | FromDiscord | <2F42BBA1> In reply to @deadmeme77 "just copy a shortcut": I might give a try but I must figure out how to copy the executable over this directory↵Prob, gotta use this https://nim-lang.org/docs/os.html#copyFile%2Cstring%2Cstring |
12:03:30 | FromDiscord | <deadmeme77> (does the irc bot send images btw) |
12:03:57 | FromDiscord | <deadmeme77> In reply to @2F42BBA1 "I might give a": oh, shortcuts are symlinks I guess, that might work |
12:06:43 | FromDiscord | <enthus1ast> https://play.nim-lang.org/#ix=3WEh |
12:06:54 | FromDiscord | <enthus1ast> but its very old and might not work any more |
12:22:41 | * | kayabaNerve quit (Ping timeout: 272 seconds) |
12:30:59 | FromDiscord | <2F42BBA1> enthus1ast: thanks for your thing it helped me |
12:31:50 | FromDiscord | <enthus1ast> np |
12:32:12 | FromDiscord | <hmmm> broborskis! how do I pass parameters to an already running program |
12:32:23 | FromDiscord | <hmmm> 🤔 |
12:32:33 | FromDiscord | <enthus1ast> i think you can't |
12:32:43 | FromDiscord | <hmmm> oh noes why I can't 🧐 |
12:32:52 | FromDiscord | <exelotl> use the network |
12:33:04 | FromDiscord | <enthus1ast> yeah prolly the best |
12:34:01 | FromDiscord | <enthus1ast> what are you trying to do? |
12:36:08 | FromDiscord | <hmmm> hmm I don't know yet lol. I see python dudes have some popen thingy |
12:36:17 | FromDiscord | <demotomohiro> You can also use pipes or signals for inter process communications |
12:36:30 | FromDiscord | <enthus1ast> you could also send stuff to the stdin |
12:36:45 | FromDiscord | <hmmm> send me examples you cuties |
12:37:14 | FromDiscord | <Rika> Would you like a silver or a gold spoon |
12:37:32 | FromDiscord | <enthus1ast> https://nim-lang.org/docs/osproc.html#inputStream%2CProcess |
12:37:33 | FromDiscord | <hmmm> haha I got caught 😄 |
12:37:41 | FromDiscord | <hmmm> ty enthy ❤️ |
12:38:19 | FromDiscord | <enthus1ast> but i also would go for network, i think async networking is easier with nim |
12:38:58 | FromDiscord | <enthus1ast> depends on what you wanna do i think |
12:45:47 | FromDiscord | <Knedlik> sent a code paste, see https://play.nim-lang.org/#ix=3WEo |
12:46:21 | FromDiscord | <Knedlik> The dev is on the `Nim` branch, this is the engine: https://github.com/Periapsis-Studios/Periapsis-Engine |
12:57:34 | FromDiscord | <Knedlik> I think I found the prob and I don't know how to solve it https://github.com/nim-lang/Nim/issues/11592 |
12:58:44 | FromDiscord | <2F42BBA1> sent a code paste, see https://play.nim-lang.org/#ix=3WEq |
13:00:16 | FromDiscord | <2F42BBA1> docs on registry are here https://nim-lang.org/docs/registry.html |
13:03:30 | FromDiscord | <eyecon> I'm trying to solve Cryptopals and need to have an AES implementation. I won't be changing advanced options or implement anything special. What options do we have for plain AES? I found nimcrypto and nimAES. nimAES looks specialized for AES and looks easy to use. Did I miss any other package that you know of? |
13:04:23 | FromDiscord | <2F42BBA1> In reply to @eyecon "I'm trying to solve": AFAIK a lot of people use nimcrypto, so better to use that one. |
13:06:14 | FromDiscord | <eyecon> In reply to @2F42BBA1 "AFAIK a lot of": Was it endorsed officially or something? nimcrypto has more stars in Github but both have not enough to make a direct popularity comparison. |
13:06:44 | FromDiscord | <Yardanico> In reply to @eyecon "Was it endorsed officially": nimcrypto is used by Status who do ethereum stuff :P |
13:06:57 | FromDiscord | <Solitude> In reply to @eyecon "Was it endorsed officially": Its more used and tested |
13:06:59 | FromDiscord | <eyecon> In reply to @Yardanico "nimcrypto is used by": Ah, well, that's a good endorsement |
13:07:10 | FromDiscord | <eyecon> Thank you all! |
13:07:19 | * | duuude quit (Quit: Konversation terminated!) |
13:07:34 | * | duuude joined #nim |
13:09:04 | FromDiscord | <2F42BBA1> sent a code paste, see https://paste.rs/XS1 |
13:13:26 | FromDiscord | <Yardanico> Just to give it more exposure - https://github.com/nim-lang/RFCs/issues/456 - RFC about getting rid of style insensitivity for Nim v2. Feel free to leave your opinion through votes and comments, we need more feedback on this from both "sides" |
13:20:34 | FromDiscord | <Phil> You can use isOk and is_ok interchangeably? |
13:20:40 | FromDiscord | <Phil> Huh |
13:21:06 | FromDiscord | <eyecon> In reply to @Isofruit "You can use isOk": Yeah, all underscores get ignored and only the case for the first character is considered important |
13:22:02 | FromDiscord | <Phil> I'm looking at this with mostly neutrality and a very slight leaning towards removing style ambivalence |
13:22:49 | FromDiscord | <Phil> Like, nice but very close to the bottom of what I would consider relevant |
13:23:35 | FromDiscord | <eyecon> I like it a lot but if it would make the life easier for the core developers and the tool developers then I would be also OK, on the other hand I don't see how it would change things that much |
13:24:13 | FromDiscord | <eyecon> (edit) "it" => "style-insensitivity/" |
13:24:27 | FromDiscord | <Phil> Yard, from your perspective, would it make the lives of core devs easier? |
13:25:01 | NimEventer | New thread by Dom96: Nim v2: what would you change?, see https://forum.nim-lang.org/t/9132 |
13:25:09 | FromDiscord | <dom96> Also ^ :) |
13:28:12 | FromDiscord | <Alea> In reply to @NimEventer "New thread by Dom96:": hmmm |
13:28:29 | FromDiscord | <Alea> Case sensitivity would be an interesting change |
13:28:37 | FromDiscord | <hmmm> ye I'm with dom with this one, it should also be a boost for people to finally try it when v2 comes |
13:28:51 | FromDiscord | <hmmm> v2 comes only one time peoples! 🧐 |
13:29:04 | FromDiscord | <Alea> I see both sides of the argument, I definitely like using it with C wrappers |
13:29:25 | FromDiscord | <enthus1ast> the tooling must be much better imho |
13:29:42 | FromDiscord | <eyecon> Are there really so many people that say "Oh, how I would like to try out Nim, only if it didn't have this style insensitivity"? |
13:29:51 | FromDiscord | <Yardanico> In reply to @eyecon "Are there really so": do, just a couple of random HN folks |
13:29:53 | FromDiscord | <enthus1ast> eg nimsuggest is quite unusable currently |
13:29:59 | FromDiscord | <Yardanico> that's one of the top arguments against Nim on HN |
13:30:01 | FromDiscord | <Yardanico> and HN, you know, is HN |
13:30:24 | FromDiscord | <eyecon> I mean, many people bash Python because of significant whitespace, we could get rid of that too |
13:30:24 | FromDiscord | <Yardanico> the other top 3 are GC (with ARC it's not really valid) and whitespace indentation |
13:30:25 | FromDiscord | <Phil> I never used c libs so I didn't consider c interop.↵If that becomes easier with removing style ambivalence then I'd support it. |
13:30:35 | FromDiscord | <Yardanico> In reply to @enthus1ast "the tooling must be": yes, but I also don't see how case sensitivity would magically |
13:30:38 | FromDiscord | <Yardanico> fix that |
13:30:38 | FromDiscord | <Phil> Though still mostly uncaring |
13:30:43 | FromDiscord | <Yardanico> nimsuggest requires tons of changing to become reliable |
13:31:11 | * | arkurious joined #nim |
13:31:27 | FromDiscord | <dom96> In reply to @eyecon "Are there really so": there are, and not just on HN |
13:31:47 | FromDiscord | <dom96> I think a lot of people see it as a very strange thing to have for a language |
13:31:59 | FromDiscord | <dom96> I've met folks in the real world that think so too :) |
13:32:21 | FromDiscord | <0ffh> Yeah, but I also see the point that style insensitivity can be troublesome when you try to import from a foreign language library that has distinct symbols that cannot be distinguished without style sensitivity. |
13:32:23 | FromDiscord | <enthus1ast> strange reason to not try a lang imho \:) |
13:32:40 | FromDiscord | <Yardanico> In reply to @dom96 "I think a lot": people did that for python as well because of indentation |
13:32:44 | FromDiscord | <Yardanico> but look at where were are today |
13:32:53 | FromDiscord | <Yardanico> it only took it what? 15-20 years to get popular? |
13:33:06 | duuude | style insensitivity is nice. holy style wars fit my taste. |
13:33:06 | FromDiscord | <Yardanico> (python was first released in 1991) |
13:33:47 | FromDiscord | <dom96> I don't have strong feelings one way or the other tbh |
13:33:54 | FromDiscord | <Phil> Yeh but allowing as seamless interop as possible for a smooth experience is king imo |
13:34:15 | FromDiscord | <dom96> I just think Nim is very unique with this feature |
13:34:25 | FromDiscord | <dom96> indentation-based blocks are much more common |
13:34:49 | FromDiscord | <Phil> And if your c lib has gc_bla and gcbla then style sensitivity is better imo because smoother integration |
13:34:49 | FromDiscord | <dom96> As for ffi/interop see my comment in the GH issue |
13:35:08 | FromDiscord | <dom96> just have Nim generate both aliases :D |
13:35:13 | FromDiscord | <eyecon> In reply to @dom96 "As for ffi/interop see": That's certainly a strong argument and made me retract my thumbs-down |
13:35:23 | FromDiscord | <dom96> and then you'll get gc_bla and gcBla (correctly uppercased) |
13:35:28 | FromDiscord | <Yardanico> In reply to @dom96 "As for ffi/interop see": yes, but this argument goes both ways |
13:36:24 | FromDiscord | <eyecon> An alternative way (not necessarily good IMHO) would be to have optional style-sensitivity but it looks like the worst of both worlds |
13:38:08 | FromDiscord | <hmmm> hmm nim has enough going for it to get rid of the quirkiness. This will be the shiny on v2 release |
13:38:43 | FromDiscord | <Phil> I'm not sure it would be all that shiny, I would mostly stare at that gc change |
13:38:59 | FromDiscord | <eyecon> If the style insensitivity goes away, then a big chunk of existing Nim code must be revised. Any plans for the transition? Let's not pull a Python3 here |
13:39:12 | FromDiscord | <Yardanico> In reply to @eyecon "If the style insensitivity": styleCheck has existed for quite a while, but yes, a lot of code will break |
13:39:17 | FromDiscord | <Yardanico> that's already expected for v2 |
13:40:01 | FromDiscord | <dom96> In reply to @eyecon "If the style insensitivity": we shouldn't ever be in as much trouble as the py2 -> 3 transition since Nim isn't a runtime dependency, folks can always compile their code using the older compiler |
13:40:20 | FromDiscord | <dom96> and if we really want we can also still offer a --ignoreStyle flag or something for v2 |
13:40:28 | FromDiscord | <exelotl> yeah, the worst that'll happen is your program doesn't compile, you won't have to _run_ the program to find out what's broken |
13:40:33 | FromDiscord | <Yardanico> In reply to @dom96 "and if we really": please no |
13:40:44 | FromDiscord | <Yardanico> instead i hope we remove ALL backwards-compat flags for v2 |
13:40:51 | FromDiscord | <Yardanico> otherwise it doesn't make sense to keep the hundreds of switches we have |
13:40:52 | FromDiscord | <dom96> fair |
13:40:59 | FromDiscord | <Yardanico> do you know what is -d:nimWorkaround1447 ? |
13:41:01 | FromDiscord | <Yardanico> (edit) "-d:nimWorkaround1447" => "-d:nimWorkaround14447 is" |
13:41:02 | FromDiscord | <dom96> that would be a breath of fresh air :) |
13:41:29 | * | slowButPresent joined #nim |
13:41:30 | FromDiscord | <Phil> In reply to @exelotl "yeah, the worst that'll": The compiler being my friend that gives understandable advice is one of the best things period |
13:43:08 | FromDiscord | <dom96> hey planetis, I'm moving your comment to the GH issue |
13:43:17 | FromDiscord | <dom96> want to avoid splitting the discussion |
13:43:37 | FromDiscord | <Phil> Planetis? Where? |
13:43:58 | FromDiscord | <dom96> they posted in the forum |
13:44:04 | FromDiscord | <Phil> Ah, check |
13:44:17 | FromDiscord | <dom96> (I think/hope they are on IRC) |
13:44:32 | * | rockcavera joined #nim |
13:44:32 | * | rockcavera quit (Changing host) |
13:44:32 | * | rockcavera joined #nim |
13:44:49 | FromDiscord | <eyecon> In reply to @dom96 "(I think/hope they are": @planetis in Discord maybe? |
13:45:10 | FromDiscord | <planetis> wasup? |
13:45:14 | FromDiscord | <0ffh> Getting rid of style insensitivity does not create a real incompatibility problem.↵Just present the community with a command line tool that eats insensitive code and produces code in a chosen style. |
13:45:42 | FromDiscord | <0ffh> An easily automatable problem is really no problem. |
13:45:44 | FromDiscord | <Yardanico> In reply to @0ffh "Getting rid of style": this has always been a problem with Nim :) we don't even have a general formatting tool, and I doubt removing case insensitivity will help much with all the features Nim syntax has |
13:45:52 | FromDiscord | <Yardanico> i mean a working formatting tool |
13:46:49 | FromDiscord | <dom96> In reply to @0ffh "Getting rid of style": True, this can be solved with better tooling/IDE support for all languages really |
13:46:52 | FromDiscord | <0ffh> In reply to @Yardanico "this has always been": Yeah but switiching out inconsistent symbols is much easier than formatting. Formatting has 10 trillion edge cases that need their own parameters. |
13:46:53 | FromDiscord | <Phil> Can we throw money at nim suggest to tackle the issue? |
13:48:24 | FromDiscord | <Phil> I'll take that as a no. Hmmm yeah no idea |
13:48:42 | FromDiscord | <Yardanico> In reply to @Isofruit "Can we throw money": you also need developers who are willing to do this, even for money |
13:48:52 | FromDiscord | <demotomohiro> Nim allows import functions from C with different name like `proc makeFoo(): Foo {.import: "createBar".}` isnt it? So if there are 2 funcs like foo_bar and fooBar in c lib, Nim can import them as `fooBar1`, `fooBar2`. |
13:49:02 | FromDiscord | <Yardanico> did you know that Nim paid a professional programmer to add first-class hot-code reloading support to Nim? Have you EVER seen anyone reference it or use it? |
13:49:11 | FromDiscord | <Yardanico> No, because it was broken from almost the very start |
13:49:23 | FromDiscord | <eyecon> That... sounds extremely hard |
13:49:23 | FromDiscord | <Phil> Ouch |
13:49:33 | FromDiscord | <Yardanico> https://nim-lang.org/docs/hcr.html |
13:49:56 | FromDiscord | <0ffh> In reply to @Yardanico "did you know that": I knew it existst, but barely. |
13:50:01 | * | noeontheend joined #nim |
13:50:06 | FromDiscord | <0ffh> (edit) "existst," => "exists," |
13:50:20 | FromDiscord | <Yardanico> If you want to see the "bad" side of Nim compiler hacks, you can always ask disruptek/saem/haxscramper, but they left for Nimskull already, and almost never show up there (and disruptek is banned) |
13:50:38 | FromDiscord | <Yardanico> although his ban wasn't related to nimskull if you're wondering |
13:50:43 | FromDiscord | <Phil> He is? Oof |
13:51:04 | FromDiscord | <haxscramper> Saem also left this chat |
13:51:14 | FromDiscord | <haxscramper> After cabbose was banned |
13:51:35 | FromDiscord | <dom96> In reply to @Yardanico "did you know that": was it paid by Nim? AFAIK Status sponsored it |
13:51:47 | FromDiscord | <Yardanico> was it sponsored by status? why would they need HCR 🤔 |
13:52:03 | FromDiscord | <dom96> dunno, but I don't think our donations went towards this |
13:52:34 | FromDiscord | <Yardanico> the original issue is https://github.com/nim-lang/Nim/issues/8927, and it's still not solved |
13:52:45 | FromDiscord | <dom96> In reply to @Yardanico "If you want to": The Nim compiler gets a bad rep. It was written originally in Object Pascal and then translated, of course it's showing its age |
13:52:48 | FromDiscord | <dom96> (edit) "its" => "it's" |
13:52:53 | FromDiscord | <dom96> (edit) "it's" => "its" |
13:52:55 | FromDiscord | <Yardanico> yeah @dom96 maybe you're right that it was Status, I agree, but it still shows that if a feature is left without maintenance, it will just rot away |
13:53:15 | FromDiscord | <dom96> yep |
13:53:41 | FromDiscord | <Yardanico> In reply to @dom96 "The Nim compiler gets": exactly, I'm not saying someone's at fault for Nim compiler becoming older with each year |
13:53:56 | FromDiscord | <Yardanico> it's just that it's age is showing everywhere, you don't have to dig much, just read comments in the compiler source |
13:54:01 | FromDiscord | <Yardanico> or issues/PRs |
13:56:25 | FromDiscord | <haxscramper> Amount of code that I encountered, that pretty much dates back to 0.8.5 is insane actually |
13:56:31 | FromDiscord | <haxscramper> I knew it is there somewhere |
13:56:37 | FromDiscord | <Yardanico> I admit I'm not good at compiler development myself, but there are people who know it well |
13:56:37 | FromDiscord | <dom96> every code base is like this |
13:56:40 | FromDiscord | <haxscramper> I thought it was in small quantities |
13:57:17 | FromDiscord | <haxscramper> But if you dig enough with git blame, it is actually a lot more. There are couple commits that change styling/formatting |
13:57:17 | FromDiscord | <dom96> and rewriting from scratch is infamous for being very tough to pull off |
13:58:21 | FromDiscord | <haxscramper> Well, rewriting for the sake of rewriting - sure, but rewriting for the sake of getting rid of 'handle failed `static[]` check by bouncing exception through two compiler subsystems' - not so much |
13:58:52 | FromDiscord | <dom96> hah fun |
13:59:18 | FromDiscord | <haxscramper> Spent three whole days unwinding this, because I forgot to add exception in the error reporting hook |
13:59:36 | FromDiscord | <haxscramper> because guess what `globalError()` actualy means 'raise exception, maybe someone else will catch it' |
13:59:50 | FromDiscord | <haxscramper> and maybe this is an error, or maybe this is a `Option[Result]` |
13:59:54 | FromDiscord | <0ffh> True that at some point not rewriting from scratch causes more pain than actually doing it. |
13:59:57 | FromDiscord | <haxscramper> but no, someone hates `Result`/`Option` |
13:59:58 | FromDiscord | <Yardanico> From my point of view v2 is the breaking point for Nim more-or-less, if it's handled improperly, Nim will forever remain a relatively unpopular language |
14:00:07 | FromDiscord | <haxscramper> so have 80+ places which raise exceptions in compiler |
14:00:09 | FromDiscord | <haxscramper> for control flow |
14:00:18 | FromDiscord | <Yardanico> In reply to @0ffh "True that at some": yes, that's what is the case with the nim compiler in a lot of people's opinion (out of those who worked on the compiler) |
14:00:29 | FromDiscord | <haxscramper> In reply to @Yardanico "From my point of": well, you can say nimskull is v2-done-hard-way |
14:00:32 | FromDiscord | <haxscramper> see how it ges |
14:00:33 | FromDiscord | <Yardanico> In reply to @haxscramper "well, you can say": true |
14:00:35 | FromDiscord | <haxscramper> (edit) "ges" => "gooes" |
14:00:38 | FromDiscord | <Yardanico> In reply to @haxscramper "see how it gooes": yes, I'm watching that as well |
14:00:39 | FromDiscord | <haxscramper> learn from our mistakes if any |
14:00:40 | FromDiscord | <dom96> To me Nim is very much near perfect with some small bits that could be improved. |
14:00:50 | FromDiscord | <haxscramper> sure there will be some questionable decisions along the way |
14:00:51 | FromDiscord | <dom96> And a few things that could be removed. |
14:01:05 | FromDiscord | <haxscramper> although style insensetivity I don't really understand the hate |
14:01:16 | FromDiscord | <Phil> From a user's perspective it is mostly nice |
14:01:16 | FromDiscord | <Recruit_main707> Me neither |
14:01:17 | FromDiscord | <haxscramper> I got bit by it maybe two times, here and there |
14:01:33 | FromDiscord | <haxscramper> but like compared to amount of time I crashed the compiler this is basically nothing |
14:01:44 | FromDiscord | <haxscramper> I managed to crash g++ today |
14:01:47 | FromDiscord | <haxscramper> with nim code |
14:01:57 | FromDiscord | <haxscramper> C++ code generated by nim |
14:02:16 | * | kayabaNerve joined #nim |
14:02:27 | FromDiscord | <Phil> G++being some secret compiler? |
14:02:42 | FromDiscord | <0ffh> The gnu c++ compiler. |
14:02:52 | FromDiscord | <Yardanico> In reply to @Isofruit "G++being some secret compiler?": GCC's C++ frontend is called G++ |
14:02:59 | FromDiscord | <Phil> That has an extra name? Huh |
14:03:00 | FromDiscord | <Recruit_main707> There's gcc and g++ right? |
14:03:04 | FromDiscord | <Yardanico> In reply to @Recruit_main707 "There's gcc and g++": there's one GCC |
14:03:06 | FromDiscord | <haxscramper> `g++` is a binary name |
14:03:10 | FromDiscord | <Yardanico> it just supports multiple languages |
14:04:20 | FromDiscord | <haxscramper> and as for the language for v2 - I think the important part aside from more or less abstract 'refactoring' (takes huge amount of time to figure out what is wrong and come up with a proper conclusion) |
14:04:27 | FromDiscord | <haxscramper> there are more direct targets, like @Yardanico mentioned |
14:04:33 | FromDiscord | <haxscramper> "remove all backward compat hacks" |
14:04:44 | FromDiscord | <haxscramper> pretty directed, probably wont' raise too many objections |
14:06:10 | FromDiscord | <dom96> yeah, I think that will already improve the code base quality |
14:07:19 | FromDiscord | <haxscramper> There wont' be any dramatic changes from that, but this is certainly a step in the right direction |
14:07:26 | FromDiscord | <0ffh> Probably the best first step.↵Get rid of all unneccessary cruft before trying to refactor. |
14:07:42 | FromDiscord | <haxscramper> There are more fundamental considersations, like DOD AST that Araq apparently writes a book about |
14:07:47 | FromDiscord | <haxscramper> At least he mentioned this |
14:08:05 | FromDiscord | <haxscramper> That might bring some improvements in the overall architecture structure |
14:08:22 | FromDiscord | <Yardanico> wait he said it'd be around DOD AST? |
14:08:28 | FromDiscord | <Yardanico> i didn't know that |
14:08:35 | FromDiscord | <Yardanico> i did see him mention the book |
14:09:07 | FromDiscord | <haxscramper> well, this was a DM discussion, but the quote is ↵> "data oriented design for compilers" or something, not sure |
14:10:03 | FromDiscord | <haxscramper> So that's not exactly confirmed or anything, the plans might've changed since then |
14:10:47 | FromDiscord | <haxscramper> But data-oriented approach is what we are doing as well, but this raises a lot of other concerns that also need to be adresses |
14:10:52 | FromDiscord | <ambient> is openarray something i can use to create views into arrays? |
14:11:02 | FromDiscord | <Yardanico> yes, with experimental:views |
14:11:04 | FromDiscord | <ambient> like i just want to qsort a part of an array |
14:12:23 | * | vicfred joined #nim |
14:14:02 | FromDiscord | <Phil> In reply to @haxscramper "There wont' be any": I mean, I'd assume the maintenance workload would significantly drop, which I'm strongly in favour off (which is mostly because I don't care about the backwards compat as a new user, egoisitic I know) as it frees up resources for other areas |
14:15:44 | FromDiscord | <haxscramper> Not significantly |
14:15:56 | FromDiscord | <Phil> Dang |
14:16:25 | FromDiscord | <haxscramper> There is no breakdown on where most of the work goes, but I feel it is mostly spent on fixing new features |
14:16:37 | FromDiscord | <haxscramper> Codegen errors, other bugs |
14:16:40 | FromDiscord | <dom96> only significant improvement you'll get is from rewriting fully (or at least major components) |
14:17:39 | FromDiscord | <haxscramper> Backward compat hacks make the code more brittle, since you need to balance multiple targets at once |
14:19:28 | * | noeontheend_ joined #nim |
14:19:45 | FromDiscord | <Yardanico> and I think there were multiple cases when some general improvement was reverted because it regressed for some backwards-compat cases |
14:19:51 | FromDiscord | <Yardanico> not a whole lot, but still |
14:21:21 | * | noeontheend quit (Ping timeout: 276 seconds) |
14:30:04 | * | noeontheend_ quit (Remote host closed the connection) |
14:45:07 | * | neceve quit (Ping timeout: 240 seconds) |
14:48:17 | FromDiscord | <Rika> Regards case insensitivity, I think it’s fine, perhaps, if it’s removed, since we’re telling people “by the way use camel case otherwise 😡😡😡😡” anyway |
14:48:42 | FromDiscord | <Rika> I’m not explicitly for removing it though |
14:59:36 | FromDiscord | <Solitude> In reply to @Rika "Regards case insensitivity, I": we tell them, but they are free to stay wrong and use their stuff tho, and we arent stuck with their mistakes. |
15:04:26 | * | rockcavera quit (Remote host closed the connection) |
15:07:56 | FromDiscord | <ShalokShalom> sent a long message, see http://ix.io/3WFb |
15:08:25 | FromDiscord | <Yardanico> sorry, I read your message, but I still don't get how that relates to my message |
15:08:31 | FromDiscord | <Rika> Me neither |
15:09:34 | FromDiscord | <ShalokShalom> I am looking at alternative programming languages since couple of years, and literally everyone is trying to convince people, who a) dont have a choice in the first place and b) have their brains (and hearts) already convinced that its not worth learning another language. ↵↵I have yet to see a language that sees, how new programmers are optimal for a NEW language. Quite surprising, I guess. |
15:10:21 | FromDiscord | <ShalokShalom> So Nim will, to come to your point, forever be comparatively small, until it realizes that. Its a niche language, since the target audience is niche. |
15:11:03 | FromDiscord | <Solitude> realises what |
15:11:08 | FromDiscord | <Solitude> what are you suggesting |
15:11:23 | FromDiscord | <ShalokShalom> Proof my point |
15:11:49 | FromDiscord | <Solitude> what |
15:14:35 | FromDiscord | <eyecon> I think he's saying that getting popular is impossible by getting established users of other languages to switch, but rather by attracting people new to programming |
15:14:43 | FromDiscord | <eyecon> But I don't know why he says that either |
15:18:14 | FromDiscord | <Alea> Which is nonsense because attracting established users is how you get your language cemented as an actively used tool worth learning |
15:18:35 | FromDiscord | <Alea> If you only attract new users it'll just be a learning / hobby tool forever |
15:22:55 | FromDiscord | <deadmeme77> In reply to @ShalokShalom "I am looking at": You have Scheme/Racket for that |
15:22:59 | FromDiscord | <konsumlamm> Rust didn't get popular by attracting people new to programming, quite the opposite |
15:24:11 | FromDiscord | <Alea> Nim would certainly benefit from doing both though |
15:35:45 | * | neceve joined #nim |
15:44:09 | * | vicfred quit (Quit: Leaving) |
15:52:57 | * | duuude quit (Ping timeout: 272 seconds) |
15:59:03 | * | tk quit (Ping timeout: 260 seconds) |
16:03:24 | * | duuude joined #nim |
16:11:35 | FromDiscord | <Knedlik> sent a code paste, see https://play.nim-lang.org/#ix=3WFo |
16:12:12 | FromDiscord | <Knedlik> Also entities is `seq[ref Entity]`, so I would assume it does that automatically |
16:12:46 | FromDiscord | <Knedlik> (edit) "Also" => "~~Also" | "automatically" => "automatically~~Scratch that it isn't" |
16:18:54 | FromDiscord | <demotomohiro> If sceneIn[].entities is seq of object, changing it to a seq of ref object makes entity a ref. |
16:19:55 | FromDiscord | <demotomohiro> Why do you want to make `entity` to a ref? |
16:20:41 | FromDiscord | <Knedlik> Inheritance |
16:20:54 | FromDiscord | <demotomohiro> You can also create new `ref Entity` and copy `entity` to it. |
16:20:59 | FromDiscord | <Knedlik> It's part of a bigger problem tbh |
16:22:12 | FromDiscord | <Knedlik> In my engine, a `ref object of Entity` does get "added" into the `entities` seq of `registry.nim`, but when calling `isRegistered` on it, it returns false |
16:22:14 | FromDiscord | <Knedlik> https://github.com/Periapsis-Studios/Periapsis-Engine |
16:24:40 | FromDiscord | <demotomohiro> `Entity = ref object of RootObj` and Scene = object of RootObj↵ entities: seq[Entity] |
16:25:25 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=3WFq |
16:26:14 | FromDiscord | <Knedlik> That means I need to fucking dereference it to render it :facepalm: |
16:26:23 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=3WFr |
16:26:28 | FromDiscord | <Knedlik> (edit) "That means I need to ... fucking" added "logically" |
16:28:52 | * | duuude quit (Ping timeout: 250 seconds) |
16:33:00 | FromDiscord | <Knedlik> Why tf doesn't it want to render |
16:33:11 | FromDiscord | <Knedlik> Or more specifically, at the correct location |
16:34:38 | FromDiscord | <Knedlik> Oh nvm I'm dum dum |
16:38:01 | * | duuude joined #nim |
16:38:17 | FromDiscord | <Knedlik> Why tf does `update()` of `iconEntity.nim` not run? https://github.com/Periapsis-Studios/Beyond-the-Sphere |
16:38:58 | FromDiscord | <Knedlik> I'm starting to evaluate the possibilities of rewriting this thing in the classes lib |
16:48:53 | FromDiscord | <spoon> do i have to any configuration to make nimlsp work with vscode? |
16:50:19 | FromDiscord | <Yardanico> you have to install a nim lsp client |
16:50:36 | FromDiscord | <Yardanico> vscode, being created by Microsoft who also created LSP, doesn't support LSP the "generic way" |
16:50:43 | FromDiscord | <Yardanico> you _must_ have an extension that supports that specific LSP server |
16:51:00 | FromDiscord | <Yardanico> but all other editors supporting LSP support them without the need to create specific language extensions |
16:51:23 | FromDiscord | <spoon> ah, so i would need a whole extension and not just a config file |
16:51:31 | FromDiscord | <Yardanico> there is already one |
16:51:36 | FromDiscord | <Yardanico> but it wasn't updated in a long time |
16:51:43 | FromDiscord | <Yardanico> https://marketplace.visualstudio.com/items?itemName=bung87.vscode-nim-lsp |
16:51:49 | FromDiscord | <Yardanico> ah actually 4 months ago, not that bad |
16:52:23 | FromDiscord | <spoon> doesn't work with generic ones? |
16:53:04 | FromDiscord | <Yardanico> In reply to @spoon "doesn't work with generic": no, as I said, vscode is the only editor that's so "special" about LSP |
16:53:13 | FromDiscord | <Yardanico> microsoft is still microsoft even today I guess |
16:53:38 | FromDiscord | <d4rckh> is there any flag to make a socket client attempt to auto connect? |
16:53:43 | FromDiscord | <d4rckh> (edit) "connect?" => "connect if the server goes down?" |
16:53:46 | FromDiscord | <Yardanico> don't think so |
16:53:57 | FromDiscord | <Yardanico> the implementation is rather simple, you'll probably have to implement that yourself |
16:54:03 | FromDiscord | <Yardanico> i mean the sockets impl in nim |
16:54:05 | FromDiscord | <d4rckh> i probably will |
16:54:06 | FromDiscord | <Yardanico> it's not really abstracted much |
16:54:34 | FromDiscord | <d4rckh> i cant think of any other way that doesnt use recursion, or it wouldnt be a problem if i do |
16:54:47 | FromDiscord | <Yardanico> iterative way maybe? |
16:54:58 | FromDiscord | <d4rckh> hmm, yeah |
16:55:33 | FromDiscord | <d4rckh> if i find a way to break a while loop from another while loop |
16:55:40 | FromDiscord | <Yardanico> there's `block` for that |
16:55:43 | FromDiscord | <d4rckh> nvm |
16:55:50 | FromDiscord | <d4rckh> (edit) "nvm" => "nvm, i think i can do something" |
16:55:59 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3WFA |
16:56:08 | FromDiscord | <Yardanico> lightweight goto ;) |
16:56:14 | FromDiscord | <Yardanico> https://nim-lang.org/docs/manual.html#statements-and-expressions-block-statement |
16:56:39 | FromDiscord | <Yardanico> (edit) "https://play.nim-lang.org/#ix=3WFA" => "https://play.nim-lang.org/#ix=3WFB" |
16:56:46 | FromDiscord | <d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=3WFC |
16:56:46 | FromDiscord | <Yardanico> well, or this |
16:57:00 | FromDiscord | <eyecon> sent a code paste, see https://paste.rs/t2p |
16:57:01 | FromDiscord | <d4rckh> (edit) "https://play.nim-lang.org/#ix=3WFC" => "https://play.nim-lang.org/#ix=3WFD" |
16:57:22 | FromDiscord | <Yardanico> In reply to @eyecon "A question regarding AES": you can copy into it, but only if you preallocated the size before and, specifically for ARC, made sure to call `prepareMutation` because strings with ARC are CoW by default |
16:58:31 | FromDiscord | <Yardanico> sent a code paste, see https://paste.rs/qAr |
16:58:37 | FromDiscord | <Yardanico> new[5] is because we start from the 6th char here, to not overwrite the first "hello" |
16:59:04 | FromDiscord | <eyecon> I did preallocate, but didn't know about them being CoW, nor about `prepareMutation`. Thanks, let me check the documentation |
16:59:19 | FromDiscord | <Yardanico> without prepareMutation in case of an error you'll usually get a SIGSEGV or a SIGBUS |
16:59:27 | FromDiscord | <Yardanico> just call it on `new` before the `copyMem` |
16:59:39 | FromDiscord | <Yardanico> sent a code paste, see https://paste.rs/8mL |
16:59:50 | FromDiscord | <eyecon> OK, makes sense, thanks a lot - let me try it |
17:00:16 | FromDiscord | <eyecon> Just do make doubly sure: `newString` allocates, right? |
17:00:27 | FromDiscord | <eyecon> (edit) "do" => "to" |
17:00:29 | FromDiscord | <Yardanico> yes |
17:02:10 | FromDiscord | <d4rckh> should i catch it? |
17:02:19 | FromDiscord | <d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=3WFH |
17:02:45 | FromDiscord | <Yardanico> probably, honestly I only used raw sockets a few times and not extensively, so I'm not that good at working with them |
17:03:08 | FromDiscord | <d4rckh> actually, it shouldnt error at all and just connect |
17:09:01 | FromDiscord | <eyecon> sent a code paste, see https://play.nim-lang.org/#ix=3WFJ |
17:09:07 | FromDiscord | <eyecon> I suspect I'm making a dumb mistake somewhere |
17:10:28 | FromDiscord | <eyecon> No problems with the decryption, the middle echo reports fine, the decrypted excerpt gets printed |
17:10:35 | FromDiscord | <eyecon> It's just the copying that fails |
17:11:12 | FromDiscord | <Yardanico> can i replace ciphertext with something to test it myself? |
17:11:27 | FromDiscord | <eyecon> Yes, sure, I can prepare something for you even, gimme a minute |
17:11:54 | FromDiscord | <eyecon> Or you can take: https://cryptopals.com/static/challenge-data/7.txt |
17:12:09 | FromDiscord | <eyecon> Which I renamed to `challenge7.txt` |
17:12:29 | FromDiscord | <eyecon> That's easier I guess |
17:13:00 | FromDiscord | <Yardanico> ah but of course @eyecon |
17:13:18 | FromDiscord | <Yardanico> it's a common mistake, `addr decryptedBlock` takes the address of the string itself |
17:13:25 | FromDiscord | <Yardanico> and strings are GC'd so they have headers and suchj |
17:13:26 | FromDiscord | <Yardanico> (edit) "suchj" => "such" |
17:13:34 | FromDiscord | <eyecon> Ah, so `[0]`? |
17:13:36 | FromDiscord | <Yardanico> do `addr decryptedBlock[0]` instead and it works |
17:13:36 | FromDiscord | <Yardanico> yeah |
17:14:00 | FromDiscord | <eyecon> Thanks a lot! |
17:14:04 | FromDiscord | <eyecon> Now it works |
17:14:19 | FromDiscord | <Yardanico> it's a common mistake when dealing with `addr`, maybe it should become a warning or a hint of its own :) |
17:14:58 | FromDiscord | <eyecon> Yes, but one should be prepared to deal with these kind of things when playing with low-level stuff |
17:15:00 | FromDiscord | <eyecon> I'm learning |
17:15:37 | FromDiscord | <eyecon> Thanks again for the support |
17:33:46 | FromDiscord | <d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=3WFR |
17:34:10 | FromDiscord | <d4rckh> in my read like while loop i got this sleepAsync `await asyncdispatch.sleepAsync(100)`, i tried increasing the number to like 1000 but that didnt change much |
17:34:26 | FromDiscord | <enthus1ast> prompt will block |
17:34:43 | FromDiscord | <enthus1ast> for this you need some async read |
17:34:48 | FromDiscord | <enthus1ast> eg the one from illwill |
17:36:27 | FromDiscord | <d4rckh> everything gets executed along with the read line, except prompt, i dont get why |
17:36:31 | FromDiscord | <enthus1ast> or maybe i misunderstand |
17:36:44 | FromDiscord | <d4rckh> i do have the read line in an async function already |
17:36:56 | FromDiscord | <d4rckh> the problem is with the prompt proc, which blocks everything for some reason |
17:37:12 | FromDiscord | <d4rckh> `proc prompt(server: Server)` |
17:37:16 | FromDiscord | <d4rckh> its just a simple proc |
17:37:21 | FromDiscord | <d4rckh> nothing fancy |
17:37:57 | FromDiscord | <Yardanico> but prompt isn't async? |
17:37:57 | FromDiscord | <d4rckh> in the proc i got another `stdout.styledWrite` and some `if`'s |
17:38:25 | FromDiscord | <d4rckh> well cConnected isnt async either, and i run it from an async function, which doesnt block, unless i add the prompt call in it |
17:38:41 | FromDiscord | <d4rckh> (edit) "block," => "block when i call it," |
17:38:55 | FromDiscord | <enthus1ast> so you call cConnected from an async proc? |
17:38:59 | FromDiscord | <d4rckh> yes |
17:39:01 | FromDiscord | <enthus1ast> Then yes, this will not work |
17:39:07 | FromDiscord | <enthus1ast> since the readline blocks |
17:39:11 | FromDiscord | <d4rckh> no |
17:39:17 | FromDiscord | <d4rckh> if i remove the prompt call |
17:39:23 | FromDiscord | <d4rckh> cConnected does not block anything |
17:39:31 | FromDiscord | <d4rckh> and everything works normally |
17:39:35 | FromDiscord | <enthus1ast> yeah because its just a write |
17:39:51 | FromDiscord | <enthus1ast> but the stdin.readline blocks until you hit enter |
17:40:14 | FromDiscord | <d4rckh> this is prompt |
17:40:15 | FromDiscord | <d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=3WFT |
17:40:17 | FromDiscord | <enthus1ast> the write will prolly also block, but its quite fast |
17:40:36 | FromDiscord | <d4rckh> the readline runs in a thread |
17:40:47 | FromDiscord | <d4rckh> (edit) "thread" => "thread, in another async proc" |
17:40:52 | FromDiscord | <d4rckh> (edit) "the readline runs in a thread, in ... another" added "a completely" |
17:40:57 | FromDiscord | <d4rckh> (edit) "another" => "other" |
17:41:42 | FromDiscord | <d4rckh> In reply to @enthus1ast "the write will prolly": well then why a write does not block, while 2 do |
17:42:23 | FromDiscord | <enthus1ast> two writes also should not |
17:42:37 | FromDiscord | <enthus1ast> can you share a more complete code example? |
17:42:55 | FromDiscord | <d4rckh> what do you wanna see? |
17:42:59 | FromDiscord | <d4rckh> the read line code? |
17:43:23 | FromDiscord | <enthus1ast> the flow |
17:43:50 | FromDiscord | <d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=3WFU |
17:43:51 | FromDiscord | <d4rckh> this is basically my main function |
17:44:24 | FromDiscord | <d4rckh> sent a code paste, see https://paste.rs/eeK |
17:45:06 | FromDiscord | <d4rckh> this is processMessages, which is called from createNewTcpListener when a new client is connected |
17:46:45 | FromDiscord | <d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=3WFV |
17:46:45 | FromDiscord | <d4rckh> and this is procStdin |
17:47:24 | FromDiscord | <d4rckh> well cDisconnected is another function but its exactly the same as cConnected with a word change |
17:47:37 | * | jmdaemon joined #nim |
17:48:03 | FromDiscord | <enthus1ast> and prompt is just a write? |
17:50:58 | FromDiscord | <d4rckh> basically |
17:51:14 | FromDiscord | <enthus1ast> and the "#..." part does this block? |
17:51:29 | FromDiscord | <enthus1ast> at least what i see here it should work |
17:51:30 | FromDiscord | <2F42BBA1> is there something like werkzeug for nim? |
17:51:40 | FromDiscord | <d4rckh> this is the full function |
17:51:42 | FromDiscord | <d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=3WFZ |
17:52:57 | FromDiscord | <enthus1ast> looks good so far |
17:53:20 | FromDiscord | <enthus1ast> (well, style wise there is also a strformat module, to avoid the concatination) |
17:53:38 | FromDiscord | <d4rckh> (edit) "https://play.nim-lang.org/#ix=3WFZ" => "https://play.nim-lang.org/#ix=3WG1" |
17:53:46 | FromDiscord | <d4rckh> that does not work with terminal's colors |
17:53:57 | FromDiscord | <enthus1ast> ok i see |
17:54:18 | FromDiscord | <d4rckh> its so weird |
17:55:01 | FromDiscord | <enthus1ast> and it works when you remove one prompt call? |
17:55:19 | FromDiscord | <d4rckh> yes |
17:55:24 | FromDiscord | <enthus1ast> which one? |
17:55:33 | FromDiscord | <d4rckh> the one from cConnected |
17:56:01 | FromDiscord | <d4rckh> In reply to @d4rckh "i have this proc": the first `styledWriteLine` runs, while the `styledWriteLine` from `prompt` does only after i press enter once |
17:57:50 | FromDiscord | <enthus1ast> does the whole application blocks then? |
17:59:15 | FromDiscord | <d4rckh> no, until a new client connects |
17:59:33 | FromDiscord | <d4rckh> when a new client connects, it runs the prompt call (without me having to press enter) but then it blocks again |
18:02:39 | * | Zectbumo joined #nim |
18:04:50 | FromDiscord | <enthus1ast> can you try stdout.flushFile() |
18:04:57 | FromDiscord | <enthus1ast> in your prompt functions? |
18:05:30 | FromDiscord | <d4rckh> before or after the writeline call? |
18:05:56 | FromDiscord | <enthus1ast> after the write call |
18:05:59 | FromDiscord | <d4rckh> ok that fixed it |
18:06:00 | FromDiscord | <d4rckh> wow |
18:06:05 | FromDiscord | <enthus1ast> nice |
18:06:05 | FromDiscord | <d4rckh> what happened? |
18:06:41 | FromDiscord | <enthus1ast> it depends on the terminal (i think) when it flushes the output buffer. |
18:07:09 | FromDiscord | <enthus1ast> basically every time you really need to see something on time, better flush the buffer manually |
18:44:42 | FromDiscord | <yttriy> sent a code paste, see https://play.nim-lang.org/#ix=3WGe |
18:49:29 | * | tk joined #nim |
18:52:00 | FromDiscord | <Yardanico> In reply to @yttriy "Hello, I have this": I think you should call enableTrueColors before |
18:52:23 | FromDiscord | <Yardanico> yes, it doesn't actually "enable" them, but it records that your terminal indeed supports true color |
18:52:33 | FromDiscord | <Yardanico> try this |
18:52:36 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3WGf |
18:54:37 | FromDiscord | <yttriy> Already tried it, nothing has changed |
18:54:40 | FromDiscord | <Yardanico> that's really weird |
18:55:30 | FromDiscord | <Yardanico> In reply to @yttriy "Already tried it, nothing": can you try editing yournimfolder/lib/pure/terminal.nim and adding an echo after ` (ver.dwMinorVersion == 0 and ver.dwBuildNumber >= 10586)))` with another indent? |
18:55:57 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3WGg |
18:56:12 | FromDiscord | <Yardanico> maybe the logic it's using for detecting version is wrong |
18:56:26 | FromDiscord | <Yardanico> ah actually |
18:56:32 | FromDiscord | <Yardanico> @yttriy can you show your full windows build number? |
18:56:35 | FromDiscord | <Yardanico> i can check mine i mean lol |
18:56:57 | FromDiscord | <Recruit_main707> he is on windows 11 |
18:57:00 | FromDiscord | <Yardanico> yes |
18:57:07 | FromDiscord | <Yardanico> but windows 10 has major version as 10 |
18:57:10 | FromDiscord | <Yardanico> this code is already a bit wrong |
18:57:19 | FromDiscord | <Recruit_main707> thats probably it |
18:57:28 | FromDiscord | <Yardanico> yep lemme check |
18:57:28 | * | duuude quit (Ping timeout: 248 seconds) |
18:57:52 | FromDiscord | <Yardanico> actually no, it works for me on win 11 🤷 |
18:57:57 | FromDiscord | <Yardanico> maybe because of vscode, hmm |
18:58:25 | FromDiscord | <Yardanico> nope, it works even in the windows terminal |
18:58:50 | FromDiscord | <Yardanico> `(dwOSVersionInfoSize: 276, dwMajorVersion: 10, dwMinorVersion: 0, dwBuildNumber: 22000, dwPlatformId: 2, szCSDVersion: ...)` |
18:59:07 | FromDiscord | <Yardanico> it falls under `(ver.dwMinorVersion == 0 and ver.dwBuildNumber >= 10586)` which returns true |
18:59:16 | FromDiscord | <Yardanico> wait @yttriy maybe you're on some windows 11 insider build? |
18:59:37 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3WGi |
18:59:38 | FromDiscord | <Yardanico> or just show your whole windows build number (just open cmd) |
18:59:49 | FromDiscord | <Yardanico> this version part https://media.discordapp.net/attachments/371759389889003532/970036772228714506/unknown.png |
19:00:32 | FromDiscord | <Recruit_main707> in windows 11 `ver.dwMajorVersion` isnt `> 10`? |
19:00:37 | FromDiscord | <Yardanico> In reply to @Recruit_main707 "in windows 11 `ver.dwMajorVersion`": yes, but this is `or` |
19:00:46 | FromDiscord | <Yardanico> and windows 11 has build number way higher than 10586 |
19:01:06 | FromDiscord | <Yardanico> @Recruit_main707 ` term.trueColorIsSupported = ver.dwMajorVersion > 10 or (ver.dwMajorVersion == 10 and (ver.dwMinorVersion > 0 or (ver.dwMinorVersion == 0 and ver.dwBuildNumber >= 10586)))` in single line |
19:01:41 | FromDiscord | <yttriy> In reply to @Yardanico "<@694122485087600732> can you show": 22000.556 |
19:01:48 | FromDiscord | <Yardanico> well, then I don't see why would it return false |
19:01:53 | FromDiscord | <Yardanico> unless the win api call is failing for some reason? |
19:02:08 | FromDiscord | <Yardanico> In reply to @Yardanico "can you edit enableTrueColors": @yttriy can you patch your terminal.nim like this to output ver? |
19:02:52 | FromDiscord | <Yardanico> or just @yttriy execute this: |
19:03:03 | FromDiscord | <Recruit_main707> In reply to @Yardanico "yes, but this is": `true or [whatever] = true`? or am i dumb |
19:03:04 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3WGm |
19:03:12 | FromDiscord | <Yardanico> In reply to @Recruit_main707 "`true or [whatever] =": yes |
19:03:17 | FromDiscord | <Yardanico> it is true |
19:03:58 | FromDiscord | <yttriy> sent a code paste, see https://play.nim-lang.org/#ix=3WGo |
19:03:59 | FromDiscord | <Yardanico> ehm |
19:04:03 | FromDiscord | <Yardanico> why does it return windows 7 |
19:04:09 | FromDiscord | <Yardanico> ahh, are you perhaps running your app in compatibility mode?! |
19:04:15 | FromDiscord | <Yardanico> or the windows terminal |
19:04:51 | FromDiscord | <Yardanico> 9200 is the first official RTM build number for Windows 8, so maybe you have set compatibility mode to Windows 8 in some settings and forgot to turn it off? |
19:05:11 | FromDiscord | <yttriy> In reply to @Yardanico "ahh, are you perhaps": No ofc |
19:05:28 | FromDiscord | <Yardanico> well, then I'm at a loss, maybe it's some sandboxing app or something, but there's really nothing Nim can do about it |
19:05:40 | FromDiscord | <Yardanico> It's really not Nim's fault that the OS API is returning build number for Windows 8 |
19:05:45 | * | kenran joined #nim |
19:28:04 | FromDiscord | <yttriy> Anyway thanks for the help. Actually Windows 11 works very badly on my computer, there are always bugs and small glitches. Also, Nim changes the language in my console - i have two computers and it changes my console language on both of them. This is very annoying, maybe I need to switch to Linux |
19:31:11 | FromDiscord | <Recruit_main707> weird, how does it change the language tho? in error messages and such? |
19:31:29 | FromDiscord | <Recruit_main707> like, cmd error messages, not the nim ones :P |
19:33:33 | FromDiscord | <yttriy> In reply to @Recruit_main707 "like, cmd error messages,": Yes |
19:35:15 | FromDiscord | <Recruit_main707> how exactly, , you do something like, `nim c ...` |
19:35:21 | FromDiscord | <Yardanico> In reply to @Recruit_main707 "how exactly, , you": that can happen, yes |
19:35:29 | FromDiscord | <Yardanico> @Recruit_main707 do you want even funnier stuff? |
19:35:39 | FromDiscord | <Recruit_main707> im all in for funny stuff |
19:35:48 | FromDiscord | <Yardanico> i remember in the distant past when I was on LXQt (or maybe XFCE) and compiling Nim from source, it was changing my keyboard layout to english and removing russian layout |
19:35:49 | FromDiscord | <Yardanico> for some reason |
19:35:53 | FromDiscord | <Yardanico> 🤷 |
19:35:58 | FromDiscord | <Yardanico> maybe that wasn't nim but some program compilation |
19:36:04 | FromDiscord | <Yardanico> maybe SerenityOS, don't remember |
19:37:19 | FromDiscord | <Recruit_main707> it would be even funnier if it changed to russian for someone who doesnt know russian, you cannot even search for help |
19:39:11 | FromDiscord | <Yardanico> <serious mode on>modern search engines automatically switch layout on text written in incorrect layout<serious mode off> |
19:39:28 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/970046751681687602/unknown.png |
19:39:37 | FromDiscord | <Yardanico> (and yes, that text doesn't make sense in russian at all) |
19:39:42 | FromDiscord | <Yardanico> just random letters obviously |
19:40:19 | FromDiscord | <Recruit_main707> omg thats so fucking genius |
19:40:32 | FromDiscord | <Yardanico> well, that's what we (bilinguals or more) have to deal with |
19:41:25 | FromDiscord | <Yardanico> most people who use entirely different alphabets know the pain of forgetting to switch layout when you're typing something |
19:41:39 | FromDiscord | <Yardanico> although that mostly applies to people who look at the keyboard when typing (so, the majority) |
19:42:30 | FromDiscord | <spoon> sent a code paste, see https://play.nim-lang.org/#ix=3WGt |
19:42:40 | FromDiscord | <spoon> confused |
19:42:48 | FromDiscord | <Yardanico> yes, invalid order, enum elements must be in ascending order |
19:42:59 | FromDiscord | <spoon> ah |
19:43:18 | FromDiscord | <spoon> so i would have to look at each colors value |
19:43:21 | FromDiscord | <Yardanico> yes |
19:43:29 | FromDiscord | <Yardanico> or you can write a macro to fix that for you automatically (TM) |
19:43:38 | FromDiscord | <spoon> yeah was just thinking that |
19:44:04 | FromDiscord | <Yardanico> in other languages: you can't do that↵in nim: you can't do that, but you can write a macro to do that |
19:44:29 | FromDiscord | <spoon> haven't played with macros too much |
19:44:59 | FromDiscord | <demotomohiro> @yttriy @Recruit_main707 Nim change codepage to utf-8 on windows because Nim only support utf-8 encoding. That can make command line program print error english or does not print local language message correctly. There is an option to disabling changing codepage on start. |
19:47:10 | FromDiscord | <demotomohiro> https://github.com/nim-lang/Nim/blob/4680ab61c06782d142492d1fcdebf8e942373c09/lib/std/syncio.nim#L855 |
19:50:13 | FromDiscord | <demotomohiro> I think microsoft should provide a terminal that supports utf-8 and works with local language. |
19:51:51 | FromDiscord | <Zectbumo> https://superuser.com/questions/269818/change-default-code-page-of-windows-console-to-utf-8 |
19:57:09 | FromDiscord | <yttriy> sent a long message, see http://ix.io/3WGu |
19:57:11 | * | neceve quit (Ping timeout: 256 seconds) |
19:57:30 | FromDiscord | <yttriy> (edit) "http://ix.io/3WGu" => "https://paste.rs/WUP" |
19:57:46 | FromDiscord | <Yardanico> In reply to @yttriy "by the way, i": yeah, I know that for languages that have complex characters it's harder to type than for languages like english or russian |
19:58:41 | FromDiscord | <Zodey> Hello, its me again. Sorry for asking everything, but which gui library would you recommend? I want one which supports windows, linux and android as well. I looked at nimx and nim-lang/sdl2. For me sdl2 is the preferred, but i have no idea how to compile it. Maybe i need to convert nim to C then use the ndk build script on that c file, but will like http request work? If you have a better solution, please let me know, thanks |
19:59:02 | FromDiscord | <spoon> i forgot the program but i had japanese input set up on manjaro |
19:59:27 | FromDiscord | <Yardanico> In reply to @Zodey "Hello, its me again.": sdl2 is not a GUI library, it's a generic graphical framework for writing multimedia applications (usually games) |
19:59:33 | FromDiscord | <Yardanico> it doesn't offer UI primitives by itself at all |
20:00:10 | FromDiscord | <Yardanico> "windows, linux and android as well" i don't think there's a ready-to-use usable solution honestly |
20:00:12 | FromDiscord | <Yardanico> because of android mainly |
20:00:29 | FromDiscord | <Zodey> Yeah, i was aware of that |
20:01:27 | FromDiscord | <Zodey> In reply to @Yardanico "it doesn't offer UI": So, i should use like glfw for that with opengl? |
20:01:41 | FromDiscord | <Yardanico> if you want to draw UI all by yourself, you can even use SDL2, but it'll be really hard |
20:01:47 | FromDiscord | <Yardanico> especially considering you'll have to care for DPI, touch input, etc |
20:02:00 | FromDiscord | <Zodey> I saw the imgui binding as well |
20:02:02 | FromDiscord | <Yardanico> at least use something like https://github.com/ocornut/imgui then I guess |
20:02:17 | FromDiscord | <Yardanico> although imgui isn't really made as a general-purpose UI library, it's more for editors/debugging tools/etc |
20:02:47 | FromDiscord | <Zodey> I used imgui with c++, so maybe it would be the best solution |
20:02:50 | FromDiscord | <spoon> nimgl has glfw/opengl/imgui bindings so there's that |
20:03:48 | FromDiscord | <Zodey> In reply to @spoon "nimgl has glfw/opengl/imgui bindings": I will look at it, thanks ;) |
20:03:50 | FromDiscord | <spoon> i also saw the nimraylib_now repo comes with raygui bindings |
20:06:29 | FromDiscord | <Zodey> In reply to @spoon "nimgl has glfw/opengl/imgui bindings": Btw imgui = glfw + opengl isnt it? Or glfw + vulkan for examle |
20:06:55 | FromDiscord | <Yardanico> imgui doesn't need a window system itself |
20:07:02 | FromDiscord | <Yardanico> it can draw to anything in theory, even a file |
20:07:28 | FromDiscord | <demotomohiro> Maybe this list of Nim libraries help you: https://github.com/xflywind/awesome-nim |
20:08:12 | FromDiscord | <Zodey> In reply to @demotomohiro "Maybe this list of": I saw it, thank you, i just couldnt make a choice |
20:08:43 | FromDiscord | <Zodey> But now i think i will use something which uses imgui |
20:09:12 | FromDiscord | <Recruit_main707> you cant choose a library because there isnt↵I cant choose because there are too many↵↵we are not the same |
20:09:25 | FromDiscord | <triangle the elizvals> In reply to @Yardanico "especially considering you'll have": Try cairo maybe |
20:09:40 | FromDiscord | <triangle the elizvals> Oh waiy |
20:09:48 | FromDiscord | <triangle the elizvals> Thats not available on mobile |
20:11:12 | FromDiscord | <Zodey> Well, if i compile nim to c then to .so it should run on mobile (if im using opengl) |
20:11:24 | FromDiscord | <Yardanico> it's not like that, and that's not even a question |
20:11:31 | FromDiscord | <Yardanico> of course you can make android apps with nim |
20:11:38 | FromDiscord | <Yardanico> the question is what gui framework should you use |
20:11:59 | FromDiscord | <Yardanico> you know, imgui isn't made for touch input really, so i don't know how easy it will be to add e.g. swiping and stuff |
20:20:32 | * | xet7 quit (Remote host closed the connection) |
20:25:49 | * | kenran quit (Quit: WeeChat info:version) |
20:30:49 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3WGE |
20:30:58 | FromDiscord | <Elegantbeef> How are what called? |
20:31:07 | FromDiscord | <!Patitotective> linux, windows and osx |
20:31:14 | FromDiscord | <!Patitotective> is it osx or macos? |
20:32:06 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/Nim/wiki/Consts-defined-by-the-compiler |
20:42:29 | FromDiscord | <Yardanico> @ElegantBeef wait, why did you complain about full case insensitivity in the RFC? |
20:42:35 | FromDiscord | <Yardanico> it's about _removing_ case insensitivity fully |
20:42:44 | FromDiscord | <Yardanico> not about making it fully case sensitive |
20:42:50 | FromDiscord | <Elegantbeef> Misread |
20:42:59 | FromDiscord | <Yardanico> happens to all of us :) |
20:43:13 | FromDiscord | <Elegantbeef> Can i really not delete a message |
20:43:16 | FromDiscord | <Elegantbeef> The fuck is github |
20:43:26 | FromDiscord | <Yardanico> you can hide it or edit it out |
20:43:32 | FromDiscord | <Yardanico> better do both together |
20:43:55 | FromDiscord | <Elegantbeef> Dont think i can hide it only admins of the repo can |
20:44:12 | FromDiscord | <Yardanico> then edit it out :( |
20:45:35 | FromDiscord | <kiell> are templates/macros really that slow |
20:45:54 | FromDiscord | <Elegantbeef> Templates arent, macros can be depending what you're doing |
20:46:17 | FromDiscord | <Elegantbeef> But i mean it's only compile time slow downs |
20:46:56 | FromDiscord | <Yardanico> In reply to @kiell "are templates/macros really that": compile-time slow isn't runtime slow :) |
20:47:13 | FromDiscord | <Yardanico> and most of the time they're fast enough, as Beef said, it depends on what you're doing with them |
20:47:52 | FromDiscord | <Yardanico> and templates should usually be almost negligible |
20:47:58 | FromDiscord | <Yardanico> unless you're doing tons of `when` in them |
21:00:08 | * | def- quit (Quit: -) |
21:01:11 | * | def- joined #nim |
21:50:36 | * | Gustavo6046 joined #nim |
21:51:30 | * | Gustavo6046 quit (Remote host closed the connection) |
21:51:57 | * | Gustavo6046 joined #nim |
22:42:56 | * | Zectbumo quit (Remote host closed the connection) |
22:45:12 | * | xet7 joined #nim |
22:49:44 | * | oprypin quit (Quit: Bye) |
22:49:55 | * | oprypin joined #nim |
23:02:45 | FromDiscord | <-|-> In reply to @Elegantbeef "But i mean it's": Can't be worse than C++ 🙂 |
23:24:08 | FromDiscord | <Alea> I was wondering, would it be feasible to add a macro or something for curly braces that would simply convert them to parens without conflicting with pragma syntax? |
23:25:10 | FromDiscord | <huantian> why do people like curly braces so much jeez |
23:25:27 | FromDiscord | <Elegantbeef> Cause people dont have good editors |
23:26:04 | FromDiscord | <Alea> Anything to quiet some of the complaints :kawaiishrug: |
23:26:33 | FromDiscord | <Elegantbeef> Get https://github.com/leodevbro/vscode-blockman to work with Nim and add it to other editors |
23:26:46 | FromDiscord | <Elegantbeef> Then if i ever hear any complaints about `{}` i can fucking off them |
23:27:26 | FromDiscord | <ambient> I use the rainbow indent thing. Can't handle 2 space indents without it |
23:27:41 | FromDiscord | <Elegantbeef> I mean you might be able to make a macro that does that but then what about sets, table constructors, and pragmas |
23:28:03 | FromDiscord | <Elegantbeef> Indention line + rainbow indents \> parenthesis |
23:28:21 | FromDiscord | <Elegantbeef> Actually pragmas are fine |
23:28:32 | FromDiscord | <Alea> you'd probably need to make it a compiler feature to distinguish pragmas |
23:28:34 | FromDiscord | <Alea> during parsing |
23:28:38 | FromDiscord | <Elegantbeef> `{.` is different to `}` |
23:28:43 | FromDiscord | <Elegantbeef> I mean `{` |
23:28:57 | FromDiscord | <Elegantbeef> You cannot distinguish a set from a statement |
23:29:31 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3WHd |
23:29:32 | FromDiscord | <Alea> what's <> used for? |
23:29:39 | FromDiscord | <Elegantbeef> Nothing |
23:30:22 | FromDiscord | <Alea> it would never happen, but you could theoretically just use <> for statements, or make sets and such use <> so statements can use {} |
23:30:41 | FromDiscord | <Elegantbeef> Except now we dont have set's matching mathematical sets |
23:30:55 | FromDiscord | <Elegantbeef> Math uses `{}` for sets and it elegantly matches with Nim's |
23:31:09 | FromDiscord | <Alea> can't win em all :EmotiSad: |
23:31:34 | FromDiscord | <Alea> how would <> brackets look |
23:32:02 | FromDiscord | <Alea> sent a code paste, see https://play.nim-lang.org/#ix=3WHf |
23:32:15 | FromDiscord | <Alea> that's kinda cursed ngl :Susge: |
23:32:19 | FromDiscord | <Elegantbeef> That aside people just need to fucking grow up and setup your editors |
23:32:50 | FromDiscord | <Elegantbeef> Not all whitespace is the same, python's sucks, but it's the most seen |
23:32:54 | FromDiscord | <Alea> eh, I think it's best not to entirely rely on editors↵what about reading code on github and such |
23:41:36 | * | Zectbumo joined #nim |
23:58:16 | FromDiscord | <Elegantbeef> @huantian\: soooo have you looked into wasm any since we last spoke? 😄 |
23:58:28 | FromDiscord | <huantian> a tad yeah |