00:02:15 | * | filcuc quit (Quit: Konversation terminated!) |
00:02:28 | * | filcuc joined #nim |
00:03:06 | * | krux02_ joined #nim |
00:06:04 | * | krux02 quit (Ping timeout: 256 seconds) |
00:07:25 | * | filcuc quit (Quit: Konversation terminated!) |
00:07:38 | * | filcuc joined #nim |
00:12:37 | * | filcuc quit (Quit: Konversation terminated!) |
00:12:49 | * | filcuc joined #nim |
00:21:54 | * | tane quit (Quit: Leaving) |
00:24:09 | dwdv | collect(for i in 1..3: i) is interesting, almost exactly matches ada's new aggregate expressions (for i in 1..3 => i) syntax. So, when are delta aggregates (mySeq with delta 1..2 => 42) coming to nim? :) |
00:25:47 | * | jjido joined #nim |
00:26:54 | leorize | when someone think that it's a good idea I guess :P |
00:27:49 | leorize | it's purely coincidental that collect() matches ada syntax :) |
00:28:59 | FromDiscord | <Rika> what do delta aggregates do |
00:29:02 | dwdv | Hey, hey, they're even usable with record/objects and arrays. And they even infer their result type. |
00:29:34 | leorize | welcome to macros :) |
00:29:41 | dwdv | Similar to js triple dot operator or whatever it's called. Updating a structure/record/... |
00:30:26 | dwdv | leorize: Well, the above isn't true for nim's collect sugar as of now, is it? |
00:30:39 | dwdv | Or rather doable. |
00:30:50 | * | filcuc quit (Ping timeout: 246 seconds) |
00:31:12 | * | ggibson joined #nim |
00:31:25 | leorize | dwdv: I don't quite follow |
00:31:53 | leorize | what I meant was that you can implement all of these with macros :) |
00:35:13 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
00:35:17 | ggibson | Any ideas why this line causes Illegal Storage Access segfault in a dumb one-line fn in a nim dll? "var server = newAsyncHttpServer()" |
00:41:14 | leorize | have you called NimMain() from your dll? |
00:41:30 | ggibson | leorize |
00:41:30 | leorize | if you haven't, the GC will not be activated, and your code won't work |
00:41:33 | ggibson | Yes. |
00:41:48 | ggibson | NimMain(); dumbFn(); |
00:42:05 | leorize | how did you call your dll? |
00:43:08 | ggibson | It's a shared library, the header is included in an extern "C" block, and then I just call the function. A simple hello world nim fn works okay, but not the server declaration. |
00:43:58 | ggibson | This is from c++. |
00:44:56 | leorize | you should add {.cdecl.} to dumbFn() |
00:45:13 | leorize | on windows the default calling convention is fastcall |
00:45:20 | leorize | for Nim procs |
00:45:32 | leorize | so changing it to {.cdecl.} first should help |
00:46:03 | ggibson | ahh, good idea; I'll try that. |
00:49:35 | ggibson | @leorize shoot, no luck with cdecl, stdcall, or noconv. |
00:50:51 | ggibson | Know of any projects that have c/c++ calling code in a nim lib? I haven't found any actual projects that feature this. |
00:51:26 | * | krux02_ quit (Remote host closed the connection) |
00:53:32 | * | oculux quit (Ping timeout: 250 seconds) |
00:55:17 | * | oculux joined #nim |
00:56:07 | * | disrupteq joined #nim |
00:58:29 | * | gangstacat quit (Ping timeout: 246 seconds) |
00:59:47 | FromDiscord | <Rika> is there a defect for "not implemented" stuff? |
01:00:24 | * | gangstacat joined #nim |
01:02:42 | * | chemist69 quit (Ping timeout: 260 seconds) |
01:03:23 | leorize | @Rika: no |
01:03:42 | * | chemist69 joined #nim |
01:03:54 | leorize | ggibson: shashlick is the expert on this front :P |
01:04:32 | leorize | ggibson: I actually have a library too, though it's on linux and things are much simpler over here |
01:04:50 | FromDiscord | <Rika> leorize, you know why there isnt any? or did no one think of it |
01:05:07 | leorize | @Rika: because people actually implements their functions? :p |
01:05:15 | FromDiscord | <Rika> smh |
01:05:16 | ggibson | Hah, true. I'll try it on linux and at least get this working there if I can. |
01:05:24 | FromDiscord | <Rika> what if i didnt wanna HMMMM |
01:05:38 | leorize | Rika: the short answer is that people don't need it :P |
01:05:52 | * | dadada quit (Ping timeout: 256 seconds) |
01:05:58 | leorize | but if you do, you can make your own Defect by inheriting from Defect |
01:06:29 | leorize | I think typically people just use doAssert false, "not implemented" |
01:07:22 | * | dadada joined #nim |
01:07:45 | * | dadada is now known as Guest84077 |
01:09:00 | leorize | !repo liblinux_sched |
01:09:00 | disbot | https://github.com/alaviss/liblinux_sched -- 9liblinux_sched: 11A simple library that wraps the sched_* syscalls for musl libc to make schedtool work again. 15 0⭐ 0🍴 |
01:09:07 | leorize | ggibson: ^ that's my library |
01:09:12 | leorize | though I'm the only user :P |
01:10:17 | ggibson | Thanks! Hah yeah I know how that goes. |
01:10:32 | leorize | you can ignore some complicated stuff in there, since I ported most of the manual work I did to the compiler |
01:11:04 | leorize | the entire codegenDecl part can be turned into dynlib now |
01:22:22 | ggibson | @leorize What's the "extern __attribute__..." part for? |
01:22:43 | * | ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
01:23:53 | ggibson | @leorize You were right - it works like a charm in linux. So it's some sort of fnCall pragma voodoo I probably need to make it work in windows. |
01:24:28 | ggibson | That or gcc options to do with ffi. |
01:26:23 | leorize[m] | ggibson: it's dynlib |
01:27:02 | ggibson | oh, I see. wow. |
01:27:17 | ggibson | Thanks for adding dynlib! |
01:29:07 | leorize[m] | I and timotheecour fixed it :p it's always been there, just wasn't working correctly |
01:31:25 | * | onionhammer joined #nim |
01:47:01 | * | dwdv quit (Ping timeout: 264 seconds) |
01:52:14 | FromGitter | <KingDarBoja> Quick question, is there any recommended text editor for Nim? Currently VSCode Nim extension has some issues |
01:52:28 | shashlick | What kind of issues |
01:52:48 | shashlick | Works well for me on windows and Linux as well as remote ssh |
01:53:49 | FromGitter | <KingDarBoja> Maybe as I am newbie on Nim but for example, declaring a type and importing on another module, while hitting ctrl + s (save) on moduleA, will cause syntax errors on ModuleB and viceversa |
01:54:02 | * | disrupteq quit (Ping timeout: 256 seconds) |
01:54:34 | FromGitter | <KingDarBoja> And the error always shows on the other module as `This might be caused by a recursive module dependency:` |
01:54:36 | FromDiscord | <Rika> huh? probably actual syntax errors |
01:54:51 | FromDiscord | <Rika> you're probably actually doing circular imports |
01:55:06 | FromGitter | <KingDarBoja> Ummmmm |
01:55:08 | FromDiscord | <Rika> try running your code |
01:56:16 | FromDiscord | <Rika> can you post code snippets? |
01:56:35 | FromGitter | <KingDarBoja> I wanted to create a type on moduleA, let's call it `Foo` and define another type on ModuleB, let's call it Foo. |
01:56:42 | FromGitter | <KingDarBoja> Sure |
01:57:30 | FromGitter | <KingDarBoja> source.nim ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e75748abef4313854450232] |
01:57:52 | FromGitter | <KingDarBoja> location.nim ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e75749f672fdb1545b5bbf5] |
01:58:05 | ggibson | And Visual Studio works okay. So I'm left trying to get mingw-gcc c++ calling the nim lib correctly. |
01:58:31 | ggibson | (the worst place to be) |
01:58:33 | FromGitter | <KingDarBoja> Oh, there is a discord channel |
01:59:35 | shashlick | Nim doesn't support circular dependencies |
02:00:12 | FromDiscord | <Rika> move `from location import SourceLocation, newSourceLocation` below `type Source* ...` |
02:00:17 | FromDiscord | <Rika> then it should work |
02:00:51 | FromDiscord | <Rika> KingDarBoja ^ |
02:02:52 | FromGitter | <KingDarBoja> Okie Dokie, didn't know about that |
02:07:06 | FromGitter | <KingDarBoja> Ummm still moving the import below `type Source*` triggers some error after hitting save on `location.nim` |
02:07:43 | FromGitter | <KingDarBoja> But this time, saving `source.nim` doesn't trigger error on `location.nim` |
02:09:04 | FromGitter | <KingDarBoja> Better move all logic from Source `getLocation` proc into Location |
02:10:49 | FromDiscord | <KingDarBoja> Hi |
02:10:56 | FromDiscord | <KingDarBoja> Managed to found the discord, 😄 |
02:13:03 | FromDiscord | <KingDarBoja> Anyway, moved the logic and now getting `undeclared field: 'body' for type source.Source` :/ |
02:13:31 | FromDiscord | <Rika> i mean |
02:13:35 | FromDiscord | <Rika> below the whole declaration |
02:13:38 | FromDiscord | <KingDarBoja> `var lines: seq[string] = source.body[0..^position].splitLines` maybe this isn't the proper way to get the type prop |
02:13:57 | FromDiscord | <KingDarBoja> The whole declaration? |
02:14:12 | FromDiscord | <Rika> below `locationOffset: Location` |
02:14:24 | FromDiscord | <Rika> the import below the whole type declaration |
02:14:37 | FromDiscord | <Rika> so above newsource |
02:14:55 | leorize | @KingDarBoja you should avoid circular dependency altogether... |
02:14:59 | FromDiscord | <KingDarBoja> That's what I did and once again, when saving `location` , start showing syntax errors |
02:15:16 | FromDiscord | <KingDarBoja> 🤔 |
02:15:30 | ggibson | @leorize FYI I solved my issue - turned out I forgot I had installed ccache months ago, and the compile cache was dirty. yay no nim problems! |
02:15:41 | leorize | ggibson: yay |
02:15:53 | leorize | just don't use ccache :p |
02:16:14 | ggibson | ...yeah seems to be the lesson (it doesn't really help anyway) |
02:16:15 | FromDiscord | <Rika> body isnt public |
02:16:28 | FromDiscord | <Rika> `body: string` -> `body*: string` |
02:16:41 | FromDiscord | <Rika> yes, fields of an object need to publicized |
02:16:49 | FromDiscord | <KingDarBoja> Ohhhhhhhhhh |
02:17:07 | FromDiscord | <KingDarBoja> That's it! |
02:17:26 | FromDiscord | <KingDarBoja> Thanks @Rika and leorize! |
02:17:33 | FromDiscord | <Rika> i dont think you also publicized the getLocation procs? not sure |
02:18:00 | FromDiscord | <KingDarBoja> No but better avoid the circular thing and declare public the `body` prop |
02:18:07 | FromDiscord | <KingDarBoja> Now everything is okay 😄 |
02:19:02 | FromDiscord | <KingDarBoja> Sorry for that, I am usually coding on Python, didn't expect everything is "private" by default |
02:19:50 | FromDiscord | <KingDarBoja> The tutorial part I doesn't seem to mention that |
02:20:18 | FromDiscord | <KingDarBoja> I am reading this -> https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers#self__init__ |
02:20:43 | leorize | I think the wiki is free for all to edit :) |
02:20:55 | leorize | feel free to add in any information that you deem missing |
02:21:33 | FromDiscord | <Rika> `initX` for `object`s, `newX` for `ref object`s |
02:21:43 | leorize | it's not too weird that we got people coming from python and they got confused with now Nim works |
02:21:52 | * | ggibson quit (Remote host closed the connection) |
02:22:14 | leorize | Nim only looks like python in certain syntactic elements |
02:22:40 | leorize | so if you got any questions, feel free to ask here :) |
02:22:46 | FromDiscord | <KingDarBoja> So I do better use `initX` on my current code ugh? |
02:22:55 | FromDiscord | <Rika> haha 😛 |
02:22:58 | * | rnrwashere quit (Remote host closed the connection) |
02:22:59 | FromDiscord | <KingDarBoja> Was going to ask the difference between proc / func too lol |
02:23:36 | FromDiscord | <Rika> func is proc with `noSideEffects` |
02:23:46 | FromDiscord | <KingDarBoja> > `initX` for `object`s, `newX` for `ref object`s |
02:23:46 | FromDiscord | <KingDarBoja> @Rika Tell me 😛 😆 |
02:24:10 | * | chemist69 quit (Ping timeout: 246 seconds) |
02:24:17 | FromDiscord | <Rika> proc is `def a(): print("nice")`, func cannot print normally |
02:24:24 | FromDiscord | <Rika> because printing edits stdout |
02:24:27 | FromDiscord | <Rika> and that is a side effect |
02:24:34 | leorize | func is basically proc but you don't get to access states outside of your parameters |
02:24:39 | FromDiscord | <Rika> that |
02:24:52 | FromDiscord | <Rika> outside parameters and result |
02:24:59 | FromDiscord | <KingDarBoja> Oh |
02:25:28 | * | chemist69 joined #nim |
02:25:37 | FromDiscord | <Rika> i recommend using func if needed |
02:26:18 | FromDiscord | <KingDarBoja> Okie Dokie 😄 Btw anyone uses vscode-icons (icon theme) ? |
02:26:23 | FromDiscord | <Rika> i tried it |
02:27:50 | FromDiscord | <KingDarBoja> Well the nim icon is being updated soon, no more black-gold crown lol |
02:28:20 | FromDiscord | <Rika> i assume thanks to some KDB |
02:28:36 | FromDiscord | <KingDarBoja> 😍 |
02:29:36 | FromDiscord | <Rika> oh also `decorator` is called `pragma` here |
02:29:55 | leorize | nah |
02:30:08 | leorize | we don't have any syntax similar to decorator :P |
02:30:16 | FromDiscord | <Rika> no i mean the naming |
02:30:27 | FromDiscord | <Rika> i mean more of functionality-similarity-wise |
02:30:39 | leorize | but macros is superior |
02:30:45 | leorize | it's not pragmas, they are macros |
02:30:57 | FromDiscord | <Rika> i mean, theyre called pragmas here |
02:31:03 | FromDiscord | <KingDarBoja> https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers#decorators What Leorize said... |
02:31:45 | * | Kaivo quit (Quit: WeeChat 2.7.1) |
02:31:54 | FromDiscord | <Rika> we both know our shit, pragmas are basically macros which take a function |
02:32:18 | FromDiscord | <Rika> but the syntax for using them is pragma syntax, not macro syntax |
02:32:20 | FromDiscord | <Benumbed> Does anyone know where things stand in terms of stream procs gaining an understanding of endianness? I found the issue in Github but it's languishing 😦 |
02:32:39 | FromDiscord | <Rika> i understood nothing of what you just said |
02:32:59 | FromDiscord | <Benumbed> streams have procs to extract things like uint32s and such |
02:33:06 | FromDiscord | <Benumbed> Those have no concept of endianness |
02:33:25 | FromDiscord | <Benumbed> meaning if you're streaming something from a network, on a little-endian machine, well, you're going to have a bad time 😄 |
02:33:33 | FromDiscord | <Benumbed> (at least if you're using those procs) |
02:33:48 | FromDiscord | <Rika> well, how exactly do you tell something is little endian or big endian given only the data |
02:33:57 | FromDiscord | <Rika> or do you mean as an argument? |
02:34:02 | FromDiscord | <Benumbed> The latter |
02:34:47 | FromDiscord | <Rika> i got no clue right now since im kinda loopy maybe someone else can help |
02:35:02 | FromDiscord | <Benumbed> so someStream.readUint32 would have some way of hinting what ordering was in use so it can be converted to native endianness |
02:36:08 | FromDiscord | <Benumbed> The issue in question (RFC) is https://github.com/nim-lang/RFCs/issues/27 |
02:36:09 | disbot | ➥ [RFC] Option for endianness in streams |
02:36:59 | FromDiscord | <Benumbed> More interested to see if there's any progress being made on it, or if I should just continue writing my own extractors for streams |
02:37:09 | * | Hideki_ joined #nim |
02:37:44 | FromDiscord | <Benumbed> Oh and BTW, I meant to say this last night, but got distracted by stuff, this is probably the nicest language community I've been in, it's awesome, thank you 🙂 |
02:39:10 | FromDiscord | <KingDarBoja> ❤️ |
02:39:38 | * | chemist69 quit (Ping timeout: 246 seconds) |
02:40:56 | FromDiscord | <KingDarBoja> Quick question, the tutorial shows how to raise an error, is there a quick way to do it inside a if statement or I must create the following: |
02:40:56 | FromDiscord | <KingDarBoja> ```nim |
02:40:56 | FromDiscord | <KingDarBoja> if some_check: |
02:40:57 | FromDiscord | <KingDarBoja> var e: ref ValueError |
02:40:57 | FromDiscord | <KingDarBoja> new(e) |
02:40:57 | FromDiscord | <KingDarBoja> e.msg = "you failed this city" |
02:40:57 | FromDiscord | <KingDarBoja> raise e |
02:40:59 | FromDiscord | <KingDarBoja> ``` |
02:41:33 | FromDiscord | <Rika> raise newException(ValueError, msg) |
02:41:41 | FromDiscord | <Benumbed> You should be able to just do newException(ExceptionT.... yes that ^ haha |
02:41:46 | FromDiscord | <Rika> heh 🙂 |
02:41:48 | * | chemist69 joined #nim |
02:42:14 | FromDiscord | <Rika> i may be sleepy and slow now but my typing is probably not inhibited enough to slow down significantly |
02:42:26 | FromDiscord | <KingDarBoja> Ohhhh!! |
02:42:28 | FromDiscord | <KingDarBoja> Thank you! |
02:43:02 | FromDiscord | <Benumbed> I'm sitting at a weird angle at my desk and watching a detailing video for a Skyline R32 V-spec while reading chat... that's my excuse 😄 |
02:43:14 | FromDiscord | <Rika> ooh, R32s are nice |
02:43:26 | FromDiscord | <Rika> i'm undecided on which looks nicer, the R32 or the R34 |
02:43:32 | FromDiscord | <KingDarBoja> I'm playing World of Tnaks Blitz while coding |
02:43:36 | FromDiscord | <Benumbed> Aye... apparently this one had 100 hrs of detail time spent on it |
02:43:54 | FromDiscord | <Rika> if only i had the money to buy something that expensive... |
02:43:56 | FromDiscord | <Benumbed> It's cathartic, and given all the crazy shit going down in the world, I need stuff like that |
02:44:21 | FromDiscord | <Rika> i'm doing absolutely nothing aside from reading chat |
02:44:50 | FromDiscord | <Benumbed> Just this chat, or all your Discord chats? |
02:44:59 | FromDiscord | <KingDarBoja> I'm playing World of Tanks Blitz while coding |
02:45:16 | FromDiscord | <KingDarBoja> We can go to #offtopic :v |
02:46:12 | FromDiscord | <Benumbed> Well that's really all I had to say 🙂 |
02:47:21 | FromDiscord | <Rika> a lot of discord chats |
02:47:34 | FromDiscord | <Benumbed> Ok, I was about to say you must be horribly bored |
02:47:52 | FromDiscord | <KingDarBoja> COVID-19 intensifies* |
02:48:47 | FromDiscord | <Rika> i am, i've been chipping away at some gigantic library in python im converting to nim but its hard |
02:48:52 | FromDiscord | <Rika> because its math heavy |
02:49:00 | FromDiscord | <Rika> and also parser heavy |
02:49:04 | * | abm quit (Read error: Connection reset by peer) |
02:49:12 | FromDiscord | <Benumbed> Ohhh, which lib (if it's public)? |
02:49:47 | FromDiscord | <Rika> https://github.com/llllllllll/slider/ |
02:50:00 | FromDiscord | <Benumbed> Ahhh, neat! |
02:50:18 | FromDiscord | <KingDarBoja> I am doing my first steps on Nim, by converting GraphqlJS (or Graphql-python) into nim |
02:50:21 | FromDiscord | <Rika> my port is https://github.com/de-odex/circa, i havent committed in a while but i've been working on it nonetheless |
02:50:31 | FromDiscord | <Benumbed> I'm writing an AMQP client library in pure Nim from the spec... as my first project in Nim... lol |
02:50:33 | FromDiscord | <Rika> sounds painful really |
02:50:39 | FromDiscord | <KingDarBoja> I am doing my first steps on Nim, by converting GraphQL-JS (or Graphql-python) into nim |
02:50:51 | FromDiscord | <Rika> this was my first project but its not my first project to finish |
02:51:12 | FromDiscord | <KingDarBoja> 😄 |
02:54:22 | disruptek | those are a couple great projects. |
02:55:11 | * | Hideki_ quit (Remote host closed the connection) |
02:55:14 | FromDiscord | <KingDarBoja> I am contributing to graphql-python but wanted to try something new and found nim 😄 |
02:55:21 | FromDiscord | <KingDarBoja> I am contributing to graphql-python but wanted to try something new and found Nim 😄 |
02:56:31 | disruptek | we need a native graphql for github actions and packages. |
02:56:46 | * | Hideki_ joined #nim |
02:57:07 | FromDiscord | <Rika> kinda wished my projects were as useful as you 2s |
02:57:09 | FromDiscord | <Rika> lmao |
02:57:27 | FromDiscord | <Benumbed> It's nice to have a systems language I like using. I know C++ pretty well, but its heavy, Go is ... well lets not talk about Go |
02:58:01 | FromDiscord | <Benumbed> @Rika Hey, you're helping build the ecosystem around Nim, that's valuable |
02:58:04 | FromDiscord | <Rika> Rust? |
02:58:04 | FromDiscord | <KingDarBoja> > <disruptek> we need a native graphql for github actions and packages. |
02:58:04 | FromDiscord | <KingDarBoja> @gitterirc What do you mean by native¡ |
02:58:09 | FromDiscord | <KingDarBoja> > <disruptek> we need a native graphql for github actions and packages. |
02:58:09 | FromDiscord | <KingDarBoja> @gitterirc What do you mean by native? |
02:58:11 | FromDiscord | <Rika> native nim |
02:58:21 | FromDiscord | <Benumbed> Haven't used Rust beyond an initial inspection |
02:58:26 | FromDiscord | <KingDarBoja> @Rika every package can be useful |
02:58:33 | FromDiscord | <Rika> recently ive been heavily self deprecative though i dont know why |
02:59:41 | FromDiscord | <KingDarBoja> Have you seen npm packages? There are tons and several of them are very tiny stuff but still people love to publish them and are useful on its own niche |
02:59:42 | FromDiscord | <Benumbed> Happens to me a lot Rika, my fixes aren't healthy though, shove it in a mental corner and try to find something that sparks my interest so I can continue to ignore it |
03:00:32 | FromDiscord | <Rika> @KingDarBoja thats a whole nother story isnt it |
03:00:43 | FromDiscord | <Benumbed> I write Node for work, right now... the microservices I work on have thousands of packages listed in their lock files... it's unnerving |
03:00:54 | * | Hideki_ quit (Ping timeout: 240 seconds) |
03:00:58 | FromDiscord | <Rika> how's auditing : ) |
03:01:01 | disruptek | yeah, i hate the js ecosystem. |
03:01:11 | disruptek | so liberating to be free of that. |
03:01:19 | FromDiscord | <KingDarBoja> xD |
03:01:23 | FromDiscord | <Benumbed> Actually we're undergoing a huge audit right now, it's not pleasant |
03:01:27 | FromDiscord | <Rika> js is the reason stdlibs need to be strong and useful |
03:01:40 | FromDiscord | <KingDarBoja> I use TypeScript and Python at work |
03:01:43 | FromDiscord | <Benumbed> Yeah I got yanked from a Python team to a Node team because I have an unusual set of skills |
03:01:45 | FromDiscord | <Rika> i'm not working yet |
03:01:48 | FromDiscord | <KingDarBoja> Thank god it isn't plain JS |
03:01:56 | FromDiscord | <Rika> @Benumbed ??? what skills 😮 |
03:02:00 | FromDiscord | <Benumbed> Node was not on my list of things to learn... ever lol |
03:02:22 | FromDiscord | <Rika> i've tried typescript, its like a weaker and more confusing version of nim |
03:02:42 | FromDiscord | <Rika> never gonna memorize the difference of for of and for in |
03:02:52 | FromDiscord | <Benumbed> @Rika I'm a software engineer by trade, but I have 5 years of SRE experience as well, so I'm very familiar with how to build infrastructure, particularly in an automated way |
03:02:56 | FromDiscord | <KingDarBoja> Ah... |
03:03:04 | FromDiscord | <Rika> thats interesting |
03:03:15 | FromDiscord | <KingDarBoja> SRE? |
03:03:22 | disruptek | site reliability |
03:03:24 | FromDiscord | <Benumbed> I'm on Disney's cloud team, our products manage the entire company's cloud presence across all 3 major vendors |
03:03:35 | FromDiscord | <KingDarBoja> @Rika I have never understood the difference between call and bind so... |
03:03:48 | FromGitter | <zetashift> hopefully somebody can sneak in some Nim code into Disney's codebase |
03:03:50 | FromDiscord | <Rika> i dont even know what call or bind do |
03:04:01 | FromDiscord | <Benumbed> zetashift: Working on it! 😄 |
03:04:12 | disruptek | call is what you do to get her over to your place, and bind is what you do to keep her there. |
03:04:15 | FromGitter | <zetashift> Ooooo |
03:04:18 | FromDiscord | <Rika> you can use code to make node code 🙂 |
03:04:24 | FromDiscord | <Rika> do it do it |
03:04:30 | FromDiscord | <Rika> ok |
03:04:34 | FromDiscord | <Rika> i didnt say nim somehow |
03:04:37 | FromDiscord | <KingDarBoja> LOL |
03:04:41 | FromDiscord | <Rika> you can use nim code to make node code |
03:04:49 | FromDiscord | <Rika> im very sleepy zzz |
03:05:07 | FromDiscord | <Benumbed> There's talk of converting our services to Go, which, having actually learned Go... I'm not entirely pleased about either haha |
03:05:10 | FromDiscord | <KingDarBoja> Now think about JS community with those frameworks, libraries, etc |
03:05:23 | FromDiscord | <Benumbed> Gp |
03:05:28 | FromDiscord | <Rika> Gp? |
03:05:34 | FromDiscord | <Benumbed> err Go's package ecosystem is a nightmare |
03:05:36 | FromGitter | <zetashift> Yeah I think Go is Nim's biggest contender in the space Nim wants to occupy |
03:05:38 | FromDiscord | <Rika> yeah |
03:05:45 | FromDiscord | <KingDarBoja> What about Rust? |
03:05:49 | FromDiscord | <Rika> heard of Go's package system and hhhhh |
03:05:55 | * | actuallybatman left #nim (#nim) |
03:05:58 | FromDiscord | <Rika> Rust is an okay package system from what i tried |
03:06:03 | FromDiscord | <Benumbed> Rust is too high of a learning curve for what we do |
03:06:06 | FromDiscord | <Benumbed> and also overkill |
03:06:07 | FromGitter | <zetashift> If they can live with a GC, I think you'd want to avoid rust |
03:06:10 | FromDiscord | <KingDarBoja> Rust has Cargo, Go? |
03:06:16 | FromDiscord | <Rika> go has uh |
03:06:21 | FromDiscord | <Rika> forgot the name |
03:06:33 | FromDiscord | <Benumbed> dammit I know this... Go modules or something |
03:06:36 | FromGitter | <zetashift> iirc they were working on it |
03:06:39 | FromDiscord | <KingDarBoja> Oh yeah |
03:06:44 | FromDiscord | <KingDarBoja> Go modules |
03:06:45 | FromDiscord | <Rika> TBH Cargo sounds more like a Go package manager than a Rust one, because, uh, carGO |
03:07:00 | FromDiscord | <Benumbed> I was using them right before I moved my efforts to Nim |
03:07:20 | FromDiscord | <KingDarBoja> Go has several package managers as far as I know |
03:07:23 | FromDiscord | <Benumbed> The Go modules are out of beta in 1.13 (latest) I think |
03:07:30 | FromDiscord | <KingDarBoja> Then they went to only one trying to standarize it |
03:07:41 | disruptek | !repo nimph |
03:07:43 | disbot | https://github.com/disruptek/nimph -- 9nimph: 11Nim package hierarchy manager from the future 🧚 15 54⭐ 3🍴 7& 1 more... |
03:07:56 | FromDiscord | <Rika> most people say that Go is too simplistic making it boilerplate heavy |
03:07:56 | FromDiscord | <KingDarBoja> Wait what? |
03:08:09 | FromDiscord | <Rika> yeah disruptek made another package manager |
03:08:13 | FromDiscord | <KingDarBoja> Where is nimble lol |
03:08:15 | FromDiscord | <Rika> never used it |
03:08:16 | FromDiscord | <Benumbed> lol |
03:08:31 | FromDiscord | <Benumbed> nimble drives me nuts when it comes to how it handles tests |
03:08:35 | FromDiscord | <Rika> nimble is the one packaged with nim |
03:08:37 | FromDiscord | <Rika> why so? |
03:08:48 | FromDiscord | <Benumbed> I have an item in my list of TODOs to figure out how to make it better |
03:08:52 | FromGitter | <zetashift> Rika, I think you have to choose your projects for Go, for web services seems great |
03:08:55 | FromDiscord | <KingDarBoja> Neither I but hopefully it doesn't become too many of them |
03:09:00 | FromDiscord | <Benumbed> Nimble doesn't traverse directory structures to run tests |
03:09:02 | * | rnrwashere joined #nim |
03:09:07 | * | rnrwashere quit (Remote host closed the connection) |
03:09:08 | FromDiscord | <Benumbed> it just looks in the root of the test directory |
03:09:17 | FromDiscord | <Benumbed> also, it likes to write the executable next to the .nim |
03:09:20 | FromDiscord | <KingDarBoja> As JS has npm, yarn, pnpm, etc |
03:09:22 | FromDiscord | <Rika> maybe testament fixes what unittest lacks |
03:09:31 | FromDiscord | <Benumbed> which makes .gitignores a nightmare trying to not check in executables |
03:09:54 | FromGitter | <zetashift> @Benumbed try to open an issue, iirc the people working on nimble are open for ideas |
03:09:55 | FromDiscord | <Rika> i think theres a parameter for that |
03:10:03 | FromDiscord | <Rika> --out was it? not sure |
03:10:09 | FromDiscord | <Rika> outDir? dunno |
03:10:20 | FromGitter | <zetashift> yea |
03:10:25 | FromDiscord | <Benumbed> zetashift: I was going to try and actually figure a better way out myself and then submit an MR |
03:10:28 | FromGitter | <zetashift> `nim c -o:path` |
03:10:38 | FromDiscord | <KingDarBoja> 😮 |
03:10:45 | FromGitter | <zetashift> man I read that as submit an MRI |
03:10:55 | FromDiscord | <Benumbed> Heavy stuff... O_o 😄 |
03:11:08 | FromDiscord | <Rika> only reason i understood MR is because MR sounds like (mer)ge |
03:11:25 | FromDiscord | <Benumbed> I use 'MR' because not everyone uses Github 🙂 |
03:11:59 | FromGitter | <zetashift> fair |
03:12:15 | FromDiscord | <Benumbed> I do actually use -o all the time (I compile to a build/ directory so I can just gitignore it), but it only works for single files |
03:12:31 | FromDiscord | <Benumbed> What would be helpful is a 'write all binaries to <this> dir' argument |
03:12:46 | FromGitter | <zetashift> might be able to do it with nimscript |
03:13:18 | FromDiscord | <Rika> anyone here who can help me out with my endeavor to translate this lib though (i mean, less of those who can read python and more of those who are knowledgeable on osu core functionality, as the library i'm translating has errors in the code) |
03:13:19 | FromGitter | <zetashift> I'm not sure though, most people here are EU so they can't weigh in cause they're sleeping :( |
03:13:25 | FromDiscord | <Benumbed> I'll probably look into a 'fix' once I get to the point with the AMQP client where I have a bunch of tests that I want to build |
03:13:55 | FromDiscord | <Benumbed> Not I unfortunately, the closest I get to osu is watching vids on YouTube |
03:14:30 | FromGitter | <zetashift> osu as in the rhythm game? |
03:14:34 | FromDiscord | <Rika> yep |
03:14:45 | FromGitter | <zetashift> yea also youtube vids for me |
03:14:55 | FromDiscord | <Rika> xdddd |
03:15:21 | FromDiscord | <Rika> okay ill just ask this then, what's the best approach for me to parse a file that looks like a windows INI file but isnt exactly one? |
03:16:29 | FromDiscord | <Benumbed> That is the sort of stuff that ends up irking me lol |
03:16:29 | FromGitter | <zetashift> Is there an existing implementation in another language maybe? |
03:16:52 | FromDiscord | <Benumbed> Can you pre-process the file down to legit INI syntax, then use an INI parser? |
03:17:08 | FromDiscord | <Benumbed> Can you pre-process the file down to actual INI syntax, then use an INI parser? |
03:17:22 | FromDiscord | <Benumbed> Shit, forgot I'm not supposed to edit, sorry IRC folks |
03:17:31 | FromDiscord | <KingDarBoja> OOOHHH it is that tap game! |
03:17:38 | FromDiscord | <Benumbed> Discord and Slack habits are engrained in me |
03:17:41 | FromDiscord | <Rika> THAT TAP GAME |
03:18:25 | FromDiscord | <Rika> i guess ill just uh look elsewhere |
03:19:15 | FromDiscord | <Benumbed> Hey, I made a suggestion! Sorta... 😄 |
03:20:10 | FromDiscord | <KingDarBoja> I am very tired, gotta go 😄 see ya tomorrow! |
03:20:32 | FromDiscord | <Benumbed> nn |
03:20:42 | FromDiscord | <KingDarBoja> nn? |
03:20:46 | FromDiscord | <Benumbed> nightnight |
03:21:14 | FromDiscord | <KingDarBoja> Ah! ... _Buenas noches_ (good night in spanish) |
03:21:22 | FromDiscord | <Benumbed> Oy it's 2021... I should probably eat something O_O |
03:21:29 | FromDiscord | <Rika> it's 2020 |
03:21:35 | FromDiscord | <Benumbed> Cute |
03:21:48 | FromDiscord | <Rika> god please add colons to your times |
03:21:52 | FromDiscord | <Rika> or a T suffix |
03:22:00 | FromDiscord | <Rika> prefix rather |
03:22:02 | FromDiscord | <Benumbed> Butbut... |
03:22:11 | FromDiscord | <Rika> 2021 looks like a year |
03:22:12 | FromDiscord | <Benumbed> *sigh* fiiiiine |
03:22:27 | disruptek | benumbed: --outdir |
03:23:16 | FromDiscord | <Benumbed> disruptek: Huh... I didn't even know that was a thing! |
03:23:27 | disruptek | --fullhelp |
03:23:28 | FromDiscord | <Rika> hey i called it |
03:24:07 | FromDiscord | <Benumbed> Well gee, I feel like a double dumbass, thanks |
03:24:09 | FromDiscord | <Benumbed> 😄 |
03:24:36 | FromDiscord | <Rika> what exactly is a closure iterator |
03:24:52 | FromDiscord | <Rika> and how do i distinguish a regular one from a closure one |
03:24:56 | disruptek | like a python generator, an iterator that you can iterate on demand. |
03:25:15 | FromDiscord | <Benumbed> Wouldn't that just be a closure that `yeild`s? |
03:25:22 | FromDiscord | <Benumbed> yield dammit fingers |
03:25:53 | FromDiscord | <Rika> well is it possible to convert a regular iterator to a closure iterator |
03:26:18 | FromDiscord | <Rika> w/o editing the source of the regular iterator |
03:28:35 | FromDiscord | <Rika> nvm |
03:28:38 | FromDiscord | <Rika> lmao |
03:28:45 | FromDiscord | <Rika> i'm very loopy today it seems |
03:32:07 | * | Hideki_ joined #nim |
03:32:48 | FromGitter | <zetashift> Everyone has those days |
03:47:14 | * | Hideki_ quit (Ping timeout: 240 seconds) |
03:58:19 | * | muffindrake quit (Ping timeout: 246 seconds) |
04:00:45 | * | muffindrake joined #nim |
04:21:02 | * | rockcavera quit (Remote host closed the connection) |
04:54:46 | * | andinus joined #nim |
05:20:40 | * | NimBot joined #nim |
05:29:26 | * | rnrwashere joined #nim |
05:31:28 | rayman22201 | @Benumbed re: endian the stuff. Status has a good package for it: https://github.com/status-im/nim-stew/blob/1c4293b3e754b5ea68a188b60b192801162cd44e/stew/endians2.nim |
05:35:29 | FromDiscord | <Benumbed> rayman22201: Oh cool, thanks for the link 🙂 |
05:37:28 | FromDiscord | <Rika> ah, converting python code that relies heavily on the dynamic typing is such a pain |
05:37:41 | rayman22201 | NP 👍 Also check out their stream impl https://github.com/status-im/nim-faststreams |
05:38:08 | FromDiscord | <Benumbed> Neat |
05:40:24 | * | dddddd quit (Ping timeout: 250 seconds) |
05:48:43 | * | opal quit (Ping timeout: 240 seconds) |
05:51:13 | * | rnrwashere quit (Remote host closed the connection) |
05:51:38 | * | rnrwashere joined #nim |
05:51:50 | * | opal joined #nim |
06:19:02 | * | opal quit (Ping timeout: 240 seconds) |
06:19:02 | * | leorize quit (Ping timeout: 240 seconds) |
06:20:00 | * | opal joined #nim |
06:24:29 | * | leorize joined #nim |
06:35:42 | * | rnrwashere quit (Remote host closed the connection) |
06:41:58 | * | solitudesf joined #nim |
06:47:40 | * | rnrwashere joined #nim |
06:52:25 | * | rnrwashere quit (Ping timeout: 264 seconds) |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:04:51 | * | gmpreussner joined #nim |
07:17:43 | * | leorize quit (Ping timeout: 240 seconds) |
07:18:02 | * | opal quit (Read error: Connection reset by peer) |
07:18:14 | * | opal joined #nim |
07:28:51 | * | leorize joined #nim |
07:44:36 | * | Hideki_ joined #nim |
07:48:54 | * | Hideki_ quit (Ping timeout: 240 seconds) |
07:51:16 | FromDiscord | <Benumbed> Does anyone not use VSC to edit their Nim code? |
07:51:22 | FromDiscord | <Benumbed> If so, what do you use? |
07:57:04 | FromDiscord | <Rika> a lot of us use vscode |
07:57:11 | FromDiscord | <Rika> many also use vim |
07:57:27 | FromDiscord | <Rika> afaik vscode and vim are the most used |
07:57:40 | FromDiscord | <Rika> theres another one but i forgot the name |
07:57:57 | FromDiscord | <Rika> i havent slept since i last spoke her |
07:57:58 | FromDiscord | <Rika> e |
08:00:40 | * | natrys joined #nim |
08:02:18 | FromDiscord | <Benumbed> You should really go get some sleep @Rika O_O |
08:37:31 | * | narimiran joined #nim |
08:38:09 | * | jjido joined #nim |
08:45:34 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:01:00 | * | jjido joined #nim |
09:03:57 | Araq | the joys of build systems |
09:04:15 | Araq | To build Z3, open a [Visual Studio x64 Command Prompt], then |
09:04:15 | Araq | type 'cd C:\Users\rumpf\projects\z3\build && nmake' |
09:04:29 | Araq | ... hours later ... |
09:04:40 | Araq | shell\datalog_frontend.obj : fatal error LNK1112: |
09:05:04 | Araq | now how do I tell this set of python scripts to build via GCC |
09:05:10 | Araq | who knows... |
09:05:33 | * | filcuc joined #nim |
09:09:49 | Araq | and why does it take 10_000 lines of Python code to produce a 5000 LOC makefile? |
09:11:17 | * | s4mu3lbk joined #nim |
09:11:19 | Araq | it's a bunch of C++ files, you compile them, you link them together, just how hard can you make that... |
09:32:20 | * | Trustable joined #nim |
09:34:13 | * | s4mu3lbk quit (Quit: WeeChat 2.3) |
09:47:23 | * | dwdv joined #nim |
09:56:15 | lqdev[m] | that's why I use meson. simple to configure, simple to compile with. don't know why anyone would want more than that. |
10:02:59 | * | andinus quit (Remote host closed the connection) |
10:04:19 | Araq | interestingly, the bug seems to be unreported |
10:07:21 | * | JustASlacker joined #nim |
10:08:34 | * | filcuc quit (Ping timeout: 240 seconds) |
10:10:44 | * | filcuc joined #nim |
10:14:40 | * | filcuc quit (Remote host closed the connection) |
10:14:43 | * | andinus joined #nim |
10:15:23 | * | couven92 joined #nim |
10:16:11 | * | filcuc joined #nim |
10:16:14 | * | krux02 joined #nim |
10:29:29 | * | zahary joined #nim |
10:41:44 | FromGitter | <timotheecour> @araq https://github.com/nim-lang/Nim/pull/13714 is ready for review |
10:41:47 | disbot | ➥ [WIP] VM callbacks can now raise (and be caught, or show their stacktrace) ; snippet at 12https://play.nim-lang.org/#ix=2ePp |
10:59:07 | FromDiscord | <Stuffe> is hot code reloading supposed to be working yet? |
11:06:08 | * | tane joined #nim |
11:13:05 | * | narimiran quit (Read error: Connection reset by peer) |
11:14:50 | * | JustASlacker quit (Ping timeout: 246 seconds) |
11:27:55 | * | JustASlacker joined #nim |
11:29:15 | * | narimiran joined #nim |
11:37:56 | * | JustASlacker quit (Ping timeout: 246 seconds) |
11:46:06 | * | Hideki_ joined #nim |
11:48:09 | * | zahary quit (Quit: Leaving.) |
11:50:14 | * | Hideki_ quit (Ping timeout: 240 seconds) |
11:50:23 | FromDiscord | <Varriount> @Stuffe It should |
11:53:03 | FromDiscord | <Stuffe> @Varriount I tried following https://nim-lang.org/docs/hcr.html but it complains that "libnimhcr.dylib" doesn't exist. Could it be that it only works on Windows or Linux and not macOS? |
11:56:42 | Araq | tests are green on osx too |
11:57:01 | Araq | but you need to do some bananaPATH dancing |
11:57:04 | * | lritter joined #nim |
11:57:11 | Araq | (forgot the correct terms) |
12:02:46 | Guest84077 | lqdev[m]: +1 for meson! |
12:02:49 | * | Guest84077 is now known as dadada |
12:03:39 | FromDiscord | <Stuffe> Araq, hmm I am not wure what that means |
12:04:40 | * | dddddd joined #nim |
12:07:09 | * | pbb quit (Ping timeout: 272 seconds) |
12:07:55 | * | pbb joined #nim |
12:10:37 | * | chemist69 quit (Ping timeout: 260 seconds) |
12:11:17 | * | chemist69 joined #nim |
12:16:54 | Araq | Stuffe: --passL:-rpath --passL:@loader_path |
12:16:59 | Araq | I'm talking about this one |
12:17:27 | Araq | and you might need to set your LD_LIBRARY_PATH |
12:19:01 | * | natrys quit (Ping timeout: 250 seconds) |
12:19:56 | * | natrys joined #nim |
12:24:27 | FromDiscord | <Stuffe> @Araq I just searched my whole system for libnimhcr.dylib but it doesn't seem to exist. Where would I find it? |
12:27:50 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
12:28:30 | * | sagax joined #nim |
12:29:52 | Araq | --hotcodereloading:on is supposed to create it |
12:33:13 | * | zacharycarter quit (Ping timeout: 264 seconds) |
12:33:44 | FromDiscord | <Stuffe> Im trying: nim c -r --hotcodereloading:on --passL:-rpath --passL:@loader_path mymain.nim |
12:33:57 | FromDiscord | <Stuffe> And I'm getting: could not load: libnimhcr.dylib |
12:34:18 | FromDiscord | <Stuffe> And I searched the whole system, libnimhcr.dylib doesn't seem to exist anywhere |
12:36:18 | jken | Anyone have assimp running in modern nim project? The package in the nimble directory is pretty out of date https://github.com/barcharcraz/nim-assimp |
12:36:25 | * | narimiran quit (Quit: leaving) |
12:39:30 | federico3 | jken: there are no releases tagged on github |
12:40:27 | Araq | Stuffe: all I can say that I personally used it on Windows and we test all major OSes |
12:40:45 | Araq | and I need to go, can investigate on my OSX machine later |
12:55:43 | * | filcuc quit (Remote host closed the connection) |
12:56:57 | * | filcuc joined #nim |
13:05:14 | * | filcuc quit (Ping timeout: 240 seconds) |
13:07:56 | FromDiscord | <Spy653> Hi, don't know if I asked the other day but would you guys mind if I asked you to fill out a survey (not now but in general)? I'm doing some research for a personal project of mine |
13:09:06 | FromDiscord | <Spy653> tag on reply, if you can, as it's quiet |
13:13:34 | * | couven92 quit (Ping timeout: 240 seconds) |
13:16:14 | * | JustASlacker joined #nim |
13:20:08 | * | Kaivo joined #nim |
13:24:23 | * | nixfreak quit (Quit: WeeChat 2.5) |
13:28:15 | * | JustASlacker quit (Read error: Connection timed out) |
13:28:44 | * | JustASlacker joined #nim |
13:31:39 | * | rockcavera joined #nim |
13:32:55 | FromGitter | <geotre> @Spy653 sure, what's the project? |
13:33:20 | * | sleepyqt joined #nim |
13:36:09 | FromDiscord | <Spy653> Rip guess the bot can't tag |
13:38:12 | FromDiscord | <Spy653> It's a hardware/software IoT-like solution for people who want more than the currently available shit tier products |
13:40:17 | * | Vladar joined #nim |
13:40:48 | * | krux02 quit (Remote host closed the connection) |
13:40:54 | * | JustASlacker quit (Ping timeout: 240 seconds) |
13:41:46 | * | filcuc joined #nim |
13:45:53 | FromDiscord | <Spy653> The current IoT market makes you pick between an iMac or a DIY kit, I want to give people something better |
13:58:53 | * | jjido joined #nim |
14:06:52 | * | zacharycarter joined #nim |
14:10:25 | * | filcuc quit (Ping timeout: 264 seconds) |
14:11:52 | * | JustASlacker joined #nim |
14:17:29 | * | Vladar quit (Quit: Leaving) |
14:31:40 | * | zacharycarter quit (Ping timeout: 250 seconds) |
14:31:59 | * | PMunch joined #nim |
14:37:14 | * | Kaivo quit (Quit: WeeChat 2.7.1) |
14:41:07 | * | Hideki_ joined #nim |
14:56:31 | * | Hideki_ quit (Remote host closed the connection) |
14:57:07 | * | Hideki_ joined #nim |
15:01:31 | * | Hideki_ quit (Ping timeout: 250 seconds) |
15:04:55 | * | oculuxe joined #nim |
15:05:28 | * | vesper11 quit (Read error: Connection reset by peer) |
15:06:13 | * | oculux quit (Ping timeout: 264 seconds) |
15:07:08 | * | vesper11 joined #nim |
15:07:58 | * | Hideki_ joined #nim |
15:10:29 | * | Hideki_ quit (Remote host closed the connection) |
15:10:46 | * | Hideki_ joined #nim |
15:11:39 | * | Hideki_ quit (Remote host closed the connection) |
15:11:54 | * | Hideki_ joined #nim |
15:13:05 | * | Hideki_ quit (Client Quit) |
15:23:37 | FromDiscord | <mratsim> iMac = IoT? |
15:23:38 | * | filcuc joined #nim |
15:24:39 | FromDiscord | <Spy653> Not literal iMac, figurative |
15:26:46 | FromDiscord | <Spy653> Very expensive item that you have very limited control over and is considered a joke by most |
15:27:18 | FromDiscord | <Spy653> Good at what it does sure, but still very restrictive |
15:34:15 | FromDiscord | <Skaruts> how do you use the keyword `any`? |
15:34:48 | FromDiscord | <Skaruts> seen this in python before, but I totally forgot how it works |
15:35:17 | leorize | it's a generic typeclass in Nim |
15:35:27 | leorize | basically: "match everything" |
15:37:49 | * | rnrwashere joined #nim |
15:38:15 | FromDiscord | <Spy653> Does nim have anything regarding writing strings with wildcard characters or would you just concat a string with variables in it |
15:42:28 | leorize | it depends what you passes the string to |
15:42:30 | * | rnrwashere quit (Ping timeout: 256 seconds) |
15:42:42 | leorize | but strings don't care about what data is in it |
15:52:34 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:54:54 | * | filcuc quit (Ping timeout: 240 seconds) |
15:57:14 | axion | if i do `a[4..7] = [1,2,3,4]` to populate a static array, are there any temporary sequences being allocated on the heap in this process? I'm not very familiar with ranges |
16:00:37 | leorize | no |
16:01:10 | axion | no even for [1..4] on the rhs? |
16:01:48 | leorize | of course, you wanted to modify the array directly, why would we make a temporary buffer? |
16:01:58 | leorize | https://github.com/nim-lang/Nim/blob/version-1-0/lib/system.nim#L4012 |
16:02:06 | leorize | ^ that's the operator doing the copy |
16:02:54 | leorize | oh I misread |
16:03:08 | leorize | the rhs there will be a constant buffer in your program, on the stack |
16:03:18 | axion | that's pretty nice. thanks |
16:05:37 | * | lritter quit (Ping timeout: 264 seconds) |
16:05:48 | axion | Only thing I wish for is a syntax for combined slices. like a[1..3,10..12] = [1..6]. maybe i'll have to write a macro for this some day |
16:11:06 | * | dddddd_ joined #nim |
16:11:31 | * | lritter joined #nim |
16:11:58 | leorize | axion: is this what you want? :P https://play.nim-lang.org/#ix=2eRW |
16:12:20 | * | dddddd quit (Ping timeout: 246 seconds) |
16:12:35 | * | dddddd_ is now known as dddddd |
16:13:54 | axion | syntactically, yes. Though, I'd have to check the assembly to see if that's doing what i'd expect |
16:14:16 | axion | I'm not very familiar with Nim yet to know if that function call overhead will get folded away |
16:18:00 | disruptek | ~stream |
16:18:01 | disbot | stream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek |
16:18:09 | disruptek | more obs plugin hacking to add dbus support. |
16:28:14 | axion | leorize: actually, no, because it's not symmetrical, but that should be an easy fix. |
16:35:12 | leorize | axion: yea I can see what you meant, so here's a tip when you implement that: use toOpenArray for copy-less slicing :) |
16:49:25 | * | JustASlacker quit (Ping timeout: 264 seconds) |
16:49:39 | disruptek | everyone check this amazing package out: |
16:49:53 | disruptek | !repo juancarlospaco/nimbug |
16:49:55 | disbot | https://github.com/juancarlospaco/nimbug -- 9nimbug: 11Nim Semi-Auto Bug Report Tool 15 1⭐ 0🍴 |
16:50:56 | leorize | nice |
16:51:03 | * | arecaceae quit (Remote host closed the connection) |
16:51:10 | disruptek | yeah, i love it. |
16:51:29 | * | arecaceae joined #nim |
16:51:42 | dadada | is juan also in IRC? |
16:51:54 | disruptek | he's on the stream. |
16:52:13 | disruptek | i think we came up with this idea yesterday and he already built the tool. |
16:52:20 | dadada | nifty |
16:55:00 | dadada | sufficiently loud |
16:55:36 | * | sleepyqt quit (Ping timeout: 256 seconds) |
17:04:03 | * | JustASlacker joined #nim |
17:11:08 | * | JustASlacker quit (Ping timeout: 246 seconds) |
17:14:20 | dadada | disruptek: nice music |
17:19:11 | * | natrys quit (Ping timeout: 246 seconds) |
17:26:05 | * | JustASlacker joined #nim |
17:34:51 | shashlick | where can i find examples of forward declarations in C headers for types |
17:37:47 | FromGitter | <kristianmandrup> @alehander92 I fixed the react code so it can now compile and be used. Still some way to go to make it "fully functional" in a real app though |
17:44:34 | * | sleepyqt joined #nim |
17:45:59 | FromDiscord | <KingDarBoja> Wow, Latin American power! |
17:46:28 | FromDiscord | <KingDarBoja> I got another Python related question |
17:46:48 | FromDiscord | <KingDarBoja> Anyone has used Enums on Python like assigning a string value instead of a integer one |
17:47:10 | FromDiscord | <KingDarBoja> Can I do the same in Nim? so far looks like no 🤔 |
17:48:04 | disruptek | type MyEnum = enum Value1 = "firstValue", Value2 = "2ndValue" |
17:48:22 | FromDiscord | <KingDarBoja> Oh! |
17:48:59 | FromDiscord | <KingDarBoja> From the tutorial part I: |
17:48:59 | FromDiscord | <KingDarBoja> > _A variable of an enumeration type can only be assigned one of the enumeration's specified values. These values are a set of ordered symbols. Each symbol is mapped to an integer value internally._ |
17:49:28 | FromDiscord | <KingDarBoja> I got confused by the mapping part |
17:49:41 | disruptek | yes. but what you're doing here is syntactically providing a string constant for the enum. |
17:49:52 | disruptek | such that $Value1 == "firstValue" |
17:50:01 | disruptek | it is otherwise an integer. |
17:50:08 | disruptek | ^ordinal, rather. |
17:50:32 | FromDiscord | <KingDarBoja> Thanks once again! |
17:50:43 | FromDiscord | <KingDarBoja> Do you have a GitHub so I can follow u? D: |
17:51:28 | disruptek | yep. |
17:51:39 | disruptek | or you can watch me code right now. |
17:51:40 | disruptek | ~stream |
17:51:41 | disbot | stream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek |
17:53:08 | FromDiscord | <KingDarBoja> Awesome! _Mr. Robot intensifies_ |
18:05:47 | * | krux02 joined #nim |
18:13:55 | FromDiscord | <KingDarBoja> Another question but related to Nim, how to do a test suite? Like python has pytest (or unittest) |
18:15:21 | FromGitter | <zetashift> Nim has unittest |
18:15:32 | FromGitter | <zetashift> and you can run your tests with nimble test |
18:15:39 | FromGitter | <zetashift> If that is what you mean |
18:15:59 | FromDiscord | <KingDarBoja> https://nim-lang.org/docs/unittest.html this one u mean? |
18:16:39 | dadada | KingDarBoja: yes, I'm using it right now, it's simple |
18:17:32 | FromDiscord | <Recruit_main707> how can i compile my program so that its 32bit instead of 64? |
18:18:02 | FromDiscord | <KingDarBoja> Gonna try it, if any question, I will return, thanks 😄 |
18:22:31 | FromGitter | <kaushalmodi> Recruit_main707: `nim c --cpu:i386 --passC:-m32 --passL:-m32 foo.nim` |
18:22:57 | FromGitter | <kaushalmodi> https://scripter.co/notes/nim/#compiling-in-32-bit-mode |
18:23:03 | PMunch | Doesn't --cpu:i386 set the m flags? |
18:23:10 | leorize | nope |
18:23:46 | leorize | though we can certainly make it do so |
18:24:42 | PMunch | Is there a reason why it doesn't? |
18:26:10 | FromDiscord | <KingDarBoja> Ummm having problems to import some module |
18:26:53 | FromDiscord | <KingDarBoja> If my dir structure is like: |
18:26:53 | FromDiscord | <KingDarBoja> - src |
18:26:53 | FromDiscord | <KingDarBoja> -- dirA |
18:26:53 | FromDiscord | <KingDarBoja> --- moduleA.nim |
18:26:53 | FromDiscord | <KingDarBoja> --- moduleB.nim |
18:26:54 | FromDiscord | <KingDarBoja> - test |
18:26:54 | FromDiscord | <KingDarBoja> -- some_file.nim |
18:27:08 | FromDiscord | <KingDarBoja> I want to import moduleA stuff on some_file inside my test dir |
18:36:47 | leorize | import dirA / moduleA |
18:37:26 | FromDiscord | <KingDarBoja> Without the src part? |
18:39:52 | FromDiscord | <KingDarBoja> https://github.com/nim-lang/nimble#tests I added this but without success |
18:40:38 | FromDiscord | <KingDarBoja> Nevermind, looks like it is VSCode once again showing errors on save after switching files |
18:48:55 | FromDiscord | <KingDarBoja> `Error: invalid module name: .nim` wut? After running nimble test |
18:48:59 | * | rnrwashere joined #nim |
18:52:21 | FromDiscord | <KingDarBoja> Had to provide whole path to the nim file including the test file name |
18:53:06 | FromDiscord | <KingDarBoja> It is possible to run all tests inside the `tests` folder? Or I have to specify each one on my test task? |
18:54:04 | FromDiscord | <Recruit_main707> compilation failed, it could be that i call kernel.dll? |
18:55:43 | axion | How would I construct a large array of all zeros in a let binding without specifying all the values? |
18:55:44 | leorize | @KingDarBoja: import without the .nim part :P |
18:55:57 | leorize | axion: use default(T) |
18:56:08 | axion | hmm |
18:56:59 | axion | I'm not familiar with how to use that |
18:57:25 | leorize | !eval let array = default(array[100, int]); echo array |
18:57:28 | NimBot | [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] |
18:58:06 | axion | I see. and if I wanted non-zero I'd have to use algorithm.fill? |
18:58:26 | FromDiscord | <KingDarBoja> Arhhh have no idea how to compare a Enum value with a string |
18:58:58 | FromDiscord | <KingDarBoja> Like `x = south` (from the tutorial example), want to do `check(x == "south")` |
18:59:07 | FromDiscord | <KingDarBoja> But doesn't work (error on the console) |
18:59:19 | leorize | axion: yea |
18:59:26 | leorize | though it'll look like this instead: |
18:59:34 | disruptek | $someEnum == "some string" |
18:59:34 | FromDiscord | <KingDarBoja> `Error: type mismatch: got <Direction, string> but expected one of:proc ==[Enum: enum](x, y: Enum): bool` |
19:00:06 | leorize | import algorithm, sugar; let array = default(array[100, int]).dup(fill(10)); echo array |
19:00:14 | FromDiscord | <KingDarBoja> 🤦♂️ Ah... |
19:00:34 | leorize | axion: that snippet requires devel though |
19:00:45 | axion | ah i have to look up dup |
19:00:55 | FromDiscord | <KingDarBoja> What about: |
19:00:55 | FromDiscord | <KingDarBoja> > It is possible to run all tests inside the tests folder? Or I have to specify each one on my test task? |
19:01:02 | * | rnrwashere quit (Remote host closed the connection) |
19:01:03 | leorize | axion: https://nim-lang.github.io/Nim/sugar.html#dup.m%2CT%2Cvarargs%5Buntyped%5D |
19:01:33 | axion | why copy? |
19:01:39 | * | rnrwashere joined #nim |
19:01:52 | leorize | axion: you want to do it all in a let |
19:01:59 | leorize | then that's the best solution :P |
19:02:27 | * | ehmry quit (Remote host closed the connection) |
19:02:33 | leorize | or this: let array = (var a: array[100, int]; a.fill(10); a) |
19:02:37 | leorize | works the same |
19:03:07 | leorize | side effects is that it might confuse beginners |
19:03:51 | * | ehmry joined #nim |
19:04:45 | * | JustASlacker quit (Ping timeout: 256 seconds) |
19:05:09 | FromDiscord | <KingDarBoja> ugh, running `nim c -r tests/somepath/somemodule` generates a .exe file |
19:05:56 | * | rnrwashere quit (Ping timeout: 246 seconds) |
19:11:49 | FromDiscord | <KingDarBoja> The docs on nimble website are outdated, they still showing `--path` inside`nim.cfg` but it should be `switch("path", "$projectDir/../src")` on `config.nims` |
19:13:11 | leorize | nim.cfg is still supported |
19:13:23 | * | luis_ joined #nim |
19:14:02 | FromDiscord | <KingDarBoja> I mean, the readme points to some `config.nims` as it was changed 8 days ago... |
19:14:46 | leorize | oh lol, then you should PR in an edit to change that |
19:16:01 | FromDiscord | <KingDarBoja> Errr I got worng, it was changed at Nov 2019 lol |
19:16:07 | FromDiscord | <KingDarBoja> https://github.com/nim-lang/nimble/commit/16ba5db44e0a9132f966a2082012cc3520bfec06 |
19:17:03 | federico3 | koch attempts to git pull / git clone a lot of stuff without asking permission. This should not happen |
19:42:58 | * | luis_ quit (Ping timeout: 246 seconds) |
19:51:59 | * | luis_ joined #nim |
19:58:01 | * | couven92 joined #nim |
20:00:34 | * | couven92 quit (Read error: Connection reset by peer) |
20:01:15 | * | couven92 joined #nim |
20:07:30 | FromDiscord | <Recruit_main707> i get this error when trying to compile to 32bits `cannot find -lmsvcrt` |
20:16:38 | * | luis_ quit (Ping timeout: 246 seconds) |
20:22:55 | * | rnrwashere joined #nim |
20:44:19 | PMunch | So you're missing the msvcrt library |
20:44:37 | * | NimBot joined #nim |
20:44:48 | PMunch | Probably a library that you have the 64-bit version of, but not the 32-bit one |
20:44:54 | PMunch | Recruit_main707 ^ |
20:45:07 | FromDiscord | <Recruit_main707> hmmm |
20:45:18 | FromDiscord | <Rika> ms visual c runtime |
20:45:47 | FromDiscord | <Rika> well, visual c++ |
20:45:56 | FromDiscord | <Recruit_main707> i guess ill stick to 64bit, thanks both though! |
20:51:55 | * | rnrwashere quit (Remote host closed the connection) |
20:55:40 | * | rnrwashere joined #nim |
20:59:36 | * | andinus quit (Quit: ERC (IRC client for Emacs 26.3)) |
21:25:39 | disruptek | leorize! this new pragma positioning! argggh! |
21:26:42 | FromDiscord | <Rika> what new pragma positioning |
21:26:45 | * | rnrwashere quit (Remote host closed the connection) |
21:26:50 | * | luis_ joined #nim |
21:28:22 | disruptek | in the nvim.nim nim.nvim w/e |
21:29:00 | leorize[m] | disruptek: sounds like a bug, do you have a clip about it? |
21:29:07 | disruptek | it's on stream if you want. |
21:30:08 | FromDiscord | <Rika> what if he doesnt huhhh |
21:30:47 | leorize[m] | I'm not watching atm, sorry |
21:30:50 | disruptek | kk |
21:41:01 | * | rnrwashere joined #nim |
21:58:34 | * | solitudesf quit (Ping timeout: 240 seconds) |
21:59:41 | disruptek | there's some kind of bug with pathsubs now. |
21:59:59 | disruptek | i don't understand these changes to the default config file handling. |
22:08:24 | FromDiscord | <Kenran> I'm trying to do something with the `sdl2` library. While copying the example code, I got "type mismatch: got <Bool32> but expected 'bool'" in `while pollEvent(evt):`. `pollEvent` does indeed return `Bool32`. How can I get out of that? |
22:09:13 | * | vesper11 quit (Ping timeout: 250 seconds) |
22:10:35 | FromDiscord | <Kenran> Oh, nevermind, I could get rid of the error by changing my `from sdl2 import nil` to `import sdl2` on a hunch. I still don't understand why that fixes it, though. Any hint? |
22:11:48 | * | vesper11 joined #nim |
22:13:15 | Yardanico | Probably because sdl2 module contains a converter which converts Bool32 to bool automatically |
22:13:31 | Yardanico | https://github.com/nim-lang/sdl2/blob/master/src/sdl2.nim#L351 |
22:13:49 | Yardanico | also I'd recommend to use https://github.com/Vladar4/sdl2_nim for sdl2 in nim :) |
22:15:14 | * | dadada quit (Ping timeout: 240 seconds) |
22:18:53 | FromDiscord | <Kenran> thanks, and noted 🙂 I'll try that one tomorrow |
22:19:26 | FromDiscord | <Kenran> I have a small problem with not being able to start my executable (can't find `libSDL2.so`), but I'm pretty sure that's coming from NixOS |
22:21:08 | FromGitter | <zetashift> does nixos have the sdl2-dev library? |
22:21:22 | Yardanico | @Kenran it's probably due to NixOS not following the FHS |
22:21:56 | * | dadada joined #nim |
22:21:57 | Yardanico | you might need to use patchelf on NixOS to run your compiled binaries |
22:22:19 | * | dadada is now known as Guest54208 |
22:24:53 | * | SenasOzys joined #nim |
22:30:27 | * | couven92 quit (Read error: Connection reset by peer) |
22:32:37 | * | Guest54208 quit (Ping timeout: 264 seconds) |
22:36:52 | * | dadada joined #nim |
22:37:15 | * | dadada is now known as Guest30874 |
22:44:22 | * | Guest30874 quit (Ping timeout: 250 seconds) |
22:49:29 | * | filcuc joined #nim |
22:51:55 | * | dadada__ joined #nim |
23:15:31 | * | dadada__ quit (Ping timeout: 250 seconds) |
23:17:20 | * | tane quit (Quit: Leaving) |
23:19:58 | * | luis_ quit (Ping timeout: 246 seconds) |
23:21:54 | * | dadada__ joined #nim |
23:24:45 | * | drewr quit (Ping timeout: 240 seconds) |
23:25:32 | * | lritter quit (Ping timeout: 250 seconds) |
23:40:32 | * | hugh joined #nim |
23:44:14 | * | hugh quit (Quit: Leaving) |
23:45:28 | * | dadada__ quit (Ping timeout: 250 seconds) |
23:46:36 | * | dadada joined #nim |
23:46:59 | * | dadada is now known as Guest9949 |
23:53:14 | * | dwdv quit (Quit: quit) |
23:58:55 | * | rnrwashere quit (Remote host closed the connection) |