00:11:52 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
00:12:06 | * | Gustavo6046 joined #nim |
00:41:14 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
00:41:40 | * | Gustavo6046 joined #nim |
01:08:51 | * | Gustavo6046 quit (Ping timeout: 245 seconds) |
01:09:29 | * | Gustavo6046 joined #nim |
01:21:58 | * | neurocyte0132889 quit (Ping timeout: 265 seconds) |
01:29:43 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
01:30:01 | * | Gustavo6046 joined #nim |
01:34:31 | * | Gustavo6046_ joined #nim |
01:35:06 | * | Gustavo6046 quit (Ping timeout: 245 seconds) |
01:37:50 | * | Gustavo6046_ is now known as Gustavo6046 |
01:43:40 | * | Egeon joined #nim |
01:48:53 | * | arkurious quit (Quit: Leaving) |
02:40:02 | * | Gustavo6046_ joined #nim |
02:40:06 | * | Gustavo6046 quit (Ping timeout: 245 seconds) |
02:42:02 | * | Gustavo6046_ is now known as Gustavo6046 |
02:45:50 | * | Gustavo6046 quit (Excess Flood) |
02:54:42 | * | Gustavo6046 joined #nim |
02:58:19 | * | Gustavo6046 quit (Read error: Connection reset by peer) |
03:01:38 | * | Gustavo6046 joined #nim |
03:08:05 | * | Gustavo6046 quit (Read error: Connection reset by peer) |
03:12:25 | * | Gustavo6046 joined #nim |
03:18:39 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
03:19:10 | * | Gustavo6046 joined #nim |
03:36:31 | * | Gustavo6046 quit (Read error: Connection reset by peer) |
03:39:05 | * | Gustavo6046 joined #nim |
03:45:56 | * | euantorano quit (Ping timeout: 245 seconds) |
03:46:21 | * | notchris quit (Ping timeout: 245 seconds) |
03:46:35 | * | LyndsySimon quit (Ping timeout: 264 seconds) |
03:47:19 | * | euantorano joined #nim |
03:49:45 | * | LyndsySimon joined #nim |
03:59:34 | * | Gustavo6046 quit (Ping timeout: 252 seconds) |
04:00:39 | * | Gustavo6046 joined #nim |
04:00:40 | * | Gustavo6046 quit (Client Quit) |
04:00:50 | * | notchris joined #nim |
04:01:45 | * | Gustavo6046 joined #nim |
04:06:01 | * | supakeen quit (Quit: WeeChat 3.3) |
04:06:30 | * | supakeen joined #nim |
04:07:39 | * | rockcavera quit (Remote host closed the connection) |
04:22:40 | * | Gustavo6046 quit (Ping timeout: 252 seconds) |
04:22:49 | * | Gustavo6046_ joined #nim |
04:26:09 | * | Gustavo6046_ is now known as Gustavo6046 |
05:08:26 | Egeon | Anyone know what is wrong with this? https://play.nim-lang.org/#ix=3Cbu |
05:09:54 | FromDiscord | <impbox [ftsf]> other than the error message? |
05:11:26 | Egeon | It is not a complete code, but the first output shouldnt be 16 but 80, coded for "P" in ASCII |
05:11:42 | FromDiscord | <impbox [ftsf]> "it looks like you're trying to write malware" |
05:12:07 | Egeon | nah |
05:13:05 | Egeon | Are you helping? |
05:13:47 | FromDiscord | <Rika> Hard to help, what is the definition of the shell code variable |
05:13:49 | FromDiscord | <impbox [ftsf]> nah |
05:13:50 | FromDiscord | <Rika> What type |
05:14:06 | FromDiscord | <impbox [ftsf]> you can figure out how to write malware without help |
05:14:19 | Egeon | byte array |
05:14:29 | FromDiscord | <Rika> Array or seq |
05:14:36 | FromDiscord | <Rika> You cannot cast arrays to string |
05:14:47 | FromDiscord | <Rika> Different structure |
05:14:50 | Egeon | fixed byte array not seq |
05:15:01 | FromDiscord | <Rika> Well then there’s the first issue |
05:16:17 | Egeon | I do it just fine on line 11 the assert went through |
05:17:36 | FromDiscord | <Rika> Probably coincidence, I am certain that is UB |
05:17:47 | FromDiscord | <Rika> Rather not UB but incorrect logic |
05:19:38 | FromDiscord | <Rika> Ah I see |
05:19:49 | FromDiscord | <Rika> The slice index returns a sequence |
05:19:55 | FromDiscord | <Rika> So the cast works for the first part |
05:20:05 | Egeon | What is UB? |
05:20:21 | Egeon | aha I see |
05:21:45 | FromDiscord | <Rika> On the second part, use `cast[PeHeader](shellcode[pe..pe+sizeof(PeHeader)-1].addr)` I think will work |
05:22:39 | Egeon | So I should replace the slice to some other function to return a pure byte array. What'd you recommend? |
05:25:32 | Egeon | OK ty! you dint answer what is UB? I saw it mentioned twice yesterday and just now and I'm curious. |
05:27:19 | FromDiscord | <Elegantbeef> Undefined behaviour |
05:27:47 | FromDiscord | <Elegantbeef> Logic that may depend on the compiler or architecture you're using |
06:07:44 | FromDiscord | <Schelz> hi, how should I write the args if i want to compile the nim script as dll and enable ssl support |
06:07:45 | FromDiscord | <Schelz> ? |
06:08:55 | FromDiscord | <Schelz> I know that for ssl its "-d:ssl" but how do i add the second one |
06:11:02 | FromDiscord | <Elegantbeef> I assume you dont actually mean nimscript, but nim, i beleive it should be `--app:lib` i could be wrong |
06:12:21 | FromDiscord | <Elegantbeef> you may need `--noMain:on` aswell |
06:15:02 | FromDiscord | <Schelz> and for multiple args for -d its like this ? https://media.discordapp.net/attachments/371759389889003532/899903447367823410/unknown.png |
06:15:37 | FromDiscord | <Elegantbeef> nope you just do more `-d:`s |
06:15:55 | FromDiscord | <Schelz> aha ok, thx |
06:16:00 | FromDiscord | <Elegantbeef> `nim c -d:ssl -d:useNimRtl --app:lib --noMain:on main.nim` |
06:16:31 | FromDiscord | <Elegantbeef> You can of course make a `config.nims` and define all of these behind a single switch |
06:17:29 | FromDiscord | <Schelz> got it work thx |
06:25:26 | FromDiscord | <Schelz> and one last question how do I compile it for x86 architecture |
06:26:18 | FromDiscord | <Elegantbeef> `--cpu:i386` i believe |
06:26:33 | FromDiscord | <Elegantbeef> Though x86 is ambiguous |
06:26:37 | FromDiscord | <Elegantbeef> Just assume you mean 32bit |
06:26:47 | FromDiscord | <Schelz> yep |
07:05:47 | * | PMunch joined #nim |
08:04:34 | * | PMunch quit (Remote host closed the connection) |
08:05:14 | * | PMunch joined #nim |
08:27:50 | FromDiscord | <Varriount> @Araq I'm still skeptical regarding `Isolated[T]`'s flexibility. Even if it works, that doesn't necessarily mean it will have low-enough friction to be useful. |
08:28:52 | FromDiscord | <Varriount> This is mostly based off my observations of the `spawn` mechanism. |
08:29:36 | FromDiscord | <Varriount> (which seems to operate on a similar premise) |
08:48:22 | FromDiscord | <narimiran> Nim 1.6 is out!! https://nim-lang.org/blog/2021/10/19/version-160-released.html |
08:49:07 | NimEventer | New thread by Miran: Nim 1.6 is out!!, see https://forum.nim-lang.org/t/8511 |
08:58:31 | FromDiscord | <exelotl> aaaaaaaa congrats |
09:00:34 | PMunch | Neat! |
09:06:32 | PMunch | This is a nice blurb: A practical, compiled systems programming language offering C++-like perfomance and portability, Python-like syntax, Lisp-like flexibility, strong C, C++, JS, Python interop, and best-in-class metaprogramming. |
09:08:29 | FromDiscord | <impbox [ftsf]> woo! congrats |
09:08:45 | PMunch | Hmm, iterable[T], is that any type which has an `items` iterator? Is there a iterable[T, K] which has a `pairs` iterator? |
09:08:51 | mst | yah, neat blurb indeed |
09:08:56 | PMunch | Is there a miterator[T] for mutables? |
09:09:48 | PMunch | Ah duh, it's all explained further down.. |
09:10:16 | FromDiscord | <impbox [ftsf]> "deprecated a number of error prone or redundant features" |
09:10:44 | FromDiscord | <impbox [ftsf]> doesn't seem to be much detail on this |
09:11:20 | PMunch | Well, the iterator section didn't answer any of my questions :P |
09:11:41 | PMunch | So is iterable only to take an iterator? |
09:12:43 | FromDiscord | <impbox [ftsf]> lets you pass iterators to things |
09:13:53 | PMunch | Aha, so you can do `sum(mySeq.items)` it seems, and `sum(mySeq.pairs)` where T would be a key/value tuple |
09:13:58 | PMunch | That's pretty cool! |
09:15:58 | FromDiscord | <Rika> Cool |
09:17:54 | * | rockcavera joined #nim |
09:17:55 | * | rockcavera quit (Changing host) |
09:17:55 | * | rockcavera joined #nim |
09:46:23 | FromDiscord | <haxscramper> compiler explorer PR done |
09:46:55 | FromDiscord | <haxscramper> and someone submitted release notes on hackernews already |
09:58:29 | FromDiscord | <Schelz> how can i make in nim a for loop range |
09:58:41 | FromDiscord | <Schelz> ex in python for i in range(0, 23) |
09:58:48 | FromDiscord | <enthus1ast> for idx in 0..10\: |
09:58:52 | FromDiscord | <haxscramper> `for i in 0 ..< 23` |
09:58:52 | FromDiscord | <Schelz> (edit) "i" => ""i" | "23)" => "23)"" |
09:58:59 | FromDiscord | <Schelz> thx |
10:16:43 | * | Vladar joined #nim |
10:33:54 | FromDiscord | <tandy> is there a way to print tables nicely? |
10:34:31 | FromDiscord | <pointystick> Try this: https://github.com/xmonader/nim-terminaltables |
10:38:22 | FromDiscord | <tandy> ty |
10:38:37 | FromDiscord | <tandy> also is there a way to create a HttpHeaders object from a table? |
10:39:41 | * | Egeon quit (Ping timeout: 245 seconds) |
10:40:14 | * | Egeon joined #nim |
10:44:53 | FromDiscord | <tandy> omg why are httpheaders so fucked |
10:45:13 | FromDiscord | <tandy> https://github.com/nim-lang/Nim/issues/12211 |
10:46:35 | mst | oh, what a tangled web we weave |
10:47:51 | mst | ... |
10:47:52 | mst | > btw, writing "thou" and "shalt" in an issue makes me skip over what you've written. |
10:47:56 | * | mst sulks |
10:50:32 | mst | tandy, without diminishing how bloody annoying this is, IME practically every http header implementation in every language starts off underestimating just how ridiculous HTTP in the wild will turn out to be and how much "fun" that's going to end up being in the long run |
10:51:21 | mst | generally when you find one that -does- manage to handle all this stuff, it either means the implementation got there the hard way years ago, or the implementor got there the hard way on a previous attempt somewhere |
10:52:46 | FromDiscord | <tandy> lol i bet↵(<@709044657232936960_mst=5b=49=52=43=5d>) |
10:56:05 | FromDiscord | <tandy> ok i switched back to using seq[(string, string)] |
10:58:41 | FromDiscord | <Rika> btw `{"key": "val"}` is `seq[(string, string)]` |
10:58:45 | FromDiscord | <pointystick> sent a code paste, see https://play.nim-lang.org/#ix=3Ccv |
10:59:55 | PMunch | Another option for printing tables: https://github.com/PMunch/nancy |
11:00:07 | FromDiscord | <haxscramper> https://github.com/nim-lang/Nim/blob/version-1-6/lib/pure/collections/tables.nim#L301 you can just copy this for tableref |
11:00:13 | FromDiscord | <tandy> do you have a way of going from headers to seq again?↵(@pointystick) |
11:00:16 | FromDiscord | <haxscramper> and technically `@{}` is a `seq`, `{}` is an array. |
11:01:01 | * | Vladar quit (Ping timeout: 258 seconds) |
11:01:06 | FromDiscord | <Rika> ah i see |
11:01:08 | FromDiscord | <Rika> forgot |
11:01:09 | FromDiscord | <Rika> lol |
11:01:16 | FromDiscord | <Rika> tandy: "blah.pairs.toSeq" |
11:01:24 | FromDiscord | <Rika> oh headers |
11:01:25 | FromDiscord | <Rika> wait here |
11:01:31 | FromDiscord | <tandy> nvm |
11:01:36 | FromDiscord | <Rika> headers.pairs.toSeq xddddd |
11:01:41 | FromDiscord | <tandy> lol |
11:01:42 | PMunch | HttpHeaders have a tables field which is the internal table |
11:03:00 | FromDiscord | <tandy> oh shit |
11:03:07 | FromDiscord | <tandy> i just remebered again why i started using tables |
11:03:17 | FromDiscord | <tandy> i cant index a seq by a [] |
11:03:42 | FromDiscord | <Rika> lol |
11:03:44 | FromDiscord | <Rika> you can |
11:03:47 | FromDiscord | <Rika> not with strings |
11:03:48 | FromDiscord | <Rika> hehe |
11:03:49 | FromDiscord | <soupayan> is nim a transpiler? |
11:03:53 | PMunch | No |
11:03:53 | FromDiscord | <Rika> no |
11:03:59 | FromDiscord | <tandy> ok so i dont need to convert the response headers |
11:04:06 | FromDiscord | <tandy> il keep those as a tableref |
11:05:01 | FromDiscord | <soupayan> nim in action says that nim converts to c code and then compiles |
11:05:10 | FromDiscord | <Rika> yes |
11:05:12 | PMunch | That's it, I'm writing an article about this "Is Nim a transpiler nonsense".. |
11:05:12 | FromDiscord | <Rika> that does not make it a transpiler |
11:05:15 | mst | the concept of 'transpiler' is fuzzy and not really worth thinking about |
11:05:21 | FromDiscord | <Rika> C converts to asm and then assembles |
11:05:35 | FromDiscord | <Rika> PMunch: you are god |
11:05:49 | PMunch | Haha, I'm just tired of answering the same question over and over again :P |
11:05:53 | mst | e.g. rustc goes via LLVM IR as it compiles |
11:06:05 | mst | PMunch: that's pretty much the impetus for all my best articles |
11:06:09 | FromDiscord | <Rika> just call it a compiler man theres no meaningful difference |
11:06:11 | mst | PMunch: Frequently Delivered Answers |
11:06:50 | mst | and honestly I find C a much easier to debug IR than LLVM's is ;) |
11:06:52 | FromDiscord | <haxscramper> I was away for ten god damn minutes and we are back to transpiler |
11:06:52 | FromDiscord | <retkid> do you guys use sugar often? This stuff looks useful but im afraid it might reduce readability |
11:06:54 | FromDiscord | <soupayan> ok.. i was just confused.. did not mean to step on anything 😋 |
11:07:04 | FromDiscord | <Rika> its okay |
11:07:05 | FromDiscord | <tandy> ree↵(@Rika) |
11:07:14 | FromDiscord | <Rika> In reply to @retkid "do you guys use": for me, no |
11:07:18 | FromDiscord | <haxscramper> `collect` is good, does not reduce readability. everything else is up to debate↵(@retkid) |
11:07:19 | FromDiscord | <haxscramper> also `std/with` |
11:07:21 | FromDiscord | <Rika> i prefer `proc(): =` over `=>` |
11:07:35 | FromDiscord | <haxscramper> IMO it should be in sugar, but it is super useful for multiple calls over the same object |
11:07:39 | FromDiscord | <Rika> i'm still not used to using collect but i intend to migrate |
11:07:44 | PMunch | @soupayan, oh not at all. It's just a question we get asked quite often, and one which some people have very strong feelings about |
11:07:45 | mst | soupayan, basically, the term 'transpiler' can mean lots of things, sometimes descriptive, sometimes insulting, almost always less useful than being explicit |
11:07:58 | FromDiscord | <Rika> `std/with` sounds good, alsto thinking of trying it out |
11:08:16 | mst | it's one of those words I honestly kinda wish nobody had ever come up with |
11:08:29 | FromDiscord | <retkid> I like filter() (i know its in sequtils but its kinda sugar adjacent) but its syntax is a little bit weird |
11:08:31 | FromDiscord | <soupayan> In reply to @mst "<@846808276557234176>, basically, the term": yes, i agree.. |
11:08:32 | PMunch | @retkid, I use sugar once in a while. But mostly for `() =>` |
11:08:45 | FromDiscord | <Rika> In reply to @retkid "I like filter() (i": nah its fairly standard with functional programming |
11:08:52 | PMunch | To be honest I just haven't checked out the module in a while and I tend to forget it's there :P |
11:09:09 | FromDiscord | <retkid> I've yet to learn a functional lang |
11:09:28 | FromDiscord | <Rika> i learned some basic haskell and i actually liked it a bit |
11:09:40 | PMunch | `dump` is also pretty nice, but I always forget about it.. |
11:09:50 | FromDiscord | <Rika> what's dump? |
11:10:03 | FromDiscord | <Rika> is that like `&"{variable=}"`? |
11:10:19 | FromDiscord | <haxscramper> If dup wasn't so dysfunctional it could be used more often as well |
11:10:30 | mst | I learned enough scheme back in 2003 or so to embed guile into another program to give me async/await like semantics in the top level control flow of a callback based async I/O system by (ab)using call/cc |
11:10:43 | mst | that was good fun, though possibly only if you're me |
11:10:44 | PMunch | @retkid, I highly recommend learning one, I read Clojure for the Brave and True and it's a great way to learn both about functional languages, but also just thoroughly enjoyable |
11:11:06 | PMunch | @haxscramper, why is dump dysfunctional? |
11:11:08 | FromDiscord | <retkid> yea Clojure looks kinda insane to me |
11:11:08 | FromDiscord | <Rika> dup is dysfunctional? damn how |
11:11:17 | PMunch | Oh dup :P |
11:11:19 | FromDiscord | <Rika> pmunch: he said dup |
11:11:21 | FromDiscord | <Rika> xd |
11:11:26 | NimEventer | New thread by Puruneko: Strange-like behavior in openArray in multiple types, see https://forum.nim-lang.org/t/8512 |
11:11:31 | FromDiscord | <retkid> when i was learning JVM langs I looked at scala and basically shat myself |
11:11:42 | PMunch | Clojure is just pure joy |
11:11:46 | PMunch | Such a nice language |
11:12:11 | FromDiscord | <retkid> after im done with this project i was thinking about learning Racket |
11:12:14 | mst | retkid, I had much the same reaction to the syntax and, uh, for calibration, I willingly write a lot of perl |
11:12:32 | FromDiscord | <Rika> functional languages fit how i think somewhat |
11:12:34 | FromDiscord | <Rika> its really fun |
11:14:02 | FromDiscord | <haxscramper> It is dysfunctional because most of the stdlib does not account for it (there are almost no in-place things for strutils). Also, it cannot parse `discard procThatReturnsAndMutates()` and it was kind of problematic |
11:14:19 | * | Vladar joined #nim |
11:15:36 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3CcE |
11:26:54 | FromDiscord | <tandy> [leorize](https://matrix.to/#/@leorize:envs.net)\: im about to start writing a jsony de/serialiser for union |
11:28:14 | mst | I'm guessing you mean json-ish ? |
11:28:48 | * | mst only asks cos ingy (author of YAML) and I actually wrote something called JSONY a few years back for JSON-like config files ;) |
11:30:12 | mst | (basically "JSON but with most of the syntax optional, so your configs were nice and easy to write but you could trivially paste/template in a chunk of actual JSON and that would parse as part of the document too, a number of sysadmins quite liked it for small things) |
11:35:24 | FromDiscord | <tandy> haha no, im talking about https://github.com/treefrom/jsony↵(<@709044657232936960_mst=5b=49=52=43=5d>) |
11:37:09 | FromDiscord | <tandy> that should be https://github.com/treeform/jsony |
11:41:55 | FromDiscord | <Jonah> what's the best way to automatically print the json node when doing `node.to(Struct)` errors? i'm trying to improve the crash messages from bad json data with the stdlib json library |
11:42:59 | FromDiscord | <Rika> catch the error, print the node, reraise the error |
11:45:34 | FromDiscord | <Jonah> do i have to just duplicate that code on every parse then |
11:45:37 | FromDiscord | <tandy> In reply to @tandy "[leorize](https://matrix.to/#/@leorize:envs.net)\: ": @treeform would you have any interest in me making a PR for this? |
12:00:00 | FromDiscord | <retkid> In reply to @tandy "[leorize](https://matrix.to/#/@leorize:envs.net)\: ": is marshal not good enough for you |
12:00:20 | FromDiscord | <retkid> marshal: am i joke to you |
12:01:14 | PMunch | mst, that actually sounds pretty interesting. Do you have a link to the project? |
12:02:12 | mst | p3rl.org/JSONY is the implementation we put together |
12:02:47 | mst | note that it's using a PEG grammar under the hood to be easy to port to other stuff, but I dunno if anybody did |
12:04:30 | FromDiscord | <tandy> marshal is slow and not flexible, also i think jsony support more type features↵(@retkid) |
12:04:53 | FromDiscord | <retkid> marshal has treated me well |
12:05:07 | FromDiscord | <retkid> however i have not had more than like 8 mb |
12:05:29 | FromDiscord | <retkid> sorry its 16 mb |
12:05:52 | FromDiscord | <retkid> are you sure its not a disk limit @tandy |
12:05:57 | FromDiscord | <retkid> In reply to @tandy "marshal is slow and": |
12:06:01 | * | supakeen quit (Quit: WeeChat 3.3) |
12:06:31 | * | supakeen joined #nim |
12:06:47 | FromDiscord | <Rika> ? where was disk limits mentioned |
12:07:23 | PMunch | Hmm, I wonder what would happen if I ran Futhark on the C code generated by Nim :P |
12:14:41 | NimEventer | New post on r/nim by trustable-code: Nim version 1.6.0 released, see https://reddit.com/r/nim/comments/qba84c/nim_version_160_released/ |
12:17:02 | * | rockcavera quit (Remote host closed the connection) |
12:17:41 | PMunch | @Rika, @mst, @soupayan: https://peterme.net/is-nim-a-transpiler.html |
12:19:25 | mst | PMunch: coffeescript is probably the single most central example |
12:23:46 | FromDiscord | <narimiran> @PMunch nice article! i predict this one to be shared even more than the object vs ref object one 🙂 |
12:25:06 | FromDiscord | <haxscramper> good |
12:25:06 | FromDiscord | <haxscramper> good article\ |
12:26:19 | PMunch | @mst, I tried to use examples who actually referred to themselves as transpilers |
12:27:12 | PMunch | But yeah, coffeescript will probably fall under most peoples definition |
12:27:29 | FromDiscord | <haxscramper> it it possible to dump LLVM IR from clang? |
12:27:39 | FromDiscord | <haxscramper> IIRC it is still somewhat readable |
12:27:59 | FromDiscord | <haxscramper> Can be used as an example of abstraction level drop for cxx for example |
12:28:22 | PMunch | @narimiran, this one? https://peterme.net/nim-types-originally-a-reddit-reply.html |
12:28:38 | FromDiscord | <narimiran> yeah |
12:29:01 | mst | PMunch: you mean like https://coffeescript.org/#transpilation |
12:29:21 | mst | PMunch: oh, shit, it's calling *babel* a transpiler, sorry, misread |
12:30:02 | mst | PMunch: I'm about 98% sure that I first encountered the term transpiler because it gained popularity being used to describe coffeescript, but fair point about the self-description |
12:30:12 | PMunch | Haha, I like how Babel has in big bold yellow letters at the top of their page "Babel is a JavaScript compiler." |
12:30:17 | PMunch | So yeah, flexible term .P |
12:30:20 | mst | *LOL* |
12:30:37 | mst | 'transpiler, n.: somebody else's compiler' |
12:30:45 | PMunch | Haha, exactly! |
12:37:55 | PMunch | @mst, added some notes about Babel and CoffeeScript and just had to throw that definition in there. Let me know if you want me to change the attribution |
12:38:15 | FromDiscord | <el__maco> aren't most (new) compilers transpilers these days. They transpile to LLVM's IR don't they |
12:38:33 | PMunch | Did you read the article? |
12:38:40 | FromDiscord | <haxscramper> `nuclear.jpg` |
12:38:44 | mst | PMunch: fine by me :D |
12:39:10 | FromDiscord | <el__maco> which article? |
12:39:27 | FromDiscord | <haxscramper> https://peterme.net/is-nim-a-transpiler.html |
12:39:46 | PMunch | The definition is kinda floating. By loosest of definitions then yes compiling to LLVM's IR is a transpilation. But for the term to actually be useful it's not a very good way to use the term |
12:40:28 | mst | I think your "level of abstraction" heuristic is pretty good, in so far as the term is useful at all |
12:41:54 | FromDiscord | <el__maco> yeah idk, the article seems to have a point but its mostly about semantics and arguing about semantics is rarely very worthwhile it would feel like |
12:41:59 | PMunch | Well the problem (as I note in the penultimate section) is that no two languages are exactly the same, so determining the "level of abstraction" isn't exactly trivial |
12:42:27 | PMunch | @el__maco, when talking about terms semantics is pretty much the only thing you can argue |
12:42:52 | FromDiscord | <narimiran> "arguing about semantics is rarely very worthwhile" - and here we are, throwing transpiler left and right |
12:43:12 | FromDiscord | <haxscramper> sent a long message, see http://ix.io/3Cd1 |
12:43:32 | FromDiscord | <haxscramper> none of these arguments make any sense for a person who wrote any meaningful amount of nim code, or bothered to read the docs |
12:44:01 | FromDiscord | <haxscramper> also pretty common ones are "user-defined operators are bad", "the world will turn into chaos if we let people write macros" |
12:44:21 | PMunch | I mean, at least that is partially true |
12:44:24 | FromDiscord | <haxscramper> again, borderline between personal preferences and unbased FUD claims |
12:44:30 | FromDiscord | <haxscramper> still most popular discussion points |
12:44:43 | FromDiscord | <haxscramper> yes, everything is true to some extent |
12:44:47 | FromDiscord | <haxscramper> even case insensetivity |
12:45:03 | PMunch | As I like to say, meta-programming is like a chainsaw. You can do things a whole lot more efficiently, but it's also much easier to take your own leg of by accident |
12:45:04 | FromDiscord | <haxscramper> the question - is that what we should be discussing? |
12:45:15 | FromDiscord | <haxscramper> or maybe there are some other, more meaningufl topics |
12:45:31 | PMunch | Oh for sure, I don't disagree that these are silly things to argue about |
12:46:29 | FromDiscord | <haxscramper> Yes, of course everything is useful in moderation. But usually argument against macros is black-and-white discussion↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>) |
12:46:51 | FromDiscord | <haxscramper> Those who write macros complain about typed being unspeced |
12:46:56 | FromDiscord | <haxscramper> Or something like that |
12:48:03 | FromDiscord | <haxscramper> Those who don't argue about macros turning ecosystem into boiling inferno stiched of myriads of randomized dialects |
12:49:34 | mst | PMunch: 'heuristic' was meant to imply vague and lossy, yeah |
12:49:54 | mst | PMunch: but it's the least worst heuristic for 'is it a transpiler' I've yet encountered (though, uh, that's not a high bar) |
12:50:41 | mst | el__maco, the fact that transpiler is unusually semantically unmoored is kinda the point of the discussion |
12:51:40 | PMunch | Hmm, this JSONY thing looks pretty neat |
12:54:57 | mst | PMunch: being able to paste a JSON block into the middle while still not needing all that ceremony yourself has been v. handy |
12:55:10 | mst | I also sometimes use it for quick lines-of-JSON-on-the-wire protocols |
12:55:24 | mst | basically "if the first line sent to the server has no leading [, assume JSONY" |
12:55:36 | mst | means I can generally trivially test stuff using socat |
12:57:26 | PMunch | Yeah I like the "if you want structure just paste JSON" approach |
12:57:40 | PMunch | While still making it trivial to write |
12:57:57 | PMunch | One thing I don't quite understand though is how { "of": "things" } was generated in the example |
12:58:41 | PMunch | Oh, is it because in a {} subhash every other value is a key? |
12:58:45 | mst | { of things } -> { "of": "things" } |
12:58:46 | mst | yes |
12:58:49 | PMunch | Right |
12:59:13 | mst | basically, the way to think about it is "make as much of the syntax as possible optional" |
12:59:16 | PMunch | I thought it might have to do with the newline and indentation |
13:00:01 | mst | nope, it's not whitespace sensitive, *not* doing that was kind of what led me to design it, then I convinced ingy that even if he didn't understand why you wouldn't just use YAML instead it would make a good example for his parsing tools ;) |
13:00:35 | * | arkurious joined #nim |
13:08:08 | PMunch | Well it is kinda whitespace sensitive since it uses newlines |
13:10:44 | * | Vladar quit (Remote host closed the connection) |
13:15:10 | PMunch | Haha: https://www.fredrikholmqvist.com/pages/why-i-hate-frameworks.html |
13:21:51 | * | Vladar joined #nim |
13:23:22 | FromDiscord | <Rika> i just read that a few hours ago lmfao |
13:24:38 | FromDiscord | <dom96> 1.6 is out 😮 |
13:32:59 | * | rockcavera joined #nim |
13:32:59 | * | rockcavera quit (Changing host) |
13:32:59 | * | rockcavera joined #nim |
13:36:12 | nrds | <Prestige99> Awesome! |
13:41:41 | nrds | <Prestige99> https://nim-lang.org/blog/2021/10/19/version-160-released.html |
13:41:44 | FromDiscord | <dom96> and on HN too, awesome |
13:41:54 | PMunch | Yup, it's everywhere :) |
13:41:57 | FromDiscord | <dom96> where is the launch party? |
13:42:12 | PMunch | My place, seven o'clock? |
13:43:00 | supakeen | i'll bring the salmon |
13:44:00 | FromDiscord | <narimiran> is case and style (in)sensitivity already mentioned on HN or we're still waiting for it? |
13:44:28 | FromDiscord | <dom96> ssssshhh you'll jinx it |
13:45:02 | nrds | <Prestige99> wow there are a lot of updates |
13:45:54 | PMunch | supakeen, as if we don't have enough salmon in Norway already :P |
13:46:00 | supakeen | that's the joke! |
13:48:09 | supakeen | (it wasn't very good) |
13:49:19 | FromDiscord | <dom96> so many HN comments, damn |
13:52:14 | FromDiscord | <Gumber> @dom96 remember like 5 years ago when Nim would have a release and it was just fighting FUD / criticism all day on HN? |
13:52:38 | FromDiscord | <Gumber> now it's like most of the reception to releases is actually positive and mostly curiosity / warm feedback |
13:52:43 | FromDiscord | <Gumber> what a refreshing / joyous change |
13:53:44 | supakeen | Suspicious amount of GC talk. |
13:54:46 | FromDiscord | <Gumber> actually there's not much comparatively |
14:00:04 | FromDiscord | <Rika> Where’s the insensitivity comment |
14:01:57 | PMunch | Ssssshhh |
14:02:05 | FromDiscord | <exelotl> where's the tweet I can RT? :P |
14:02:39 | PMunch | Hmm, maybe this is the right moment to write an article about Futhark. Ride the wave of Nim curiosity |
14:03:13 | FromDiscord | <haxscramper> https://news.ycombinator.com/item?id=28918044 there is one for whitespace↵(@Rika) |
14:04:03 | FromDiscord | <haxscramper> I mean sure, "since the whitespace is significant, it ends up being one more potential source of bugs." |
14:04:29 | FromDiscord | <haxscramper> since `<insert any language feature>` is significant, misusing it can lead to bugs |
14:04:38 | FromDiscord | <haxscramper> like mistyping variable names |
14:04:42 | FromDiscord | <dom96> In reply to @Gumber "<@!132595483838251008> remember like 5": Honestly hard for me to tell whether there is less FUD these days. There is definitely less "but style insensitivity omg" |
14:05:09 | * | PMunch quit (Quit: Leaving) |
14:05:09 | FromDiscord | <haxscramper> what was it called? "Shadowing of the variable in for loop scope is a latent bug" |
14:05:10 | FromDiscord | <haxscramper> yeah sure, whatever |
14:05:11 | FromDiscord | <Gumber> well, at least there seems to be way more positivity |
14:05:47 | FromDiscord | <dom96> Anyway, we've come far: https://web.archive.org/web/20110704041631/http://force7.de/nimrod/ 🙂 |
14:06:05 | FromDiscord | <Rika> In reply to @haxscramper "I mean sure, "since": Since the variable name casing is significant … |
14:06:06 | FromDiscord | <Rika> Heh |
14:06:46 | * | Gustavo6046 quit (Ping timeout: 252 seconds) |
14:06:48 | FromDiscord | <dom96> (and that takes me back to the discussion we've had about Nim and Python, you can clearly see it's mentioned there ;)) |
14:06:57 | FromDiscord | <Rika> Anyway these kinds of discussions always drain me of energy |
14:07:04 | FromDiscord | <Rika> So perhaps I shall stop reading |
14:08:16 | FromDiscord | <dom96> I love reading these discussions |
14:08:44 | * | Gustavo6046 joined #nim |
14:08:44 | FromDiscord | <Rika> In reply to @dom96 "(and that takes me": Well okay, Nim takes a good amount of inspiration from Python, but it still doesn’t mean it should take more |
14:09:01 | FromDiscord | <haxscramper> `[x for y in z if q]` |
14:09:05 | FromDiscord | <Rika> In reply to @dom96 "I love reading these": I don’t, some debates are just annoying to keep on reading |
14:09:06 | FromDiscord | <dom96> In reply to @Rika "Well okay, Nim takes": `snake_case` definitely not, other things perhaps |
14:09:18 | FromDiscord | <haxscramper> I mean how come you don't want this |
14:09:27 | FromDiscord | <Rika> In reply to @dom96 "`snake_case` definitely not, other": Yes perhaps some, I do not mean whole of Python is not something to take inspiration from |
14:09:34 | mst | for x in "foo", "bar": |
14:09:37 | mst | for x in "foo": |
14:09:45 | * | mst beats himself unconscious with his own keyboard |
14:10:00 | FromDiscord | <Rika> Poor keyboard |
14:10:02 | FromDiscord | <haxscramper> time to slice pythong list |
14:10:11 | FromDiscord | <haxscramper> `:::::-1-1-2-1-2-31::` |
14:10:18 | FromDiscord | <dom96> I remember the time when Nim had no slicing |
14:10:26 | FromDiscord | <dom96> And I wanted to just copy Python |
14:10:27 | FromDiscord | <haxscramper> that's how you get x^288th element |
14:10:32 | FromDiscord | <dom96> Araq gave great arguments why we shouldn't |
14:10:32 | FromDiscord | <Rika> In reply to @dom96 "I love reading these": Some discussions are genuinely nice to read but that’s like diamond in the rough |
14:10:36 | * | mst really likes snake_case |
14:10:38 | * | rb joined #nim |
14:10:40 | FromDiscord | <dom96> and so we didn't, that's how we should do things |
14:10:50 | FromDiscord | <Rika> Yeah |
14:11:02 | * | mst would suggest people remember that the only reason for camelCase is that xerox PARC's ASCII variant didn't actually have an _ so they had to improvise |
14:11:13 | FromDiscord | <Rika> Discussion is always good until it devolves into shouting |
14:11:20 | mst | I do have an _ so damnit I'm going to use it |
14:11:35 | mst | (the way nim lets people not have to care about that is both insane and really quite neat in that regard ;) |
14:11:36 | FromDiscord | <Rika> I mean you do you that’s the point of style insensitivity |
14:11:47 | FromDiscord | <Rika> Insane as in |
14:11:51 | FromDiscord | <Rika> What way |
14:12:09 | NimEventer | New thread by Solo989: VarArgs Broke on latest nim., see https://forum.nim-lang.org/t/8513 |
14:12:21 | FromDiscord | <dom96> yep, and you could do so much more: make the doc generator display the symbols in your favourite style, make your IDE completely style insensitive, make Nim understand which style you're using and show appropriate error messages |
14:12:37 | mst | I'm sorry, I'm not going to get into an argument over whether the word 'insane' is a compliment or not |
14:12:50 | mst | go argue with somebody over what a transpiler is instead :P |
14:13:26 | FromDiscord | <Rika> Aww |
14:14:40 | * | mst still suspects that in theory he would have preferred foo_bar -> fooBar rather than just ignoring case and underscores entirely, but in practice I've yet to run into a case where that actually made a difference so *meh* |
14:16:55 | FromDiscord | <Rika> Differing ways of capitalising acronyms. Nim prefers not shouting (Html), some do as written in English (HTML) |
14:17:04 | FromDiscord | <dom96> it sucks that the IRC<->Discord bridge doesn't support actions |
14:49:01 | FromDiscord | <narimiran> "I started looking at Nim a few months ago, but I didn't like the feature where it ignores underscores and capitalization." |
14:49:03 | FromDiscord | <haxscramper> https://news.ycombinator.com/item?id=28918562 |
14:49:09 | FromDiscord | <haxscramper> now we are talking |
14:49:10 | FromDiscord | <narimiran> ding-ding-ding, we have a winner |
14:49:28 | FromDiscord | <narimiran> (did we post the same thing at the same time? :)) |
14:49:33 | FromDiscord | <haxscramper> almost |
14:49:44 | FromDiscord | <haxscramper> well, modulo matrix bridge lag of course |
14:50:35 | FromDiscord | <narimiran> ok, if somebody decides to reply — there is `nimgrep` which deals with "make grepping harder" |
14:52:31 | FromDiscord | <haxscramper> I don't use nimgrep evenm |
14:52:55 | FromDiscord | <haxscramper> `rg` is still faster, and I used it for everything else |
14:53:07 | FromDiscord | <haxscramper> and I never had any issues with style insensetivity |
14:53:18 | FromDiscord | <enthus1ast> i find the "whitespace" vs braces quite amusing actually \:)↵one should have whitespace any how, but when a brace is not in place, you dont see it, and must count... |
14:53:35 | FromDiscord | <enthus1ast> every time i edit js .... |
14:53:51 | FromDiscord | <narimiran> rainbow parentheses plugin 😉 |
14:54:05 | FromDiscord | <enthus1ast> have it↵(@narimiran) |
14:54:25 | mst | I prefer braces -and- sensible indentation over just indentation |
14:54:31 | FromDiscord | <enthus1ast> fixing identation bugs takes seconds |
14:54:38 | mst | but I don't care about that enough to mind nim's syntax |
14:54:50 | FromDiscord | <haxscramper> I updated reply↵(@narimiran) |
14:55:34 | FromDiscord | <Rika> In reply to @narimiran "ding-ding-ding, we have a": HES REASONABLE THO |
14:55:43 | FromDiscord | <Rika> hes not like "fuck this this is scuffed" or w/e |
14:56:38 | FromDiscord | <haxscramper> THO |
14:56:51 | FromDiscord | <Rika> In reply to @narimiran "rainbow parentheses plugin 😉": then that is one more argument against "default tooling doesnt work well with whitespace", nice |
14:57:29 | FromDiscord | <Rika> enthusiast: many indentation bugs give errors as cryptic as C++ template errors sometimes |
14:59:26 | mst | https://news.ycombinator.com/item?id=28918780 |
14:59:48 | mst | (I think that reads as friendly, it's supposed to at least) |
14:59:56 | FromDiscord | <dom96> In reply to @Rika "hes not like "fuck": true |
15:00:59 | FromDiscord | <haxscramper> hn discussion I linked had approximately \~2855 words worth of text |
15:01:06 | FromDiscord | <haxscramper> 2.5k+ words for this crp |
15:01:08 | FromDiscord | <Rika> mst lmfao |
15:01:20 | FromDiscord | <Rika> its more passive aggressive id say |
15:05:47 | mst | Rika, I went with 'not had time' to try and defang that but yeah probably |
15:05:50 | * | mst shrugs |
15:17:42 | FromDiscord | <dom96> Hrm, I think it reads friendly |
15:18:18 | mst | probably depends on the reader, but I'm just going to leave it up and led what happens happen |
15:18:27 | mst | if I get docked an imaginary internet point or three that's fine |
15:18:36 | mst | usually that happens when people don't understand a pun |
15:21:12 | FromDiscord | <IsaacPaul> I did not know nim was style insensitive.. honestly, I'm still getting used to the white space and I dont see an issue with the capitalization stuff |
15:21:24 | FromDiscord | <IsaacPaul> (edit) "capitalization" => "style" |
15:22:18 | FromDiscord | <Rika> ~~well its something you dont notice unless you're looking for a fight~~ |
15:22:25 | FromDiscord | <el__maco> the only "problem" I have had with the syntax so far is the occasional requirement to add blanks where I would normally have none. Seems a bit odd that ``a=-1 `` type of statement doesn't seem to work |
15:22:42 | FromDiscord | <Rika> because it parses as a =- 1 |
15:22:49 | FromDiscord | <el__maco> similar thing with the star sometimes |
15:22:59 | FromDiscord | <Rika> example? |
15:23:46 | FromDiscord | <enthus1ast> i would argue that you normally should have a whitespace there |
15:24:06 | * | Gustavo6046 quit (Read error: Connection reset by peer) |
15:24:40 | FromDiscord | <el__maco> doesn't something like ``var a=10`` require a blank |
15:24:43 | mst | enthus1ast you would. I would. I've seen a fair bit of code that didn't, especially when doing multiple assignments |
15:24:54 | mst | (a=-1,b=7) type of code |
15:25:28 | FromDiscord | <el__maco> what is this =- operator anyways |
15:26:18 | nrds | <Prestige99> a = -1 ? |
15:27:16 | * | Gustavo6046 joined #nim |
15:27:22 | FromDiscord | <IsaacPaul> Swift enforces spacing. I like it a lot. Gives me 1 less thing to to think about lol |
15:27:55 | nrds | <Prestige99> wonder if nimpretty handles that case |
15:29:07 | FromDiscord | <Rika> In reply to @el__maco "what is this =-": possible operator |
15:29:28 | FromDiscord | <Rika> In reply to @el__maco "doesn't something like ``var": no, `var a = 10` makes no sense |
15:29:52 | FromDiscord | <Rika> and `a=10` is not ambiguous i believe |
15:30:03 | FromDiscord | <Rika> !eval var a = 10 |
15:30:06 | NimBot | Compile failed: /usercode/in.nim(1, 7) Error: invalid token: (\29) |
15:30:06 | FromDiscord | <el__maco> do I need the ``=-`` operator I wonder. Or ``=``... because if not, I could consider solving this "problem" the same way I solved Nim's unfortunate tendency to reject tabs |
15:30:27 | FromDiscord | <Rika> !eval var a = 10; a=10; echo a |
15:30:28 | NimBot | Compile failed: /usercode/in.nim(1, 14) Error: invalid token: (\29) |
15:30:48 | FromDiscord | <Rika> eh? is this just discord fucking with me or what |
15:31:20 | FromDiscord | <treeform> In reply to @tandy "<@!107140179025735680> would you have": Sure. I take all of the jsony PRs. |
15:31:38 | FromDiscord | <Rika> In reply to @el__maco "do I need the": the idea is that someone might define it then `a=-1` would change meaning if =- undefined meant using `a = -1` |
15:31:56 | FromDiscord | <Rika> just space your operators properly... |
15:32:15 | FromDiscord | <el__maco> I don't want extra spaces, they are noise to me |
15:32:34 | FromDiscord | <el__maco> just aesthetic preference 🤷♂️ |
15:33:16 | FromDiscord | <el__maco> Nim's syntax otherwise is so clean and free from noise |
15:33:24 | FromDiscord | <Rika> i mean okay |
15:33:30 | FromDiscord | <Rika> cant win every battle i guess |
15:33:57 | FromDiscord | <clyybber> @exelotl are you sure https://github.com/nim-lang/Nim/issues/19011 is a regression? AFAICT it an issue on 1.2.x and 1.0.x too |
15:34:46 | * | Gustavo6046 quit (Ping timeout: 252 seconds) |
15:35:05 | FromDiscord | <exelotl> oh weird |
15:35:36 | FromDiscord | <clyybber> (edit) "it" => "it's" |
15:37:27 | FromDiscord | <exelotl> @clyybber the following does compile on 1.2.x https://play.nim-lang.org/#ix=3Ce0 |
15:37:39 | FromDiscord | <exelotl> I assumed it was because the AST didn't have the junk in it |
15:37:51 | FromDiscord | <exelotl> but it might just be due to the implementation of parseEnum |
15:39:17 | FromDiscord | <clyybber> yeah, still a valid bug of course |
15:44:30 | FromDiscord | <exelotl> Amended my ticket:↵> This issue was introduced in Nim 0.19.0. The AST is as-expected in 0.18.x. However, parseEnum could still handle the bad AST until 1.4.0. |
15:59:51 | FromDiscord | <juan_carlos> Congrats to all the core team and contributors for 1.6. |
16:09:29 | FromDiscord | <retkid> > support for Apple silicon/M1, 32-bit RISC-V, armv8l, CROSSOS, improved support for NodeJS backend |
16:09:37 | FromDiscord | <retkid> :O |
16:09:42 | FromDiscord | <retkid> big W |
16:15:34 | FromDiscord | <iffy (Matt Haggard)> @treeform Does pixie have a built-in way to remove the alpha channel from a PNG file? Browsing the source makes me think no, so I'm just double checking. |
16:19:56 | FromDiscord | <Rika> Use nimpng for that instead I would say… |
16:32:22 | FromDiscord | <iffy (Matt Haggard)> That was easier than I expected\: http://ix.io/3Ceb |
16:32:58 | FromDiscord | <nc-x> is there any roadmap (new features / existing experimental stuff getting stabilized / lots of work on nimsuggest etc) for the next release? |
16:33:10 | FromDiscord | <nc-x> (edit) "is there any roadmap (new features / existing experimental stuff getting stabilized / lots of work on nimsuggest etc) ... for" added "planned" |
16:33:34 | FromDiscord | <nc-x> (edit) "is there any roadmap (new features / existing experimental stuff getting stabilized / lots of work on nimsuggest ... etc)" added "/ ic / getting rid of forward declarations" |
16:33:58 | FromDiscord | <Rika> Issues on GitHub have a milestone system I believe |
16:34:03 | FromDiscord | <nc-x> btw congratulations on 1.6 release |
16:34:32 | FromDiscord | <nc-x> In reply to @Rika "Issues on GitHub have": nothing for 1.8 yet https://github.com/nim-lang/Nim/milestones |
16:34:48 | FromDiscord | <Rika> That is because 1.6 just released |
16:34:54 | FromDiscord | <Rika> Over time issues will be added |
16:35:14 | FromDiscord | <nc-x> there is one issue in https://github.com/nim-lang/RFCs/milestone/5 but no progress afaik |
16:35:43 | FromDiscord | <nc-x> In reply to @Rika "Over time issues will": i know, i am just asking if any "major" things are planned, like making orc default etc.. |
16:36:10 | FromDiscord | <Rika> I think that is one yes |
16:36:21 | FromDiscord | <Rika> Otherwise it’s just scattered in the text channels here |
16:37:13 | FromDiscord | <pointystick> Three big things I remember are incremental compilation, CPS and lazy semcheck. I'm not sure what release they're scheduled for, if any |
16:38:12 | FromDiscord | <dom96> CPS isn't developed by the core team |
16:46:24 | FromDiscord | <leorize> cps already works on 1.6 |
16:51:27 | FromDiscord | <haxscramper> IC seems to be postponed with no concrete release date, lazy semcheck was barely scratched and unlikely to be released in working capacity any time soon↵(@pointystick) |
16:52:08 | FromDiscord | <zetashift> damn, IC sounds like a hard problem to solve! |
16:52:25 | FromDiscord | <haxscramper> Milestones can be ignored, nobody bothers to do them anyway↵(@nc-x) |
16:53:15 | FromDiscord | <haxscramper> They are not filled/updated/tracked/remembered when aiming for feature and so on |
17:07:32 | * | Gustavo6046 joined #nim |
17:16:46 | * | Gustavo6046 quit (Ping timeout: 245 seconds) |
17:17:20 | * | Gustavo6046 joined #nim |
17:54:23 | FromDiscord | <exelotl> if I want to make a macro that outputs a call to a proc (from the same module), how do I ensure it calls the intended proc and not someone else's proc that happens to have the same name? |
17:54:44 | FromDiscord | <ynfle (ynfle)> `bindSym` |
17:55:25 | NimEventer | New thread by Shirleyquirk: GenAst, see https://forum.nim-lang.org/t/8514 |
17:56:07 | FromDiscord | <exelotl> sent a code paste, see https://paste.rs/fA4 |
17:57:49 | FromDiscord | <ynfle (ynfle)> https://nim-lang.org/docs/manual.html#macros-bindsym Check out this link |
18:02:56 | FromDiscord | <haxscramper> Compiler explorer for nim 1.6.0 was merged, should be available soon |
18:03:41 | FromDiscord | <haxscramper> Relatively soon, when they roll out new versions\ |
18:08:33 | FromDiscord | <kevin> Is there a way to stop a `spawn`ed thread? |
18:09:19 | FromDiscord | <kevin> sent a code paste, see https://play.nim-lang.org/#ix=3CeG |
18:09:26 | NimEventer | New thread by V3ss0n: The fate of Nim Editors, see https://forum.nim-lang.org/t/8515 |
18:10:32 | FromDiscord | <exelotl> ynfle: ah thanks! |
18:14:41 | FromDiscord | <el__maco> are the config files compatible between 1.4.8 and 1.6.0 |
18:14:54 | FromDiscord | <el__maco> i.e. can I just copy my nim.cfg over |
18:18:03 | FromDiscord | <haxscramper> yes |
18:18:10 | FromDiscord | <el__maco> good |
18:18:48 | FromDiscord | <haxscramper> there are new recommended flags https://forum.nim-lang.org/t/8511#55108 for this version of course↵(@elmaco) |
18:21:57 | * | xet7 quit (Remote host closed the connection) |
18:22:57 | * | xet7 joined #nim |
18:23:01 | FromDiscord | <el__maco> I notice ``--experimental:codeReordering`` doesn't seem to be the best of ideas to have there |
18:28:44 | FromDiscord | <haxscramper> Well, I personally see exactly zero reason for this feature to exist in the first place |
18:28:59 | FromDiscord | <haxscramper> Because how hard could it be to write seveal procs forward |
18:29:30 | FromDiscord | <haxscramper> Also last time I used this it just hung compiler on mutually recursive generic calls or something like that |
18:30:53 | FromDiscord | <el__maco> its the best feature of the language tbh. Writing forward declarations is so silly |
18:31:47 | FromDiscord | <haxscramper> I dont' say there is some meaning in that, I say it is so trivial there is no need to maintain another experimental feature for this |
18:34:12 | * | xet7 quit (Quit: Leaving) |
18:56:28 | * | rockcavera quit (Remote host closed the connection) |
19:01:36 | NimEventer | New thread by Gcao: Does Nim support name for anonymous procedures?, see https://forum.nim-lang.org/t/8516 |
19:12:31 | FromDiscord | <Koni> is there any command to bootstrap a Nim Project? |
19:15:55 | FromDiscord | <zetashift> When one is past the honeymoon phase with a language and straight up into compiler fights! |
19:16:18 | FromDiscord | <zetashift> `nimble init`↵(@Koni) |
19:17:01 | FromDiscord | <Koni> :hmmok: |
19:37:31 | FromDiscord | <exelotl> hmm I just noticed my library has `sgn` and `sgn3` (these names came from the C library I translated) https://media.discordapp.net/attachments/371759389889003532/900105394851045436/unknown.png |
19:37:58 | FromDiscord | <exelotl> but Nim already has a `sgn` in std/math which does the same thing as my `sgn3` |
19:40:53 | FromDiscord | <exelotl> what would be a better name for a sign function that only ever returns 1 or -1 ? |
19:44:24 | FromDiscord | <Elegantbeef> `sign` |
19:46:04 | FromDiscord | <ee7> You can also call it signum. "sign" sounds a lot like "sine". See e.g. https://mathworld.wolfram.com/Sign.html |
19:47:01 | FromDiscord | <ee7> (Congrats everyone on 1.6!) |
19:49:42 | FromDiscord | <exelotl> I'm considering `sign` but it feels backwards. It should be like `del` vs `delete` where the cheaper _"I know what I'm doing"_ version is the one with the abbreviated name |
20:09:48 | * | Gustavo6046 quit (Remote host closed the connection) |
20:12:15 | * | Gustavo6046 joined #nim |
20:12:37 | FromDiscord | <konsumlamm> i see exactly zero reason for `del` and `delete` existing tbh, it only causes confusion |
20:20:51 | FromDiscord | <ee7> I meant `sgn3` could be called `signum`, and then you could name the other one something explicit like `signumNoZero` or `signumOnlyOnes`? This isn't compatible with your abbreviated naming thing, though. |
20:21:37 | FromDiscord | <ee7> But if you like `sgn3`, you could have `sgn2`. |
20:21:39 | FromDiscord | <IsaacPaul> Yea I was just about suggest something like `signFavorPositive` |
20:24:51 | FromDiscord | <IsaacPaul> I honestly wouldn't expect sign to ever return 0 tbh. I expect a 'sign' back.. |
20:26:57 | FromDiscord | <ee7> That's how it works in numpy. See https://numpy.org/doc/stable/reference/generated/numpy.sign.html |
20:27:56 | FromDiscord | <IsaacPaul> ooo I got it.. sgn(x: T, zeroResult: T) then just pass in a default value for 0 lol |
20:28:13 | FromDiscord | <exelotl> mathematically it makes no sense but in game physics I basically always want a 1 or -1 |
20:28:34 | FromDiscord | <exelotl> lest I riddle my game with subpixel-perfect collision bugs xD |
20:50:59 | * | CyberTailor joined #nim |
20:57:59 | CyberTailor | how to package nim software using distribution's native package manager? |
20:58:08 | CyberTailor | portage in particular |
21:03:32 | * | rockcavera joined #nim |
21:03:32 | * | rockcavera quit (Changing host) |
21:03:32 | * | rockcavera joined #nim |
21:06:24 | CyberTailor | i hope to find some documentation on this topic |
21:07:16 | FromDiscord | <Elegantbeef> It's a native binary so it should be similar to C/C++ no? |
21:07:37 | FromDiscord | <Elegantbeef> I've never packaged for a package manager so probably blissfully wrong |
21:13:37 | CyberTailor | it's similar only in simple compiler invocations |
21:17:12 | FromDiscord | <Elegantbeef> Yea i dont know anything so just assumed prebuilt binaries like apt |
21:26:21 | FromDiscord | <Slava0135> In reply to @exelotl "mathematically it makes no": in Java math.sign (or something) returns -1/1 as far as i remember |
21:27:02 | * | Aherin joined #nim |
21:27:14 | Aherin | Nice! |
21:27:50 | FromDiscord | <Slava0135> ok it's called signum |
21:28:03 | FromDiscord | <Jan81> Even nicer! |
21:28:17 | FromDiscord | <Slava0135> tho it works on Double |
21:28:56 | FromDiscord | <Slava0135> why would you need a signum function that returns 0 |
21:29:27 | FromDiscord | <Slava0135> because you can just compare for 0 |
21:29:37 | FromDiscord | <Slava0135> if you really need |
21:30:57 | FromDiscord | <Slava0135> ~~it's free~~ |
21:33:13 | FromDiscord | <Elegantbeef> Calculating direction of a vector |
21:33:28 | FromDiscord | <konsumlamm> because 0 is neither positive nor negative |
21:34:31 | FromDiscord | <Slava0135> true but |
21:35:33 | FromDiscord | <Elegantbeef> Exactly to me sign or signum is normalization of a 1D vector |
21:35:34 | FromDiscord | <Elegantbeef> `0` is a valid output of "no movement" |
21:38:14 | FromDiscord | <Slava0135> in normalization basically you divide each coordinate by length of the vector |
21:38:29 | FromDiscord | <Slava0135> 0/0 |
21:38:41 | FromDiscord | <Slava0135> ~~world crashed~~ |
21:39:28 | FromDiscord | <Slava0135> 0/0 can be any number |
21:39:59 | FromDiscord | <Slava0135> 0/0=x -> 0=0x |
21:40:51 | FromDiscord | <Elegantbeef> Well that's one method of normalization |
21:41:26 | FromDiscord | <Elegantbeef> Normalization can be thought as getting the direction of a vector |
21:41:36 | FromDiscord | <Slava0135> in float there is positive and negative zero |
21:42:33 | FromDiscord | <Elegantbeef> so really you're just getting `-` `+` or nothing 😛 |
21:49:52 | * | Gustavo6046 quit (Ping timeout: 252 seconds) |
21:53:22 | * | Gustavo6046 joined #nim |
21:59:20 | * | CyberTailor quit (Quit: Konversation terminated!) |
22:09:23 | FromDiscord | <exelotl> thoughts on `qsgn` (quick sign) for the version that only returns -1 or 1? |
22:11:08 | * | Vladar quit (Quit: Leaving) |
22:26:20 | FromDiscord | <impbox [ftsf]> sgn1 |
22:26:25 | FromDiscord | <impbox [ftsf]> sgn0 |
22:26:34 | FromDiscord | <impbox [ftsf]> Makes more sense to me |
22:27:01 | FromDiscord | <impbox [ftsf]> Postfix is better since you already know you're looking for a sgn function |
22:44:30 | * | Gustavo6046 quit (Remote host closed the connection) |
22:46:25 | * | Gustavo6046 joined #nim |
22:48:20 | * | vicfred joined #nim |
22:59:00 | * | supakeen quit (Ping timeout: 258 seconds) |
23:08:26 | * | Gustavo6046 quit (Ping timeout: 245 seconds) |
23:08:50 | * | Gustavo6046 joined #nim |
23:18:45 | * | Gustavo6046_ joined #nim |
23:18:58 | * | Gustavo6046 quit (Ping timeout: 252 seconds) |
23:21:48 | * | Gustavo6046_ is now known as Gustavo6046 |
23:36:44 | * | supakeen joined #nim |
23:50:40 | FromDiscord | <demotomohiro> sig |
23:52:23 | FromDiscord | <demotomohiro> sgn± if you allow to use unicode in identifer |
23:55:38 | FromDiscord | <impbox [ftsf]> I find I usually want sgn to return 0 for 0 input when doing gameplay stuff |
23:55:56 | FromDiscord | <juan_carlos> `(sic)` operator. 🤣 |