00:27:13 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
00:30:26 | * | Lord_Nightmare joined #nim |
01:25:06 | FromDiscord | <mratsim> In reply to @isofruit "Zoom : Doesn't a": channels/queues have a max capacity / need allocation only if they are backed by an array. If they are backed by an intrusive linked list you don't need to allocate. |
01:26:33 | FromDiscord | <mratsim> In reply to @Phil (he/him) "I guess using multiple": you might want to read about the actor model btw |
01:29:21 | FromDiscord | <mratsim> In reply to @Phil (he/him) "Yes-ish, I'm mostly approaching": This kind of architecture might inspire you: https://github.com/mratsim/blocksmith/blob/master/architecture_phase0.md#implementation |
01:32:07 | FromDiscord | <mratsim> sent a long message, see <!doctype html> |
01:33:01 | FromDiscord | <mratsim> In reply to @Elegantbeef "Right you can use": uh, when did this ensureMove appear? |
01:33:13 | FromDiscord | <Elegantbeef> 2.0 |
01:35:42 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/Nim/pull/22339 exactly here 😄 |
02:12:14 | FromDiscord | <treeform> sent a code paste, see https://play.nim-lang.org/#ix=html> |
02:14:01 | FromDiscord | <treeform> In reply to @eebahn "Has anyone used `treeform/chrono`?": I mainly made chrono because std/times does not work with JavaScript. It also came to realization that all of this time stuff is quite simple, but APIs make it complicated. That is why the base type for Chrono is just a float64 number good enough for most date time stuff. Only when you need to take the float64 and read or display it do you need get complicated Calendar object or |
02:14:46 | FromDiscord | <treeform> In reply to @zectbumo "I got the demo": Yes I have removed pixie/demo. If you want real time 2d graphics please use my boxy library. |
02:36:29 | * | azimut joined #nim |
02:38:16 | * | rockcavera joined #nim |
03:07:39 | * | azimut quit (Remote host closed the connection) |
03:07:59 | * | azimut joined #nim |
03:14:35 | * | azimut quit (Remote host closed the connection) |
03:30:38 | * | azimut joined #nim |
03:35:06 | FromDiscord | <norskiy> :nim1: |
03:35:10 | FromDiscord | <norskiy> Hello |
03:38:50 | FromDiscord | <demotomohiro> Hello |
04:04:55 | * | derpydoo quit (Ping timeout: 246 seconds) |
04:49:33 | FromDiscord | <treeform> Hello |
04:53:24 | * | rockcavera quit (Remote host closed the connection) |
06:01:46 | * | azimut_ joined #nim |
06:02:07 | * | azimut quit (Ping timeout: 240 seconds) |
06:57:32 | * | advesperacit joined #nim |
07:50:33 | * | junaid_ joined #nim |
07:56:28 | * | junaid_ quit (Remote host closed the connection) |
08:06:28 | * | PMunch joined #nim |
08:15:49 | NimEventer | New thread by mantielero: Zig issue, see https://forum.nim-lang.org/t/10792 |
08:33:21 | * | jmdaemon quit (Ping timeout: 256 seconds) |
10:40:52 | * | casaca quit (Remote host closed the connection) |
10:40:52 | * | noeontheend quit (Remote host closed the connection) |
10:40:52 | * | adigitoleo quit (Remote host closed the connection) |
10:40:53 | * | mhcat quit (Remote host closed the connection) |
10:40:53 | * | mronetwo quit (Remote host closed the connection) |
10:43:55 | * | mhcat joined #nim |
10:43:55 | * | mronetwo joined #nim |
10:44:03 | * | adigitoleo joined #nim |
10:44:13 | * | noeontheend joined #nim |
11:18:43 | * | noeontheend quit (Read error: Connection reset by peer) |
11:18:43 | * | mhcat quit (Read error: Connection reset by peer) |
11:18:45 | * | khazakar quit (Read error: Connection reset by peer) |
11:18:45 | * | mronetwo quit (Write error: Connection reset by peer) |
11:18:50 | * | mronetwo_ joined #nim |
11:18:51 | * | mhcat_ joined #nim |
11:18:56 | * | noeontheend_ joined #nim |
11:19:05 | * | khazakar joined #nim |
11:19:10 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
11:19:19 | * | mhcat_ is now known as mhcat |
11:19:29 | * | noeontheend_ is now known as noeontheend |
11:19:30 | * | Lord_Nightmare joined #nim |
11:47:05 | NimEventer | New Nimble package! nph - Opinionated code formatter, see https://github.com/arnetheduck/nph |
12:41:30 | * | Onionhammer0 joined #nim |
12:41:53 | * | Onionhammer quit (Read error: Connection reset by peer) |
12:41:53 | * | Onionhammer0 is now known as Onionhammer |
12:43:21 | * | lucasta joined #nim |
13:00:18 | FromDiscord | <sOkam! 🫐> anyone wants to collaborate for implementing this for nim?↵https://github.com/VerbalExpressions/implementation |
13:06:53 | FromDiscord | <sOkam! 🫐> sent a long message, see <!doctype html> |
13:11:47 | FromDiscord | <pmunch> In reply to @heysokam "anyone wants to collaborate": Huh? |
13:16:42 | FromDiscord | <Phil> In reply to @heysokam "<@449019668296892420> dude, really. so": It's their package.↵Imo the goal seems like its worth it and he's the one that made the effort, so I wouldn't complain. |
13:17:10 | FromDiscord | <Phil> For the most part because for stuff like this complaining just reduces motivation to keep working on it |
13:17:20 | FromDiscord | <sOkam! 🫐> In reply to @pmunch "Huh?": what's the question?↵Its an implementation that is already in many langs, all stored under that org |
13:19:46 | FromDiscord | <sOkam! 🫐> In reply to @isofruit "For the most part": I am not complaining about the quality. I figure it must be stellar, since its made by arne. he is a really good programmer↵I'm just pointing at the fact that, in my personal opinion, a formatter is a tool to make code fit a codebase, not to make code in every codebase across users fit one single unified standard for everyone 😦 |
13:20:24 | FromDiscord | <sOkam! 🫐> I'm really glad he improved nimpretty, any tooling work is a blessing in this lang |
13:20:39 | FromDiscord | <Phil> In reply to @heysokam "I am not complaining": I wasn't implying that you were complaining about code quality, I was pointing out that voicing criticisms in the form of complaining at least makes me not want to keep working on things and is something I've generally observed killing motivation. |
13:21:10 | FromDiscord | <Phil> Not that I'm great at that myself mind you |
13:22:10 | FromDiscord | <sOkam! 🫐> Well I'm one single person, that had his hopes up for a moment of finally finding a clang-format replacement for nim↵I'm sure the other 99% of users will agree that nph is a great idea↵The opinion of a single person should never discourage anybody to anything |
13:22:39 | FromDiscord | <sOkam! 🫐> (edit) "nph" => "forced-formatting" |
13:23:39 | FromDiscord | <sOkam! 🫐> As in, feel free to call me out on my complaining and ignore my opinion freely↵I'm just one person, my opinion shouldn't have such power to demotivate anybody |
13:25:35 | FromDiscord | <Phil> In reply to @heysokam "Well I'm one single": It's not going to be the one person, it's just going to be yet another reason on top of half a dozen others that may finally swing into "Meh, I'll just drop this in favour of X" |
13:26:03 | * | antranigv_ joined #nim |
13:27:07 | FromDiscord | <sOkam! 🫐> yeah i understand what you mean↵well sorry for letting my frustration lead my words. my bad |
13:27:20 | FromDiscord | <Phil> So ideally approaching a package more of the "this may be nice" side of things and formulating it e.g. as making a case for your position like in "I prefer X and would love to have the option, is there any way to make you reconsider?" or the like. |
13:27:26 | * | antranigv quit (Ping timeout: 245 seconds) |
13:27:38 | FromDiscord | <sOkam! 🫐> In reply to @isofruit "So ideally approaching a": very true ✍️ |
13:27:54 | FromDiscord | <Phil> In reply to @heysokam "yeah i understand what": I mean, understandable, particularly since tooling in nim is one of the very areas where improvements are always a godsend |
13:28:19 | FromDiscord | <Phil> ~~Still waiting for the day where I actually don't have to turn off nimsuggest or risk getting an aneurism from the false positives~~ |
13:29:04 | * | derpydoo joined #nim |
13:30:08 | FromDiscord | <arnetheduck> In reply to @heysokam "<@449019668296892420> dude, really. so": they are quite different beasts, `nph` and `nimpretty` - both in terms of quality and approach, but in general, it's also fine that you're looking for something else - if you want to invest actual time in it, it would be trivial to build a fork of `nph` that adds lots of options - it is quite a solid base for the school of lots-of-options-based formatting due to how wel |
13:30:09 | FromDiscord | <Phil> Now I'm really curious what arne is cooking up as a reply |
13:31:22 | FromDiscord | <Phil> In reply to @arnetheduck "they are quite different": Out of curiosity, I'm pretty sure that jumping into a project like this would teach you a fair bit about code parsing for the most part right?↵Or does nph use clang stuff under the hood and you'd get to learn about that too? |
13:31:41 | FromDiscord | <Phil> Mostly wondering about the overall scope of the problem domain and which areas it touches |
13:39:17 | FromDiscord | <arnetheduck> sent a long message, see <!doctype html> |
13:42:55 | FromDiscord | <arnetheduck> there is no clang involved here - the starting point was the AST renderer that's used for printing macro code (that was already in the compiler) |
13:43:53 | FromDiscord | <arnetheduck> or rather, the ideas for automated formatting date back to clang-format in my case which was the first "working" formatter I used - it influenced a lot of formatting done in `nph` (except its love for options, to @sOkam! 🫐's displeasure) |
13:44:10 | FromDiscord | <arnetheduck> (edit) "it" => "its defaults" |
13:44:36 | FromDiscord | <Phil> Okay so basically its a possible entrypoint into the problemdomain of compilers |
13:45:04 | FromDiscord | <Phil> With some extra-problems such as comments as you pointed out, and ideally requires a bit of reading into the problem domain more generally |
13:47:33 | FromDiscord | <pmunch> In reply to @heysokam "what's the question? Its": What is this thing? I can't seem to find any explanation for what this thing is meant to do |
13:48:14 | PMunch | Hmm, this Futhark project mode thing seems to be harder than I had expected |
13:48:35 | PMunch | C imports are just too different |
13:58:11 | NimEventer | New thread by arnetheduck: `nph` opinonated formatter v0.2, see https://forum.nim-lang.org/t/10793 |
14:02:14 | * | rockcavera joined #nim |
14:04:15 | * | lucasta quit (Quit: Leaving) |
15:34:47 | FromDiscord | <Phil> sent a long message, see <!doctype html> |
15:35:03 | FromDiscord | <Phil> @michaelb.eth this may also be of interest to you since we discussed that what I wrote about could very well be an actor model ↵↵I would argue that the way this is implemented is client server though, since you have 2 threads passing messages and one is always reacting to the other or messages elsewhere |
15:35:19 | FromDiscord | <Phil> Or I guess client server models are kind of a subset of actor models in a sense? With message passing via http/websockets |
15:35:34 | FromDiscord | <Phil> And spawning new actors is kinda thrown out the window |
15:43:14 | * | junaid_ joined #nim |
15:46:31 | FromDiscord | <mratsim> In reply to @isofruit "<@570268431522201601> read up a": I don't think there is any design restrictions that says actors have to be untyped. |
15:55:43 | * | azimut_ quit (Ping timeout: 240 seconds) |
16:00:39 | FromDiscord | <odexine> hey phil maybe it really is time for you to get beampilled |
16:01:17 | * | azimut joined #nim |
16:15:18 | FromDiscord | <Phil> In reply to @odexine "hey phil maybe it": Look for the last message I sent with your name in it, I felt like I grasped the idea behind Erlang's concurrency |
16:16:22 | FromDiscord | <Phil> Note I have no clue about Erlang and it's runtime beyond the claims of it having perfect concurrency or sth |
16:17:39 | FromDiscord | <Phil> https://discord.com/channels/371759389889003530/371759389889003532/1187106797429993482 that one |
16:19:23 | FromDiscord | <Phil> In reply to @mratsim "I don't think there": Hmm I saw no mention of it that messages could be typed, so I assumed it to be not part of the spec |
16:19:47 | FromDiscord | <Phil> But fair, should work either way |
16:23:50 | FromDiscord | <Phil> The real kicker for this lib will be how the hell I'm supposed to test it |
16:24:18 | FromDiscord | <Phil> But problems for future Phil, now think more about generally how the implementation could work |
16:24:28 | FromDiscord | <Phil> (edit) "But ... problems" added "that's" |
16:26:37 | FromDiscord | <ntsekees> Huh, is that a new lean lambda syntax, or is this an error? 👀 https://media.discordapp.net/attachments/371759389889003532/1187430933779972127/image.png?ex=6596dc3c&is=6584673c&hm=dc88e0407da1cc07db0f71afe18f2dea9b9dee91328ef661d0dab0845eb8f826& |
16:27:05 | FromDiscord | <Phil> For the most part that is unbearable to me 😄 |
16:27:20 | FromDiscord | <Phil> Unreadable |
16:28:04 | FromDiscord | <Phil> But no I don't think it's new, foldl likely is just a macro that reshapes that code into a forloop |
16:28:34 | FromDiscord | <Phil> Similar to mapIt with the it expressions |
16:28:42 | FromDiscord | <ntsekees> oh, right |
16:29:21 | FromDiscord | <ntsekees> there's no formal way to tell apart a function from a macro? |
16:30:10 | FromDiscord | <_veegee> Hey what's up guys. I'm been looking into nim. What are some use cases for it? Like anywhere I'd use C? |
16:32:11 | FromDiscord | <Phil> In reply to @_veegee "Hey what's up guys.": Honestly I would use it for anything outside of more elaborate scripting |
16:32:23 | FromDiscord | <_veegee> I keep confusing it with zig |
16:32:37 | FromDiscord | <ntsekees> Nim uses garbage collection |
16:32:45 | FromDiscord | <ntsekees> so it's not quite the same niche as C and Zig |
16:32:48 | FromDiscord | <Phil> In reply to @ntsekees "there's no formal way": Optional gc |
16:33:01 | FromDiscord | <Phil> Wups, replied to the wrong message |
16:33:02 | FromDiscord | <ntsekees> does the stdlib work without GCN |
16:33:06 | FromDiscord | <ntsekees> (edit) "GCN" => "GC?" |
16:33:23 | FromDiscord | <Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=html> |
16:33:27 | FromDiscord | <Chronos [She/Her]> This seems to do the trick |
16:33:57 | FromDiscord | <Phil> Most of it not afaik, but embedded (where this matters most) is it's own game and has plenty libs afaik. ↵See embedded channel and ratel |
16:34:15 | FromDiscord | <Chronos [She/Her]> Can't do `myMacro is proc` because it's expanded when used, so |
16:35:03 | FromDiscord | <Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=html> |
16:35:09 | FromDiscord | <Chronos [She/Her]> (edit) |
16:35:30 | FromDiscord | <summarity> Using `$Foo` I can get the string representation of a type (`$Foo` -> `"Foo"`, where `Foo` is a typedesc). How can I do the same for proc at compile time (e.g. `$bar` -> `"bar"`, where `bar` is a proc)? |
16:42:45 | FromDiscord | <odexine> In reply to @isofruit "https://discord.com/channels/371759389889003530/371": no it is not |
16:44:29 | FromDiscord | <odexine> In reply to @summarity "Using `$Foo` I can": https://nim-lang.org/docs/system.html#astToStr%2CT kind of, not really |
16:45:52 | FromDiscord | <odexine> In reply to @isofruit "https://discord.com/channels/371759389889003530/371": the idea is that in erlang there is a concept of processes, each having their own mailbox for messages ↵these processes run functions which do the working on these messages, in which receiving, doing w/e, or sending is done |
16:46:01 | FromDiscord | <odexine> function calls are function calls, theyre not exactly related |
16:46:08 | FromDiscord | <odexine> @Phil didnt ping |
16:46:37 | FromDiscord | <Phil> Hmmmmmm so its the "inter-erlang-process" communication that outlines the thread-boundaries |
16:46:47 | FromDiscord | <odexine> processes are not necessarily threads |
16:47:04 | FromDiscord | <odexine> anyway pretty much yes |
16:47:04 | FromDiscord | <Phil> I'd assume they're either individual threads or individual threadpools |
16:47:10 | FromDiscord | <odexine> theyre not related |
16:47:14 | FromDiscord | <Phil> Hmmmm interesting |
16:47:19 | FromDiscord | <odexine> theyre closer to green threads i guess |
16:48:25 | FromDiscord | <Phil> Thread colors I have not yet a solid understanding of.↵I think one was physical threads limited by what your CPU has in cores (and if they have hyperthreading) and the other was OS threads and those can be whatever |
16:50:24 | FromDiscord | <Phil> Ah, VM threads was opposed to OS based threads, nevermind |
16:52:08 | FromDiscord | <Phil> "Green Threads in other languages"↵Are co-routines and async-io now counted as green threads? https://media.discordapp.net/attachments/371759389889003532/1187437357654360104/image.png?ex=6596e237&is=65846d37&hm=0bb4230554309ea9559d028d793d946f15ab3f25a8b8681e5f9fae2df04ecd48& |
16:52:57 | FromDiscord | <odexine> not really as it doesnt provide parallelism |
16:53:02 | FromDiscord | <odexine> only concurrency |
16:53:13 | FromDiscord | <Phil> Check, then this might just be a wikipedia misnomer |
17:03:40 | * | junaid_ quit (Remote host closed the connection) |
17:04:42 | FromDiscord | <odexine> well, perhaps my definition does not agree with wikipedias |
17:27:53 | FromDiscord | <Phil> Can you forward declare types? |
17:29:23 | FromDiscord | <Phil> I'm on the go so can't test that for the next several hours |
17:36:30 | * | PMunch quit (Quit: Leaving) |
17:42:56 | Amun-Ra | only in the same type section |
17:48:03 | FromDiscord | <ntsekees> > Error: ▓▓/nim-1.6.10/lib/pure/collections/tables.nim(2303, 9) `not t.isSorted` CountTable must not be used after sorting [AssertionDefect]↵. 😵💫 |
17:48:50 | FromDiscord | <ntsekees> (occurring upon `for k in keys counttable:` after sorting the count table) |
17:54:33 | Amun-Ra | that's not even the lastest nim 1.6 ;) |
18:09:19 | FromDiscord | <ntsekees> I've just updated to 2.0.2 but the assertion failure remains |
18:12:30 | FromDiscord | <odexine> In reply to @ntsekees "(occurring upon `for k": You can’t use the table after sorting, do `for v in values counttable: v` instead |
18:12:42 | FromDiscord | <odexine> Indexing counts as usage |
18:13:29 | Amun-Ra | check https://nim-lang.org/docs/tables.html#sort%2CCountTable%5BA%5D |
18:14:15 | FromDiscord | <maximumtrollage> just started learning this lang; It's been very enjoyable so far |
18:23:52 | FromDiscord | <mratsim> In reply to @isofruit ""Green Threads in other": green threads are fibers, where you create your own stack and switch to it, also called stackful coroutines |
18:24:41 | FromDiscord | <maximumtrollage> is it normal for have multiple files for a project? or is it standard to put everything in a single `packagename.nim`? (This is what I've been seeing online).↵↵also, is there a place online where I can learn Nim conventions? |
18:24:51 | FromDiscord | <maximumtrollage> (edit) "it normal for have multiple files for" => "taking" | "project? or is it standard to put everything in a single `packagename.nim`? (This is what I've been seeing online).↵↵also, is there a place online where I can learn Nim conventions?" => "break 🍻</p> <img src="/underconstruction.gif" width="200px"> </body> </html>" |
18:34:06 | Amun-Ra | if your project consists of multiple files nimble suggests putting them inside src/packagename directory |
18:34:38 | Amun-Ra | (for library projects), and that's what I do |
18:36:49 | * | junaid_ joined #nim |
18:43:26 | FromDiscord | <maximumtrollage> ah, alright. Thank you 🙏.↵↵are there any detailed guides online on proper Nim conventions? |
18:46:37 | Amun-Ra | check https://nim-lang.org/docs/nep1.html |
18:46:49 | Amun-Ra | that's stdlib style guide |
18:47:11 | Amun-Ra | and (unofficial) https://status-im.github.io/nim-style-guide/ |
18:47:51 | Amun-Ra | I'm not the best target for the question, I'm one of a few snake case nim programmers ;) |
18:48:15 | Amun-Ra | foo_bar is the same as fooBar |
18:48:46 | Amun-Ra | I find snake case more readable (I use python naming convention) |
18:49:34 | FromDiscord | <ntsekees> In reply to @odexine "You can’t use the": I still need to access the keys though, so I think I'll try to first convert the CountTable into something else (hopefully a seq of pairs) and sort them only after that |
18:50:00 | FromDiscord | <ntsekees> Is there a good way to iterate `(key, value)` pairs from a hashmap? |
18:51:48 | Amun-Ra | .pairs? |
18:52:12 | Amun-Ra | for key, val in foo.pairs: … |
18:52:19 | FromDiscord | <ntsekees> sent a code paste, see https://play.nim-lang.org/#ix=html> |
18:52:28 | FromDiscord | <ntsekees> is what I did and it worked |
18:52:45 | FromDiscord | <ntsekees> but thanks for the tip |
18:53:04 | FromDiscord | <ntsekees> and I sorded `counts` instead of `freqs` |
18:53:23 | Amun-Ra | we can't see play nim links on irc |
18:53:26 | FromDiscord | <s3cur3th1ssh1t> sent a code paste, see https://play.nim-lang.org/#ix=html> |
18:53:58 | FromDiscord | <s3cur3th1ssh1t> (edit) |
18:54:05 | FromDiscord | <nnsee> In reply to @Amun-Ra "we can't see play": it's a discord code block |
18:54:15 | Amun-Ra | oh |
18:55:16 | Amun-Ra | the same is with long messages, only looks different |
18:55:28 | Amun-Ra | for example: "Phil sent a long message, see <!doctype html>" |
18:55:45 | Amun-Ra | and: ntsekees sent a code paste, see https://play.nim-lang.org/#ix=html> |
18:57:36 | FromDiscord | <nnsee> yeah, I need to get on finishing the paste service for the playground |
18:58:02 | FromDiscord | <nnsee> In reply to @s3cur3th1ssh1t "Question. I'm trying to": maybe https://nim-lang.org/docs/manual.html#types-unchecked-arrays |
19:07:49 | FromDiscord | <s3cur3th1ssh1t> In reply to @nnsee "maybe https://nim-lang.org/docs/manual.html#types-u": Cannot be used in a type definition on how I understand the error https://media.discordapp.net/attachments/371759389889003532/1187471503323824298/image.png?ex=65970204&is=65848d04&hm=5428694d44dc6a5c12e0f2de7d04dbdcf9a841958edbd632d6b426964645a726& |
19:17:01 | * | junaid_ quit (Remote host closed the connection) |
19:25:31 | FromDiscord | <demotomohiro> In reply to @s3cur3th1ssh1t "Question. I'm trying to": I think you need to get the value of `ANYSIZE_ARRAY`.↵Or import these types using header pragma and ignore `Handles`. |
19:26:47 | FromDiscord | <demotomohiro> Is that win32api struct type?↵If so, winim might have that type. |
19:28:10 | * | antranigv_ is now known as antranigv |
19:28:28 | FromDiscord | <s3cur3th1ssh1t> In reply to @demotomohiro "I think you need": I can get the array length but only on runtime and not on compile time and the type definitions can only be build for compile time If I'm not mistaken.↵↵winim doesn't have this type definition yet |
19:28:52 | FromDiscord | <s3cur3th1ssh1t> In reply to @demotomohiro "I think you need": Can you give an example for header pragma? |
19:30:26 | FromDiscord | <demotomohiro> https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-header-pragma |
19:33:40 | FromDiscord | <maximumtrollage> In reply to @Amun-Ra "and (unofficial) https://status-im.github.io/nim-st": thank you |
19:38:27 | FromDiscord | <demotomohiro> Maybe, just define `Handles: array[1, PROCESS_HANDLE_...]` and at runtime, access elements by casting to uncheckArray like `cast[ptr uncheckedArray[PROCESS_HANDLE_TABLE](addr foo.Handles[0])[index]` might work. |
19:41:08 | FromDiscord | <nnsee> In reply to @s3cur3th1ssh1t "Cannot be used in": wait what? |
19:41:16 | FromDiscord | <nnsee> this doesn't seem right... |
19:41:32 | FromDiscord | <nnsee> are you sure it's erroring in the typedef and not some usage somewhere? |
19:42:36 | FromDiscord | <s3cur3th1ssh1t> In reply to @demotomohiro "https://nim-lang.org/docs/manual.html#implementatio": Tried that but the nim type definition is used over the header file definition. And leaving out the Handles part will result in it not being usable on runtime. |
19:43:07 | FromDiscord | <s3cur3th1ssh1t> In reply to @demotomohiro "Maybe, just define `Handles:": Let me try this |
19:44:18 | FromDiscord | <s3cur3th1ssh1t> In reply to @nnsee "are you sure it's": The size needs to be fixed there. OpenArray is not usable. Even tried an Macro for the typedef with a dynamic size cannot be evaluated on runtime. |
19:44:42 | * | antranigv is now known as antranigv_ |
19:48:23 | FromDiscord | <s3cur3th1ssh1t> In reply to @demotomohiro "Maybe, just define `Handles:": https://media.discordapp.net/attachments/371759389889003532/1187481713622917190/image.png?ex=65970b86&is=65849686&hm=b15581f9fac068eb860ebd20f29c84194d99cc79212598ffe35e0c6dbf950116& |
19:50:49 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=html> |
19:51:28 | FromDiscord | <s3cur3th1ssh1t> sent a code paste, see https://play.nim-lang.org/#ix=html> |
19:52:42 | FromDiscord | <s3cur3th1ssh1t> Even if its defined with size of 1 in nim, I get `Error: unhandled exception: index 1 not in 0 .. 0 [IndexDefect]` on runtime. |
19:53:58 | FromDiscord | <demotomohiro> In reply to @s3cur3th1ssh1t "": UncheckArray is generics type. Did you give array element type? |
19:59:33 | FromDiscord | <demotomohiro> In reply to @s3cur3th1ssh1t "Even if its defined": That is way you need to cast the address of `Handles[0]` to `ptr UncheckedArray[PROCESS_brahbrah]` to avoid Nim's runtime checks. |
20:01:33 | FromDiscord | <bostonboston> I was gonna say the concrete error sounded like UncheckArray wasn't given a type |
20:01:35 | FromDiscord | <demotomohiro> In reply to @demotomohiro "Maybe, just define `Handles:": There is a mistake.↵`cast[ptr UncheckedArray[PROCESS_HANDLE_TABLE]](addr foo.Handles[0])[index]`. |
20:05:42 | FromDiscord | <raven_team.leader> does a string count as openArray[char] |
20:06:28 | * | jmdaemon joined #nim |
20:09:55 | FromDiscord | <s3cur3th1ssh1t> sent a code paste, see https://play.nim-lang.org/#ix=html> |
20:10:02 | FromDiscord | <s3cur3th1ssh1t> Like that? |
20:10:26 | Amun-Ra | yes, it counts |
20:13:29 | FromDiscord | <s3cur3th1ssh1t> Oh wow my fault its working now.! |
20:13:43 | FromDiscord | <s3cur3th1ssh1t> UncheckedArray worked fine, nice thank you ! 🙂 |
20:13:54 | FromDiscord | <s3cur3th1ssh1t> Will also help me in the future for sure, didn't knew that |
20:49:56 | NimEventer | New thread by Angluca: Maybe 'Atlas' can learn from 'Bake', see https://forum.nim-lang.org/t/10795 |
21:26:01 | FromDiscord | <guttural666> any way to template this? maybe pass the expression to a template which it evaluates it and depending on the outcome prints stuff? https://media.discordapp.net/attachments/371759389889003532/1187506286066159708/image.png?ex=65972269&is=6584ad69&hm=3c2688ff4da6cef0d3841bb204a0513662a33dddb11d997cbbdf9f62db6b4f77& |
21:27:58 | FromDiscord | <Elegantbeef> `dumpToString` |
21:30:49 | FromDiscord | <guttural666> damn, there's so much useful stuff in Nim |
21:34:32 | FromDiscord | <Elegantbeef> Or you could use `std/strformat` |
21:45:56 | FromDiscord | <guttural666> also looks very useful, gonna pin that |
21:50:01 | FromDiscord | <guttural666> is there a c++ lambda equivalent in Nim? |
21:50:30 | FromDiscord | <Elegantbeef> Nim has first class closures |
21:54:13 | FromDiscord | <guttural666> hmmm, gonna have to take a look at those then |
21:55:13 | FromDiscord | <Elegantbeef> You just write a proc that captures |
21:55:50 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html> |
22:00:40 | FromDiscord | <albassort> In reply to @isofruit ""Green Threads in other": coroutines have been stunted |
22:03:07 | FromDiscord | <albassort> https://media.discordapp.net/attachments/371759389889003532/1187515616656101387/image.png?ex=65972b19&is=6584b619&hm=fbb3dc7c6dfe1180cfddec4d87d0011c4e93673e368d5fb007b65b698995dc60& |
22:16:47 | FromDiscord | <guttural666> In reply to @Elegantbeef "`dumpToString`": compiler says that number_requests is not defined, maybe I got something mixed up https://media.discordapp.net/attachments/371759389889003532/1187519054437687416/image.png?ex=65972e4d&is=6584b94d&hm=39e10d62db9d1eec50bac510b56247e93c6edfbda811cec4b43977787458e378& |
22:17:16 | FromDiscord | <Elegantbeef> I assume you're using a template |
22:17:24 | FromDiscord | <guttural666> yeah it's up there |
22:17:32 | FromDiscord | <Elegantbeef> I mean your image did not load yet |
22:17:37 | FromDiscord | <Elegantbeef> Stop sharing code as an image, thanks |
22:19:07 | FromDiscord | <Elegantbeef> What is `dbg_print`? |
22:21:23 | FromDiscord | <guttural666> sent a code paste, see https://play.nim-lang.org/#ix=html> |
22:23:59 | FromDiscord | <Elegantbeef> What's the actual compiler error? |
22:24:56 | FromDiscord | <guttural666> sent a code paste, see https://play.nim-lang.org/#ix=html> |
22:25:25 | FromDiscord | <Elegantbeef> Nice now check that line |
22:26:11 | FromDiscord | <guttural666> I did and it's just in the middle of a const string for a base url, which confused me |
22:26:25 | FromDiscord | <Elegantbeef> Why go to line 34 when you can go to line 68 |
22:28:57 | FromDiscord | <Phil> In reply to @Elegantbeef "*Stop sharing code as": I agree on so many levels |
22:33:00 | FromDiscord | <Elegantbeef> TIL phil lives high up in an apartment building |
22:33:47 | FromDiscord | <spoon__> sent a code paste, see https://play.nim-lang.org/#ix=html> |
22:34:06 | FromDiscord | <Elegantbeef> templates replace parameters verbatim |
22:34:17 | FromDiscord | <Elegantbeef> `kind: kind` emits `tkDiceD: tkDiceD` |
22:34:30 | FromDiscord | <spoon__> ah, that makes sense |
22:35:03 | FromDiscord | <spoon__> alright, it compiles now, thanks |
22:35:35 | FromDiscord | <spoon__> i swear every time i ask something here, it ends up being some stupid oversight |
22:36:07 | FromDiscord | <Elegantbeef> That gets so many people |
22:36:20 | FromDiscord | <Phil> In reply to @Elegantbeef "TIL phil lives high": The irony is that this is true |
22:36:32 | FromDiscord | <Phil> So I can agree on every single level of that building! |
22:36:37 | FromDiscord | <Elegantbeef> Not really irony as much as coincidental |
22:36:51 | FromDiscord | <Phil> I am buzzed, I don't know what words mean at this point |
22:37:08 | FromDiscord | <Elegantbeef> Arent germans supposed to tolerate achomahol? |
22:37:23 | FromDiscord | <Phil> Beef, we're nerds, that supercedes nationality |
22:37:55 | FromDiscord | <Phil> dict.cc trying to tell me that its supersedes |
22:38:04 | FromDiscord | <Phil> This makes no sense, down with english |
22:38:37 | FromDiscord | <Elegantbeef> Just pretend it's American english even though it's not |
22:39:07 | FromDiscord | <guttural666> sorry 😄 |
23:03:23 | * | Ekho quit (Quit: CORE ERROR, SYSTEM HALTED.) |
23:12:44 | * | Ekho joined #nim |
23:20:12 | * | advesperacit quit () |
23:24:56 | * | nyeaa49284230101 joined #nim |
23:25:19 | * | dza quit (Read error: Connection reset by peer) |
23:25:45 | * | m5zs7k quit (Quit: m5zs7k) |
23:26:05 | * | m5zs7k joined #nim |
23:26:15 | * | dza joined #nim |
23:26:32 | * | nyeaa4928423010 quit (Quit: Ping timeout (120 seconds)) |
23:38:37 | * | NimBot joined #nim |
23:43:20 | * | casaca joined #nim |