<< 22-07-2018 >>

00:03:44FromGitter<Quelklef> So, question
00:03:53FromGitter<Quelklef> How do macros, like, work?
00:04:00FromGitter<Quelklef> Are they interpreted?
00:04:15FromGitter<Quelklef> I mean, I can use seqs of NimNodes inside of a macro
00:04:25FromGitter<Quelklef> but a seq and all of its operations are kind of a runtime concept
00:04:31FromGitter<Quelklef> and macros happen before runtime
00:05:16FromGitter<Quelklef> With Lisp, I just handwaved it because I figured that the interpreted nature of lisp would allow it to kind of mix compiletime with runtime, so a "runtime" function could be used "normally" within a macro
00:05:31FromGitter<Quelklef> But Nim is compiled, so it must be doing something else...
00:06:10*shashlick quit (Remote host closed the connection)
00:06:27*shashlick joined #nim
00:21:12*wildlander joined #nim
00:25:19FromGitter<rayman22201> tehe. I love this question :-P
00:25:32FromGitter<Quelklef> why lol
00:25:51FromGitter<rayman22201> It's one of those questions that blows peoples minds
00:26:02FromGitter<Quelklef> ahhhhhh
00:26:11FromGitter<rayman22201> It's that inception feeling
00:26:47FromGitter<rayman22201> So first of all, yes macros are interpreted. Nim has a vm
00:26:59FromGitter<rayman22201> so does lisp :-P
00:27:43FromGitter<Quelklef> Interesting
00:28:03FromGitter<Quelklef> I had half-assumed since there's no "nim interpreter" (except `nim secret`), it wouldn't have one internally
00:28:18FromGitter<Quelklef> But alright, continue. blow my mind
00:28:37FromGitter<rayman22201> Well, the problem is that the Nim VM is meant for macros, not for REPLS
00:28:49FromGitter<rayman22201> that's why it's nim secret
00:28:54FromGitter<Quelklef> Ah, okay
00:29:01FromGitter<Quelklef> But when I use nim secret, it's the same thing?
00:29:07FromGitter<rayman22201> same VM, yeah
00:29:11FromGitter<Quelklef> Cool
00:29:34*shashlick quit (Remote host closed the connection)
00:29:49FromGitter<rayman22201> A compiler works like a conveyer belt. "source code / text" -> lexer -> parser -> optimization -> output (machine code / js / whatever)
00:29:51*shashlick joined #nim
00:30:09FromGitter<rayman22201> macros let you stick your own step in the middle of the process
00:30:28FromGitter<rayman22201> so you get ... parser -> macro -> ...
00:30:54FromGitter<rayman22201> or for reader macros (which Nim does not have, but could have): lexer -> reader macro -> parser ...
00:31:17FromGitter<Quelklef> Aw geez but you have to parse the reader macro before using the reader macro to parse
00:31:19FromGitter<Quelklef> anyway, continue
00:32:00FromGitter<rayman22201> reader macros are weird, it's why pretty much only lisp has them. They let you do cool stuff like invent your own syntax though. anyways
00:32:55FromGitter<rayman22201> A macro is a function that takes an AST as an argument and returns an AST as an argument. You intercept the conveyor belt basically
00:33:27FromGitter<rayman22201> it runs in between the compiler phases
00:34:05FromGitter<rayman22201> Nim does runs the function by passing it to a VM and using the result on the next step of the process
00:34:24FromGitter<Quelklef> Hmmmm
00:34:33FromGitter<Quelklef> I think I need to learn more about VMs
00:35:41FromGitter<rayman22201> learn about interpreters first
00:35:51FromGitter<rayman22201> VMs are fancy interpreters
00:36:13FromGitter<Quelklef> ? I thought it was the opposite
00:36:20FromGitter<Quelklef> Don't interpreters run on VMs
00:36:22FromGitter<Quelklef> (typically)
00:39:02*shashlick quit (Remote host closed the connection)
00:39:16FromGitter<rayman22201> they don't have to
00:39:17*shashlick joined #nim
00:41:16FromGitter<rayman22201> I'm simplifying a lot here, but essentially a VM is a interpreter for a very simple language (like say byte-code, to just Java terminology). You write code in a higher level language that, wait for it, gets compiled into byte-code, that is then interpreted by the VM.
00:42:24FromGitter<Quelklef> right
00:42:52FromGitter<rayman22201> You could just have "high level language" -> interpret into machine code.
00:43:06FromGitter<rayman22201> the VM is an abstraction layer
00:43:22FromGitter<Quelklef> "compile into machine code"?
00:43:29FromGitter<rayman22201> nope interpret
00:43:37FromGitter<Quelklef> ??
00:43:47FromGitter<Quelklef> What does it mean to "interpret into" somethig
00:43:48FromGitter<rayman22201> as in, you write x86 assembly code and feed it to the cpu one line at a time, live
00:43:58FromGitter<Quelklef> hmmmmmmm
00:43:58FromGitter<rayman22201> well, you don't, the intrepter does
00:44:27FromGitter<rayman22201> a lot of older dynamic languages used to work this way actually
00:44:56FromGitter<Quelklef> That's funky
00:45:31FromGitter<rayman22201> it's actually a lot simpler
00:46:08FromGitter<rayman22201> it's the simplest way to create a programming language. When I took compilers in college we learned interpreters first.
00:46:41FromGitter<Quelklef> feeding machine code in real time seems no different from spitting it out into a file for later
00:47:23FromGitter<rayman22201> it isn't any different
00:47:41FromGitter<rayman22201> the cpu does not care if you give it one assembly code at a time or a whole files worth
00:47:56FromGitter<Quelklef> right, so why do you say it's simpler?
00:47:59FromGitter<Quelklef> or did I misunderstand
00:48:00FromGitter<rayman22201> well it does.... cpu caches and branch predictors and all that... but lets keep it simple :-P
00:48:28FromGitter<rayman22201> It's simpler for a programmer to implement
00:49:07FromGitter<Quelklef> `feed(inst)` vs `write(inst)`?
00:49:54zacharycarter[m]craftinginterpreters.com
00:50:23zacharycarter[m]author of Dart
00:50:26zacharycarter[m]and gameprogrammingpatterns.com
00:50:27FromGitter<rayman22201> good website. definitely worth going through
00:50:28FromGitter<Quelklef> ooh, fancy!
00:51:50FromGitter<rayman22201> `write(inst)` is harder, mostly because of the details. I.E. making a binary file with proper headers for a .exe or linux executable is a pita.
00:51:52zacharycarter[m]not finished yet - the section about scripting language based in C that he writes is still being written, but I think he actually has an implementation of the VM / scripting language done
00:52:17zacharycarter[m]but you could get started and unless you read through it super fast, he'll probably have more up before you're finished
00:52:36FromGitter<Quelklef> Ah, gotcha @rayman22201
00:53:47FromGitter<rayman22201> In the "old" days it was less hard. They were much closer. Interpreters are still really useful though. It's good to have both ways.
00:53:57FromGitter<Quelklef> @zacharycarter I mean, even if it's not totally complete I'm sure there's a lot in there that I'll learn
00:56:07FromGitter<rayman22201> The other advantage to compiling over interpreting is that you can apply optimizations to the code before it actually runs on the cpu because it's going to a file first.
00:56:11FromGitter<rayman22201> VM's are an attempt to be the best of both worlds. You get the REPL like instant execution, but it puts a layer in the middle so you can do compiler style optimizations.
00:57:43FromGitter<Quelklef> I dunno if I buy that
00:57:51FromGitter<Quelklef> You could optimize without a VM
00:58:12FromGitter<Quelklef> source --parse>> AST --optimize>> AST --interpret>> result
00:58:18FromGitter<rayman22201> VM's also let you do real time optimization, which is pretty mind blowing. This is what the Javascript engines do. the VM can detect if you are running the same code through the REPL over and over again (say you have a loop going), and in real time it will optimize that code (that is what JIT is doing) and swap the original code for optimized code
00:58:35FromGitter<Quelklef> Ok, that's cool
00:59:37FromGitter<rayman22201> that's why VMs have "warm up" periods where they start slow and get fast after a while. They have to "learn" what your code is doing, and adjust the heuristics.
00:59:46FromGitter<rayman22201> modern VMs anyway
01:00:39FromGitter<rayman22201> a simple interpreter is source -> parse -> result. but a VM goes source -> parse -> VM -> optimize -> result
01:04:55FromGitter<rayman22201> the way Araq wrote the Nim VM is pretty cool, though probably not a good beginner example: https://github.com/nim-lang/Nim/blob/devel/compiler/vm.nim
01:09:35FromGitter<Quelklef> yeah im not sure im ready for nim's inner workings quite yet
01:12:29FromGitter<rayman22201> something to work up to :-)
01:12:47FromGitter<Quelklef> Indeed
01:12:52FromGitter<Quelklef> I'd love to be a serious contributor someday
01:15:40FromGitter<rayman22201> me too :-)
01:34:43*CcxWrk quit (Quit: ZNC 1.6.5 - http://znc.in)
01:37:31*CcxWrk joined #nim
01:41:23FromGitter<amscotti> Just a fyi, the Nim track on Exercism is now live! 🎉 ⏎ You can see it on the languages page, https://exercism.io/#explore-languages
01:47:37*ftsf joined #nim
02:09:48zacharycarter[m]amscotti: \o/
02:23:12*ieatnerd1 joined #nim
02:39:50*craigger_ joined #nim
02:41:23*craigger quit (Ping timeout: 276 seconds)
02:44:23*gangstacat quit (Ping timeout: 255 seconds)
02:54:33*ftsf quit (Ping timeout: 244 seconds)
03:01:35*ieatnerd1 quit (Ping timeout: 268 seconds)
03:02:35FromGitter<Varriount> @rayman22201 @Quelklef My command shell just interprets AST directly. No bytecode for me.
03:02:45FromGitter<Varriount> :/
03:03:04FromGitter<Quelklef> My HTML doesn't even interpret anything :\
03:03:14FromGitter<Quelklef> it just sits there, a sad little AST
03:04:18*gangstacat joined #nim
03:24:33FromGitter<Quelklef> What precisely does the `push` pragma do?
03:25:03FromGitter<Quelklef> Its documentation is about a sentence
03:25:08FromGitter<Quelklef> I can't find the implementation
03:35:37*leorize quit (Ping timeout: 245 seconds)
03:36:51*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
03:40:20*Lord_Nightmare joined #nim
03:53:10FromGitter<rayman22201> They let you turn on / off compiler flags temporarily
03:54:47FromGitter<rayman22201> You could {.push boundschecks: off.} for part of your program, and then {.pop.} to turn it back on again
03:54:52FromGitter<rayman22201> idk where the implementation is though
04:08:23*leorize joined #nim
04:08:52FromGitter<Quelklef> Hmmm
04:08:55FromGitter<Quelklef> That's what I thought
04:09:04FromGitter<Quelklef> I've seen `{.push importcpp.}` though?
04:09:12FromGitter<Quelklef> also bout to sleep so @ me if you answer
05:09:47*nsf joined #nim
05:13:10*miran joined #nim
05:15:01*leorize quit (Ping timeout: 260 seconds)
05:30:51*xylef joined #nim
05:32:33*Perkol joined #nim
06:04:11*Vladar joined #nim
06:13:34*Perkol quit (Quit: Leaving)
06:22:24*dddddd quit (Remote host closed the connection)
06:57:27*ieatnerd1 joined #nim
07:01:57*ieatnerd1 quit (Ping timeout: 240 seconds)
07:02:22FromGitter<mratsim> @rayman22201 you’re mixing JIT, interpreter and VM. A VM parse/fetch, decode, and execute code
07:02:43FromGitter<mratsim> an interpreter is the naive way, a JIT does what you call dynamic recompilation
07:03:19FromGitter<mratsim> an interpreter doesn’t start slow and get faster, a JIT does
07:21:44*nsf quit (Quit: WeeChat 2.1)
07:43:40*ftsf joined #nim
07:50:08*xylef quit (Quit: WeeChat 2.2)
08:13:43*stefanos82 joined #nim
08:23:21*xylef joined #nim
08:33:23*wildlander quit (Quit: Konversation terminated!)
09:03:14*benjikun quit (Quit: Leaving)
09:23:48*ieatnerd1 joined #nim
09:28:51*ieatnerd1 quit (Ping timeout: 268 seconds)
09:55:09FromGitter<tim-st> I saw that many types in stdlib have something like `type TImpl = object ..` and `type T = ref TImpl`. I see when I dont use `ref` my type has to be declared `var` to work with all procs, are there other downsides?
09:58:47FromGitter<tim-st> I read somewhere that although object it a value type it's not copied by value, so I'm wondering where are the other differences for the example above
09:59:28FromGitter<tim-st> (not copied by value when I use it as prog param)
09:59:31FromGitter<tim-st> *proc
10:04:05*Ven`` joined #nim
10:10:06*ftsf quit (Ping timeout: 244 seconds)
10:11:17FromGitter<tim-st> ok, I saw the answer here: http://nim-lang.org/docs/manual.html#procedures-var-parameters ; so a ref object is always on the heap and a non ref passed by var not always
10:11:53*yglukhov[i] joined #nim
10:12:01FromGitter<tim-st> so it's better to use non ref for my type
10:28:35*xylef quit (Ping timeout: 240 seconds)
10:29:14FromGitter<Varriount> @tim-st Keep in mind that, behind the scenes, objects are usually passed by pointer. (references are usually passed by value, since they're the size of a pointer anyway)
10:31:19*nsf joined #nim
10:42:57*leorize joined #nim
10:56:19*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:36:15*xylef joined #nim
11:53:52*dddddd joined #nim
12:18:32zacharycarter[m]yglukhov: are you around by any chance Yuri?
12:19:33yglukhov[m]zachary carter: hey
12:20:07zacharycarter[m]I have a question about jsbind if you don't mind - I'm trying to create a signature for console.log - is there any way to handle JS rest parameters?
12:20:16zacharycarter[m]I've tried with openarrays / varargs / JSObj but no joy so far
12:20:33zacharycarter[m]I'm using emscripten btw
12:20:54*Ven`` joined #nim
12:22:00yglukhov[m]I don't think so. I'd just format the string on the nim side, and then pass it alone to console.log.
12:22:14zacharycarter[m]:thumbsup: thank you sir - good idea
12:28:34*xylef quit (Ping timeout: 260 seconds)
12:47:08FromGitter<Yardanico> btw, about exercism - https://github.com/exercism/nim/pull/99#issuecomment-406823642
12:47:48miran@Yardanico woohoo!!
12:48:09mirannim, the language with the largest logo :D :D
12:49:42FromGitter<Yardanico> xD
12:53:22Calinouhmm, I did some testing comparing `nim c` versus `nim cpp`
12:53:29Calinoubinaries generated using `nim cpp` are slightly larger and slower
12:53:58Calinou(it's also slightly longer to compile)
12:58:10dom96"My logo is bigger than yours!"
12:58:21FromGitter<Yardanico> maybe they didn't change it to be transparent
12:59:12FromGitter<Varriount> Calinou: Have you had the chance to any debugging to find out why?
12:59:18FromGitter<Varriount> *to do
12:59:23CalinouI don't know how I could debug this
12:59:27Calinouthe C version is plenty fast anyway :)
12:59:42FromGitter<Varriount> Probably use some sort of C/C++ profiler.
12:59:42Calinoubut I wanted to see if the C++ version was smaller/faster by any chance
13:00:10FromGitter<Varriount> Calinou: Have you turned on link-time-optimization?
13:00:21miran@Yardanico please mentor my solution(s) :D
13:00:34Calinouno… how do you do that with Nim?
13:00:38FromGitter<Varriount> For Nim, that usually makes the file size smaller. It might also make it faster for the C++ backend.
13:00:45FromGitter<Varriount> Calinou: What C compiler are you using?
13:00:49CalinouGCC
13:01:56FromGitter<Varriount> Calinou: Try adding `--passc:"-flto"` to the Nim compiler command
13:03:09Calinouthe binary is smaller, and just as fast, nice :)
13:03:24CalinouI see a warning when linking though: https://hastebin.com/utayahesiw.txt
13:04:05Calinou(binary is 178 KB, 79 KB in a .zip, 65 KB in a .tar.xz archive! that's quite impressive)
13:05:35FromGitter<Yardanico> you may also try upx
13:05:55Calinouat this point, I don't need it :P plus, it causes false positives in antiviruses on Windows
13:06:29FromGitter<Varriount> Calinou: Hm, I suspect then there might be some sort of overflow error in a strutil call somewhere.
13:06:30FromGitter<Yardanico> does it?
13:06:45FromGitter<Yardanico> @Calinou and yeah, if you need optimizations for size, you can use opt:size
13:07:09FromGitter<Varriount> Plus, UPX is bad for runtime memory. It prevents the OS from using various paging optimizations to reduce memory usage.
13:08:19Calinouif I use --opt:size with LTO, the original stripped binary weighs 129 KB, 56 KB in a .zip and 46 KB in .xz :D
13:16:54*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:18:58Calinouis there documentation on using MinGW to cross-compile for Windows?
13:19:20Calinou(I'm setting up Travis CI for uploading releases)
13:32:37*clyybber joined #nim
13:38:32*rockcavera quit (Ping timeout: 276 seconds)
13:47:35*Ven`` joined #nim
13:50:57*yglukhov[i] quit (Ping timeout: 240 seconds)
13:52:29*BitPuffin joined #nim
13:52:50*BitPuffin quit (Remote host closed the connection)
13:53:17*BitPuffin joined #nim
13:54:03*yglukhov[i] joined #nim
13:56:56FromGitter<Varriount> Calinou: I would look at documentation on cross-compiling C code first.
14:00:38Calinoualso, wow… the binary I compiled on Fedora 28 works on a fresh Ubuntu 14.04 VM
14:00:53CalinouI thought glibc would have bit me already :P
14:03:43stefanos82laugh and cry with me people...we live in the middle of 2018 and glibc still uses K&R internally...I don't know how to react! O.o https://sourceware.org/git/?p=glibc.git;a=blob;f=string/strlen.c;hb=HEAD
14:04:59Calinoumaybe we can do more productive things than laughing and crying over code style?
14:05:10Calinouthe JavaScript community is starting to understand this :)
14:05:17Calinou(thanks to Prettier)
14:07:18FromGitter<alehander42> @zacharycarter https://github.com/pragmagic/karax/blob/master/karax/karax.nim
14:07:20FromGitter<alehander42> look at kout
14:07:36FromGitter<alehander42> i also didnt know how before i saw it there
14:10:12FromGitter<alehander42> but i have no idea if this works for ermscripten :D
14:12:59*TheLemonMan joined #nim
14:13:06stefanos82Calinou: true, but what I wanted to point out is that the very first standard came out in 1989 and now we have 2018 and they are in the process to release a bugfix as the next standard, named C17
14:13:07FromGitter<alehander42> and i am not sure how does .varargs. work in general
14:13:30Araqstefanos82: that's not K&R.
14:13:46Araqsize_t STRLEN (const char *str)
14:13:50stefanos82Araq: which part exactly?
14:13:53Araqis a prototype
14:13:58TheLemonMandoes anyone have a windows/osx box and is willing to test some code?
14:14:21Araqand prototypes were added in the Ansi standard, K&R lacked it
14:14:41stefanos82Araq: actually I pasted the wrong link lol
14:15:17AraqTheLemonMan: ok
14:16:08TheLemonManAraq, cool, here's the link: https://github.com/LemonBoy/criterion.nim you should try to execute the example snippet in the readme
14:20:22stefanos82Araq: that's the link I should have pasted before, but copied HEAD version somehow O.o
14:20:23stefanos82https://sourceware.org/git/?p=glibc.git;a=blob;f=string/strlen.c;h=5f22ce95097d4090c6c32fc7cf6c2ef9cf6e86a8;hb=24c0bf7a76ecec65aca0dbce1f7ebb8f68425dc2
14:26:05*xylef joined #nim
14:26:56Araqcriterion/impl.nim(8, 17) Error: cannot open file: criterion/timer
14:28:25Araqyou need to use relative addressing, impl.nim is already in "criterion" and so should import "timer", not "criterion/timer"
14:28:46TheLemonManoh, I wonder why it is working here
14:34:07*xylef quit (Ping timeout: 244 seconds)
14:44:50FromGitter<Yardanico> @TheLemon I can try on windows it you still need it
14:44:55FromGitter<Yardanico> @TheLemonMan
14:45:45TheLemonManYardanico, the more the merrier, I also need some feedback on the api design
14:48:21*ng0 joined #nim
14:55:04FromGitter<Yardanico> @Calinou there's no documentation about MinGW cross-compilation but it's very easy
14:55:32FromGitter<Yardanico> Nims example (works for macos/linux, ignore comments): ⏎ https://github.com/vk-brain/Nickel/blob/master/src/nickel.nims#L21
14:55:54FromGitter<Yardanico> So after you add that to your config you can just do `nim c -d:crosswin myfile.nim`
15:05:56Calinouis the .nims file used automatically?
15:06:56FromGitter<Yardanico> if it has the same name as your .nim file - yes
15:07:08FromGitter<Yardanico> (in this case main file of my program is nickel.nim)
15:07:25Calinouok, thanks :)
15:11:18TheLemonManany news from the windows land?
15:15:19*nsf quit (Quit: WeeChat 2.1)
15:38:14*clyybber quit (Ping timeout: 268 seconds)
15:40:01*edcragg quit (Quit: ZNC - http://znc.in)
15:40:14*TheLemonMan quit (Quit: "It's now safe to turn off your computer.")
15:40:19*edcragg joined #nim
15:49:11*yglukhov[i] quit (Remote host closed the connection)
15:51:00*yglukhov[i] joined #nim
15:55:33*yglukhov[i] quit (Ping timeout: 264 seconds)
15:55:34*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:05:13*nsf joined #nim
16:41:47*skrylar joined #nim
16:42:06skrylarboop
16:46:46*clyybber joined #nim
16:47:00*clyybber quit (Client Quit)
16:49:56FromGitter<viniarck> Hi guys. What's the recommended way to tell nimble to compile my binary with a different name than the file name itself? For example, I have, `bin = @["myPackage/main"]`, I want to keep main.nim but I want my binary to be named something else. Should I use the before and after hooks to accomplish this?
16:50:29FromGitter<Quelklef> why not just `nim c myPackage/main & mv myPackage/main myPackage/newName`?
16:51:12skrylari think nimble is opinionated in this manner
16:51:22FromGitter<viniarck> Trying to see if there's a way to use only nimble for this
16:57:16*yglukhov[i] joined #nim
16:58:02FromGitter<kaushalmodi> create a nimble task and call that `nim c` command + `mv` in there
16:58:33FromGitter<kaushalmodi> then instead of `nimble build`, do `nimble <mytask>`
16:59:13*xylef joined #nim
16:59:14FromGitter<kaushalmodi> though, not sure how `nimble install` will work with that. dom96?
16:59:15FromGitter<Vindaar> isn't the `--out` compiler flag precisely for this?
16:59:43FromGitter<kaushalmodi> yes! Use `--out` instead of `mv`
17:00:35FromGitter<kaushalmodi> may be you have have a nim.cfg for your project where you specify the `--out`. Then you don't need that custom nimble task. I have read about nim.cfg, but am hazy on how to configure it as I haven't yet used it personally
17:00:44FromGitter<kaushalmodi> *may be you can have a ..
17:01:52FromGitter<kaushalmodi> @viniarck relevant: https://forum.nim-lang.org/t/3939
17:03:17dom96nimble task won't work with `nimble install`
17:03:30dom96after task could work
17:03:37dom96`--out` inside nim.cfg might also work
17:03:41dom96but I've never tried it
17:03:59FromDiscord<r00ster> is there some way to multiplicate a string? so that I can make a "hellohellohello" out of one "hello"?
17:04:12FromDiscord<r00ster> is there some efficient way to multiplicate a string? so that I can make a "hellohellohello" out of one "hello"?
17:04:50FromGitter<Vindaar> r00ster: https://nim-lang.org/docs/strutils.html#repeat,string,Natural
17:05:50FromGitter<viniarck> Thanks @kaushalmodi, @Vindaar @dom96, I'll try the --out flag with the .cfg file
17:05:50FromDiscord<r00ster> ah ok
17:25:18FromGitter<mratsim> @tim-st in the past you couldn’t do `type Foo = ref object` you had to declare in 2 steps
17:32:22FromGitter<Quelklef> How can I do something like `readLine(stdin)` that doesn't halt execution but instead just returns `""` if there was no input?
17:32:38FromGitter<Quelklef> i.e. some function to see what the user has entered into the terminal since the last call to the function
17:35:28Calinouit's working!! https://github.com/Calinou/clr/releases
17:38:34FromGitter<kaushalmodi> Calinou: Is that a statically linked Linux binary?
17:38:48*yglukhov[i] quit ()
17:40:33FromGitter<Varriount> yglukhov: I think I'm going to close that high/low tuple PR.
17:40:35Calinouhttps://hastebin.com/opurenekim.txt
17:40:39Calinouworks in Ubuntu 14.04 VM too :)
17:40:48CalinouI just compiled it with the default settings from a Fedora 28 image on GitLab CI
17:40:58Calinouthe binary is uploaded using gothub
17:41:02Calinouhttps://github.com/Calinou/clr/blob/master/.gitlab-ci.yml
17:41:47FromGitter<kaushalmodi> Calinou: Yes, I saw that. But I don't know what your args to `nim` mean in there..
17:41:49FromGitter<kaushalmodi> `--passc:"-flto" -y`
17:41:52FromGitter<Varriount> @Quelklef Hm. Doing that in a cross-platform way is tricky.
17:42:06FromGitter<Quelklef> @Varriount No problem, only need it for Linux
17:42:28FromGitter<Varriount> It might be easier just to use a thread and channel to call readline
17:42:29Calinouit enables link-time optimization
17:42:42Calinou(smaller/faster binary, at the cost of slower linking and increased RAM usage while linking)
17:42:43FromGitter<Quelklef> Not familiar with channels. What do you mean?
17:42:50Calinou-y accepts all prompts :)
17:42:57FromGitter<kaushalmodi> Calinou: Understood, thanks :)
17:43:10FromGitter<kaushalmodi> I'm looking for a recipe for static linked binary deployment.
17:43:31FromGitter<kaushalmodi> I thought this was that. But I like your deployment yml. Thanks for sharing.
17:46:22*krux02 joined #nim
17:50:13krux02Araq: Is it intentional that this code doesn't compile anymore http://ix.io/1i6j
17:52:01*xylef quit (Ping timeout: 248 seconds)
17:54:30krux02I think it comes from the goal to remove `nil` as a valid stade for a NimNode. But it also makes it kind of hard to deal with nil in NimNode.
18:00:25*yglukhov[i] joined #nim
18:00:31*ng0 quit (Quit: Alexa, when is the end of world?)
18:06:21FromGitter<Varriount> @Quelklef Have one thread whose sole purpose is to read lines from the terminal. Have it send lines to the main thread via a channel.
18:07:21FromGitter<Quelklef> Ah, hmmm
18:07:46FromGitter<Quelklef> as in just a `while true: let val = readLine(stdin); sendToMain(val)`
18:07:52FromGitter<Quelklef> ?
18:10:41FromGitter<Varriount> Yep
18:10:53*krux02 quit (Read error: Connection reset by peer)
18:10:59FromGitter<Varriount> Though, that only works if you want complete lines.
18:10:59Calinou@kaushalmodi the binary isn't 100% static, but from my testing, it should work out of the box on most desktop/server Linux distributions
18:11:02Calinoubarring Alpine, I guess
18:11:26CalinouI'm still surprised, I thought I'd get a glibc error when trying to run the binary on Ubuntu 14.04
18:11:31FromGitter<Quelklef> I don't care about complete lines or not. Thank you @Varriount !
18:15:51skrylarwhy wouldn't it work on alpine? did you do something glibc specific
18:16:22FromGitter<Varriount> @Quelklef you can also do the same thing, but using read (1) instead of readline
18:18:02FromGitter<Quelklef> Cool
18:18:56Calinouhow can I set an environment variable for the current process in Nim?
18:26:32*krux02 joined #nim
18:28:01Calinou@Yardanico looks like the .nims is working, but it tries to call GCC with an .exe extension, which doesn't work on Fedora with the system-provided GCC
18:28:05Calinou(the binary doesn't have an .exe extension)
18:40:36Calinouit works if I create a symlink corresponding to the name requested by the Nim compiler
18:40:41Calinoubut I'd rather not do that if possible :P
18:41:48skrylarit looks like dear imgui is aligning itself now to debug uis instead of general use :ponders:
18:41:57Calinouit has been doing so for a while now
18:42:07Calinouskrylar: I thought Alpine could only run binaries linked to musl
18:42:53skrylarCalinou, i still hear general advocation for immediate guis so i still try to find things on why it should be used, although it does seem great for the debugging niche
18:43:11skrylarand yes alpine prefers you use musl; is nim not compatible with muscl?
18:43:30Calinouit is (there's a Docker image for Nim using Alpine)
18:44:36skrylari have wondered for some time if what really bothers people is all the connector code
18:45:03skrylarlike, i could just provide an API that looks like dearimgui but emits FLTK objects (and instead of called every frame, just hooks up cobweb/FRP triggers silently)
18:45:49skrylarshrug.
18:45:57skrylarCalinou, are you doing something explicitly incompatible with muscl at the moment?
18:46:05Calinounot that I know of
18:46:12skrylari don't see the problem then :3
18:46:27CalinouI just haven't looked into building a library linked to musl
18:46:41Calinoubut all I need is a binary that runs well on old distros, and Nim + glibc seems to handle that well out of the box, surprisingly
18:46:52skrylari want to say its binary compatible, but i can't say that authoratatively
18:47:14skrylarits SUPPOSED to be drop-in compatible, but not "bug compatible" [sic]
18:48:54*Jesin quit (Quit: Leaving)
18:49:13Calinou…except in applications linking to libGL :(
18:49:19Calinouthanks NVIDIA
18:50:04skrylarhrm. never tried to use gl on alpine
18:52:39*Jesin joined #nim
18:55:21*yglukhov[i] quit (Remote host closed the connection)
19:04:42Calinouattempting cross-compiling on GitLab CI now :)
19:04:50CalinouLTO works too
19:07:51FromGitter<kaushalmodi> Calinou: I happen to have to use a really old OS: RHEL 6.8
19:08:30FromGitter<kaushalmodi> It's glibc is older than that on modern unix type OSes
19:08:51skrylarbut the stability :)
19:09:41skrylaractually as much crap as i give centos and friends for being out of date, the slower moving target actually IS useful for people who have better things to do than continuously chase down CI bugs
19:11:17Calinou... clr.nims(9, 22) Error: undeclared identifier: 'findExe'
19:11:20CalinouI'm getting this in CI
19:11:25Calinouwas findExe added after 0.18.0?
19:12:34Calinouhttps://gitlab.com/Calinou/clr/-/jobs/83533521
19:12:42Calinou…no, it wasn't
19:16:25FromGitter<Varriount> Are you in importing the right modules?
19:16:30Calinouit works locally :p
19:16:41Calinouhere's the NimScript: https://github.com/Calinou/clr/blob/master/src/clr.nims
19:27:31FromGitter<Varriount> Calinou: I believe you need to import ospaths.
19:27:57CalinouI'll try that, thanks
19:29:42*Ven`` joined #nim
19:31:35FromGitter<tim-st> @mratsim thanks
19:35:21Calinounope :( https://gitlab.com/Calinou/clr/-/jobs/83535317
19:35:23Calinousame error
19:38:25CalinoufindExe is part of `os` apparently
19:42:25FromGitter<Varriount> Oh, you're not using the devel branch?
19:42:33skrylarbleh, reading that exception thread
19:42:50skrylarmethinks someone has become blinded by the "must do what embedded coders do" lens
19:43:03CalinouI can build from devel if needed
19:43:06CalinouI'm using choosenim already
19:46:42CalinouI get something different when importing os: https://gitlab.com/Calinou/clr/-/jobs/83536049
19:46:47Calinou> lib/posix/posix_linux_amd64.nim(599, 3) Error: cannot 'importc' variable at compile time
19:46:58*yglukhov[i] joined #nim
19:52:20Araqskrylar: what works on embedded works everywhere
19:58:14skrylarshort version: 1) the line of reasoning "average people don't use the right error type" is effectively "average people are bad, so no fun allowed" and is the same argument used to suppress macros in every other language, and 2) i guess i just need to do a personal analysis of what the direction of "no GC, mobile-first design" offers and if i still care about that
19:59:07skrylari am biased because i believe Lisp and Smalltalk handle errors more correctly (ex. having explicit continue points) than the C++ model
19:59:48*nsf quit (Quit: WeeChat 2.1)
20:03:26Araqwhere do I make the argument "average people don't use the right error type"?
20:04:43AraqI don't understand your "having explicit continue points" remark
20:06:43skrylarhttps://github.com/nim-lang/Nim/issues/8363#issuecomment-406189955
20:07:11skrylar> Custom" exceptions are just sophistry and work against composable systems, from the paper: [..] In fact, the "custom" exception DbError is worse than the more generic SyntaxError
20:08:04skrylarthe remark about continue points is that lisp (more than smalltalk, but also) smalltalk not only have custom errors, but these can be either handled with a "oh wait, let me fix that" or trigger other behavior in a dev environment like "you called a nonexistent method, create it?"
20:09:29*aziz joined #nim
20:10:19AraqI don't read "average" anywhere in that.
20:10:29AraqDbError is in the stdlib.
20:10:45Araqall the things I don't like are in the stdlib
20:11:41Araqand the quote refers to what was found in other languages. if almost nobody gets it right, then it's a good argument for changing things
20:12:07Araqthis has nothing to do with any "appeal to the masses" or "preventing bad programmers from themselves"
20:12:58Araqprogramming languages are for human beings, the machine only requires assembler code to be written.
20:14:18skrylari'm not going to bother with this crap. it's your language, you do what you want with it
20:20:53Araqsure but I'm also listening to the community which includes you.
20:34:53*miran quit (Quit: Konversation terminated!)
20:42:27*byte512 quit (Quit: Bye.)
20:47:58*Ven`` quit (Read error: Connection reset by peer)
20:48:28*Ven`` joined #nim
20:48:52FromGitter<viniarck> I didn't find async implementations of the {read,write}File methods on the asyncdispatch library. So, probably threads are the way to go?
20:49:57Araqwe have asyncfile in the stdlib but Linux doesn't have async file IO or something
20:50:29FromGitter<viniarck> I see. Thanks for pointing that out.
20:50:59FromGitter<rayman22201> wat? http://man7.org/linux/man-pages/man7/aio.7.html
20:51:32FromGitter<rayman22201> maybe it just hasn't been implemented in the async lib yet?
20:51:38stefanos82Araq: most of the time you remind me of Bjarne. Your justifications are always straight on point and make me think twice or even thrice before I ask a question and still I make myself look like a complete idiot (lol) next to your greatness of knowledge around language design and implementation
20:52:29FromGitter<rayman22201> @Araq seems much nicer / has a better sense of humor than Bjarne :-P
20:53:14Araqrayman22201: I hope Linux improved but when I researched it, even Node.js used a background thread for "async" file IO on Linux.
20:53:44*xet7 joined #nim
20:54:04Araqwell thank you. Bjarne is a respectable man.
20:55:38stefanos82rayman22201: Personally I like Bjarne's humor; I found him hilarious most of the time when he jokes or goof around his presentations :D
20:56:36FromGitter<rayman22201> lol. “Remember the Vasa!” was pretty good
20:56:37stefanos82Araq: I wish I met you back in my college days when I needed a programming mentor. Anywhere I looked for one I would get rejection and turning backs instead
20:56:49Araqalso, I know for a fact now I'm not a nice person. :-)
20:57:03stefanos82Araq: nobody's perfect
20:59:24Araq(just ask kaushalmodi)
21:00:34*byte512 joined #nim
21:00:54*aziz quit (Ping timeout: 260 seconds)
21:03:09*Vladar quit (Quit: Leaving)
21:06:01FromGitter<rayman22201> @Araq reading more about async io on linux. apparently async io is in newer kernels (>2.5), but it sucks. and the glibc verison uses posix threads anyway? lame :-( http://kkourt.io/blog/2017/10-14-linux-aio.html
21:07:24Calinoudoes anyone know why importing `os` in a NimScript file results in "Error: cannot 'importc' variable at compile time"?
21:07:27CalinouI need it to use findExe() there
21:08:01Araqnimscript only support ospaths.nim
21:08:12Araqwhich is in fact the reason for this ospaths vs os split
21:08:20CalinouI see
21:08:44Calinou"Include file that implements 'osErrorMsg' and friends. Do not import it!"
21:08:58Calinouwhat's strange is that it seems to be done automatically on my local install, but not on GitLab CI
21:13:38*aziz joined #nim
21:14:42CalinouI'll hardcore the GCC path for now and see
21:14:53*skrylar quit (Quit: Leaving)
21:23:41stefanos82Araq: when I read dom96's book, the last chapter which was on metaprogramming was really fascinating, especially the macros' part. What I have noticed is that it was executing first the macros' output and then was attempting to compile the generated C code.
21:23:49*aziz quit (Read error: Connection reset by peer)
21:23:59stefanos82is it possible to work around metaprogramming, like macros without emitting C code?
21:40:09*aziz joined #nim
21:41:01krux02stefanos82, I think you don't quite get it.
21:41:03*Ven`` quit (Quit: q+)
21:41:13stefanos82krux02: I guess I don't
21:41:27krux02Nim by default compiles to C because it is a very reasonable compile target
21:41:44krux02there are really a lot of C compilers out there that target lot's of different platforms
21:42:02krux02much more than if you would for example just compile with a gcc or llvm frontend
21:42:13stefanos82lol what are you talking about krux02? did you really read my question?
21:42:34krux02well you talk about metaprogramming and emitting C code
21:42:41stefanos82read my question again
21:42:42krux02these two things have nothing to do with each other
21:43:41krux02stefanos82, you are free to reformulate the question.
21:43:55krux02if you don't want to be misunderstood.
21:44:19stefanos82as I said, I was working on metaprogramming examples from Nim in Action
21:44:29krux02yes
21:44:55stefanos82while I was doing so, I have noticed during my "nim c -r foo.nim" command, the output was thrown first and then the code would attempt to compile the C code
21:45:32krux02the compiler compiles the c code, not your code.
21:45:34stefanos82what I asked is whether there is a way to work on the metaprogramming part without emitting C code, purely for testing purposes and when I want to, to choose C or C++
21:46:10krux02you can't choose/influence the compilation target from macros
21:46:24krux02the compilation target is a command line argument to the compiler
21:46:46krux02and for the macros the compilation target also should not matter that much
21:47:22krux02but you can work in just the NimVM if that is what you want
21:47:38krux02just put all your code in a ``static:`` block
21:47:40stefanos82when you say NimVM?
21:47:56krux02all macros are executed on the NimVM
21:48:11stefanos82OK, and what should be my command of execution? nim ...?
21:48:20stefanos82without c or cpp ?
21:48:24krux02just nim c
21:48:35krux02it will create a c file and compile that
21:48:45krux02but the program won't do anything
21:48:58krux02wait, maybet there is a better opiton
21:49:02stefanos82so it has to generate C code, even if that code is plain void?
21:49:10yglukhov[i]stefanos82: you can't "not compile anything" to play with the macros :).
21:50:08yglukhov[i]you can use --compileOnly nim flag which will prevent from calling CC. the c sources will still be generated.
21:50:13krux02--compileOnly
21:50:21stefanos82I see
21:50:28stefanos82let me try that
21:50:42krux02nim check
21:51:11krux02to "check" the project, macros have to be evaluated
21:53:57stefanos82I think I'm doing something wrong with -c | --compileOnly: it throws an error: Error: invalid command src/foo.nim
21:54:04stefanos82I tried nim -c src/foo.nim
22:00:18stefanos82oops, I forgot to add a c right before -c lol
22:00:28stefanos82yeah, it works as expected! ^_^
22:00:49FromGitter<kayabaNerve> Sometimes I hate C.
22:00:59*aziz quit (Ping timeout: 260 seconds)
22:01:46stefanos82say that after you try C++ lol
22:01:59FromGitter<kayabaNerve> I have ⏎ ` ⏎ {.compile: "Argon2/src/argon2.c".} ⏎ {.compile: "Argon2/wrapper.c".} ⏎ ` ... [https://gitter.im/nim-lang/Nim?at=5b54fed6b2411177a264237c]
22:01:59stefanos82I have tried to test the latest standards and lost my mind
22:02:39FromGitter<kayabaNerve> stefanos82: I sometime's hate Nim's C FFI yet I'm polite enough to acknowledge it isn't Nim itself versus me/C being old and archaic.
22:02:47FromGitter<kayabaNerve> And I started with C++
22:03:32FromGitter<kayabaNerve> Basically, Nim appears to be linking everything, however the C file isn't getting it.
22:03:52stefanos82in order to use C correctly, you have to be extremely careful and most of the time use C's extensions like GCC's to make your program work as expected
22:05:27stefanos82where does argon2.h resides kayabaNerve?
22:06:23FromGitter<kayabaNerve> ... I hate this part
22:06:28FromGitter<kayabaNerve> ../../src/lib/Argon2/src/argon2.h
22:06:36*yglukhov[i] quit (Remote host closed the connection)
22:06:36FromGitter<kayabaNerve> nimcache = ~/build/nimcache
22:06:47FromGitter<kayabaNerve> argon2.h = ~/src/lib/Argon2/src/argon2.h
22:06:58FromGitter<kayabaNerve> GCC Effective? ../../src/lib/Argon2/src/argon2.h
22:08:54*brainproxy joined #nim
22:09:45stefanos82kayabaNerve: OK, where do your .nim files reside then?
22:09:58stefanos82we need to make sure the --path is set on the right path
22:10:15FromGitter<kayabaNerve> I don't use any paths; just pragmas
22:10:34stefanos82well, you have to help Nim to detect the location of your C code
22:11:02FromGitter<kayabaNerve> I do
22:11:06FromGitter<kayabaNerve> Via the pragmas
22:11:28stefanos82what about the rest of ../src/lib then?
22:12:21FromGitter<kayabaNerve> What about it?
22:12:50stefanos82now I got curious. can you provide the project's structure?
22:13:41FromGitter<kayabaNerve> Sure but I want to try something first lol
22:13:50stefanos82no worries
22:18:50FromGitter<kayabaNerve> What do I use to map a uint32_t? cint, cuint, or int32?
22:22:30FromGitter<Varriount> What is it used for?
22:22:44krux02uint32_t is just uint32
22:23:09FromGitter<kayabaNerve> @Varriount Binding
22:23:33FromGitter<kayabaNerve> I think it's explicit due to the fact it's a cryptography lib and therefore bitwise?
22:25:02CalinouI present to you, after a few dozen amended commits, https://github.com/Calinou/clr/releases
22:25:08CalinouI tested the Windows binary in WINE
22:25:13Calinouit works :) I do have to ship pcre64.dll with it though
22:25:16Calinou(it's included in the ZIP)
22:28:37krux02congratulations.
22:28:57krux02I am just sceptical. Is a command line program really suitable to operate on color?
22:30:14krux02I mean most of the time you want to process millions of color values like in a photo or in real time graphics. Sometimes you operator on colors for syntax highlighting, but even there you have so many colors that you would not want to insert them manually on a command line, or even stare a new system process for each individual color.
22:30:47FromGitter<kayabaNerve> stefanos82 Yo
22:30:57stefanos82sup
22:31:26krux02Calinou, I think to make this tool usful for the command line, you should really read colors from stdin
22:31:46krux02you can keep the format, but that way you can convert an entire list of colors
22:31:50Calinoukrux02: it's not a library, it's an utility application :)
22:32:04Calinouinteractive mode isn't a bad idea, but I personally don't need it
22:32:22Calinouthat said, I might add ways to generate color palettes or something
22:32:37CalinouI could make the `info` subcommand accept several colors and display them all too
22:32:56FromGitter<kayabaNerve> https://gist.github.com/kayabaNerve/4550a6d0587ef7e6c019925fb25d787b
22:32:57krux02I don't want to make it interactive, I just think the use case is very very small. But anyway, it is good that you accomplished what you wanted to accomplish.
22:33:00CalinouI'll also make the manipulation colors display the original color for comparison
22:33:08FromGitter<kayabaNerve> There's a Gist of the Project Repo and erro
22:33:16Calinouit's not very small for me :) I find myself wanting to input HSL colors in applications *all the time*
22:33:24Calinou(when they only accept hexadecimal or RGB values)
22:33:31FromGitter<kayabaNerve> And I put it in a Gist to try to stop sharing the repo so much here, but guess what? Gitter printed the entire thing in chat for me. Lol
22:33:35Calinouit's a niche use case, but it's a niche I wanted to fill
22:33:54krux02Calinou, I think to make this tool kind of useful, I think about it to work similar to sed: detect colors on stdin transform them and wrtie them out again
22:34:36krux02and then you can reat the contents of a colorscheme in any textural format, apply an operation on it and just use the transformed color scheme
22:34:41dom96Calinou: Needs a macOS release :P
22:34:41*BitPuffin quit (Remote host closed the connection)
22:35:10dom96Of course, installing via Nimble is simple
22:35:20dom96nimble install https://github.com/Calinou/clr.git
22:35:24dom96You can update your readme to just that
22:35:45CalinouI'll publish it on Nimble in due time
22:35:50Calinouas for macOS… I'll need to set up Travis
22:35:57Calinou(GitLab CI does not offer macOS instances, unfortunately)
22:36:41Calinoukrux02: accepting from stdin makes sense for CLI apps, but these usually don't use standard formats for colors, do they?
22:36:53Calinou(e.g. ImageMagick)
22:37:42dom96Guess my terminal doesn't support true color
22:37:50krux02Calinou, that is the reason you should have to option pass the input format and output format with som sort of pattern.
22:37:53dom96Otherwise it's working well
22:38:13Calinou"export COLORTERM=truecolor"
22:38:18dom96Case sensitive `-V` for version is odd
22:38:25FromGitter<kayabaNerve> Oh. Meant to say stefanos82. I am on devel. Maybe 1.5 weeks old at this point
22:38:32krux02no environment variables please
22:38:32Calinouyou need to set the variable, Nim's enableTrueColors() isn't effective if that variable is not set
22:38:33krux02they suck
22:38:39Calinouit's on Nim's side :)
22:38:39dom96Calinou: No change
22:38:47CalinouTerminal.app does not support truecolor, but iTerm2 does
22:39:02Calinouhttps://gist.github.com/XVilka/8346728
22:39:07dom96ahh, too lazy to get iTerm2
22:39:16Calinoudom96: oh, you can nimble install from Git repo URLs? that's great
22:39:19stefanos82kayabaNerve: did you figure out what was the problem?
22:39:24dom96Calinou: yep
22:39:30krux02dom96: do you need help on porting you workflow over to Linux?
22:39:35CalinouI can add a lowercase -v option since I don't use -v for "verbose"
22:39:41dom96krux02: hrm?
22:39:47Calinoubut if I ever add a verbose mode, I'd need to break it :(
22:40:25dom96Nah, I hate that python doesn't give its version when I write `python -v`
22:40:40dom96Instead of launches dumbly with verbose mode
22:40:41Calinouyeah, same
22:40:49Calinousome apps use -V, some use -v
22:41:00FromGitter<kayabaNerve> Nope
22:41:01Calinousupporting both is an easy way to make everyone happy, but it means you can't use it for verbose mode :P
22:41:03FromGitter<kayabaNerve> I still need help
22:41:09krux02Will prevent you from nasty surprises like "ah next version no OpenGL support. Next version we drop support for headphone jacks. Next version we drop support for usb. Next version we stop supporting Keyboards. Next version we stop supporting mice.
22:41:10dom96Nim/Nimble support both :P
22:41:23dom96because case insensitivity ftw
22:41:28FromGitter<kayabaNerve> The Nim file is also saying it's redefining itself but I figured I'd fix c first and that'd go away
22:41:29Calinoualso, you can get iTerm2 from Homebrew
22:41:34Calinouit takes one line to install it that way :P
22:41:34krux02:P
22:41:59dom96krux02: Lol. I feel like you're assuming that I'm a Linux noob
22:42:05dom96I've used Linux for many years
22:42:17dom96Still do of course
22:42:17FromGitter<kayabaNerve> Steam :(
22:42:19krux02then why did you change to macos?
22:42:48dom96Because I needed a new laptop and with student discount a MacBook Pro was an incredible deal
22:43:08krux02but you can install Linux on a MacBook, too.
22:43:12krux02It's a free upgrade.
22:43:17krux02:P
22:43:17dom96Yeah, that sounds like fun
22:43:58dom96I prefer to get shit done not get pissed off every time I boot up my machine after an upgrade
22:44:22krux02yea the very reason to use Linux
22:44:31FromGitter<kayabaNerve> Tbh Chromebook + crouton is amazingly functional
22:44:32krux02at least on the right distro
22:44:46FromGitter<kayabaNerve> I did that years ago just to have something and I developed a lot on it
22:45:03FromGitter<kayabaNerve> Ofc, you want an x86 one and those are discontinued
22:45:12krux02kayabaNerve: It is not just about funcitional. I haven't tried chromeos, but with that stuff you are so much tied into the google shit.
22:45:21krux02With macos you are tied into Apple shit
22:45:29CalinouLinux on MacBooks is becoming more and more complicated with every new laptop
22:45:31krux02and with Windows you are tied to Microsoft shit
22:45:50CalinouI don't agree that you're tied to Apple/Microsoft with Windows or macOS. You can use only traditional apps if you wish
22:45:52krux02everybody tries to track you down and abuse their power if they can.
22:46:03CalinouI can play the same games, use the same CLI/GUI apps on Windows and macOS for the most aprt
22:46:04Calinoupart*
22:46:35dom96There is a lot dumb shit about macOS
22:46:43dom96But honestly, it's the best of the bunch.
22:46:58krux02Calinou, it is not about playing the same games and apps. It is about the fact the the core is corruped.
22:47:11krux02Windows has advertisement in the start menue
22:47:15dom96That said, I haven't tested Windows recently on a laptop. I would be tempted to give the Surface Book a chance
22:47:29FromGitter<kayabaNerve> Krux02: Crouton installs Linux in a chroot.
22:47:40FromGitter<kayabaNerve> You can also override chromeos entirely.
22:47:47FromGitter<kayabaNerve> I was saying the hardware is great for the price
22:47:56FromGitter<kayabaNerve> You can even install macos El Capitan
22:48:05krux02I can only recommend to anybody who has a computer to install Manjaro.
22:48:26dom96Hehe. I've been there and done that with Chrome OS and Crouton as well.
22:48:29stefanos82I'm quite pleased with XFCE to be honest with you
22:48:37dom96Got an HP Chromebook, which to be fair is a shitty machine.
22:48:44krux02I use xfce for many years now.
22:48:45stefanos82I used to use Mint, but they had a serious bug that would consume all my memory and replaced it with XFCE
22:48:58krux02it is the most boring desktop environment in a positive way.
22:49:15krux02I don't want a new exciting way to start my application that I have been using for years
22:49:21krux02I want that it works like yesterday
22:49:32stefanos82why did I say mint?! I meant MATE
22:49:54stefanos82I miss GTK 2.2x series
22:50:01stefanos82those were the best days of my life
22:50:05dom96Pff, Manjaro. Back when I used Linux all you had was Arch
22:50:21stefanos82Debian testing for the win, woooooooot!
22:50:43CalinouI'm on Fedora these days, I used Manjaro, Antergos, Debian testing, Xubuntu, Ubuntu in the past
22:50:48krux02I used open suse with kde 3 I think 10 years ago.
22:50:58krux02more than 10 years
22:51:12krux02KDE 3 was really great back then.
22:51:31krux02And I think if they never had started with the KDE 4 branch I would still be using kde
22:51:35stefanos82should we take this conversation to #nim-offtopic?
22:51:38stefanos82we could continue there
22:51:45krux02nah
22:51:57krux02we just continue here until someone actually has a nim question and then we stop
22:52:00dom96Nobody is talking on-topic so indeed, nah
22:52:17Calinou"btw I use arch"
22:52:20dom96But anyway, I used to be really opposed to macOS
22:52:27dom96Until I was actually forced to use it for a while at work ;)
22:52:27stefanos82I such a traitor these days -_- I'm revising both C++ and PHP knowledge for interviews and I feel awful
22:53:28CalinouI write code in a lot of languages: https://codestats.net/users/Calinou
22:53:32CalinouNim already surpassed Go and Rust :D
22:53:37dom96I shudder to think how awful the MBP touch pad is on Linux
22:53:48krux02I use arch on this laptop, too. But the overall experience of Manjaro is better. In the beginning I did not like that they "filter" the arch packages and therefore it is not a trie "Arch". But they actually solves problems for you, so that you are allowed to care less about the operating system you are working on.
22:54:10krux02this laptop is just historically an Arch laptop
22:54:26krux02I don't know when I installed Arch on it. But it was many years ago.
22:54:33stefanos82Calinou: I don't consider myself a passionate programmer as I used to see myself as one. I'm more of a problem solver, that's all
22:54:40Calinousame for me
22:54:59stefanos82you are better than me; you code a lot
22:55:00stefanos82I don't
22:55:29CalinouI'm not better than you :)
22:55:33stefanos82I'm still regretting for making technology my profession
22:55:43krux02I still kind of passionate about what I do.
22:55:50CalinouI don't consider myself an expert in programming
22:55:55dom96stefanos82: It's never too late to change tracks
22:55:58krux02But in the end it is problem solving.
22:56:03stefanos82I have no passion for anything
22:56:14CalinouI'm interning in back-end web development currently (well, I'm on summer break right now)
22:56:26stefanos82ah the power of youth
22:56:28Calinouworking on a Node.js project (ES2017), will be doing PHP/Laravel soon
22:56:36Calinouyeah, I turned 20 in March
22:56:40dom96Node, PHP, :(
22:56:41stefanos8220?!
22:56:48stefanos82once upon a time ;(
22:56:55Calinoudom96: PHP isn't that bad. I prefer working with a nice PHP framework such as Symfony rather than Node.js, honestly
22:56:58krux02I really think programming is my passion. And I just can't stand to work with people who have an attitude of "don't care".
22:57:01Calinouit even has static typing to an extent :)
22:57:11Calinou(as long as you work with modern PHP versions)
22:57:32dom96Ahh, 20, I'm even feeling old and I'm only 22.
22:58:08krux02dom96: you are really that young?
22:58:20dom96It's not that young, is it?
22:58:36stefanos82dom96: *cough* excuse me young men *cough*, please allow the old turd to pass
22:58:45krux02I am 30
22:58:53stefanos82only? that's good
22:58:54krux02and I never wrote a book
22:59:19stefanos82I had the unfortunately privilege to waste 1.5 years of my life to writing one lol
22:59:24krux02having a book released with 22 is pretty impressive.
22:59:35dom96Glad to hear that :)
23:00:12krux02stefanos82, I think realeasing the first of anything is horrible torture and the result will be crap and you should not show it to anybody.
23:00:13dom96I feel like I should have achieved even more by now, like created a successful startup or something.
23:00:45stefanos82krux02: don't worry, dom96 by the age of 30+ he will be writing fantasy stories based on his traumas with mysterious bugs in generated C code that turned to nightmares
23:01:17krux02I don't want to rate Nim in Action. Because when it arrived here at home. I already knew everything about Nim that I cared about. The book did not offer a lot of interesting topics for me to read about.
23:01:38stefanos82krux02: the book I wrote was not for me, but for my private university
23:01:53dom96Yeah, it's not for everyone. But surely you can find something in there that you don't know :)
23:02:31krux02stefanos82, I don't think the generated C code is that bad. I actually was reading throught the generated C code, and I was surprised how readable it is (when you compile it release and turn all the debug informations off)
23:02:45stefanos82my colleagues were too busy to take notes due to intense schedule with courses and EU conferences, therefore I had to volunteer so I can get a taste of writer
23:03:29stefanos82the code is indeed readable up to a point. C on the other hand behaves weird, depending on its mood
23:04:44krux02for some reason I don't think C behaves weird.
23:04:58stefanos82if Nim was depended on GCC exclusively, I could say it would be a good sacrifice to fix some language's gimmicks by introducing GCC extension to the language and use that as part of the generated code, so it can produce really secure code
23:05:34krux02the good thing in the generated C code is, that it doesn't really rely on macros anymore
23:05:39krux02macros in C behave weird
23:06:47krux02stefanos82, I don't think so, because Nim cannot rely on error messages from the C compiler.
23:06:49stefanos82they need to turn to countless micros
23:06:59krux02The goal of the nim compiler is to emit correct C code
23:07:10krux02the c code should then compile with warnings turned off.
23:07:52stefanos82I really need how OCaml implemented its crazy logic to emit optimized C code that is actually optimized inlined assembly code
23:07:58krux02stefanos82, what are those GCC features that you had in mind?
23:07:59stefanos82*need to study how...
23:08:23dom96Yay, the Nim survey officially passed last year's response numbers
23:08:34krux02dom96: great
23:08:47krux02I took part in it. but I only found out about it by accident
23:09:23*sammy joined #nim
23:09:33sammynim
23:09:37sammyreeeeeeeeet
23:09:48Calinoudom96: I do feel old sometimes
23:09:55sammyok
23:10:05stefanos82I really want to know how old Araq is lol
23:10:05sammywhat is the port here
23:10:26krux02sammy: what port?
23:10:35stefanos82if he's younger than me, then I will become Gandalf the Green
23:10:46sammyanyone pay gta5
23:10:50sammyplay
23:10:58krux02not really.
23:10:59stefanos82what the hell are you talking about
23:11:08sammydo you play gta5
23:11:24sammyon pc
23:11:25krux02sammy, this is a a chat about the Nim programming language
23:11:35sammyoof
23:11:35stefanos82I play some Metallica songs, some Megadeth, and some Nirvana. Does this count?
23:11:45sammyanychat for gta5
23:12:02krux02sammy, I think you are in the wrong channel.
23:12:07FromGitter<rayman22201> Dammit @dom96 22? You are making us 30 year olds look bad 😛
23:12:39stefanos82no wonder why I have gray hair -_-
23:12:41dom96sammy: try ##gaming or ##games or something like that
23:12:59sammyok
23:13:09sammy##gaming
23:13:17dom96You'll have better luck on other IRC networks though
23:13:21dom96FreeNode isn't really for games
23:13:44dom96QuakeNet might be a good place https://www.quakenet.org/
23:13:59*ftsf joined #nim
23:14:04stefanos82sammy: I just googled it for you and found this http://www.gamers-irc.org/
23:14:12stefanos82the servers are listed on the right sidebar
23:15:20krux02I heard that freenode is the only IRC network that is still growing
23:15:45FromGitter<rayman22201> I love how nice this channel is. It's like a small town where you can knock on any door and ask for directions if you are lost lol
23:15:54*sammy quit (Quit: Page closed)
23:16:19krux02other channels are similar.
23:16:31krux02I think it is just open source software in general
23:16:46FromGitter<rayman22201> And then we go back to fighting to the death over exception handling 😝
23:17:14krux02All I want for exception handling is a way to not deal with it.
23:18:23krux02damn it. I don't want to talk about that topic.
23:18:26Calinoudom96: speaking of Nimble, how should I handle the version tag for in-development versions? (the one in my .nimble file, and the one that's displayed when passing the -V switch)
23:18:34stefanos82I remember when I joined a channel once and said "greetings folks" and a Wolverine-at-the-bar-cameo-scene behavior stroke me in face: GO F*** YOURSELF!
23:18:45stefanos82I was like...ooookaaaay!
23:18:58FromGitter<rayman22201> Sorry. Too soo maybe. I was just being cheeky
23:19:22FromGitter<rayman22201> Yeah... I've had some bad irc experiences myself
23:19:30krux02stefanos82, that is not normal. Not for any channel.
23:19:43stefanos82krux02: some people need to get a life, that's for sure
23:19:47krux02there were some bad experiences here as well.
23:19:57stefanos82it can happen to anyone
23:20:08krux02yea some people on the emacs channel are always online.
23:20:23krux02I don't know why, but it keeps the channel alive.
23:20:43krux02but sometimes I wonder if they just hang out there becaues they don't want to work.
23:20:48stefanos82I'm doing my best to keep an eye on my behavior as well due to multiple factors: long hours in front of the screen, hunger, persistent issues with coding, and the like
23:21:00FromGitter<kayabaNerve> We should've sent Sammy to the rust IRC :(
23:21:06krux02I defititively do that from time to time. I hang out here in this chat, because I just don't want to work.
23:21:24stefanos82krux02: pay me half your salary and I will work for you
23:21:27FromGitter<rayman22201> I've been to some Linux support channels that just yell at you for being a noob and telling you to rtfm
23:21:36krux02kayabaNerve: would only have worked if he would have played the rust game
23:21:56krux02stefanos82, you will for free?!!! Deal!!!
23:22:08stefanos82rayman22201: I have been using UNIX-like systems since 2003 and still I'm a newbie
23:23:09stefanos82for free? am I going to gain anything out of it eventually?
23:24:41krux02stefanos82, All income you get from an open source project.
23:24:53stefanos82you mean all these millions?! O.o
23:24:56stefanos82no way!
23:25:26krux02I mean the project is interesting.
23:26:04FromGitter<rayman22201> https://giphy.com/gifs/nfl-week-play-13B1WmJg7HwjGU
23:26:27FromGitter<rayman22201> I couldn't resist
23:26:37krux02Write a program that doesn't just use the CPU, but compiles to a GPU/CPU hybrid target with code sharing on both GPU and CPU
23:27:21stefanos82rayman22201: there should be another scene with his mini-me where he says "1 minion dollars"
23:27:21krux02it's like writngi a sever client application, as if it was just one program.
23:28:00dom96Calinou: You can do some clever importing and reuse the same constant in your program and your .nimble file
23:28:03dom96Or just duplicate it
23:28:05stefanos82krux02: you mean like cuda syntax?
23:28:35dom96Still too complex for my liking, but here is how Nimble does it: https://github.com/nim-lang/nimble/blob/master/nimble.nimble#L4
23:28:45krux02stefanos82, cuda only has compute kernels.
23:29:14Calinoudom96: I wonder if it's possible to extract info from the .nimble file, yeah
23:29:15krux02I support full rasterization pipeline, too. and automatic resource serialization.
23:29:20Calinouso that I don't have to write it twice
23:29:29krux02So I think I am a bit better than just cuda.
23:29:39dom96kayabaNerve: haha yeah, "You can discuss the Rust game here though: #rust" :D
23:29:56stefanos82krux02: you mean something like this? https://hal.inria.fr/hal-00807033v1/document
23:30:00FromGitter<rayman22201> @stephanos82 lol @krux02 that does sound fascinating. Isomorphic code or automatic code generation like vectorization?
23:30:14dom96I remember when I wanted help using Python to write an IRC bot
23:30:22dom96So I went to #python and they all told me to use Twisted
23:30:30dom96"But I want to use the stdlib"
23:30:35dom96"OMG WHY, JUST USE TWISTED"
23:31:33dom96x = IRCBot(); x.connect() # I would have learned so much from this.
23:32:16krux02rayman22201: I wrote the glm port for nim, and I compile the parts of the program that utilize the glm library to glsl builtin functions.
23:32:31krux02functions not provided as a glm builtin are also translate to glsl.
23:32:52krux02so basically you can use arbitary Nim code. of coulse with limitations and stuff
23:34:04krux02stefanos82, here is an example https://github.com/krux02/opengl-sandbox/blob/master/experiment/main.nim#L392
23:34:15krux02just ask if something sounds magical or fake to you
23:34:21stefanos82I've got nostalgic now :/ I miss the good ol' days where companies would place job ads all over the place and they would hire people with no previous experience and built on them
23:35:51FromGitter<rayman22201> @krux02 that is pretty damn cool
23:36:04FromGitter<kayabaNerve> Is #rust on Freenode evn for the rust lang?
23:36:21stefanos82krux02: is that math I'm looking at?! if yes, https://www.wikihow.com/images/thumb/f/ff/AngryCatWikiHow.jpg/718px-AngryCatWikiHow.jpg
23:36:39dom96kayabaNerve: it's ##rust, but yeah
23:38:24dom96The channel is pretty much dead though
23:38:55FromGitter<kayabaNerve> Plot twist: He joined there and they sent him here
23:40:47stefanos82dom96: you mean ##rust is dead or #rust?
23:41:14dom96#rust on mozilla is very active
23:41:17dom96##rust on freenode is dead
23:41:21dom96#rust on freenode doesn't exist
23:43:21dom96'night
23:48:15stefanos82I need to get some sleep as well. goodnight folks
23:48:18*stefanos82 quit (Quit: Quitting for now...)
23:48:43zacharycarter[m]is it possible to check an objects subtype inside of a template?
23:49:25zacharycarter[m]or rather is it possible to ensure an object inherits a type inside of a template?
23:50:50*ftsf quit (Ping timeout: 276 seconds)
23:51:43zacharycarter[m]nm is ref object worked
23:53:00*ftsf joined #nim
23:53:09*xet7 quit (Quit: Leaving)