<< 07-09-2020 >>

00:04:34*SenasOzys quit (Ping timeout: 260 seconds)
00:11:48*Tlangir quit (Quit: Leaving)
00:29:35*vicfred quit (Ping timeout: 265 seconds)
00:39:28*Jjp137 quit (Ping timeout: 244 seconds)
00:40:57*Jjp137 joined #nim
00:41:35*bouzu__ quit (Quit: Leaving)
00:51:23*abm quit (Quit: Leaving)
00:52:19disruptekError: internal error: expr: param not init input_19385020
00:55:59*vicfred joined #nim
01:13:51*arecacea1 quit (Remote host closed the connection)
01:14:48*arecacea1 joined #nim
01:29:11*apahl quit (Ping timeout: 272 seconds)
01:29:47FromDiscord<Avatarfighter> what is an actual use case of the "ropes" module in the stdlib? I'm having trouble understanding why someone would want to store large strings in memory.
01:30:31*apahl joined #nim
01:31:09FromDiscord<Elegant Beef> No clue what "Very long" means but if you're using a large jsonfile/html file and appending to it it'd be a pretty nice thing
01:31:36FromDiscord<Avatarfighter> Well I'
01:31:40FromDiscord<Avatarfighter> whoops
01:32:13FromDiscord<Avatarfighter> I'm not too sure as to why one would want to have "very large strings" in memory
01:32:31FromDiscord<Avatarfighter> I'm just curious to see if someone has used the module before to be honest I guess
01:34:47wimlAvatarfighter: It's handy if you want to modify large strings, compose large strings out of pieces, or extract many substrings. The classic use case is a text editor, but any time you have a large string, the time spent copying substrings around can sometimes be significant.
01:35:09FromGitter<DylanModesitt> Text editors, DNA sequences come to mind as uses
01:36:04disruptekwhat are we talking about? gap buffers?
01:36:12FromDiscord<Avatarfighter> wiml, DylanModesitt: I definitely didn't think about those use cases, those are really good use cases
01:36:22FromDiscord<Avatarfighter> tell disruptek if he unmutes discord he can know 😛
01:36:47FromDiscord<Rosen> don't tell him anything, if he prefers to only see half of a chatroom power to him lmao
01:36:55wimlha
01:36:55FromDiscord<Avatarfighter> haahh
01:37:13FromDiscord<Avatarfighter> we just have to peak his interest and he'll unmute
01:38:11FromDiscord<Avatarfighter> Thank you again wiml and DylanModesitt 🙂
01:42:53FromDiscord<Rika> It’s pique, not peak
01:43:10*Tanger joined #nim
01:43:21disruptek!last clyybber
01:43:21disbotclyybber spoke in 12#nim 3 hours ago 12https://irclogs.nim-lang.org/06-09-2020.html#22:00:26
02:06:03*gmaggior quit (Quit: Leaving)
02:49:01FromDiscord<PizzaFox> sent a code paste, see https://play.nim-lang.org/#ix=2wnA
02:49:08FromDiscord<PizzaFox> i assume its not classes
02:52:44FromDiscord<Avatarfighter> Have you tried using the random library @PizzaFox ?
02:52:54FromDiscord<PizzaFox> i am not asking how to write this code
02:53:07*muffindrake quit (Ping timeout: 260 seconds)
02:53:08FromDiscord<PizzaFox> i am asking how the finished product would be used as if a real nim developer had made it
02:53:27FromDiscord<Avatarfighter> you wont find a "Die" object but you will have a `rand()` proc which takes an int as an input
02:53:29FromDiscord<Avatarfighter> ohh
02:53:32wimlPizzaFox: In nim you could use an object type for that ( see for example https://nim-lang.org/docs/tut1.html#advanced-types-objects )
02:53:45FromDiscord<PizzaFox> will research
02:53:56FromDiscord<Avatarfighter> I thought you were asking if there is a nim equivalent
02:54:05FromDiscord<PizzaFox> that class above just stores a few properties as state used in the `roll` method
02:54:23FromDiscord<PizzaFox> an object seems like what i want
02:54:36FromDiscord<PizzaFox> ill make a `roll` proc that accepts a `Die` as an argument
02:54:40FromDiscord<PizzaFox> (edit) 'ill' => 'i'll'
02:55:15*muffindrake joined #nim
02:57:47FromDiscord<Avatarfighter> Yeah, I think for your `roll` proc you might like the `rand` proc inside of the random module since you can give it a number and it'll give you a number in the range of 0-number
02:58:32FromDiscord<PizzaFox> yeah thats what i was thinking
02:59:18wimllike so: https://play.nim-lang.org/#ix=2wnC (probably has bugs but gives you the idea of nim syntax for this)
02:59:50FromDiscord<Avatarfighter> ahaha wiml and I did the same thing
02:59:52FromDiscord<Avatarfighter> https://play.nim-lang.org/#ix=2wnB
03:00:08wimlhahaha
03:00:12wimlyours is better :)
03:00:24FromDiscord<Avatarfighter> Don't forget to `randomize()` when using the random module 🙂
03:03:13disruptekall the ladies say so.
03:05:01FromDiscord<Avatarfighter> i dont know if i enjoy the random comments disruptek says bc he has discord muted lmao
03:05:05*vicfred quit (Quit: Leaving)
03:20:52FromDiscord<PizzaFox> i am now realizing i need to run some code when someone instantiates a `Die`
03:21:12FromDiscord<PizzaFox> should i make a `proc` that instantiates a die with the proper values?
03:22:06disruptekman, term rewriting macros are nuts.
03:24:36FromDiscord<PizzaFox> nim compiles to js right
03:24:41FromDiscord<PizzaFox> just make it do the reverse
03:27:31disruptekjust think about it and get back to me.
03:29:00FromDiscord<PizzaFox> here is my broken nim code: https://play.nim-lang.org/#ix=2wnF↵here is the JS code i'm trying to port: https://hasteb.in/zehobuyo.js
03:29:08bozaloshtshdisruptek: have any examples of useful term-rewriting macros?
03:29:19disruptekdude.
03:29:34bozaloshtshI remember thinking it was the coolest language feature but can't think of a use for it off the top of my head
03:29:36FromDiscord<PizzaFox> (edit) 'https://hasteb.in/zehobuyo.js' => 'https://hasteb.in/seyakoho.js'
03:29:56disrupteki got carded tonight and the barmaid is looking at my id and squinting and i'm like, "what?"
03:30:37disruptekand she's pretty cute. she says, "you have, like, 5 little chili peppers next to you photo. what the fuck is that? i've never seen that before. is that a colorado thing?"
03:31:00disruptek"nah," says i, "that's just because i'm extra hot."
03:31:27disrupteki could tell her knees were weak as she turned around to clutch herself and repeat my address under her breath.
03:32:59disruptekima rewrite some of jason to use a term rewriting macro. i think it's probably the cleanest way to do static json encoding.
03:33:02disruptek!repo jason
03:33:03disbothttps://github.com/disruptek/jason -- 9jason: 11JSON done right 🤦 15 19⭐ 1🍴
03:33:45disrupteki just impl arrays but it's almost like there's no point until i can have any jason encoding performed at compile-time magically.
03:34:30FromDiscord<Elegant Beef> I cant believe you named a nim module after me
03:34:32FromDiscord<Elegant Beef> Im so honoured
03:38:09disruptekthe hardest part is the naming. i want you to provide an encoder and i'll magically pick it up and use it at compile-time if i can.
03:38:25disruptekit's surprisingly tricky to make this all happen magically.
03:41:07FromGitter<gogolxdong> ```/mnt/c/nim-libp2p/libp2p/protocols/pubsub/pubsub.nim(199, 58) Error: 't' is of type <lent TopicPair> which cannot be captured as it would violate memory safety, declared here: /mnt/c/nim-libp2p/libp2p/protocols/pubsub/pubsub.nim(197, 7); using '-d:nimWorkaround14447' helps in some cases```
04:06:02*supakeen quit (Quit: WeeChat 2.9)
04:06:38*supakeen joined #nim
04:47:07*a_chou joined #nim
04:50:17*waleee-cl quit (Quit: Connection closed for inactivity)
04:57:37*narimiran joined #nim
05:09:24*solitudesf joined #nim
05:09:31*a_chou quit (Quit: a_chou)
05:32:34*vicfred joined #nim
05:58:32*lpy joined #nim
06:22:56*PMunch joined #nim
06:37:50FromDiscord<lantos> mostly compile-time JSON encoding↵"I don't care." -- Araq, 2020
06:37:51FromDiscord<lantos> lol
06:42:44FromDiscord<whisperdev> lol
06:54:02FromDiscord<whisperdev> I am still waiting for treeform :?
06:56:41Araqgah
06:56:56Araqthey just cancelled my half-marathon event :-(
07:05:33*Vladar joined #nim
07:07:40FromDiscord<Elegant Beef> @whisperdev what do you need treeform for?
07:10:16FromDiscord<PizzaFox> sent a code paste, see https://play.nim-lang.org/#ix=2wof
07:16:44*ldlework joined #nim
07:16:51ldleworkAnyone want to help me update this old nim? https://gist.github.com/dustinlacewell/54ded16bfaabbb9a7de9
07:16:57FromDiscord<Elegant Beef> I dont think iterating over would allocate to the heap, but i've known to be wrong about stuff like that
07:17:01FromDiscord<Elegant Beef> Hey ldle
07:17:53ldleworkhello
07:18:08ldleworkSomething wrong around line 47 with the tables
07:18:25ldleworkgot <Table[system.float, proc (diff: float){.closure.}], float, proc (diff: float): Color{.noSideEffect, gcsafe, locks: 0.}> but expected one of:
07:19:54FromDiscord<Elegant Beef> the procs return colour
07:20:03FromDiscord<Elegant Beef> The table def is a void proc
07:23:11FromDiscord<Elegant Beef> Hopefully that explanation was informational enough, but you can see the issue here aswell↵https://play.nim-lang.org/#ix=2woi
07:29:27ldleworkAnyone around here use NixOS?
07:29:54ldleworkehmry: poke
07:31:35wimlIdlework: I haven't gotten really deep into it but I use it for a couple servers and occasionally nixpkgs elsewhere
07:32:35*NimBot joined #nim
07:32:35ldleworkwiml: the program I compiled errors when run: libcsfml-graphics.so: cannot open shared object file: No such file or directory
07:32:49ldleworkI'm not sure how I am supposed to change where the nim program looks for libcsfml, IE the nix store
07:36:24ldleworkwiml, any idea?
07:37:07ehmryldlework: yes, thats this rpath thing...
07:37:44ehmryhttps://github.com/NixOS/nixpkgs/pull/95692
07:37:44disbotnim: fix dynamic library loading, wrap for cross-compilation
07:37:58wimlHrm, is it linked in, or is it dynamically-loaded? Does it show up if you `ldd` ?
07:38:13ehmryits probably dynamically loaded
07:39:00ehmryI'd like to always wrap the nim compiler on nixos so that things like cross-compilation are transparent, but the problem is that nimble stops working, and I haven't looked into why
07:40:12ldleworkehmry: do you have a shell.nix or something I can use..?
07:41:49ldleworkehmry: I'm just trying to compile this simple file, https://gist.github.com/56bd99a207545701179fc48100f0268d
07:41:57ldleworkit uses csfml
07:42:08ldleworkthe library that fails to dynamically load
07:42:45ehmryldlework: i'm using a nix flake these days https://git.sr.ht/~ehmry/dhall-nim/tree/8d636193933d832c277c6fe0b84a139c2438aa91/flake.nix
07:44:11ehmryif you build nim from the nim branch of github.com/ehmry/nixpkgs it might work, but you still need a build environment with csfml
07:44:48ehmryI don't want to include csfml with the compiler because it blows up the closure
07:45:27ldleworkehmry: I have a nix-shell with csfml in it, why doesn't the compiler find it when I build
07:45:35ldleworkI don't know anything about flakes :/
07:47:32ehmrybecause the binary will try to dynamically load csfml at runtime, the library isn't search for at all during compile time
07:48:01ehmryand because there is no global library location, its not going to be found at runtime
07:48:27*lpy left #nim (#nim)
07:48:29ehmryso I've been patching the compiler to look at the nix build environment during compilation and load libraries by absolute path
07:48:51FromGitter<alehander92> hm
07:49:03FromGitter<alehander92> how do other compilers do that?
07:49:08ehmryand those ablsolute paths can be detected by nix as runtime dependencies
07:49:09wimlIs there a reason not to dynamically link the library instead of dlopening it?
07:49:33ehmryyea, most compilers have the linker figuring this stuff out at link time
07:49:36ldleworkwiml, what version of the library in the store should be the one that gets dynamically linked?
07:49:50ldleworkremember you can have N versions of the same package installed
07:50:02wimlThe one that's visible at build time ... just like any other library
07:50:18ldleworkThere is no sense of globally available libraries
07:50:28ldleworkin Nix
07:51:11wimlright, that's the advantage of dynamically linking it --- it gets a particular version instead of having to search at runtime
07:51:32wimljust like any other library
07:51:41ehmrythere is talk of removing rpath as much as possible in nix to speed things up
07:51:51ldleworkehmry: why doesn't this work? https://gist.github.com/9f6bfded5ec1e0ce435b068095bcb811
07:51:55ehmryI think dynamic loading by absolute path is fine
07:52:40ldlework?
07:53:03ehmryldlework: same error?
07:53:06ldleworkYeah.
07:53:49ldleworkThere should just be a compiler option to set the path for a linked library
07:53:54FromDiscord<whisperdev> @Elegant Beef for asyncssh
07:54:16FromDiscord<PizzaFox> is nimcrypto really maintained anymore
07:54:24FromDiscord<PizzaFox> it has like 0 docs
07:54:58FromDiscord<PizzaFox> and these very wacky examples using raw pointers for zero padding since the library doesnt give any padding implementations for convenience
07:55:04ehmryldlework: I'll try to build it then
07:55:08ldlework<3
07:55:18ldleworkactually I think there was something wrong with that shell.nix
07:55:21ldleworkit's only now cloning your nixpkgs
07:55:29ldleworknah same error
07:56:03ehmryPizzaFox: yea, I don't use nimcrympto, the constant casting between types is stupid
07:56:59ehmryI mean haveing to cast every argument is dumb
07:58:24ldleworkehmry: I don't really see any changes here that would do that stuff you said, https://github.com/ehmry/nixpkgs/blob/master/pkgs/development/compilers/nim/default.nix
07:58:56ldleworkno patches, etc
07:59:23ldleworkis it on some other branch?
07:59:41ldleworkI see that it is
08:00:13ehmryyes, nim branch
08:03:17FromGitter<alehander92> morning
08:04:38*krux02 joined #nim
08:05:09AraqPizzaFox: as far as I know it's maintained and used in production but of course, internally developed software doesn't prioritize documentation
08:06:03ldleworkehmry:
08:06:05ldlework/home/ldlework/src/nim-test/noise.nim(20) noise
08:06:07ldlework/home/ldlework/.nimble/pkgs/csfml-2.5.0/csfml/graphics.nim(238) newRenderWindow
08:06:09ldlework/home/ldlework/.nimble/pkgs/csfml-2.5.0/csfml/private/graphics_gen.nim(2197) newRenderWindow_U32
08:06:11ldleworkSIGSEGV: Illegal storage access. (Attempt to read from nil?)
08:06:18ldleworkIs this a result of the compiler hacks or a bug in my program?
08:06:37ldleworkThis is the line: window = newRenderWindow(videoMode(cint size, cint size), "maxnoise")
08:08:11ehmryldlework: works for me
08:08:24*awe001 joined #nim
08:08:37ldleworkwat
08:08:54ldleworkdid you try the shell.nix?
08:09:41ehmryyea, with "https://github.com/ehmry/nixpkgs/archive/8ba4bdabbac12b39ccd1bf35f814d5943c35bbac.tar.gz", but I'm on aarch64
08:10:27ldleworkok I used a different commit somehow
08:10:29ldleworkrecompiling nim..
08:10:52FromDiscord<Elegant Beef> What's your hardware ehmry?
08:11:19ehmrymnt reform beta https://mntre.com/
08:11:20ldleworksame failure
08:11:51ldlework:(
08:12:21ehmryI have to go, but I'll work on this later today
08:12:37ldleworkehmry: real quick, nothing wrong here? https://gist.github.com/e06866c7149ba77236ffd45be2af15a0
08:12:56ldleworkdang heh
08:13:15ehmryno, that matches mine
08:15:28ldleworkehmry: any hints of what to look into while you're gone? or is it going to be a result of your patches.
08:16:08FromGitter<alehander92> Araq what is that functional lang for gpu-s you mentioned
08:17:09Araqhttps://futhark-lang.org/
08:18:53ehmryldlework: we should be using the same compiler and csfml, so maybe the libraries from nimble are different? FWIW the nim-gdb that comes with the shell works
08:19:22alehander92ah i remember seeing stuff about it by his author maybe
08:19:23alehander92thanks
08:22:12ldleworki don't know anything about gdb
08:22:29ldleworkehmry: do I need to add csfml to the build inputs of the nim compiler derivation?
08:25:37ldleworkI'm trying to do:
08:25:39ldlework nim = ehmry.nim.overrideAttrs (old: {
08:25:41ldlework buildInputs = old.buildInputs ++ [ ehmry.csfrml ];
08:25:43ldlework });
08:25:46ldleworkbut it says old doesn't have a buildInputs attr, wtf
08:26:10ZevvAraq yeah that's pretty cool stuff
08:28:16alehander92ah this is the athas guy
08:29:36alehander92he hangd a lot in the #haskell channel when i was trying to learn iirc
08:33:48*awe002 joined #nim
08:35:59ldleworkehmry: hmm the way you compose nim-unwrapped and nim, makes it really hard to override nim-unwrapped's buildInputs
08:36:09ldleworkSo I imagine that is not actually what I'm supposed to do.
08:37:19*awe001 quit (Ping timeout: 260 seconds)
08:45:47*hnOsmium0001 quit (Quit: Connection closed for inactivity)
08:46:00*Guest_6 joined #nim
08:46:06Guest_6Hello everyone
08:46:19Guest_6I'm tuatarian from the discord server, just seeing what IRC is
08:46:36FromDiscord<iWonderAboutTuatara> I can confirm that is me
08:46:45Guest_6can we tag across clients?
08:47:03Guest_6iWonderAboutTuatara:
08:47:20FromDiscord<iWonderAboutTuatara> @Guest_6[IRC]
08:47:40FromDiscord<iWonderAboutTuatara> @371759389889003532-752449773629472878 test
08:47:46Guest_6no, that didn't work
08:47:53*Guest_6 is now known as Tuatarian
08:48:05FromDiscord<iWonderAboutTuatara> so i changed my name on irc sid
08:48:06FromDiscord<iWonderAboutTuatara> e
08:48:27TuatarianI don't really understand how IRC works
08:48:40Tuatarianbut it thinks I'm a different person now, on discord end anyway
08:48:44Tuatarianwith a new PFP and all
08:51:38alehander92different account yeah
08:51:39alehander92probably
08:54:45TuatarianSame account
08:54:53TuatarianI just used the namechange function
08:55:35*Tuatarian quit (Remote host closed the connection)
08:55:44FromDiscord<iWonderAboutTuatara> I prefer discord
08:55:45*maier joined #nim
08:55:52FromDiscord<iWonderAboutTuatara> It's a fair bit more normal to me
08:56:11FromDiscord<iWonderAboutTuatara> Maybe because I've been using it a fair bit longer
08:59:26ldleworkehmry: I got it working. I needed to use nvidia-offload
08:59:59*awe003 joined #nim
09:01:15*arecacea1 quit (Remote host closed the connection)
09:01:38*arecacea1 joined #nim
09:02:53*awe002 quit (Ping timeout: 265 seconds)
09:08:19*ehmry quit (Remote host closed the connection)
09:09:34*abm joined #nim
09:13:12FromDiscord<iWonderAboutTuatara> Question: Can i use nim with Flutter?
09:13:26FromDiscord<Clyybber> disruptek: ping
09:13:33FromDiscord<iWonderAboutTuatara> that doesn't ping inot irc
09:13:39FromDiscord<iWonderAboutTuatara> iirc
09:14:09*Tua joined #nim
09:14:14TuaHello
09:14:19FromDiscord<iWonderAboutTuatara> Tua: ping
09:14:37FromDiscord<iWonderAboutTuatara> Tua
09:14:44FromDiscord<iWonderAboutTuatara> oh, it does ping
09:14:55FromDiscord<iWonderAboutTuatara> Tua
09:15:27FromDiscord<iWonderAboutTuatara> anyway, if anyone has tried to use Nim with Flutter, please let me know
09:15:37FromDiscord<iWonderAboutTuatara> Or if it's not possible, please let me know as well
09:15:47*Tua quit (Remote host closed the connection)
09:16:05*snowolf quit (Ping timeout: 240 seconds)
09:22:34AraqiWonderAboutTuatara: not sure, if Flutter's core is written in C(++), then yes
09:22:51FromDiscord<iWonderAboutTuatara> It may be written in Dart
09:22:55FromDiscord<iWonderAboutTuatara> I'm not 100% sure
09:25:16FromDiscord<iWonderAboutTuatara> It's all Dart
09:25:28FromDiscord<iWonderAboutTuatara> https://media.discordapp.net/attachments/371759389889003532/752459506767757312/unknown.png
09:25:51FromDiscord<iWonderAboutTuatara> It's possible that the 0.2 + 0.0 % core is written in C++ and Obj C, but that seems unlikely
09:27:14Araqyou can compile Nim to JS and try some Dart/JS interfacing
09:27:46*Tanger quit (Remote host closed the connection)
09:28:24Araqbut I dunno, I would use a UI library not written to pitch yet-another terribly dynamic language
09:28:58FromDiscord<iWonderAboutTuatara> I chose flutter because it makes my life a lot easier
09:29:08FromDiscord<iWonderAboutTuatara> Don't need to rewrite a GUI twice, in Kotlin then Swift
09:29:34Araqa couple of months ago everybody chose React because it make life easier
09:29:56FromDiscord<iWonderAboutTuatara> I do js for my job, but I've heard too many pain stories from React Native
09:30:08Araqsorry, I cannot follow every fad
09:30:14FromDiscord<iWonderAboutTuatara> lmao fair enough
09:30:29FromDiscord<iWonderAboutTuatara> I do webdev stuff for my job, so I generally follow web stuff
09:30:35FromDiscord<iWonderAboutTuatara> and not a whole lot else
09:31:01FromDiscord<iWonderAboutTuatara> I would have gone electron, but it just swallows battery life
09:31:13FromDiscord<iWonderAboutTuatara> Which is not good for an offline mobile game
09:31:41FromDiscord<iWonderAboutTuatara> I haven't seen a lot of people complaining about Dart though, but admittedly there is almost nobody using it
09:31:54FromDiscord<iWonderAboutTuatara> too dynamic from what ive seen
09:32:20AraqI remember the times where they argued for unsound type co-/contravariance
09:32:58Araqnot sure if Dart still has that, for my the better JS is called TypeScript
09:32:58FromGitter<gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5f55fe4ad4f0f55ebb093080]
09:33:19FromGitter<gogolxdong> How to cast seq[T] to ptr SeqHeader with --gc:arc?
09:34:40FromDiscord<Clyybber> SeqHeader changed in gc:arc.
09:34:52FromDiscord<Clyybber> A seq is now a len|pointer pair
09:35:18FromDiscord<Recruit_main707> no more casting between strings and seqs then?
09:35:29Araqand soon a len/cap/pointer triple so that primitive vectorization works better...
09:35:31FromDiscord<Clyybber> no, strings behave the same
09:35:47FromDiscord<Recruit_main707> ok
09:39:14FromDiscord<iWonderAboutTuatara> Araq: I'm a massive fan of TS
09:39:26FromDiscord<iWonderAboutTuatara> It generates pretty readable js as well, which is a huge plus
09:40:36FromDiscord<iWonderAboutTuatara> But I honestly don't kind dynamic langauges too much
09:41:07FromDiscord<iWonderAboutTuatara> I have a preference for static but I 2ill 8ee a dynamic language if using an alternative would make my life significantly more difficult
09:43:29Araqhow exactly does shipping a JIT on iPhone not make it "difficult", they are against their policies
09:43:44Araqthey used to enforce this too
09:44:08Araqah never mind, they have an AOT too
09:50:16FromDiscord<iWonderAboutTuatara> It handles it for you iirc
09:50:31FromDiscord<iWonderAboutTuatara> They allow you to ship a JIT, you just have to use theirs
09:50:37Araqah they fixed it, "Dart 2.0 implemented a new sound type system. "
09:50:41FromDiscord<iWonderAboutTuatara> Which is a bit BS imo, but whatever
09:50:47FromDiscord<iWonderAboutTuatara> Oh good
09:51:18FromDiscord<iWonderAboutTuatara> Wait I'm so confused
09:51:25FromDiscord<iWonderAboutTuatara> Is it statically typed or not?
09:53:20FromDiscord<iWonderAboutTuatara> It seems to be static by default, you can declare s dynamic variable with `dynamic s = "Hello world!"`
09:53:29Araqnarimiran, LaTeX detected here: https://dart.dev/guides/language/specifications/DartLangSpec-v2.2.pdf
09:53:36FromDiscord<iWonderAboutTuatara> But keyword `var` is static
09:53:53Araqseems mostly static now, yeah.
09:54:05FromDiscord<iWonderAboutTuatara> That's nice
09:54:08*Araq enjoys detecting LaTeX documents.
09:54:22FromDiscord<iWonderAboutTuatara> That language spec looks like a proof
09:54:40Araq(they are always the ones that overwrite their margins. No other tool does this bullshit.)
09:54:53FromDiscord<iWonderAboutTuatara> Yeah I don't like LaTeX at all
09:55:10FromDiscord<iWonderAboutTuatara> But I'm not a guy who writes proofs so idk
09:55:18FromDiscord<iWonderAboutTuatara> Doesn't look nice though, not at all
09:57:16narimiranprogrammers. can write a new programming language and deal with very complex stuff. cannot write a normal LaTeX document.
09:57:35FromDiscord<iWonderAboutTuatara> https://media.discordapp.net/attachments/371759389889003532/752467594954539078/Screenshot_20200907-025716.jpg
09:57:41FromDiscord<iWonderAboutTuatara> Either have the space or don't, pick one
09:57:51FromDiscord<iWonderAboutTuatara> Lmao
09:57:52narimiranor at least: skim through the produced pdf and see if something needs to be changed
09:58:39FromDiscord<iWonderAboutTuatara> Do reactions show up in irc?
09:58:52FromDiscord<iWonderAboutTuatara> :nim1:
09:59:22Araqnarimiran, you can "skim" through 200 pages a couple of times but eventually it gets tiresome
09:59:39FromDiscord<iWonderAboutTuatara> Also, it's a very minor thing
10:00:00FromDiscord<Elegant Beef> If you're curious what IRC sees just look↵https://irclogs.nim-lang.org/
10:00:46FromDiscord<iWonderAboutTuatara> I think that kind of defers the question though
10:00:49*wiml quit (Quit: Leaving)
10:01:02FromDiscord<iWonderAboutTuatara> Does that site have support for showing the emojis/reactions?
10:01:16FromDiscord<Elegant Beef> No, why would it, the reactions/emojis are discord side
10:01:26FromDiscord<Elegant Beef> Other than the base discord ones
10:01:33FromDiscord<iWonderAboutTuatara> 👍
10:02:01FromDiscord<iWonderAboutTuatara> That showerd up correctly in irc logs
10:02:06FromDiscord<Elegant Beef> Lol, irc doesnt have deletions so deleting it was pointless 😄
10:02:06FromDiscord<iWonderAboutTuatara> 👍
10:02:11FromDiscord<iWonderAboutTuatara> Oh lmao
10:02:47FromDiscord<Elegant Beef> It's relatively archaic but it's what irc users like 😄
10:04:08FromDiscord<iWonderAboutTuatara> Yeah, seems overall worse to me
10:04:20FromDiscord<iWonderAboutTuatara> But worse enough to switch? Probably not
10:04:38*letto quit (Quit: Konversation terminated!)
10:06:34*letto joined #nim
10:06:38*darwinism-paced joined #nim
10:16:45FromDiscord<Clyybber> Araq: Why don't we simply change the spec to allow implicit and explicit returns together?
10:17:08Araqbecause it sucks, one should make up his mind
10:20:43*Vladar quit (Quit: Leaving)
10:22:32*bouzu_ joined #nim
10:24:17*Vladar joined #nim
10:27:55FromDiscord<Clyybber> Araq: https://github.com/nim-lang/Nim/pull/15123 branching is now done in semiStmtList
10:27:56disbotBetter semiStmtList parsing
10:29:57*Tanger joined #nim
10:33:53*pietroppeter joined #nim
10:34:17alehander92dart
10:34:20alehander92uses static typing iirc
10:35:00alehander92i really like the typescript experiments tho
10:35:20alehander92https://github.com/microsoft/TypeScript/pull/40336
10:35:22disbotTemplate string types and mapped type 'as' clauses ; snippet at 12https://play.nim-lang.org/#ix=2woW
10:52:01AraqClyybber: great now update the grammar too ;-)
10:57:06FromDiscord<Clyybber> Araq: Afaict its already in there, in parsePar's grammar "| simpleExpr"
10:58:12FromDiscord<Clyybber> ah, no
11:16:56TangerHey folks, I'm playing around with nimsuggest and I've followed the suggestions here https://nim-lang.org/docs/nimsuggest.html and ran nimsuggest --stdin --debug <myfile>.nim. With the query, should my first argument (file.nim) be "." or something to query on the file I supplied as an argument?
11:17:56TangerNevermind
11:18:11TangerI was using `sug` instead of `def`, which is what I wanted, haha
11:19:22FromGitter<gogolxdong> how to check a seq is literal or not then.
11:21:58FromDiscord<Rika> a var seq can never be a literal afaik
11:23:30FromDiscord<Clyybber> Araq: Done https://github.com/nim-lang/Nim/pull/15123/commits/f2fac28a9b903c37d567d4cd035c752639ce9687
11:23:31disbotBetter semiStmtList parsing
11:23:51FromDiscord<Clyybber> gogolxdong: Why would you need to check that?
11:23:59FromGitter<gogolxdong> ``` (cast[ptr SeqHeader](s).reserved and (1 shl (sizeof(int) * 8 - 2))) != 0```
11:24:42FromDiscord<Rika> thats just unsafe as heck
11:26:38FromDiscord<Clyybber> gogolxdong: I mean why you would need to check if its a literal or not
11:27:26FromGitter<gogolxdong> Have no idea , it's from nim-chronos, nim-libp2p
11:30:37FromGitter<gogolxdong> I can see it uses shallowCopy as long as it's not literal.
11:31:34FromDiscord<dom96> lol wtf
11:31:37FromDiscord<dom96> that's from chronos?
11:35:20FromGitter<gogolxdong> https://github.com/status-im/nim-chronos/blob/master/chronos/transports/common.nim#L515
11:36:18FromDiscord<Rika> thats horrible...
11:37:15narimirani recognize that casting! (the same thing is in `nimbus`, IIRC)
11:37:51narimiran...and it is the first thing that fails when you try to run it with `--gc:orc`
11:40:07alehander92raq
11:40:17alehander92Araq * so i talked with the futhark guy
11:41:11alehander92and he kinda agrees about the null / option thing, but he made an good point
11:41:40alehander92that NaN-s themselves sometimes matter (as carrying additional info different from "nothing")
11:42:37alehander92and on the other hand that they are just as dangerous as unchecked null-s indeed
11:43:32alehander92i guess that one can indeed have a universal concept of `T not A` (`ref not nil` `float not NaN` etc )
11:44:02alehander92back to work now
11:45:13*theelous3 joined #nim
11:50:26*ehmry joined #nim
11:52:00ehmryldlework: great. with the nim compiler you shouldn't need to override any `buildInputs`
11:52:35ehmryand nim-unwrapped *must* only take inputs that are relevant to the system hosting the compiler, not the target system
11:52:59ldleworkehmry: it was because I run with nvidia-offload, so I had to run it on the gpu
11:53:03ldleworkfor some reason..
11:54:05Araqalehander92, well thanks I guess.
11:58:45*JustASlacker joined #nim
11:58:56alehander92i was just interested in seeing how fp people actually think of low level details
11:59:16alehander92sorry for the offtopic
11:59:19alehander92:D
11:59:32FromDiscord<Clyybber> no need to be sorry :)
11:59:54*mipri left #nim (#nim)
11:59:57FromDiscord<Clyybber> this can all be accomplished via a proof system
12:00:12Araqclyybber: (ifExpr | complexOrSimpleStmt) now we're getting there
12:00:20FromDiscord<Clyybber> yep :D
12:00:43AraqcomplexOrSimpleStmt can start with the 'if' token so you have a reduce-reduce conflict
12:00:59FromDiscord<Clyybber> yeah
12:01:11Araqso how does it *really* work?
12:01:27FromDiscord<Clyybber> we check for if and if its if we parse an ifExpr instead of an ifStmt
12:01:36Araq(ifExpr / complexOrSimpleStmt) then
12:01:43FromDiscord<Clyybber> eh s/ifStmt/complexOrSimpelStmt
12:01:51Araqwhere '/' is the ordered choice
12:01:56FromDiscord<Clyybber> ah!
12:02:04Araq(not to be confused with '|' )
12:02:13FromDiscord<Clyybber> I figured you used / as an ordered choice, but wasn't sure
12:02:21alehander92clyybber i think it can be accomplished in a simpler way
12:02:28alehander92but first i have to finish my work
12:02:45Araqbtw https://github.com/nim-lang/Nim/pull/15281 is here for you to review
12:02:46disbotfixes #15280 [backport:1.2]
12:02:57FromDiscord<Clyybber> alehander92: The thing is, proof creation/consuming *is* the simplest way
12:03:00alehander92i can't wait for nim's latex spec
12:03:38FromDiscord<Clyybber> ?
12:03:52FromDiscord<Clyybber> oh :D
12:04:27FromDiscord<Clyybber> Araq: Looks good to me for what it wants to accomplish, but I don't particularily like the goal :D
12:06:02*supakeen quit (Quit: WeeChat 2.9)
12:06:38*supakeen joined #nim
12:07:44FromDiscord<Clyybber> And this was explicitly introduced as a feature in https://github.com/nim-lang/Nim/pull/13520
12:07:45disbotEndsInNoReturn in expressions extension, fixes #13490
12:08:07FromDiscord<Clyybber> IMO its better to just allow it. The compiler can handle it anyways
12:08:09AraqI figured but 'return' is different from 'raises' and the like
12:08:20alehander92clyybber kidding about latex; otherwise possible: but i need to see an exa,plee
12:08:27Araqmaybe, if you push for it
12:08:37Araqdistinguish between 'return val' and 'return'
12:09:05FromDiscord<Clyybber> Araq: You can see return as just a `result = x; break outerblockIntroducedByTransformation`
12:09:32FromDiscord<Clyybber> So IMO it doesn't make sense to specifically forbid return
12:09:34Araqthat's a fair point, 'break' shouldn't be allowed either
12:10:00FromDiscord<Clyybber> No, all control-flow-cancelling/skipping OPs should be allowed
12:10:02FromDiscord<Clyybber> IMO
12:11:23alehander92guys btw
12:11:47alehander92the requiresInit thing
12:12:40alehander92nvm i found a test
12:14:29alehander92so how does this work with serialization?
12:15:05alehander92e.g. i have T which has such a field: does the serialization lib have to know that it has to provide the field?
12:15:10alehander92does json handle it?
12:15:38Araqyeah it does
12:16:03Araqthe general solution is pretty much "disable the warning in this section of code"
12:16:30Araqjson handles it differently but Status's serialization disables the warning
12:17:50alehander92ok
12:17:58alehander92but `newSeq` breaks it as well
12:18:21alehander92so yeah here comes the default warning, right
12:18:23alehander92good
12:18:35FromDiscord<Clyybber> status has a default(T) variant where they take the addr and then deref it or something
12:18:41FromDiscord<Clyybber> but its a workaround IMO
12:18:45alehander92yeah i forgot my own rfc
12:19:19alehander92the disable thing might work
12:19:45alehander92which reminds me another thing: is there an easy way to just list all the "cases" of unsafe usages in my program
12:20:02alehander92as we often say "it's simple, just see if you use ptr / cast / etc"
12:20:26alehander92but the compiler can simply list them (especially if they are in some third party package)
12:20:33FromDiscord<Clyybber> grep "ptr"/"cast"/etc..
12:20:36alehander92(and not always instantiated for my code)
12:20:38alehander92eh ^
12:20:47alehander92grepping doesn't take into account what does my code use
12:21:16alehander92and one needs to find somewhere a list of those, grep one by one in the dep tre
12:22:12alehander92i am imagining something like `nim --listUnsafe`
12:23:37alehander92this can't list all anyway tho, because i can just import posix and memset to nil my totally unrelated location
12:24:06Araq*shrug* that's not a hard problem, so also list all .importc procs
12:25:09FromDiscord<Rika> unfortunate downside of showing all c wrappers as unsafe
12:25:24FromDiscord<Rika> and anything using nimterop wont be caught i assume
12:25:35FromDiscord<Clyybber> why?
12:25:43FromDiscord<Clyybber> we can do it after sem
12:25:46Araqyou start with a "list me ALL..." feature and already it's unusable in practice. given no connection to reality, we can make it flag even more cases
12:26:10Araqworks for me :-)
12:26:14alehander92Araq well the thing is not all importc stuff are unsafe in practice :)
12:26:15*Zectbumo quit (Remote host closed the connection)
12:26:18alehander92so it would have a lot of noise
12:26:28Araqneither are my usages of 'addr' unsafe.
12:26:32FromDiscord<Clyybber> yeah
12:26:44FromDiscord<Clyybber> in practice the only thing thats unsafe is bugs
12:26:55alehander92but it's often that you have 2-3 addr-es
12:27:01alehander92and 100 importc
12:27:05alehander92but i might be wrong here
12:27:31FromDiscord<Rika> arrd is not inherently unsafe is the idea
12:27:34FromDiscord<Rika> addr*
12:27:45alehander92ugh depends on how you define that
12:28:08FromDiscord<Rika> well then theres a flaw with listing what's unsafe
12:28:11FromDiscord<Rika> define unsafe
12:28:30FromDiscord<Rika> everyone probably has a conflicting idea on whats unsafe and now
12:28:31FromDiscord<Rika> (edit) 'now' => 'not'
12:28:40Araqif you want to find bugs, it ususally helps to do more than just the most naive way you can come up with.
12:28:41alehander92basically "warn about everything i can't kinda prove that shouldn't lead to random crashes" :D
12:29:03alehander92yes, but until i find this way, the naive way is still > 0
12:29:14FromDiscord<Rika> not really
12:29:22FromDiscord<Rika> it might lead you to a dead end
12:29:42alehander92but it gives you a finite list of stuff
12:29:43FromDiscord<Rika> aka misleading warnings or so
12:29:54alehander92oh i don't want warnings
12:30:15Araqbasically the usual "I'm confused and worried..."
12:30:43alehander92nah :)
12:30:47FromDiscord<Rika> finite list of stuff, but the list has false positives AND negatives...
12:31:06Araqthe scientific approach is completely different btw, that would be "what bugs usually come up in Nim programs and how to mitigate them"
12:31:15alehander92it's just a "ok the lang could force making "unsafe" stuff use `!`" but it doesn't so i need to list them somehow
12:31:43Araqonce you have '!' you'll soon enough ask for '!!', it's a race to the bottom
12:32:11alehander92wait for my `!!?!` hahaha
12:32:12FromDiscord<Rika> im tempted to mention the story of rust's actix
12:32:32alehander92dont get me wrong i dont really worry about that
12:32:45FromDiscord<Rika> other people will
12:33:19alehander92it's just annoying one can do
12:34:23alehander92if not variable.isNil: purefunc(); echo variable.flag
12:34:53FromDiscord<Clyybber> ?
12:35:04FromDiscord<Clyybber> thats not even remotely related
12:35:09alehander92and the implementor of purefunc to write something like # ignore side effects, memset stuff to zero
12:35:14FromDiscord<Clyybber> oh
12:35:39FromDiscord<Clyybber> well, should the language really stop you from using code thats badly written?
12:36:12FromDiscord<Clyybber> also, you can easily grep for {.noSideEffects.}: blocks
12:36:28alehander92no, but i want to be easy to say `nim --listUnsafe` and seeing e.g. "here the programer uses noSideEffect here he casts X"
12:36:29alehander92but dude
12:36:36alehander92i dont want to grep for 20 things
12:36:48FromDiscord<Clyybber> you want that. but it won't get you far
12:36:49alehander92:D and nobody even knows the full list of those things
12:36:54FromDiscord<Clyybber> you get a bunch of results
12:36:57FromDiscord<Clyybber> and then what?
12:37:07FromDiscord<Clyybber> you go bother the pkg authors about it?
12:37:14FromDiscord<Clyybber> or are you searching for a bug?
12:37:21Araqwell a .noSideEffect override has no effect on memory safety
12:37:28alehander92search for something related to your bug
12:37:54alehander92well it can hide a call to a function that reassigns something aliasing to your pointer
12:38:08Araqso yeah, the problem gets harder the less you invest into reasoning about possible program behaviours.
12:38:39Araqin the worst case, the crash could come from every line of code that you didn't look at and you looked at 0 lines, it's pretty bad
12:39:06alehander92yeah, but my point was where is the boundary
12:39:13FromDiscord<Varriount> @haxscramper commented on your dedent PR
12:39:16Araqbetter make the compiler list every source code line then
12:39:29Araqwhich you can then ignore further as it's overwhelming
12:39:43Araqmore to the point though
12:39:44alehander92e.g. i can probably construct a case where this can happen, so should I treat `func` calls as stuff that invalidates variable being not nil or not
12:40:03Araqsay we have --warning[unsafe]:on
12:40:15alehander92Araq well, that list can be grouped/sorted somehow
12:40:19Araqand then 3rd party libraries grow
12:40:40Araq{.push warning[unsafe]:off.}: ... addr(x) ... {.pop.}
12:41:03Araqand then you demand to see the unsafe code in your 3rd party deps too
12:41:20Araqso we add --warning[unsafeAlways]
12:41:31alehander92but isn't the instantiation thing relevant? it's very possible that my code uses just 20% of those things actually
12:41:37Araqand then ... well you get the idea
12:41:57Araqbut you don't declare which ones you use and code evolves
12:42:06alehander92but the compiler knows
12:42:16Araqmaybe later on you more than 20% or a different 20%
12:42:19alehander92because it imports/instantiates just the functions and modules
12:42:22alehander92that i use
12:42:30Araqthe compiler doesn't know the history of your security reviews
12:42:51alehander92ok, but the advice usually is "grep for X", but there are 20 X-es
12:42:54alehander92how is this better
12:43:10FromDiscord<Rika> it isnt
12:43:22Araqthere are 3 X-es. 'addr', 'unsafeAddr' and 'cast'
12:43:40Araq'ptr T' itself is a type and cannot be "unsafe", only real code can be unsafe
12:43:50alehander92but there are many warning:off etc
12:43:56alehander92otherStuff:off
12:44:02Araq.noSideEffect overrides are not related to memory safety
12:44:12alehander92but they are
12:44:19Araqthey are not.
12:44:41FromDiscord<Rika> not directly
12:44:48alehander92i can call a function which sets global stuff to nil
12:44:56alehander92and this can be aliased to a local var in my caller
12:45:04FromDiscord<Varriount> Hm. Does aliasing (the current aliasing limitations for parameters) influence this discussion at all?
12:45:05alehander92local var field*
12:45:05alehander92ok
12:45:07Araqoh not that again...
12:45:20alehander92ok, just asking if this is relevant or not
12:45:27Araqthat was wrong years ago when you first brought it up
12:45:34Araqand it's still wrong.
12:45:38alehander92but now we also have fields
12:46:22alehander92basically it's exactly your mutation thing but i just wonder
12:46:30alehander92if it asssumes that `func` can't mutate
12:46:50Araqit doesn't. but it should IMO
12:46:53FromDiscord<Clyybber> @Varriount I lifted it
12:47:03FromDiscord<Clyybber> If you are talkign about default params
12:47:07FromDiscord<Clyybber> and the unindent PR
12:47:13Araqbut that's a different discussion, currently it doesn't assume deep immutability
12:47:18FromDiscord<Clyybber> oh, I don't think you are :D
12:47:19FromDiscord<Rika> the issue is not usage but improper usage
12:47:47alehander92sorry
12:47:50alehander92let me make an example
12:47:58FromDiscord<mratsim> btw thoughts on adding __attribute("pure") in the codegen with strictFunc as suggested by snej? (only if there are no "var" I guess)
12:48:32FromDiscord<mratsim> might as well add "const * const int"
12:48:58FromDiscord<Clyybber> sounds good
12:48:59Araqmratsim: yeah :-) first is noalias / restrict though
12:50:30Araqthese discussions are tiresome, what if your dependency has code like 'exec"rm -rf ~ "' and 'exec' wrapped in a way so that not even Nim's .tag system detects it?
12:50:54FromDiscord<mratsim> I need them all, I'm fighting dumb Clang codegen and superdumb GCC codegen when dealing with crypto objects of size ~4608-bit (576 bytes) where they do some aliasing defense in the function prologue and this is costing me 5%~10% perf
12:51:12Araqshouldn't you worry about that moreso than about random memory mutations that can only affect the fragile process that is currently running?
12:51:38Araqwhy is it that nobody ever worries about my hard disk contents?
12:51:39FromDiscord<mratsim> {.noalias.} is something I can add manually when i don't have attribute pure so i'm fine with the order
12:51:46alehander92Araq well memory mutations seem pretty dangerous :D
12:52:33Araq"oh no, my browser crashed" vs "oh no, I lost a week of my work"
12:52:34FromDiscord<mratsim> btw, someone screenshotted the first malware written in Nim in the wild last Friday (?)
12:52:37alehander92i am working on the lang level, os-es / supervisors can deal with the permissions/protection thing
12:52:56alehander92but memory bugs can sometimes lead to vulnerabilities
12:53:14alehander92maybe not in this case but like in general, they are not always less dangerous
12:53:30Araqsure they can. and even worse, they are a pita to debug
12:53:42FromDiscord<mratsim> easier than threading bugs
12:54:12Araqbut if we worry about stuff why stop there, we can worry about so many more things
12:54:44Araqthere is no shortage of things to worry about.
12:55:15AraqI worry I don't get things done, so bye.
12:58:10FromDiscord<Varriount> @Clyybber my comment was about the behavior of the implementation
12:58:39FromDiscord<Varriount> Of unindent
12:58:52FromDiscord<Clyybber> Ah
12:58:56FromDiscord<Clyybber> I think the implementation is fine
12:59:21FromDiscord<Clyybber> But what you said is correct
12:59:46FromDiscord<Clyybber> Although, its power comes through the count parameter
13:00:08FromDiscord<Clyybber> the default needs to stay as is, sadly because we break niminaction otherwise
13:00:24FromDiscord<Varriount> Which is why I suggest deprecation
13:00:35FromDiscord<Varriount> And adopting a new name
13:01:24FromDiscord<Rika> unindent -> dedent 😉
13:01:29FromDiscord<Clyybber> Fair enough, but the deprecation can be done in a different PR from haxscrampers or mine, because I think it will cause more controversy
13:01:43FromDiscord<Clyybber> But now theres not too much difference between our PRs I think
13:02:04FromDiscord<Varriount> I would like this resolved before merging.
13:02:17FromDiscord<haxscramper> clyyber's implementation has better API than mine (`indentation` function might also be useful)
13:03:04FromDiscord<Varriount> "dedent" and "unindent" are, if not grammatically identical, still similar enough to cause confusion.
13:03:23FromDiscord<haxscramper> Aside from naming they are pretty much identical, but just adding `indentation` and `dedent` procs to strutils won't be an issue
13:03:24FromDiscord<Varriount> One or the other, but not both
13:03:40FromDiscord<Clyybber> hmm, theres a small diff; my loop exits when the ident of the current line is bigger than the maximum already established by the previous lines
13:03:54FromDiscord<haxscramper> > Aside from naming they are pretty much identical, but just adding `indentation` and `dedent` procs to strutils won't be an issue↵@haxscramper Add explanation in documentation outlining differences? They pretty much identical behaviour-wise too
13:04:00FromDiscord<Varriount> I'm not talking about the implementation. I'm taking about the names
13:05:01FromDiscord<haxscramper> Well, I don't think we should change behaviour of the `unindent`, and I don't think adding new proc will cause that much of confusion
13:05:18FromDiscord<haxscramper> Note differences in documentation, this should be enough
13:05:43*SenasOzys joined #nim
13:05:44FromDiscord<Varriount> And then people have to remember the differences, and match them up correctly
13:06:04FromDiscord<Clyybber> I'm not sure if we should users of unindent to dedent by deprecation
13:06:06FromDiscord<Varriount> It's like php and all the MySQL escape variations
13:06:22FromDiscord<Clyybber> since """...""".unindent looks fancier than """...""".dedent(int.high)
13:08:08*martylake_ joined #nim
13:08:49*darwinism-paced quit (Remote host closed the connection)
13:09:03FromDiscord<haxscramper> Alright, then (1) mark current implementation of `unindent` as deprecated; (2) Accept PR with `indentation` and `dedent` proc (instead of changing behaviour for existing one). This mostly solves the issue of having users to remember the difference; does not break existing code
13:11:49*superbia quit (Quit: WeeChat 2.9)
13:16:40TangerClyybber: Hey mate, you made cligen yeah?
13:20:45Araqiirc it was c-blake
13:21:22Araq--experimental:views ?
13:21:32Araqgood enough for a name? bikeshedding time
13:21:37TangerAh, you're right, thanks
13:28:05*audiofile joined #nim
13:28:48FromDiscord<mratsim> views? for first class openarrays?
13:34:24Araqyes
13:35:19*waleee-cl joined #nim
13:39:28FromDiscord<exelotl> :o
13:40:35FromDiscord<mratsim> sounds good.
13:40:39FromDiscord<Rika> sounds great
13:40:45FromDiscord<mratsim> sounds awesome
13:41:43disruptekviews; what else?
13:42:33disruptekAraq: you are anti-block-break now?
13:42:40FromDiscord<mratsim> Note, C# is now following C++ lead and calling that Span (instead of Slice): https://github.com/joeduffy/slice.net#important-note
13:42:54disruptekor, just because this code is so trivial?
13:43:02Araqthe latter
13:43:38disruptekfair enough.
13:43:53Araqbut yeah now that you phrase it this way, block and loop structures without 'break' would be sweet
13:44:02FromDiscord<Rika> is there a reason theyre called spans?
13:44:05FromDiscord<Rika> instead of slices?
13:44:24FromDiscord<Rika> in C# as mratsim says i mean
13:44:49disruptekyou mean, while/else. 😜
13:45:13Araqyes while/else but much better
13:45:25disrupteksuch as what?
13:45:59Araqunfortunately I haven't had good ideas beyond 'for x in iter while cond'
13:46:18Araq(notice the absense of a colon, that's a single loop construct)
13:46:27disruptekdude, speaking of crazy...
13:46:46disruptekterm rewriting macros.
13:46:51disruptekcompletely bananas.
13:47:07AraqI don't see the connection
13:47:50FromDiscord<mratsim> @Rika, C++ calls them spans
13:48:07disrupteki didn't realize there were so many constraints.
13:48:19FromDiscord<Rika> yeah and im wondering why they call it spans
13:48:23disruptekit's a super powerful part of the language.
13:48:23FromDiscord<mratsim> and I expect it's because slice is often used in libraries so introducing a new slice type in the standard library would be a pain for the ecosystem
13:48:33disrupteknot convinced i can trust it, though.
13:50:11FromDiscord<mratsim> apparently they already had "view" as well for something more complex http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0122r1.pdf
13:50:51Araqdisruptek: it's bad for compile-times and I have a redesign of this feature in an unwritten RFC
13:51:10AraqNim - The book of unwritten RFCs.
13:51:15disruptekso my fears are warranted. 🙁
13:51:42Araqwell mratsim uses them, they work and when they don't you get missed optimizations
13:51:53FromDiscord<lqdev> if an rfc isn't written, is it even an rfc? 🤔
13:52:10disrupteki was going to use them for automatic compile-time json.
13:52:18FromDiscord<Rika> "you can request for comment without writing anything" (/s)
13:52:21disruptekseems ideal, but i don't want to have them break on me.
13:52:44Araqdoesn't sound like you use them for "optimizations only"
13:53:12disruptekwell, i haven't found a clean way to make statics slot in naturally and get pre-encoded.
13:53:24disrupteki have to specify every typedesc.
13:53:32FromDiscord<mratsim> I use them but I'm better served with a DSL + compiler anyway
13:53:46FromDiscord<mratsim> ah there is a case where they are needed for correctness
13:54:15FromDiscord<mratsim> https://github.com/mratsim/Arraymancer/blob/master/src/arraymancer/math_ops_fusion/math_ops_fusion.nim#L19-L42
13:54:22disruptek1500 cycles to 4 cycles is worth it, especially with so much of my generated api stuff.
13:55:11FromDiscord<mratsim> to detect ln(1+x) and exp(x) - 1 and rewrites it to proc without catastrophic cancellation
13:55:29FromDiscord<mratsim> but I commented those out because somehow I couldn't detect the thing with TRM
13:56:18alehander92i think TR had limit on recursion
13:56:30FromDiscord<mratsim> I'm also using there as an alignment trick: https://github.com/numforge/laser/blob/master/laser/tensor/datatypes.nim#L90-L102
13:56:33alehander92so not sure how good is it for serizalization dsl
13:57:11*maier quit (Ping timeout: 258 seconds)
13:57:34FromDiscord<mratsim> and this would be nice: https://github.com/nim-lang/Nim/issues/7214#issuecomment-431567894
13:57:36disbotTerm rewriting macros: not working when declared inside template ; snippet at 12https://play.nim-lang.org/#ix=2wq1
13:57:41disruptekhey, our language color got fixed finally.
13:57:56FromDiscord<mratsim> when you go in DSL mode, you might as well add your own optimization passes
13:58:47disrupteki'm going to have to unignore discord just so i can hear mratsim.
13:59:09FromDiscord<Yardanico> Yahoo Disruptek you're right
13:59:15FromDiscord<Yardanico> The colour is finally there
13:59:30disruptekgood job, dude.
14:00:06audiofileanyone here develop with juce?
14:01:02FromDiscord<Yardanico> @disruptek ironic thing is that they lifted the colour difference restrictions
14:01:14FromDiscord<Yardanico> So you don't need to care if you colour conflicts with others
14:01:28disruptekeh it's fine. i think it looks good. very golden.
14:01:34FromDiscord<Yardanico> But anyway, our colour is more easily distinguishable this way
14:01:36disruptekmakes javascript look like shit, too.
14:02:54FromDiscord<exelotl> Should we consider restructuring the discord server so that irc folks don't feel compelled to mute the bridge?
14:02:58disruptekclyybber: now that you're unmuted you can make excuses for breaking criterion.
14:03:12FromDiscord<Yardanico> @exelotl it's only Disruptek so far :)
14:03:24FromDiscord<Yardanico> And there's not much I can do about word wrapping in code pastes
14:03:37FromDiscord<Yardanico> Absence of it
14:03:40disruptekit's not word-wrapping, chucklehead.
14:03:57disruptekit's putting invalid nim code into the playground.
14:04:05FromDiscord<Yardanico> Well yeah I said I'll fix that
14:04:06disruptekif you're not going to vet it, just send it to ix.
14:04:14FromDiscord<Yardanico> It's sent to ix
14:04:17disrupteki've been asking you to fix it for literally months.
14:04:25FromDiscord<Yardanico> Nim playground uses ix
14:04:27FromDiscord<Yardanico> No you weren't :)
14:04:35FromDiscord<Yardanico> I only recently learned what you actually meant
14:04:48disruptekwell, i thought it was obviously broken. my bad.
14:05:39FromDiscord<exelotl> It's also worth fixing cause it would allow servers other than this one to use the bot xD
14:05:55FromDiscord<Yardanico> You can do it even now, it's not hard to remove playground
14:05:58FromDiscord<Yardanico> Playground uses ix anyway
14:06:12disrupteki had to recreate criterion repo because otherwise the bot ignores it as a fork.
14:06:14FromDiscord<Yardanico> I just make a playground link to the ix paste I made
14:06:38TangerCan I use nimsuggest to extract the function names from a source file?
14:06:50disruptekyep.
14:09:20Tangerdisruptek, sorry ,is that a yes to me?
14:13:38*pietroppeter quit (Quit: Connection closed for inactivity)
14:19:21TangerAlso, what does "terse" mode actually do?
14:25:04*awe004 joined #nim
14:25:33*maier joined #nim
14:27:45*awe003 quit (Ping timeout: 240 seconds)
14:35:37FromDiscord<Yardanico> What mode?
14:35:48FromDiscord<Yardanico> Oh, in nimsuggest
14:35:50FromDiscord<Yardanico> No clue
14:46:47FromDiscord<Clyybber> Tanger: No, thats c-blake
14:46:55FromDiscord<Clyybber> disruptek: I'm already investigating
14:48:23disruptektanger: what are you trying to accomplish? it's more convenient to simply parse the file into ast.
14:50:30FromDiscord<Clyybber> Araq: Regarding borrow checking/views. We should unify lent/view/cursor
14:50:47AraqI'm using the same logic for them yes
14:51:10Araqcheck out my additions to varpartitions.nim, we know do it "scope" based
14:51:13Araq*now
14:51:37FromDiscord<Clyybber> disruptek: How come if your usage is so trivial you struggle to give us a test case which we can work with?
14:51:37Tangerdisruptek, I'm refactoring metacommands in INim. IPython has metacommands like `ls`, but if you define your own ls function, it overrides it. Essentially, I want to see what's available in scope to the buffer file and exclude builtin commands only if they're defined elsewhere
14:52:42FromDiscord<Clyybber> theres `defined(symbol)`
14:52:50disruptekclyybber: for what? concepts?
14:52:53FromDiscord<Clyybber> eh, declared(symbol)
14:52:56FromDiscord<Clyybber> disruptek: Yes
14:54:41disruptekclyybber: you want me to tell you what's wrong so you can fix it. you're the expert about how it works. how should i know why it doesn't work? have you looked at my usage?
14:55:07FromDiscord<Clyybber> No, I want you to tell me *what* doesn't work
14:55:10disruptekmy car makes a weird noise when i turn left.
14:55:23TangerI'd prefer to get it through nimsuggest as a natural step to autocompletion
14:55:37disruptekclyybber: mangling doesn't bootstrap on nim-1.0, iirc.
14:55:50FromDiscord<Clyybber> yes, does not tell me what doesn't work
14:56:00disruptekmy car makes a weird noise when i turn left.
14:56:02FromDiscord<Clyybber> what I want is something small
14:56:10disruptekdo i have to take my car apart?
14:56:13FromDiscord<Clyybber> yeah
14:56:18disruptekwell, i'm not a mechanic.
14:56:24disrupteki'm just a driver.
14:56:25FromDiscord<Clyybber> use DUST?
14:56:30disruptekon the compiler?
14:56:32FromDiscord<Clyybber> thats what its made for no?
14:56:34disruptekare you mad, man?
14:56:58disruptekit's not very good, and not good enough for this.
14:57:07FromDiscord<Clyybber> also, its concepts, if *they* are bugged, you should be able to extract a testcase, replace everything with stubs
14:59:28FromDiscord<Clyybber> I can't simply "fix" your mangling problems because I don't know what they are and because its too big
14:59:33FromDiscord<Clyybber> Like what are they
14:59:38FromDiscord<Clyybber> is some concept not matching?
14:59:41FromDiscord<Clyybber> is it that they hang?
14:59:43FromDiscord<Clyybber> crash?
14:59:52disruptekdo you have access to nim's ci?
15:01:37disruptekgah, /do i have access to nim's ci/
15:01:53disruptek0 errors / 0 warnings
15:03:00disruptek /home/runner/work/Nim/Nim/compiler/mangler.nim(184, 48) Error: generic instantiation too nested
15:03:24FromDiscord<Clyybber> what happens if you increase the nesting limit?
15:06:09alehander92hm
15:06:14alehander92need to bootstrap as well
15:06:21disruptekhow do i do that?
15:06:49disrupteklemme push this tweak so the line numbers work.
15:07:12FromDiscord<Clyybber> compiler/seminst:330
15:07:21FromDiscord<Clyybber> increase the 50 to 500
15:13:59*maier quit (Ping timeout: 260 seconds)
15:50:14FromDiscord<Clyybber> Araq: The fundamental difference between cursors and views is that cursors are introduced as optimization, thus its ok to COW, while views can't be COW
15:50:40Araqlol don't lecture me, I'm completely aware
15:51:02Araqstill it can use the same, smart underlying algorithm for borrow checking
15:51:18ZevvClyybber: one day your day will come. You will be able to lecture Araq and he will be *totally* ignorant and oblivious
15:51:21FromDiscord<Clyybber> sorry, didn't mean to lecture you, I wanted to follow up
15:51:22Zevvyour day will come
15:51:59FromDiscord<Clyybber> with this sentence: "So maybe we should encode it into the type. What do we want lent to be?
15:52:09FromDiscord<Clyybber> Araq: Can it not?
15:52:20FromDiscord<Clyybber> Zevv: lol
15:52:59AraqClyybber: 'lent T's implementation can remain dependent on T's size
15:53:14Araqit should work out
15:53:19FromDiscord<Clyybber> yeah
15:53:44FromDiscord<Clyybber> ok, so lent is COW
15:53:48FromDiscord<Clyybber> sounds good
15:53:51Araqbah patching the backend for first class openArray is an unhealthy amount of work
15:54:06Araqonce again an AST to AST rewrite seems simpler
15:54:06FromDiscord<Clyybber> I can imagine
15:54:28FromDiscord<Clyybber> yeah
15:54:33Araqotherwise it bubbles up into everything
15:54:35Araqbbl
15:55:05FromDiscord<Clyybber> ce ya
15:59:44FromDiscord<mratsim> instead of patching, we can have view alongside openarray and then slowly deprecate openarrays
16:18:00*martylake_ quit (Ping timeout: 245 seconds)
16:26:29FromGitter<StefanSalewski> Salewski may have joined.
16:26:44FromDiscord<Clyybber> sup
16:27:32FromDiscord<Rika> hello
16:28:19FromGitter<StefanSalewski> Admins, I would strongly suggest deleting last post in https://forum.nim-lang.org/t/6766#42238, it is really too unfriendly.
16:29:02*awe004 quit (Ping timeout: 246 seconds)
16:30:42FromDiscord<Rika> which one
16:31:27*awe004 joined #nim
16:33:59FromDiscord<Rika> i assume solitude's but its not highlighted when i open the link so
16:35:06*hnOsmium0001 joined #nim
16:35:08narimiran"really too unfriendly" ...coming from a guy who just the other day called some new nim users morons :D
16:35:51FromDiscord<Rika> 👀 yall better not fight
16:37:09alehander92hm
16:37:15alehander92actually i agree with the lack of democracy
16:37:34FromGitter<StefanSalewski> Yes, but a post with only one sentence with "entire post is one of the worst things i've read on this forum" is too extrem I think.
16:38:43solitudesfokay okay
16:39:19FromGitter<StefanSalewski> Thanks, bye.
16:41:40FromDiscord<exelotl> The forums are pretty atrocious these days tbh, just today I saw a 2-year old thread that was necro'd and immediately devolved into people calling each other "triggered"
16:43:49*Kaivo quit (Ping timeout: 260 seconds)
16:48:03Zevvyeah, I wondered as well. It's not like there is a small group trolling about, it's just the overall tone
16:48:46FromDiscord<Rika> why is it like that over there
16:49:09ZevvI don't know. here it's usually just fine. The usual name calling from disruptek, but no one takes that seriously
16:49:26FromDiscord<Recruit_main707> sent a long message, see http://ix.io/2wqQ
16:49:53FromDiscord<Clyybber> because if people write bs in a chat or talk bs during a conversation one can correct the other, and nothing feels permanent
16:50:35FromDiscord<Clyybber> but if you make a post, it probably feels more like a postulate (bdumtss)
16:50:47Zevvwho's in charge of the discord bridge?
16:50:49FromDiscord<Rika> post, you late
16:50:55Zevvit does funn stuff with these long messages
16:51:01FromDiscord<Rika> yardanico
16:51:15Zevvping @Yardanico
16:51:16FromDiscord<Recruit_main707> i sent the code so that irc could see it i think
16:51:23FromDiscord<Recruit_main707> line by line
16:51:29Zevvyeah but your question is also in that message
16:51:31Zevvthat's a bit silly
16:51:33FromDiscord<Yardanico> Wat happen
16:51:43ZevvI think the snippet should go to ix, but your text should just be posted
16:51:58FromDiscord<Clyybber> disruptek infested Zevv
16:52:03FromDiscord<Yardanico> This is not as simple
16:52:07FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/752571913272033460/Screenshot_2020-09-07-19-51-57-054_com.discord.jpg
16:52:13FromDiscord<Yardanico> This is how that message looks
16:52:27Zevvif it were simple, anybody could do it. But we have Yardanico!
16:52:43FromDiscord<Yardanico> Reverse psychology Huh
16:52:46FromDiscord<Yardanico> *huh
16:52:48Zevvwho, me?
16:52:49Zevvwhat where
16:53:08FromDiscord<Yardanico> When
16:53:29ZevvI was recently sent to a course "effective communication". I now do everything they didn't tell me, or don't do anything they told me. I forgot
16:54:15FromDiscord<Recruit_main707> should i open an issue in the glad repo about this?
16:54:30FromDiscord<Recruit_main707> its pretty dumb, how is it that no one has seen it yet
16:54:32voidpiZevv: the earth king has invited you to drink tea at lake laogai
16:55:09ZevvI had to google that up
16:55:15*Zevv is too old for that shit
16:55:22FromDiscord<Rika> there is no war in ba sing se
16:55:45voidpiZevv: me too, just saw the thing a couple of months ago
16:55:54Zevvhehe
16:56:14FromDiscord<Rika> man im young then
16:56:26voidpiit really is good
16:56:42voidpisorry about the OT
16:57:43Zevvoh we never do on-topic here. We have #nim-ontopic for that
16:58:05FromDiscord<Rika> lol
17:00:08*MyMind joined #nim
17:00:49*a_chou joined #nim
17:01:23*Sembei quit (Ping timeout: 265 seconds)
17:01:32FromDiscord<Recruit_main707> there is also this line:↵`GL_TIMEOUT_IGNORED*: GLenum = GLenum(0xFFFFFFFFFFFFFFFF)`↵`Error: -1 can't be converted to GLenum`↵which its because uint32 cant be negative (if im not mistaken)
17:01:48FromDiscord<Clyybber> yeah that wrapper is broken then
17:02:50voidpiStefanSalewski: I'm reading your book it's helping me a lot thanks
17:03:19FromDiscord<Recruit_main707> its only those things, i think opening an issue on github warning about it could fix it
17:03:54voidpithe binary sum is wrong btw
17:04:56alehander92we need to correct
17:08:21voidpialehander92: since I'm reading it I can ping you if I see any typos
17:09:07alehander92i meant to correct ourselves in stuff like forums
17:09:29alehander92maybe you want to ping stefan for the book?
17:10:14voidpialehander92: heh, yes
17:10:28*maier joined #nim
17:10:56*Vladar quit (Remote host closed the connection)
17:15:54*maier quit (Ping timeout: 260 seconds)
17:23:08*a_chou quit (Quit: a_chou)
17:24:46*natrys joined #nim
17:51:35*arecacea1 quit (Remote host closed the connection)
17:51:54*arecacea1 joined #nim
17:52:20FromDiscord<Clyybber> disrupotek
18:09:54*gmaggior joined #nim
18:13:23*lritter joined #nim
18:17:34*supakeen quit (Quit: WeeChat 2.9)
18:18:19*supakeen joined #nim
18:24:05*JustASlacker quit (Ping timeout: 240 seconds)
18:25:16disrupteki live
18:30:22FromDiscord<iWonderAboutTuatara> Wow same
18:33:20supakeenSo much in common.
18:33:56FromDiscord<iWonderAboutTuatara> Yeah, it's truly incrediblen
18:41:12stefantalpalaruCan I always rely on the Nim compiler generating explicit C++ casts between aliased, but non-distinct, Nim types?
18:41:37stefantalpalaru(I may have a special case here, because one of those types is importc-based)
18:42:14FromDiscord<Clyybber> I don't think so.
18:46:11*pietroppeter joined #nim
18:48:31disruptekAraq: .editorconfig ... looks like this:
18:48:37disruptek[*]
18:48:37disruptekindent_style = space
18:48:37disruptekinsert_final_newline = true
18:48:38disruptekindent_size = 2
18:48:39disruptektrim_trailing_whitespace = true
18:48:54disruptekshall i PR it into the compiler or PR it into .gitignore? 😉
18:51:28alehander92guys
18:51:39alehander92is a.isNil a compile time warning/error for not nil ?
18:51:52disruptekwarning.
18:52:04disruptek"condition is always false"
18:53:26alehander92do we have that for other builtins?
18:53:40alehander92yeah a default error probably would break code
18:53:57alehander92it's a bit odd tho
18:54:06disruptekeh, see compiler/semtypes for some error message machinery.
18:54:09alehander92e.g. it's the same as `[2].len == 0` # always false
18:54:13alehander92no no
18:54:20alehander92i mean if it's an api precedent
18:54:28alehander92to warn for such unreachable cases
18:54:33*haxscramper joined #nim
18:54:40disruptekwell, we have an unreachable code warning, indeed.
18:55:02alehander92thanks for semtypes pointer
18:55:05alehander92!
18:55:06alehander92okk
18:55:54disrupteki think unreachableElse is a thing that you might piggyback, too.
18:56:00haxscramperHow should `nimph fork` be done exactly? When I do `nimph fork gram` I get `unable to find a project; try nimble init?`
18:56:11haxscramperIn empty directory*
18:56:30disruptekah, it works in a project. the next nimph will let you run in any git repo.
18:56:49disruptekie. we define projects as repos, not directories with .nimble files.
18:57:19disruptek!issue nimph 2.0
18:57:20disbotno results 😢
18:57:27disruptek!pull nimph 2.0
18:57:28disbotno results 😢
18:57:31disruptekjesus.
18:57:31haxscramperSo I need to clone gram and then do nimph fork inside clone directory?
18:57:59disruptekif you are in any project that has gram in it, or you are in gram itself, you can `nimph fork gram`.
18:58:31disruptektechnically, you could do it in any project as long as nimph can find gram in your global nimble packages or locally or anywhere.
18:58:42disruptekprobably we should let you fork with a url, too.
19:00:26*NimBot joined #nim
19:02:41haxscramperIf I do `nimph fork` on globally installed package I will have to deal with git myself because files in `.nimble/pkgs` are stored without any metadata, right?
19:02:41haxscramper
19:02:41haxscramperSo I should use `--path` if I want to write my own code & do some minor fixes to forked package as I stumble upon bugs.
19:03:15haxscramperWhen I'm done I commit fixes and PR them
19:03:17disruptekhonestly, it works really well if you use it like a normal, sane developer.
19:03:38disruptekyou have a project that uses gram. you discover that i'm an idiot and i have no business tapping on a keyboard.
19:04:06disruptekyou type, `nimph fork gram`. then cd (nimph path gram); then you make changes. you `git push`. you create a PR.
19:04:10haxscramperI do fork-fix-pr and continue with my code
19:04:11disruptekit's really that simple.
19:04:34disruptekyeah. i do this all day long with my own shit and nimph doesn't know who i am.
19:04:42disruptekjust behave like me and you can fool nimph, too.
19:04:50disruptekor tell me what workflow you want.
19:05:03disrupteki have a lot to learn about effective software development.
19:05:50haxscramperI actually just worded it badly. What I tried to say in the first message was just 'fork-fix-pr & continue with my own code'
19:06:17disruptekyes, but you shouldn't even need to set the --path.
19:06:33haxscramperI just have bad habit of writing everything at once, so I tend to do a lot of fixups in my own dependencies; this is probably not a good thing anyway
19:06:46disrupteklocal deps will help you a lot.
19:07:22*JustASlacker joined #nim
19:07:32disruptekyou just make a nim.cfg in your project with `--clearNimblePath` and `--nimblePath="$config/deps/pkgs/" and then you `mkdir deps` and `nimph doctor` will clone them all into the deps and setup all the paths for you.
19:07:54disruptekin the future, you won't even do any of that.
19:11:20*maier joined #nim
19:11:47disruptekand let me know how it works for you. i get precious little feedback on this stuff.
19:13:38haxscramperI will
19:16:43*maier quit (Ping timeout: 265 seconds)
19:17:48*JustASlacker quit (Ping timeout: 260 seconds)
19:22:36FromDiscord<iWonderAboutTuatara> Does Nim to JS compiler produce readable js?
19:22:47stefantalpalaru"nimStackTraceOverride: enable stack traces in exceptions" - https://github.com/nim-lang/Nim/pull/15284
19:22:48disrupteknode loves to read it.
19:22:48disbotnimStackTraceOverride: enable stack traces in exceptions
19:22:53FromDiscord<iWonderAboutTuatara> Ie if I wanted to edit the js directly eeouof that be feasible?
19:23:09FromDiscord<iWonderAboutTuatara> Lmao
19:23:11disruptekyes but you'd be wise not to.
19:23:15bozaloshtshyou _could_ do it but why would you want to?
19:23:28bozaloshtshjust emit stuff with the asm statement
19:23:31FromDiscord<iWonderAboutTuatara> I imagine the transpiler isn't the best right?
19:23:42disruptekwhat are you comparing it to?
19:23:52FromDiscord<iWonderAboutTuatara> Typescript, mostly
19:23:59disruptekyou can write javascript with other languages, but who cares?
19:24:03bozaloshtshtypescript is a superscript of JS, you can't really get betterr than that
19:24:03FromDiscord<iWonderAboutTuatara> I'm thinking it will be worse than haxe to is though
19:24:05disruptekwouldn't you rather write nim?
19:24:12FromDiscord<iWonderAboutTuatara> I would, yeah
19:24:21disruptekso does it really matter if haxe has a better transpilation result?
19:24:39FromDiscord<iWonderAboutTuatara> But if I'm going to be interfacing with flutter using some dart to js stuff, it might be needed
19:24:50disruptekwhat might be needed?
19:24:52bozaloshtshthere's also several angles of comparison. For me, the most important one is how easy is it to interoperate with stuff already written in JS that has no bindings
19:25:00FromDiscord<iWonderAboutTuatara> Ie there might be things that are very difficult in Nim which are less difficult in is
19:25:02FromDiscord<iWonderAboutTuatara> Yeah
19:25:10bozaloshtshnim wins that in my book over all other transpilers except JS superset ones
19:25:13FromDiscord<iWonderAboutTuatara> (edit) 'is' => 'js'
19:25:35disruptekYardanico: can we have the colorized edits back?
19:25:46FromDiscord<iWonderAboutTuatara> That's good
19:25:57Yardanicodisruptek: they're in the last ircord release, but that version apparently had some bugs so I reverted it
19:27:44bozaloshtshthere are several issues you'll run into if you expect to be able to use the whole stdlib in the js backend
19:28:08disruptekdoes someone have a cdebug macro that emits debug arguments in c comments?
19:28:15disruptekbecause if so, i want that shit pronto.
19:28:17FromDiscord<iWonderAboutTuatara> What's the server address for IRC?
19:28:37FromDiscord<iWonderAboutTuatara> Nim irc specifically
19:30:38bozaloshtshirc.freenode.net?
19:31:49FromDiscord<iWonderAboutTuatara> I guess
19:32:43*Tuatarian joined #nim
19:32:58TuatarianThat worked
19:33:15TuatarianSo now I have an IRC, incase discord does a bad thing in future
19:33:50TuatarianInterestingly, I have the same pfp as last time I logged on with this Nick
19:34:08Yardanico@iWonderAboutTuatara it's just freenode
19:34:14YardanicoTuatarian: you mean the one on discord when you're in IRC?
19:34:23TuatarianYes
19:34:24Yardanicoi use gravatar and the avatar is based on the hash of your nickname :)
19:34:34Yardanicoso yeah, it'll be the same for same nickname
19:34:36FromDiscord<iWonderAboutTuatara> I see, makes sense
19:34:38FromDiscord<iWonderAboutTuatara> That's good
19:34:50Yardanicoit's https://robohash.org/
19:35:00TuatarianMessages from irc in discord look cleaner than messages from discord in irc
19:35:04Yardanicogravatar supports it
19:35:08TuatarianProbably just a limitation of irc
19:35:10YardanicoTuatarian: well, because discord supports webhooks
19:35:17TuatarianOh is see
19:35:23TuatarianYeah nothing to you
19:35:26*PMunch quit (Quit: leaving)
19:35:30Yardanicothere's a way to make a seamless bridge like that for IRC too, but it's much harder and needs to be done on network-level
19:35:33TuatarianThe bot is wonderful
19:35:33Yardanicolike the freenode-matrix bridge
19:35:41TuatarianI see
19:35:54TuatarianThe bot does what it needs to incredibly well though, huge props
19:36:00TuatarianI remember I accidentally insulted it lmao
19:36:03Yardanicoif you see someone with [m] on freenode - they're actually from matrix
19:36:14YardanicoI mean in nickname
19:36:15FromDiscord<iWonderAboutTuatara> I prefer discord though
19:36:18FromDiscord<iWonderAboutTuatara> Oh I see
19:36:21Yardanicolike leorize[m] for example :P
19:36:23FromDiscord<iWonderAboutTuatara> Discord feels cleaner to me
19:36:25FromDiscord<iWonderAboutTuatara> Irs a lot faster
19:36:33Yardanicoirc*
19:36:42FromDiscord<iWonderAboutTuatara> Oh my eyes skipped over [m] lol
19:36:45FromDiscord<iWonderAboutTuatara> *it's
19:36:50FromDiscord<iWonderAboutTuatara> Irc feels sluggish
19:36:54Yardanicowat
19:36:54FromDiscord<iWonderAboutTuatara> Maybe I'm using a bad client
19:37:00Yardanicoirc is faster than most stuff out there
19:37:03FromDiscord<iWonderAboutTuatara> Maybe I should make a better IRC client for android
19:37:10FromDiscord<iWonderAboutTuatara> Probably just a bad irc client then
19:37:23TuatarianI don't know why it feels slower lol
19:37:28TuatarianIt just kind of does
19:37:29bozaloshtshon desktop, IRC clients are probably orders of magnitude faster than Discord
19:37:37TuatarianNo doubt
19:37:44TuatarianI'm on mobile though
19:37:54TuatarianDon't seem to be very many good IRC clients on mobile
19:37:56bozaloshtshheh, then using Discord suddenly starts to make sense
19:38:06TuatarianHalf tempted to take that as a project lol
19:38:07TuatarianLmao
19:38:13disruptekdiscord never makes sense.
19:38:17FromDiscord<Elegant Beef> Could use a matrix client like element, or a native one
19:38:18TuatarianDiscord should open source their client
19:38:23FromDiscord<Elegant Beef> Lol
19:38:29YardanicoI use quassel on desktop/client'
19:38:37Yardanicos/client/mobile
19:38:42Yardanicoand the server is on the vps on hetzner
19:38:42TuatarianI don't like the discord desktop app
19:38:46FromDiscord<Elegant Beef> They dont allow third party clients in their TOS it's not their plan to OSS the client
19:38:52TuatarianIrc is a lot better for desktop
19:38:59TuatarianI know they have no intention of doing it
19:39:02TuatarianBut they should allow it
19:39:08Tuatarian*should open source it
19:39:09Yardanicobtw we have #nim-offtopic too :P just saying'
19:39:11FromDiscord<Elegant Beef> Or just use matrix protocol
19:39:13Yardanicooccasional offtopic is fine there
19:39:16*supakeen quit (Quit: WeeChat 2.9)
19:39:20TuatarianOhhh
19:39:22Yardanicoit's bridged to #offtopic on discord
19:39:26TuatarianI see
19:39:32TuatarianHow do I add more channels to a server?
19:39:41*supakeen joined #nim
19:39:58Yardanicoon discord? you just create them
19:40:02Yardanicoor what do you mean
19:40:20TuatarianSays I need to register on freenode
19:40:31Yardanicowell, you need to register on freenode :)
19:40:42Yardanicoa lot of channels on freenode are only for registered users
19:40:46*Tuatarian quit (Quit: Quit)
19:40:49Yardanicohttps://freenode.net/kb/answer/registration
19:40:52FromDiscord<Elegant Beef> Oddly enough the channel you dont need to register for is #nim and not <#371759607934353448>
19:40:58*Tuatarian joined #nim
19:41:02Yardanicoso newbies have an easier time getting into IRC
19:41:07TuatarianOh I see
19:41:07Yardanicoto ask a question
19:41:23TuatarianI'll register later, I should be working atm lol
19:49:40FromDiscord<Clyybber> Cool people get a blue discord bridge bot avatar
19:49:56*clyybber joined #nim
19:50:02clyybberamirite Yardanico ;)
19:50:05*clyybber quit (Client Quit)
19:50:10Yardanicohaha
19:51:39*supakeen quit (Quit: WeeChat 2.9)
19:53:18*supakeen joined #nim
19:54:05*uvegbot joined #nim
19:55:37*supakeen quit (Client Quit)
19:56:33*supakeen joined #nim
19:56:50*bra-ket quit (Ping timeout: 265 seconds)
20:03:39*awe00 joined #nim
20:06:43disruptekglobal forvars ftl
20:07:23*awe004 quit (Ping timeout: 260 seconds)
20:09:53*narimiran quit (Ping timeout: 265 seconds)
20:16:12*lritter quit (Ping timeout: 256 seconds)
20:18:20*snowolf joined #nim
20:21:39*lritter joined #nim
20:22:44*konkrrrrrr joined #nim
20:25:19*kinkinkijkin quit (Ping timeout: 244 seconds)
20:30:08alehander92hm
20:30:18alehander92can we remove globals
20:30:20alehander92from nim
20:30:52alehander92just a thought experiment: i dont need to do that
20:32:12FromDiscord<Elegant Beef> No it encourages my bad design
20:33:27haxscramperdisruptek: There is no specific improvements that I would suggest (at least right now), but there are some things related to ergonomics (which is basically nitpicking)
20:33:27haxscramper
20:33:27haxscramper- `nimph fork` does did't change git origin to new fork
20:33:27haxscramper- For some reason `nimph fork skiplist` prints wikipedia page about skiplists. It created fork though
20:33:27Yardanicoalehander92: technically yes, but it'll require to have more arguments in a lot of places
20:33:30haxscramper- (not on nimph): maybe I missed something, but test for skiplists uses system version instead of `$config/..` one. I had to temporarily add `switch("excludePath")` + `switch("path", "$config/..")` to actually run tests.
20:33:33haxscramper
20:33:36haxscramperAside from that there is no comments. I really liked test for skiplists (and other ones) - mainly because there is no endless walls of text about `Verifying ...`. (I know there It can be changed by writing custom `task`, but still).
20:33:40haxscramper
20:33:43haxscramperMaybe nimph could also include some basic nimscript utilities for simplification of common tasks (for example I have couple of helpers for running tests in docker that copies all `develop` packages to container, executes necessary commands and so on).
20:34:29disruptekhmm, probably skiplists is missing a config.nims in tests/.
20:34:53disruptekthe basic plan that shashlick and i have is for package managers to setup projects with all the little scripts that you might want.
20:34:53haxscramperThere is `config.nims`, but without `$config/..`
20:35:07disruptekah, that seems like a bug.
20:35:31disruptekbasically, you should be able to rely upon your package manager to not just setup your environment, but provide you with build tools and whatnot.
20:35:32FromDiscord<Elegant Beef> Any ideas what i should call this macro?↵https://play.nim-lang.org/#ix=2wzl
20:36:07disruptekhaxscramper: pushed a fix for skiplists; thanks.
20:36:14ZevvI'd call it Peggy Sue
20:36:18FromDiscord<Elegant Beef> Lol
20:36:23Zevvoh dang. You can't have spaces in identifiers
20:36:42FromDiscord<iWonderAboutTuatara> peggySue
20:36:48FromDiscord<iWonderAboutTuatara> peggy_sue
20:36:54disruptekhaxscramper: the tests you're seeing are from testes. you should give it a try; i really like my testes.
20:36:57disruptek!repo testes
20:36:59disbothttps://github.com/disruptek/testes -- 9testes: 11a small unittest framework with decent support 🔴🟡🟢 15 12⭐ 0🍴 7& 29 more...
20:37:03FromDiscord<Elegant Beef> Shit you're right zevv
20:37:10FromDiscord<Elegant Beef> That's clearly a PeggySue
20:37:16FromDiscord<iWonderAboutTuatara> That's such a beautiful name disruptek
20:37:22haxscramperdisruptek: the only issue with importing things in nimscript is that I could not find a way to `import` things inside nimble itself and had to rely in hack with `when compiles(import ...)`
20:37:25FromDiscord<iWonderAboutTuatara> First jason and now testes
20:37:29FromDiscord<Elegant Beef> If you think the name is nice, you should see his testes
20:37:32FromDiscord<iWonderAboutTuatara> What a legend
20:37:34FromDiscord<iWonderAboutTuatara> Lmaoo
20:37:58haxscramperAnd all of these docker tasks are available only if you have `hmisc` installed before actually running nimble.
20:38:11disruptekhaxscramper: yeah, nimph will just build nim programs for you. it's unlikely that we'll bother with nimscript.
20:38:35disruptekit might integrate my testes into it, too. i haven't figured that out yet.
20:39:02Zevvchocolate salty balls
20:39:21disrupteki've moved away from building docs locally, though. i'd rather have the ci do that.
20:40:20disruptektestes is gonna get timing and memory usage in the next day or two; that's what the numbered comment lines are for -- they will hold statistics.
20:40:57disruptekhow can i repro the fork bug, though?
20:41:20haxscramperOh, and the thing I talked about with `--path` - I used gram in my own code and wanted to test if my fix to fork worked before pushing. But I solved this using `switch("excludePath", <global install>)` and `switch("path", <fixed fork>)` in `config.nims`
20:41:58disruptekoh, then that behavior is correct.
20:42:13disrupteknimph is perfectly fine with you having many paths in your environment.
20:45:35disrupteksee --clearNimblePath
20:50:08FromDiscord<tomck> Hello! I'm wrapping a C library, what's the standard way to do this to integrate with nimble? Can i make nimble fetch the source & build it automatically when nimble includes my projects?
20:50:31disruptekrecommend nimterop.
20:50:36disruptek!repo nimterop
20:50:38disbothttps://github.com/nimterop/nimterop -- 9nimterop: 11Nimterop is a Nim package that aims to make C/C++ interop seamless 15 210⭐ 19🍴 7& 11 more...
20:51:30FromDiscord<tomck> ohhhhhh so the nim file builds the C source at compile time???? that's a super cool way to do it
20:54:10Yardanicowell there's a reason people say that nim has one of the best C FFIs out there :P
20:55:41disruptekyes.
20:55:42disruptekor you can have it use local libs, conan, or julia binaries.
20:55:54*pietroppeter quit (Quit: Connection closed for inactivity)
20:56:36FromDiscord<tomck> so do i create a nimble library, use nimterop, get that to generate bindings, then i can just use that nimble project as a dependency in future?
20:56:55Yardanicothat's one way to do it yes
20:56:57Yardaniconot the only one
20:56:58disruptekyes.
20:57:07disruptekTHAT'S THE ONLY WAY.
20:57:11YardanicoNO
20:57:12YardanicoITS NOT
20:57:16YardanicoTAKE YOUR PILLS DISRUPTEK
20:57:23disruptekdo you think i cannot get to you?
20:57:34Yardanicoairlines are still half-closed
20:57:46FromDiscord<tomck> wwhat's the other way?
20:57:48disrupteki have a canadian passport now.
20:57:49disruptekI CAN BE THERE IN 7HRS.
20:58:01Yardanico@tomck 1) making a nimble package is optional
20:58:03disruptekthere's no other way.
20:58:04FromDiscord<Elegant Beef> Who the fuck gave you a Canadian passport?
20:58:09Yardanico2) you can use c2nim but it'll require more manual editing
20:58:14Yardanicodisruptek: we have to tell the whole truth
20:58:27disruptekgave?
20:58:44FromDiscord<Elegant Beef> Ah typical american thinking everything belongs to them
20:58:50Yardanicolol
20:59:06disrupteklast time i did that, i spent 4 months in prison.
20:59:12FromDiscord<tomck> cool, ty
20:59:12haxscramperSometime I feel being in different hemisphere from diruptek is a good decision
20:59:30Yardanicotrue that
20:59:33FromDiscord<Elegant Beef> Im one border away from him
20:59:35FromDiscord<Elegant Beef> Send help
20:59:49FromDiscord<Elegant Beef> It's not even the one with a wall
20:59:56disruptekhemispheres are made to be broken.
21:00:09Yardanicodisruptek: i'll call my friends from KGB
21:00:11haxscramperThankfully even *I* don't know where I live
21:00:57Yardanicohaxscramper: in the CIS at least?
21:00:58Yardanicoi guess
21:02:39haxscramperLast time I remember yes. If I'm not mistaken I'm in the same timezone as you
21:03:09shashlickhttps://github.com/nim-lang/nimble/issues/612 is next
21:03:09disbotCommand to add dependencies into .nimble file
21:03:15Yardanicohaxscramper: that makes sense :P
21:04:24disruptekeh i'm negative on .nimble files.
21:04:30disrupteki think we're better off without them.
21:04:54disrupteknimph will generate them for you, for compat reasons, but they shouldn't exist, really.
21:05:11shashlickWhere do you specify pkg info then
21:05:20disruptekwhich package info?
21:05:22FromDiscord<Elegant Beef> How does nimph handle dependancies?
21:05:51disruptekcorrectly.
21:05:56Yardanicolol
21:06:00haxscramperDepndencies, short description etc. And I'd prefer to have all little scripts put togeter in nimble tasks.
21:06:34FromDiscord<Elegant Beef> I dont know how disruptek is capable of making me angry and laugh in a single word
21:06:47Yardanicoit's a talent
21:07:02disruptekwhy should software that works properly be so infuriating?
21:07:11alehander92disruptek
21:07:20alehander92do you like error history
21:07:28disruptekmangling now only fails hcr tests plus timmy's horrible jsonutils.
21:07:33YardanicoD:
21:07:37alehander92e.g. "this variable is nil here because it was assigned this value here"
21:07:39FromDiscord<Elegant Beef> Your response is the infurating thing, a simple explanation of how it works would've sufficed ;P
21:07:45alehander92i found out i did this in the past
21:07:49disruptekalehander92: yeah, and actually, i want to put history into nimph.
21:07:52alehander92and i want to preserve it
21:08:04alehander92but wasnt sure if it is verbose
21:08:08disruptekelegant: there's no such thing as "simple" when it comes to dependency management.
21:08:20shashlickDep info
21:08:48disrupteknimph has much more comprehensive knowledge of packages and requirements than nimble. it's a lot of complexity.
21:09:07disruptekalehander92: yeah, let elm be the guide.
21:09:30alehander92i agree it can be verbose
21:09:31disruptekalso, you can use ~ and ^ and * operators in nimph package requirements.
21:09:45alehander92it can probably use some kind of verbosity flag to fix that
21:09:50*krux02 quit (Remote host closed the connection)
21:09:55alehander92disruptek hm
21:10:03alehander92is this something about showing um
21:10:07alehander92no idea what do ~ ^ * do
21:10:10FromDiscord<Elegant Beef> also what's the nimph native method of storing packages/versions?
21:10:27alehander92i just show a list of things
21:10:43shashlickDo you plan on a .nimph file now
21:10:56alehander92```
21:10:59Yardanicoi bet it's gonna be json
21:11:03Yardanicojust a guess XD
21:11:10alehander92https://www.irccloud.com/pastebin/3Do3MFh3/nil.nim
21:11:15disruptekno, nimph will use a native frosty cache.
21:11:20disruptekbut not until 2.0.
21:11:27disruptek!repo nimph
21:11:27shashlickD you need to spend some solid time blogging about and documenting workflows of how to use nimph
21:11:28disbothttps://github.com/disruptek/nimph -- 9nimph: 11Nim package hierarchy manager from the future 🧚 15 77⭐ 5🍴 7& 1 more...
21:11:31Yardanicoalehander92: that's exactly what null safety is
21:11:35disruptekrtfm ... all will be revealed.
21:11:49shashlickMeh I've read it and still don't know how to use it
21:11:52FromDiscord<Elegant Beef> I mean the last time i seen you tell some RTFM it didnt solve their issue 😄
21:11:52disrupteki used to demo it on stream a lot.
21:12:02Yardanicoand it was slow or didn't build :PP
21:12:08shashlickLike that forum post
21:12:10alehander92yardanico no no
21:12:14Yardanicoalehander92: yes?
21:12:17disruptekwell, 2.0 is amazingly fast.
21:12:19alehander92the point is if i should include
21:12:23*maier joined #nim
21:12:25disrupteki honestly cannot believe how quick it is.
21:12:25Yardanicoif you can make that work, yes
21:12:27alehander92the history of how it becomes nil
21:12:28shashlickDemanding that Nim needs easier docs
21:12:30FromDiscord<tomck> so, for nimterop, there are two steps - build & wrap, that makes sense↵↵what file does the first 'build' step go in? does it have to be a special file, or just the normal nimble package file, then that'll all get called at compile time when nimble includes the package?
21:12:30alehander92in the mssage
21:12:39*ForumUpdaterBot quit (Remote host closed the connection)
21:12:39alehander92yardanico it works from ~2018
21:12:46*ForumUpdaterBot joined #nim
21:12:54Yardanicowell not nil in nim is kinda half broken isn't it
21:12:58alehander92i have to refine it and finish it tho (and fix some stuff)
21:13:04alehander92i mean, the PR thing
21:13:09disruptektomck: this is a really comprehensive, extensive demo of nimterop:
21:13:12disruptek!repo gittyup
21:13:13disbothttps://github.com/disruptek/gittyup -- 9gittyup: 11higher-level libgit2 bindings that build upon nimgit2 15 4⭐ 1🍴
21:13:18shashlick@tomck - what are you wrapping
21:13:24alehander92just trying to say it's not really new
21:13:35alehander92yeah this is different than the current thing
21:13:36shashlicku can do both in the same wrapper - see nimarchive or nimgit2
21:13:55shashlickgittyup consumes nimgit2 so that's a real nim wrapper of the raw C stuff in nimgit2
21:13:55FromDiscord<tomck> flecs , just a c library https://github.com/SanderMertens/flecs
21:14:20FromDiscord<tomck> ok i'll take a look, do they use nimterop
21:14:30shashlickyes
21:15:21shashlickping if you need any help
21:15:56disruptekalehander92: i would not spend much time on that feature, honestly.
21:16:07disruptekit's the sort of thing that will be allowed to break.
21:16:39disruptekelegant: that dude's code was bad. not my fault rtfm didn't solve their issue.
21:16:51disrupteki mean, i'm not a miracle worker.
21:16:53shashlicktomck: `toast -pnkr flecs.h -I. -DFLECS_NO_CPP -G__=_ -E__,_ -F_` was good enough to wrap it
21:17:05*maier quit (Ping timeout: 240 seconds)
21:17:08FromDiscord<tomck> lol you're in magic territory rn
21:17:10disruptekwait, am i a miracle worker? 🤔
21:17:13shashlickif you want to do it on the command line
21:17:15FromDiscord<Elegant Beef> Person was asking how to convert types and you were saying rtfm on the div operator
21:17:15alehander92disruptek sorry, the error msg, or ?
21:17:22disruptekerror messages, yes.
21:17:28FromDiscord<Elegant Beef> the div operator doesnt explain how to convert types 😄
21:17:30alehander92ah they just work like that already
21:17:32disruptekdon't sweat it.
21:17:57alehander92so yeah i wouldn't put more into it: but i just found them like that
21:18:00FromDiscord<tomck> shashlick: what does this do to the flecs.c? i need to build that as a library & link separately too (right?)
21:18:10disruptekmy answer was perfectly correct, just, y'know, perhaps not what they wanted.
21:18:15shashlickyes, give me 5, will just give you the steps
21:18:31FromDiscord<Elegant Beef> Lol
21:18:41alehander92what is frosty?
21:18:43FromDiscord<tomck> hang on i think i can figure it out from the nimgit2 now, thanks though
21:18:59FromDiscord<Elegant Beef> Frosty is disrupteks object serializer
21:19:37Yardanico!repo frosty
21:19:37disbothttps://github.com/disruptek/frosty -- 9frosty: 11Serialize native Nim objects via Streams and Sockets ⛄ 15 11⭐ 0🍴
21:19:39Yardanicothat
21:19:47alehander92<3
21:19:48alehander92thanks
21:19:53Yardanicozevv uses it in his nitter.net already
21:20:01Yardanicotogether with snappy for compression and redis for the actual storage (cache)
21:20:19Yardanicosorry not zevv
21:20:24Yardanicozedeus :)
21:20:28FromDiscord<Elegant Beef> I should've used that or treeforms serializer for my netty rpc 😄
21:20:30YardanicoI mix them up sometimes
21:20:43disrupteki've never even tested it with sockets, but apparently it works.
21:20:55disruptekkinda crazy.
21:21:04Yardanicowell it's just bytes :P
21:21:07alehander92i was so confused about nitter :D
21:21:16*arecacea1 quit (Remote host closed the connection)
21:21:19Yardanicodid you expect that frosty would emit some strange byte sequencer which will break TCP/UDP? :P
21:21:25Yardanicos/cer/ce
21:21:30FromDiscord<Elegant Beef> Yea treeform uses strings for netty, so as long as you get some bytes to send we're good 😄
21:21:30disrupteki didn't expect to write socket code correctly.
21:21:50*arecacea1 joined #nim
21:22:41bozaloshtshwhat is a "memory graph of infinite size" referenced in the frosty README?
21:22:55disrupteklots of linked references or pointers.
21:23:19FromDiscord<Elegant Beef> Probably a type that in attempting to serialize would fill the stack
21:23:32disrupteki was planning on using cps to iterate over the graph, which wouldn't have any stack growth issues.
21:23:36FromDiscord<Elegant Beef> Recursively adding data to your memory sounds fine
21:23:46bozaloshtshso a DAG with a lot of links betweeng nodes wouldn't work, gotcha
21:23:54bozaloshtshextra links* that is
21:24:10disruptekit works for thousands of objects, but eventually yes, you can exhaust the stack.
21:24:21disruptekstack limits are tunable in nim, though.
21:25:06*idf04 joined #nim
21:25:12disruptekbbiab, need to pick up the hooker from high school.
21:25:53FromDiscord<Elegant Beef> Disruptek saying questionable things, name a more iconic couple
21:26:44bozaloshtshhey don't judge
21:30:38*natrys quit (Quit: natrys)
21:30:49alehander92i used
21:30:57alehander92browser without javascript: wow what a cool xp
21:31:05alehander92google works fine tho!
21:32:11disruptekseriously. you have to applaud his focus; i never finished high school, myself.
21:32:28disruptekhe only has three more years of class and he's a graduate. that's a real win in my book.
21:33:21shashlick@tomck: https://gist.github.com/genotrance/89e718eb6357578448343588bed72520 if you need it
21:34:21alehander92disruptek i am trying to use without css now
21:34:21shashlickyou will face https://github.com/nimterop/nimterop/issues/206
21:34:21disbottype section before constant section
21:34:26alehander92it's much more fun
21:34:54*awe00 quit (Ping timeout: 256 seconds)
21:34:57alehander92you sound so american when you use those "in my book" phrases
21:36:44FromDiscord<Elegant Beef> With a typedef that takes a generic proc, is there a way to get the proc's parameters?
21:38:26*haxscramper quit (Remote host closed the connection)
21:43:31FromDiscord<tomck> shashlick: Ahh i see, so i need a flecsGIt define? can i just make it always fetch with git?
21:43:56*konkrrrrrr quit (Read error: Connection reset by peer)
21:43:59FromDiscord<tomck> or how do i make it add this define in nimble by default, when my package is added as a dependency by another project?
21:44:40*konkrrrrrr joined #nim
21:46:51ForumUpdaterBotNew thread by NerdRat: Exceptions in Threads, see https://forum.nim-lang.org/t/6783
21:47:13shashlickYou can use the setDefine proc
21:48:07FromDiscord<Elegant Beef> Here's a code version of my question https://play.nim-lang.org/#ix=2wJL
21:51:13*solitudesf quit (Ping timeout: 260 seconds)
22:02:21FromDiscord<tomck> shashlick: Okay this all seems to be working, but i'm still struggling on a workaround for https://github.com/nimterop/nimterop/issues/206↵I don't understand the cImport workaround - should i just use toast to generate the wrapper?
22:02:22*bouzu_ quit (Quit: Leaving)
22:02:22disbottype section before constant section
22:02:25FromDiscord<tomck> is toast part of nimterop?
22:04:03*idf04 quit (Ping timeout: 260 seconds)
22:07:55bozaloshtshwhat is the config incantation to get nim to stop adding -lm parameter to the linker command?
22:08:23bozaloshtsh(trying to compile to wasm with wasmrt)
22:08:32*abm quit (Quit: Leaving)
22:08:55bozaloshtshI see that it compiles the math library to C so I don't understand why it's still trying to use -lm
22:08:57*abm joined #nim
22:19:30*SenasOzys quit (Remote host closed the connection)
22:20:11FromDiscord<speckledlemon> How does one confirm their email on the forum? I registered last year, never got an email, and don't see anything helpful under the forum profile
22:21:13Araqplease re-register then
22:21:17shashlicktoast is the cli tool behind the scenes
22:21:27shashlicki have already handled that issue in the wrapper i created
22:21:32shashlicki skipped the symbols that cause a problem
22:21:51shashlickif you need those, you can define them yourself after cImport
22:21:57shashlick@tomck ^^
22:22:11FromDiscord<tomck> ahhhhhhhhhhhh i see, ok
22:25:35FromDiscord<dom96> @speckledlemon tell us your nickname and we can activate for you
22:26:10FromDiscord<speckledlemon> I deleted my account, tried creating one with the same username and email address, got "unknown error" but the registration email (??), went to activate and got "invalid ident hash"
22:26:41FromDiscord<dom96> Yeah, when you delete your account the nick remains taken. It's a bug.
22:28:09FromDiscord<speckledlemon> > Too many messages have been sent to this email address recently.
22:29:42FromDiscord<dom96> ouch 🙂
22:30:38FromDiscord<speckledlemon> I'll deal with this some other day
22:31:57FromDiscord<19> Q: how can i get the behavior of c++ static key word in nim?
22:33:08FromDiscord<dom96> @speckledlemon what's your deleted account on the forum?
22:33:16FromDiscord<Rika> 19, in what context is the static keyword in
22:33:28FromDiscord<speckledlemon> `berquist`
22:33:58FromDiscord<19> global variable
22:34:05FromDiscord<Rika> {.global.}
22:34:26FromDiscord<19> but it can have different meanings in c++. are there keywords to describe those different meanings?
22:34:59FromDiscord<dom96> @speckledlemon don't normally do this, but I went ahead and reactivated it for you manually
22:35:23FromDiscord<19> thanks Rika
22:36:15FromDiscord<speckledlemon> thank you
22:40:55ForumUpdaterBotNew thread by Berquist: Workaround for code reordering in nimterop?, see https://forum.nim-lang.org/t/6784
22:42:57FromDiscord<dom96> I just cleared all users that removed their accounts, so if anyone else experienced the above they should be able to re-register
22:44:13*konkrrrrrr quit (Read error: Connection reset by peer)
22:44:21Araq<19> yeah, everything that 'static' does has some Nim equivalent
22:44:41*konkrrrrrr joined #nim
22:46:10FromDiscord<19> sent a long message, see http://ix.io/2wJP
22:46:53Araqproc someFunction() # private
22:47:04Araqproc someFunction*() # public (not "static")
22:47:34FromDiscord<Elegant Beef> Oh static doesnt mean the same thing in C++ as it does in C# 😄
22:47:48Araqit kinda does inside a class
22:48:05FromDiscord<Elegant Beef> I was going to say "A normal proc is static" but yea glad i waited 😄
22:48:18Araqand C# only offers classes, not freestanding functions
22:49:27FromDiscord<19> i dislike languages that force oop in your face
22:49:45FromDiscord<Elegant Beef> Well in C# 9 that changed, but yea no one uses C# 9 atm 😄
22:50:02FromDiscord<Elegant Beef> Oh it's only for one file, so it's the same as kotlin
22:50:12FromDiscord<19> okay, that's public and private. if i write a module level function is it static by default ? @Elegant Beef
22:50:28FromDiscord<Elegant Beef> procs are statically dispatched
22:50:32FromDiscord<Rika> what does a static function mean
22:50:36FromDiscord<Elegant Beef> So yes you just give it data
22:50:37FromDiscord<Rika> in cpp
22:51:18FromDiscord<Elegant Beef> In C# i know it means that they're statically dispatched and use the `ClassName.FunctionName`
22:51:55FromDiscord<19> yeah but in c++ you can write a static function outside of a class
22:52:14FromDiscord<Elegant Beef> Yea i dont do C++, i just assume it shares some things with C#
22:52:39FromDiscord<19> C# is an entirely different beast
22:52:40FromDiscord<Rika> tfw came from python
22:52:42FromDiscord<19> A static function in C is a function that has a scope that is limited to its object file.
22:53:10shashlick@speckledlemon - you still here
22:53:14FromDiscord<19> so basically, what Araq said.
22:53:36FromDiscord<Rika> so basically just private and public no?
22:53:37FromDiscord<speckledlemon> I’m not at my computer, but if you ping me, I can read it later
22:53:43FromDiscord<Elegant Beef> So it's just a freestanding private function
22:54:01FromDiscord<19> well, a private proc in nim is only available inside the module where it lives in
22:54:06FromDiscord<19> so yes
22:55:19FromDiscord<Rika> ngl i kinda wish nim also had protected but that's not really possible right now nor do i think it would fit into nim's ideas and philosophies or something
22:55:47FromDiscord<Elegant Beef> what's protected supposed to do?
22:55:48FromDiscord<19> yeah that sounds oop
22:55:59FromDiscord<Elegant Beef> *I know the C# keyword, so uncertain if it's the same*
22:56:18FromDiscord<Rika> afaik its package-level access
22:56:19FromDiscord<19> i think what Rika is talking about is the same as the C#
22:56:50FromDiscord<Rika> i dont know a lick of C# so if its the same its prolly coincidental
22:57:05FromDiscord<19> protected is an oop idea
22:57:13FromDiscord<Rika> i dont see how'
22:57:17FromDiscord<Elegant Beef> Ah protected in C# is inheritance based public, so only inheriting bodies can access the field
22:57:26FromDiscord<Rika> then i dont think its the same idea
22:57:48FromDiscord<19> oh what were you referring to Rika
22:57:51FromDiscord<Elegant Beef> Seems like you're talking more about a namespace global var
22:57:53FromDiscord<Rika> > afaik its package-level access
22:58:03FromDiscord<Elegant Beef> or namespace global access
22:58:13FromDiscord<Rika> probably the latter you said
22:59:03FromDiscord<19> you mean like↵<packagename>.function()↵?
22:59:11FromDiscord<Rika> uh no
22:59:30FromDiscord<Rika> proc that you can only access within a "package"
22:59:47FromDiscord<19> oh i see
22:59:49FromDiscord<Elegant Beef> Basically if you had a namespace, you can access the proc only if you define the module inside that namespace
22:59:57FromDiscord<Elegant Beef> Nim doesnt have namespaces so it's not really possible
23:00:00FromDiscord<Rika> would avoid the import export except mess
23:00:24FromDiscord<Elegant Beef> You can use import/export files but yea no namespaces for that to work
23:01:02FromDiscord<19> you can force it using from x import nil
23:01:14FromDiscord<Rika> no
23:01:18FromDiscord<Rika> im not talking about that
23:01:33FromDiscord<19> alright
23:02:33FromDiscord<Elegant Beef> basically they're talking about a way to annotate a file is apart of a package then being able to declare a proc `protected` which means that only modules apart of that package can call it, if you import a module it cannot be called
23:03:27FromDiscord<Rika> but as ive said thats probably impractical for some unknown-to-me usecases\
23:05:25*abm quit (Read error: Connection reset by peer)
23:06:24bozaloshtsh--gc:arc is so cool, just slapped it on my compile command and got a 25% performance boost
23:07:08bozaloshtshnow it's time to re-write this code to not be so memory bound :|
23:07:11FromDiscord<Rika> still kinda broken for some code but thats expected
23:07:22FromDiscord<Rika> whatcha workin on?
23:07:31bozaloshtshhttps://github.com/sid-code/multichess
23:08:10FromDiscord<Rika> *sweats* why the devel requirement?
23:08:56bozaloshtshheh, it won't compile with the stable release, didn't really investigate why but something to do with calling newStringStream in a compile-time context I think
23:09:42FromDiscord<Rika> i see
23:11:01*abm joined #nim
23:11:06FromDiscord<Rebel> is it just me or did github change nim's color on github
23:11:17FromDiscord<Rebel> I could've sworn it was not this color lol https://media.discordapp.net/attachments/371759389889003532/752667331955654686/unknown.png
23:11:26bozaloshtshyeah I noticed that too
23:11:39FromDiscord<Rebel> ok so I'm not going crazy good to know
23:11:47*lritter quit (Ping timeout: 240 seconds)
23:11:59bozaloshtshI wonder why
23:12:14bozaloshtshI thought that green (or teal) color was nim's official color
23:12:43FromDiscord<Elegant Beef> It changed today thanks to yard an others submitting a change to the colour of nim
23:12:44FromDiscord<Yardanico> It never was
23:12:53*apahl quit (Ping timeout: 260 seconds)
23:12:56FromDiscord<Yardanico> The original colour was added in 2012 by a Nim employee
23:13:02FromDiscord<Yardanico> Seemingly at random
23:13:13*maier joined #nim
23:13:16FromDiscord<Elegant Beef> Yellow is nim's official colour with purple as a secondary(Atleast if website is any indication)
23:13:23FromDiscord<Yardanico> See https://forum.nim-lang.org/t/6350 for more info
23:14:30FromDiscord<Yardanico> That final change was merged in the end of June
23:14:38FromDiscord<Yardanico> And they only updated it now
23:14:40bozaloshtshinteresting, I could have sworn I saw green yesterday
23:14:50bozaloshtshah
23:15:02FromDiscord<Yardanico> Yes it was changed ~today
23:15:06FromDiscord<Yardanico> Depending on your timezone
23:15:17FromDiscord<Rebel> ohhh that's pretty cool
23:15:32FromDiscord<Yardanico> By "changed" I mean applied on GitHub
23:16:06FromDiscord<19> nice!
23:18:23*maier quit (Ping timeout: 258 seconds)
23:26:27*theelous3 quit (Read error: Connection reset by peer)
23:30:09FromDiscord<tomck> can i leak a string?
23:30:33FromDiscord<tomck> I'm passing a cstring to something, but i have a string - that string probably won't live long enough, can i just force it to leak?
23:30:39FromDiscord<tomck> or copy it to something that does leak?
23:34:26FromDiscord<Rika> https://nim-lang.org/docs/system.html#GC_ref%2Cref.T @tomck
23:34:42FromDiscord<tomck> lol literally just found it, thanks!
23:37:14*Cthalupa quit (Quit: ZNC 1.6.6+deb1ubuntu0.2 - http://znc.in)
23:48:26*Cthalupa joined #nim
23:57:33*apahl joined #nim