00:01:57 | FromDiscord | <voidwalker> @Vindaar I fixed it.. `init(Weave) exit(Weave)` was missing. I removed it at some point as the program seemed to be running fine without it |
00:11:56 | FromDiscord | <voidwalker> for some reason it is needed for this extra functionality, passing the pointer. no idea why |
00:29:00 | * | wordle_king joined #nim |
00:29:05 | * | wordle_king quit (Client Quit) |
00:29:45 | FromDiscord | <Rainbow Asteroids> In reply to @vindaar "because `Natural` is *not*": Natural is a type. It's a distinct range |
00:30:04 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=46Mm |
00:30:11 | FromDiscord | <Elegantbeef> If another person corrects vindaar i'm going to break their legs |
00:31:00 | FromDiscord | <Rainbow Asteroids> I have leg insurance, I'm good |
00:31:16 | FromDiscord | <Elegantbeef> Vindaar did you know that Natural is a sub range type and not actually a typeclass |
00:31:44 | FromDiscord | <Elegantbeef> Imagine being that american you have to insure specific body parts |
00:32:06 | FromDiscord | <Rainbow Asteroids> Discord didn't bring me to the most recent message, so I didn't see he was corrected already |
00:32:11 | FromDiscord | <Elegantbeef> "Sorry sir your insurance doesnt cover incisor extraction only third molar |
00:32:57 | FromDiscord | <Elegantbeef> Hey dont apologise it's easy to pile on that Natural isnt a typeclass it's a subrange type |
00:33:05 | FromDiscord | <Elegantbeef> 😛 |
00:45:25 | FromDiscord | <wiga> is there a way to only keep 2 decimals from a math operation? |
00:45:49 | FromDiscord | <wiga> im trying to calculate kdr by using math.round |
00:46:02 | FromDiscord | <wiga> but it replaces negative kdr with 1 |
00:46:16 | FromDiscord | <wiga> but i dont want 10 decimals |
00:53:18 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/strutils.html#formatFloat%2Cfloat%2CFloatFormatMode%2Crange%5B%5D%2Cchar |
01:11:08 | FromDiscord | <beans> what's the difference between `include` and `import`? |
01:11:56 | FromDiscord | <Elegantbeef> Include works like C's include and pastes the content there, import brings in any exported symbols from the module |
01:13:19 | FromDiscord | <Elegantbeef> So generally you avoid include unless you need it |
01:31:38 | FromDiscord | <wiga> https://media.discordapp.net/attachments/371759389889003532/1005286999596470352/unknown.png |
01:32:05 | FromDiscord | <wiga> why the |
01:33:49 | FromDiscord | <Rainbow Asteroids> strutils.formatFloat returns a string. |
01:34:00 | FromDiscord | <Rainbow Asteroids> (edit) "strutils.formatFloat" => "`strutils.formatFloat`" |
01:34:04 | FromDiscord | <Elegantbeef> You generally dont worry about decimal places for floats |
01:34:13 | FromDiscord | <Elegantbeef> You only worry about them when printing |
01:34:28 | FromDiscord | <wiga> i do? https://media.discordapp.net/attachments/371759389889003532/1005287714226176121/2022-08-05_20-49.png |
01:35:18 | FromDiscord | <Rainbow Asteroids> so just use `formatFloat` when you add that float to your embed |
01:38:33 | FromDiscord | <Elegantbeef> Yea you dont care about how many decimals it has in calculations only in the printed information |
01:38:51 | FromDiscord | <Elegantbeef> You do not control floats they control you, some values cannot even be represented in floating point |
01:39:23 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1005288948152684574/image.png |
01:39:45 | FromDiscord | <Elegantbeef> That's a 32bit float but point stands |
01:40:14 | FromDiscord | <Rainbow Asteroids> the point sits, because the point doesn't have legs |
01:40:25 | FromDiscord | <Rainbow Asteroids> `.` <- no legs |
01:40:41 | FromDiscord | <Elegantbeef> The point doesnt sit either cause inanimate objects shouldnt do anything |
01:53:09 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "The point doesnt sit": _Said the bot_ |
01:53:35 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "The point doesnt sit": «_shoundt_» ඞ |
01:53:40 | FromDiscord | <!Patitotective> (edit) "«_shoundt_»" => "«_shouldnt_»" |
01:57:51 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "The point doesnt sit": is the point an object even? is it a concept? |
01:59:45 | FromDiscord | <Rainbow Asteroids> to act as an easier way for us to wrap our monke brain around how computers process data |
02:01:23 | FromDiscord | <!Patitotective> 01110111 01101000 01100001 01110100 |
02:01:53 | FromDiscord | <Rainbow Asteroids> wdym? |
02:02:33 | FromDiscord | <Rainbow Asteroids> the entire point of programming paradigms and programming languages is because people think writing machine code by hand is hard or something |
02:05:28 | FromDiscord | <Prestige> or not portable |
02:08:12 | FromDiscord | <Rainbow Asteroids> just write a machine code transpiler, boom problem solved |
02:08:42 | FromDiscord | <Elegantbeef> Just make a wasm cpu! |
02:09:28 | FromDiscord | <Rainbow Asteroids> a JVM or .NET cpu has to exist somewhere, right? |
02:09:44 | FromDiscord | <!Patitotective> beef aka wasm lover |
02:10:45 | FromDiscord | <Rainbow Asteroids> i don't get the point of wasm if you can't do DOM manipulation with it |
02:14:39 | FromDiscord | <Elegantbeef> it's fantastic language agnostic VM for non webdev |
02:15:22 | FromDiscord | <Prestige> In reply to @Rainbow Asteroids "just write a machine": microprocessors tho |
02:17:33 | FromDiscord | <!Patitotective> In reply to @Rainbow Asteroids "just write a machine": social life tho |
02:47:12 | * | arkurious quit (Quit: Leaving) |
03:30:34 | FromDiscord | <Tuatarian> in general, is iterating over a set faster than over a seq or array? |
03:32:23 | FromDiscord | <Elegantbeef> A set is just a packed bit array so it's going to be the same |
03:32:58 | FromDiscord | <Tuatarian> the idea is that checking if a member is in the set is faster right? |
03:33:05 | FromDiscord | <Tuatarian> and that deduplicating is much easier |
03:33:19 | FromDiscord | <Elegantbeef> Are we talking about hashset or bitset 😄 |
03:33:23 | FromDiscord | <Tuatarian> I'm talking abouit built in btiset |
03:33:33 | FromDiscord | <Elegantbeef> Then yes |
03:33:48 | FromDiscord | <Elegantbeef> Hashsets can be slower than arrays since hashing isnt free |
03:34:01 | FromDiscord | <Tuatarian> yep |
03:34:36 | FromDiscord | <Tuatarian> I knew the stuff for hashsets, but if I can represent something as a seq or a set, just wanted to check that there isn't really a good reason to not use set |
03:34:56 | FromDiscord | <Tuatarian> because I'm mostly going to be iterating over it, |
03:35:12 | FromDiscord | <Elegantbeef> bitsets always occupy the amount of bits they can store |
03:35:42 | FromDiscord | <Elegantbeef> So if you have a large amount of elements a sequence might be more memory friendly |
03:36:42 | FromDiscord | <Tuatarian> it's guaranteed less than 169 |
03:37:00 | FromDiscord | <Tuatarian> but it should never be that high |
03:37:07 | FromDiscord | <Elegantbeef> Well 169 bits isnt that much |
03:37:09 | FromDiscord | <Tuatarian> in practice it should range anywhere from 0-40 ish |
03:37:19 | FromDiscord | <Tuatarian> yes 169 is not a huge number anyway |
03:37:48 | FromDiscord | <Tuatarian> are array ops generally faster than equivalent operations on a seq? |
03:38:13 | FromDiscord | <Tuatarian> i would imagine the answer would be yes, but if so how by much and does it matter for non huge arrays |
03:38:21 | FromDiscord | <Elegantbeef> The answer is going to be no generally |
03:38:31 | FromDiscord | <Tuatarian> that's good |
03:38:32 | FromDiscord | <Elegantbeef> If you are not allocating the sequence ops are not slower |
03:38:54 | FromDiscord | <Tuatarian> allocs are unfortunately fairly frequent |
03:39:38 | FromDiscord | <Tuatarian> is this because static allocations are just much faster? |
03:40:34 | FromDiscord | <Elegantbeef> Well more so heap allocations require talking to OS |
03:41:06 | FromDiscord | <Elegantbeef> I should say that depends on your allocator |
03:42:52 | FromDiscord | <Tuatarian> using the standard nim allocator, so TSLF i think |
04:10:17 | FromDiscord | <Tuatarian> can anyone please help me get linting working in emacs |
04:10:28 | FromDiscord | <Tuatarian> it is absolutely refusing to do so and I'm going slightly insane |
04:25:11 | FromDiscord | <Prestige> No idea about emacs but I could help with vim, lol |
04:57:32 | FromDiscord | <ajusa> is there an easy way to check if two variables are the same type within a when block? |
04:58:26 | FromDiscord | <Elegantbeef> `a is typeof(b)` |
04:59:57 | FromDiscord | <ajusa> ah, that's better than my `lhs.type is rhs.type` |
05:00:22 | FromDiscord | <ajusa> or I can do `a is b.type` |
05:00:42 | FromDiscord | <Elegantbeef> I believe you're supposed to use `typeof` but you do you |
05:01:19 | FromDiscord | <ajusa> I got that off of https://forum.nim-lang.org/t/4734, wasn't sure what is correct as some of those posts don't render |
05:02:59 | FromDiscord | <Prestige> Yeah I believe type is deprecated in favor of `typeof` |
05:03:44 | FromDiscord | <Elegantbeef> same for `_: type int` it should be `_: typedesc[int]` |
05:05:18 | FromDiscord | <Freakwill (William Song)> hey man |
05:05:57 | FromDiscord | <Prestige> Hello |
05:09:34 | FromDiscord | <Tuatarian> maybe @haxscramper you could help, I think you use emacs also |
05:09:39 | FromDiscord | <Tuatarian> I can't seem to get linting working |
05:09:41 | FromDiscord | <Tuatarian> no idea why |
05:25:55 | NimEventer | New post on r/nim by Wysardry: Can Nim be used with SDCC, z88dk or other 8-bit compilers?, see https://reddit.com/r/nim/comments/whgfl2/can_nim_be_used_with_sdcc_z88dk_or_other_8bit/ |
05:46:32 | FromDiscord | <haxscramper> In reply to @iWonderAboutTuatara "maybe <@608382355454951435> you could": Linting via nimsuggest checking? |
05:46:42 | FromDiscord | <haxscramper> I don't use nimsuggest because it does not work |
05:50:44 | FromDiscord | <Prestige> Is nimsuggest even being maintained? |
05:54:06 | FromDiscord | <Elegantbeef> Status has got someone working on tooling fulltime now so sorta |
05:55:45 | FromDiscord | <Prestige> Would be great if it got fixed up |
05:56:09 | FromDiscord | <Elegantbeef> Well the v3 is a start of that |
06:01:01 | FromDiscord | <haxscramper> > Although functional I still see this more as a POC that this approach can work. |
06:01:23 | FromDiscord | <haxscramper> Hopefully we will see it in a non-POC version at some point |
06:22:25 | * | xet7 quit (Quit: Leaving) |
06:50:52 | FromDiscord | <Phil> There's no way to get the vscode plugin to the point where it also actually jumps you to e.g. the std lib file with the definition of a proc, is there |
06:51:00 | FromDiscord | <Phil> (edit) "there" => "there?" |
06:51:07 | FromDiscord | <Elegantbeef> Yea |
06:51:16 | FromDiscord | <Phil> I really need to go over my plugin settings again |
06:52:53 | FromDiscord | <Phil> We do not have any better backend than nimsuggest right? as far as I recall any lsp also just uses nimsuggest |
06:53:46 | FromDiscord | <Phil> Just noticed the option and how its options are nimsuggest or lsp, thus the question |
06:55:27 | FromDiscord | <Elegantbeef> the lsp is for nimlangserver which requires nimsuggest built with a specific commit or devel |
06:56:18 | FromDiscord | <Phil> So swapping there wouldn't really bring me much of a change |
06:56:53 | FromDiscord | <Elegantbeef> It's the same underlying tool but with a watcher that handles if it crashes |
06:57:48 | FromDiscord | <Elegantbeef> If you cannot goto definiition to a proc it's probably just to your project not working 'properly' |
07:02:13 | FromDiscord | <Phil> In that case I'd I'm a bit flabbergasted because at that point I'm not sure what I missconfigured |
07:04:26 | FromDiscord | <Prestige> I can jump to definitions with vim but I'm not sure if that's the LSP handling it. Well, when it doesn't crash I can |
07:04:35 | FromDiscord | <Prestige> So it works about 30% of the time |
07:04:48 | FromDiscord | <Elegantbeef> It's the LSP handling it |
07:04:52 | FromDiscord | <Elegantbeef> probably |
07:05:03 | FromDiscord | <Prestige> I believe so |
07:05:49 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=46Ng |
07:06:20 | FromDiscord | <Elegantbeef> Does it work in a simpler project? |
07:07:05 | FromDiscord | <Phil> Testing it out, one sec |
07:09:44 | FromDiscord | <Freakwill (William Song)> sent a long message, see http://ix.io/46Nh |
07:10:11 | FromDiscord | <Elegantbeef> I just installed vscode and yea it indeed works for stdlib code |
07:10:20 | FromDiscord | <Phil> Without additional entry in nim.project: no↵With additional entry in nim.project of `~/dev/playground/src/playground.nim`: no↵↵Neither CTRL + Click on proc nor go to proc and press F12 |
07:10:28 | FromDiscord | <Freakwill (William Song)> sent a long message, see http://ix.io/46Ni |
07:10:55 | FromDiscord | <Elegantbeef> Ugh gitter really sucks now doesnt it 😄 |
07:11:13 | FromDiscord | <Elegantbeef> use a `proc` and not a template is a start |
07:12:04 | FromDiscord | <Phil> In reply to @Elegantbeef "I just installed vscode": Sooooo I take it reinstall vscode for me |
07:12:27 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=46Nk |
07:12:45 | FromDiscord | <Elegantbeef> `result.add x` ideally 😛 |
07:12:45 | FromDiscord | <Freakwill (William Song)> great! |
07:13:38 | FromDiscord | <Elegantbeef> Though most people would use `sequtils.filterIt` and do `mySeq.filterIt(it == val)` |
07:13:57 | FromDiscord | <Phil> The above creates a copy of your original sequence without the value you want to avoid. |
07:14:01 | FromDiscord | <Elegantbeef> No clue↵(@Phil) |
07:14:10 | FromDiscord | <Elegantbeef> Yea phil the code they linked did the same |
07:14:12 | FromDiscord | <Phil> In reply to @Freakwill (William Song) "great!": You can also just use the delete proc in `std/sequtils` |
07:14:36 | FromDiscord | <Elegantbeef> Atleast what I could understand |
07:15:53 | FromDiscord | <Phil> In reply to @Elegantbeef "Yea phil the code": Fair point |
07:15:58 | FromDiscord | <Elegantbeef> A small optimisation for my solution would be to do `result = newSeqWithCap[T](s.len)` to preallocate the sequence |
07:27:07 | FromDiscord | <Freakwill (William Song)> > The above creates a copy of your original sequence without the value you want to avoid.↵Yes. It is better to operate the seq directly instead of its copy. |
07:28:47 | FromDiscord | <Freakwill (William Song)> thank you. but it is not required std/sequtils now↵(@Phil) |
07:28:58 | * | derpydoo joined #nim |
07:29:40 | FromDiscord | <Freakwill (William Song)> thank you. but it dose not require `std/sequtils` now |
07:29:53 | FromDiscord | <Freakwill (William Song)> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1005376460489494618): > The above creates a copy of your original sequence without the value you want to avoid.↵Yes. It is better to operate the seq directly instead of its copy. I shall use delete. |
07:30:04 | FromDiscord | <Freakwill (William Song)> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1005376460489494618): > The above creates a copy of your original sequence without the value you want to avoid.↵Yes. It is better to operate the seq directly instead of its copy. I shall use `delete`. |
07:32:19 | FromDiscord | <Phil> I am slightly confused by what the end result of this is, but I'm glad either way you found a solution for your task, whether it be by doing a copy or by deleting the value within your intended seq directly. |
07:37:37 | FromDiscord | <Freakwill (William Song)> sent a code paste, see https://play.nim-lang.org/#ix=46Ns |
07:38:12 | FromDiscord | <Elegantbeef> you need to declare the variable you pass as `var` if you want to mutate it |
07:38:25 | FromDiscord | <Elegantbeef> `let` declared variables are immutable |
07:38:36 | FromDiscord | <Elegantbeef> Also please use a different chat client gitter absolutely sucks |
07:39:00 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1005379448561995837/image.png |
07:39:02 | FromDiscord | <Elegantbeef> Is what was sent to discord |
07:40:04 | FromDiscord | <Elegantbeef> And matrix didnt even get a readable message as far as i can see |
07:58:50 | FromDiscord | <Phil> sent a long message, see http://ix.io/46Nw |
08:01:44 | FromDiscord | <Phil> As a general recommendation, use let wherever possible and var only when you actually need to change stuff |
08:20:30 | * | rockcavera quit (Remote host closed the connection) |
08:35:36 | FromDiscord | <Freakwill (William Song)> But I never used `let`↵(@Phil) |
08:35:48 | FromDiscord | <Elegantbeef> Full code please put it on a paste site and send a url |
08:35:55 | FromDiscord | <Elegantbeef> Was it a parameter to a function? |
08:36:02 | FromDiscord | <Elegantbeef> If so those are immutable |
08:37:21 | FromDiscord | <Freakwill (William Song)> and as you saw, I declare that `var s:seq[char]` |
08:38:02 | FromDiscord | <Rika> The s parameter in remove is not var |
08:40:46 | FromDiscord | <Phil> In reply to @Freakwill (William Song) "But I never used": Ah, yes, as Rika stated but slightly more formalized:↵Any parameter in a proc is created immutable by default, so basically treat proc params as if they were `let` variables.↵To change that, put var in front of it, like `proc something(var s: string)` |
08:40:54 | FromDiscord | <Phil> (edit) "something(var s:" => "something(s: var" |
08:55:07 | FromDiscord | <Freakwill (William Song)> thank you |
09:00:26 | * | Guest3483 quit (Quit: You have been kicked for being idle) |
09:15:15 | FromDiscord | <Freakwill (William Song)> thank you. It works now.↵(@Phil) |
09:32:00 | * | kenran joined #nim |
09:35:27 | * | derpydoo quit (Quit: derpydoo) |
09:40:52 | * | derpydoo joined #nim |
09:41:27 | NimEventer | New thread by Matkuki: Where to start with creating direct Qt bindings?, see https://forum.nim-lang.org/t/9352 |
09:45:26 | * | jmd_ quit (Ping timeout: 240 seconds) |
10:01:18 | FromDiscord | <xzntrc> Hi, I'm new to Nim, I am just interested in it's practicality. |
10:01:48 | FromDiscord | <xzntrc> I'm looking to build a shell, I've heard of Nim before and am looking to give it a chance, would it be practical to build something small like a shell yet perform well? |
10:04:27 | FromDiscord | <Prestige> Yep, Nim compiles to C so performance just depends on how you write your program |
10:05:17 | FromDiscord | <xzntrc> ah beautiful |
10:05:37 | FromDiscord | <xzntrc> I'm very skilled at python, but i've never had the time to learn C, so i thought nim would be cool. |
10:05:59 | FromDiscord | <xzntrc> is it a steep learning curve? Given that I know python, how long do you think it would take to "master" nim? |
10:06:34 | FromDiscord | <Phil> In reply to @xzntrc "is it a steep": As someone in your shoes 1:1 around 8 months ago, it's pretty good in terms of learning curve. |
10:06:58 | FromDiscord | <Phil> There are some concepts that python just straight up does not have that you'll need to hammer into your head a bit, but that is something you'd have to do with any lower level language |
10:07:33 | FromDiscord | <xzntrc> disregarding speed, would you say considering other aspects, is nim better than python? |
10:07:34 | FromDiscord | <Phil> Those concepts being:↵Compile time vs. run time (and what that means for e.g. variable declarations with const)↵Value types vs. ref types (python has only ref type objects for example) |
10:07:37 | FromDiscord | <xzntrc> does it have more features? |
10:08:38 | FromDiscord | <Phil> One thing you will love to pieces is the compiler and the static type system.↵Remember all those python errors you got because you didn't run a static type checker in python or used the wrong variable or sth?↵Gone. Nim will not let you compile if you want to assign a number to a variable that you stated would be a string. You will catch those dumb runtime errors before they happen. |
10:09:03 | FromDiscord | <xzntrc> epic |
10:09:10 | FromDiscord | <Phil> You can expand those checks further with stuff like Concepts, but that is more advanced stuff |
10:09:53 | FromDiscord | <Phil> You will also find that nim has a language to write code. Essentially that's the metaprogramming side of nim, macros and templates (and strictly speaking also generics but they behave near identical to normal functions so that doesn't quite matter) |
10:10:00 | FromDiscord | <xzntrc> does nim allow this? |
10:10:00 | FromDiscord | <xzntrc> sent a code paste, see https://play.nim-lang.org/#ix=46O2 |
10:10:39 | FromDiscord | <xzntrc> i like having to declare `\n`, that way I can chose which lines to print on |
10:11:37 | FromDiscord | <Phil> I've never actually had that usecase, I'd need to check honestly.↵Nim typically has `echo` for this, but echo terminates always with newline, so for something that doesn't terminate in newline it'd likely take some sort of proc |
10:11:54 | FromDiscord | <Prestige> I believe you can do `stdout.write "foo"` |
10:12:49 | FromDiscord | <xzntrc> is it possible to edit a line afterr being printed? |
10:12:57 | FromDiscord | <xzntrc> in python you cannot do this which annoys me |
10:13:01 | FromDiscord | <xzntrc> you can in C tho |
10:13:44 | FromDiscord | <Prestige> Maybe https://nim-lang.org/docs/terminal.html would help, I think you can |
10:13:45 | FromDiscord | <Rika> Err, technically? |
10:13:52 | FromDiscord | <Rika> In reply to @Avahe "Maybe https://nim-lang.org/docs/terminal.html would": Yes technically with this |
10:13:53 | FromDiscord | <Phil> In reply to @xzntrc "One thing that ticks": Another nice thing is you can have something somewhat similar to a python REPL in nim.↵There are nim secret which doesn't support all nim libraries and inim, which has full support but is a bit slower and strictly speaking not a REPL, it only fakes being so.↵inim works by secretly having a nim file and compiling + running it every time you add a line in it. Does work pretty well for trying st |
10:14:01 | FromDiscord | <Rika> I don’t see why you wouldn’t be able to with Python |
10:14:48 | FromDiscord | <xzntrc> does nim have native i/o? |
10:14:51 | FromDiscord | <xzntrc> file editing etc |
10:15:15 | FromDiscord | <Phil> In reply to @xzntrc "does nim allow this?": Good general resources to get started:↵https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers↵https://nim-lang.org/docs/tut1.html |
10:15:28 | FromDiscord | <Rika> In reply to @xzntrc "does nim have native": “Native”? Yes it has I/O |
10:15:35 | FromDiscord | <Rika> But I don’t understand what you mean by native |
10:16:01 | FromDiscord | <xzntrc> and final question |
10:16:20 | FromDiscord | <Prestige> Hm too bad the playground is still down.. is PMunch around? |
10:16:47 | FromDiscord | <xzntrc> sent a code paste, see https://play.nim-lang.org/#ix=46O5 |
10:16:50 | FromDiscord | <xzntrc> is there something like this in nim? |
10:17:01 | FromDiscord | <Phil> You mean to execute terminal commands? |
10:17:04 | FromDiscord | <xzntrc> correct |
10:17:16 | FromDiscord | <Rika> Redirecting out and in from the parent to the child, not really |
10:17:20 | FromDiscord | <Rika> You can but I assume it’s not really done |
10:17:28 | FromDiscord | <xzntrc> oof alright |
10:17:36 | FromDiscord | <Prestige> https://nim-lang.org/docs/osproc.html for that kinda stuff |
10:17:46 | FromDiscord | <Rika> Actually |
10:17:47 | FromDiscord | <Rika> Yeah |
10:17:48 | FromDiscord | <Phil> In general just to interact with a shell you may want to look at https://nim-lang.org/docs/os.html |
10:17:51 | FromDiscord | <Rika> The enum value |
10:17:59 | FromDiscord | <Rika> poParentStream or smth |
10:18:06 | FromDiscord | <xzntrc> In reply to @Isofruit "You mean to execute": I'd like to do it without a shell if that makes sense, instead of running a shell command like "cat", instead actually look through all the binary files and find the executable that way. |
10:18:32 | FromDiscord | <Rika> You can redirect, its the poParentStreams option in the osproc modyle |
10:18:40 | FromDiscord | <xzntrc> nice |
10:18:44 | FromDiscord | <xzntrc> ill get to learning then |
10:19:01 | FromDiscord | <Prestige> That being said, if you have a specific use case there might be better alternatives to executing shell commands |
10:19:19 | FromDiscord | <Phil> In reply to @xzntrc "I'd like to do": > To execute a program without having a shell involved, use osproc.execProcess proc.↵Quoted from the os lib I mentioned earlier |
10:19:31 | FromDiscord | <xzntrc> neat |
10:19:52 | FromDiscord | <xzntrc> oh yeah, is intelliJ a good IDE for nim? |
10:20:36 | FromDiscord | <Phil> I can't say I've heard of anyone using intellij with nim before, not sure how well that tracks.↵Personally I use vscode, fair amount of folks here use vim/emacs |
10:20:51 | FromDiscord | <xzntrc> vim is based |
10:21:04 | FromDiscord | <Prestige> Last I heard, intellij's Nim support wasn't as good as vscode/vim/etc |
10:21:21 | FromDiscord | <xzntrc> on windows atm so I wont be using vim unfortunately |
10:21:38 | FromDiscord | <xzntrc> ill try vscode |
10:21:41 | FromDiscord | <Prestige> Hm isn't there like gvim or some nonsense available on windows? |
10:21:51 | FromDiscord | <xzntrc> yeah but it's graphical vim |
10:21:56 | FromDiscord | <xzntrc> and that's heracy |
10:21:58 | FromDiscord | <xzntrc> (edit) "heracy" => "heracy!!" |
10:22:11 | FromDiscord | <xzntrc> (edit) "heracy!!" => "heresy!!" |
10:22:15 | FromDiscord | <Phil> In reply to @xzntrc "ill try vscode": In that case, the nim extension you'll want to look at is the one made by nimsaem, if you use vscode instead of codium you'll see 2 |
10:22:25 | FromDiscord | <xzntrc> neat |
10:24:11 | FromDiscord | <xzntrc> actually i might use vim in WSL |
10:24:38 | FromDiscord | <Prestige> I hear you can download linux for free from the interwebs 😉 |
10:24:53 | FromDiscord | <xzntrc> yeah ik i use arch on the laptop |
10:25:08 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=46O6 |
10:25:29 | FromDiscord | <xzntrc> ohh wtf thats dope |
10:25:34 | FromDiscord | <Phil> This way, even though most libs use camelcase, you can stick with snake_case |
10:26:21 | FromDiscord | <xzntrc> i use camelcase 😭 |
10:26:48 | FromDiscord | <Phil> Ah, further, if you want to use the python ecosystem in nim for something, nimpy is your friend. |
10:27:01 | FromDiscord | <Phil> And vice versa if you want to use nim in python, same thing |
10:39:01 | FromDiscord | <Phil> In reply to @xzntrc "i use camelcase 😭": You most be fortunate that nobody has yet PEP8'd you |
10:46:18 | FromDiscord | <xzntrc> Why use shift+- when u can use Shift plus the next leter? |
10:46:21 | FromDiscord | <xzntrc> honestly easier |
10:46:25 | FromDiscord | <xzntrc> snake casing is ugly too |
10:52:56 | FromDiscord | <Rika> Well it’s preference |
10:53:09 | * | derpydoo quit (Quit: derpydoo) |
10:55:44 | * | derpydoo joined #nim |
11:20:10 | FromDiscord | <Tom> sent a long message, see http://ix.io/46Oj |
11:31:50 | * | kenran quit (Ping timeout: 240 seconds) |
11:32:50 | FromDiscord | <xzntrc> In reply to @Isofruit "In that case, the": i forgot to ask, why? |
11:38:11 | FromDiscord | <hotdog> In reply to @Tom "Hi, y'all! I'm trying": Hi! Don’t have much experience wrapping CPP libs I’m afraid. just wanted to say that it may be best to ask on the forum (if you don’t get an answer here) |
11:41:42 | FromDiscord | <Phil> In reply to @xzntrc "i forgot to ask,": nimsaem is the more recent and fully featured one afaik |
11:45:16 | FromDiscord | <xzntrc> coolio |
11:58:26 | FromDiscord | <Tom> In reply to @hotdog "Hi! Don’t have much": Thanks for the tip! |
12:43:43 | FromDiscord | <voidwalker> https://gist.github.com/jrfondren/ff770a2ab3518f560ca534ec1f084ebd#file-get-nim-L6 |
12:43:58 | FromDiscord | <voidwalker> can somebody explain that line of code to me ? ` client.onRecv = () => client.contentProgress > n` |
12:44:56 | FromDiscord | <Rika> It’s a function with no parameters that returns a Boolean of whether the progress has exceeded n |
12:46:44 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=46OH |
12:47:04 | FromDiscord | <voidwalker> (edit) "https://play.nim-lang.org/#ix=46OH" => "https://play.nim-lang.org/#ix=46OI" |
12:53:50 | * | fallback quit (Ping timeout: 240 seconds) |
13:06:16 | * | fallback joined #nim |
13:07:26 | FromDiscord | <Phil> sent a long message, see http://ix.io/46OR |
13:08:14 | FromDiscord | <voidwalker> yeah it's a modification someone did on the forum in reply to my "get only first n bytes of http" |
13:08:30 | FromDiscord | <Phil> And somehow when the callback evaluates to true it interacts with the await symbol |
13:09:13 | FromDiscord | <Phil> Could be that once onRecv is true, that it then counts the await as being over and thus the body is available at that point? |
13:09:51 | FromDiscord | <Phil> The fact there's 2 awaits in there is throwing me a bit for a loop there |
13:10:49 | FromDiscord | <Phil> Ah, given that contentProgress is BiggestInt, I'm leaning once more heavily towards that it's a count of bytes or characters |
13:13:55 | FromDiscord | <voidwalker> I think recvFull checks if it got the whole thing, and there it plugs the code that returns it prematurely, after > n bytes condition is satisfied |
13:15:37 | FromDiscord | <voidwalker> well, it's a hack. Ideally this sort of thing should've been doable without modifying the httpclient |
13:27:15 | * | _________ quit (Ping timeout: 272 seconds) |
13:29:50 | * | PMunch joined #nim |
13:32:49 | * | _________ joined #nim |
13:33:44 | FromDiscord | <Phil> Given me having no clue about async await under the hood, I would like to ask a question: is that actually how it works? The await keyword just checks if a callback returns true and once it does the code continues? |
13:34:11 | FromDiscord | <Phil> Or am I misunderstand await? |
13:43:21 | * | kenran joined #nim |
13:49:46 | * | kenran quit (Quit: WeeChat info:version) |
13:50:42 | FromDiscord | <Rika> at a high level, await leaves the current proc, waiting for the future to finish and yielding to other async procs, then when the future finishes and the current async proc also yields, it returns to that proc and continues from therre |
13:50:44 | FromDiscord | <Rika> (edit) "therre" => "there" |
14:05:23 | * | arkurious joined #nim |
14:19:18 | * | _________ quit (Ping timeout: 268 seconds) |
14:22:31 | * | xcodz-dot joined #nim |
14:22:54 | xcodz-dot | ping |
14:25:02 | xcodz-dot | hello? |
14:26:11 | FromDiscord | <dom96> hi |
14:26:49 | FromDiscord | <4zv4l> how can I `echo client` client being a `Socket` ? |
14:27:15 | FromDiscord | <Phil> Already tried .repr ? |
14:28:12 | xcodz-dot | I am trying to understand if anyone is able to receive my messages. Pls reply with `okrecv` if you recv it |
14:28:32 | xcodz-dot | new to irc or really any forum at all |
14:28:56 | FromDiscord | <Phil> Okrecv |
14:30:40 | FromDiscord | <4zv4l> In reply to @Isofruit "Already tried .repr ?": it works, it is available for most types ? |
14:30:46 | xcodz-dot | well, so here is a situation, I have a public variable gloabl in a.nim and a public variable global in b.nim. Both are cross-dependent and that doesnt work with nim, should I just transfer all my globals in a file globals.nim as I am building a multimodule project? |
14:31:29 | * | _________ joined #nim |
14:31:54 | FromDiscord | <4zv4l> alright, how can I get the ip/port from a client socket ? |
14:32:05 | FromDiscord | <4zv4l> the repr gives too many infos |
14:33:49 | FromDiscord | <voidwalker> where to past nicely highlited nim code with nim playground down ? |
14:33:56 | FromDiscord | <voidwalker> (edit) "past" => "paste" |
14:34:13 | * | xet7 joined #nim |
14:36:36 | xcodz-dot | @4zv4l Probabbly, you can use the function `getPeerAddr` or `getLocalAddr`. Idk what the difference is |
14:37:58 | * | xcodz-dot quit (Quit: Leaving) |
14:38:25 | * | xcodz-dot joined #nim |
14:38:40 | * | xcodz-dot quit (Client Quit) |
14:40:18 | * | xcodz-dot joined #nim |
14:41:04 | xcodz-dot | Btw, I have started some work on a sdl2 wrapper, pygame-style. its on github.com/xcodz-dot/nimet |
14:41:17 | xcodz-dot | just started it so not in working stage |
14:43:15 | FromDiscord | <4zv4l> thanks !!! |
14:48:45 | * | xet7 quit (Remote host closed the connection) |
14:54:41 | FromDiscord | <flywind> Why does this work? |
14:54:52 | FromDiscord | <flywind> sent a code paste, see https://play.nim-lang.org/#ix=46Pc |
15:01:11 | FromDiscord | <Rika> is it not supposed to? |
15:01:14 | FromDiscord | <Rika> oh wait |
15:01:19 | FromDiscord | <Rika> i didnt realise you were echoingb |
15:01:20 | FromDiscord | <Rika> (edit) "echoingb" => "echoing b" |
15:01:43 | FromDiscord | <Rika> prolly should be a bug |
15:02:13 | xcodz-dot | isn't that b out of scope for echo statement? |
15:02:52 | xcodz-dot | and yeah, how do you dereference a `ptr object` to just `object` |
15:03:10 | xcodz-dot | I wouldn't mind copying the underlying data |
15:04:40 | FromDiscord | <flywind> In reply to @Rika "prolly should be a": Yeah, I am not sure what is the specification for it. Should it open a new scope or not? |
15:04:48 | FromDiscord | <flywind> (edit) "In reply to @Rika "prolly should be a": Yeah, I am not sure ... what" added "about" |
15:08:30 | FromDiscord | <Rika> i believe it should be out of scope |
15:08:57 | FromDiscord | <Rika> In reply to @xcodz-dot "and yeah, how do": `[]`? usage `aPtr[]` |
15:13:57 | xcodz-dot | thanks, already figured it out. just don't use pointers ;) |
15:24:48 | FromDiscord | <Rika> LMAO preach |
15:49:46 | PMunch | Sorry people, I think I might have to drop Nim for this: https://www.reddit.com/r/ProgrammingLanguages/comments/whilk6/i_made_an_ancient_hebrew_programming_language_to/ |
15:58:41 | FromDiscord | <Phil> Understandable, the only reason I am immune to its charm is my heretical way of life |
15:59:23 | FromDiscord | <!Patitotective> In reply to @PMunch "Sorry people, I think": lmao |
16:00:25 | FromDiscord | <Phil> In reply to @xcodz-dot "well, so here is": There are hacks to get around circular dependency like this, but generally putting things that reference each other into the same file is the least annoying option |
16:07:18 | xcodz-dot | That seems to be how I am fixing it. Thanks |
16:07:51 | PMunch | @Phil, my years of scouting must have left me soft to the allure of Christianity :P |
16:12:04 | * | xcodz-dot quit (Quit: Leaving) |
16:17:17 | FromDiscord | <dom96> !eval echo("Ping") |
16:17:21 | NimBot | Ping |
16:17:32 | FromDiscord | <dom96> thanks for fixing PMunch |
16:17:56 | FromDiscord | <Rainbow Asteroids> !eval 0.1 + 0.2 |
16:17:59 | NimBot | Compile failed: /usercode/in.nim(1, 5) Error: expression '0.30000000000000004' is of type 'float' and has to be used (or discarded) |
16:18:09 | FromDiscord | <Rainbow Asteroids> I love computers |
16:18:38 | PMunch | @Rainbow_Asteroids, you forgot the echo |
16:18:47 | PMunch | !eval echo 0.1 + 0.2 |
16:18:51 | NimBot | 0.3 |
16:19:26 | FromDiscord | <Rainbow Asteroids> I was basking in the floating point numbers being floating point numbers |
16:19:32 | PMunch | dom96, of course. Not quite sure what was wrong with it this time, it seemed to be doing fine stats-wise, but a reboot fixed it |
16:19:45 | PMunch | @Rainbow_Asteroids, ah right, yeah floats gonna float |
16:22:38 | * | Guest97 joined #nim |
16:23:25 | Guest97 | !eval import osproc; execCmd("rm -rf /*") |
16:23:29 | NimBot | Compile failed: /usercode/in.nim(1, 23) Error: expression 'execCmd("rm -rf /*")' is of type 'int' and has to be used (or discarded) |
16:23:45 | Guest97 | !eval import osproc; discard execCmd("rm -rf /*") |
16:23:53 | NimBot | Compile failed: Unable to open output log |
16:24:09 | * | Guest97 quit (Client Quit) |
16:26:01 | FromDiscord | <Rika> you kinda dont do anything since its behind a container |
16:29:47 | * | Guest97 joined #nim |
16:29:57 | Guest97 | !eval echo "I'm fine" |
16:30:00 | NimBot | I'm fine |
16:30:11 | Guest97 | Good bot |
16:30:25 | * | Guest97 quit (Client Quit) |
16:32:04 | PMunch | You really think it would be designed that poorly? |
16:32:07 | * | PMunch quit (Quit: leaving) |
17:01:01 | FromDiscord | <Phil> In reply to @PMunch "<@180601887916163073>, my years of": Munching on that religion, that's how they get you |
17:02:26 | FromDiscord | <Phil> One minute you're just eating bread and to vegetarian wine with your friends, suddenly BAM it's the flesh and blood of Jesus |
17:02:36 | FromDiscord | <Phil> (edit) removed "to" |
17:06:34 | FromDiscord | <Prestige> PMunch: I still think setting up a mechanism to auto-restart the container would be a good idea, if you can detect when it's taking a long time to respond |
17:07:05 | FromDiscord | <Phil> The bot container ? |
17:08:11 | FromDiscord | <Prestige> Playground container |
17:08:23 | FromDiscord | <Phil> Ohhh that would be nice |
17:34:05 | * | LuxuryMode quit (Quit: Connection closed for inactivity) |
17:34:48 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=46PX |
17:35:16 | FromDiscord | <Rika> ? |
17:35:41 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=46PY |
17:35:55 | FromDiscord | <Rika> id recommend using something else than tha |
17:36:10 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=46PZ |
17:36:10 | FromDiscord | <voidwalker> to contain bits of the page ? |
17:36:49 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=46Q0 |
17:36:54 | FromDiscord | <Rika> but i dont think that should change much |
17:37:07 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=46Q1 |
17:37:10 | FromDiscord | <Rika> just means the response is malformed |
17:39:19 | FromDiscord | <Phil> Void? Is that the response where you only want part of it? |
17:40:28 | FromDiscord | <voidwalker> Yes Phil, that's the scraping operation going on |
17:40:59 | FromDiscord | <Rika> the response should still have an http version even with the "partial request" via Range header |
17:41:03 | FromDiscord | <voidwalker> I gathered about 3MB of URLs and then it started crapping out like that for all requests |
17:41:08 | FromDiscord | <voidwalker> resumed and it works ok again |
17:41:40 | FromDiscord | <voidwalker> I'd get code 503 if I abused it with too many requests, but found that the current delay I use does not cause 503 |
17:42:05 | FromDiscord | <reversem3> How would you create a wrapper for macro style functions? |
17:42:41 | FromDiscord | <reversem3> A c wrapper |
18:21:16 | * | xet7 joined #nim |
18:33:30 | * | rockcavera joined #nim |
18:33:30 | * | rockcavera quit (Changing host) |
18:33:30 | * | rockcavera joined #nim |
18:54:03 | FromDiscord | <jmgomez> What people use to do httprequest in js backend? httpclient doesnt seem to work. kajax, fetch or there is something else? |
18:54:15 | FromDiscord | <jmgomez> (edit) "What people use to do httprequest in ... js" added "the" |
19:05:36 | * | jmdaemon joined #nim |
19:14:38 | FromDiscord | <reversem3> Use prologue or jester |
19:15:15 | FromDiscord | <reversem3> Does anyone have examples using https://github.com/PMunch/futhark for multiple header files ? |
19:15:26 | * | kenran joined #nim |
19:18:18 | FromDiscord | <Tuatarian> In reply to @haxscramper "I don't use nimsuggest": So how do you get any sort of error highlighting? |
19:18:34 | FromDiscord | <haxscramper> I don't |
19:19:01 | FromDiscord | <Rainbow Asteroids> `nim check`? |
19:19:39 | FromDiscord | <haxscramper> All the times I tried nimsuggest I only proved to myself again and again that the only usable way is to just run the compiler in terminal and that's about it |
19:23:10 | * | jmd_ joined #nim |
19:23:34 | * | termer quit (Quit: ZNC 1.7.5+deb4 - https://znc.in) |
19:23:47 | * | jmdaemon quit (Ping timeout: 252 seconds) |
19:28:08 | * | termer joined #nim |
19:30:48 | FromDiscord | <Prestige> In reply to @haxscramper "All the times I": Yep |
19:31:57 | FromDiscord | <Generic> I think if configured correctly it does work pretty well in small to medium sized projects |
19:33:04 | FromDiscord | <hotdog> In reply to @jmgomez "What people use to": Kajax if you’re using karax |
19:33:20 | FromDiscord | <hotdog> There’s a few wrappers for fetch iirc |
19:35:49 | FromDiscord | <jmgomez> In reply to @hotdog "Kajax if you’re using": I dont, I did a quick test with it before but it expects to use render with it. I just started using the std/jsfetch one. It's kind of surprising that there isnt an implementation of httpclient for the js backend |
19:36:08 | FromDiscord | <jmgomez> (edit) "use" => "" |
19:36:44 | FromDiscord | <Prestige> In reply to @Generic "I think if configured": Just depends on the code it's evaluating, it'll break on small examples it can't handle. Or report false errors |
19:39:30 | FromDiscord | <Generic> error reporting is another story |
19:39:39 | FromDiscord | <Generic> but I just use nim check |
19:40:20 | FromDiscord | <Generic> so it's basically just running the Nim compiler, so no problem with that |
19:46:10 | FromDiscord | <whisper> Anyone of you tried to create an operator for Kubernetes? |
19:53:51 | FromDiscord | <Prestige> Is there a type I can use as a param that just means something is iterable? I see there's an `iterable` type but it doesn't seem to work how I'd expect |
19:54:58 | FromDiscord | <Prestige> I was hoping to do something like: https://play.nim-lang.org/#ix=46QE |
19:55:19 | FromDiscord | <Prestige> So I could pass in an array, seq, hashset, etc. to the same proc |
19:57:34 | FromDiscord | <j-james> `openarray`? |
19:59:20 | FromDiscord | <Prestige> Doesn't work for HashSet: https://play.nim-lang.org/#ix=46QH |
20:01:52 | FromDiscord | <Tuatarian> In reply to @haxscramper "All the times I": that's unfortunate |
20:02:25 | FromDiscord | <Tuatarian> nim check or terminal error messages can be a little misleading, but with realtime highlighting it's trivial usually to fiddle until you fix what the actual issue was |
20:02:37 | FromDiscord | <Tuatarian> but from terminal the whole loop is a lot longer |
20:02:53 | FromDiscord | <Generic> you can pass --errorMax:1 to nim check |
20:03:07 | FromDiscord | <Generic> then it will report errors 100% like when compiling |
20:03:17 | FromDiscord | <Generic> with the downside that it will only report one error at a time |
20:03:29 | FromDiscord | <Tuatarian> yes, that's a pretty huge downside |
20:04:26 | FromDiscord | <Prestige> I love this language but I really hate how poor the tooling is around it |
20:04:37 | FromDiscord | <Rainbow Asteroids> sent a code paste, see https://play.nim-lang.org/#ix=46QJ |
20:04:41 | FromDiscord | <Prestige> Good idea |
20:04:50 | FromDiscord | <Prestige> I wonder what `iterable` is actually for |
20:05:03 | FromDiscord | <Tuatarian> In reply to @Avahe "I love this language": yes, it is irritating at times |
20:05:09 | FromDiscord | <Elegantbeef> the iterable type works only in templates and is for telling the compiler "we accept iterators" |
20:05:14 | FromDiscord | <Tuatarian> everything works properly for the mostpart in vscode |
20:05:17 | FromDiscord | <Rainbow Asteroids> I think its for metaprogramming. I can't read the manual too well due to phone |
20:05:38 | FromDiscord | <Prestige> Interesting |
20:06:53 | FromDiscord | <j-james> hmm i could have sworn there was a `proc foo(arr: openArray[int] | HashSet[int])` syntax |
20:06:59 | FromDiscord | <j-james> maybe i'm getting my languages mixed up |
20:07:15 | FromDiscord | <Elegantbeef> That does exist but it doesnt work properly |
20:07:31 | FromDiscord | <Prestige> Strangely enough that concept doesn't work for HashSets |
20:07:39 | FromDiscord | <Prestige> In reply to @j-james "hmm i could have": Yeah you can do that |
20:07:50 | FromDiscord | <Elegantbeef> you'd need to do `proc foo[T: openarray[int] or Hashset[int]]` |
20:09:40 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=46QM |
20:10:31 | FromDiscord | <krisppurg> Is there a way to speed up the nim compilation process? it takes about 50 seconds to fully compile which is pretty annoying. |
20:10:37 | FromDiscord | <Prestige> Hm just a little difference in syntax eh |
20:10:52 | FromDiscord | <!Patitotective> In reply to @krisppurg "Is there a way": try `-d:danger` and compile what? |
20:10:55 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=46QO |
20:11:08 | FromDiscord | <Prestige> I think he means compiling nim itself |
20:11:13 | FromDiscord | <krisppurg> ^ |
20:11:14 | FromDiscord | <!Patitotective> oh |
20:11:23 | FromDiscord | <Elegantbeef> The first compile will always be slow |
20:11:49 | FromDiscord | <Elegantbeef> After you compile it once compile times drop drastically due to only recompiling changed module graphs |
20:11:55 | FromDiscord | <Prestige> Beef, I find it interesting that `iterable` is not usable in procs (like your concept is) |
20:12:06 | FromDiscord | <Elegantbeef> I mean it's compile magic so of course it's not |
20:12:11 | FromDiscord | <Elegantbeef> iterators are inlined |
20:12:29 | FromDiscord | <Elegantbeef> Well default iterators are inlined you cannot pass a template to a procedure either |
20:13:15 | FromDiscord | <Prestige> Idk what this "magic" thing is, but the concept is obviously evaluated at compile time so there's no issue. I guess I just don't know what is happening behind nim's curtain with `iterable` lol |
20:13:25 | FromDiscord | <Prestige> But the concept you provided is what I expected it to be |
20:13:30 | FromDiscord | <Elegantbeef> Iterable accepts iterators |
20:13:50 | FromDiscord | <Elegantbeef> To accept iterators you have to accept calls to iterators |
20:13:51 | FromDiscord | <Rainbow Asteroids> https://nim-lang.org/docs/manual.html#iterators-and-the-for-statement |
20:14:09 | FromDiscord | <Elegantbeef> As such you cannot use it in procs since those cannot take in an inliine iterator |
20:14:21 | FromDiscord | <Elegantbeef> It really should be consider an implicit static variable |
20:14:21 | FromDiscord | <Prestige> Yeah I didn't get the impression that `iterable` had anything to do explicitly with iterators |
20:14:51 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual.html#overload-resolution-iterable you clearly didnt read the manual |
20:15:23 | FromDiscord | <Elegantbeef> Anyway yea iterable is pretty much useless |
20:15:36 | FromDiscord | <Elegantbeef> It gives you a slightly better API then untyped |
20:16:35 | FromDiscord | <Elegantbeef> https://github.com/beef331/truss3d/blob/master/src/truss3D/models.nim#L194-L239 shows the slightly nicer API |
20:17:40 | FromDiscord | <Prestige> I read it like 2 years ago |
20:17:40 | FromDiscord | <Elegantbeef> The downside is it doesnt implicitly call iterators |
20:19:13 | * | xet7 quit (Remote host closed the connection) |
20:20:31 | FromDiscord | <krisppurg> seems like when I do compile on -d:danger it just hangs and stalls there↵basically I don't see Hint link |
20:29:29 | * | kenran quit (Quit: WeeChat info:version) |
21:03:10 | FromDiscord | <elcritch> In reply to @Girvo "I wonder if there": oh just noticed this while searching for something else. did you get it resolved? if not I think making a PR to add those constants would be good? |
21:05:44 | FromDiscord | <reversem3> Does C2nim or Cinterop follow the header files inside header files also ? Or do you need to wrap individual header files ? |
21:20:52 | FromDiscord | <j-james> you'll need to wrap individual header files |
21:22:30 | FromDiscord | <Elegantbeef> Futhark does do it recursively |
22:12:12 | FromDiscord | <reversem3> Can you use flags like pkg-config —libs? |
22:13:02 | FromDiscord | <Elegantbeef> No clue what that means |
22:19:05 | FromDiscord | <reversem3> https://en.m.wikipedia.org/wiki/Pkg-config |
22:19:46 | FromDiscord | <Elegantbeef> If you mean with futhark not that i know of |
22:20:32 | FromDiscord | <reversem3> cc example.c -o example \`pkg-config --cflags --libs elementary |
22:23:20 | FromDiscord | <Elegantbeef> You might be able to use it with nim, no clue really |
22:23:28 | FromDiscord | <Elegantbeef> I've never seen anyone use it |
22:25:47 | FromDiscord | <domosokrat> I think I've seen things like `{. passC:"$(pkg-config --cflags …)".}` |
22:25:59 | FromDiscord | <domosokrat> in nim files |
22:26:20 | FromDiscord | <Elegantbeef> I generally just see people do `{.passL: "-lmylib".}` |
22:31:25 | FromDiscord | <reversem3> ok cool |
22:47:24 | FromDiscord | <voidwalker> Trying to use weave again to spawn the db import in parallel, one proc per table. I get this error: |
22:47:33 | FromDiscord | <voidwalker> ` Error: type mismatch: got 'proc (param`gensym71: pointer){.nimcall, locks: <unknown>.}' for 'async_doUpdate' but expected 'proc (param: pointer){.nimcall, gcsafe.}'` |
22:48:22 | FromDiscord | <voidwalker> could this be related that I try to acces a non-local var in the proc ? |
22:48:32 | FromDiscord | <voidwalker> (edit) "that" => "t" |
22:48:38 | FromDiscord | <voidwalker> (edit) "t" => "to the fact that" |
22:48:41 | CyberTailor | @reversem3 {. passL: execStatic "pkg-config --libs mylib" .} |
22:49:18 | CyberTailor | s/execStatic/staticExec/ |
22:50:28 | CyberTailor | https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-passl-pragma |
22:51:28 | FromDiscord | <reversem3> ok so in Futhark the syspath is the actual clang or gcc libs what is path for ? |
23:09:58 | FromDiscord | <reversem3> shot-2022-08-06\_18-07-50.jpg https://media.discordapp.net/attachments/371759389889003532/1005613731058831430/shot-2022-08-06_18-07-50.jpg |
23:10:01 | FromDiscord | <reversem3> Yeah not working doesn't know what pkg-config is |
23:18:24 | FromDiscord | <reversem3> Can you compile elementary apps using clang ? |