<< 20-03-2018 >>

00:00:58federico3zacharycarter: how about you start writing a client library? If there's interest people will join the effort :)
00:01:21FromGitter<zacharycarter> federico3: that's the plan :) I'm just hoping there's more than passing interest
00:02:17FromGitter<zacharycarter> Varriount shared some super useful code earlier so it should serve as a good starting point
00:05:17*rbrt quit (Quit: Oíche mhaith)
00:06:53FromGitter<zacharycarter> also @Araq: sorry if I implied that the language was lacking because of support for cloud providers - it's not. I <3 Nim and think it's the best programming language out there
00:09:27Araqoh don't worry. I'm sorry too for going on yet another pointless rant. When I agree with you and working on the same thing, more or less
00:09:50dom96Time for sleep. Good night guys :)
00:15:27FromGitter<zacharycarter> I was bitching about AWS and the cloud and all these stupid new technologies that just make things more complex, all... day...
00:15:52FromGitter<zacharycarter> See
00:21:36FromGitter<AjBreidenbach> I like bitching too
00:21:39FromGitter<AjBreidenbach> you're not alone
00:23:48FromGitter<zacharycarter> 😁
00:25:30FromGitter<honewatson> I've started building a full stack PWA framework in Nim but its slow going with young kids
00:26:42FromGitter<honewatson> First cloud target will be Google App Engine Custom Flexible with Gitlab CI/CD
00:26:46FromGitter<AjBreidenbach> @zacharycarter do you use node at work?
00:54:27FromGitter<zacharycarter> @AjBreidenbach yup!
00:55:02FromGitter<zacharycarter> @honewatson we're considering switching to Gitlab for our team at work
01:06:45FromGitter<honewatson> Gitlab is extremely compelling with all the features it includes.
01:08:08FromGitter<AjBreidenbach> @zacharycarter you might be able to start with nim addons to v8
01:08:26FromGitter<AjBreidenbach> if you want to put something into production
01:08:38FromGitter<AjBreidenbach> like some kind of performance issue
01:09:26FromGitter<zacharycarter> @honewatson - I agree
01:10:21FromGitter<zacharycarter> @AjBreidenbach - yeah I think there are small opportunities to leverage Nim here and there, but it tends to be a larger challenge than that - you need something that is going to get lots of folks in a single org learning Nim, otherwise managers will argue about it not having enough knowledge-share
01:11:58FromGitter<zacharycarter> I don't want to feel like I'm shoehorning in Nim just to use it... I want to feel like it has a place as a legitimate option
01:12:14FromGitter<AjBreidenbach> I think it is pretty legitimate tbh
01:12:59FromGitter<zacharycarter> I do too - but it's hard to get everyone thinking on the same wavelength as you
01:13:02FromGitter<zacharycarter> or me
01:13:38*arnetheduck joined #nim
01:13:40FromGitter<zacharycarter> and it's also super difficult to convince people that the foundation you're standing on is more solid than theirs
01:14:08FromGitter<zacharycarter> which is typically what you have to do - to get someone to adopt another programming language vs what they're comfortable in
01:15:58FromGitter<AjBreidenbach> hey, how do you look at how macros expand
01:16:30FromGitter<AjBreidenbach> ```expandMacros: ⏎ dump:``` [https://gitter.im/nim-lang/Nim?at=5ab060eea60157d62f07f04e]
01:16:35FromGitter<AjBreidenbach> doesn't seem to work
01:17:40FromGitter<zacharycarter> dumpTree I think?
01:21:15FromGitter<dandevelo> I am wondering if he really tried Nim: https://www.quora.com/Can-the-NIM-programming-language-be-a-successor-to-C
01:22:18FromGitter<AjBreidenbach> Maybe not, but C++ is probably better for some things
01:22:40FromGitter<AjBreidenbach> I really don't think Nim and c++ were created for the same reason
01:23:01*xkapastel quit (Quit: Connection closed for inactivity)
01:23:21FromGitter<zacharycarter> @AjBreidenbach - https://play.nim-lang.org/?gist=12538266febe7f9c4d0eaef0e250569d
01:23:56FromGitter<zacharycarter> I don't think dump is a legitimate macro
01:23:58FromGitter<zacharycarter> unless you wrote it
01:33:06FromGitter<AjBreidenbach> yeah I guess not https://nim-lang.org/docs/macros.html#expandMacros.m,typed
01:33:14FromGitter<AjBreidenbach> it's still in the docs though ^
01:34:59FromGitter<AjBreidenbach> do you know if there are compile time procs like `getMainModule` or `listModules`
01:35:26*xkapastel joined #nim
01:40:57FromGitter<AjBreidenbach> can I check the nimcache directory during compile time?
01:41:32FromGitter<zacharycarter> what do you mean?
01:42:08FromGitter<zacharycarter> the nimcache directory is where the Nim files get converted to the backend output filetype and then if necessary compiled by the backend compiler
01:42:26FromGitter<zacharycarter> so it's a very transient directory
01:42:49FromGitter<AjBreidenbach> yeah, I want to know if the switch is being invoked
01:43:06FromGitter<AjBreidenbach> like you can check with `defined(x)`
01:43:15FromGitter<zacharycarter> what switch?
01:43:22FromGitter<AjBreidenbach> `--nimcache`
01:43:28FromGitter<zacharycarter> oh
01:44:03FromGitter<AjBreidenbach> I was hoping that I could get it at compile time so I wouldn't have to fuck around with scripts
01:44:28*hxfklkk joined #nim
01:45:00FromGitter<zacharycarter> doesn't look like it - https://github.com/nim-lang/Nim/search?utf8=%E2%9C%93&q=nimcache&type=
01:45:35FromGitter<zacharycarter> sorry
01:45:37FromGitter<zacharycarter> meant to link - https://github.com/nim-lang/Nim/search?l=Nim&q=nimcache&type=&utf8=%E2%9C%93
01:46:34FromGitter<zacharycarter> maybe you could check - nimcacheDir in - https://github.com/nim-lang/Nim/blob/master/compiler/options.nim
01:46:35FromGitter<zacharycarter> ?
01:48:27FromGitter<AjBreidenbach> you're really good at googling shit sir
01:48:46FromGitter<zacharycarter> :D
01:49:35FromGitter<zacharycarter> spend a year or so around the Nim codebase and you learn to find stuff pretty quick :)
01:50:03FromGitter<AjBreidenbach> no kidding, lol
01:50:15FromGitter<zetashift> quote of the week
01:50:17FromGitter<zacharycarter> I'm totally at a wall now because I've discovered compiler magic :P but yeah - Nim's not TOO complicated
01:50:21*athenot joined #nim
01:50:35FromGitter<zacharycarter> until you get to compiler magic :)
01:50:42*athenot_ quit (Ping timeout: 265 seconds)
01:50:53FromGitter<AjBreidenbach> I discovered compiler magic when I learned I need to call NimMain manually
01:51:13FromGitter<zacharycarter> oh yeah - I've relied on it plenty of times before
01:51:18FromGitter<zacharycarter> it's when you try to understand it haha
01:51:22FromGitter<AjBreidenbach> It took me hours to figure that out
01:51:24FromGitter<zacharycarter> that's when it becomes fun
01:51:29FromGitter<zacharycarter> yeah
01:51:33FromGitter<AjBreidenbach> `newSeqint ()` kept segfaulting
01:51:36FromGitter<AjBreidenbach> I was like wtf
01:52:35FromGitter<zacharycarter> :)
01:53:17FromGitter<zacharycarter> welp - I'm out, have a good night all! will post a link to the aws stuff tomorrow
01:55:58*hxfklkk quit (Remote host closed the connection)
01:56:37FromGitter<raydf> hey guys
01:56:40FromGitter<raydf> hru?
01:56:56FromGitter<raydf> i'm trying to cross compile nim in a raspberry pi 3
01:57:24FromGitter<raydf> the project is a hello world but it gives ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ab06a8427c509a77480b4fa]
01:57:51FromGitter<raydf> anyone with experience compiling a nim program in an arm platform?
01:59:22FromGitter<AjBreidenbach> which arguments are you compiling with
02:08:06*leorize quit (Remote host closed the connection)
02:14:05FromGitter<raydf> Hi @AjBreidenbach i used: ⏎ ⏎ ```nim c --cpu:arm --compileOnly --genScript hello.nim``` [https://gitter.im/nim-lang/Nim?at=5ab06e6ca60157d62f08277b]
02:14:18*leorize joined #nim
02:14:42FromGitter<raydf> it created a nimcache with almost everything, except nimbase.h
02:14:57FromGitter<raydf> i took the nimbase.h from the choosenim folder in my macbook
02:15:40FromGitter<raydf> do i need a nimbase.h for the arm raspberry?
02:16:58FromGitter<AjBreidenbach> what c flags are you using?
02:17:37FromGitter<raydf> none, i'm using this command in raspberry: ⏎ gcc hello.c -o hello
02:18:20FromGitter<raydf> and then i receive the error.
02:19:29FromGitter<AjBreidenbach> you need to link it with stdlib_system.c
02:23:35FromGitter<raydf> I'm new to gcc compiler, i tried this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ab070a75f188ccc15d566f5]
02:24:04FromGitter<AjBreidenbach> the nim compiler generates stdlib_system.c
02:24:29FromGitter<raydf> yeah, sorry
02:24:32FromGitter<raydf> that's true
02:24:57FromGitter<AjBreidenbach> yeah it's kind of tricky the first few times
02:25:19FromGitter<raydf> which flag can include this c file?
02:25:43FromGitter<raydf> do i need to use #include <stdlib_system.c>?
02:25:50FromGitter<raydf> i thought that was for headers only?
02:26:05FromGitter<raydf> or there's a flag for linking the c file?
02:26:10FromGitter<AjBreidenbach> it's for headers only
02:26:20FromGitter<AjBreidenbach> hold up, I'll show you how the nim compiler does it
02:26:56FromGitter<AjBreidenbach> `gcc -c -w -I/home/andrew/Developer/Nim/lib -o /home/andrew/Developer/projects/nim/test/nimcache/test.o /home/andrew/Developer/projects/nim/test/nimcache/test.c`
02:27:27FromGitter<AjBreidenbach> first it compiles the output c file for each nim file
02:27:52FromGitter<AjBreidenbach> the `-I` is for include, it's where you have the `nimbase.h`
02:28:34FromGitter<AjBreidenbach> then after it's run that command for each .nim file
02:28:56FromGitter<AjBreidenbach> it links all of them together ```bash
02:29:14FromGitter<AjBreidenbach> ```code paste, see link```
02:33:39FromGitter<raydf> i tried this: ⏎ ⏎ ```gcc -c -w -I/home/rayner/ -o /home/rayner/hello.o /home/rayner/hello.c``` [https://gitter.im/nim-lang/Nim?at=5ab07303fa066c53254cab71]
02:34:02FromGitter<raydf> but didn't created the sstdlib_system.o
02:34:56FromGitter<AjBreidenbach> yeah, you only compiled `hello.c`
02:35:12FromGitter<AjBreidenbach> you have to do it again for `stdlib_system.c`
02:35:24FromGitter<raydf> yeah sorry
02:35:26FromGitter<raydf> root@4617df729640:/home/rayner# gcc -o /home/rayner/hello /home/rayner/hello.o /home/rayner/stdlib_system.o ⏎ /home/rayner/stdlib_system.o: In function `nimUnloadLibrary': ⏎ stdlib_system.c:(.text+0xcd70): undefined reference to `dlclose' ⏎ /home/rayner/stdlib_system.o: In function `nimLoadLibrary': ⏎ stdlib_system.c:(.text+0xcd90): undefined reference to `dlopen' ... [http
02:35:26FromGitter... s://gitter.im/nim-lang/Nim?at=5ab0736ee4ff28713a50b7ef]
02:35:38FromGitter<raydf> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ab0737abb1018b37a034419]
02:35:54FromGitter<raydf> have you seen this kind of errors?
02:38:37FromGitter<AjBreidenbach> uhh try this
02:38:55FromGitter<AjBreidenbach> ```gcc -o /home/rayner/hello /home/rayner/hello.o /home/rayner/stdlib_system.o -ldl```
02:39:28FromGitter<raydf> it compiles
02:39:45FromGitter<AjBreidenbach> ;)
02:39:47FromGitter<raydf> but when i run the program it says ⏎ ⏎ ```root@4617df729640:/home/rayner# ./hello ⏎ out of memory``` [https://gitter.im/nim-lang/Nim?at=5ab07473e4ff28713a50bb8d]
02:39:54FromGitter<raydf> hahahahahha
02:40:01FromGitter<raydf> thanks for all your help
02:40:03FromGitter<AjBreidenbach> you have to go into raspi config I think
02:40:15FromGitter<AjBreidenbach> yeah, np
02:40:44FromGitter<AjBreidenbach> hey do you happen to know how to write a nimscript?
02:42:31FromGitter<AjBreidenbach> or is nake better?
02:42:41FromGitter<raydf> why not use nimble?
02:42:51FromGitter<raydf> nimble uses nimscript
02:43:18FromGitter<raydf> you define tasks and all that
02:43:29FromGitter<raydf> and call nimble taskname
02:43:50FromGitter<raydf> ```nimble run```
02:44:07FromGitter<AjBreidenbach> well you made that stupidly easy
02:44:10FromGitter<AjBreidenbach> thank you sir :D
02:44:41FromGitter<raydf> np, nimble it's a very good package manager
02:44:49FromGitter<raydf> and also a build tool
02:45:06FromGitter<raydf> let me see how i can fix the out of memory problem
02:49:56FromGitter<raydf> thx
02:52:17*S1t1Schu joined #nim
02:55:27*S1tiSchu quit (Ping timeout: 240 seconds)
02:58:32*athenot quit (Ping timeout: 240 seconds)
03:02:08*athenot joined #nim
03:04:24FromGitter<AjBreidenbach> how do I specify a nim file when I build with nimble?
03:07:26leorizeAraq: does the compiler inject destructor call for `a` in expr: `=` a b (copy)?
03:26:45*athenot quit (Ping timeout: 252 seconds)
03:27:23*athenot joined #nim
03:32:09shashlickmissed a fun conversation around cloud
03:33:53shashlick@zacharycarter - count me in if you need any help
03:45:04FromGitter<AjBreidenbach> shhh he's asleep
03:49:30*endragor joined #nim
03:51:31*leorize quit (Quit: WeeChat 2.0.1)
03:53:49*arnetheduck quit (Ping timeout: 256 seconds)
03:59:24*SenasOzys quit (Remote host closed the connection)
04:39:39*endragor_ joined #nim
04:41:57*endragor quit (Ping timeout: 268 seconds)
04:44:08*ungenanntercp joined #nim
04:46:27*ungenanntercp quit (Remote host closed the connection)
05:06:11*SitiSchu joined #nim
05:06:26*dddddd quit (Remote host closed the connection)
05:07:39*S1t1Schu quit (Ping timeout: 260 seconds)
05:07:46*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
05:30:06*nsf joined #nim
05:38:34*arnetheduck joined #nim
05:44:53*arnetheduck quit (Ping timeout: 256 seconds)
06:08:23FromGitter<gogolxdong> What's the name of nim IDE?
06:08:44FromGitter<HonzsSedlomn> Aporia
06:09:02FromGitter<HonzsSedlomn> Or u can use VSCode with Nim extension
06:12:21*leorize joined #nim
06:19:57*r3d9u11 joined #nim
06:21:17FromGitter<gogolxdong> VSCode with Nim extension has some issue with multiuser on linux.
06:22:29FromGitter<gogolxdong> Aporia can't open folders.
06:28:06FromGitter<AjBreidenbach> vim is the best
06:33:29FromGitter<gogolxdong> I agree , it's hard for many other people to get used to. Like my students.
07:00:49*r3d9u11 quit (Ping timeout: 256 seconds)
07:01:31*LJWCVDTVISION joined #nim
07:03:34*LJWCVDTVISION quit (Remote host closed the connection)
07:15:29*gangstacat joined #nim
07:23:45*yglukhov joined #nim
07:26:41*Vladar joined #nim
07:27:19*yglukhov quit (Read error: Connection reset by peer)
07:28:40*yglukhov joined #nim
07:28:58*hoijui joined #nim
07:42:47*mihiefxf joined #nim
07:43:47*mihiefxf quit (Remote host closed the connection)
07:53:01*xkapastel quit (Quit: Connection closed for inactivity)
08:01:20*traumschule707 joined #nim
08:03:21*traumschule707 quit (Remote host closed the connection)
08:09:32*Arrrr joined #nim
08:09:32*Arrrr quit (Changing host)
08:09:32*Arrrr joined #nim
08:17:39*rokups joined #nim
08:30:48*LyndsySimon quit (Ping timeout: 256 seconds)
08:31:08*Calinou quit (Remote host closed the connection)
08:32:03*LyndsySimon joined #nim
08:32:17*Calinou joined #nim
08:36:08*PMunch joined #nim
08:38:47*ucbpsecret joined #nim
08:40:50*ucbpsecret quit (Remote host closed the connection)
08:42:42*floppydh_ joined #nim
08:52:22*jaco60 joined #nim
08:58:58PMunchalehander42, you on?
08:59:05PMunchI saw you highlighted me yesterday morning
09:15:27FromGitter<narimiran> hey PMunch! you're using manjaro, right? which kernel do you use?
09:17:52PMunchUhm, good question
09:18:00PMunchAnd I'm at work right now so can't really check
09:18:53PMunchOnly thing I remember is that it's in the 4 series :P
09:21:57FromGitter<data-man> @narimiran: I'm using 4.15.10-1. But Arch Linux. :)
09:23:11FromGitter<narimiran> i'm asking because i noticed big performance hit in 4.14 compared to 4.9
09:23:53FromGitter<narimiran> i guess this has to do with spectre/meltdown, but i didn't expect it to be such noticeable difference for cpu-intensive tasks
09:26:41PMunchHow big? I'm pretty sure they said the difference would be negligible to 99% of regular users
09:27:13PMunchThen again I guess none of us could be counted as "regular users" in the grand scheme of things
09:29:58FromGitter<narimiran> PMunch: i'm also at work now so i cannot give you the exact numbers, but i was running Euler benchmarks for @mratsim (https://github.com/mratsim/Arraymancer/tree/master/benchmarks) and the difference between 4.9 (times posted there) and 4.14 wasn't "negligible" at all!
09:30:40FromGitter<mratsim> argh :/
09:33:02PMunchnarimiran, comparing across machines? That could be anything..
09:33:43FromGitter<narimiran> on the same machine, once i boot with 4.9, the other time with 4.14
09:34:12FromGitter<narimiran> in those benchmarks, my results are from i7-970, others are from @mratsim
09:35:42FromGitter<narimiran> results/times with 4.14 are not posted there
09:36:44PMunchHmm, that's not good
09:36:53PMunchAnd they are compiled with the same switches and such?
09:37:10PMunchNothing that's been disabled or enabled between the versions?
09:39:29FromGitter<narimiran> files are compiled using `-d:release`, nothing has changed in-between
09:42:03*floppydh joined #nim
09:43:34*jaco60 quit (Quit: Textual IRC Client: www.textualapp.com)
09:44:51FromGitter<alehander42> @PMunch yes, I just had a discussion about parsing dsl-s, so I remembered you worked on something similar (binary format parsing)
09:46:33PMunchOh my binary parser thing
09:46:47PMunchOr my combinator parser thing?
09:47:21FromGitter<alehander42> ah maybe I forgot about the combinatory parser
09:47:31FromGitter<alehander42> overally about parser dsl opinions :D
09:47:40PMunchhttps://github.com/PMunch/binaryparse/blob/master/binaryparse.nim#L627
09:47:49PMunchThat's the syntax of the binary parser
09:48:09PMunchMore of a declaration of how things are placed in the file
09:48:47FromGitter<alehander42> yes, I remember that one, as I even had a PR for this lib
09:49:24PMunchOh yeah, that's right
09:49:25PMunchhttps://github.com/PMunch/combparser/blob/errors3/combparser.nim#L476
09:49:27FromGitter<alehander42> otherwise is this https://github.com/PMunch/combparser/blob/master/combparser.nim#L422
09:49:29PMunchThat's the combparser thing
09:49:30FromGitter<alehander42> the comb parser
09:49:37FromGitter<alehander42> yeah
09:49:54FromGitter<alehander42> aha, very nice
09:49:55PMunchYeah, but the furthest branch at this point is errors3
09:50:02FromGitter<alehander42> I see, that explains it
09:50:08PMunchI'm planning on doing a merge soon :P
09:50:23PMunchI still want to use an internal string slice type though
09:50:34PMunchInstead of copying the string for each parser
09:50:38FromGitter<alehander42> my idea was a bit different, I wanted to make a bnf-like dsl similar to https://github.com/alehander42/area42/blob/master/parser.nim
09:50:59PMunchYeah I saw what you posted, looks nice
09:51:06FromGitter<alehander42> but Araq and @survivorm convinced me it would be probably better to use a custom syntax instead of a dsl for that
09:51:32Araqyou can have both
09:51:50Araqtranslate the string into calls of +, * and concat()
09:52:05PMunchThe thing with the combparser is that you can map your data to other things as well: https://github.com/PMunch/protobuf-nim/blob/master/protobuf.nim#L443
09:52:08FromGitter<alehander42> the reason why I wouldn't use combparser for that is because from >year I wanted to combine parsing & ast construction in one single dsl and to also generate parsers for it in different languages
09:52:24FromGitter<alehander42> yeah, that's what I'll probably do
09:52:24Araqthen the string translator can even be independent of the parser generator
09:52:40FromGitter<alehander42> but still the underlying dsl wouldn't look like the repo one
09:52:44Araqwould make a nice stdlib module
09:52:46FromGitter<alehander42> because it's PITA to implement like that
09:52:47PMunchRunning that parser will yield you the custom data type ProtoNode which is tailored for the input data
09:53:09FromGitter<alehander42> because the syntax tree of the macro args is nothing like its intended meaning
09:53:56PMunchI actually played around with parsing AST with combparser as well
09:54:02FromGitter<alehander42> maybe it will be something more obvious like <rule> & <rule> | *(<rule>.labeled("field") & ws) etc
09:54:39PMunchAll the combinators are generic, so the only thing you really need is a couple low-level matchers and maybe some extra combinators for multi-branch stuff
09:54:42FromGitter<alehander42> @Araq what would make a stdlib module, the parser generator, or the string version?
09:55:16FromGitter<alehander42> @PMunch yeah, I'll play with it, sounds nice
09:55:27PMunchhttp://kschiess.github.io/parslet/
09:55:32PMunchThat syntax is quite nice
09:55:48FromGitter<mratsim> I think I win the load average award of the year with 440
09:55:51PMunchKinda similar to what you just mentioned
09:55:55FromGitter<mratsim> (https://files.gitter.im/nim-lang/Nim/FByG/Screen-Shot-2018-03-20-at-10.53.20.png)
09:56:32FromGitter<alehander42> still I just can't use it for my project, as I wanted something very declarative, not nim-specific
09:56:35PMunchHaha, nice one mratsim :)
09:57:06FromGitter<alehander42> yeah, parslet is cool
09:58:19FromGitter<alehander42> but still, I slightly prefer bnf on steroids, as all those language-specific libs have to add something to ease combining it with the lang syntax or type system
09:58:27FromGitter<alehander42> e.g. str(..) instead of direct literal
09:58:37FromGitter<alehander42> `>>` instead of space or `&`
10:07:27*leorize quit (Remote host closed the connection)
10:20:12FromGitter<survivorm> @mratsim Wow! You've got 440 with cpu usage. I've got 230 recently, but I was out of mem (pycharm, gitlab, godot editor, palemoon and chrome, frantz and gitter, and 8 threads of pre-test chef configurations and 16G ram is not enough... and 4g swap isn't too...)
10:20:29*zevlg joined #nim
10:21:59FromGitter<survivorm> @mratsim and actually all i was able to do - move mouse pointer. Even terminal windows switch was out of the table
10:22:28FromGitter<survivorm> But, actually, I've seen a 1.200 la once
10:23:04FromGitter<survivorm> on the server after critical postgresql performance bug/deadlock, IIRC
10:27:14*hoijui quit (Ping timeout: 276 seconds)
10:27:34Araqalehander42: the "string to Nim calls" translation step
10:27:56Araqbut probably it's too tied to a specific parser generator, so never mind
10:30:44FromGitter<mratsim> @survivorm yes I was making change to this data structure, and Nim didn’t like it when it wasn’t complete: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ab0e2d47685a046389cd104]
10:32:31FromGitter<survivorm> I wouldn't pretend i understand your case :P
10:32:32*jaco60 joined #nim
10:49:00*SenasOzys joined #nim
11:04:45*user0 joined #nim
11:04:48*user0 quit (Read error: Connection reset by peer)
11:05:17*user1101 joined #nim
11:08:53*Snircle joined #nim
11:14:51*r3d9u11 joined #nim
11:16:53*yglukhov quit (Read error: Connection reset by peer)
11:17:29*yglukhov joined #nim
11:28:16FromGitter<alehander42> yeah, I will prototype this dsl when I have time and I'll show it again haha
11:29:47*zevlg left #nim ("ERC (IRC client for Emacs 26.0.50.2)")
11:29:47FromGitter<mratsim> I’m writing a fixed-precision integer library
11:31:58*Vladar quit (Read error: Connection reset by peer)
11:33:39*jjido joined #nim
11:40:07*Vladar joined #nim
11:48:46*hoijui joined #nim
11:51:07*Vladar quit (Quit: Leaving)
11:51:32FromGitter<survivorm> I have a very vague understanding of this things. And, besides, I've slept for about 4 hours tonight, so i'm more than a little stupid now
11:56:56*DarkArctic_ is now known as DarkArctic
11:58:15*jjido quit (Read error: Connection reset by peer)
12:05:51*Vladar joined #nim
12:13:33*leorize joined #nim
12:17:52*athenot quit (Ping timeout: 240 seconds)
12:18:43*athenot joined #nim
12:38:25*vlad1777d quit (Ping timeout: 248 seconds)
12:48:55Yardanicoit seems that collectionToString doesn't process unicode?
12:49:14YardanicoI mean it returns things like @["\xD0\xBE\xD0\xB4\xD0\xB8\xD0\xBD", "\xD0\xB4\xD0\xB2\xD0\xB0"]
12:50:23Yardanicoah, it's because addQuoted processes string char by char
13:04:51*tefter quit (Remote host closed the connection)
13:06:00*natrys joined #nim
13:13:07*SenasOzys quit (Ping timeout: 256 seconds)
13:18:47*SenasOzys joined #nim
13:18:53*MJCaley joined #nim
13:21:03FromGitter<BontaVlad> Does anybody use spacemacs/emacs for nim work? Nimsuggest nowadays either get's stuck at 100% cpu usage or keeps spacemacs at 100% cpu. I'm using latest devel nim version. This problem is not something new but now it hangs all the time.
13:23:56*poopBot joined #nim
13:25:14FromGitter<alehander42> btw what does sublime nimlime use?
13:25:19FromGitter<alehander42> I never have those nimsuggest problems
13:26:33FromGitter<BontaVlad> I think vscode uses nimsuggest and these kind of problems don't show up there.
13:27:02FromGitter<BontaVlad> I think this is something emacs/spacemacs(nim-mode) things.
13:33:23poopBothmm does nim have support like for xml documentation/helpers in c# , when i tupe proc BlaBla() it shows explanation of each argument
13:35:23PMunchYou mean like docstring?
13:38:09*r3d9u11 quit (Ping timeout: 264 seconds)
13:39:15poopBotpossible duno how its exactly name , can check
13:39:45poopBothttps://stackoverflow.com/questions/34516/is-there-a-standard-like-phpdoc-or-pythons-docstring-for-commenting-c-sharp-c#34533
13:39:49poopBotyep kinda
13:40:38livcddo you guys use verbal expressions ? (not in nim)
13:41:35*floppydh quit (Remote host closed the connection)
13:41:38poopBoti duno what that is, do you shout at your pc or what?
13:42:24*floppydh joined #nim
13:43:00PMunchpoopBot, https://nim-lang.org/docs/docgen.html
13:43:25PMunchNim has native support for this through the doc comments
13:43:45PMunchIt's not as structured as C# or Java, for better or for worse
13:44:00poopBotnice
13:45:27PMunchIf you look at the documentation for any module, for example https://nim-lang.org/docs/json.html and compare it to the source https://github.com/nim-lang/Nim/blob/master/lib/pure/json.nim#L10 you can see how this works in action
13:46:05FromGitter<alehander42> :D
13:46:09FromGitter<alehander42> ops, wrong chat
13:50:37PMunchlivcd, verbal expressions?
13:51:46livcdhttps://github.com/VerbalExpressions
13:51:57FromGitter<alehander42> wow, I ported a very simple version of verbal expressions automatically to many languages once :D
13:52:18FromGitter<alehander42> I remember that I was very impressed the first time by the original
13:52:50*MJCaley quit (Quit: MJCaley)
13:54:23*r3d9u11 joined #nim
13:55:27*leorize quit (Remote host closed the connection)
13:57:14PMunchNever heard of it before, but I must say that the coverage is impressive
14:02:05*xkapastel joined #nim
14:09:58FromGitter<narimiran> is it just a wrapper around regex to make it more verbose?
14:14:00FromGitter<survivorm> looks like
14:14:35FromGitter<survivorm> more or less. It's a regexp constructor, if i understand correctly
14:14:38poopBotwhats version of _cversion=0.18.0
14:14:38poopBot_nimbleversion=0.8.8 whit nim 0.18 am trying to update package for my distro
14:17:00PMunchpoopBot, I'm not quite sure what you mean
14:22:14poopBoti think i can figure out on my own
14:22:15poopBot:)
14:26:14poopBotok so master brench is that 0.18.0 right
14:26:21poopBotand devel is nightlbuilds
14:28:28PMunchSomething like that, yes
14:31:43FromGitter<alehander42> why can't I `step "reverse-continue", reverse=true` :(((
14:32:00FromGitter<alehander42> it seems the no parens syntax doesn't work with keyword args?
14:32:11*Arrrr quit (Read error: Connection reset by peer)
14:33:21*r3d9u11 quit (Ping timeout: 265 seconds)
14:37:13poopBothmm totaly offtopick question but how to see in github archive file, like realises
14:37:50Araqalehander42, it doesn't, yes
14:38:13Araqwould be too ambiguous with assignments
14:38:17poopBothttps://github.com/nim-lang/Nim/archive/v${version}.tar.gz
14:38:36PMunchpoopBot, click the releases button
14:38:39poopBotwhen i https://github.com/nim-lang/Nim/archive/ it wont show what options are there
14:38:52poopBotok will try to find realeses button :) , ty
14:39:11PMunchIt's right next to commits, branches, and contributors on the main repo page
14:40:00poopBotlol i was blind xD
14:41:49FromGitter<alehander42> ook,
15:08:02*NimBot joined #nim
15:16:04*jjido joined #nim
15:29:11FromGitter<alehander42> ```quote: ⏎ var b {.importc: `name`.}: int``` [https://gitter.im/nim-lang/Nim?at=5ab128c7f3f6d24c68979202]
15:29:27FromGitter<alehander42> is this supposed to work? I always get 2 or 3 instead of a string :D
15:29:56PMunch2 or 3?
15:30:03FromGitter<alehander42> yes
15:30:09FromGitter<alehander42> when I see the `repr` of the quote
15:30:19FromGitter<alehander42> I get `{.importc: 3}`
15:30:28PMunchAnd what is name?
15:31:00FromGitter<alehander42> newLit("name")
15:31:27FromGitter<alehander42> it's actually ident"2"
15:31:31FromGitter<alehander42> if I look at the tree
15:34:04PMunchHuh, this looks like a really strange bug..
15:34:15FromGitter<alehander42> yeah and if you add more
15:34:20FromGitter<alehander42> it gets 3, 4 etc
15:34:24FromGitter<alehander42> probably some index problem
15:35:32PMunchAnything else works fine
15:38:11FromGitter<alehander42> zahary gave a workaround to ⏎ ⏎ ```let x = ident("x") ⏎ quote: ⏎ const `x` = `name` ⏎ var b {.importc: x.}: int``` ⏎ ⏎ but still a very weird original bug :D [https://gitter.im/nim-lang/Nim?at=5ab12ae3e4d1c636041fa878]
15:38:28FromGitter<alehander42> I'll open an issue
15:40:57PMunchDoesn't appear to work in a template either..
15:43:29FromGitter<alehander42> I opened https://github.com/nim-lang/Nim/issues/7381
15:43:47*natrys quit (Ping timeout: 255 seconds)
15:45:27*natrys joined #nim
15:45:44*poopBot quit (Remote host closed the connection)
15:46:17*endragor_ quit (Remote host closed the connection)
15:58:53*athenot quit (Ping timeout: 240 seconds)
15:59:18*athenot joined #nim
16:01:23shashlickis it possible to get the nim lib dir during compile time?
16:03:24PMunchWhat do you mean by "the nim lib"
16:03:36PMunchThe folder of the Nim executable?
16:03:54PMunchOh, "lib dir" sorry I misread
16:04:42*hoijui quit (Ping timeout: 256 seconds)
16:05:10*arecaceae quit (Remote host closed the connection)
16:05:26shashlickya or even the nim.exe executable during compile time
16:05:33*arecaceae joined #nim
16:07:16shashlicknimscript.selfExe() doesn't work in macros/templates or static
16:14:46*dom96 joined #nim
16:14:46*dom96 quit (Changing host)
16:14:46*dom96 joined #nim
16:15:10FromGitter<krux02> shashlick: what are you looking for?
16:15:30FromGitter<krux02> the directory of the nim libaray in the file system?
16:16:17*Araq joined #nim
16:17:07FromGitter<krux02> for me it's soun
16:17:19FromGitter<krux02> ds weird that you even try to look for that folder
16:17:37shashlickyes, during compile time, easy to find during runtime
16:17:43FromGitter<krux02> what do you want to do there? And don't you think there is a better alternative to do that, for example reflection
16:17:47shashlickhttps://github.com/nim-lang/Nim/blob/fc22627dbd9209e58fcc3f95e83650c9c0d8495c/compiler/options.nim#L236
16:18:14*miran joined #nim
16:18:34shashlickwell, i'm writing a small program to import every module in stdlib in a nimscript to see which ones work
16:18:52shashlickif I could find the nim lib, I could post a generic gist to do that, else I have to ask where it is
16:19:41FromGitter<krux02> Ouch I don't like that branching at all
16:20:26FromGitter<krux02> well, that is not the point though.
16:21:11FromGitter<krux02> well, when it is for a test, then you know your library path, don't you?
16:21:58shashlickya, that's true
16:22:35shashlickI have 67 modules that load up fine in the VM
16:22:49shashlickof course, it's unclear which procs will actually work vs. error out
16:24:04shashlick53 which use FFI so no hope for those anytime soon
16:24:10FromGitter<krux02> and when you grep for nim files, you will won't be able to see wich nim files are actually only included into other nim files and are not even inteded to work
16:24:22FromGitter<krux02> in isolation
16:29:05shashlickya those the compiler rejects as cannot import
16:33:54shashlickhere's my results in case folks are interested: https://gist.github.com/genotrance/cc575b760428289586e141f2ef64c3ba
16:34:46shashlickI think it is worthwhile to have test cases for all supported modules along with clear documentation on what is possible in nimscript and at compile time instead of just the 4 modules documented on the nims.html page
16:35:29*Trustable joined #nim
16:41:00shashlickinteresting that copyMem() and zeroMem() aren't available in the VM
16:46:27FromGitter<mratsim> There is no heap or stack in the VM, only NimNode™, what would you copy?
16:51:06shashlick@mratsim: understood, I don't really know how the VM works, but would it be possible to work around it?
16:51:10shashlicke.g. https://github.com/nim-lang/Nim/blob/2a8d2ad4cde1c942a9dbc44598f65d4acf1e0aa6/lib/pure/streams.nim#L363
16:52:49shashlickstubbing out copyMem and similar calls when in the VM
16:52:57FromGitter<mratsim> The 3 tricks I used the whole weekend to survive in the hostile VM worlds where: `dumpASTgen`, `treerepr` and `result.add quote do: foo`
16:54:07FromGitter<mratsim> you probably want result = quote do: copyMem(`buffer`, adds(`s`.data[`s`.pos]), result)
16:54:31*dddddd joined #nim
16:54:38*PMunch quit (Quit: Leaving)
16:55:45FromGitter<mratsim> inside the macro create a template so you can use the normal nim syntax inside
16:55:48FromGitter<mratsim> or*
16:56:03shashlickright, but I am looking at how we can get more stdlib modules working in the vm, so the code would actually have to run, we aren't talking about generating code
16:57:31FromGitter<mratsim> Ah, I would say there is no way to read memory in the VM, but if there is a way, probably staticRead implementation can help you
16:58:50FromGitter<krux02> shashlick: just for your information, nothing that is related to memory layouting works on the VM.
16:59:17FromGitter<krux02> so copyMem and stuff like that have no use, because all assumptions about the memory layout of objects are false on the VM
16:59:23shashlickgood idea, will check it out
17:00:19shashlickbut the VM must be doing something to manage objects so i'm wondering if it is possible to have an alternate implementation of copyMem in the VM to enable modules that use it
17:00:29FromGitter<krux02> on the VM everything is like a ref object, even an uint8 is internally a pointer to a GC object
17:01:22shashlickregardless, I think the larger lift right now is to expand the supported list of modules from the 4 on the nimscript page to 67 - those already import just fine so i'm looking at adding test cases for those modules (or leverage existing ones) in the VM
17:01:25FromGitter<krux02> so when you have an array of uint8, it is not just plain memory on theVM
17:01:33*rbrt joined #nim
17:01:37FromGitter<krux02> it is actually objects and pointers to them
17:04:06*noonien joined #nim
17:11:43shashlickaraq, federico3: so i'm looking at doing the following - incrementally adding more modules to the tests\test_nimscript.nims based on findings here: https://gist.github.com/genotrance/cc575b760428289586e141f2ef64c3ba
17:11:56shashlickas part of that process, adding more nims tests for each module to make sure the actual procs work as expected
17:12:28shashlickfinally, as modules are added and fully validated, increase the list of modules marked as supported on the nims.html page: https://nim-lang.org/docs/nims.html
17:15:52shashlickplease confirm if this is a good idea - modules will be publicly documented only after they import successfully and all included procs work in nimscript
17:16:05FromGitter<Varriount> I want to get rid of the whole ospaths vs os module thing
17:18:01shashlickIf a particular proc in a module doesn't work in the VM, it might be worthwhile to evenually have a pragma or something that can be used to mark them so that they won't be usable in nimscript (proc not visible) and automatically documented that they won't work in VM.
17:18:44shashlickprobably better off tracking this as an issue
17:21:05miranis my memory failing me again, or calling a proc `foo` with two parameters was possible to do like `foo a, b`, but now it isn't?
17:30:58*jjido quit (Ping timeout: 264 seconds)
17:36:35*SenasOzys quit (Ping timeout: 240 seconds)
17:45:04federico3shashlick: it would be nice to have some coverage metrics
17:46:51*SenasOzys joined #nim
17:46:55*Sentreen_ joined #nim
17:47:32shashlickfor the test cases?
17:48:53*Sentreen quit (Ping timeout: 240 seconds)
17:52:25shashlickhttps://github.com/nim-lang/Nim/issues/7383
17:58:08*MJCaley joined #nim
18:02:53FromGitter<mratsim> I’ve updated nimbus-launch https://github.com/status-im/nimbus-launch, you have nimble, gitignore, appveyor/travis, readme, a skeleton src, tests and build, license headers on your files and badges.
18:04:30miranmratsim: a more informative readme would be nice ;)
18:05:29miranbtw, how is nim accepted at status? anyone else besides you using it?
18:08:54FromGitter<Varriount> Anyone know if something like `for c in stringVariable[1..5]` creates a string copy?
18:12:33dom96Varriount: it does
18:16:01FromGitter<krux02> dom96: for what do you need a struct module in Nim?
18:17:06FromGitter<krux02> I am very puzzled by the comment you made on issue https://github.com/nim-lang/Nim/issues/7337
18:17:09dom96For parsing binary data?
18:17:21FromGitter<krux02> I did parse binary data, no problem
18:17:26FromGitter<krux02> no struct module needed
18:17:32FromGitter<krux02> I just cast the pointer to a struct
18:18:46FromGitter<krux02> I know it has problems with platform dependent alignment, but I just add padding bytes manually, so that all primitive members are self aligned.
18:18:57FromGitter<krux02> and then I use the pack pragma
18:19:14FromGitter<krux02> then it is not platform dependent anymore
18:19:17dom96Sure, that works, but could certainly be made nicer.
18:19:30FromGitter<krux02> what do you mean with nicer?
18:19:49dom96Casting and working with pointers is unsafe
18:19:55dom96I want a memory safe API for this
18:20:05dom96And I want it to handle things like endianness
18:20:21FromGitter<krux02> and you think doing this with a "struct" api would be safer?
18:20:24FromGitter<mratsim> @miran improved.
18:20:25FromGitter<krux02> I don't think so
18:20:49dom96I said "something like"
18:21:11miranmratsim: wow, that was fast!! much better, thank you!
18:21:19FromGitter<mratsim> Non-Nim people are interested in Nim and we plan to extend the current team of 4 by the end of the year
18:21:23FromGitter<krux02> well you can handle endianness pretty easily, just create a precedure that goes recursively throuh all struct members and handles endianness
18:21:49FromGitter<krux02> you can define that procedure generically for all structs and it is not more than a few lines of nim code
18:21:55dom96There is an endians module which handles it pretty well
18:22:05dom96but is still unsafe
18:22:09FromGitter<krux02> well yes I would call to that
18:22:29FromGitter<krux02> what do you mean?
18:22:39dom96It uses pointers
18:23:13dom96If I'm parsing a string containing binary data I could easily go past the string's length and screw up
18:23:17FromGitter<krux02> well you have to parse the input somehow
18:23:29FromGitter<krux02> ouch
18:23:35FromGitter<krux02> don't ever use a string for binary data
18:23:38FromGitter<krux02> that is just wrong
18:23:49FromGitter<mratsim> ^ Please add your input to the RFC ;)
18:23:50*r3d9u11 joined #nim
18:24:04FromGitter<mratsim> https://github.com/nim-lang/Nim/issues/7337
18:24:11dom96What's wrong with it?
18:24:21dom96And what should I use instead?
18:24:29FromGitter<mratsim> seq[byte]
18:24:36FromGitter<krux02> A string is for text encoded as text
18:24:43FromGitter<krux02> not for binary data
18:25:52FromGitter<krux02> just think about you are debugging that application. and then you see this variables and see it's a string. Let's see what it says. And it's just garbage. That has to be wrong
18:26:13FromGitter<krux02> yes seq[byte] or openarray[byte]
18:26:16FromGitter<krux02> much better
18:26:25miranmratsim: nice to hear there is a interest in nim at status!
18:26:28dom96That really doesn't have much to do with my safety concerns
18:26:52FromGitter<krux02> seq[bytes] and openarray[byte] tells that it is not yet interpreted. It is just data
18:26:53dom96Sure, I can convert my string to seq[byte] or whatever and then parse it...
18:27:30dom96I disagree about this definition for `string` though
18:27:37FromGitter<krux02> why?
18:27:48dom96Because it can contain binary data
18:27:49FromGitter<krux02> in every language a string is just a string.
18:27:59FromGitter<krux02> no it can't
18:28:17dom96How can it not?
18:28:22dom96Of course it can
18:28:40dom96The language doesn't prevent me from storing non-printable characters in there.
18:29:00FromGitter<krux02> yes and a ptr float can be used to store an iteger
18:29:21FromGitter<krux02> but why, when you have the `int` type for that?
18:29:39*xet7 joined #nim
18:29:55FromGitter<krux02> just because the language doesn't prevent you from abusing the string type, doesn't mean that you should do it
18:30:04FromGitter<krux02> especially when you have good alternatives
18:30:17FromGitter<krux02> the string is for printable stuff only
18:31:37dom96The string is for many things
18:31:37FromGitter<krux02> I recently read about what the problem with python2 is and why they decided to introduce a breaking change
18:31:41FromGitter<krux02> and was exactly this problem
18:31:49FromGitter<krux02> using a string for binary data
18:32:05FromGitter<krux02> they wanted strings for text.
18:32:12zielmicha[m]1the utility of separating text and binary types is questionable
18:32:15zielmicha[m]1IMO Python chose the wrong solution
18:32:23FromGitter<krux02> for unicode text to be precise
18:32:24federico3why?
18:33:21dom96Going back to your float analogy, if a function in your API returns a float it may sometimes return something that could be better represented by an int.
18:33:35FromGitter<krux02> also a very big advantage of storing data in seq[byte] is the printing
18:33:37dom96It'll still return a float though
18:33:44dom96It's the same for strings
18:33:51dom96All I/O operations return strings
18:34:05FromGitter<krux02> no they don't
18:34:18FromGitter<krux02> I can still memory map files
18:34:23FromGitter<krux02> that provides a nice pointer
18:35:13zielmicha[m]1There needs to be text->data converter, otherwise it a lot of things will be very annoying (e.g. you can't write "Host: google.com" to binary socket or you can't hash "foobar")
18:35:15FromGitter<mratsim> For me using string for non-printable data is the poor man solution for a non expressive enough type system
18:36:11dom96For me it's a big mess
18:36:25zielmicha[m]1And you need to convert between data/text in various places when it's not clear if something is binary data or text.
18:36:32FromGitter<mratsim> @zielmicha you can overload
18:37:08dom96If we look at this way then we have this concept of "data" which is a superset of strings
18:37:12FromGitter<krux02> strings and binary data need to have a distinct type
18:37:19dom96So we should change the whole Nim stdlib to handle this "data"
18:37:40zielmicha[m]1Especially when it comes to machine readable files (e.g. is JSON encoded string a text string or binary string?)
18:37:46FromGitter<krux02> and when you abuse a string for binary data, then you should be aware that you abuse tha string type and that it will cause problmes
18:37:57zielmicha[m]1It can be both (as it's guaranteed not to contain unicode)
18:38:47FromGitter<krux02> what is guaranteed not to contain unicode?
18:38:59FromGitter<krux02> strings work with unicode just fine
18:39:36zielmicha[m]1krux02: the question is if encodeJson should return string or binary
18:39:46FromGitter<krux02> json can be a string, I would not have problems with that
18:39:56FromGitter<krux02> because every json file is a valid text file
18:40:15FromGitter<krux02> I would say string
18:41:02FromGitter<krux02> because you can always see a string as just data
18:42:05zielmicha[m]1there will be lots of similar questions even in the stdlib (should https://nim-lang.org/docs/strtabs.html have binary or text keys?)
18:42:06zielmicha[m]1Basically I'm again splitting string->text/data, because I don't see utility in having two type like that (e.g. what kind can of bugs can it prevent?), but the more important ascept is that stdlib and lots of Nimble modules are designed for single string type.
18:43:00FromGitter<mratsim> Well, my whole RFCs is about the bugs triggered by mixing and matching string with binary data
18:43:43dom96What about unicode? Should we have a separate unicode string type too?
18:44:12FromGitter<mratsim> there are Runes for that
18:44:22FromGitter<krux02> to be honest i think that all strings should be utf8
18:44:44FromGitter<krux02> that is how a lot of other languages do it, and it is quite nice
18:44:46FromGitter<mratsim> a string is a seq[char] currently, you can’t deal with unicode properly with a char
18:45:11FromGitter<krux02> and when you need to have a different encoding, you need to define your own string type
18:45:34zielmicha[m]1you can't deal with unicode properly at all :)
18:45:41zielmicha[m]1a bit when your char is uint32_t
18:45:42dom96mratsim: Maybe I am missing something but I don't see any bugs listed in your RFC
18:46:27zielmicha[m]1(e.g. even number of runes in the string is often not the correct length of string due to combining characters)
18:46:27FromGitter<mratsim> This: https://github.com/jangko/nimSHA2/issues/2
18:46:34dom96You've just noted that no crypto package is consistent with the types that it is using to represent binary data
18:46:50FromGitter<krux02> @mratsim what you you expect from proper unicode support?
18:46:52FromGitter<mratsim> And the whole: https://github.com/status-im/nim-ranges/blob/master/ranges/memranges.nim was to deal with string/seq[byte]/ptr+length
18:47:22FromGitter<mratsim> @krux02 I’m not in Unicode at all so I’m not the proper person to be asked.
18:48:24FromGitter<krux02> well I think that Unicode is anthoer topic and should be put to a later question.
18:48:58dom96okay, so the issue is with the display of binary data in strings, and in particular how \0 is handled.
18:49:08FromGitter<mratsim> Basically, the issue with string and bytes, force us to walk on our toes and to always have the source code of any binary package open to make sure of what those “strings” actually are
18:49:15FromGitter<krux02> at first we should all start to agree that strings should not contain data that is no text encoding at all.
18:50:57FromGitter<krux02> very important
18:52:32FromGitter<krux02> dom96: I just found a pretty good example of why you should not use strings for binary data, especially not for hashing.
18:52:35FromGitter<mratsim> C++17 introduced a distinct type called byte to deal with those issue: std::byte is a distinct type that implements the concept of byte as specified in the C++ language definition. Like char and unsigned char, it can be used to access raw memory occupied by other objects (object representation), but unlike those types, it is not a character type and is not an arithmetic type. A byte is only a collection of bits, and
18:52:35FromGitter... only bitwise logic operators are defined for it.
18:53:55*smt quit (Read error: Connection reset by peer)
18:55:05FromGitter<krux02> ok I was walse that one example is not that geat :/
18:55:12FromGitter<krux02> sorry
18:58:14FromGitter<krux02> dom96: no it's not just that. it is also the false assumption that a string variable does not contain a string cotent.
18:59:24*nsf quit (Quit: WeeChat 2.0.1)
19:01:57FromGitter<data-man> Zig language haven't string type, only bytes.
19:03:58FromGitter<krux02> what is Zig language?
19:04:17FromGitter<mratsim> A new language that gets top of Hacker news quite often these months
19:04:27FromGitter<mratsim> Compile to C with focus on safety
19:04:49FromGitter<krux02> well and that without a string type, impressive :P
19:07:07FromGitter<mratsim> it uses arrays of uint8 to store strings ...
19:12:15FromGitter<krux02> well yea, C does that, too
19:12:29FromGitter<krux02> but C also does not have static dispatch
19:13:59FromGitter<data-man> https://ziglang.org https://github.com/andrewrk/tetris :)
19:14:13FromGitter<krux02> I just saw the tetris
19:14:22FromGitter<krux02> I have an opengl tetris in Nim, too
19:14:32FromGitter<krux02> and mine is 3D :P
19:15:06dom96I have a Snake game, that runs in the browser :P
19:16:04FromGitter<krux02> https://i.imgur.com/DHlsBMf.png
19:16:14FromGitter<krux02> all written in Nim
19:17:03FromGitter<krux02> https://github.com/krux02/opengl-sandbox/blob/master/examples/tetris.nim
19:17:37FromGitter<data-man> Zig no need libc and c2zig ;)
19:18:17FromGitter<krux02> Zig still needs OpenGL and that has afaik no implementation that does not need libc
19:19:08*rbrt quit (Quit: Oíche mhaith)
19:21:50FromGitter<data-man> https://github.com/AndreaOrru/zen - Experimental operating system written in Zig.
19:23:51dom96krux02: beautiful, reminds me of Frets on Fire a little.
19:28:33FromGitter<krux02> I never played Frets on Fire, but I know it.
19:28:45FromGitter<krux02> It is supposed to be simple objects
19:29:02FromGitter<krux02> to it is an icosahedron in different colors with trivial shading and cubes
19:29:08FromGitter<krux02> notheng else for rendering
19:29:26FromGitter<krux02> but it uses instancing to render everyithing in just very vew draw calls
19:30:13FromGitter<krux02> currently I work that the shaders for this tetris can be written in Nim, too
19:30:32FromGitter<krux02> I am writing my master thesis in Nim
19:30:46FromGitter<krux02> but I have to go now
19:30:54FromGitter<data-man> @mratsim: No, not "Compile to C"
19:33:05mirankrux02: master thesis in nim? please do tell more!
19:48:30FromGitter<mratsim> @miran any idea of a better identifier for the “Ellipsis”? Currently I use `…` which is super ugly (quote … quote)
19:48:52FromGitter<zacharycarter> I'm more interested in - https://bitbucket.org/duangle/scopes/wiki/Home than zig
19:49:30FromGitter<zacharycarter> @data-man @krux02
19:54:34*rokups quit (Quit: Connection closed for inactivity)
20:01:11FromGitter<data-man> @zacharycarter: games, for me uninteresting :)
20:02:45miran@mratsim: can you show some basic example where you use them?
20:05:09*beatmox quit (Remote host closed the connection)
20:05:42*beatmox joined #nim
20:08:41*r3d9u11 quit (Remote host closed the connection)
20:09:12FromGitter<zacharycarter> @data-man what is interesting to you?
20:11:47FromGitter<data-man> @zacharycarter: text processing, db, low-level, graphics, image processing, and much more :)
20:19:27FromGitter<AjBreidenbach> nerd
20:25:58*hoijui joined #nim
20:30:49*MJCaley quit (Quit: MJCaley)
20:42:08*xet7 quit (Ping timeout: 276 seconds)
20:43:06*athenot quit (Read error: Connection reset by peer)
20:43:13*athenot_ joined #nim
20:47:00*athenot joined #nim
20:47:56*athenot_ quit (Read error: Connection reset by peer)
20:48:56*nsf joined #nim
20:49:17FromGitter<krux02> @zacharycarte Well I definitively did not know about scopes yet. But it compiles to glsl and spir-v? Definitively makes it interesting.
20:57:08*xet7 joined #nim
20:58:04*rbrt joined #nim
21:09:24FromGitter<zacharycarter> @krux02 yeah
21:11:46*athenot quit (Ping timeout: 264 seconds)
21:11:59*athenot_ joined #nim
21:16:19*miran quit (Quit: Konversation terminated!)
21:25:12FromGitter<zetashift> @zacharycarter scopes looks interesting seems a bit vague
21:25:19FromGitter<zetashift> is it like Nim, but only compiles to C++?
21:27:12FromGitter<zacharycarter> I don't think it compiles to C++ - I think it was written in C++
21:28:57FromGitter<zacharycarter> I also don't think it's very much like Nim
21:29:28FromGitter<zacharycarter> @zetashift - http://scopes.readthedocs.io/en/latest/about.html
21:35:04FromGitter<zacharycarter> https://bitbucket.org/duangle/tukan/wiki/Home
21:38:57*Vladar quit (Quit: Leaving)
21:40:23*nsf quit (Quit: WeeChat 2.0.1)
21:45:07FromGitter<zetashift> ah yes got a bit more clearer
21:45:26FromGitter<zetashift> iirc Rust also has a way to compile to spirv
21:46:54*athenot_ quit (Ping timeout: 260 seconds)
21:47:25*athenot joined #nim
21:52:29*xet7 quit (Remote host closed the connection)
21:53:29FromGitter<zacharycarter> meh - I'm using bgfx so the spirv backend isn't too interesting to me, but the language in general definitely is
21:53:54*xet7 joined #nim
22:04:39*hoijui quit (Ping timeout: 256 seconds)
22:06:08*athenot quit (Read error: Connection reset by peer)
22:06:22*athenot_ joined #nim
22:08:53*MJCaley joined #nim
22:15:46*MJCaley quit (Read error: Connection reset by peer)
22:17:58*MJCaley joined #nim
22:20:19*MJCaley quit (Client Quit)
22:21:49*Trustable quit (Remote host closed the connection)
22:34:33*athenot_ quit (Ping timeout: 240 seconds)
22:38:07*jaco60 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:39:23*jaco60 joined #nim
22:44:20*jaco60 quit (Ping timeout: 276 seconds)
22:48:39FromGitter<zetashift> @zacharycarter well looking forward to frag2, I made a few small demos with nimgame2 which I liked but it doesn't really support mobile and web, which I kind of want to target
22:57:08*natrys quit (Quit: natrys)
23:00:09*rbrt quit (Quit: Oíche mhaith)
23:17:39*vlad1777d joined #nim
23:22:53*rbrt joined #nim
23:41:50*rbrt quit (Quit: Oíche mhaith)
23:42:58*rbrt joined #nim
23:50:27*user1101 quit (Quit: user1101)
23:54:09*rbrt quit (Quit: Oíche mhaith)