00:13:55 | * | Vladar quit (Quit: Leaving) |
00:27:47 | * | krux02 quit (Ping timeout: 256 seconds) |
00:40:03 | * | abm quit (Read error: Connection reset by peer) |
00:42:12 | * | lkjasdf quit (Quit: gone to dinner) |
00:42:31 | * | lritter quit (Quit: Leaving) |
01:18:24 | * | Tanger joined #nim |
01:27:06 | * | asdflkj_ joined #nim |
01:51:39 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
01:51:59 | * | njoseph joined #nim |
02:00:41 | * | jxy_ quit (Quit: leaving) |
02:01:01 | * | jxy joined #nim |
02:37:20 | * | Tanger is now known as nohosuro |
02:37:31 | * | nohosuro is now known as nohusuro |
02:45:39 | * | nohusuro is now known as loggerer |
02:52:58 | * | JustASlacker quit (Ping timeout: 272 seconds) |
02:54:07 | ForumUpdaterBot | New thread by Exelotl: How to allow out of bounds access on sized arrays?, see https://forum.nim-lang.org/t/7533 |
02:55:21 | * | loggerer is now known as Tanger |
02:59:35 | * | wasted_youth2 quit (Quit: Leaving) |
04:01:13 | * | Evolver quit (Ping timeout: 260 seconds) |
04:01:20 | * | kinkinkijkin quit (Read error: Connection reset by peer) |
04:02:07 | * | kinkinkijkin joined #nim |
04:02:59 | * | Evolver joined #nim |
04:03:21 | * | rayman22201 quit (Ping timeout: 268 seconds) |
04:04:23 | * | rayman22201 joined #nim |
04:18:20 | * | asdflkj_ quit (Ping timeout: 260 seconds) |
04:38:03 | * | spiderstew joined #nim |
04:39:05 | * | spiderstew_ quit (Ping timeout: 240 seconds) |
05:03:32 | * | astronavt___ is now known as astronavt |
05:18:48 | * | letto quit (Ping timeout: 246 seconds) |
05:21:25 | * | zedeus quit (Ping timeout: 240 seconds) |
05:26:16 | * | narimiran joined #nim |
06:04:01 | Prestige | Is there a way to create a table at compile time if it's based on an enum? |
06:05:24 | Prestige | I'm using the string values of the enums to create a lookup (kebab-case string to camelCase, sort of). I'm thinking it can be done but I'm not sure how |
06:17:12 | FromDiscord | <ElegantBeef> Just use an `array[enum,T]` |
06:22:44 | narimiran | 1.2.10 RC and 1.4.4 RC are out! please try them and give us feedback (even if everything works fine :)) |
06:22:48 | narimiran | 1.2.x: https://github.com/nim-lang/nightlies/releases/tag/2021-02-18-version-1-2-a48abc262c843ffacd59d5a412313590e8e319f7 |
06:22:53 | narimiran | 1.4.x: https://github.com/nim-lang/nightlies/releases/tag/2021-02-19-version-1-4-a154acda854ca89fa94e7cabfac2bb4219bfb5de |
06:23:37 | Prestige | I also can't seem to figure out how to mkdir |
06:23:54 | FromDiscord | <ElegantBeef> At CT? |
06:23:59 | Prestige | omg it's called createDir |
06:24:23 | * | vicfred quit (Quit: Leaving) |
06:25:40 | Prestige | took me way too long to find that |
06:30:56 | FromDiscord | <ElegantBeef> Did you resolve your table? |
06:31:13 | Prestige | nah idk if I'll even do that yet |
06:31:41 | Prestige | Adding an ipc cli client to nimdow, my function names are camelCase. Might just have the cli client do the same |
06:32:20 | Prestige | like `nimdow --command toggleFullscreen` or whatever |
06:32:39 | FromDiscord | <ElegantBeef> just remove `-` and `normalizeNimIdent` it π |
06:33:22 | Prestige | Haven't heard of that last one. Link? |
06:33:41 | FromDiscord | <ElegantBeef> https://nim-lang.org/docs/strutils.html#nimIdentNormalize%2Cstring |
06:35:06 | Prestige | hm so it'd be like togglefullscreen after that eh? |
06:35:50 | Prestige | maybe I could use cmpIgnoreStyle |
06:36:24 | FromDiscord | <ElegantBeef> Yea, just make it style insensitive like nim π |
06:36:37 | Prestige | oh then I can't do a lookup actually. hmm |
06:37:12 | FromDiscord | <ElegantBeef> Yea you can if you have it matching the enum in the end |
06:38:03 | Prestige | I mean the func just compares two strings, so it'd be O(N) because I'd need to check every command string |
06:38:45 | Prestige | not that it'd be very slow |
06:39:47 | Prestige | Yeah I think I'll just do that, will be nice for the users |
06:46:53 | FromDiscord | <ElegantBeef> Your enum could be like `toggleFullscreen = "togglefullscreen"` then you could just convert the input string to unstyled lowercase and then just `parseEnum` π |
06:49:31 | Prestige | Yeah that was sort of my original plan.. sounds better actually. I'm not sure what you meant about the array thing earlier |
06:49:55 | FromDiscord | <ElegantBeef> You can make enum indexed arrays in Nim |
06:50:01 | * | JustASlacker joined #nim |
06:50:07 | FromDiscord | <ElegantBeef> So depending on what you were doing it's simpler than a table but works the same |
06:50:09 | Prestige | oh that's different though, that works too |
06:50:39 | FromDiscord | <ElegantBeef> Yea i didnt know you goal, you just asked about enums + tables π |
06:51:12 | FromDiscord | <ElegantBeef> Enum indexed arrays are one of my favourite "hidden" features, so i have to bring them up a lot |
06:56:32 | FromDiscord | <hamidb80> this article is too oldβ΅https://nim-lang.org/blog/2017/10/02/documenting-profiling-and-debugging-nim-code.html#using-gdb-lldb |
06:58:21 | FromDiscord | <hamidb80> gdb doesn't stop on breakpoint |
06:58:28 | FromDiscord | <hamidb80> https://media.discordapp.net/attachments/371759389889003532/812216516002578452/unknown.png |
06:58:36 | FromDiscord | <ElegantBeef> Saem where are you?! |
06:59:21 | FromDiscord | <ElegantBeef> If saem's about they might be to explain how to use gdb |
07:03:09 | * | krux02 joined #nim |
07:04:20 | FromDiscord | <hamidb80> π https://media.discordapp.net/attachments/371759389889003532/812217987309371412/unknown.png |
07:04:27 | * | letto joined #nim |
07:07:07 | FromDiscord | <ElegantBeef> Yea i think saem worked on the experience + the gdb script |
07:07:09 | FromDiscord | <ElegantBeef> Could be wrong |
07:07:48 | Prestige | hm walkFiles only works on the current directory? I tried passing it an absolute path and it doesn't find anything |
07:08:03 | FromDiscord | <ElegantBeef> `relative = true` |
07:08:30 | Prestige | ah yeah that exists for walkDir, cool |
07:08:31 | FromDiscord | <ElegantBeef> Oh nvm i was thinking walkdirs |
07:08:49 | FromDiscord | <ElegantBeef> I also was wrong about it being default true |
07:09:04 | FromDiscord | <ElegantBeef> So... i guess i'm just on a streak of bad advice π |
07:09:17 | Prestige | nah you got me to where I needed to be, haha |
07:09:19 | Prestige | ty |
07:09:20 | FromDiscord | <ElegantBeef> @hamidb80 https://github.com/saem/vscode-nim#debugging |
07:11:15 | Prestige | Actually never mind, it did not work |
07:11:55 | FromDiscord | <ElegantBeef> I generally just use `walkDir` so yea not a clue |
07:16:04 | Prestige | aha, got it. Man I missed Nim |
07:37:03 | * | filcuc joined #nim |
08:03:54 | FromDiscord | <hamidb80> It's interesting, though, `gdb` doesn't show all local variables |
08:04:01 | FromDiscord | <hamidb80> (edit) "interesting," => "interesting" |
08:04:25 | * | JustASlacker quit (Ping timeout: 240 seconds) |
08:04:35 | FromDiscord | <hamidb80> seems like they're not store in the scope |
08:04:44 | FromDiscord | <hamidb80> (edit) "store" => "stored" |
08:05:14 | FromDiscord | <hamidb80> they're stored in upper scopes |
08:12:33 | * | koltrast quit (*.net *.split) |
08:12:34 | * | Avahe[m] quit (*.net *.split) |
08:12:34 | * | reversem3 quit (*.net *.split) |
08:12:35 | * | wiltzutm[m] quit (*.net *.split) |
08:12:35 | * | Zoom[m] quit (*.net *.split) |
08:21:31 | FromDiscord | <hamidb80> they're available out of the scope |
08:23:02 | * | koltrast joined #nim |
08:23:02 | * | Avahe[m] joined #nim |
08:23:02 | * | reversem3 joined #nim |
08:23:02 | * | wiltzutm[m] joined #nim |
08:23:02 | * | Zoom[m] joined #nim |
08:23:57 | saem | Sup? |
08:24:35 | saem | I use gdb, vscode, and ms cppdbg all the time to debug the compiler. |
08:25:45 | * | Q-Master quit (Quit: Π£ΡΠ΅Π») |
08:25:56 | * | alex[m]3 quit (Ping timeout: 240 seconds) |
08:25:58 | * | BitPuffin quit (Ping timeout: 240 seconds) |
08:25:59 | * | FlammableDuck[m] quit (Ping timeout: 240 seconds) |
08:26:08 | FromDiscord | <ElegantBeef> Eh your saviour is here! π |
08:26:15 | * | Clonkk[m] quit (Ping timeout: 246 seconds) |
08:26:15 | * | liblq-dev quit (Ping timeout: 246 seconds) |
08:26:16 | * | antholop[m] quit (Ping timeout: 246 seconds) |
08:26:16 | * | sekao[m] quit (Ping timeout: 250 seconds) |
08:26:16 | * | stisa quit (Ping timeout: 250 seconds) |
08:26:17 | * | matthias[m]5 quit (Ping timeout: 250 seconds) |
08:26:17 | * | Avahe[m] quit (Ping timeout: 258 seconds) |
08:26:17 | * | reversem3 quit (Ping timeout: 258 seconds) |
08:26:18 | * | wiltzutm[m] quit (Ping timeout: 258 seconds) |
08:26:18 | * | Zoom[m] quit (Ping timeout: 258 seconds) |
08:26:19 | * | watzon quit (Ping timeout: 244 seconds) |
08:26:19 | * | vindaar[m] quit (Ping timeout: 244 seconds) |
08:26:19 | * | Benjamin[m]2 quit (Ping timeout: 244 seconds) |
08:26:20 | * | lnxw37d4 quit (Ping timeout: 244 seconds) |
08:26:20 | * | leorize[m] quit (Ping timeout: 244 seconds) |
08:26:20 | * | gollark[m]1 quit (Ping timeout: 244 seconds) |
08:26:20 | * | kaputse[m] quit (Ping timeout: 244 seconds) |
08:26:20 | * | i_use_arch_btw[m quit (Ping timeout: 250 seconds) |
08:26:22 | * | j-james[m] quit (Ping timeout: 250 seconds) |
08:26:25 | FromDiscord | <hamidb80> In reply to @saem "I use gdb, vscode,": do you use your extenstion?https://github.com/saem/vscode-nim#debugging |
08:26:40 | * | Yardanico[m] quit (Ping timeout: 268 seconds) |
08:26:40 | * | Avatarfighter[m] quit (Ping timeout: 268 seconds) |
08:26:40 | * | headache quit (Ping timeout: 268 seconds) |
08:26:41 | saem | Oh wait, are you using choosenim? |
08:26:45 | * | zazi[m] quit (Ping timeout: 265 seconds) |
08:26:45 | * | oswin[m] quit (Ping timeout: 265 seconds) |
08:26:45 | * | MTRNord quit (Ping timeout: 265 seconds) |
08:26:45 | * | ee7[m] quit (Ping timeout: 265 seconds) |
08:26:46 | * | jk13579[m] quit (Ping timeout: 265 seconds) |
08:26:46 | * | vycb[m] quit (Ping timeout: 265 seconds) |
08:26:55 | saem | What else would I use? |
08:26:55 | FromDiscord | <hamidb80> In reply to @saem "Oh wait, are you": yes |
08:27:07 | saem | Yeah, that's broken |
08:27:13 | saem | It ships broken |
08:27:30 | saem | So anyways you have to symlink or some crap to fix it |
08:28:34 | saem | If you open the nim-gdb.py file or whatever it's called and look at the logic as to how the nim home dir or whatever it's called works it looks up the nim binary and then looks for a tools directory relative to that |
08:28:41 | * | unclechu quit (Ping timeout: 265 seconds) |
08:28:41 | saem | That doesn't exist |
08:28:56 | saem | I had to symlink it |
08:29:01 | saem | It's silly |
08:29:06 | FromDiscord | <hamidb80> In reply to @saem "That doesn't exist": i personalyy downloaded nim-gdb.py |
08:29:25 | saem | I dunno know if that works |
08:30:17 | saem | Can you post your config from vscode for debugging? |
08:31:17 | saem | Also, depends which py file you downloaded can't remember if that file has some dependencies as well |
08:31:37 | FromDiscord | <hamidb80> In reply to @saem "Can you post your": to be honest, i was trying to connect `nim-gdb` from my code |
08:31:53 | saem | I just remember sighing a lot, swearing, and then symlinking. |
08:32:07 | saem | ... |
08:32:36 | saem | It's late, but I can't figure out what that means. |
08:33:18 | FromDiscord | <hamidb80> In reply to @saem "It's late, but I": ok, so do you think not using `nim-gdb` is a better approach? |
08:33:55 | saem | That file just proxies to the Python file right? |
08:34:15 | saem | I'm going by memory, on my phone |
08:34:23 | FromDiscord | <hamidb80> In reply to @saem "That file just proxies": to a nim file |
08:35:13 | saem | I just remember it's a bunch of hoops, but at the end of the day gdb needs to load up that Python file |
08:35:13 | * | Tanger quit (Quit: Leaving) |
08:35:35 | saem | I think everything else is trying to help |
08:35:51 | FromDiscord | <hamidb80> thanks |
08:36:21 | saem | It's frustrating, I sympathize |
08:38:08 | saem | Until I read all that code I too wanted to try and do everything in Nim. Then learned about gdb's limitations. Didn't want to learn all about gdb-mi and writing a proxy and all that. Have up, made the symlink, cleaned up the Python script a little bit and moved on. |
08:39:48 | FromGitter | <xflywind> https://github.com/timotheecour/Nim/issues/599 |
08:39:51 | saem | I also don't have time to dig into NDI and name mangling enough to make a wrapper around lldb which would be the future. |
08:41:03 | * | Q-Master joined #nim |
08:47:30 | * | MarderIII joined #nim |
08:58:54 | * | abm joined #nim |
09:24:44 | * | Yardanico[m] joined #nim |
09:34:34 | * | Tanger joined #nim |
09:48:23 | * | Benjamin[m]2 joined #nim |
09:48:24 | Benjamin[m]2 | I've stumbled upon spam/links edited into older posts on the Nim forum several times now. Should I just post the links here or contact someone specific about it? |
09:50:11 | FromDiscord | <mratsim> post the link I willcleanup |
09:50:40 | * | Benjamin[m]2 sent a long message: < https://matrix.org/_matrix/media/r0/download/matrix.org/RLpHJNyIOlXDazNJQtbHcWrS/message.txt > |
09:52:02 | * | Clonkk[m] joined #nim |
09:52:02 | Clonkk[m] | . |
09:52:35 | Clonkk[m] | * How does that happens ? It doesn't make sense to do a manual edit on several years old post to post spam |
09:57:09 | FromDiscord | <mratsim> The first 4 are copy-pasta from questions on Reddit or older questions on the forum I think that elicited a lot of responses. |
09:57:23 | FromDiscord | <mratsim> they make the same and just wait for a while before editing the post. |
10:02:31 | * | filcuc quit (Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/) |
10:07:04 | * | Q-Master quit (Ping timeout: 240 seconds) |
10:10:00 | * | headache joined #nim |
10:10:00 | * | lnxw37d4 joined #nim |
10:10:01 | * | BitPuffin joined #nim |
10:10:01 | * | watzon joined #nim |
10:10:01 | * | kaputse[m] joined #nim |
10:10:02 | * | antholop[m] joined #nim |
10:10:02 | * | gollark[m]1 joined #nim |
10:10:02 | * | stisa joined #nim |
10:10:02 | * | GitterIntegratio joined #nim |
10:10:02 | * | Avahe[m] joined #nim |
10:10:02 | * | i_use_arch_btw[4 joined #nim |
10:10:02 | * | FlammableDuck[m] joined #nim |
10:10:02 | * | MTRNord joined #nim |
10:10:02 | * | j-james[m] joined #nim |
10:10:02 | * | reversem3 joined #nim |
10:10:03 | * | Avatarfighter[m] joined #nim |
10:10:04 | * | vindaar[m] joined #nim |
10:10:04 | * | unclechu joined #nim |
10:10:04 | * | leorize[m] joined #nim |
10:10:04 | * | liblq-dev joined #nim |
10:10:04 | * | oswin[m] joined #nim |
10:10:08 | * | jk13579[m] joined #nim |
10:10:09 | * | zazi[m] joined #nim |
10:10:09 | * | vycb[m] joined #nim |
10:10:10 | * | wiltzutm[m] joined #nim |
10:10:10 | * | Zoom[m] joined #nim |
10:10:11 | * | sekao[m] joined #nim |
10:10:11 | * | ee7[m] joined #nim |
10:10:32 | * | alex[m]28 joined #nim |
10:21:33 | * | tane joined #nim |
10:22:44 | * | d_ment joined #nim |
10:24:11 | * | d_ment quit (Client Quit) |
10:34:41 | FromDiscord | <mratsim> @narimiran, don't forget my blog post. |
10:35:15 | narimiran | @mratsim i didn't. it is in my drafts, but we're now preparing the release so it got postponed (again). sorry |
10:36:56 | FromDiscord | <mratsim> btw @Araq, are you there, can you tell me if the `{.goto.}` pragma works on JS, is that what's preventing closure iterators to work on JS? Because for the serializable state that you mentioned yesterday for continuations, it's either JS+functions or noJS+{.goto.}. |
10:37:19 | FromDiscord | <mratsim> not yesterday, on Monday, don't remember exactly. |
10:38:02 | FromDiscord | <mratsim> I think it's more important to have continuations work at compile-time or in javascript than the serializable part. |
10:42:07 | * | Q-Master joined #nim |
10:42:09 | FromDiscord | <0ffh> Hi I tried to use a "convert on assignment" procedure with the Signature "proc `=`(lval:var MyFloat, rval:float) =" but it seems Nim doesn't like that.β΅Any hints on how I could achieve the desired effect? |
10:43:00 | FromDiscord | <0ffh> (edit) "use" => "create" |
10:47:06 | * | Q-Master quit (Ping timeout: 246 seconds) |
10:49:23 | FromDiscord | <dom96> Huh. Spammers sure are sneaky |
10:49:37 | FromDiscord | <dom96> But it pays to get higher page rank |
10:55:28 | FromDiscord | <mratsim> In reply to @0ffh "Hi I tried to": use a converter |
10:57:06 | FromDiscord | <0ffh> Okay thanks i'll search on that keyword!β΅It seems like often it's really hard to find the relevant bit of documentation unless you already kind-of-know what you're looking for. Cheers! |
11:10:32 | * | Q-Master joined #nim |
11:12:06 | FromDiscord | <mratsim> In reply to @0ffh "Okay thanks i'll search": This is true in general, not just Nim or even programming, and Nim does help by avoiding operators and using words as much as possible |
11:12:12 | FromDiscord | <mratsim> what keywords did you search for? |
11:16:11 | * | MarderIII quit (Quit: Leaving) |
11:16:22 | FromDiscord | <0ffh> Yes, I meant it in general! πβ΅I looked for converter and landed there:β΅https://nim-lang.org/docs/manual.html#converters |
11:16:44 | FromDiscord | <0ffh> Not exactly what I was looking for but close enough for govt work. |
11:17:00 | FromDiscord | <0ffh> (edit) "close" => "good" |
11:17:21 | ForumUpdaterBot | New thread by Sekao: Building games for the web with Emscripten, see https://forum.nim-lang.org/t/7534 |
11:26:25 | FromDiscord | <dom96> I wonder if we need to be more explicit about what arc/orc is exactly, I'm not sure myself whether what floatboth says is correct or not https://news.ycombinator.com/item?id=26180270 |
11:29:07 | * | NimBot joined #nim |
11:38:46 | qwr | it is true, but the ARC/ORC runtime should be quite lightweight... for example libc and malloc/free can be considered to be part of C runtime :) |
11:41:41 | qwr | what really matters is how particular memory management system behaves and what overheads they'll produce |
11:43:03 | FromDiscord | <konsumlamm> you may consider ARC to be no GC, but i don't see why ORC wouldn't be a GC |
12:01:10 | FromDiscord | <aolko> so, community is still half-assing helping others, i presume? |
12:01:30 | FromDiscord | <aolko> how's the situation with the tutorials? Still terrible? |
12:03:15 | FromDiscord | <Solitude> yes |
12:03:39 | FromDiscord | <aolko> talk about actual improvements, huh |
12:06:51 | FromDiscord | <FromIDF> the manual is good and most libs source code are readable, good enough |
12:07:18 | FromDiscord | <Solitude> In reply to @FromIDF "the manual is good": is your code readable? |
12:07:23 | FromDiscord | <Solitude> thats what i thought |
12:07:25 | FromDiscord | <aolko> oh, alright, let me stump you in an instant |
12:07:38 | FromDiscord | <FromIDF> do it |
12:07:44 | FromDiscord | <aolko> "How do i write a php interpreter?" |
12:07:46 | FromDiscord | <FromIDF> In reply to @Solitude "is your code readable?": no because i cant read |
12:08:01 | FromDiscord | <aolko> (edit) "interpreter?"" => "interpreter? Explain in detail"" |
12:08:22 | FromDiscord | <FromIDF> In reply to @aolko ""How do i write": document on lexing and parsing, document on php syntax, and write the interpreter |
12:08:22 | liblq-dev | what does writing a php interpreter have to do with our tutorials |
12:08:23 | FromDiscord | <Solitude> In reply to @aolko ""How do i write": you are welcome https://craftinginterpreters.com/introduction.html |
12:08:36 | * | Evolver quit (Remote host closed the connection) |
12:08:36 | * | nikki93 quit (Remote host closed the connection) |
12:08:36 | * | zielmicha__ quit (Remote host closed the connection) |
12:08:37 | * | kinkinkijkin quit (Write error: Broken pipe) |
12:08:37 | * | saem quit (Remote host closed the connection) |
12:08:37 | * | rayman22201 quit (Remote host closed the connection) |
12:09:01 | FromDiscord | <aolko> In reply to @Solitude "you are welcome https://craftinginterpreters.com/in": "I want to use my own grammar notation" |
12:09:27 | FromDiscord | <Solitude> find tutorials for that |
12:09:28 | FromDiscord | <aolko> In reply to @liblq-dev "what does writing a": target language and build-your-own-x style ones |
12:09:32 | FromDiscord | <Solitude> the heck this has to do with nim |
12:09:41 | FromDiscord | <aolko> In reply to @Solitude "find tutorials for that": there's none, stumped |
12:09:51 | FromDiscord | <Solitude> again, how is that our problem? |
12:09:53 | FromDiscord | <aolko> (edit) "none, stumped" => "none, stumped" |
12:09:59 | FromDiscord | <aolko> target language |
12:10:09 | FromDiscord | <aolko> (edit) "target" => "~~target~~ source" |
12:10:16 | FromDiscord | <Solitude> you want all learning material in existence to be replicated for every language? |
12:10:25 | FromDiscord | <FromIDF> if you need tutorial for absolutely every specific thing then uhhh, you're doing it wrong, to say it lightly |
12:10:28 | liblq-dev | eh i feel like they're trolling |
12:10:32 | FromDiscord | <konsumlamm> oh rly |
12:10:37 | FromDiscord | <Solitude> he is not, hes just attention hungry |
12:10:39 | FromDiscord | <aolko> In reply to @Solitude "you want all learning": no, just a base language kit will do |
12:10:51 | FromDiscord | <konsumlamm> In reply to @Solitude "he is not, hes": where's the difference? |
12:11:15 | FromDiscord | <FromIDF> mfw i have been trolled |
12:11:22 | FromDiscord | <aolko> In reply to @Solitude "he is not, hes": nope |
12:11:41 | liblq-dev | @Solitude that's like the same thing isn't it |
12:11:49 | FromDiscord | <Rika> Essentially |
12:11:52 | FromDiscord | <Solitude> In reply to @liblq-dev "<@104136074569211904> that's like the": not in my head |
12:11:55 | FromDiscord | <Rika> Who are you again? |
12:12:13 | liblq-dev | i'd categorize trolling as a subset of attention whoring but ok |
12:12:15 | FromDiscord | <Rika> Legit question, I forget people a lot |
12:12:30 | liblq-dev | doesn't matter |
12:12:41 | FromDiscord | <aolko> obviously a male, direct, straightforward male |
12:13:28 | FromDiscord | <Rika> Okay, whatβs up with the attitude then |
12:13:32 | FromDiscord | <Solitude> if by direct you mean, "i refuse to do my own research and want everything given to me", yeah that fits |
12:13:50 | FromDiscord | <FromIDF> why is your nickname be nice |
12:14:01 | FromDiscord | <Solitude> i am nice and want everybody to be nice |
12:14:05 | FromDiscord | <Rika> Something to do with a few hours ago haha |
12:14:10 | FromDiscord | <Rika> Happened in off topic |
12:14:13 | liblq-dev | maybe they are just having trouble with wording, not everyone has to be fluent in english |
12:14:34 | FromDiscord | <Solitude> lqdev, its not his first time here |
12:14:37 | FromDiscord | <aolko> In reply to @Rika "Okay, whatβs up with": there's no attitude |
12:14:37 | FromDiscord | <Rika> Yes |
12:14:46 | FromDiscord | <Rika> I remember the name but not what he did |
12:14:47 | FromDiscord | <konsumlamm> "so, community is still half-assing helping others, i presume? how's the situation with the tutorials? Still terrible?" |
12:14:53 | FromDiscord | <konsumlamm> definitely sounds like language problems |
12:14:54 | liblq-dev | @Solutide i'm not that active in the community so how would i know |
12:15:00 | FromDiscord | <aolko> yup, asked as plainly as i can |
12:15:03 | Clonkk[m] | Hey guys is there a Nim tutorial to tell me how to do my day to day job ? If it could teach fluid mechanics and tell me how to do my taxes as well that'd be great, thanks ! |
12:15:12 | FromDiscord | <FromIDF> kek |
12:15:15 | FromDiscord | <Rika> Lol |
12:15:19 | FromDiscord | <aolko> the most straightfaced emotionless question |
12:15:31 | FromDiscord | <FromIDF> today im going to make a tutorial on how to write a quantum mechanics calculator in nim |
12:15:46 | FromDiscord | <aolko> that's a `build-your-own-x` material |
12:15:53 | Clonkk[m] | Oh and I also need a Nim tutorial to prove P=NP |
12:16:03 | FromDiscord | <Rika> How to run 15 billion threads in Nim with a single core processor |
12:16:13 | FromDiscord | <aolko> and now you are deviating |
12:16:14 | * | zielmicha__ joined #nim |
12:16:41 | FromDiscord | <kaletaa> is there a tutorial on shitting my pants |
12:16:45 | Clonkk[m] | <FromDiscord "<aolko> and now you are deviatin"> No, i'm just mocking your ridiculous assumptions of what should be in a programming language tutoriam. |
12:16:46 | FromDiscord | <kaletaa> i think i've been doing it wrong |
12:16:48 | FromDiscord | <Rika> Because we donβt think your messages were worth dealing with seriously |
12:16:49 | * | Evolver joined #nim |
12:16:58 | Clonkk[m] | * No, i'm just mocking your ridiculous assumptions of what should be in a programming language tutorial. |
12:17:09 | FromDiscord | <aolko> In reply to @Clonkk "<FromDiscord "<aolko> and now": too bad you can cursive the shit out of it so it's obvious |
12:17:18 | FromDiscord | <aolko> or can't you? |
12:17:26 | FromDiscord | <Solitude> be nice, guys |
12:17:29 | FromDiscord | <Rika> Lmao |
12:17:31 | FromDiscord | <kaletaa> shut up sol |
12:17:36 | FromDiscord | <Solitude> BE NICE OR ELSE |
12:17:38 | FromDiscord | <kaletaa> π |
12:17:40 | FromDiscord | <Rika> The one time we actually need don |
12:17:43 | FromDiscord | <Rika> Dom |
12:17:54 | FromDiscord | <aolko> i'm not nice because peeps here are not helpful |
12:18:16 | FromDiscord | <kaletaa> we're not helpful because you're not nice |
12:18:24 | FromDiscord | <aolko> what a loop |
12:18:30 | * | saem joined #nim |
12:18:32 | FromDiscord | <FromIDF> do you need a tutorial for this loop too? |
12:18:44 | FromDiscord | <aolko> i suggest reading into my post history here |
12:18:44 | FromDiscord | <kaletaa> im not sure if we have a tutorial on the break keyword |
12:18:57 | FromDiscord | <aolko> maybe you'll discover that i was hanging for a long while |
12:19:00 | FromDiscord | <Solitude> In reply to @aolko "i suggest reading into": dont, worst mistake of my life |
12:19:02 | FromDiscord | <aolko> waiting for answers |
12:19:06 | FromDiscord | <kaletaa> In reply to @Solitude "dont, worst mistake of": . |
12:19:33 | * | nikki93 joined #nim |
12:19:35 | FromDiscord | <aolko> and yet you dips didn't even care enough |
12:19:44 | FromDiscord | <Rika> Oh wait are you that troll whom I called similar to disruptek yet not as fun |
12:19:55 | FromDiscord | <aolko> i am not a troll |
12:19:56 | FromDiscord | <FromIDF> why would you insult disruptek by doing such comparasion |
12:19:57 | FromDiscord | <Solitude> no, thats me |
12:20:06 | FromDiscord | <aolko> i am a legitimately frustrated guy |
12:20:13 | FromDiscord | <FromIDF> yes |
12:20:16 | FromDiscord | <kaletaa> yes |
12:20:16 | FromDiscord | <Rika> I donβt remember you fucks π¦ Iβve worse memory than a rock |
12:20:30 | FromDiscord | <aolko> read the fucking logs will ye |
12:20:35 | FromDiscord | <Solitude> In reply to @aolko "i am a legitimately": are you unironically want a php interpreter tutorial? |
12:20:37 | FromDiscord | <konsumlamm> are you really expecting anyone to take you serious with how you act? |
12:20:38 | FromDiscord | <FromIDF> do you have a tutorial for that |
12:20:41 | FromDiscord | <FromIDF> for reading logs |
12:20:44 | FromDiscord | <aolko> In reply to @Solitude "are you unironically want": no shit, mate |
12:20:46 | FromDiscord | <FromIDF> otherwise your solution is half-assed |
12:21:01 | * | rayman22201 joined #nim |
12:21:03 | FromDiscord | <Solitude> no shit what? because its not obvious if thats a joke or not |
12:21:06 | FromDiscord | <aolko> leave your irony in javascript realm |
12:21:19 | FromDiscord | <aolko> In reply to @Solitude "no shit what? because": obviously i need that thing |
12:21:26 | Clonkk[m] | <FromDiscord "<aolko> maybe you'll discover th"> I waited 5 minutes and you still haven't given me a P=NP tutorials π |
12:21:28 | FromDiscord | <kaletaa> just read an interpreter tutorial |
12:21:39 | FromDiscord | <kaletaa> language-agnostic guides do exist |
12:21:41 | * | kinkinkijkin joined #nim |
12:21:50 | FromDiscord | <aolko> yes, but language kits don't |
12:21:59 | FromDiscord | <FromIDF> good |
12:22:47 | FromDiscord | <aolko> mentioning this since i don't want to fuck around with EBNF bullshit |
12:22:57 | FromDiscord | <kaletaa> just handwrite a parser |
12:23:01 | FromDiscord | <kaletaa> loe |
12:23:02 | FromDiscord | <aolko> (edit) "bullshit" => "bullshit, i have my own notation for that" |
12:23:03 | FromDiscord | <kaletaa> (edit) "loe" => "lole" |
12:23:06 | FromDiscord | <Rika> Dude would you bitch and moan about the same thing to a rust server instead or something |
12:23:06 | FromDiscord | <Solitude> write your own parser generator? |
12:23:29 | FromDiscord | <aolko> i wonder where do i find nim-specific tutorial for that π€ |
12:23:33 | FromDiscord | <kaletaa> you dont |
12:23:36 | FromDiscord | <Solitude> you dont |
12:23:38 | liblq-dev | the second part of crafting interpreters shows you how to write a parser from scratch, without using any parsing library |
12:23:39 | liblq-dev | and also a bytecode interpreter |
12:23:39 | FromDiscord | <aolko> there you go |
12:23:46 | FromDiscord | <kaletaa> why would you need a nim-specific tutorial |
12:23:46 | FromDiscord | <aolko> and that's your fuckup |
12:23:53 | FromDiscord | <kaletaa> it's just an imperative language |
12:24:00 | FromDiscord | <kaletaa> it's not hard to apply ideas from other languages |
12:24:04 | FromDiscord | <Solitude> how is that our fuckup? |
12:24:13 | FromDiscord | <FromIDF> bro its not our problem you are functionally illiterate |
12:24:19 | FromDiscord | <aolko> community should have such tutorials |
12:24:19 | FromDiscord | <kaletaa> ^ |
12:24:23 | FromDiscord | <kaletaa> In reply to @aolko "community should have such": no |
12:24:24 | liblq-dev | dude it's not like nim's that different from [insert popular language here] |
12:24:26 | FromDiscord | <aolko> yes |
12:24:36 | FromDiscord | <kaletaa> because you can't think for yourself? |
12:24:49 | liblq-dev | people target more popular languages because knowledge from them can be carried over to basically everything else |
12:25:21 | FromDiscord | <Rika> Okay wait up sometimes some kinds of applications need a language specific tutorial but not everything needs one |
12:25:28 | FromDiscord | <Rika> What kind of thing are you making |
12:26:01 | FromDiscord | <aolko> In reply to @liblq-dev "dude it's not like": sure, it sure isn't https://github.com/textX/textX |
12:26:11 | FromDiscord | <kaletaa> that's a library |
12:26:16 | FromDiscord | <aolko> there's tons of similar libs & tutorials |
12:26:24 | FromDiscord | <FromIDF> ok just make one for nim |
12:26:24 | FromDiscord | <aolko> for nim |
12:26:26 | FromDiscord | <Rika> Check the community size |
12:26:28 | FromDiscord | <Clyybber> @aolko nobody ows you anything, you are as much part of the community as everyone else here |
12:26:35 | FromDiscord | <Rika> Scale the number by community size |
12:26:41 | FromDiscord | <aolko> In reply to @Clyybber "<@!84714234855821312> nobody ows you": not quite |
12:26:49 | liblq-dev | have you seen https://github.com/zevv/npeg ? |
12:26:53 | FromDiscord | <Rika> Not quite what?? |
12:27:13 | FromDiscord | <aolko> i do not quite consider myself part of such a community |
12:27:32 | FromDiscord | <Rika> Doesnβt change the fact that no one owes you anything |
12:28:07 | liblq-dev | well if you want such a tutorial you can pay someone to make it |
12:28:25 | FromDiscord | <aolko> In reply to @liblq-dev "have you seen https://github.com/zevv/npeg": not even remotely close to the desired http://cjheath.github.io/treetop/ |
12:28:49 | FromDiscord | <Rika> Christ |
12:28:51 | liblq-dev | it's basically the same thing but more compact lmao |
12:28:52 | FromDiscord | <aolko> In reply to @liblq-dev "well if you want": there's no transparency on pricing |
12:28:54 | FromDiscord | <kaletaa> you know you could just stop crying and write it yourself |
12:29:08 | FromDiscord | <kaletaa> a community isn't there to spoonfeed you |
12:29:15 | FromDiscord | <Rika> You will get nothing out of whining like this |
12:29:19 | FromDiscord | <aolko> it kinda is to be honest |
12:29:23 | FromDiscord | <kaletaa> lol |
12:29:28 | FromDiscord | <FromIDF> amazing thought process |
12:29:44 | * | superbia joined #nim |
12:29:45 | FromDiscord | <kaletaa> average 12 year old who looks up "free hacking tutorial" on youtube |
12:29:50 | FromDiscord | <aolko> look, every community spoonfeeds noobs by providing tutorials and examples |
12:29:52 | liblq-dev | guys just stop feeding the troll |
12:29:55 | FromDiscord | <Rika> Installs Kali on a prod server |
12:29:57 | liblq-dev | it doesn't get you anywhere |
12:29:59 | FromDiscord | <kaletaa> Yep. |
12:30:06 | FromDiscord | <kaletaa> pentoo in prod |
12:30:09 | FromDiscord | <konsumlamm> stop spoonfeeding the troll |
12:30:21 | FromDiscord | <aolko> In reply to @liblq-dev "guys just stop feeding": just stop being a cunt who can't distinguish genuine reactions from trolling |
12:30:36 | FromDiscord | <Rika> Do you know what a troll is |
12:30:38 | liblq-dev | @aolko mate it's you who's a cunt not us |
12:30:56 | liblq-dev | you started acting toxic, don't be surprised it's backfiring |
12:30:58 | FromDiscord | <Rika> I legit wish Dom was here |
12:31:01 | FromDiscord | <aolko> amazing excuse, too bad it's not truthful |
12:31:13 | FromDiscord | <Rika> Amazing rebuttal, very strong argument |
12:31:21 | liblq-dev | you could've just asked politely "are there any good parsing tutorials" but you used provocative wording |
12:31:29 | FromDiscord | <Solitude> Dom, there is a guy that feels entitled to maintainers/community free time |
12:31:34 | FromDiscord | <kaletaa> GIVE ME PHP PARSE TUTORIAL |
12:31:34 | FromDiscord | <FromIDF> . |
12:31:44 | FromDiscord | <kaletaa> In reply to @Solitude "Dom, there is a": you dont own my time.... |
12:32:02 | liblq-dev | please guys let's just shut up because we all know this conversation is a waste of everybody's time |
12:32:10 | FromDiscord | <kaletaa> im watching family guy |
12:33:22 | FromDiscord | <aolko> In reply to @liblq-dev "you could've just asked": well, i could've if i'd have a swell time indulging in actually helpful atmosphere with actually helpful people helping out with a project, but alas, that is a non-realistic outcome currently, since it requires actual care and full-assing it. |
12:33:35 | FromDiscord | <kaletaa> spoonfeeding isn't helpful |
12:33:48 | FromDiscord | <aolko> starving isn't either |
12:34:06 | FromDiscord | <kaletaa> if you actually had a functioning brain you wouldn't be starving |
12:34:48 | FromDiscord | <konsumlamm> In reply to @aolko "well, i could've if": do you really expect anyone to be helpful when you start with "so, community is still half-assing helping others, i presume? how's the situation with the tutorials? Still terrible?"? |
12:35:11 | FromDiscord | <konsumlamm> you came here with the expectation of not getting help |
12:35:18 | FromDiscord | <aolko> In reply to @kaletaa "if you actually had": that reminds me, what was written on page 123 of the first volume of Encyclopedia Britannica? |
12:35:57 | FromDiscord | <FromIDF> page 123 |
12:36:09 | * | superbia quit (Quit: WeeChat 3.0) |
12:36:11 | FromDiscord | <aolko> you won't be able to tell, since you would've read it whole, yet someone else would since he would've read only that single section |
12:36:23 | FromDiscord | <aolko> that is a domain-specific knowledge |
12:37:18 | FromDiscord | <FromIDF> do you have any tutorial for reading said book |
12:37:32 | FromDiscord | <FromIDF> if not then the writers of it are idiots |
12:37:47 | FromDiscord | <FromIDF> and everybody that ever read it once |
12:37:51 | FromDiscord | <FromIDF> (edit) "and everybody that ever read it ... once" added "atleast" |
12:37:52 | FromDiscord | <aolko> you are trying to link me to the general ass tutorials and magically figure out how to write an interpreter in nim, however i'd argue that domain-specific knowledge of actually providing a specific explanations would be much better |
12:38:25 | FromDiscord | <kaletaa> we literally sent you a parser library |
12:38:26 | FromDiscord | <konsumlamm> are you seriously expecting there to be a PHP parsing tutorial in Nim? |
12:38:36 | FromDiscord | <aolko> In reply to @konsumlamm "do you really expect": you know, my reference to reading logs isn't baseless |
12:38:39 | FromDiscord | <FromIDF> how much will you pay me if i write a php parser in nim |
12:38:52 | FromDiscord | <FromIDF> legit question |
12:38:53 | FromDiscord | <aolko> In reply to @kaletaa "we literally sent you": to magically figure out the rest |
12:38:55 | FromDiscord | <FromIDF> im willing to do it if you pay me |
12:38:57 | FromDiscord | <aolko> (edit) "rest" => "rest...great" |
12:39:03 | FromDiscord | <konsumlamm> In reply to @aolko "you know, my reference": you know, my question about you expecting help aren't baseless either |
12:39:28 | FromDiscord | <kaletaa> In reply to @aolko "to magically figure out": yes, read an interpreter book |
12:39:40 | FromDiscord | <kaletaa> you don't need a language specific book to learn about interpreters |
12:39:45 | FromDiscord | <aolko> In reply to @kaletaa "yes, read an interpreter": nope, domain-specific knowledge |
12:39:57 | FromDiscord | <kaletaa> how is writing interpreters domain specific |
12:40:02 | FromDiscord | <FromIDF> you need to go to a person that has domain-specific knoweldge of psychology and psychiatry |
12:40:04 | FromDiscord | <aolko> in nim |
12:40:08 | FromDiscord | <aolko> that specific |
12:40:10 | FromDiscord | <kaletaa> In reply to @aolko "**in nim**": you're braindead |
12:40:14 | FromDiscord | <kaletaa> in nim |
12:40:22 | FromDiscord | <FromIDF> rude |
12:40:25 | FromDiscord | <Rika> Jesus I thought we werenβt supposed to be spoon feeding the fuck |
12:40:42 | FromDiscord | <kaletaa> i will stop communicating with the one-cell organism |
12:40:51 | FromDiscord | <aolko> great, fuck off then |
12:41:09 | FromDiscord | <apollo> please #offtopic |
12:41:11 | FromDiscord | <aolko> i'd rather hear out anyone willing to give the domain-specific knowledge |
12:41:13 | FromDiscord | <FromIDF> so lets get back to bussiness, how much will you pay me if i write a php parser |
12:41:18 | FromDiscord | <apollo> this is for serious shit |
12:41:30 | FromDiscord | <aolko> i am always serious |
12:41:31 | FromDiscord | <Clyybber> if there was a tutorial for a php interpreter in nim then you wouldn't have to make one, because there would be one already... |
12:41:41 | FromDiscord | <aolko> i'd argue here |
12:41:47 | Clonkk[m] | There is a block user guys |
12:41:57 | Clonkk[m] | * There is a block user button guys |
12:42:22 | FromDiscord | <Rika> Blocking is awfully implemented in discord lol |
12:42:23 | FromDiscord | <Solitude> in discord it leaves a bigass box with messages hidden |
12:42:45 | liblq-dev | that was entertaining. |
12:42:49 | FromDiscord | <kaletaa> yeah it's quite uhhh inadequate |
12:42:53 | FromDiscord | <kaletaa> blocking in discord |
12:42:56 | FromDiscord | <FromIDF> quirky, if you will |
12:42:58 | FromDiscord | <aolko> In reply to @aolko "i'd argue here": since y'all stepping on the same set of rakes when it comes to, let's say, game engines, same engine - different games |
12:42:59 | FromDiscord | <kaletaa> yeah bro uhh btw there are some blocked messages here |
12:43:13 | Clonkk[m] | <liblq-dev "that was entertaining."> Trolls are funny 5 minutes but gets annoying after that |
12:44:18 | FromDiscord | <aolko> for the dips who still think that i'm a troll, i'm not purposefully misleading people in my expressions, i am legitimate about my expressions |
12:44:40 | FromDiscord | <kaletaa> apollo do not reply |
12:44:44 | FromDiscord | <aolko> it's not "ironic" or "sarcastic" here |
12:44:54 | FromDiscord | <apollo> In reply to @kaletaa "apollo do not reply": aren't you a bot |
12:45:05 | FromDiscord | <apollo> u human |
12:45:17 | FromDiscord | <kaletaa> i'm a cyborg |
12:45:25 | FromDiscord | <apollo> cyberpunk more like |
12:46:06 | FromDiscord | <aolko> well, on the other hand at least my expectations weren't high to begin with |
12:47:55 | FromDiscord | <konsumlamm> "so, community is still half-assing helping others, i presume? how's the situation with the tutorials? Still terrible?" <- those were your expectations |
12:48:25 | FromDiscord | <aolko> compared to 2019, nothing changed much |
12:48:58 | FromDiscord | <aolko> my expectations were the same |
12:49:18 | FromDiscord | <Solitude> In reply to @aolko "compared to 2019, nothing": we are gigastable |
12:50:29 | FromDiscord | <aolko> right, so perhaps i'll break down my question to more manageable steps, since you can't handle it coupled with accumulated frustration since 2019 |
12:50:30 | FromDiscord | <Rika> What the fuck happened to not interacting |
12:50:39 | FromDiscord | <kaletaa> autism |
12:51:39 | FromDiscord | <aolko> so, perhaps you can manage it that way? |
12:51:55 | FromDiscord | <aolko> since you are currently pretty butthurt |
12:51:56 | FromDiscord | <kaletaa> we will not manage it if it's from you, you clearly are too smart for this community |
12:52:04 | FromDiscord | <kaletaa> please join a rust server, they might understand you |
12:52:15 | FromDiscord | <aolko> oh, okay, point me to the one that is also as smart |
12:52:25 | FromDiscord | <aolko> In reply to @kaletaa "please join a rust": i'm afraid it's too gay |
12:52:42 | FromDiscord | <kaletaa> i think the batch community is willing to take you in |
12:52:45 | FromDiscord | <kaletaa> you seem to be on their level |
12:52:59 | FromDiscord | <aolko> In reply to @kaletaa "i think the batch": they didn't migrate to powershell |
12:53:08 | FromDiscord | <kaletaa> batch is clearly superior |
12:53:31 | FromDiscord | <Rika> Please leave the server, we clearly are not up to your expectations and you would probably benefit most to leaving |
12:53:33 | FromDiscord | <Rika> Thanks |
12:53:41 | FromDiscord | <Solitude> In reply to @aolko "i'm afraid it's too": you afraid of little bit of gay? |
12:53:50 | FromDiscord | <aolko> so insensitive |
12:54:30 | FromDiscord | <aolko> In reply to @Solitude "you afraid of little": and so are you |
12:55:09 | FromDiscord | <FromIDF> homophobes |
12:55:58 | * | aolko[m] joined #nim |
12:56:01 | FromDiscord | <apollo> yes |
12:56:22 | aolko[m] | hey, ever studied law of conservation of mass? |
12:57:28 | aolko[m] | i'd still would rather like to see a list of nim community alternatives before i can yeet myself outta here |
12:57:42 | FromDiscord | <kaletaa> there are no alternatives to the nim community |
12:57:56 | FromDiscord | <Clyybber> I would rather you not bother any other community with your bullshit |
12:57:58 | aolko[m] | then don't push me out |
12:57:59 | * | krux02 quit (Remote host closed the connection) |
12:58:13 | FromDiscord | <Clyybber> (edit) "I would rather you not bother any other community with your bullshit ... " added "either" |
12:58:20 | FromDiscord | <kaletaa> then evolve further than a single-cell organism |
12:58:43 | aolko[m] | yeah, i do not care about your point either |
12:59:17 | * | krux02 joined #nim |
12:59:30 | ForumUpdaterBot | New thread by Kcvinu: How to declare function pointer type ?, see https://forum.nim-lang.org/t/7535 |
13:01:20 | aolko[m] | i will wait a couple of hours if you are still willing to give me alternatives, otherwise i guarantee you there will be one and it will be publically shared |
13:01:48 | FromDiscord | <kaletaa> you will be excluded from the public which we share it with |
13:02:05 | aolko[m] | i see no bottlenecks so far |
13:02:19 | FromDiscord | <DARTHVADER NAXXX> Ok |
13:02:42 | FromDiscord | <DARTHVADER NAXXX> what happened here |
13:02:49 | FromDiscord | <mratsim> aolko is bored |
13:02:51 | aolko[m] | butthurt from the peeps |
13:03:30 | aolko[m] | (kinda works both ways here) |
13:04:00 | Clonkk[m] | <FromDiscord "<DARTHVADER NAXXX> what happened"> A troll wanted attention |
13:04:33 | aolko[m] | dips can't even tell where's a troll and where's a legit person |
13:04:36 | Clonkk[m] | He was nice enough to move to matrix so I could block him there as well |
13:04:39 | FromDiscord | <DARTHVADER NAXXX> Bots? |
13:06:14 | FromDiscord | <DARTHVADER NAXXX> In reply to @Clonkk "He was nice enough": But serious, how you and aolko talk? |
13:06:25 | Clonkk[m] | You see "bots" next to my name because I'm using Matrix and my message are posted on discord through a bridge bot |
13:06:43 | aolko[m] | "begrudgingly" |
13:06:46 | FromDiscord | <SneakyBaguette> But I'm a real user ;) |
13:07:09 | FromDiscord | <DARTHVADER NAXXX> ok |
13:07:13 | Clonkk[m] | I just prefer Matrix |
13:09:34 | * | wasted_youth2 joined #nim |
13:10:06 | * | PMunch joined #nim |
13:15:45 | * | asdflkj_ joined #nim |
13:17:05 | * | PMunch quit (Ping timeout: 240 seconds) |
13:25:02 | * | lritter joined #nim |
13:28:05 | * | dom96__ joined #nim |
13:29:55 | dom96__ | For reference, this specifically is not okay. But mostly banning for consistency with Discord. I trust whoever banned there did their due dilligence https://irclogs.nim-lang.org/19-02-2021.html#12:30:21 |
13:30:49 | * | dom96__ quit (Client Quit) |
13:30:59 | * | PMunch joined #nim |
13:40:20 | PMunch | Why isn't there a set of printables here? https://nim-lang.org/docs/strutils.html#10 |
13:40:23 | FromDiscord | <mratsim> It's not just this, their first sentence today was basically trollbaits owards the Nim community and then homophoby |
13:41:15 | Clonkk[m] | You missed the homophobic insult as well https://irclogs.nim-lang.org/19-02-2021.html#12:52:25 |
13:41:27 | FromDiscord | <dom96> Yes. Iβm sure there is other stuff too |
13:42:06 | FromDiscord | <dom96> And yeah. Those examples are even worse |
13:43:47 | PMunch | Aaw, did I miss a troll? |
13:45:57 | FromDiscord | <flywind> Punctuation tables PR is rejected but I think Printable chars PR could be accepted. |
13:46:05 | FromDiscord | <flywind> https://github.com/nim-lang/Nim/pull/16708 |
13:46:39 | FromDiscord | <Clyybber> printable sounds reasonable |
13:46:45 | FromDiscord | <Clyybber> and useful |
13:47:20 | PMunch | I mean it's basically just the ASCII table from 32..255 minus 127 |
13:48:12 | * | Tanger quit (Quit: Leaving) |
13:50:07 | FromDiscord | <konsumlamm> @flywind will you make follow-up PRs to https://github.com/nim-lang/Nim/pull/17041 soon? |
13:50:48 | FromDiscord | <flywind> I will make it in the following days. |
13:51:08 | FromDiscord | <flywind> https://github.com/nim-lang/Nim/pull/17100 |
13:51:39 | FromDiscord | <konsumlamm> ah nice, you already started |
13:51:45 | FromDiscord | <flywind> yeah |
14:00:31 | asdflkj_ | PMunch: you can read the linked logs if you really want (he wasn't a particularly entertaining one) |
14:02:34 | FromDiscord | <Rika> Has anyone tried making more human readable JS output from Nimβs output? I just want to know |
14:07:29 | PMunch | asdflkj_, yeah I started looking at it but got bored |
14:08:54 | * | mmohammadi9812 joined #nim |
14:09:21 | * | mmohammadi9812 quit (Max SendQ exceeded) |
14:09:53 | * | mmohammadi9812 joined #nim |
14:11:03 | * | mmohammadi9812 quit (Read error: Connection reset by peer) |
14:11:21 | * | mmohammadi9812 joined #nim |
14:11:58 | * | mmohammadi9812 quit (Remote host closed the connection) |
14:14:46 | * | haxscramper joined #nim |
14:46:58 | haxscramper | narimiran: could you please add something like this: https://gist.github.com/haxscramper/95b149c16f58d7662402b9e833f775ec to changelog/release notes for next version. I wanted to write a separate article for fusion but couldn't manage to produce anything notably interesting, so instead this could be just a listing of existing libraries. I also double-checked article for any possible example regressions (against fusion/#61) - there are |
14:46:58 | haxscramper | none, so I think the article can be released any time you see fit, though I would *strongly prefer* to do this after #61 will be merged into fusion |
14:48:11 | haxscramper | I merged fix for `match` and `case` into my fixup branch so there are no conflicts as of now, CI is green, and it can also be merged any time |
14:48:49 | narimiran | haxscramper: so, can i safely merge #61? do i need to review it? |
14:51:04 | haxscramper | It does not have any breaking changes, so I think it is generally safe |
14:51:08 | FromDiscord | <krisppurg> Is there any way to set a string length range type for example `string[1..100]` (limits the length of characters to 100 and minimum to 1)? |
14:51:45 | haxscramper | There were some changes wrt. to `is` operator, but those are only related to documentation/example uses |
14:52:05 | FromDiscord | <mratsim> In reply to @krisppurg "Is there any way": length is not part of a string type |
14:52:29 | FromDiscord | <mratsim> so you would need a distinct string with range checks on add, setLen and delete. |
14:53:08 | FromDiscord | <krisppurg> Ah, alright thanks. |
14:54:09 | FromGitter | <Araq> you can also write a custom string type that exploits the fact that a short string can be kept on the stack |
14:56:22 | FromDiscord | <mratsim> sent a long message, see http://ix.io/2PXR |
14:57:23 | FromGitter | <Araq> the .goto pragma doesn't work for JS but our closure iterators do not use .goto anyway |
14:57:37 | FromDiscord | <mratsim> what's this nkGotoState then? |
14:57:38 | Prestige | Is there a way to get commandLineParams as a single string, or do I just have to join this seq? |
14:57:41 | FromGitter | <Araq> we're talking about 2 separate features here, neither is supported for JS |
14:58:06 | FromDiscord | <mratsim> so nkGotoState != {.goto.} ? |
14:58:11 | FromGitter | <Araq> nkGotoState is for closure iterators but not used for .goto variables |
14:58:29 | FromGitter | <Araq> and also, omg .goto is such an incredible hack |
14:58:30 | FromDiscord | <mratsim> do we want continuations on JS? |
14:58:55 | FromDiscord | <mratsim> for some reasons I have no bug with it in Weave: Synthesis :p |
14:59:20 | FromDiscord | <mratsim> JS and in the VM |
14:59:37 | FromGitter | <Araq> sure, continuations on JS are fine |
14:59:47 | FromDiscord | <konsumlamm> @haxscramper some suggestions for your summary: there are some articles missing ("the" before "`fusion`", "an" before "extension", "the" before "modules", "an" before "AST"), i'd say "sorted" instead of "ordered" for `btreetables`, "HTML" instead of "html" and i'd put a dot at the end |
14:59:49 | FromGitter | <Araq> we can use the classic "relooper" algorithm |
15:01:05 | FromDiscord | <mratsim> functions seem simple |
15:06:46 | FromDiscord | <konsumlamm> @haxscramper your forgot the "an" before "extension" :p |
15:15:43 | * | vicfred joined #nim |
15:25:11 | FromDiscord | <haxscramper> @konsumlamm when you were testing pattern matching - you used `#61` fix, or main version? |
15:26:24 | FromDiscord | <konsumlamm> the current version |
15:34:06 | * | zedeus joined #nim |
15:48:50 | FromDiscord | <konsumlamm> @haxscramper |
15:49:06 | Oddmonger | if i want something else than Β« int Β» as a counter for a loop, do i have to write my own iterator ? |
15:49:34 | FromDiscord | <konsumlamm> wdym? |
15:49:34 | Oddmonger | the loop is of this form : for i in 0..len(x) |
15:49:57 | Oddmonger | but i'd like to have i as a uint16, instead of default int |
15:50:17 | Oddmonger | i read in the doc that countup returns int by default |
15:50:31 | Oddmonger | but 0..len(x) is using countup implicitely ? |
15:50:38 | FromDiscord | <haxscramper> In reply to @konsumlamm "<@!608382355454951435>": ? I just clarified this for myself, there are no additional questions |
15:50:46 | FromDiscord | <krisppurg> is there any way to convert a seq to an array? |
15:51:13 | FromDiscord | <haxscramper> Element-by-element copy, but arrays are fixed size |
15:51:15 | FromDiscord | <konsumlamm> the length of an array has to be known at compile time, so i'd say the answer is no |
15:51:23 | FromDiscord | <haxscramper> So you would either drop some elements, or have some elements uninitialized |
15:51:47 | FromDiscord | <haxscramper> (if the seq is longer or shorter than array) |
15:52:10 | FromDiscord | <Rika> oddmonger sure, or do let i = int16(i) if you dont mind that |
15:53:02 | Oddmonger | yes i can cast , but i was thinking that having directly i in the good type was better |
15:53:15 | Prestige | Is there a more concise way of formatting a string like this? https://play.nim-lang.org/#ix=2PYo |
15:53:16 | FromDiscord | <konsumlamm> or convert `len(x)` to `uint16` |
15:53:17 | FromDiscord | <Rika> oh wait |
15:53:23 | FromDiscord | <Rika> yeah |
15:53:24 | FromDiscord | <Rika> was gonna say |
15:53:28 | Oddmonger | ah yes |
15:53:47 | Oddmonger | thank you |
15:55:21 | FromDiscord | <Rika> prestige `let message = fmt"{ipcPrefix} {command}" & (if option.len > 0: fmt" {option}" else: "")` ? |
15:56:00 | Prestige | hm yeah that's a bit better |
15:56:01 | FromDiscord | <Rika> performance regression here tho i assume, but its not much if you're not doing this in a loop |
15:56:24 | Oddmonger | that's odd, when i do Β« echo type(0..10) Β» , it returns Β« int Β». Shouldn't it return Β« range Β» ? |
15:56:48 | FromDiscord | <Rika> !eval echo type(0..10) |
15:56:51 | NimBot | int |
15:56:55 | FromDiscord | <Rika> !eval echo typeof (0..10) |
15:56:58 | NimBot | int |
15:57:12 | FromDiscord | <Rika> heu |
15:57:41 | Oddmonger | when you typed Β« typeof Β», i thouhgt Β« i'm so lame Β», but hopefully, not so ^^' |
15:58:34 | FromDiscord | <Rika> yeah i was assuming |
15:58:37 | FromDiscord | <Rika> but its still the same |
15:58:38 | FromDiscord | <Rika> odd |
15:59:22 | FromDiscord | <konsumlamm> !eval let a = 0..10; echo typeof(a) |
15:59:25 | NimBot | HSlice[system.int, system.int] |
15:59:44 | Oddmonger | oh |
15:59:52 | FromDiscord | <konsumlamm> looks like a bug at first sight |
16:00:24 | FromDiscord | <Rika> well its because 0..10 is ambiguous to typeof's eyes |
16:00:38 | FromDiscord | <Rika> cant tell if its a slice or the iterator that's being asked |
16:00:48 | FromDiscord | <Rika> guess its biased to iterators |
16:01:07 | FromDiscord | <konsumlamm> oh, that's it probably |
16:01:25 | Oddmonger | it's a feature, then |
16:01:38 | FromDiscord | <Solitude> it is |
16:01:39 | FromDiscord | <konsumlamm> i remember reading something about typeof being biased to iterators a while ago |
16:01:41 | FromDiscord | <Rika> not really, more of a limitation |
16:01:57 | FromDiscord | <Solitude> !eval typeof(1..10, typeOfProc) |
16:01:59 | NimBot | Compile failed: /usercode/in.nim(1, 7) Error: expression 'typeof(1 .. 10)' is of type 'type HSlice[system.int, system.int]' and has to be used (or discarded) |
16:02:04 | FromDiscord | <Solitude> (edit) "!eval ... typeof(1..10," added "echo" |
16:02:11 | FromDiscord | <Solitude> !eval echo typeof(1..10, typeOfProc) |
16:02:14 | NimBot | HSlice[system.int, system.int] |
16:02:18 | Oddmonger | but if it considers it as an iterator, it should say Β« procΒ» ? |
16:02:39 | FromDiscord | <Solitude> what |
16:03:06 | Oddmonger | if [0..10] is seen as an iterator, why the answer is Β«intΒ» and not Β«procΒ» ? |
16:03:17 | FromDiscord | <Solitude> return type of iterator |
16:03:32 | FromDiscord | <konsumlamm> typeof for iterators gives you the type the iterator yields |
16:03:33 | FromDiscord | <Solitude> why would it even mention proc? |
16:03:33 | Oddmonger | ah it takes the return type ok |
16:03:59 | FromDiscord | <Rika> iterators arent procs technically |
16:04:20 | Oddmonger | closure aren't proc ? |
16:05:00 | FromDiscord | <konsumlamm> closur eiterators aren't procs either |
16:05:05 | FromDiscord | <konsumlamm> closure procs are procs |
16:05:28 | FromDiscord | <Solitude> !eval echo typeof `..` |
16:05:30 | NimBot | None |
16:05:34 | FromDiscord | <Solitude> amazing |
16:05:58 | FromDiscord | <Rika> .. doesnt exist confirmed |
16:06:01 | FromDiscord | <Rika> nim is a lie |
16:06:57 | FromDiscord | <Solitude> !eval iterator t: int {.closure.} = discard; echo typeof t |
16:06:59 | NimBot | <no output> |
16:07:32 | FromDiscord | <konsumlamm> !eval iterator t: int = discard; echo typeof t |
16:07:34 | NimBot | <no output> |
16:07:43 | FromDiscord | <konsumlamm> π€ |
16:08:00 | FromDiscord | <konsumlamm> !eval iterator t: int {.closure.} = discard; echo typeof t() |
16:08:02 | NimBot | Compile failed: /usercode/in.nim(1, 53) Error: recursion is not supported in iterators: 't' |
16:08:28 | FromDiscord | <Clyybber> it considers the echo typeof t() part of the loop body |
16:08:32 | FromDiscord | <konsumlamm> ye |
16:08:32 | FromDiscord | <Clyybber> (edit) "loop" => "iterator" |
16:08:35 | FromDiscord | <Solitude> my snippet works in nim secret |
16:08:55 | FromDiscord | <Solitude> sent a code paste, see https://play.nim-lang.org/#ix=2PYy |
16:09:08 | FromDiscord | <Clyybber> the issue is `discard; echo typeof t` |
16:09:13 | FromDiscord | <Clyybber> it's one body |
16:09:18 | FromDiscord | <Clyybber> ; doesn't close the proc body |
16:09:26 | FromDiscord | <Rika> add more ;;;;;;;;;;;;;;;;;;; |
16:09:27 | FromDiscord | <Rika> xd |
16:09:28 | FromDiscord | <Solitude> my bad, chief |
16:10:56 | * | gollark[m]1 quit (Ping timeout: 240 seconds) |
16:10:56 | * | FlammableDuck[m] quit (Ping timeout: 240 seconds) |
16:10:56 | * | j-james[m] quit (Ping timeout: 240 seconds) |
16:12:37 | * | krux02 quit (Read error: Connection reset by peer) |
16:12:37 | * | krux02_ joined #nim |
16:15:26 | * | Benjamin[m]2 quit (Ping timeout: 240 seconds) |
16:16:19 | * | krux02_ quit (Remote host closed the connection) |
16:17:06 | * | krux02 joined #nim |
16:17:51 | * | FlammableDuck[m] joined #nim |
16:18:02 | Oddmonger | excuse me to be so lame, but it's hard to find infos about this in the doc (as was saying the banned guys⦠erm no.) about converting 0..len(x) from int to uint16 |
16:18:46 | Oddmonger | i've trialed and errored with 0..len(x).uint16 , 0.uint16..len(x).uint16 , uint16(0..len(x)) (ahem) |
16:18:51 | Oddmonger | with no luck |
16:20:06 | Oddmonger | i know the luck has nothing to do with programming, so you can just throw with a sigh the location of the information in the manual, and i will be happy |
16:20:08 | Oddmonger | i promise |
16:22:15 | FromDiscord | <Rika> !eval echo typeof 0.uint16..len(x).uint16 |
16:22:17 | FromDiscord | <Rika> oops |
16:22:17 | NimBot | Compile failed: /usercode/in.nim(1, 27) Error: undeclared identifier: 'x' |
16:22:18 | FromDiscord | <Rika> no x |
16:22:27 | FromDiscord | <Rika> !eval echo typeof 0.uint16..len("jgqwe:).uint16 |
16:22:29 | NimBot | Compile failed: /usercode/in.nim(1, 27) Error: closing " expected |
16:22:31 | FromDiscord | <Rika> typo |
16:22:35 | FromDiscord | <Rika> !eval echo typeof 0.uint16..len("jgqwe").uint16 |
16:22:36 | FromDiscord | <Solitude> you can do it |
16:22:38 | NimBot | uint16 |
16:22:48 | FromDiscord | <Rika> oddmonger i dont see the issue |
16:22:49 | Oddmonger | i was sure i had tried the double uint16 |
16:23:11 | Oddmonger | in fact, i have 0..len(x)-1 |
16:23:23 | FromDiscord | <Rika> use ..< instead of ..()-1 |
16:23:27 | FromDiscord | <Solitude> !eval echo typeof 0..len"".uint16 |
16:23:29 | NimBot | Compile failed: /usercode/in.nim(1, 14) Error: ambiguous call; both system...(a: uint32, b: uint32) [declared in /playground/nim/lib/system/iterators_1.nim(88, 14)] and system...(a: uint64, b: uint64) [declared in /playground/nim/lib/system/iterators_1.nim(88, 14)] match for: (int literal(0), uint16) |
16:23:31 | Oddmonger | so 0.uint16..(len(x)-1).uint16 ? |
16:23:35 | FromDiscord | <Rika> !eval echo typeof 0.uint16..<len("jgqwe").uint16 |
16:23:37 | NimBot | uint16 |
16:23:46 | FromDiscord | <Rika> you can do that yes |
16:23:59 | Oddmonger | i prefer your ..< , much nicer |
16:24:10 | Oddmonger | i had forgotten this option |
16:24:12 | Oddmonger | thank you |
16:25:01 | * | gollark[m]1 joined #nim |
16:25:10 | * | j-james[m] joined #nim |
16:25:36 | krux02 | Oddmonger: you can probably use `..<` exclusively and forget about `..` |
16:25:44 | FromDiscord | <Rika> said that already π |
16:26:13 | Oddmonger | yes, but thanks anyway |
16:26:19 | Oddmonger | now, it's tea time :)β |
16:26:41 | FromDiscord | <Rika> have fun |
16:27:09 | FromDiscord | <Rika> i'm not having fun, have to deal with japanese and unicode normalization + transliteration |
16:30:05 | * | Benjamin[m]2 joined #nim |
16:31:01 | FromDiscord | <konsumlamm> Oddmonger: also remember that usually you can just iterate over the collection directly (with `items` or `enumerate`), assuming you're indexing into a collection |
16:33:11 | * | PMunch quit (Quit: leaving) |
16:48:13 | * | krux02 quit (Remote host closed the connection) |
16:49:43 | * | krux02 joined #nim |
17:00:22 | * | blocked_ joined #nim |
17:00:53 | * | blocked_ quit (Remote host closed the connection) |
17:04:37 | * | letto quit (Quit: Konversation terminated!) |
17:05:10 | * | letto joined #nim |
17:09:06 | * | ^Q-Master^ joined #nim |
17:10:43 | * | nickster2 joined #nim |
17:11:13 | * | grobe0ba_ joined #nim |
17:13:59 | * | dsrw joined #nim |
17:14:09 | * | asdflkj_1 joined #nim |
17:14:29 | * | xace_ joined #nim |
17:14:37 | * | kenran joined #nim |
17:16:12 | * | jxy_ joined #nim |
17:17:30 | * | Cthalupa- joined #nim |
17:18:49 | * | lritter quit (*.net *.split) |
17:18:49 | * | asdflkj_ quit (*.net *.split) |
17:18:49 | * | Q-Master quit (*.net *.split) |
17:18:50 | * | jxy quit (*.net *.split) |
17:18:50 | * | Cthalupa quit (*.net *.split) |
17:18:50 | * | casaca quit (*.net *.split) |
17:18:50 | * | grobe0ba quit (*.net *.split) |
17:18:50 | * | nickster quit (*.net *.split) |
17:18:51 | * | xace quit (*.net *.split) |
17:18:51 | * | dsrw_ quit (*.net *.split) |
17:18:51 | * | nickster2 is now known as nickster |
17:18:52 | * | grobe0ba_ is now known as grobe0ba |
17:19:44 | Prestige | I'm attempting to use the AsyncSocket's readLine proc - I'm getting a "line" when I expect, but the string is always empty. Is there something I'm missing? |
17:21:19 | * | lritter joined #nim |
17:21:19 | * | asdflkj_ joined #nim |
17:21:19 | * | jxy joined #nim |
17:21:19 | * | Cthalupa joined #nim |
17:21:19 | * | casaca joined #nim |
17:21:19 | * | 07IAAT3C1 joined #nim |
17:21:19 | * | 07IAAT3BB joined #nim |
17:21:19 | * | xace joined #nim |
17:21:25 | Prestige | https://nim-lang.org/docs/asyncnet.html#recvLine%2CAsyncSocket seems basic, I don't know why I'm not seeing data come through |
17:21:40 | * | 07IAAT3BB quit (Max SendQ exceeded) |
17:21:45 | * | lritter quit (Excess Flood) |
17:22:29 | * | asdflkj_ quit (Ping timeout: 254 seconds) |
17:22:29 | * | jxy quit (Ping timeout: 254 seconds) |
17:22:30 | * | Cthalupa quit (Ping timeout: 254 seconds) |
17:22:30 | * | 07IAAT3C1 quit (Ping timeout: 254 seconds) |
17:22:30 | * | xace quit (Ping timeout: 254 seconds) |
17:23:01 | Prestige | I am using a regular Socket to send and an AsyncSocket to receieve, but I don't think that would matter |
17:25:16 | * | a_chou joined #nim |
17:26:14 | * | jk13579[m] quit (Ping timeout: 244 seconds) |
17:26:16 | * | Avatarfighter[m] quit (Ping timeout: 244 seconds) |
17:26:16 | * | GitterIntegratio quit (Ping timeout: 244 seconds) |
17:26:23 | * | lritter joined #nim |
17:28:19 | * | jk13579[m] joined #nim |
17:28:37 | Prestige | Also, it's a unix socket if that makes a difference. |
17:29:36 | * | Avatarfighter[m] joined #nim |
17:49:08 | Prestige | I've tried converting it to an AsyncSocket to see if that would help, but am getting an error I don't know how to decipher https://play.nim-lang.org/#ix=2PZ6 |
17:49:24 | * | natrys joined #nim |
17:49:36 | FromDiscord | <Yjuq> Hi, there is no channel specific for questions. So, can I just ask them here? ^.^ |
17:50:10 | FromDiscord | <Yjuq> (edit) "^.^" => "^.^β΅I'm pretty new in Nim and try to wrap my head around some stuff." |
17:50:19 | FromDiscord | <kaletaa> sure |
17:54:13 | Prestige | This is the "working" code (without async) https://play.nim-lang.org/#ix=2PZ7 but on the receiving end, it's just empty strings |
17:56:06 | FromDiscord | <Yjuq> sent a code paste, see https://play.nim-lang.org/#ix=2PZa |
17:56:15 | FromDiscord | <dom96> Prestige: empty string means the socket is closed |
17:57:02 | FromDiscord | <dom96> but there is a possibility that async does not handle unix sockets correctly |
17:57:27 | FromDiscord | <dom96> I haven't personally used it this way and don't recall anyone else doing so either |
17:57:51 | FromDiscord | <Yjuq> (edit) "https://play.nim-lang.org/#ix=2PZa" => "https://play.nim-lang.org/#ix=2PZb" |
17:58:20 | Prestige | So the listening side using recvLine is being triggered at the appropriate times @dom96 so I don't think it's closed? |
18:00:29 | * | watzon quit (Quit: authenticating) |
18:00:35 | Oddmonger | @mratsim : when i can i use items, but this time, i need to store the index |
18:00:37 | * | watzon joined #nim |
18:01:00 | FromDiscord | <mratsim> ? |
18:01:14 | Oddmonger | oh excuse me, it was for @konsumlamm |
18:01:19 | Oddmonger | misread |
18:01:43 | FromDiscord | <konsumlamm> do you know about `enumerate`? thought that's only on devel afaik |
18:01:46 | FromDiscord | <konsumlamm> or `pairs` |
18:02:12 | FromDiscord | <kaletaa> In reply to @Yjuq "Great, I try to": do you get an error? |
18:02:14 | FromDiscord | <dom96> Prestige: to debug what's going on you might want to try just using a `recv(sock, 1)` |
18:02:25 | FromDiscord | <haxscramper> In reply to @Yjuq "Great, I try to": You can use macros as pragmas to use own logic. There is no example in the manual though, give me a sec I will write one |
18:03:00 | FromDiscord | <kaletaa> nvm it's a semantic problem, what's $1 supposed to be? i'm missing something |
18:04:03 | Oddmonger | ah no, i don't know enumarate (nor pairs) |
18:04:07 | Oddmonger | i look |
18:05:01 | FromDiscord | <Yjuq> In reply to @kaletaa "do you get an": Yes, I do. This is the important bit:β΅`undefined reference to mylib_Example` |
18:05:02 | Prestige | comes back empty as well. |
18:05:25 | FromDiscord | <Yjuq> The symbol is not defined in c and I get an error |
18:06:19 | FromDiscord | <Yjuq> This tells me that I can't use `toLowerAscii` like that to automatic get the word `Example` into lower case |
18:07:08 | * | Vladar joined #nim |
18:07:57 | Prestige | @dom96 oh hey, using recv(31) I get the full string (that's the length of the string I am sending). So for some reason recvLine is not working |
18:07:59 | FromDiscord | <Yjuq> In reply to @kaletaa "nvm it's a semantic": sent a code paste, see https://play.nim-lang.org/#ix=2PZf |
18:08:31 | FromDiscord | <Rika> yjuq nothing you can do, i believe manual is the only way |
18:09:25 | FromDiscord | <haxscramper> In reply to @Yjuq "Yes, I do. This": https://play.nim-lang.org/#ix=2PZg |
18:10:16 | FromDiscord | <haxscramper> This gets strange when you mix `.pragma` and `importc: $1`, so macro is safer |
18:10:36 | FromDiscord | <haxscramper> And `toLowerAscii()` is probably not supported in importc anyway |
18:10:41 | FromDiscord | <Yjuq> In reply to @haxscramper "https://play.nim-lang.org/#ix=2PZg": Thank you, I was looking in the macro docu because I got a feeling I could solve it with it. But this stuff looks complicated |
18:10:55 | Prestige | I guess I can just do some arbitrary number in recv for now... |
18:11:39 | FromDiscord | <konsumlamm> @haxscramper do you know anything about when fusion#61 will get merged? i think it's about time |
18:11:52 | FromDiscord | <dom96> Prestige: huh, weird. Are you sure your string has newline chars? |
18:12:17 | FromDiscord | <dom96> if you're up for it, recvLine's implementation is pretty straightforward so you should be able to figure out what's going wrong by adding a few echos in there |
18:12:18 | FromDiscord | <haxscramper> In reply to @konsumlamm "<@!608382355454951435> do you know": zero idea |
18:12:41 | FromDiscord | <Yjuq> In reply to @haxscramper "https://play.nim-lang.org/#ix=2PZg": sent a code paste, see https://play.nim-lang.org/#ix=2PZl |
18:12:51 | FromDiscord | <kaletaa> imports both strutils and macros from the stdlib |
18:13:14 | FromDiscord | <Yjuq> but doesn't do `import strutils` and `import macros` the same? |
18:13:14 | FromDiscord | <haxscramper> In reply to @haxscramper "zero idea": I pinged narimiran, so it is known that #61 is ready, but I guess that because new release is soon it might take some time (i.e. not instantly) |
18:13:14 | FromDiscord | <kaletaa> useful for when you have files like macros.nim next to the one you're working on |
18:13:25 | FromDiscord | <kaletaa> In reply to @Yjuq "but doesn't do `import": yes but this forces the stdlib ones |
18:13:30 | FromDiscord | <Yjuq> I see |
18:13:38 | FromDiscord | <Yjuq> I keep this in mind, thank you |
18:13:41 | Prestige | @dom96 yeah I added the \r\L to the end of the string like the proc docs says to do |
18:13:52 | FromDiscord | <haxscramper> In reply to @Yjuq "but doesn't do `import": Some new stdlib modules require `std/` prefix, so it is safer to just always do `std/` |
18:14:11 | FromDiscord | <haxscramper> For example `std/enumerate` and some others |
18:14:20 | FromDiscord | <mratsim> std/monotime |
18:14:22 | FromDiscord | <konsumlamm> and it also makes it clear what modules come from the stdlib |
18:14:27 | FromDiscord | <mratsim> (edit) "std/monotime" => "std/monotimes" |
18:21:42 | FromDiscord | <Yjuq> I'm pretty excited about nim. I tried a lot of other languages so far and I kinda got a liking to Go. But CGO seems just terrible and nim does a better job with writing c bindings easily. :D |
18:22:53 | FromDiscord | <Yjuq> I never liked C++ - to much syntax hassle <.< |
18:23:55 | FromDiscord | <treeform> I like go, but its missing generics and templates which I really like in nim. Go just feels "too" simple. |
18:24:26 | FromDiscord | <Yjuq> Yea - there will be generic support in the future. I'm still waiting for this - in the meanwhile nim will replace go for me |
18:24:34 | FromDiscord | <Yjuq> until it got all the features i'm missing |
18:24:49 | FromDiscord | <treeform> Google employs a ton of people and they need a simpler language for their 40k programmers. |
18:25:12 | FromDiscord | <treeform> I don't think go will get templates or macros ... they fought generics for so long. |
18:29:19 | * | a_chou quit (Quit: a_chou) |
18:29:37 | * | a_chou joined #nim |
18:29:56 | FromDiscord | <hamidb80> what is `do nothing` in nim? for example `pass` does nothing in python |
18:30:13 | FromDiscord | <Solitude> discard |
18:30:41 | FromDiscord | <konsumlamm> still with generics, go is lacking many features |
18:30:57 | FromDiscord | <Yjuq> `asm "nop"` |
18:32:26 | FromDiscord | <hamidb80> In reply to @konsumlamm "still with generics, go": yeah, absolutely |
18:32:59 | FromDiscord | <Yjuq> I avoided compiler for my career. I probably would jump on the c++ train long time ago if I could understand the gcc compiler properly. Now it's to late and I prefer languages with simple compiler. I mean... c'mon: `nim c main.nim` - easy |
18:33:07 | FromDiscord | <apollo> in what scenario would you use C in place of nim or vice-versa just wondering nothing important just curiosity itching me |
18:33:29 | FromDiscord | <kaletaa> when you're feeling masochistic |
18:33:50 | FromDiscord | <apollo> noice |
18:34:11 | FromDiscord | <mratsim> In reply to @treeform "Google employs a ton": Google employs top graduate from top universities after top whiteboard interviews. Pretty sure they could handle more complex languages as well. |
18:34:40 | FromDiscord | <mratsim> In reply to @apollo "in what scenario would": When your professor doesn't allow Nim code. |
18:34:42 | * | natrys quit (Ping timeout: 246 seconds) |
18:34:48 | FromDiscord | <mratsim> (edit) "graduate" => "graduates" |
18:34:54 | FromDiscord | <apollo> What if you're professor happens to be araq |
18:34:56 | FromDiscord | <Yjuq> Yea, they even use Goolge Docs as IDE. Best syntax highlighting. You can highlight stuff however you want! |
18:34:56 | FromDiscord | <apollo> π |
18:35:04 | FromDiscord | <apollo> Wait what google docs |
18:35:06 | FromDiscord | <apollo> π |
18:35:11 | FromDiscord | <mratsim> Not sure Araq has the patience of handling students :p |
18:35:18 | FromDiscord | <Yjuq> (edit) "Goolge" => "Google" |
18:35:19 | FromDiscord | <apollo> :p |
18:35:21 | FromDiscord | <Rika> In reply to @mratsim "When your professor doesn't": i mean, you can always submit the codegen... |
18:35:31 | FromDiscord | <Rika> ~~please for the love of god dont~~ |
18:35:34 | FromDiscord | <mratsim> people often ask that yes π |
18:35:36 | FromDiscord | <apollo> no we will |
18:35:38 | FromDiscord | <apollo> rika |
18:35:45 | FromDiscord | <Rika> ok |
18:36:07 | FromDiscord | <mratsim> we need a ncat tool that put Nim generated code + nimbase.h together and strip duplicates definition. |
18:36:51 | FromDiscord | <hamidb80> In reply to @mratsim "we need a ncat": for what |
18:37:01 | FromDiscord | <haxscramper> https://nim-lang.org/docs/nimc.html#crossminuscompilation haven't tried `--genScript`, but it seems pretty close |
18:37:03 | FromDiscord | <mratsim> for codewars |
18:37:03 | FromDiscord | <apollo> time to relearn nim again |
18:37:43 | FromDiscord | <mratsim> again? |
18:37:50 | FromDiscord | <mratsim> didn't you learn this week already? |
18:38:32 | FromDiscord | <apollo> no i was learning C instead π |
18:38:51 | FromDiscord | <apollo> but i did make a notebook with nim code a while ago |
18:38:57 | FromDiscord | <konsumlamm> In reply to @mratsim "Google employs top graduates": "The key point here is our programmers are Googlers, theyβre not researchers. Theyβre typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. Theyβre not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to unders |
18:38:58 | FromDiscord | <apollo> just have to read my own code πΏ |
18:39:21 | FromDiscord | <mratsim> In reply to @konsumlamm ""The key point here": not condescending at all. |
18:39:30 | FromDiscord | <konsumlamm> ikr |
18:39:44 | FromDiscord | <konsumlamm> (Rob Pike is the inventor of Go, for reference) |
18:39:49 | FromDiscord | <mratsim> I know |
18:40:06 | FromDiscord | <Rika> i think they mean reference for others |
18:41:14 | FromDiscord | <hamidb80> In reply to @konsumlamm ""The key point here": seems reasonable ... |
18:41:37 | FromDiscord | <Yjuq> I mean, everyone needs to start somewhere right? |
18:41:53 | FromDiscord | <Yjuq> But honestly, I wish most languages would be more simplistic |
18:42:07 | FromDiscord | <apollo> like python |
18:42:13 | FromDiscord | <Yjuq> go has the right direction but is quite far away from perfect in my opinion |
18:42:15 | FromDiscord | <hamidb80> In reply to @konsumlamm ""The key point here": golang fits well for google |
18:42:19 | FromDiscord | <apollo> no one has made a simple language like python yet and i stand to be corrected |
18:42:23 | FromDiscord | <konsumlamm> under the surface, python isn't really simplistic tbh |
18:42:24 | FromDiscord | <apollo> (edit) "corrected" => "proven wrong" |
18:42:30 | FromDiscord | <Yjuq> In reply to @apollo "no one has made": lua |
18:42:32 | FromDiscord | <apollo> yes but it's very easy to learn and very friendly |
18:42:41 | FromDiscord | <mratsim> until you need to build complex things |
18:42:48 | FromDiscord | <apollo> In reply to @Yjuq "lua": only thing i know lua for is my roblox days |
18:43:03 | FromDiscord | <mratsim> and then it all breaks down because you need 30k lines of "is_intance_of(string)" |
18:43:06 | FromDiscord | <Yjuq> I use lua on a daily basis. It's such a lovely language |
18:43:09 | FromDiscord | <Rika> i dont think i want a simplistic language |
18:43:10 | FromDiscord | <hamidb80> In reply to @mratsim "until you need to": and it becomes super complex ... |
18:43:16 | FromDiscord | <mratsim> (edit) ""is_intance_of(string)"" => ""is_instance_of(string)"" |
18:43:17 | FromDiscord | <Rika> i want a concise and consistent language |
18:43:27 | FromDiscord | <konsumlamm> dynamic typing was a mistake |
18:43:33 | FromDiscord | <kaletaa> In reply to @konsumlamm "dynamic typing was a": . |
18:43:37 | FromDiscord | <Rika> a simplistic language will make something complex look more complex that it is |
18:43:52 | Oddmonger | i see lua more like a c complement (even if i use it for shell scripting) |
18:43:52 | FromDiscord | <hamidb80> In reply to @kaletaa ".": i think it wasn't back then |
18:44:06 | FromDiscord | <treeform> I really liked python around 2008 ... but I feel python has really gone down hill with the increased popularity. |
18:45:07 | FromDiscord | <hamidb80> In reply to @Rika "a simplistic language will": oh, that's right π€ |
18:45:29 | FromDiscord | <apollo> In reply to @treeform "I really liked python": so are you saying it's popularity has made it what it is today |
18:45:34 | Oddmonger | i want GOTO |
18:45:43 | FromDiscord | <kaletaa> no |
18:45:48 | FromDiscord | <hamidb80> In reply to @Oddmonger "i want GOTO": no |
18:45:56 | FromDiscord | <apollo> no |
18:46:12 | FromDiscord | <Yjuq> In reply to @Oddmonger "i want GOTO": lua supports goto :P |
18:46:19 | Oddmonger | local only :) |
18:46:39 | FromDiscord | <Yjuq> It's enough, you just use it to jump out of loops sometimes |
18:46:43 | Oddmonger | if the name scares you, i suggest Β«jmp farΒ» instead |
18:46:46 | FromDiscord | <apollo> lua is roblox |
18:47:12 | Oddmonger | roblox is a windows sh*t done for crashing wine |
18:47:36 | Prestige | any docs on sharing resources between threads? |
18:48:02 | Oddmonger | with arc/orc ? |
18:48:07 | Prestige | no |
18:48:31 | Oddmonger | i've read somewhere it was easier with the new gc |
18:49:48 | Prestige | I'm just not seeing any documentation on the topic |
18:50:13 | * | natrys joined #nim |
18:50:54 | Oddmonger | i've found only threads on the forum |
18:51:06 | Prestige | Lol |
18:51:24 | FromDiscord | <Yjuq> Oh yea,... Just a quick question about pointer. Is the `pointer` type the same like the `void` counterpart in c? |
18:51:43 | FromDiscord | <Rika> yes |
18:51:47 | FromDiscord | <haxscramper> @konsumlamm |
18:51:51 | FromDiscord | <haxscramper> PR was merged |
18:51:58 | FromDiscord | <haxscramper> yay |
18:51:59 | FromDiscord | <Yjuq> and `ptr int` would be `int`? |
18:52:07 | FromDiscord | <haxscramper> yes |
18:52:29 | FromDiscord | <Yjuq> okey good, because it was a bit confusing in the docu. But looks like I got it right, thanks |
18:53:26 | Oddmonger | pointer can be used only as C function parameter, right ? |
18:53:37 | FromDiscord | <Yjuq> You can use them normally as well |
18:53:44 | FromDiscord | <Yjuq> but i think nim discourages this |
18:54:01 | Oddmonger | isn't Β«ptrΒ» for nim only ? |
18:54:39 | FromDiscord | <Yjuq> I think there was a difference between `ptr` and `ref` - `ptr` means it will be ignored from the GC and `ref` will be collected |
18:54:44 | FromDiscord | <Yjuq> or something like this |
18:55:13 | FromDiscord | <Yjuq> But both do the same, declare a pointer. As far I understand the docu correctly |
18:55:28 | Oddmonger | yes ref is referenced |
18:55:55 | Oddmonger | but you can allocate a ptr with Β«newΒ» keyword only |
18:55:59 | FromDiscord | <konsumlamm> In reply to @haxscramper "PR was merged": hooray |
18:56:20 | FromDiscord | <Yjuq> In reply to @Oddmonger "but you can allocate": not quite, you have the alloc stuf as well. let me take a look in the docu |
18:57:28 | FromDiscord | <konsumlamm> In reply to @Prestige "any docs on sharing": i think the only way to do that without ARC/ORC is using raw pointers (`ptr`) |
18:57:32 | FromDiscord | <Yjuq> To allocate a new traced object, the built-in procedure `new` has to be used. To deal with untraced memory, the procedures `alloc`, `dealloc` and `realloc` can be used. The documentation of the system module contains further information. |
18:58:49 | Oddmonger | ah you can alloc the C way, didn't knew |
18:59:48 | FromDiscord | <Yjuq> I would probably discarded nim right away if I didn't find a way to do this :P |
19:00:01 | FromDiscord | <Yjuq> That's why this was sticking in my head |
19:01:26 | FromDiscord | <Yjuq> Man, I should read the tutorials already. I'm just reading the last 3 days the whole docu step by step |
19:03:26 | FromDiscord | <hamidb80> is it possible to say that? https://media.discordapp.net/attachments/371759389889003532/812398957158203392/unknown.png |
19:04:11 | FromDiscord | <hamidb80> (edit) "say" => "do" |
19:04:27 | FromDiscord | <hamidb80> (edit) "that?" => "that somehow?" |
19:08:15 | FromDiscord | <haxscramper> You can write template that replaces `Funcs` with `const` array of stirngs |
19:08:39 | FromDiscord | <haxscramper> Maybe there is a more elegant way to do this with `low(Funcs) .. high(Funcs)`, but I'm not sure |
19:08:40 | Prestige | hm |
19:08:59 | FromDiscord | <hamidb80> In reply to @haxscramper "Maybe there is a": no it doesn't work |
19:10:15 | Prestige | I'm attemping to tell thread A to invoke a function that belongs to thread B, but it's not GC safe |
19:11:59 | FromDiscord | <queersorceress> hey all, this might be a long shot but wondering if anyone knows of a templating engine library for nim that supports basic logic operations. i'd be okay with mustache templates if it also supported if statements/conditionals. only libraries i can see on nimble.directory either are mustache libraries or are very old/unsupported for the behavior i am looking for. figured i should ask the group to see if there are some other librarie |
19:12:16 | FromDiscord | <Yjuq> In reply to @hamidb80 "is it possible to": sent a code paste, see https://play.nim-lang.org/#ix=2PZE |
19:12:35 | FromDiscord | <Yjuq> Maybe with a template and some static magic you can do that per compile time? x) |
19:12:41 | FromDiscord | <Yjuq> Dunno if this works |
19:13:01 | Prestige | Maybe there's some way I can turn blocking calls into async functions |
19:13:11 | Prestige | then I could do it all on one thread |
19:13:24 | FromDiscord | <haxscramper> In reply to @hamidb80 "no it doesn't work": https://play.nim-lang.org/#ix=2PZG |
19:14:44 | FromDiscord | <hamidb80> In reply to @haxscramper "https://play.nim-lang.org/#ix=2PZG": is that empty? |
19:14:44 | FromDiscord | <haxscramper> In reply to @haxscramper "https://play.nim-lang.org/#ix=2PZG": This can be optimized into zero-cost at rutime if you need, with wrapper helper |
19:15:10 | FromDiscord | <haxscramper> In reply to @hamidb80 "is that empty?": sent a code paste, see https://play.nim-lang.org/#ix=2PZI |
19:15:34 | FromDiscord | <hamidb80> In reply to @haxscramper "https://play.nim-lang.org/#ix=2PZG": i don't see anything except one empty line |
19:16:54 | FromDiscord | <hamidb80> In reply to @haxscramper "no? ```nim type": awesome |
19:18:14 | * | PMunch joined #nim |
19:18:37 | FromDiscord | <haxscramper> In reply to @haxscramper "This can be optimized": https://play.nim-lang.org/#ix=2PZL |
19:19:16 | FromDiscord | <haxscramper> I'm fairly sure there is a more elegant way to force consteval function to be a constexpr whever possible |
19:19:28 | FromDiscord | <haxscramper> evaluate to constant expression |
19:19:47 | FromDiscord | <hamidb80> hmm.. |
19:32:05 | * | FromGitter quit (Ping timeout: 265 seconds) |
19:32:27 | * | FromGitter joined #nim |
19:33:57 | * | oprypin_ joined #nim |
19:34:01 | * | oprypin quit (Ping timeout: 265 seconds) |
19:34:20 | FromDiscord | <queersorceress> @haxscramper this seems an awful lot like the functionality in the `parseutils` module. |
19:34:34 | FromDiscord | <queersorceress> particularly `parseEnum` |
19:36:32 | * | lritter quit (*.net *.split) |
19:36:32 | * | zedeus quit (*.net *.split) |
19:36:33 | * | junland quit (*.net *.split) |
19:36:34 | * | def- quit (*.net *.split) |
19:36:34 | * | hoek quit (*.net *.split) |
19:36:34 | * | literal quit (*.net *.split) |
19:36:34 | * | lbart quit (*.net *.split) |
19:36:35 | * | nisstyre quit (*.net *.split) |
19:38:07 | FromDiscord | <haxscramper> Yes, though it does all sort of case-insensetive parsing, and might be not necessary in this case (also it raises instead of returning true/false) |
19:38:31 | FromDiscord | <zetashift> treeform: Whenever I join two paths I get a small indent: https://play.nim-lang.org/#ix=2PZP the playground link also contains the link to the my result, is there a way to fill that up? Am I specifying the coordinates wrong maybe? |
19:39:39 | FromDiscord | <zetashift> e.g. make the paths overlap fully |
19:40:13 | * | lritter joined #nim |
19:40:13 | * | zedeus joined #nim |
19:40:13 | * | junland joined #nim |
19:40:13 | * | def- joined #nim |
19:40:13 | * | hoek joined #nim |
19:40:13 | * | literal joined #nim |
19:40:13 | * | lbart joined #nim |
19:40:13 | * | nisstyre joined #nim |
19:40:21 | * | nisstyre quit (Max SendQ exceeded) |
19:41:42 | * | nisstyre joined #nim |
19:43:17 | * | hoek quit (Ping timeout: 256 seconds) |
19:45:01 | * | hoek joined #nim |
19:46:03 | FromDiscord | <ElegantBeef> In reply to @hamidb80 "is it possible to": If you're you can just use `strutils.parseEnum` |
19:46:15 | FromDiscord | <ElegantBeef> (edit) "In reply to @hamidb80 "is it possible to": If you're ... you" added "lazy" |
19:49:51 | Prestige | @ElegantBeef you have any async experience with Nim? I pretty much have two blocking calls I've converted to async procs, I'm wanting them to process continuously until the program exits... |
19:50:09 | Prestige | Was trying with threads earlier but they need to be able to communicate |
19:51:42 | * | kenran quit (Quit: leaving) |
19:52:45 | FromDiscord | <gollark> `asyncCheck thing1()`, `asyncCheck thing2()`, `runForever`? |
19:53:17 | Prestige | That's what I'm doing, but I think one is blocking (they both have while true: ...) |
19:53:37 | FromDiscord | <dom96> while true doesn't necessarily mean blocking |
19:54:11 | Prestige | hm |
19:57:02 | Prestige | Something else is happening I guess |
19:58:44 | FromDiscord | <Rika> as long as they both have await inside their while true |
19:58:46 | Prestige | It's like running a cached binary or something... I changed an echo statement and the old one is being used, lol. |
19:58:49 | FromDiscord | <Rika> shouldnt block |
20:09:34 | Prestige | okay somehow the process was still running in the bg or something, had to close my terminal. Back to seeing why async in this case isn't working. |
20:10:17 | Prestige | Whichever of these 2 function is ran last, does print anything when I echo. So it seems it's being blocked |
20:10:38 | Prestige | They both have while true: await someAsyncFunction in them |
20:16:19 | FromDiscord | <mratsim> anything that interact with the console is blocking unless explicitly made non-blocking. |
20:16:45 | Prestige | Think I've narrowed it down. Only one of them seems to be blocking, so it's probably an incorrectly written function that returns a Future that I wrote |
20:16:45 | FromDiscord | <mratsim> that's because you need syscalls and the kernel can block you in those. |
20:16:58 | FromDiscord | <mratsim> for IO at least. |
20:17:50 | Prestige | Could you take a look at https://play.nim-lang.org/#ix=2Q03 because I believe I must have done this incorrectly (line 6)? |
20:17:58 | Prestige | This is where it hangs |
20:18:46 | FromDiscord | <mratsim> no idea what XNextEvent is. The doc should mention if it's blocking |
20:18:52 | FromDiscord | <mratsim> like if it's waiting for an event. |
20:18:53 | Prestige | It is blocking |
20:19:01 | Prestige | yeah it waits for an event |
20:19:59 | FromDiscord | <mratsim> then don't make it async |
20:20:12 | FromDiscord | <mratsim> if you run a blocking call on the async event loop you will block your whole loop |
20:20:31 | FromDiscord | <mratsim> you need to put it on a dedicate thread. |
20:21:11 | Prestige | I was attempting that first, but I need one thread to invoke a function that uses resources on another. It's not GC safe |
20:21:38 | FromDiscord | <mratsim> use a channel to transfer resources |
20:21:39 | FromDiscord | <queersorceress> is there any good materials out there for getting familiar with concurrent programming in Nim? i'm somewhat familiar with using channels, but it doesn't quite match up to my existing mental models of task queues and run loops that i've used in other languages. if there is an example for creating dedicated threads for dispatching work blocks, that would be really helpful. |
20:22:01 | Prestige | Any docs on that? Couldn't find anything earlier |
20:22:15 | FromDiscord | <mratsim> In reply to @queersorceress "is there any good": You use `createThread` with queues. |
20:22:40 | FromDiscord | <queersorceress> In reply to @Prestige "Any docs on that?": https://nim-lang.org/docs/channels.html |
20:23:05 | Prestige | ty |
20:23:24 | FromDiscord | <queersorceress> In reply to @mratsim "You use `createThread` with": is there a way to do that to a named thread, rather than a specific variable? |
20:23:34 | FromDiscord | <mratsim> In reply to @queersorceress "is there any good": I have a couple of examples in markdown of producer consumer arch: https://github.com/mratsim/blocksmith/blob/master/quarantine.md |
20:24:04 | FromDiscord | <mratsim> there is no easy named channels (CSP) or named coroutines (actors) |
20:24:16 | FromDiscord | <mratsim> at least not at the moment. |
20:25:01 | FromDiscord | <queersorceress> hmmm, i'm very much use to using libdispatch/GCD if you are familiar with that API -- i guess i could make a singleton interface to wrap that lookup at runtime |
20:25:01 | FromDiscord | <mratsim> and another example with a service that also manages a threadpool: https://github.com/mratsim/blocksmith/blob/master/rewinder.md |
20:25:24 | FromDiscord | <mratsim> yes I know libdispatch, not the API but what is inside. |
20:26:11 | Prestige | The resource I would be sending is a Table[string, proc], and I need to invoke the proc. Would that even work with channels? |
20:26:16 | FromDiscord | <queersorceress> the simplicity of specifying the queue by name, and then a callback or anonymous function of work to be done on said thread |
20:26:17 | FromDiscord | <mratsim> if you only have CPU tasks you can use Weave: there is an experimental background service thread mode as well: https://github.com/mratsim/weave#foreign-thread--background-service-experimental |
20:26:44 | FromDiscord | <mratsim> for IO there is nothing though |
20:26:51 | FromDiscord | <queersorceress> yeah i was looking at weave, but slightly intimidated by the amount of information for what i am planning on doing |
20:27:13 | FromDiscord | <mratsim> In reply to @Prestige "The resource I would": if your table is a const it's fine |
20:27:38 | FromDiscord | <mratsim> In reply to @queersorceress "yeah i was looking": that's because Nim doc generator is meh and so I needed to put everything in the README to avoid trying to deal and lose time with it. |
20:27:46 | Prestige | It's not, it gets populated at runtime |
20:28:14 | FromDiscord | <mratsim> but why don't you return the result of the event to the main thread once it arrived? |
20:28:30 | Prestige | the events are processed on the main thread |
20:28:47 | Prestige | the other thread is for ipc, listening for incomming messages |
20:28:58 | Prestige | based on the message, I want to invoke a proc |
20:29:19 | FromDiscord | <mratsim> but you want to invoke the proc on the main thread or on the listner? |
20:29:25 | FromDiscord | <mratsim> or it doesn't matter? |
20:29:26 | Prestige | On the main thread |
20:29:29 | FromDiscord | <queersorceress> context: i'm building an application with jester that will support automatically converting page content from .rst files over to .html and then cache them locally. i am trying to figure out how i'm going to write the code to safely handle the file operations in a thread-safe manner - and my mind went to named GCD dispatch queues to handle interactions with the cache. |
20:29:30 | Prestige | well |
20:29:40 | FromDiscord | <mratsim> then once it arrives forward the message by channel |
20:29:44 | Prestige | the objects exists on the main thread that the procs interact with |
20:29:47 | FromDiscord | <mratsim> so the table doesn't need to be shared |
20:29:55 | Prestige | hm that's a good idea |
20:29:59 | Prestige | ty |
20:30:42 | FromDiscord | <mratsim> In reply to @queersorceress "context: i'm building an": ah so it's IO mostly, I think asyncdispatch should be enough for that, why do you think you will need threads? |
20:31:16 | FromDiscord | <mratsim> I will have to look into those named dispatch queues, looks interesting. |
20:34:34 | FromDiscord | <queersorceress> it's just having the thread/queue tied to a user-composed string rather than a specific pointer. so in the case of nim channels, you have your `var worker: Thread[T]`, and instead of carrying that around everywhere it is needed, you can go `var worker = getThreadNamed("some.unique.string.identifying.your.thread")` to get your thread anywhere. i'm sure it's just mapped to some hashtable with access locks but it isn't that complicate |
20:35:07 | FromDiscord | <queersorceress> it is just a more user-friendly abstraction for the sake of using the API |
20:35:48 | * | blackpawn quit (Ping timeout: 260 seconds) |
20:36:55 | FromDiscord | <mratsim> got it |
20:37:19 | FromDiscord | <queersorceress> and you are right, i probably could just use asyncdispatch for this, but i'm not that comfortable with the low-level nature of the API, my next question was going to be about if the difference in using threads vs asyncdispatch would it cause any conflicts? |
20:37:44 | FromDiscord | <mratsim> AFAIK jester or httpbeast does use both |
20:37:57 | FromDiscord | <mratsim> asyncdispatch is async/await, same thing as in Python or C# |
20:38:12 | FromDiscord | <mratsim> or Rust or many other languages |
20:39:08 | FromDiscord | <queersorceress> mmm, vast majority of my concurrency experience is in C-languages π |
20:40:07 | FromDiscord | <mratsim> then here you go: https://github.com/nim-lang/Nim/pull/12979 |
20:47:56 | * | vsantana joined #nim |
21:03:06 | * | haxscramper quit (Remote host closed the connection) |
21:03:31 | * | blackpawn joined #nim |
21:04:22 | FromDiscord | <dom96> In reply to @queersorceress "context: i'm building an": I don't see a need for thread there |
21:04:24 | FromDiscord | <dom96> (edit) "thread" => "threads" |
21:06:02 | FromDiscord | <queersorceress> no? if two requests are made for the same uncached page, wouldn't that result in a race of trying to write a file to disk? |
21:09:08 | * | PMunch quit (Quit: leaving) |
21:12:59 | FromDiscord | <Rika> no threads mean harder to make race conditions |
21:13:12 | FromDiscord | <Rika> or impossible, but i cant recall if thats true |
21:14:38 | FromDiscord | <queersorceress> right, i mean you theoretically should be able to do that with just locks around the particular operations you need to limit but threads would make it much easier to manage conceptually (at least to me it is). |
21:16:55 | FromDiscord | <queersorceress> as long as operations happen on serial operation queues, that would prevent duplicate work being triggered and operations where the same resource is trying to be accessed concurrently (like the same cache file being written to disk from two separate network requests) |
21:23:02 | FromDiscord | <Yjuq> What is the technical difference between a macro and a template? |
21:24:01 | FromDiscord | <Clyybber> a template is like a simple macro that just replaces some parts of it's result with it's arguments |
21:24:15 | FromDiscord | <Clyybber> a full blown macro on the other hand can do whatever it wants with the ast |
21:24:30 | FromDiscord | <Clyybber> like iterate over it, check certain conditions and construct entirely new AST |
21:24:53 | FromDiscord | <queersorceress> macro can rewrite the AST of the code, whereas a template is more like a C preprocessor #define, it just done what it says |
21:27:40 | FromDiscord | <Yjuq> Huh gotcha - macro for AST manipulation and template for #define |
21:27:44 | FromDiscord | <Yjuq> sounds simple |
21:28:58 | FromDiscord | <Clyybber> C also uses #define for constants for which in Nim it would be idiomatic to use const |
21:29:49 | FromDiscord | <Yjuq> But you can't assign a constant out of a c header file in a const right? |
21:29:56 | FromDiscord | <Yjuq> With importc |
21:31:04 | FromDiscord | <Clyybber> nope |
21:32:40 | FromDiscord | <Yjuq> I still don't get what purpose `let` have. It's like a run time constant? Does it optimize something intern or is it just a "nice way" of immutable variables. |
21:33:19 | FromDiscord | <Yjuq> (edit) "have." => "has." |
21:33:48 | FromGitter | <deech> For passing function pointer to C/C++ I've been using `proc blah(...) {.inline.}` . It seems to be working, any gotchas? |
21:34:01 | FromDiscord | <Clyybber> yep, let means immutable |
21:34:17 | FromDiscord | <Clyybber> the compiler can do more optimizations on them |
21:34:25 | FromDiscord | <queersorceress> In reply to @mratsim "then here you go:": well, i get the concepts of futures, promises, etc. but those actions don't make the operations inherently safe, so i'd still need locks, i'd just be using a serial operations queue to limit the unsafe operations to not be concurrent as an alternative to doing lock management. |
21:34:45 | FromDiscord | <Clyybber> @deech: WDYM |
21:35:19 | FromGitter | <deech> Clyybber, is `inline` the right pragma to use for functions that shouldn't close over anything. |
21:35:48 | FromDiscord | <Clyybber> @deech Taking the address of an {.inline.} will prevent it from actually being inline |
21:35:50 | FromDiscord | <Clyybber> (edit) "inline" => "inlined" |
21:36:11 | FromDiscord | <Clyybber> {.inline.} translates to C's inline hint, which the C compiler is allowed to ignore |
21:36:12 | FromDiscord | <queersorceress> In reply to @Yjuq "I still don't get": using `let` makes an immutable object, whereas `var` makes a mutable one. this is important for functional programming practices, most of the time you perform transformations on data rather than having to modify something in place. this lends itself to make code more memory "safe". |
21:36:50 | FromGitter | <deech> So what's the right way of passing a function pointer to a Nim `proc`? |
21:37:16 | FromDiscord | <Yjuq> In reply to @deech "So what's the right": from c to nim or from nim to c? |
21:37:32 | FromDiscord | <Yjuq> In either way you can just pass the pointer. That's it |
21:37:50 | FromGitter | <deech> Nim `proc` that will be called by C/C++. |
21:38:25 | FromGitter | <deech> Can't simply pass a pointer though you have to make sure there's no closure environment, no? |
21:38:31 | FromDiscord | <queersorceress> In reply to @deech "So what's the right": you would have to use the `exportc` pragma to make a symbol that could be called by native c-language code. |
21:38:43 | FromDiscord | <Yjuq> In reply to @deech "Can't simply pass a": you can use a func instead |
21:38:44 | FromDiscord | <Clyybber> deech: Ah, you can use {.nimcall.} to force it to not be a closure |
21:38:51 | FromDiscord | <Clyybber> In reply to @Yjuq "you can use a": not related :) |
21:39:12 | FromGitter | <deech> Clyybber, ah hah! That's what I was looking for I think. Thanks! |
21:39:18 | FromDiscord | <Clyybber> In reply to @queersorceress "you would have to": nope, you can still pass the address of a non-exportc'ed function to C :) |
21:39:49 | FromDiscord | <treeform> In reply to @zetashift "treeform: Whenever I join": If you want lines to connect you should draw them in once path. The way you have it now is that you are drawing independed shapes. |
21:40:00 | FromDiscord | <treeform> We have not done all of the path joining yet. |
21:40:18 | FromDiscord | <queersorceress> if you are talking about callbacks, there are some other pragmas and ways to handle passing around function pointers, but i'd suggest using predefined C stdlib types like `(u)intptr_t` to accomodate for variable pointer size based on architecture and platform. |
21:40:45 | FromDiscord | <Yjuq> In reply to @Clyybber "not related :)": Seems like i misunderstood something. My english isn't always on spot :P - I probably misunderstood what "closure" means in this context |
21:40:48 | FromDiscord | <Clyybber> In reply to @deech "<@107882072974065664>, ah hah! That's": Although you probably want cdecl instead |
21:40:49 | FromDiscord | <queersorceress> In reply to @Clyybber "nope, you can still": i mean, sure, but why would you do that when you can use a normal function call?? |
21:41:36 | * | vicfred quit (Quit: Leaving) |
21:41:51 | FromGitter | <deech> Cool, so something like `proc p(...) {.cdecl.}; pass_to_c(rawProc p)` should do it? |
21:41:53 | FromDiscord | <Clyybber> In reply to @queersorceress "i mean, sure, but": Libraries often expect callbacks |
21:42:09 | FromDiscord | <Clyybber> In reply to @deech "Cool, so something like": no need to use rawProc, just use addr |
21:42:24 | FromGitter | <deech> Nice, thanks! |
21:42:40 | FromDiscord | <Clyybber> In reply to @Clyybber "Libraries often expect callbacks": and I suspect that deech is interoping with some C/C++ library here that expects a function pointer |
21:42:52 | FromGitter | <deech> Yep, that's the use case. |
21:43:50 | FromDiscord | <queersorceress> that depends highly on the implementation details of your compiler toolchain, which is why i gave the answer i did, as it should work everywhere, regardless of those details, but yes, please go on. |
21:44:58 | FromDiscord | <Clyybber> In reply to @queersorceress "that depends highly on": oh? I think I misunderstood what you were saying |
21:46:30 | FromDiscord | <ElegantBeef> Late prestige but nope i dont |
21:46:57 | Prestige | all good mratsim was able to help |
21:50:23 | FromDiscord | <queersorceress> In reply to @Clyybber "oh? I think I": sent a long message, see http://ix.io/2Q0E |
21:50:48 | * | narimiran quit (Ping timeout: 265 seconds) |
21:51:08 | FromDiscord | <Clyybber> oh, yeah. If you have control over the C code than doing exportc and calling it from C directly would work |
21:51:16 | FromDiscord | <Clyybber> (edit) "than" => "then" |
21:52:07 | FromDiscord | <Clyybber> using {.cdecl.} and passing the addr of the proc to a C function that expects a function pointer is definitely safe though |
21:52:42 | FromDiscord | <Clyybber> as long as the type of the argument you are passing to is properly declared in nim :) |
21:53:17 | FromDiscord | <Rika> yes |
21:53:18 | FromDiscord | <Yjuq> sent a code paste, see https://play.nim-lang.org/#ix=2Q0F |
21:53:20 | FromDiscord | <queersorceress> well as long as you properly know how to load the registers, that wouldn't matter either. |
21:53:22 | FromDiscord | <Rika> first x is typed |
21:53:29 | FromDiscord | <Rika> second is as you wrote, untyped |
21:53:30 | * | natrys quit (Ping timeout: 246 seconds) |
21:53:43 | FromDiscord | <ElegantBeef> Which doesnt really matter in this case |
21:54:03 | FromDiscord | <Rika> they asked if there was a difference tho xd |
21:54:15 | FromDiscord | <ElegantBeef> Yea i was just saying it being a sym doesnt matter much |
21:54:17 | FromDiscord | <Yjuq> sent a code paste, see https://play.nim-lang.org/#ix=2Q0G |
21:54:37 | FromDiscord | <ElegantBeef> I was going to say i dont think it's typed, i thought undeclared template types were untyped |
21:54:54 | FromDiscord | <Yjuq> So, they are per default always untyped. |
21:54:57 | FromDiscord | <Yjuq> gotcha |
21:55:34 | FromDiscord | <Rika> what the fuck |
21:55:38 | FromDiscord | <Rika> youre telling me |
21:55:39 | FromDiscord | <ElegantBeef> I'm looking at the docs now for certainty, but yea it sounds like they're untyped |
21:55:42 | FromDiscord | <Rika> parameters are untyped |
21:55:46 | FromDiscord | <queersorceress> have you read the language docs about typed vs untyped? |
21:55:46 | FromDiscord | <Rika> but return type is typed |
21:55:48 | FromDiscord | <Rika> by default? |
21:55:49 | FromDiscord | <ElegantBeef> for templates |
21:56:13 | FromDiscord | <Clyybber> In reply to @Rika "but return type is": typed/untyped as return type means expression/statement, so it makes sense |
21:56:14 | FromDiscord | <Yjuq> In reply to @queersorceress "have you read the": I'm currently reading it - this is probably not the last question about this topic from me :P |
21:56:20 | FromDiscord | <Rika> is THAT why ive been confused so many times |
21:56:47 | FromDiscord | <ElegantBeef> the difference is just one is semantically concise and capable of looking up(typed that is) |
21:56:57 | FromDiscord | <Rika> because i didnt realize omitting parameter type meant untyped by default and omitting return type meant typed by default |
21:57:15 | FromDiscord | <queersorceress> In reply to @Yjuq "I'm currently reading it": questions are cool, i'm just saying it because nim has pretty great docs and they should clear up most questions -- not trying to say anything about your questions π |
21:57:18 | FromDiscord | <Rika> that is certainly annoying |
21:57:42 | FromDiscord | <queersorceress> though the docs are pretty dense, so it can be easy to miss some stuff |
21:58:07 | FromDiscord | <Clyybber> In reply to @Rika "because i didnt realize": typed as a return type for templates basically means statement |
21:58:21 | FromDiscord | <Clyybber> which is confusing I agree :D |
21:58:49 | FromDiscord | <Yjuq> In reply to @queersorceress "questions are cool, i'm": But reading this stuff and understanding are 2 different things. I don't think the documentation is "pretty good" from my perspective. It just rises more questions most of the time. I don't have any practice in languages with this kind of structures. |
21:59:17 | FromDiscord | <Rika> In reply to @Clyybber "typed as a return": thats not what i meant |
21:59:18 | FromDiscord | <ElegantBeef> Are you reading the manual, tutorials, or the docs? |
21:59:32 | FromDiscord | <Rika> i thought omission meant [un]typed for both |
21:59:58 | FromDiscord | <Yjuq> In reply to @ElegantBeef "Are you reading the": Language Manual |
22:00:30 | FromDiscord | <Yjuq> This is what is linked under "Documentation" on nim-lang.org |
22:00:34 | FromDiscord | <queersorceress> In reply to @Yjuq "But reading this stuff": that's fair! then i will continue to answer as best as i can. |
22:00:50 | FromDiscord | <ElegantBeef> Well the entire point of this real time chat is realtime responses π |
22:01:00 | FromDiscord | <ElegantBeef> rtfm where you can and ask where you cannot π |
22:01:03 | * | jxy_ quit (Quit: leaving) |
22:01:19 | FromDiscord | <Clyybber> In reply to @Rika "i thought omission meant": I see, I mean it would probably make just as much/no sense if untyped as a return type would mean statement, and typed would mean expression |
22:01:21 | * | jxy joined #nim |
22:01:31 | FromDiscord | <Yjuq> I just downloaded nim yesterday and read the manual now the third time >.> |
22:01:38 | FromDiscord | <Yjuq> and try to understand concepts better |
22:01:41 | FromDiscord | <ElegantBeef> Have you read the tutorials? |
22:01:44 | FromDiscord | <Yjuq> stucking at templates and macros atm |
22:01:53 | FromDiscord | <ElegantBeef> The tutorials are the more approachable explanations |
22:01:55 | FromDiscord | <Clyybber> I think learning by doing might be the best way |
22:02:00 | FromDiscord | <Yjuq> In reply to @ElegantBeef "Have you read the": I'm cross reading these if I need some more information |
22:02:08 | FromDiscord | <Clyybber> since you won't need all of the language just to write some code |
22:02:19 | FromDiscord | <ElegantBeef> Learning by doing is the best way for anything imo |
22:02:20 | FromDiscord | <Clyybber> and if you get stuck, then consult the manual/IRC |
22:02:57 | FromDiscord | <Yjuq> In reply to @Clyybber "since you won't need": I'm evaluating if nim is the right tool for my project. This is not something I can "just start" and "do it". I'm seriously considering if I can use it for my production |
22:03:00 | FromDiscord | <ElegantBeef> Also clyybber i didnt have to rebase, i just made an issue with the bsd CI clear π |
22:03:09 | FromDiscord | <Clyybber> In reply to @ElegantBeef "Learning by doing is": I agree, but I suppose it depends on the person |
22:03:13 | FromDiscord | <Clyybber> In reply to @ElegantBeef "Also clyybber i didnt": lol |
22:03:14 | FromDiscord | <Clyybber> I saw |
22:04:33 | FromDiscord | <ElegantBeef> In reply to @Yjuq "I'm evaluating if nim": It's clearly the right tool for the job, regardless of the job. Shaving, counting, cleaning π |
22:05:11 | FromDiscord | <Yjuq> The preference is currently still sitting on Rust rofl |
22:05:36 | FromDiscord | <ElegantBeef> You said the R-word you now are going to get banned in eta 5 seconds |
22:05:42 | FromDiscord | <queersorceress> heh, i don't think you will need to ever use macros or templates in writing nim. they are definitely a language feature, something that can enhance your ability to write code but not a hard and fast requirement in terms of being able to use the language for anything. |
22:06:09 | FromDiscord | <ElegantBeef> They're how we do introspection and are fantastic for making a more ergonomic project |
22:06:31 | FromDiscord | <ElegantBeef> So you dont need them but they're so fricken lovely! |
22:07:01 | FromDiscord | <queersorceress> it sounds like you understand what they are used for, but are struggling with the syntax or mechanics of the API to implement them for yourself, is that accurate? |
22:07:06 | * | natrys joined #nim |
22:07:10 | FromDiscord | <Rika> In reply to @Yjuq "The preference is currently": if you're much more comfy with rust id just go with that really |
22:07:22 | FromDiscord | <ElegantBeef> Bad rika, bad |
22:07:33 | FromDiscord | <Rika> be real |
22:07:36 | FromDiscord | <ElegantBeef> We need the rust cult-like behaviour! |
22:07:55 | FromDiscord | <Rika> if you dont know rust tho, i think nim would be better |
22:07:57 | FromDiscord | <ElegantBeef> I am real, almost always really joking |
22:08:00 | FromDiscord | <Yjuq> In reply to @queersorceress "it sounds like you": Exactly |
22:08:02 | FromDiscord | <Rika> since you seem to already be struggling with nim |
22:08:07 | FromDiscord | <Rika> you're gonna fucking die with rust |
22:08:26 | * | asdflkj_1 quit (Ping timeout: 240 seconds) |
22:08:46 | FromDiscord | <Rika> well, that's from my experience |
22:08:50 | FromDiscord | <Rika> ymmv |
22:08:57 | FromDiscord | <ElegantBeef> I gloss over some of the details but https://dev.to/beef331/demystification-of-macros-in-nim-13n8 might be a nice read for macros atleast |
22:09:22 | * | actuallybatman quit (Quit: leaving) |
22:09:41 | FromDiscord | <queersorceress> honestly, it may take you quite some time to fully get it then. it took me a while to see how to properly use them for myself. it requires a more holistic understanding of the language that you won't get after day 3 of using nim. |
22:10:09 | FromDiscord | <queersorceress> which is why i said they aren't a requirement in writing nim code, or even good nim code. |
22:10:24 | FromDiscord | <Yjuq> In reply to @queersorceress "honestly, it may take": That's fine - I just said I try to evaluate the language. I need some highly optimized stuff and probably end up with a lot of asm as well. |
22:10:42 | FromDiscord | <Yjuq> Just try to get a grasp if nim could make things easier |
22:10:52 | FromDiscord | <Yjuq> instead of rust or other alternatives |
22:11:16 | FromDiscord | <Rika> if youre not hellbent for safety yes very |
22:11:25 | FromDiscord | <ElegantBeef> I mean Nim is a safe language π |
22:11:32 | FromDiscord | <Yjuq> I might look like a fool and a newbie but i have 10+ years programming experience. A lot of them in assembler |
22:11:37 | FromDiscord | <Rika> "not as safe as rust" |
22:11:41 | FromDiscord | <ElegantBeef> `not nil` |
22:11:48 | FromDiscord | <queersorceress> i don't know of many languages that allow you to rewrite your syntax trees and optimize functionality in the ways you can with nim. it can make some applications much better than implementations in other languages, but it has a bit of a learning curve. |
22:12:02 | FromDiscord | <Rika> @queersorceress ~~Lisp~~ |
22:12:36 | FromDiscord | <Rika> @Yjuq you may not be new to programming, but that makes you sound new to high level programming |
22:12:37 | FromDiscord | <ElegantBeef> Rust has procedural macros but they make compile time even longer |
22:12:53 | FromDiscord | <Rika> what the heck does the procedural there mean |
22:12:58 | FromDiscord | <queersorceress> it's something you can grow into using it, but don't feel like it is necessary for language comprehension and application like concurrency/async/file io might be. |
22:13:00 | FromDiscord | <ElegantBeef> They work/emit the AST |
22:13:37 | FromDiscord | <Yjuq> In reply to @Rika "<@!221238127937847296> you may not": Not completly. I have some Java / Go and diverse scripting languages background. But I never touched C++ - Just C |
22:13:43 | FromDiscord | <ElegantBeef> https://doc.rust-lang.org/reference/procedural-macros.html |
22:13:50 | FromDiscord | <Yjuq> But yea, nim is another kind of beast |
22:13:59 | FromDiscord | <queersorceress> if you are gonna write a lot of asm, then nim might be the better option given the interop with C and the existance of asm directive. |
22:14:06 | FromDiscord | <queersorceress> than something like rust |
22:14:16 | FromDiscord | <ElegantBeef> Plus we're managed but without enforcing ownership |
22:14:35 | FromDiscord | <ElegantBeef> You use views if you really need them |
22:15:41 | FromDiscord | <ElegantBeef> So you get a very performant language without reasoning about lifetimes unless you need to, and get low memory usage/no stop the world GC |
22:15:49 | FromDiscord | <konsumlamm> In reply to @ElegantBeef "`not nil`": https://github.com/nim-lang/Nim/issues/14730 :P |
22:16:03 | FromDiscord | <Rika> In reply to @ElegantBeef "https://doc.rust-lang.org/reference/procedural-macr": you'd be insane if you thought id click that |
22:16:04 | FromDiscord | <queersorceress> In reply to @Rika "<@!352997242531086338> ~~Lisp~~": pointed look |
22:16:17 | FromDiscord | <ElegantBeef> That's not the new `strictNotNil` |
22:16:32 | * | vicfred joined #nim |
22:16:45 | FromDiscord | <ElegantBeef> http://nim-lang.github.io/Nim/manual_experimental.html#strict-not-nil-checking |
22:17:56 | FromDiscord | <konsumlamm> In reply to @ElegantBeef "You use views if": views aren't really stable at all though, are they? |
22:18:03 | FromDiscord | <ElegantBeef> `lent` is |
22:18:07 | FromDiscord | <konsumlamm> In reply to @ElegantBeef "That's not the new": my example doesn't work with that either though |
22:18:45 | FromDiscord | <ElegantBeef> With arc i used the views with no problem on devel |
22:18:59 | FromDiscord | <queersorceress> to re-pose a question i had earlier: does anyone have recommendations or suggestions for template engines that support logic operations in nim? i'd need to access it as a library. based on nimble.directory there are a couple of implementations but not any that seem to work and support logic operations. |
22:19:02 | FromDiscord | <ElegantBeef> Have this whole proof of concept https://github.com/beef331/strviewutils |
22:19:17 | FromDiscord | <konsumlamm> idk, all i heard about views is that they're buggy as hell |
22:19:37 | FromDiscord | <ElegantBeef> I found they were only buggy with refc, resulting in bad code gen |
22:20:04 | FromDiscord | <konsumlamm> Β―\_(γ)_/Β― |
22:20:06 | FromDiscord | <ElegantBeef> I know 4raq, did say there was a flaw in the design |
22:20:32 | FromDiscord | <ElegantBeef> Think it was mostly that the mutability wasnt in the type but just stabled on |
22:21:01 | FromDiscord | <ElegantBeef> But mratsim has a viewtype implemented in stable that uses `lent` to ensure it doesnt outlive the value |
22:22:18 | FromDiscord | <ElegantBeef> @mratsim what happened to your stridedviews?! |
22:22:26 | FromDiscord | <ElegantBeef> Ah nvm |
22:22:27 | FromDiscord | <ElegantBeef> I'm blind |
22:22:44 | FromDiscord | <ElegantBeef> https://github.com/mratsim/constantine/blob/54887b1777d4187d51a00c35b81e076578529d12/research/kzg_poly_commit/strided_views.nim#L23 His view type |
22:23:33 | FromDiscord | <Yjuq> Hmn - nims config files aren't well documented or? |
22:23:45 | FromDiscord | <Yjuq> `nim.cfg` |
22:23:47 | FromDiscord | <ElegantBeef> You have 3 different ways to config π |
22:24:05 | FromDiscord | <ElegantBeef> if it's per project it's `main.nim.cfg` |
22:24:11 | FromDiscord | <ElegantBeef> or `main.nims` |
22:24:35 | FromDiscord | <ElegantBeef> https://nim-lang.org/docs/nimc.html#compiler-usage-configuration-files |
22:24:54 | FromDiscord | <Yjuq> Yea, I read that already |
22:25:48 | FromDiscord | <Yjuq> But nothing tells you how a config file has to be formatted. The only thing that i can use as "docu" are the config files for nim itself |
22:25:59 | FromDiscord | <ElegantBeef> It uses the cli parameters |
22:26:13 | FromDiscord | <ElegantBeef> so `--gc:arc` is a valid line |
22:26:16 | FromDiscord | <Yjuq> but you have constructs like @if ... @end as well |
22:26:55 | FromDiscord | <Yjuq> This is all a mess to get a overview sigh |
22:27:32 | FromDiscord | <ElegantBeef> You can also use a nimscript file or a nimble file |
22:27:46 | FromDiscord | <Rika> its poorly documented, config files |
22:28:24 | FromDiscord | <Yjuq> I think I just ignore the config files for nim completly and use my own tool - it uses lua for building projects |
22:28:44 | FromDiscord | <Yjuq> at least i know what i can do and what not :P |
22:29:13 | FromDiscord | <Yjuq> (edit) "i" => "it" |
22:29:19 | FromDiscord | <ElegantBeef> In reply to @Rika "its poorly documented, config": Yea but isnt the general consensus to use nimscript instead? |
22:29:28 | FromDiscord | <queersorceress> you can also just call it `nim.cfg` the `foo.nim.cfg` is for allowing multiple config files files to binaries in the same directory. there is another format `.nims` which allows scripting and logical operations in what gets passed to the compiler |
22:29:53 | FromDiscord | <Rika> beef no i dont think so |
22:30:10 | FromDiscord | <Rika> i personally dont use them, and i feel like theres a good chunk of nim users who dont |
22:30:23 | FromDiscord | <queersorceress> `.cfg` for declarative format, `.nims` for when you need evaluation what needs to be sent to the compiler. |
22:30:33 | FromDiscord | <Yjuq> In reply to @queersorceress "you can also just": I kind of have my own tool already that acts like nimscript but with lua instead. I wrote it 3 years ago out of frustration of make files and all language specific config stuff. It's universell |
22:30:50 | FromDiscord | <Rika> hey if it works it works |
22:30:52 | FromDiscord | <ElegantBeef> You can use nimscript for declarative aswell |
22:30:54 | FromDiscord | <Solitude> In reply to @ElegantBeef "Yea but isnt the": if i need any logic i use nims, otherwise cfg |
22:30:58 | FromDiscord | <queersorceress> so the config files aren't build scripts |
22:31:14 | FromDiscord | <ElegantBeef> Yea idk i just try to shoehorn it into nimble |
22:31:15 | FromDiscord | <ElegantBeef> (edit) removed "" |
22:31:21 | FromDiscord | <Yjuq> they are. you have lua scripts instead |
22:31:30 | FromDiscord | <Yjuq> and invoke stuff per CLI |
22:31:40 | FromDiscord | <queersorceress> it's to specify build settings or compiler flags, it's not meant to be used as a build script or system. |
22:31:52 | * | xrinzler joined #nim |
22:32:11 | FromDiscord | <Yjuq> Ah, you was refering to the nim config files |
22:32:17 | FromDiscord | <Yjuq> my bad |
22:32:23 | FromDiscord | <queersorceress> yes, they aren't like makefile or something |
22:34:21 | FromDiscord | <queersorceress> so if you want to use your own tool or script for invoking the compiler then feel free. i guess you could theoretically use nimscript to do it, as that is what nimble does for building packages, but it definitely isn't developed to handle that as a primary goal. |
22:35:31 | FromDiscord | <Yjuq> I was just pointing out that the documentation for the config files is bad. :P |
22:35:55 | FromDiscord | <ElegantBeef> quick someone make a PR |
22:36:06 | FromDiscord | <queersorceress> i believe it exists in the compiler docs, and they only exist to specify compiler flags in them |
22:36:12 | * | natrys quit (Ping timeout: 246 seconds) |
22:36:56 | FromDiscord | <ElegantBeef> Well at the most you can do custom logic for things like `--os`, `--arch` or `--cc` |
22:36:59 | FromDiscord | <queersorceress> their contents get appended to the compiler invocation, that's it. |
22:37:43 | FromDiscord | <ElegantBeef> By custom logic i just mean specific compile flags |
22:37:53 | FromDiscord | <queersorceress> with the `.nims` version you can do conditional logic, i even have a set that allows me to build and run nim code using llvm sanitizers for debug purposes. |
22:38:27 | FromDiscord | <ElegantBeef> With then nimble version you can define tasks so then you get a make like build system |
22:38:48 | FromDiscord | <ElegantBeef> Though you can do the same with nimscript but you'd have to extract the params i'd assume |
22:39:09 | FromDiscord | <Yjuq> I tried nimble out. But I didn't figured how I change from the mingw64 to the mingw32 compiler in it |
22:39:12 | FromDiscord | <ElegantBeef> solitude if you want to take doms sentence further change your name to `nice` |
22:39:22 | FromDiscord | <Yjuq> probably over --cc somehow |
22:39:35 | FromDiscord | <Solitude> In reply to @ElegantBeef "solitude if you want": no, i want to be a reminder |
22:39:37 | FromDiscord | <queersorceress> yeah, that's using nimscript, which has docs spread over 2 or 3 different pages, which acts as a rudimentary build system. if you want something more advanced i'd probably recommend using Make. |
22:39:40 | FromDiscord | <ElegantBeef> the main nim config should handle it so you should just specify the arch |
22:40:30 | FromDiscord | <Yjuq> In reply to @queersorceress "yeah, that's using nimscript,": No,... make is not gonna happend. I tried to get a hang on it one time and it confused me. That's why I build my tool - to have something like make but with lua scripts instead |
22:40:34 | FromDiscord | <ElegantBeef> Can also checkout nake |
22:40:42 | FromDiscord | <queersorceress> yeah i would hope that it should reselect the compiler based on arch, but i don't build stuff on windows using mingw, so i don't know -- i'd just use llvm. |
22:40:43 | FromDiscord | <ElegantBeef> though that's if you want a nim based build system |
22:42:25 | FromDiscord | <queersorceress> build system tools are a dime a dozen, choosing the right one for the job is difficult, but i wouldn't just go with one built in the same language on the grounds of knowledge transfer and not learning new systems unless you really want to have a bad time, ahem. |
22:43:50 | FromDiscord | <ElegantBeef> Idk to me build systems only need to run a compiler with specific arguments so i'm happy with pretty much any of them |
22:44:41 | FromDiscord | <queersorceress> i'm a build and release engineer, it's my job to try to save developers from themselves in picking build systems π |
22:45:59 | FromDiscord | <Yjuq> In reply to @queersorceress "i'm a build and": This always scared the hell out of me. I just try to avoid it as much as I can. I was using simple batch / cmd scripts before but it kinda got replaced with lua for me |
22:48:36 | FromDiscord | <Yjuq> I mean, compiling sourcecode with make on github. No problem, they deliver mostly some simple mechanism to do this. But hell, if i need to modify something. ARG |
22:52:36 | * | a_chou quit (Quit: a_chou) |
23:03:16 | FromDiscord | <queersorceress> @Yjuq did we answer all your questions for now? |
23:33:23 | FromDiscord | <Yjuq> just doing a creative break - i need to do some daily farming in a video game rofl |
23:35:36 | * | zedeus quit (Ping timeout: 256 seconds) |
23:42:23 | * | Tanger joined #nim |
23:51:26 | * | tane quit (Quit: Leaving) |
23:56:52 | FromDiscord | <PizzaFox> what file extension is best for the config format specified in `parsecfg` |