00:11:21 | * | arkurious quit (Quit: Leaving) |
00:34:50 | FromDiscord | <auxym> any ideas to check if an `int` is a valid value for a given enum type? |
00:35:11 | * | Pyautogui joined #nim |
00:35:43 | FromDiscord | <Elegantbeef> is it a holey enum? |
00:36:09 | FromDiscord | <impbox [ftsf]> test for RangeDefect |
00:36:10 | FromDiscord | <Elegantbeef> If it's contigious you can do `if i in YourEnum.low.ord .. YouEnum.high.ord` |
00:36:22 | FromDiscord | <Elegantbeef> Impbox you can leave right this instant |
00:36:34 | FromDiscord | <Elegantbeef> You do not catch `defects` π |
00:36:43 | FromDiscord | <impbox [ftsf]> you except them =) |
00:36:49 | FromDiscord | <Elegantbeef> No you do not |
00:36:54 | FromDiscord | <impbox [ftsf]> you can! |
00:36:57 | FromDiscord | <impbox [ftsf]> i just tried it |
00:37:05 | FromDiscord | <Elegantbeef> now try with `-d:danger` |
00:37:10 | FromDiscord | <impbox [ftsf]> sounds dangerous =p |
00:37:23 | FromDiscord | <impbox [ftsf]> but fair |
00:37:47 | FromDiscord | <Elegantbeef> I'm going to spam this forever now someone shouldnt let me write forum posts https://forum.nim-lang.org/t/8342#53776 |
00:38:14 | FromDiscord | <impbox [ftsf]> aye, though the compiler should probably throw an error/warning if you try |
00:38:42 | FromDiscord | <Elegantbeef> defects just shouldnt be catchable imo |
00:38:48 | FromDiscord | <impbox [ftsf]> I agree |
00:39:10 | FromDiscord | <impbox [ftsf]> or at least throw a warning |
00:39:24 | FromDiscord | <auxym> yeah, wanted to avoid having to catch anything, thanks @ElegantBeef. I'll be avoiding holes due to https://github.com/nim-lang/Nim/issues/13980 |
00:39:27 | FromDiscord | <impbox [ftsf]> but I do think out of Range should be catchable |
00:40:10 | FromDiscord | <Elegantbeef> Eh using exception handling for something rather simple seems odd, but what do i know |
00:40:31 | FromDiscord | <impbox [ftsf]> shrugs |
00:40:50 | FromDiscord | <impbox [ftsf]> but yeah, `if val in EnumType:` might be nicer |
00:40:56 | FromDiscord | <Elegantbeef> the what do i know wasnt meant to be condescending, just an actuality |
00:41:38 | FromDiscord | <auxym> @impbox [ftsf] yeah. probably implementable as a template? My template-fu isn't extremely strong |
00:41:42 | FromDiscord | <Elegantbeef> Consider a PR to http://nim-lang.github.io/Nim/enumutils.html |
00:42:00 | FromDiscord | <Elegantbeef> It's implementable as a procedure, generic that takes a `typedesc[enum]` |
00:42:23 | FromDiscord | <Elegantbeef> Assuming it's not holey |
00:42:40 | FromDiscord | <Elegantbeef> https://forum.nim-lang.org/t/8188 for a bunch of solutions |
00:43:10 | FromDiscord | <auxym> cheers. good reading. |
00:45:41 | FromDiscord | <impbox [ftsf]> actually, excepting defects may make sense when running nimscript for example |
00:45:52 | FromDiscord | <impbox [ftsf]> and reporting errors |
00:46:01 | FromDiscord | <Elegantbeef> Perhaps |
00:46:10 | FromDiscord | <impbox [ftsf]> you can't fix the problem, but you can report about it |
00:47:39 | FromDiscord | <Elegantbeef> Catching defects in nim code though is just asking for trouble since you can easily stop that from happening which will cause hidden bugs |
00:47:43 | * | Gustavo6046 is now known as Gustava6046 |
00:55:17 | * | Gustava6046 is now known as Gustavo6046 |
00:58:13 | * | byanka joined #nim |
01:04:29 | cornfeedhobo | anyone have opinions one which vscode extension to use? |
01:04:41 | FromDiscord | <Elegantbeef> nimsaem's |
01:04:52 | cornfeedhobo | thanks |
01:04:59 | FromDiscord | <impbox [ftsf]> VSCodeVim |
01:05:18 | cornfeedhobo | lol. i meant nim specific :p |
01:05:20 | FromDiscord | <Elegantbeef> You mean onivim? π |
01:05:29 | cornfeedhobo | look what you started |
01:05:33 | FromDiscord | <impbox [ftsf]> sorry |
01:05:44 | cornfeedhobo | hehe |
01:05:56 | FromDiscord | <Elegantbeef> Impbox might actually like onivim2 though π |
01:13:44 | * | flynn quit (Read error: Connection reset by peer) |
01:14:50 | * | flynn joined #nim |
01:15:32 | * | neurocyte2 joined #nim |
01:15:32 | * | neurocyte2 quit (Changing host) |
01:15:32 | * | neurocyte2 joined #nim |
01:17:23 | FromDiscord | <impbox [ftsf]> can a macro determine the type of a thing? |
01:17:31 | * | neurocyte quit (Ping timeout: 252 seconds) |
01:17:31 | * | neurocyte2 is now known as neurocyte |
01:17:38 | FromDiscord | <Elegantbeef> If the macro arg is `typed` |
01:17:50 | FromDiscord | <Elegantbeef> it cannot get a type inside the macro though |
01:17:56 | FromDiscord | <impbox [ftsf]> sent a code paste, see https://paste.rs/PFV |
01:18:41 | FromDiscord | <Elegantbeef> you could do `root[^2] = newCall(ident"typeof", root[^])` |
01:21:19 | FromDiscord | <impbox [ftsf]> woo! magic! |
01:21:21 | FromDiscord | <impbox [ftsf]> thanks |
01:21:32 | FromDiscord | <Elegantbeef> No problem |
01:21:51 | FromDiscord | <Elegantbeef> Whatcha working on? |
01:21:59 | FromDiscord | <impbox [ftsf]> >_> |
01:22:37 | FromDiscord | <Elegantbeef> I mean i can only think of one use case for the above, and that's with modifying type defs \:P |
01:23:08 | FromDiscord | <impbox [ftsf]> https://github.com/Glasses-Neo/OOlib saw this and thought it's cool, but it _couldn't_ infer types from defaults... |
01:23:39 | FromDiscord | <Elegantbeef> Hey i was right! π |
01:23:51 | FromDiscord | <Elegantbeef> https://github.com/beef331/constructor#defaults thought it was something like this |
01:24:09 | FromDiscord | <impbox [ftsf]> indeed |
01:26:22 | FromDiscord | <impbox [ftsf]> for people like me who sometimes like basic oopy stuff |
01:26:40 | FromDiscord | <impbox [ftsf]> i do miss class data |
01:27:52 | cornfeedhobo | what defines a package name? where is the line between repo name and package name? |
01:28:00 | FromDiscord | <Elegantbeef> If you're doing anything with inheritance may want to use https://nimdocs.com/beef331/oopsie/oopsie.html |
01:28:15 | FromDiscord | <Elegantbeef> Repo name should be the package name to make everyone happier |
01:29:06 | cornfeedhobo | suuuuure, but consider when you implement the same thing in multiple languages. it's common to prefix $lang-$library |
01:29:34 | cornfeedhobo | but within the language, you just want to use $library |
01:33:44 | cornfeedhobo | oh, is package name the name of the .nimble file? |
01:33:56 | FromDiscord | <Elegantbeef> I believe so |
01:34:18 | FromDiscord | <Elegantbeef> It only really matters for the nimble directory since if you use git urls it's the repo |
01:34:40 | * | Pyautogui quit (Ping timeout: 240 seconds) |
01:37:11 | * | Freneticks quit (Ping timeout: 250 seconds) |
01:39:00 | FromDiscord | <Cark> sent a code paste, see https://play.nim-lang.org/#ix=3xNq |
01:39:19 | FromDiscord | <Elegantbeef> `for x in myseq.mitems: dostuff(x)` |
01:39:33 | FromDiscord | <Cark> oh i need to try this, thanks |
01:39:51 | FromDiscord | <Elegantbeef> `mitems` is the `mutable` items iterator that is conventionally named as such |
01:40:12 | FromDiscord | <Elegantbeef> Each element is yielded as a mutable reference to `x` |
01:41:00 | FromDiscord | <Cark> indeed that works, thanks ! |
01:46:55 | * | Freneticks joined #nim |
01:48:54 | * | flynn quit (Ping timeout: 256 seconds) |
01:55:57 | * | stkrdknmibalz quit (Remote host closed the connection) |
01:57:14 | * | flynn joined #nim |
01:59:09 | * | stkrdknmibalz joined #nim |
02:41:10 | * | auxym_ quit (Ping timeout: 240 seconds) |
03:00:34 | * | Pyautogui joined #nim |
03:01:56 | * | neurocyte quit (Quit: Ping timeout (120 seconds)) |
03:02:08 | * | neurocyte joined #nim |
03:02:08 | * | neurocyte quit (Changing host) |
03:02:08 | * | neurocyte joined #nim |
03:03:59 | * | Pyautogui quit (Client Quit) |
03:05:19 | * | flynn quit (Read error: Connection reset by peer) |
03:06:33 | * | flynn joined #nim |
03:16:56 | madprops | how should I do this with karax ... |
03:16:56 | madprops | tdiv(id = "options-switch", onclick = () => (kdom.getElementById("options-switch").style.display = "block")) |
03:17:58 | madprops | oh wait nvm |
03:18:42 | madprops | I was getting the wrong element |
03:19:36 | * | rockcavera quit (Remote host closed the connection) |
04:06:02 | * | supakeen quit (Quit: WeeChat 3.2) |
04:06:31 | * | supakeen joined #nim |
04:15:43 | madprops | hey, something weird happened |
04:16:17 | madprops | some choosenim process got cpu heavy https://i.imgur.com/zNKySQV.jpg |
04:16:24 | madprops | i don't know why it was running |
04:17:13 | madprops | i was compiling some karax code into js |
04:17:20 | madprops | maybe it got stuck on some failed compilation or something |
04:27:18 | FromDiscord | <Rika> nimsuggest can bug out like that |
04:27:25 | * | flynn quit (Read error: Connection reset by peer) |
04:28:31 | * | flynn joined #nim |
04:55:52 | FromDiscord | <garett> sent a code paste, see https://play.nim-lang.org/#ix=3xNF |
04:56:37 | FromDiscord | <garett> I've definitely seen `nimsuggest` bug out and go nuts on CPU |
04:56:42 | FromDiscord | <xflywind> `include a` |
04:57:01 | FromDiscord | <garett> @xflywind thank you |
04:57:38 | FromDiscord | <xflywind> np |
04:58:43 | FromDiscord | <garett> moved all the `{.pragma:...}` to `pragmas.nim` |
04:58:50 | FromDiscord | <garett> worked like a charm |
04:59:10 | FromDiscord | <garett> seems like an inconsistency |
04:59:37 | FromDiscord | <xflywind> that's what stdlib does |
04:59:44 | FromDiscord | <xflywind> like `include "system/inclrtl"` |
05:00:28 | FromDiscord | <xflywind> > # Pragmas for RTL generation. Has to be an include, because user-definedβ΅> # pragmas cannot be exported. |
05:03:24 | FromDiscord | <impbox [ftsf]> is there any way in a macro to determine if a method should use {.base.}, ie, check if the method is defined in its parent and add {.base.} if not? |
05:08:01 | FromDiscord | <ΟΟ (pi man)> so I managed to get debugging working through VSC, but the variable names are all T<number>_, any way to get the actual variable names? |
05:09:07 | FromDiscord | <ΟΟ (pi man)> https://media.discordapp.net/attachments/371759389889003532/883217018835333160/unknown.png |
05:09:37 | FromDiscord | <ΟΟ (pi man)> `nimble --lineDir:on --debuginfo --debugger:native -d:useRealtimeGC -d:nimTypeNames build`β΅this is my build command |
05:09:58 | FromDiscord | <Elegantbeef> put those commands after build |
05:10:02 | FromDiscord | <Elegantbeef> i believe atleast |
05:10:34 | FromDiscord | <ΟΟ (pi man)> it works either way |
05:10:39 | FromDiscord | <xflywind> use `nim-gdb.py` to get better messages |
05:12:26 | FromDiscord | <Elegantbeef> Yea follow https://github.com/saem/vscode-nim#debugging if you havent |
05:12:55 | FromDiscord | <Elegantbeef> @impbox [ftsf]\: so yes macros can figure out if it should be base, but no i dont think they can figure out soon enough to remove the warning π |
05:14:21 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3xNJ annoyingly |
05:16:44 | FromDiscord | <impbox [ftsf]> dang |
05:16:55 | FromDiscord | <impbox [ftsf]> _needs to get better at this macro stuff_ |
05:17:14 | FromDiscord | <Elegantbeef> Hmm wonder if we can push a `when compiles` |
05:17:40 | FromDiscord | <ΟΟ (pi man)> In reply to @Elegantbeef "Yea follow https://github.com/saem/vscode-nim#debug": oh, this on is lldb not gdb |
05:17:43 | FromDiscord | <Elegantbeef> Mix a when compiles with a warning as error to get this behaviour |
05:24:37 | FromDiscord | <Elegantbeef> @impbox [ftsf]\: so yea this works but not that is smart or clean π https://play.nim-lang.org/#ix=3xNM |
05:24:58 | FromDiscord | <ΟΟ (pi man)> sent a code paste, see https://play.nim-lang.org/#ix=3xNN |
05:25:06 | FromDiscord | <impbox [ftsf]> @ElegantBeef evil! I like it |
05:25:50 | FromDiscord | <Elegantbeef> Eh i want to make this a bit smarter |
05:25:56 | FromDiscord | <Elegantbeef> Atleast to reduce the amount of time spent on semming |
05:27:00 | FromDiscord | <impbox [ftsf]> i'm trying to add class constants to oolib, i figure they need to be methods for dynamic dispatch |
05:28:08 | FromDiscord | <Elegantbeef> Well this is a bit more sane since it's just the header now instead of the entire body https://play.nim-lang.org/#ix=3xNP |
05:28:47 | FromDiscord | <impbox [ftsf]> pretty cool! |
05:28:50 | FromDiscord | <Elegantbeef> Wait are you executing `nim-gdb.py` yourself? |
05:29:37 | FromDiscord | <ΟΟ (pi man)> am I not supposed to? |
05:29:45 | FromDiscord | <Elegantbeef> Nope |
05:30:40 | FromDiscord | <Elegantbeef> Did you read the setup guide i linked? |
05:31:42 | FromDiscord | <Elegantbeef> I atleast dont think you're supposed to run the python file yourself |
05:32:59 | FromDiscord | <Elegantbeef> dont know what a class constant is so no clue what you mean πβ΅(@impbox [ftsf]) |
05:33:30 | FromDiscord | <impbox [ftsf]> i guess a constant that is specific to that class, rather than linked to an instance of that class |
05:33:58 | FromDiscord | <ΟΟ (pi man)> In reply to @Elegantbeef "Yea follow https://github.com/saem/vscode-nim#debug": reading this again, looks like I need a second nim extension? |
05:34:14 | FromDiscord | <impbox [ftsf]> (edit) "class," => "class (and its children unless overriden)," |
05:34:24 | FromDiscord | <Elegantbeef> I just use that extension so idk π |
05:34:25 | FromDiscord | <ΟΟ (pi man)> also I can't find it through VSC |
05:35:24 | FromDiscord | <Elegantbeef> Well isnt a method going to give you a constant linked to the class? |
05:35:38 | FromDiscord | <impbox [ftsf]> that's the idea of using a method |
05:36:05 | FromDiscord | <Elegantbeef> I mean linked to an instance |
05:36:24 | FromDiscord | <impbox [ftsf]> hmm i see what you mean |
05:36:36 | FromDiscord | <impbox [ftsf]> yes, it is just a method |
05:36:37 | FromDiscord | <Elegantbeef> Like you cannot do `Banana.size` it's `Banana().size` |
05:36:52 | FromDiscord | <impbox [ftsf]> i just want to generate those methods |
05:37:52 | FromDiscord | <Elegantbeef> Ah ok so if there is no `myObject.size` you do `myObject.super.size` which does the same internally |
05:38:01 | FromDiscord | <Elegantbeef> So its a bunch of super calls all the way up π |
05:38:39 | FromDiscord | <impbox [ftsf]> https://play.nim-lang.org/#ix=3xNR |
05:38:44 | FromDiscord | <impbox [ftsf]> something like this is what i'm going for |
05:39:22 | FromDiscord | <impbox [ftsf]> which works, just whinges about {.base.} |
05:41:00 | FromDiscord | <Elegantbeef> Yea so guess you get to use my silly work around untill someone suggests something better |
05:41:26 | FromDiscord | <impbox [ftsf]> aye =) |
05:42:28 | NimEventer | New Nimble package! htmlAntiCopy - Block copy of any text in HTML, see https://github.com/thisago/htmlAntiCopy |
05:42:47 | FromDiscord | <impbox [ftsf]> that looks like a terrible package D: |
05:42:58 | FromDiscord | <impbox [ftsf]> i want to copy text |
05:43:59 | FromDiscord | <Elegantbeef> Yea it's quite odd |
05:46:39 | FromDiscord | <Rika> its really easy to bypass anyway i assu, |
05:46:41 | FromDiscord | <Rika> assume |
05:47:10 | FromDiscord | <Rika> ah its server side |
05:47:11 | FromDiscord | <Rika> lmao |
05:47:34 | FromDiscord | <Rika> whats the point tho if you can just like |
05:47:45 | FromDiscord | <Rika> screenshot the text and then maybe if you really want OCR |
05:48:35 | FromDiscord | <Elegantbeef> Clearly it's for preventing people from cheating on exams π |
05:49:07 | FromDiscord | <Rika> to prevent them from what, copying the text? what are they stupid to not know how to google or type? |
05:49:37 | FromDiscord | <Elegantbeef> Indeed! |
05:50:32 | FromDiscord | <Rika> damn |
06:02:10 | FromDiscord | <ΟΟ (pi man)> hmm, ok, switched to lldb and it's better but not great |
06:03:14 | FromDiscord | <Elegantbeef> I havent used a debugger much so i sadly cannot help |
06:05:18 | FromDiscord | <ΟΟ (pi man)> the local variables are still all T<umber>_β΅but now there are static and globals (looks like the same list though) that are the global variables with the correct names but with extra stuff added to the name |
06:06:19 | FromDiscord | <ΟΟ (pi man)> (edit) "T<umber>_β΅but" => "T<number>_β΅but" |
06:08:54 | FromDiscord | <Elegantbeef> Well due to how nim emits C code the symbols will not be 1\:1 |
06:09:14 | FromDiscord | <Elegantbeef> Cause remember you can have infinite global scoped `thisT` |
06:10:33 | FromDiscord | <Rika> and C does not have overloading |
06:11:31 | madprops | I'm glad nim uses github for distribution, one account less to manage |
06:12:09 | FromDiscord | <Elegantbeef> Microsoft screams "huzzah" from the rooftops |
06:28:15 | * | userj joined #nim |
06:28:44 | * | ad-absurdum joined #nim |
06:50:02 | * | PMunch joined #nim |
07:10:25 | * | max22- joined #nim |
07:13:35 | * | PersonMcGuy joined #nim |
07:14:35 | PersonMcGuy | Hello everyone. I checked and didn't see anything, but I wanted to be sure: is there any proc like zeroMem that will fill with some arbitrary int instead of 0? |
07:15:55 | FromDiscord | <Elegantbeef> For what? |
07:16:02 | FromDiscord | <Elegantbeef> An array, a seq...? |
07:18:00 | PersonMcGuy | I guess just a pointer? I'm going off zeroMem's documentation: copyMem(dest, source: pointer; size: Natural) |
07:18:18 | PersonMcGuy | Sorry, wrong one: zeroMem(p: pointer; size: Natural) |
07:20:06 | FromDiscord | <Elegantbeef> Appears there is not |
07:20:48 | PersonMcGuy | Alright, just wanted to be sure |
07:20:51 | PersonMcGuy | Thanks |
07:22:10 | FromDiscord | <impbox [ftsf]> PersonMcGuy it'd be tricky because it doesn't know the size of each element |
07:22:30 | FromDiscord | <impbox [ftsf]> if you want to do it you'd probably better do a loop and set it |
07:23:07 | PersonMcGuy | I was thinking about copying a definition under system/memory.nim for nimSetMem and working with that |
07:24:29 | PersonMcGuy | I just thought it was odd that there wasn't an exported proc for it like there is for nimZeroMem -> zeroMem, but I barely know what I'm doing so I don't know lol |
07:24:53 | FromDiscord | <Elegantbeef> Well here's what i'd do https://play.nim-lang.org/#ix=3xO2 |
07:25:11 | FromDiscord | <impbox [ftsf]> aye, that's what i was thinking but nicer |
07:25:13 | FromDiscord | <Elegantbeef> Is there a reason you're doing low level stuff? π |
07:25:36 | FromDiscord | <Elegantbeef> Oh you had a nicer impl? \:P |
07:25:45 | FromDiscord | <impbox [ftsf]> no yours is nicer |
07:26:28 | PersonMcGuy | @Elegantbeef I'm probably out of my depth, but I'm trying to convert a C header to nim for the solana sdk |
07:26:50 | PersonMcGuy | I tried searching to see if anyone else had done it or something similar, but I didn't find anything |
07:27:19 | FromDiscord | <Elegantbeef> Well the best way of learning to swim is to submerge your feet in concrete blocks and jump in a lake |
07:27:31 | PersonMcGuy | I like your implementation by the way. Is it okay if I use it? |
07:27:32 | FromDiscord | <Elegantbeef> Though now that i say that i think i've mistaken the best way to hide a body |
07:27:52 | PersonMcGuy | lol right? I just like to go straight at the code and see what happens |
07:28:06 | FromDiscord | <Elegantbeef> Absolutely not i shared it so we could admire my big brain π |
07:28:16 | FromDiscord | <Elegantbeef> Yes you can of course use it |
07:28:28 | FromDiscord | <Elegantbeef> Where is my disclaimer of "If i share code anyone can use it" |
07:28:59 | FromDiscord | <Elegantbeef> Do you have a link to the header file? |
07:29:14 | FromDiscord | <impbox [ftsf]> https://play.nim-lang.org/#ix=3xO5 i was thinking more something like this where the cast is inside |
07:29:27 | FromDiscord | <impbox [ftsf]> mostly because i hate having to think about casting |
07:30:28 | FromDiscord | <Elegantbeef> I avoid raw pointers as much as possible since i view `ptr T` different to a ptr array |
07:30:59 | FromDiscord | <Elegantbeef> `createU` and it's friend `create` are quite nice though |
07:31:13 | FromDiscord | <Elegantbeef> a typed pointer is noice |
07:33:00 | FromDiscord | <impbox [ftsf]> PersonMcGuy, what's is the c code you're trying to imitate doing? maybe there's a nicer way in nim |
07:33:31 | PersonMcGuy | I'm trying to find a link on their github but it's not the same as the one from the release itself |
07:33:35 | FromDiscord | <Elegantbeef> a `template createPtrArray(T: typedesc, count: int): ptr UncheckedArray[T] = cast[ptr UncheckedArray[T]](create(T, count))` would be a nice little addition in some stdlib |
07:34:11 | FromDiscord | <Elegantbeef> Though i figure it's not overly needed so probably not \:D |
07:36:59 | PersonMcGuy | While I'm looking, the code that I was trying to port: |
07:37:02 | PersonMcGuy | * Fill a byte string with a byte value |
07:37:02 | PersonMcGuy | */ |
07:37:03 | PersonMcGuy | static void *sol_memset(void *b, int c, size_t len) { |
07:37:03 | PersonMcGuy | uint8_t *a = (uint8_t *) b; |
07:37:04 | PersonMcGuy | while (len > 0) { |
07:37:04 | PersonMcGuy | *a = c; |
07:37:05 | PersonMcGuy | a++; |
07:37:05 | PersonMcGuy | len--; |
07:37:06 | PersonMcGuy | } |
07:37:06 | PersonMcGuy | } |
07:37:24 | PersonMcGuy | lol *) is * ) |
07:37:32 | FromDiscord | <Elegantbeef> Ok so that's identical to what we have |
07:37:38 | FromDiscord | <Elegantbeef> Plus you can use paste sites π |
07:39:23 | PersonMcGuy | Ahhhh duh, I should have thought about that. Sorry. |
07:39:24 | PersonMcGuy | https://pastebin.com/LQ06i7EB |
07:44:53 | FromDiscord | <Elegantbeef> You're replicating this API in nim eh? |
07:45:17 | FromDiscord | <Elegantbeef> Cause if that's the case you dont need to use `ptr uint8` you can just use a `seq[uint8` |
07:46:06 | PersonMcGuy | Trying to at least. I wanted to see if it would work because I would love to write stuff with the sdk with nim instead of C if possible. |
07:46:24 | PersonMcGuy | Though I'm worried about memory safety the more I think about it |
07:46:54 | FromDiscord | <Elegantbeef> Well that's why you use Nim's more safe tools where you can |
07:47:40 | FromDiscord | <impbox [ftsf]> if you're worried about memory safety, i wouldn't start by copying C =) |
07:48:05 | PersonMcGuy | Sorry, I think I meant more like GC stuff. I'm not really sure what's going to happen |
07:48:28 | FromDiscord | <Elegantbeef> In what way? |
07:49:26 | FromDiscord | <Elegantbeef> Reading this over `SolBytes` -\> `string` or \`seq[bytes] |
07:49:45 | FromDiscord | <Elegantbeef> A lot of the pointers can be `seq[uint8]` really |
07:49:47 | FromDiscord | <impbox [ftsf]> if you use `--gc:arc` you can work without a GC |
07:50:09 | FromDiscord | <Elegantbeef> And it's deterministic, you can expand the code to see the memory frees |
07:51:02 | FromDiscord | <Elegantbeef> One thing i dont get is how this API even works |
07:51:14 | PersonMcGuy | @impbox [ftsf] Yeah I was actually going to try that, but I was worried I might just be trying to stick a bandaid on the whole problem without fully understanding potential issues with GC stuff |
07:51:19 | FromDiscord | <impbox [ftsf]> blockchain magic? |
07:51:34 | PersonMcGuy | I'm not super experienced with low level programming in general |
07:52:30 | PersonMcGuy | lol pretty much, I barely understand what I'm looking at. I more so wanted to see if it was even possible before I just resigned to my fate with C. |
07:52:50 | FromDiscord | <impbox [ftsf]> well if you can do it in C, you can probably do it nicer in Nim =) |
07:53:40 | FromDiscord | <Elegantbeef> Well even if you are scared of the gc(you shouldnt be) you can reimplement the code 1\:1 |
07:53:52 | FromDiscord | <Elegantbeef> So then it's just all pointers and smoke and mirrors or something like that π |
07:54:48 | FromDiscord | <Elegantbeef> I dont imagine arc is cryptographically insecure, but i'm also not knowledgable in cryptography |
07:55:21 | PersonMcGuy | That's good to know. Here's hoping everything goes well. If so, I'll put this out on github so that someone can hopefully use this as a starting point |
07:56:36 | PersonMcGuy | Though I did have one more question. In the start of the header, they typedef'd a lot of things that have a nim equvialent, like "typedef signed char int8_t;" |
07:57:32 | PersonMcGuy | I'm assuming I would be okay to just use int8 for all those "int8_t"s right? I'm trying to copy things as closely as possible, but I figure there's not much point to having an intermediate type like that |
07:57:42 | FromDiscord | <Elegantbeef> Yea `int8` is 1 byte |
07:57:59 | FromDiscord | <Elegantbeef> If you notice they put asserts after, which is the important part |
07:58:12 | FromDiscord | <Elegantbeef> Since they're the same size they're golden |
07:58:39 | PersonMcGuy | Perfect! Thanks again to you both for all the help, I really appreciate it |
07:59:35 | FromDiscord | <Elegantbeef> This is going to be a rather cutdown clone if my brief glancing at it is any indication |
08:00:45 | PersonMcGuy | Yeah, there's a ton of stuff that I don't think I need with nim |
08:04:26 | FromDiscord | <Elegantbeef> Oh wait this depends on something, that's what i was missing |
08:04:48 | FromDiscord | <Elegantbeef> So the afforementioned string/seq[uint8] probably isnt true then |
08:12:57 | * | GreaseMonkey quit (Read error: Connection reset by peer) |
08:13:55 | * | greaser|q joined #nim |
08:29:22 | * | Vladar joined #nim |
08:35:53 | PMunch | Two new articles out: Multitasking in Nim: https://peterme.net/multitasking-in-nim.html and Asynchronous programming in Nim: https://peterme.net/asynchronous-programming-in-nim.html |
08:39:00 | FromDiscord | <haxscramper> What tool did you use to create timing diagrams? |
08:39:54 | PMunch | Vim |
08:39:59 | PMunch | I just typed them out :P |
08:43:19 | Zevv | no cps. missed chance pmunch! :) |
08:44:19 | PMunch | I said that there's room for more ;) |
08:44:48 | PMunch | Are there any good CPS libraries in Nim yet? Or is that still being worked on? |
08:44:56 | Zevv | no one is using that shit |
08:45:44 | Zevv | joking aside: leorize is in the progress of making a cps-oriented stdlib for IO and event queus and all that |
08:45:48 | Zevv | but it's not in a working state |
08:46:06 | Zevv | I have this little test project where I just push and poke at CPS to see where it can bring me and where it breaks: https://github.com/zevv/cpstest |
08:46:24 | Zevv | it has a basic async ipv4/ipv6 socket layer and HTTP/HTTPS server and client and some other stuff |
08:46:27 | Zevv | but it's the bare minimum |
08:47:49 | supakeen | clearly it should *all* be based on io_uring+bpf |
08:48:08 | Zevv | yeah until someone comes around complaining it doesn't run on windows, right |
08:48:14 | supakeen | :> |
08:48:27 | Zevv | lets be honest: overoptimization on these kind of things makes no sense for 99% of the cases |
08:48:43 | Zevv | how many apps did you ever deploy doing gigabytes of I/O on 100k clients |
08:49:16 | supakeen | you can make the same case for any asynchronous paradigm :) |
08:49:20 | Zevv | This thing is a complete epoll based async event queue mechanism for CPS. No dependencies execpt for posix. https://github.com/zevv/cpstest/blob/master/evq.nim |
08:49:33 | Zevv | I prefer simplicity and correctness over performance, at this time in the project |
08:49:34 | supakeen | yea, i've put it in my reading list for the weekend! |
08:51:04 | PMunch | I still struggle a bit to see how this differs from what I was doing with closure iterators.. But maybe I'm just being a dumbo, guess I should do some reading as well.. |
08:52:02 | Zevv | PMunch: I struggle as well. I tried to get there with iterators a few times and always got stuck somewhere. I'd *love* to see someone make something similar to this based on iterators. |
08:53:00 | Zevv | The nice thing of CPS is that it actually mostly works these days. Once you're in 'cps land' you type your code just synchronously. No 'async', 'away', 'future[]', etc. You just do `let s = s.recvLine()` and the stuff does what's needed to get you a line |
08:54:30 | supakeen | i'm still confused by the abbreviation |
08:55:17 | PMunch | Hmm, is it just me or is `callback=` from asyncstreams completely broken? |
08:55:20 | FromDiscord | <Elegantbeef> Continuation Passing Style if my memory is right π |
08:55:45 | Zevv | supakeen: https://raw.githubusercontent.com/disruptek/cps/master/docs/cps.svg |
08:56:00 | supakeen | yes, but generally CPS means passing callbacks explicitly |
08:56:11 | Zevv | we do that for you |
08:56:14 | FromDiscord | <Elegantbeef> I'm not allowed to talk about CPS directly after the incident |
08:56:18 | supakeen | exactly, this is implicit CPS |
08:56:23 | supakeen | which: cool |
08:57:20 | Zevv | the nice thing is: you still /can/ do that. You can just juggle with continuations and and use them as you see fit |
08:57:34 | Zevv | that's the added flexibility. It's a first class citizen, not something hidden in the compiler impl |
08:57:37 | PMunch | Hmm, I think I see how this differs quite a bit |
08:58:01 | supakeen | doesn't it make it hard to reason about where a race could happen |
08:58:15 | supakeen | if you don't explicitly show where it could happen (with await or a callback) |
08:58:26 | supakeen | actually i shouldn't ask all this before i actually read |
08:58:28 | supakeen | disregard |
08:58:33 | Zevv | will do |
09:00:45 | * | flynn quit (Read error: Connection reset by peer) |
09:01:21 | Zevv | note that this is concurrency, not paralellism |
09:01:31 | Zevv | when you go parallel, you need to sit on your hands before you type |
09:01:53 | * | flynn joined #nim |
09:02:20 | Zevv | ideally we'd like to get to some kind of share-nothing, golang channels like |
09:02:20 | supakeen | yes |
09:02:43 | supakeen | but even with concurrency you generally still share things such as database connections |
09:02:45 | Zevv | arc has the nice promise of allowing moves over threads, but in practice I didn't get this to work without tripping asan |
09:03:14 | supakeen | (sadly) |
09:03:16 | Zevv | supakeen: sure, but these can be abstracted away. |
09:03:30 | Zevv | You can send a query, stash the continuation and revive it when the response comes in |
09:03:41 | supakeen | yes but then you get into the bits i generally don't like which is that any concurrency runtime needs its own libraries |
09:03:59 | Zevv | you can't have your cake and eat it |
09:04:05 | supakeen | yea but it fragments :) |
09:04:12 | PMunch | Okay, so the callback of a FutureStream takes the stream itself, but I can't seem to create a valid signature for it. If I make the callback async it adds the Future[void] return type, but I need to be able to call read to get any data from it |
09:04:25 | PMunch | I guess waitfor would be safe in that context since I know it has data.. |
09:04:57 | * | userj quit (Remote host closed the connection) |
09:37:23 | FromDiscord | <dom96> there are definitely many improvements to be made for FutureStream |
09:38:00 | FromDiscord | <dom96> (and possibly a redesign of its API, but it should sort of work at least :)) |
09:50:11 | * | flynn quit (Read error: Connection reset by peer) |
09:51:19 | * | flynn joined #nim |
10:03:37 | * | flynn quit (Read error: Connection reset by peer) |
10:04:51 | * | flynn joined #nim |
10:05:47 | * | xet7 quit (Remote host closed the connection) |
10:06:53 | * | xet7 joined #nim |
10:14:07 | * | flynn quit (Read error: Connection reset by peer) |
10:15:13 | * | flynn joined #nim |
10:18:13 | FromDiscord | <hyu1996> why foo is not TestFoo https://media.discordapp.net/attachments/371759389889003532/883294801603203113/unknown.png |
10:19:51 | FromDiscord | <Rika> void is not a "type" per se |
10:19:59 | FromDiscord | <Rika> so it wont match that |
10:20:14 | FromDiscord | <Rika> : T usually means "actually returns something" so it cant be void |
10:22:15 | FromDiscord | <hyu1996> In reply to @Rika ": T usually means": soga, thx bro |
10:24:40 | * | flynn quit (Ping timeout: 240 seconds) |
10:29:20 | * | flynn joined #nim |
10:38:00 | * | flynn quit (Read error: Connection reset by peer) |
10:39:07 | * | flynn joined #nim |
10:48:02 | * | flynn quit (Read error: Connection reset by peer) |
10:49:08 | * | flynn joined #nim |
11:00:29 | FromDiscord | <hyu1996> https://nim-lang.github.io/Nim/manual_experimental.html#void-type |
11:00:30 | FromDiscord | <hyu1996> The document says "aΒ voidΒ type cannot be inferred in generic code" |
11:04:45 | FromDiscord | <Rika> yes |
11:09:49 | * | Vladar quit (Remote host closed the connection) |
11:18:21 | * | PersonMcGuy quit (Ping timeout: 256 seconds) |
11:23:26 | PMunch | @dom96, I was trying to respond to this and got stuck writing a proper callback: https://forum.nim-lang.org/t/8392 |
11:23:31 | PMunch | Not sure if I like my solution either.. |
11:24:30 | PMunch | Damn, 191 page hits for my async article already :P |
11:24:44 | * | flynn quit (Read error: Connection reset by peer) |
11:25:51 | * | flynn joined #nim |
11:26:22 | NimEventer | New post on r/nim by PMunch: Article series on multitasking in Nim, first installment: async, see https://reddit.com/r/nim/comments/ph39h4/article_series_on_multitasking_in_nim_first/ |
11:36:02 | FromDiscord | <dom96> hmmm, there is a better way |
11:41:36 | FromDiscord | <dom96> The `callback=` is really just confusing it seems |
11:42:03 | FromDiscord | <dom96> PMunch: I replied to the thread |
11:54:17 | PMunch | Ah, yeah I would also do it like that. But I assumed they had wanted to use the callback for a specific reason |
11:58:08 | FromDiscord | <dom96> You should assume they don't have a good reason to do so π |
11:59:32 | FromDiscord | <enthus1ast> never used callback= before, and i've written a lot of async code |
11:59:53 | FromDiscord | <dom96> That goes for most things. It's why I always ask people to describe their high level goal when they are asking a specific question of how to do x. Often they are following the wrong path. |
12:02:14 | * | stkrdknmibalz quit (Quit: WeeChat 3.0.1) |
12:02:38 | * | arkurious joined #nim |
12:02:44 | * | max22- quit (Ping timeout: 252 seconds) |
12:06:01 | * | supakeen quit (Quit: WeeChat 3.2) |
12:06:30 | * | supakeen joined #nim |
12:13:03 | FromDiscord | <Cark> @enthus1ast i've been giving a go at your service example, because my implementation silently fails, but it looks like oldwinapi doesn't compile anymore ? or maybe something wrong with my setup ? |
12:14:52 | FromDiscord | <Cark> trying to compile with oldwinapi, i get a crazy error stating that 2147746288 cannot be converted to a DWORD, which i beleive fits in a DWORD >< |
12:15:59 | FromDiscord | <Cark> then again DWORD is defined as int32 in oldwinapi, so obviously not |
12:23:40 | FromDiscord | <Cark> ah but it works with winim and some slight adjustments |
12:35:47 | * | flynn quit (Read error: Connection reset by peer) |
12:36:53 | * | flynn joined #nim |
13:35:58 | * | PMunch quit (Quit: Leaving) |
13:37:45 | * | PMunch joined #nim |
13:37:53 | * | rockcavera joined #nim |
13:37:53 | * | rockcavera quit (Changing host) |
13:37:53 | * | rockcavera joined #nim |
13:44:32 | * | Gustavo6046 quit (Ping timeout: 244 seconds) |
13:44:55 | * | Gustavo6046 joined #nim |
13:46:12 | * | nrds joined #nim |
13:56:49 | FromDiscord | <Cark> my issue is that adding --threads:on while compiling makes it crash ... no idea how to fix this |
14:00:53 | FromDiscord | <Cark> would it be possible to sidestep the nim threading facilities and use platform threads directly ? would this expose me to subtle bugs ? |
14:01:24 | FromDiscord | <Cark> (by not using --threads:on) |
14:08:46 | FromDiscord | <treeform> I tried that, I got mystery bugs, decided to do other stuff. |
14:10:17 | FromDiscord | <Cark> mhh damn that's a show stopper... at some point i'll need to serve some gui via http for that windows service, and i guess there is no doing this without threads |
14:10:40 | FromDiscord | <Cark> outside writing my own http server, which i don't want to do =) |
14:18:19 | * | max22- joined #nim |
14:23:02 | FromDiscord | <enthus1ast> @Cark\: try to use winim |
14:23:17 | FromDiscord | <enthus1ast> Could just work |
14:23:33 | FromDiscord | <Cark> @enthus1ast I did, there is a PR on your project about it |
14:23:40 | * | Gustavo6046 quit (Ping timeout: 240 seconds) |
14:23:46 | * | Gustavo6046_ joined #nim |
14:23:53 | FromDiscord | <enthus1ast> Yeah platform threads could work |
14:24:08 | FromDiscord | <enthus1ast> Ah nice |
14:24:16 | FromDiscord | <Cark> i'll give it a try, thanks =) |
14:24:43 | * | Vladar joined #nim |
14:25:27 | FromDiscord | <enthus1ast> Will merge it later when not on mobile |
14:25:27 | FromDiscord | <dom96> @Cark what are you working on? |
14:26:04 | FromDiscord | <enthus1ast> BUT also consider NSSM as your service, works quite nicely |
14:26:19 | * | Gustavo6046_ is now known as Gustavo6046 |
14:26:53 | FromDiscord | <enthus1ast> Then you don't have the hassle working with the service stuff on windows and just write normal binaries |
14:26:55 | FromDiscord | <Cark> @dom96 pretty simple spying program to instill fear in my daughter, I did catch her talking to strangers on discord, she's too young for that.... but the real goal is to evaluate nim, so I go as deep as possible into system programming, threading and stuff |
14:27:44 | FromDiscord | <enthus1ast> Better talk than hack imho π |
14:27:59 | FromDiscord | <Cark> @enthus1ast i'm trying to learn how to effectively use nim |
14:28:08 | FromDiscord | <Cark> so i'll go the hard way |
14:28:39 | FromDiscord | <dom96> Wait, are you serious or joking. Spying on your daughter is a really bad idea |
14:29:10 | FromDiscord | <Cark> there is no secret about it...and she's 8 |
14:29:24 | FromDiscord | <Cark> there will be a toast notification too |
14:30:34 | FromDiscord | <Cark> i don't even intend to acdtually spy, just show that i can =) |
14:30:37 | FromDiscord | <dom96> I see, that's better, but then your daughter will just find a different way to use Discord |
14:30:50 | FromDiscord | <dom96> and trust you less (which is why this is a bad idea) |
14:31:08 | * | PMunch quit (Quit: Leaving) |
14:31:09 | FromDiscord | <Cark> she would trust less if i was doing it secretly |
14:31:36 | * | vicfred joined #nim |
14:31:40 | FromDiscord | <Cark> we had a big talk about discord, she knows she messed up, and she's ok with it |
14:34:36 | FromDiscord | <Cark> real end goal is to build callshop point of sales software, have the telephony routing and messaging going through a windows service |
14:35:16 | FromDiscord | <Cark> that's a little too big to just go at it with nim without prior experience |
14:35:40 | * | Pyautogui joined #nim |
14:36:44 | * | sdmcallister joined #nim |
14:38:52 | * | sdmcallister quit (Client Quit) |
14:40:51 | * | Pyautogui quit (Ping timeout: 244 seconds) |
15:00:10 | * | flynn quit (Read error: Connection reset by peer) |
15:01:17 | * | flynn joined #nim |
15:05:19 | FromDiscord | <garuse> Hi! I mostly work from terminal (tmux) and it would be nice if i could access nim documentation from there. Is there a nim tool/pkg that can search and print documentation to stdout? |
15:08:55 | FromDiscord | <enthus1ast> @garuse\: maybe use links or w3m |
15:37:42 | * | Vladar quit (Quit: Leaving) |
15:58:50 | FromDiscord | <moein> is there any tutorial on how to compile and use a nim app in android? I wrote a simple text search functioanlity and i'd like to use it an android project |
15:59:00 | FromDiscord | <moein> (edit) "functioanlity" => "functionality" |
15:59:55 | FromDiscord | <Rika> i was doing this right now |
15:59:59 | FromDiscord | <Rika> doing that |
16:00:11 | FromDiscord | <Rika> reading https://github.com/yglukhov/jnim and https://github.com/GordonBGood/NimHelloJNI/ |
16:00:13 | nrds | <R2D299> itHub: 7"Nim - Java bridge" |
16:08:47 | FromDiscord | <Ayy Lmao> Does anyone with discord developer with experience know if it is possible to send audio from your computer to a discord bot? I've been looking into https://github.com/krisppurg/dimscord but it looks like the audio stuff isn't complete yet. |
16:08:50 | nrds | <R2D299> itHub: 7"A Discord Bot & REST Library for Nim." |
16:09:44 | FromDiscord | <moein> In reply to @Rika "reading https://github.com/yglukhov/jnim and https:": I guess i did not explain good enough, by nim app i mean exposing a nim proc to android and using it in a android project that's written with kotlin. |
16:09:47 | nrds | <R2D299> itHub: 7"Nim - Java bridge" |
16:10:01 | FromDiscord | <Rika> In reply to @moein "I guess i did": yes that is still relevant |
16:10:05 | FromDiscord | <Rika> that is what i am doing as well |
16:10:22 | FromDiscord | <Rika> `Nim Hello JNI is an Android sample that uses JNI to call C code from a Android Java Activity, with the C code generated from the Nim computer language instead of directly from C source files.` |
16:16:04 | * | flynn quit (Read error: Connection reset by peer) |
16:17:10 | * | flynn joined #nim |
16:20:15 | FromDiscord | <Ayy Lmao> sent a code paste, see https://paste.rs/N53 |
16:20:25 | FromDiscord | <Ayy Lmao> Is there some downside to this that I'm not thinking of? |
16:24:44 | FromDiscord | <Yardanico> > converter |
16:24:47 | FromDiscord | <Yardanico> that's why :) |
16:25:15 | FromDiscord | <Yardanico> converters can result in some really weird interactions in the code, and make your compilation errors really confusing sometimes |
16:25:50 | FromDiscord | <Rika> ~~i mean look at js~~ |
16:26:37 | FromDiscord | <Rika> get will raise when none, so you might turn something that doesnt raise into something that does |
16:26:54 | FromDiscord | <Ayy Lmao> Converters probably aren't the best way of dealing with it, but I was just using it as an example to show how it would work. I've just seen a few languages that have optional values as more of a builtin type and streamline dealing with them |
16:27:06 | FromDiscord | <Yardanico> nim might get a built-in Opt type |
16:27:17 | FromDiscord | <Yardanico> also, converters are only used thrice in the whole nim stdlib |
16:27:25 | FromDiscord | <Rika> ooh where |
16:27:43 | FromDiscord | <Ayy Lmao> In reply to @Yardanico "nim might get a": That would be really cool |
16:27:47 | FromDiscord | <Yardanico> https://github.com/nim-lang/Nim/blob/devel/lib/js/dom.nim#L1678 https://github.com/nim-lang/Nim/blob/devel/lib/pure/httpcore.nim#L172 https://github.com/nim-lang/Nim/blob/devel/lib/system/widestrs.nim#L53 |
16:27:55 | FromDiscord | <Yardanico> maybe more, but github only showed these |
16:31:46 | FromDiscord | <Ayy Lmao> I'm also not a huge fan of having to specify the type when using `none` |
16:32:31 | FromDiscord | <Ayy Lmao> I suppose it's necessary if you want to use type inference, but other than that it seems clunky |
16:34:40 | * | vicfred quit (Quit: Leaving) |
16:35:10 | * | flynn quit (Read error: Connection reset by peer) |
16:36:16 | * | flynn joined #nim |
16:42:00 | FromDiscord | <Rika> i keep on saying its a side effect of the lack of "backward inference" but im not sure if thats the only reason |
16:44:24 | FromDiscord | <Yardanico> In reply to @Rika "i keep on saying": Even with return type interference it will only be possible if you assign to already existing variables, otherwise you'll have to specify the type anyway |
16:44:52 | FromDiscord | <Rika> or arguments |
16:45:04 | FromDiscord | <Rika> theyre possible with arguments i would assume |
16:45:10 | FromDiscord | <Yardanico> and for existing variables it's really easy to just make a none template overload |
16:45:12 | FromDiscord | <Rika> unless there are many matching arguments ofc |
16:57:56 | FromDiscord | <Ayy Lmao> In reply to @Yardanico "Even with return type": I think that is the case where it would be nice to have it. Specifically for dealing with existing variables and early `return none` in functions that return optional values. |
16:58:10 | FromDiscord | <Yardanico> you can just use "return" in this case fyi |
16:58:19 | FromDiscord | <Yardanico> default Option value is none |
16:58:27 | FromDiscord | <Ayy Lmao> Interesting, I didn't realize that |
16:58:36 | FromDiscord | <Ayy Lmao> That makes things a bit easier |
16:58:57 | FromDiscord | <Ayy Lmao> I've been doing return none(whatever) this whole time haha |
17:21:18 | * | ad-absurdum quit (Quit: Leaving) |
17:21:25 | * | flynn quit (Read error: Connection reset by peer) |
17:22:32 | * | flynn joined #nim |
17:42:34 | * | flynn quit (Ping timeout: 252 seconds) |
17:47:09 | * | flynn joined #nim |
17:57:12 | * | flynn quit (Read error: Connection reset by peer) |
17:58:18 | * | flynn joined #nim |
18:19:32 | FromDiscord | <Neko~Neko~ni> sent a code paste, see https://play.nim-lang.org/#ix=3xR3 |
18:21:29 | FromDiscord | <Yardanico> what version is your gcc? |
18:21:31 | FromDiscord | <Yardanico> g++ -v |
18:21:40 | FromDiscord | <Neko~Neko~ni> lemme check\ |
18:21:54 | FromDiscord | <Neko~Neko~ni> 4.4.1 |
18:21:58 | FromDiscord | <Yardanico> yeah, that's very old |
18:22:02 | FromDiscord | <Yardanico> gnu++14 requires gcc 6.1 at least |
18:22:17 | FromDiscord | <Yardanico> i assume you're using mingw? |
18:22:23 | FromDiscord | <Neko~Neko~ni> Yeas |
18:22:28 | FromDiscord | <Neko~Neko~ni> (edit) "Yeas" => "Yes" |
18:22:48 | FromDiscord | <Yardanico> then you can install https://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/mingw-w64-v9.0.0.zip/download and add it to PATH |
18:22:50 | FromDiscord | <Neko~Neko~ni> so i should update |
18:22:52 | FromDiscord | <Yardanico> and remove the other mingw installation from path |
18:23:44 | FromDiscord | <Neko~Neko~ni> i don't think i installed g++ myself,or so i think.desn't nim install that stuff with its installation |
18:23:46 | FromDiscord | <Neko~Neko~ni> ? |
18:23:58 | FromDiscord | <Neko~Neko~ni> (edit) "think.desn't" => "think.doesn't" |
18:24:25 | FromDiscord | <Yardanico> how did you install nim? |
18:24:42 | FromDiscord | <Neko~Neko~ni> from zip file i think |
18:24:53 | FromDiscord | <Neko~Neko~ni> the official installation process |
18:24:55 | FromDiscord | <Yardanico> hm, weird, the shipped compiler should've been updated there |
18:25:24 | FromDiscord | <Yardanico> lemme check |
18:26:21 | FromDiscord | <Yardanico> no, the mingw shipped with the nim is the last one, what nim version did you install? |
18:26:31 | FromDiscord | <Yardanico> or maybe you have an older mingw install from some time before? |
18:26:31 | FromDiscord | <Neko~Neko~ni> nvm i think this was problem on my end.i had Falcon C++ installed which also installed gcc and g++. |
18:26:34 | FromDiscord | <Yardanico> yeah |
18:26:38 | * | max22- quit (Ping timeout: 252 seconds) |
18:26:43 | FromDiscord | <Neko~Neko~ni> Thanks anyway |
18:26:55 | FromDiscord | <Yardanico> nim windows installer downloads mingw with gcc 11.1 |
18:28:12 | FromDiscord | <Neko~Neko~ni> removing the g++,gcc from PATH should do trick(i mean the gcc,g++ that was bundles with falcon) |
18:28:26 | FromDiscord | <Neko~Neko~ni> (edit) "bundles" => "bundled" |
18:28:27 | FromDiscord | <Yardanico> yes |
18:28:54 | FromDiscord | <Yardanico> it's just 1 folder though, since in gcc/mingw all binaries are kept in the single "bin" folder, so just check all directories you have in your path and remove that one |
18:29:43 | FromDiscord | <Neko~Neko~ni> And wow my PATH variable is a mess.lol.Thanks for the help |
18:40:46 | * | flynn quit (Read error: Connection reset by peer) |
18:41:53 | * | flynn joined #nim |
18:56:08 | * | max22- joined #nim |
19:07:28 | * | NimEventer quit (Remote host closed the connection) |
19:07:35 | * | NimEventer joined #nim |
19:35:11 | FromDiscord | <dain> sent a code paste, see https://play.nim-lang.org/#ix=3xRs |
19:45:00 | FromDiscord | <treeform> some_other_macro does |
19:48:02 | * | rockcavera quit (Ping timeout: 245 seconds) |
19:51:29 | * | flynn quit (Read error: Connection reset by peer) |
19:52:36 | * | flynn joined #nim |
20:06:40 | * | Gustavo6046 quit (Ping timeout: 240 seconds) |
20:11:36 | * | Gustavo6046 joined #nim |
20:17:34 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
20:17:53 | * | Gustavo6046 joined #nim |
20:30:49 | * | flynn quit (Read error: Connection reset by peer) |
20:31:56 | * | flynn joined #nim |
20:32:45 | FromDiscord | <haxscramper> In reply to @dain "what is the order": https://forum.nim-lang.org/t/8357#53872 for more detailed explanation |
20:38:29 | FromDiscord | <dain> thank |
20:49:33 | * | Gustavo6046 quit (Remote host closed the connection) |
20:51:24 | * | Gustavo6046 joined #nim |
21:03:43 | FromDiscord | <krisppurg> In reply to @Ayy Lmao "Does anyone with discord": Yeah, I was implementing voice about last year, but no luck for some reason :(. I've tried to look for solutions to, and asked help, still nothing. I am not giving up on voice, but rather I feel unmotivated to work on so.β΅β΅You could try modifying my code and implement opus and the whole libsodium stuff and see if it works or not (maybe there could be a problem with udp connection o |
21:13:24 | FromDiscord | <Varriount> Hm, is Zevv around? |
21:13:49 | * | auxym_ joined #nim |
21:18:54 | FromDiscord | <dom96> @Varriount might be best to just ask as if Zevv is here |
21:20:23 | * | flynn quit (Read error: Connection reset by peer) |
21:21:31 | * | flynn joined #nim |
21:23:53 | Zevv | Varriount: zup |
21:29:24 | * | flynn quit (Read error: Connection reset by peer) |
21:30:31 | * | flynn joined #nim |
21:34:42 | * | auxym_ quit (Ping timeout: 244 seconds) |
21:55:47 | * | auxym_ joined #nim |
22:09:28 | FromDiscord | <Ayy Lmao> In reply to @krisppurg "Yeah, I was implementing": It's currently over my head I think, but I might try at some point if I can get more familiar with the discord API. |
22:14:36 | * | auxym_ quit (Ping timeout: 256 seconds) |
22:21:12 | * | max22- quit (Quit: Leaving) |
22:39:48 | FromDiscord | <Goat> How do I find the literal `/` character using the re modules? |
22:42:52 | * | auxym_ joined #nim |
22:46:09 | FromDiscord | <Elegantbeef> isnt it `\/` |
22:52:34 | FromDiscord | <Goat> No |
22:52:37 | FromDiscord | <Goat> I tried that |
22:57:14 | FromDiscord | <Elegantbeef> What are you trying to find/capture? |
22:57:19 | Zevv | works for me |
22:57:40 | Zevv | !eval import re; echo find("fl/p", re"/") |
22:57:50 | Zevv | oh no more bot here |
22:58:27 | FromDiscord | <Elegantbeef> !eval import re; echo find("fl/p", re"/") |
22:58:36 | FromDiscord | <Elegantbeef> Cmon bot |
22:58:40 | NimBot | Compile failed: <no output> |
22:58:42 | Zevv | what bot would that be |
22:58:42 | nrds | <R2D299> <no output> |
22:58:47 | FromDiscord | <Elegantbeef> I think it's just dead zevv you killed nimbot |
22:58:52 | Zevv | again |
22:59:00 | FromDiscord | <dom96> Don't blame NimBot for playground's woes |
22:59:28 | NimBot | Compile failed: <no output> |
22:59:28 | FromDiscord | <Elegantbeef> I'll blame who i want just cause your name rhymes with mom doesnt mean you're mine |
23:00:00 | FromDiscord | <Varriount> In reply to @Zevv "<@169336940846514176>: zup": I'm trying to use a NPeg grammar spread across 3 files, however they don't seem to be picking each other up. |
23:00:56 | Zevv | you use `grammar:` blocks |
23:01:03 | Zevv | ? |
23:02:27 | FromDiscord | <dom96> also is R2D2 just a copy of NimBot? |
23:02:30 | FromDiscord | <dom96> !ping |
23:02:30 | NimBot | pong |
23:02:30 | FromDiscord | <StardustAnnouncer> Pong! |
23:05:16 | Zevv | Varriount: ping me tomorrow, I'm off for a nap |
23:05:38 | FromDiscord | <Varriount> Darn |
23:05:54 | FromDiscord | <Varriount> Ah well, at least I'm making progress |
23:06:31 | FromDiscord | <Varriount> dom96: Is there a reason Nimble (and Nim in general) doesn't use Window's root certificate store with OpenSSL? |
23:06:39 | FromDiscord | <Varriount> (edit) |
23:06:50 | FromDiscord | <Varriount> (edit) removed "@dom96" |
23:06:55 | FromDiscord | <Varriount> @dom96 ^ |
23:07:39 | FromDiscord | <dom96> I don't know/recall the details but I think it just wasn't trivial to implement |
23:10:22 | FromDiscord | <Varriount> In reply to @dom96 "I don't know/recall the": I mean, I'm implementing it now, based off of https://github.com/douderg/net/blob/0f132b3f2a4808438e2638d429a72179259b8e82/src/cert_utils.cpp#L13 |
23:10:47 | FromDiscord | <Varriount> Maybe it's just because Windows developers are in the minority. |
23:11:37 | FromDiscord | <dom96> possibly, I am on Windows but using WSL |
23:11:49 | FromDiscord | <dom96> and probably running an old version of Nimble anyway |
23:19:09 | * | PersonMcGuy joined #nim |
23:20:40 | PersonMcGuy | Hello all, just curious, does anyone know of any libraries to make dealing with UncheckedArrays easier? I know it's pretty low level, so the actions needed generally aren't too involved, but I guess I'm looking for some standardized implementations of basic functionality |
23:22:47 | FromDiscord | <Elegantbeef> Easier like with the fill logic from yesterday? |
23:24:03 | FromDiscord | <Varriount> In reply to @PersonMcGuy "Hello all, just curious,": What do you mean by "easier"? |
23:25:26 | PersonMcGuy | Yeah, pretty much. I went through a first sweep of the header file and got everything, but it handles more like C with nim syntax (still dealing with pointers and array lengths). So I'm trying to do a second pass and trying to make it a simple as possible (i.e. turning all those unchecked arrays into seqs when possible) |
23:26:15 | FromDiscord | <Elegantbeef> Well the biggest QOL you can do is `type ByteArray = ptr UncheckedArray[uint8]` |
23:26:30 | FromDiscord | <Elegantbeef> But aside from that, there isnt much "easier" to be had |
23:26:51 | PersonMcGuy | That is a good one, I should definitely do that |
23:28:47 | PersonMcGuy | Let me write up some code about what I was thinking about |
23:29:20 | PersonMcGuy | Oh is the playground down? |
23:29:34 | FromDiscord | <Elegantbeef> seems like it |
23:29:48 | FromDiscord | <Elegantbeef> https://doongjohn.github.io/nim-playground/ exists aswell |
23:30:53 | PersonMcGuy | @Elegantbeef How do you send a link with the code like you did last night? |
23:31:12 | FromDiscord | <Elegantbeef> Well i used the playground π |
23:31:18 | FromDiscord | <Elegantbeef> But it's not playing nice |
23:31:24 | PersonMcGuy | Aw man |
23:31:57 | PersonMcGuy | Okay, I'll just use pastebin again |
23:37:24 | FromDiscord | <Elegantbeef> Well here are some niceties you might like https://hastebin.com/axucarasud.md |
23:39:05 | * | stkrdknmibalz joined #nim |
23:50:03 | * | flynn quit (Remote host closed the connection) |
23:51:11 | * | flynn joined #nim |
23:51:23 | FromDiscord | <Yardanico> @ElegantBeef off by 1 :) |
23:51:29 | FromDiscord | <Yardanico> 0..size will emit from 0 to 10, so 11 items in total |
23:51:41 | FromDiscord | <Elegantbeef> ah yes forgot to handle that |
23:51:58 | FromDiscord | <Elegantbeef> replace all `0..size` with `0..<size` |
23:52:26 | FromDiscord | <Elegantbeef> Cmon yard you can say off by one you dont have to belittle me with an explanation of inclusive ranges |
23:52:47 | FromDiscord | <Yardanico> i'm doing it lovingly! |
23:53:26 | FromDiscord | <Elegantbeef> Yea i'm sure you lovingly like being on a pedestal |
23:54:57 | FromDiscord | <Yardanico> ok, so another explanation - I explained the ranges because other people read this chat too |
23:55:12 | FromDiscord | <Elegantbeef> Lol i'm just joking of course |
23:55:16 | FromDiscord | <Yardanico> i know |
23:55:29 | FromDiscord | <Yardanico> :tf: |