<< 29-01-2020 >>

00:06:00*xet7 quit (Remote host closed the connection)
00:06:38*cron quit (Quit: Leaving.)
00:07:13*krux02_ joined #nim
00:07:32*sammich joined #nim
00:10:45*krux02 quit (Ping timeout: 246 seconds)
00:16:34*lxbarbosa quit (Remote host closed the connection)
00:34:15*Pqzcih5 quit (Remote host closed the connection)
00:34:33*cron joined #nim
00:41:28*ng0 quit (Quit: leaving)
00:47:47FromDiscord_<Recruit_main_70007> Thanks both, I love this community
01:05:51*gangstacat joined #nim
01:10:28*ftsf quit (Quit: Leaving)
01:20:13*lritter quit (Quit: Leaving)
01:57:27*oculuxe quit (Ping timeout: 268 seconds)
01:57:50*oculux joined #nim
02:14:48*krux02_ quit (Remote host closed the connection)
02:15:14*ptdel joined #nim
02:22:44*icebattle quit (Ping timeout: 268 seconds)
02:27:34*NimBot joined #nim
02:46:31*cgfuh quit (Quit: WeeChat 2.6)
03:10:03*icebattle joined #nim
03:10:08*rockcavera quit (Remote host closed the connection)
03:14:43*icebattle quit (Ping timeout: 268 seconds)
03:36:26*ltriant quit (Quit: leaving)
03:44:01*muffindrake quit (Ping timeout: 272 seconds)
03:45:43*tefter joined #nim
03:45:45*muffindrake joined #nim
03:46:53disruptek~motd recommend your favorite book on kernel design
03:46:54disbotno matching footnotes for `motd` with regexps `recommend, your, favorite, book, on, kernel, design`. 🙁
03:46:58disruptek~motd is recommend your favorite book on kernel design
03:46:59disbotmotd: 11recommend your favorite book on kernel design
03:47:02disruptekDO IT NOW
03:47:34disruptekoh yeah, did i mention that you can use regexp on footnotes?
03:47:48disrupteki have no idea how that works, btw.
03:52:53*dddddd quit (Ping timeout: 272 seconds)
04:02:08*endragor joined #nim
04:19:03*icebattle joined #nim
04:24:03*icebattle quit (Ping timeout: 260 seconds)
04:26:12*pqflx3[m] joined #nim
04:26:44*chemist69 quit (Ping timeout: 248 seconds)
04:28:41*chemist69 joined #nim
04:48:43*icebattle joined #nim
04:52:59*nsf joined #nim
04:53:23*icebattle quit (Ping timeout: 268 seconds)
04:53:39*marmotini_ joined #nim
05:45:14*narimiran joined #nim
06:22:48*cron quit (Ping timeout: 268 seconds)
06:47:13*ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
06:47:31*Pqzcih5 joined #nim
07:14:44*uvegbot joined #nim
07:16:20*zyklon quit (Ping timeout: 248 seconds)
07:19:35*neceve joined #nim
07:47:21*Pqzcih5 quit (Remote host closed the connection)
07:47:34*Pqzcih5 joined #nim
07:55:04*solitudesf joined #nim
08:00:00*gmpreussner quit (Quit: kthxbye)
08:05:11*gmpreussner joined #nim
08:07:54*PMunch joined #nim
08:42:00*floppydh joined #nim
08:43:49*ng0 joined #nim
08:43:49*ng0 quit (Changing host)
08:43:50*ng0 joined #nim
08:58:04*ftsf joined #nim
08:59:02*skrylar joined #nim
08:59:40skrylarupdated the abuild to 1.0.6; still need to fiddle with subpackages and then bother the maintainer :b
09:02:27*marmotini_ quit (Remote host closed the connection)
09:20:05*ftsf_ joined #nim
09:23:29*ftsf quit (Ping timeout: 272 seconds)
09:39:21Araqhttps://docs.python.org/3.8/whatsnew/3.8.html#f-strings-support-for-self-documenting-expressions-and-debugging we could copy this
09:43:58FromDiscord_<Rika> very easily i bet
09:50:12*endragor quit (Remote host closed the connection)
10:11:13FromGitter<alehander92> moorning
10:15:31FromGitter<Varriount> Araq: Format strings are my favorite new python feature
10:19:20PMunchIs there a way to get a float as a string that only has the floating part if it's not 0 (or some epsilon)?
10:22:12FromDiscord_<Elegant Beef> `a-trunc(a)` would get you the decimal if `a.mod(1)` doesnt
10:22:25FromDiscord_<Elegant Beef> Then could check if it's abs > epsilon
10:22:32FromDiscord_<Elegant Beef> Might be a smarter method
10:23:13FromDiscord_<Elegant Beef> Will need to import math though
10:23:45ZevvPMunch: https://forum.arduino.cc/index.php?topic=661603.0 Let's see if that results in any usable answers
10:24:15*cgfuh joined #nim
10:26:24FromGitter<alehander92> oh kernel design so what book
10:27:17FromDiscord_<Elegant Beef> I really think that C#'s string formatting is nicer than pythons there
10:27:17FromDiscord_<Elegant Beef> `$" The Duck has {duck.Feet.Count}, which are {duck.Feet.Color}.`
10:27:17FromDiscord_<Elegant Beef> or
10:27:17FromDiscord_<Elegant Beef> `String.Format("A duck named {0}, can jump {1}.",duck.Name, duck.JumpHeight)`
10:27:40FromDiscord_<Elegant Beef> The one is a simple regex though
10:31:23PMunchElegant Beef, seems like formatFloat from strutils is what I need
10:31:32FromDiscord_<Elegant Beef> I guess
10:31:59FromDiscord_<Elegant Beef> I should've got you the decimal though so dont really need anything more then the $ operator after that epsilon check
10:32:22FromDiscord_<Elegant Beef> But yea probably smarter to use string utils
10:35:19FromGitter<alehander92> but no
10:35:24FromGitter<alehander92> python also has this one elegant beef
10:35:45FromGitter<alehander92> with `$` as `f".."` and the format is vry similar
10:36:11FromGitter<alehander92> format method* to String.Format (kinda similar)
10:38:02*Vladar joined #nim
10:38:31PMunchZevv, I don't think it's possible to use a different language in the Arduino IDE..
10:38:42PMunchAt least I've never seen or heard it mentioned
10:40:49ZevvIt is
10:40:54Zevvhttps://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification
10:40:57ZevvThey call it 'hardware' :)
10:41:05ZevvAlso getting help on #arduino now
10:45:39*hinst joined #nim
10:46:41FromGitter<alehander92> eleg, i forgot we have math :O
10:46:48FromGitter<alehander92> wow the arduino sounds good
10:53:05*synapps joined #nim
10:54:16Zevvalehander92: I might give it a try if I'm bored, it would make a nice story for Nim if you can just unzip and run Nim on your hobby board
10:55:16PMunchThat would be amazing
10:55:53PMunchAh, but hardware is actually meant for boards
10:56:17PMunchSo you would have to have something like "Arduino Leonardo (Nim)" and do that for all the supported boards
10:58:24*sagax quit (Ping timeout: 260 seconds)
11:03:49*abm joined #nim
11:17:14FromGitter<kristianmandrup> From Nim changelog. What is a "pattern"? ⏎ ⏎ "Added an `importjs` pragma that can now be used instead of `importcpp` ⏎ and `importc` to import symbols from JavaScript. `importjs` for routines always ⏎ takes a "pattern" for maximum flexibility." [https://gitter.im/nim-lang/Nim?at=5e3169bad9895b17c3ac1730]
11:17:54FromGitter<kristianmandrup> Similar to the `importcpp pragma for C++ <#foreign-function-interface-importc-pragma>`_, ⏎ the ``importjs`` pragma can be used to import Javascript methods or ⏎ symbols in general. The generated code then uses the Javascript method ⏎ calling syntax: ``obj.method(arg)``. [https://gitter.im/nim-lang/Nim?at=5e3169e1594a0517c2452bff]
11:21:05*xet7 joined #nim
11:21:55*xet7 quit (Remote host closed the connection)
11:22:56*xet7 joined #nim
11:27:11*synapps left #nim ("WeeChat 2.4")
11:29:18ZevvPMunch: I have no idea yet, also awaiting the forum. But this should make it feasible to do at least something.
11:29:39ZevvI could add a nim variant of the most common arduino boards.
11:29:46ZevvBut I never used this stuff, so have to fiddle around with it anyway
11:32:38*sagax joined #nim
11:34:00FromGitter<alehander92> @kristianmandrup noo
11:34:09FromGitter<alehander92> pattern is a bit hard to define imo
11:34:29FromGitter<alehander92> but usually you write "a(#2, #1)"
11:34:32FromGitter<alehander92> or something like that
11:34:48FromGitter<alehander92> a bit like string formatting but with some additional features i guess
11:42:36*dddddd joined #nim
11:51:23*leorize quit (Ping timeout: 240 seconds)
11:55:23*leorize joined #nim
11:56:08PMunchZevv, oh for sure. It would be great to have this capability
11:58:02FromGitter<Vindaar> @PMunch: formatting floats in the "most intuitive" way is kind of hard. `formatBiggestFloat` together with `trimZeros` mostly gets the job done I found (maybe there's a nicer way though). The final problem remains printing 0, because you have to know whether a value is inherently small or is only epsilon away from 0
11:58:30PMunchYeah, for my usecase it's fine
11:58:37PMunchTo just use formatFloat
11:58:48FromGitter<Vindaar> I use https://github.com/Vindaar/ggplotnim/blob/master/src/ggplotnim/formula.nim#L352-L368 and https://github.com/Vindaar/ginger/blob/master/src/ginger.nim#L247-L268 ⏎ Ahh, good to know :)
11:59:09PMunchIt's for a small stack based calculator/language that I wrote, and so far I'm the only one I know who know how to use the thing :P
11:59:30PMunch(Although I did write quite a bit of documentation if you feel up for a challenge :P)
11:59:37FromGitter<Vindaar> I think I remember you talking about it some time ago
12:01:21PMunchYeah I probably did when I first created it
12:02:13PMunchI was thinking about converting it to using some arbitrary precision library instead of floats
12:02:20PMunchBut never got around to it
12:03:20FromGitter<Vindaar> "never got around to it", yeah tell me about it :|
12:04:21FromGitter<Vindaar> And while you're here. I tried to run some code of mine with `--gc:arc`. The persistent vector wasn't having it. This line here https://github.com/PMunch/nim-persistent-vector/blob/master/persvector.nim#L56 complained that `deepCopy` isn't defined. I removed it and everything seems to work then. I'm not confident though that this is the correct solution here, haha
12:16:19PMunchYeah.. That won't work..
12:16:47PMunchOr it will work, but it won't be persintent any longer..
12:16:54PMunchpersistent*
12:19:05FromGitter<Vindaar> I thought as much. But I haven't invested the time to understand what happens in `arc` with the `vec` argument. Does it have to be a `sink` or something?
12:20:09PMunchWell, it only copies a seq here. But the way it works with deepCopy is that you can fill it with ref objects that will also be copied (I think)
12:25:15PMunchHmm, readLineFromStdin is weird..
12:27:51FromGitter<Vindaar> I'll have to understand `arc` properly first I guess. ⏎ what makes it weird?
12:28:07*rockcavera joined #nim
12:29:23PMunchNever mind, it was just behaving strangely with stdin.atEnd
12:32:57*m|b_ joined #nim
12:36:25ZevvPMunch: looks like i can make this work. I provide a single file that the user drops into the arduino ide dir, and i wrap avr-g++ to actually do nim under the hood
12:36:49Zevvits a hack but it might just work
12:38:52PMunchInteresting, so the IDE would think that it runs avr-g++, but actually it runs a shim that runs Nim and passes the flags along to --passC/L?
12:39:35PMunchDoesn't the IDE do any kind of error checking by the way?
12:39:46PMunchI mean it does syntax highlighting, so that would already be a bit wonky :P
12:40:24FromGitter<alehander92> is it open source
12:40:30PMunchThink so
12:41:15FromGitter<alehander92> so cant we just patch the ide
12:41:44m|b_Has Nim finally reached version 1.0.0?
12:42:02FromDiscord_<mratsim> 4 months ago
12:42:22FromDiscord_<demotomohiro> version 1.0.6 is lastest version
12:42:57m|b_Oh, that's good news..
12:43:04Zevvsure the id indenting and higlghting will be borked. But as soon as the arduino community will see this they will go raving mad of enthausiasm and pick this up and fix this
12:43:16*krux02 joined #nim
12:43:23m|b_That's to say it's production safe, now??
12:43:54m|b_Like those packages in the Future module can now be relied upon?
12:44:52Araqm|b_, yeah
12:45:39PMunchZevv, haha true!
12:45:43FromGitter<alehander92> what is the Future module
12:45:48FromGitter<alehander92> there is `sugar` now
12:45:51Araqthe only module I hope to remove is 'typeinfo.nim'
12:45:55m|b_Araq: Oh, thanks Mr. Rumpf! But, can I talk to you privately for a second?
12:46:20Araqno sorry, I'm almost gone
12:46:31Araqcome back in about one hour please
12:46:44*endragor joined #nim
12:47:13m|b_That's perfectly understandable 😇
12:47:45m|b_Though with no explicit guarantees..
12:50:44m|b_FromGitter: well, that's good to know.
12:50:44FromGitterm|b_, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim
12:51:08*endragor quit (Ping timeout: 245 seconds)
12:51:37PMunchHaha, yeah FromGitter is a bot, it was alehander92 that sent those messages
12:51:56PMunchIn the meantime we might be able to answer your questions by the way
12:53:00m|b_Well, it's warm to realize how much, I have to learn..
12:53:07*chemist69 quit (Ping timeout: 272 seconds)
12:53:48m|b_Well, it's warm to realize how much, I have to learn..
12:53:56*chemist69 joined #nim
12:56:38m|b_PMunch: Thanks for your generosity gem, though my message is strictly reserved for *Andreas* 😇
13:07:24*Amun_Ra quit (Ping timeout: 265 seconds)
13:09:36FromDiscord_<demotomohiro> Nim 1.0.6 is available at wandbox.
13:09:37FromDiscord_<demotomohiro> https://wandbox.org/permlink/PG0Oawgizzjkmjwg
13:10:39*Amun_Ra joined #nim
13:12:53FromGitter<zetashift> sweet, before the Nim playground I only used wandbox
13:15:53PMunchYay, now stacklang can be run as a program with arguments :)
13:16:04PMunchstacklang 1 2 \+ display
13:16:23PMunchOr: stacklang '1 2 + display'
13:16:41m|b_@demotomohiro Thanks! I'll check that out, straight away!
13:18:38PMunchHmm, I wonder if the playground updated properly this time
13:18:57PMunchYay! It did :)
13:19:02PMunchSo now that is fully automatic
13:20:41PMunchm|b_, check out https://play.nim-lang.org as wel if you want to try Nim in your browser
13:20:45FromGitter<kristianmandrup> I'm trying to add/improve docs in the `Nim` repository (cloned). How do I generate the docs?
13:20:48FromGitter<kristianmandrup> `$ rst2html myfile.rst output.html`
13:21:07FromGitter<kristianmandrup> I've installed `docutils`
13:21:11FromGitter<kristianmandrup> RST comes with `docutils` where you have `rst2html`
13:21:31PMunch./koch docs
13:21:39FromGitter<kristianmandrup> But binary `rst2html` not available (PATH issue I guess)
13:22:16FromGitter<kristianmandrup> on a Mac. Guess I have to install `koch`?
13:22:35PMunchIt's in the Nim repository
13:22:47PMunchYou should just have to do "nim c koch" to beuld it
13:22:51PMunchbuild*
13:22:58FromGitter<kristianmandrup> `pip install koch`
13:23:02FromGitter<kristianmandrup> okay
13:23:13PMunchWhat, pip is for Python modules :P
13:23:37narimiran"How do I generate the docs?" -- nim doc path/to/my/file.nim
13:23:39FromGitter<kristianmandrup> cool. It built koch, and then I could run `koch docs` :)
13:23:56FromGitter<kristianmandrup> Thanks @PMunch and @namiran
13:24:02narimiranand then, `open file.html`
13:24:02PMunchnarimiran, well that is to generate the documentation for one file
13:24:13PMunchI think he wanted to build the documentation for Nim
13:25:24FromGitter<kristianmandrup> @PMunch - Exactly
13:25:40FromGitter<kristianmandrup> Need to see how the docs look with my suggested improvements
13:25:52FromGitter<kristianmandrup> Trying to improve docs for backend interop and FFI
13:26:02m|b_PMunch: you're a genius! Thanks gem!
13:26:21FromGitter<kristianmandrup> Now I'm running the full build unfortunately...
13:27:47FromGitter<kristianmandrup> Not sure how to only generate the docs. Seemed like I did way too much when I ran .`/koch docs`?
13:27:49FromGitter<kaushalmodi> @kristianmandrup If want to test edits to an rst file, then may be you just need to do `nim rst2html foo.rst`
13:27:58FromGitter<kaushalmodi> see `nim --fullhelp`
13:28:35PMunchYeah if you just want to check a single rst file then you can run that
13:28:48PMunchOr as narimiran said for a single file "nim doc file.nim"
13:28:53FromGitter<kaushalmodi> Summary: ⏎ ⏎ 1) .nim -> .html: `nim doc foo.nim` ⏎ 2) .rst -> .html: `nim rst2html foo.rst` [https://gitter.im/nim-lang/Nim?at=5e318895f6945f41ef3914e0]
13:32:37*cgfuh quit (Ping timeout: 268 seconds)
13:33:32FromGitter<kristianmandrup> @kaushalmodi Perfect :)
13:44:46*cgfuh joined #nim
13:54:23*leorize quit (Ping timeout: 240 seconds)
13:54:59*leorize joined #nim
14:03:13*skrylar quit (Remote host closed the connection)
14:14:01PMunchHmm, this language is really weird to use. But its simplicity has a certain kind of beauty to it..
14:14:17PMunch^ not Nim, but stacklang
14:14:58WilhelmVonWeinerhave you ever tried Forth?
14:15:21PMunchHaha, yes
14:15:34WilhelmVonWeinerdamn, no opportunity to proselytise
14:16:09*flinterson joined #nim
14:16:36PMunchI mean, forth is nice. But I wanted to use this as a replacement for using a graphical RPN calculator. And I don't use that calculator enough that I would remember Forths syntax between each time
14:17:26PMunchSo I created stacklang to be as simple as possible for the super simple "just do a bit of math" mode, and then I bolted on a bunch of wacky features to do things like loops and functions
14:17:45WilhelmVonWeinerI loled at functions being "wacky"
14:18:18PMunchAll the while making sure that no feature had any overlap with any other feature and leaving out things that could be written as a language command
14:18:34WilhelmVonWeinerI love that kind of approach
14:18:39PMunchHaha, functions itself aren't wacky. But the way you create them in stacklang is, well, a bit strange :P
14:18:45WilhelmVonWeinera very extreme minimalism
14:18:51WilhelmVonWeineryet pragmatic
14:20:30PMunchSo if you try to push something that is a command onto the stack it will run it instead, so if you type "1 2 +" the stack will be "3" because it ran the built-in "+" command. If you preface anything with "\" it will ignore this and just push it directly to the stack, so if you do "1 2 \+" the stack will be "1 2 +". So in order to create a function you push the things you want to happen in your function to the stack and then run the "makecmd" command.
14:20:55WilhelmVonWeinerhave you heard of a language called Retro Forth
14:21:02WilhelmVonWeinerinspired by Joy and Factor
14:22:14WilhelmVonWeinerquotations do something similar, where [ dup push ] would put that block of code on the stack
14:23:30PMunchAnd this exposes another fun concept of the language, for how does makecmd know how many tokens to add to the function? Well, every command that needs information about the stack can take either a positive number as an index, a negative number as a count, or a label as a position. So you you do "1 2 \+ -2 makecmd" the stack will be "1 tmp2930" where tmp2930 is the name of the command and -2 told it to grab two tokens to the command. So the command would be
14:23:31PMunch"2 +".
14:23:47PMunchFrom there on you can either name the function, or use "call" to call the token.
14:24:06WilhelmVonWeinermaybe you would find the syntactical construct [ ] useful then
14:24:18WilhelmVonWeinerto save the +/-n indexing
14:24:43WilhelmVonWeiner[ 1 2 + ] vs `1 2 \+ -2 makecmd`
14:25:03PMunchIf you give it a label it will automatically create a function by that name, so "1 addtwo 2 \+ addtwo makecmd" will give a stack of "1" and create a command named "addtwo" that is "2 +".
14:25:06WilhelmVonWeinerthen you can loop inside [ ] if you wanted (with macros.)
14:25:56PMunchAh, I have defined a command ")" in my environment which is defined as: "\\rand7087 \delcmd ( mkcmd \rand7087 \rand7087 \( name"
14:26:36WilhelmVonWeinerwell if you have some time you might like to check it out, retroforth.org or #Retro on Freenode
14:26:47WilhelmVonWeinerI actually plan to write an implementation of the super simple VM in Nim
14:27:01PMunchIt creates a new command named rand7087 that is everything from the last ( and which deletes itself when run (but puts a token on the stack to call the function).
14:28:15PMunchHmm, retroforth looks interesting. But again a lot more concepts than you need in a calculator.
14:28:53PMunchMy idea was to have as few concepts as possible. The only two data-types are numbers and labels.
14:29:03WilhelmVonWeinerRetro has no types/
14:29:15PMunchYou have a way to store variables, and a way to define commands.
14:29:18PMunchBut that's about it
14:29:36WilhelmVonWeinerjust signed 32 bit integers, so actually, it might not meet the needs of your RPN
14:30:01PMunchNo floating point?
14:30:05*marmotini_ joined #nim
14:30:18PMunchI was actually thinking of converting my code to not use floats but arbitrary precision numbers
14:30:22WilhelmVonWeinerthere is floating point done in some crazy maths way
14:30:31PMunchThat way you won't get those silly 1.0000000001 bugs
14:30:47PMunchAfter all, this is meant to be a calculator
14:31:41PMunchI also kinda want to add display modes to do IO in hex/bin/oct/dec
14:32:09WilhelmVonWeinerThe floating point is some crazy method of converting 64 bit floats to 32-bit ints
14:32:34WilhelmVonWeinerwith a range of 10^-9 to 10^9 and "a 32-bit accuracy near zero"
14:35:49PMunchProblem is that none of the bignum implementations in Nim fits my goal of pure Nim and has all the math operations in the standard library..
14:36:01*marmotini_ quit (Read error: Connection reset by peer)
14:37:05FromDiscord_<Rika> when i heard stacklang i thought "is that another forth/factor implementation?"
14:37:39PMunchNope, completely new thing
14:37:52PMunchI had just used forth when I started writing it though
14:38:32FromDiscord_<Rika> is it similar?
14:39:54PMunchWell, they are both stack-based
14:40:22PMunchhttps://github.com/PMunch/stacklang
14:44:12FromDiscord_<Rika> i like it
14:45:02PMunchIt certainly has a charm to it
14:45:28*marmotini_ joined #nim
14:51:43PMunchJust don't read until the "branching logic, gotos, loops, and commands within commands" section :P
14:51:52PMunchThat is where the madness really unfolds
14:54:26*pbb_ quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
14:58:23Yardanicodamn my repl example with mathexpr (and of course with some perf fixes I did to it) compiled with -d:danger, --gc:arc and LTO is a 64 kbytes binary on linux
14:58:29Yardanicowithout --gc:arc and with LTO too it's 88kbytes :P
14:58:34Yardanico(both with strip -s binary)
14:59:26*marmotini_ quit (Read error: Connection reset by peer)
15:00:21Yardanicodid anyone try compiling Nim compiler with LTO? 🤔
15:00:26Yardanicowill it get faster? :P
15:00:56*JustASlacker quit (Quit: Leaving)
15:01:06PMunchHmm
15:01:11PMunchInteresting thought
15:02:54Yardanicoi'll try now maybe :P
15:03:08*endragor joined #nim
15:03:39YardanicoI'll capture "time sh build_all.sh" without any caches with normal build, and then try to build a LTO'd compiler and try with it again
15:04:07PMunchDoesn't build_all use csources?
15:04:31Yardanicoah right my bad
15:04:42*PMunch quit (Quit: Leaving)
15:05:32*marmotini_ joined #nim
15:07:16*marmotini_ quit (Remote host closed the connection)
15:07:55*pbb joined #nim
15:11:10Yardanicodamn linking nim compiler takes quite a while with LTO
15:14:55*endragor quit (Remote host closed the connection)
15:15:20Yardanicoeven got some warnings
15:15:29Yardaniconim nimCmpMem: " warning: ‘memcmp’ specified size between 9223372036854775808 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]"
15:16:41*endragor joined #nim
15:16:58Yardanicoexecutables are equal: SUCCESS!
15:17:29FromGitter<kristianmandrup> I'm trying to improve the Nim docs on backend, esp. JavaScript interop
15:17:32FromGitter<kristianmandrup> https://github.com/nim-lang/Nim/pull/13295/files
15:17:33disbotrestructure docs and improve docs for JavaScript interop
15:17:34FromGitter<kristianmandrup> WIP
15:17:34Yardanicoseems like I managed to build the compiler with LTO
15:18:27Yardanicohmm, how to compare performance now
15:20:08*marmotini_ joined #nim
15:20:38*ng0_ joined #nim
15:20:56Yardanicoah, right, compileOnly
15:21:28*icebattle joined #nim
15:21:53*endragor quit (Remote host closed the connection)
15:23:07*marmotini_ quit (Remote host closed the connection)
15:23:30*ng0 quit (Ping timeout: 265 seconds)
15:26:02*icebattle quit (Ping timeout: 240 seconds)
15:29:58Yardanicohmm, let's try a basic nimx app, nim time only
15:33:42Yardanicoseems like non-LTO'd compiler is faster LOL. well, at least for me
15:34:24*m|b_ quit (Quit: Connection closed for inactivity)
15:42:12*lritter joined #nim
15:43:36disruptek~motd
15:43:36disbotmotd: 11recommend your favorite book on kernel design -- disruptek
15:45:29*ptdel joined #nim
15:46:58*icebattle joined #nim
15:52:25*icebattle quit (Ping timeout: 268 seconds)
15:53:13*oculux quit (Ping timeout: 268 seconds)
15:53:31*oculux joined #nim
15:57:10*endragor joined #nim
16:05:59*ftsf_ quit (Ping timeout: 268 seconds)
16:09:28*icebattle joined #nim
16:11:44*endragor quit (Remote host closed the connection)
16:16:03*icebattle quit (Quit: leaving)
16:17:55*icebattle joined #nim
16:18:26*hinst quit (Remote host closed the connection)
16:26:20*PMunch joined #nim
16:27:34*Kaivo quit (Quit: WeeChat 2.7)
16:38:32PMunchHmm, anyone here speaking Chinese who could help me translate something real quick?
16:38:59PMunchGot some screen protectors on AliExpress, and they came with a small bag and a brush with instructions in Chinese..
16:39:06PMunchI have no idea what they are for.
16:39:34Yardanicogoogle translate might help (it has a camera mode)
16:39:40Yardanicoon the phone
16:40:18PMunchWell, it is a QR code to a video with instructions..
16:40:24Yardanicoohhh
16:41:37PMunchAha, according to the text it is "Edge filler"
16:41:53PMunchAnd in the video he seems to apply it to a screen protector that isn't properly sticking around the edge
16:42:26PMunchMan camera mode translation was way better than I expected :P
16:43:56Yardanicoyeah, translation services are getting better and better with each year :P
16:45:11*nsf quit (Quit: WeeChat 2.7)
16:50:23*Trustable joined #nim
16:50:36*xet7 quit (Remote host closed the connection)
16:51:50*leorize_ joined #nim
16:52:57*leorize quit (Disconnected by services)
16:52:59*xet7 joined #nim
16:53:03*leorize_ is now known as leorize
16:55:03*disrupteq quit (Ping timeout: 265 seconds)
17:04:47PMunchUh oh, all the avatars on the forums are broken
17:04:56Yardaniconot for me
17:05:00Yardanicoah nvm they are
17:05:06Yardanicoor not
17:05:10PMunch"Failed to load resource: net::ERR_CERT_AUTHORITY_INVALID"
17:05:39PMunchHaha, seems like Gravatar messed up their certs :P
17:05:54PMunchI get the same error if I try to go to their site
17:06:07Yardanicoforgot to update the cert?
17:06:10Yardanicorenew*
17:06:14PMunchProbably
17:06:45PMunchHuh, apparently not: Sunday, September 6, 2020 at 1:59:59 AM
17:06:53PMunchThat is their expiry date
17:07:02Yardanicowhat lol
17:07:16Yardanicoah nvm, I forgot we're in 2020, thought it said sep 2019
17:07:57*endragor joined #nim
17:08:41PMunchHmm, seems like their CA has the same issue..
17:08:43*endragor quit (Remote host closed the connection)
17:09:24FromGitter<kaushalmodi> Does anyone have pointers on how to call C# built libraries in Nim?
17:09:47PMunchLook at how you can do it in C and apply that
17:09:58FromGitter<kaushalmodi> I google and found the other way around approach (i.e. calling Nim built dll's in C#) but I am not looking for that
17:10:26Yardanicoseems like it won't be easy since C# is a managed language with it's own VM
17:10:27Yardanicohttps://stackoverflow.com/questions/778590/calling-c-sharp-code-from-c
17:10:33Yardanicothat's for C# from C++
17:11:06FromGitter<kaushalmodi> Yardanico: Thanks. I will start reading
17:11:49ZevvFor practical reasos I'd like to compile the nim-generated C sources as a single translation unit, but if I concatenate all .c files I get duplicate declarations. Is there a trick to get this done somehow?
17:12:26YardanicoI've found https://people.eecs.berkeley.edu/~necula/cil/merger.html
17:12:31Yardanicoidk if that's useful though
17:12:43Yardanicoit's made for https://github.com/cil-project/cil
17:21:40leorizeZevv: get rid of most of the externs in C files :P
17:21:59PMunchWhy do you want to do that?
17:26:37FromDiscord_<Rika> i'm getting an error in a macro i made, just says "not unused" and i'm very confused
17:26:51PMunchIt just says "not unused"?
17:27:06Yardanicocan you give full compiler log? :P
17:28:32FromDiscord_<Rika> how? just copy?
17:28:33FromDiscord_<Rika> https://gist.github.com/de-odex/c819415b62acd702fabd191a599f805a
17:28:44Yardanicolol
17:29:01Yardanicowell, it's a VM error
17:29:16Yardanicocompiler/vmgen.nim 473
17:29:37Yardanicohttps://github.com/nim-lang/Nim/blob/devel/compiler/vmgen.nim#L473
17:30:29Yardanicothere were two nim issues with same error message but they were closed, can you give a macro?
17:30:36Yardanicowell, I mean can you share your macro code?
17:30:41FromDiscord_<Rika> i'd expect that, it errored in a macro aftera ll
17:31:31FromDiscord_<Rika> uh
17:31:50FromDiscord_<Rika> i cant minimize it as i dont know where the hell the issue is, is that fine?
17:31:59Yardanicowell yeah, I can try to poke around :P
17:32:45FromDiscord_<Rika> also it's hell
17:33:03Yardanicoits okay
17:33:11Yardanicodont be shy
17:33:41FromDiscord_<Rika> ill send it in a moment, my internet is legitimately acting up
17:40:14*tane joined #nim
17:42:26ZevvPMunch: I'm trying to hack in nim into this arduino stuff
17:42:57ZevvI'm making a thing that sits in place of the compiler, tries to deduce from the arguments passed what is happenng and tells the proper lies to get this all done.
17:42:57disruptekZevv: if you can do that it would help nigel tremendously.
17:43:09disrupteki mean, concat'ing c.
17:43:13*abm quit (Ping timeout: 260 seconds)
17:43:22disruptekbut i doubt you can. no offense.
17:43:27Zevvbut arduino throws the generated C file through the C preprocessor with some flags to collect info, and that doesn't work when there is more then one file
17:43:48Zevvdisruptek: well, I could but it's pretty hefty. Mostly double definitions of types
17:43:56PMunchAaah
17:44:04disruptekwhy don't you run the preprocessor yourself and have it output everything?
17:44:15PMunchWhat kind of info does it try to collect?
17:44:41ZevvNot sure. it tells me it is "detecting used libraries" and "generating function prototypes"
17:44:52FromDiscord_<Rika> https://gist.github.com/de-odex/9259f8fccef94cf66eb914d6c894e5cc
17:44:58disruptekall that, huh?
17:45:00disrupteksounds amazing.
17:45:38Yardanico@Rika and how to call that macro ? with what code?
17:45:39FromDiscord_<Rika> Yardanico
17:45:46Zevvbut good idea, I run multiple CPP's, just concat the output and give that back
17:45:50Yardanicoah nvm
17:45:53disruptekyes.
17:45:56Yardanicoit errors even with simple echo "hello world" usage
17:45:58Zevvsmart boi
17:46:13disruptekdude i think ima build the cloud-kernel i always wanted.
17:46:23disrupteki think that's what nigel is gonna become.
17:47:15Yardanico@Rika as funny as it is, try to add something like "discard prototype.kind" on the line before # make sure you start with a type definition, or else...
17:47:20FromDiscord_<Rika> Yardanico, you use it like making a type except you add a colon after dType and after the type name, then omit the equals sign and the word object. No asterisks
17:47:26Yardanicoidk why that helps though, but it seems to start working XD
17:47:50PMunchZevv yeah running multiple could work
17:48:05Yardanicohttps://gist.github.com/Yardanico/87b1ec0fc31cb3c242a477dcf3267edc/revisions
17:48:11FromDiscord_<Rika> Huh?
17:48:15Yardanicoit works for you?
17:48:33FromDiscord_<Rika> Can't test it now
17:48:36FromDiscord_<Rika> I will tomorrow
17:48:40FromDiscord_<Rika> Thanks
17:49:36FromDiscord_<Rika> I will leave now, it is late. Good night
17:49:59FromDiscord_<Recruit_main_70007> here it is 18:49 :D, good night
17:50:05*nsf joined #nim
17:51:06PMunchRecruit_main_70007, yeah time-zone buddies!
17:51:21Yardanico20:50 here, also @Rika i've minimized your code and will post it as an issue
17:51:50FromDiscord_<Recruit_main_70007> Pmunch are you spanish?
17:51:58PMunchNope, are you?
17:52:11FromDiscord_<Recruit_main_70007> ye
17:52:16PMunchI'm Norwegian
17:52:55FromDiscord_<Recruit_main_70007> isnt that a bit far away for having the same time-zone?
17:54:04PMunchYes, but you are the odd ones here: https://www.timeanddate.com/time/map/
17:54:28PMunchNorway is pretty much smack in the middle of UTC+1
17:54:41FromDiscord_<Recruit_main_70007> cool
17:54:52PMunchSpain is all the way to the west in what would normally be UTC
17:54:57*Trustable quit (Remote host closed the connection)
17:55:03PMunchBordering on UTC-1
17:56:56FromDiscord_<Yardanico> @Rika https://github.com/nim-lang/Nim/issues/13296
17:56:59disbotError: not unused with a macro ; snippet at 12https://play.nim-lang.org/#ix=28Ee
17:58:04PMunchTurns out having the same time zone as your most important financial links makes sense
18:00:16FromDiscord_<Rika> Now look at China's timezone lol
18:00:31Yardanicowell at least they don't have to bother with time difference in the country lol
18:00:36Yardanicolook at russia :D
18:00:44Yardanicoeleven timezones
18:02:32PMunchAnd some are almost entirely outside the timezone that their supposed to be in :P
18:02:40Yardanicothat's true as well
18:02:56PMunchThen you have Wesh Sahara and Morocco :P
18:03:03PMunchOr New Zealand for that matter
18:04:16PMunchRussias UTC+4 time zone is also pretty odd, a small part of it is disconnected from the rest, separated by a UTC+3 timezone :P
18:04:32*ptdel quit (Ping timeout: 260 seconds)
18:06:42YardanicoPMunch: also for example I live in Tatarstan (near Kazan), and it would be better if it were in UTC+4 or at least UTC+3:30 than UTC+3
18:07:07Yardanicobut on the other side I have same time as Moscow and half of russian's population
18:07:50*floppydh quit (Quit: WeeChat 2.7)
18:09:22PMunchYeah that's handy
18:10:18*ptdel joined #nim
18:10:21PMunchI just live in the strange part of the world where time of day is slightly irrelevant since the sun is either up or down for months at a time :P
18:10:26*sagax quit (Remote host closed the connection)
18:10:34YardanicoPMunch: ohh
18:10:42*ptdel quit (Client Quit)
18:11:22PMunchRight now we're in the transition period, but the sun set around 2 today
18:14:28*uvegbot quit (Ping timeout: 245 seconds)
18:15:19*zyklon joined #nim
18:18:23leorizedisruptek: just fixed that long doc issue
18:18:47disruptekah nice, i wasn't even 100% sure it wasn't my end.
18:19:06PMunchdisruptek, just found this post on the forums again: https://forum.nim-lang.org/t/5509
18:19:23PMunchChinese chip-maker that makes Bluetooth LE chips and provides Nim SDKs
18:19:32PMunchPerfect fit for your business card idea :)
18:20:02disruptekseems like they would probably provide free hardware if we provide exposure/software.
18:21:14PMunchI mean that would be amazing, as of right now I can't find their chips available for direct sales anywhere
18:21:31disruptekearly days...
18:21:42disruptek~motd
18:21:43disbotmotd: 11recommend your favorite book on kernel design -- disruptek
18:21:46disruptekc'mon people...
18:21:53disrupteksurely someone has an opinion.
18:22:41Yardanicoask in ##linux :D
18:22:52disrupteki'm no masochist.
18:23:14disrupteki'm looking for something very much theoretical.
18:23:17FromDiscord_<treeform> NimStart, "Any reasons why simple app with text box consumes 30% CPU" I probably forgot to put a sleep some place...
18:23:19rayman22201Araq had some good ones
18:23:22rayman22201the Oberon book
18:23:38disruptekyeah, that's on my list.
18:23:52FromDiscord_<treeform> I use it mostly for games and web. Games render their screen at 144ps, that is probably what it's doing.
18:24:08Yardanicomaybe it's limited by vsync at all
18:24:17FromDiscord_<treeform> On the web its more efficient.
18:26:42rayman22201In college I used the Tanenbaum book. It wasn't bad
18:27:15rayman22201https://www.amazon.com/Modern-Operating-Systems-Andrew-Tanenbaum/dp/013359162X/ref=sr_1_1?keywords=tanenbaum&qid=1580322427&sr=8-1
18:27:42disruptekyeah, i read that long ago. the minix one.
18:27:49rayman22201yeah
18:29:02disruptekoh it was revised again in 2014.
18:29:33PMunchAraq, are you going to talk about --gc:arc in your FOSDEM talk?
18:29:33rayman22201I have my old 3rd edition. I keep it around for reference. I rarely use it though.
18:29:49disruptek!repo araq/fosdem2020
18:29:50disbothttps://github.com/Araq/fosdem2020 -- 9fosdem2020: 11Slides and source code for my FOSDEM 2020 talk "Nim - Move semantics". 15 16⭐ 1🍴
18:30:07AraqPMunch: yeah
18:30:33PMunchOkay, cool. Then I wont spend much time on that
18:31:12PMunchHuh, I get a cert error for Amazon as well..
18:31:46rayman22201I do wish you could buy from that Chinese bluetooth company. I would buy some just to support Nim hardware in principle lol
18:33:11disruptekthese old nimdoc assets render so much better than current ones, for me: https://rawgit.com/akiradeveloper/nim-fuse/master/fuse.html
18:33:35Yardanicobecause the font/text size is different?
18:33:40disruptekprobably.
18:34:27PMunchThose look terrible for me disruptek
18:34:55disrupteki figured. it seems i never have similar display requirements to others.
18:35:31*sagax joined #nim
18:35:37*sagax quit (Client Quit)
18:35:57Yardanicoalso I pushed my performance with to nim-mathexpr so that the seq of args is only set once :P https://github.com/Yardanico/nim-mathexpr/commit/3de8ff34215354abe298fb30d9454b94d44022b8
18:36:11Yardanicoalso I wonder if it's okay to write of branches like of "acos": checkArgs(); acos(arg[0])
18:36:16YardanicoI mean the usage of ";"
18:36:20Yardanicoto write 1 line instead of 3
18:38:55*abm joined #nim
18:43:17Yardanicoor maybe I should just write a simple template/macro :P
18:44:53*silvernode joined #nim
18:46:13*sagax joined #nim
18:47:44FromGitter<Vindaar> @narimiran the test failure on windows is really weird. Also fails locally. But the error only happens on one file (`tests.nim`) and only if it's compiled and run directly. Compiling first and running later works perfectly fine.
18:49:29FromGitter<Vindaar> doesn't help that there's no error aside from "execution of an external program failed"
18:49:47*marmotini_ joined #nim
18:55:07AraqVindaar: out of memory?
18:57:39FromGitter<Vindaar> @Araq: I don't see why. But I just realized that when running the test afterwards it's also failing but just silently..
18:58:11Araqstack overflow?
18:59:22*seni joined #nim
18:59:22FromGitter<Vindaar> But if oom or stack overflow happen Nim writes that as an error, no?
19:00:06Yardaniconot in release mode though probably
19:00:20*seni quit (Remote host closed the connection)
19:00:34FromGitter<Vindaar> Ok, yeah maybe. Test is compiled in debug of course though
19:02:51PMunchCrap, I can't remember how I set LibreOffice up to use Dracula..
19:03:28*Vladar quit (Quit: Leaving)
19:15:35FromGitter<Vindaar> ok, with gdb I figured out it's just a segfault. Might be running into this: https://stackoverflow.com/questions/23392755/application-segmentation-fault-only-when-compiling-on-windows-with-mingw ⏎ This is gonna be a fun one, I can feel it :P
19:19:27*ptdel joined #nim
19:19:38*marmotini_ quit (Remote host closed the connection)
19:21:51*marmotini_ joined #nim
19:23:03*marmotini_ quit (Remote host closed the connection)
19:25:19*marmotini_ joined #nim
19:25:19*marmotini_ quit (Remote host closed the connection)
19:25:36*marmotini_ joined #nim
19:31:34*marmotini_ quit (Remote host closed the connection)
19:34:11*marmotini_ joined #nim
19:34:28*marmotin_ joined #nim
19:34:55*marmotini_ quit (Remote host closed the connection)
19:35:21PMunchFFS, why is this so hard..
19:35:27*nsf quit (Quit: WeeChat 2.7)
19:43:26PMunchOkay, got a brittle setup now.. Which meant overriding one of the default styles..
19:43:50PMunchThat was a good 45 minutes wasted..
19:50:32*couven92 joined #nim
19:52:03*neceve quit (Remote host closed the connection)
20:02:24*marmotin_ quit (Remote host closed the connection)
20:35:05*disrupteq joined #nim
20:38:44*narimiran quit (Ping timeout: 268 seconds)
20:48:04*PMunch quit (Quit: leaving)
20:54:52*ptdel quit (Ping timeout: 260 seconds)
20:58:09*couven92 quit (Read error: Connection reset by peer)
20:58:38*couven92 joined #nim
21:16:23*Pqzcih5 quit (Ping timeout: 240 seconds)
21:17:55*Pqzcih5 joined #nim
21:21:22*silvernode quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
21:21:59*lritter quit (Remote host closed the connection)
21:23:40*ptdel joined #nim
21:24:36FromGitter<Varriount> PMunch: Does LibreOffice still require arcane rituals in order to behave?
21:24:52*NimBot joined #nim
21:25:51disruptekah arcane rituals. there's something so comforting about naivety; a warm blanket of ignorance that suggests that anything is possible, or even likely. masturbation as religion, baby.
21:25:59disrupteknow that's what i'm talking about.
21:27:52lqdev[m]@Varriount yes it does. I remember doing a spreadsheet recently, kept resetting my fonts until I restarted it
21:27:59lqdev[m]and the default font choice is horrendous
21:30:12FromDiscord_<Recruit_main_70007> input.mi.dwFlags = MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE;
21:30:12FromDiscord_<Recruit_main_70007>
21:30:12FromDiscord_<Recruit_main_70007> why is | not working in Nim (above code is C)
21:30:25*m|b_ joined #nim
21:30:36disrupteknim is not c?
21:31:11Yardanico@Recruit_main_70007 because you need to use "or" in Nim
21:31:23Yardaniconim doesn't have | operator
21:31:27FromDiscord_<Recruit_main_70007> ok
21:34:29nisstyreyou can do x.bitor(y) as well from the bitops module, but TBH I'm not actually sure what the difference is
21:34:48nisstyreis it that bitor uses SomeInteger ?
21:35:21nisstyreah yeah, looks like `or` is for int
21:35:37*filcuc joined #nim
21:35:54nisstyreso if you need it to work for unsigned ints as well then use bitor
21:37:53FromDiscord_<Recruit_main_70007> ok
21:46:35FromDiscord_<exelotl> bruh
21:46:35FromDiscord_<exelotl> https://cdn.discordapp.com/attachments/371759389889003532/672195907810361359/unknown.png
21:51:37FromDiscord_<Generic> welcome to ctr land
21:52:04*ptdel quit (Ping timeout: 248 seconds)
21:52:23FromGitter<zetashift> is that Nim on the 3DS? \o/
21:52:41FromDiscord_<exelotl> yeah was really easy to get running :D
21:52:57FromGitter<zetashift> that is great to hear !!
21:53:40FromDiscord_<exelotl> is anyone else doing this?
21:53:49FromDiscord_<Generic> I think someone did this years ago
21:54:01FromDiscord_<exelotl> I found some ctrulib bindings but they're 4 years old
21:54:07FromDiscord_<Generic> I tried it myself once, but lost interest
21:55:13FromGitter<zetashift> For the 3DS? Not that I know of, I do know about a year ago Nimw as able to run on the Switch
21:56:25FromDiscord_<exelotl> I'm still using --os:standalone --gc:none which runs on literally anything, curious to see if other gcs will run
21:56:35FromDiscord_<exelotl> especially arc
21:58:36FromDiscord_<Generic> the switch os is based on the 3ds os
21:58:55*sagax quit (Read error: Connection reset by peer)
22:00:12FromDiscord_<Generic> so in theory atleast parts of the os integration for the switch should only need small modifications for the 3ds
22:00:38*ptdel joined #nim
22:03:07*couven92 quit (Read error: Connection reset by peer)
22:03:34*couven92 joined #nim
22:16:30*lritter joined #nim
22:23:45*tane quit (Quit: Leaving)
22:32:55FromDiscord_<treeform> In theory --gc:arc should run anywhere --gc:none runs now.
22:33:40disruptekdude.
22:33:49disrupteklet's build a kernel that runs on aws lambda.
22:33:56FromDiscord_<treeform> I want to see how --gc:arc runs on android on iOS.
22:34:12FromDiscord_<treeform> and*
22:35:24FromDiscord_<Recruit_main_70007> any free references to building kernels (possibly in nim, but i dont care), and cross platform or windows, because i see most guides are on linux
22:36:08disruptekboth dom and alehander have poc nim kernels.
22:36:15FromDiscord_<treeform> I would like to make a library os/Unikernel in nim, sort of like includeos.
22:36:42disruptekyep.
22:37:18disruptekit only needs a very few primitives and i have most of it done.
22:37:44FromDiscord_<treeform> The ring0 switching costs are huge in modern operating systems.
22:37:55FromDiscord_<treeform> More performance and less things to crash and go wrong.
22:38:17disrupteki honestly don't care about performance.
22:38:27FromDiscord_<treeform> Recently I been experimenting with Alpine Linux - which is as minimal as one can get it looks like.
22:38:33FromDiscord_<treeform> And still ship useful software.
22:39:02disrupteki played with it when i was into docker. it works great. i have my nlvm-klee setup running on alpine.
22:39:16disruptekbut i want to go smaller.
22:39:25FromDiscord_<treeform> I am not a huge fan of docker. I want to run alpine on bare metal.
22:40:01disruptekseems imaterial to me.
22:40:12disrupteki just want to program in the cloud.
22:40:15FromDiscord_<treeform> I am all about removing layers and removing things.
22:40:43FromDiscord_<treeform> Having programmer in the cloud my entire life I want to come down to base hardware 🙂
22:40:51shashlickvscode remote doesn't support alpine yet, else it would be a awesome
22:40:55*solitudesf quit (Ping timeout: 265 seconds)
22:41:00disruptekagree, but you can have it both ways.
22:41:17FromDiscord_<treeform> well I don't think any cloud provider allows their own OS.
22:41:38FromDiscord_<treeform> GCP does not support alpine linux for example.
22:41:39*filcuc quit (Quit: Konversation terminated!)
22:41:48FromDiscord_<treeform> I ran alpine on Digital Ocean.
22:42:13disrupteki see your point now.
22:42:53FromDiscord_<exelotl> --gc:arc seems to work great!
22:42:53FromDiscord_<exelotl> https://cdn.discordapp.com/attachments/371759389889003532/672210077075243058/unknown.png
22:42:55disruptekbut i guess i got confused because i thought includeos was cloud-based.
22:43:37FromDiscord_<treeform> Idea behind includeos is its just headers you include with your program that make it an OS.
22:44:10FromDiscord_<treeform> https://github.com/includeos/IncludeOS
22:45:08disruptekokay, that makes some sense now.
22:45:15disruptekthat's not at all what i want.
22:45:16FromDiscord_<treeform> wow they seem to have figured this out: https://www.includeos.org/blog/2017/includeos-on-google-compute-engine.html
22:46:01FromDiscord_<treeform> ^ I did not know this was possible that is really cool
22:46:27*ltriant joined #nim
22:47:21disrupteki'm talking about writing nim with cloud primitives like S3Object() and SqsQueue(). not only that, but the runtime is attached directly to resources in the cloud. so when you operate on the code at runtime, you are actually twiddling the cloud in real time.
22:47:40disruptekthis is the idea that brought me to nim, btw.
22:47:53disrupteki was just looking through my notes about this today. kinda funny.
22:49:25disruptekthe key idea is that we have a REPL loop for cloud services that goes, URL -> S3 -> Lambda -> S3.
22:49:52disrupteksprinkle some input in there, too, for good measure.
22:51:30disruptekso your lambda code can be includeos-based, if it helps. that will certainly accelerate things.
22:54:11FromDiscord_<Clyybber> @exelotl nice dude
22:57:01FromDiscord_<exelotl> :D
22:58:58*ftsf joined #nim
22:59:03FromDiscord_<Clyybber> @exelotl did you try os:any too?
22:59:34FromDiscord_<exelotl> nope, don't know anything about it
22:59:56FromDiscord_<exelotl> what is it?
22:59:58Zevvbwah does optparser not support quoted values with white space in them?
23:00:24FromDiscord_<Clyybber> @exelotl Give it malloc and it gives you seqs strings and refs : )
23:01:34FromDiscord_<Clyybber> Zevv made it
23:02:19Zevvbut zevv is too stupid to parse --cflags:"-c -Wall -flto"
23:02:53FromDiscord_<Clyybber> heh
23:02:55disrupteki do this in nimph's bootstrap i think.
23:03:22disruptekoh i guess not.
23:03:33disruptekdid you escape the quote?
23:03:44Zevvof course not
23:04:12disruptekmultiple --cflags?
23:04:27Zevvno can do, orders from higher up
23:04:34Zevvbut I'm fine. I can write parsers
23:04:40Zevvjust wanted to whine a bit
23:06:17FromDiscord_<Clyybber> @exelotl This contains a bit more information: https://nim-lang.github.io/Nim/nimc.html#nim-for-embedded-systems
23:06:51FromDiscord_<Clyybber> but if it works ootb as is I guess you don't have to use it
23:07:45FromDiscord_<exelotl> `echo` didn't work with os:standalone, maybe it will with os:any
23:08:14FromDiscord_<Clyybber> nice
23:10:11FromDiscord_<Clyybber> so you could theoretically have seqs and stuff on the gba too
23:10:17FromDiscord_<Clyybber> assuming you provide a malloc free
23:10:51Zevvexolotl: it does, it requires stdout though
23:11:03Zevvbut that is trivially stubbably if you need to
23:11:25ZevvI use this to run inside the linux kernel: https://github.com/zevv/nim-linux-kernel/blob/master/src/stubs/stubs.c
23:11:33rayman22201@disruptek, the morning paper today shows a very similar idea to what you propose: https://blog.acolyer.org/2020/01/29/narrowing-the-gap/
23:13:14disruptekah, that's similar, but i'm talking about something a little more bare-cloud-metal if you will.
23:13:33rayman22201they used V8 (JS yuck) and attached it to S3, but similar ideas
23:14:18rayman22201It's actually pretty bare metal if you look at the paper
23:14:26disruptekthis would basically treat the cloud scope in which it runs as an operating system.
23:14:33rayman22201They use Seastar, and the V8 stuff is mainly for sandboxing
23:14:56disruptekthis will, like, unpack itself into the cloud and then run.
23:15:30rayman22201seastar is a multithreading runtime, but can act like an OS if you squint hard enough
23:16:42rayman22201how bare-cloud are you talking? you can only go so far unless you control the actual hardware
23:16:57disrupteki'm pretty sure i don't agree.
23:17:24disrupteki have in mind a marketplace where you can buy net-scale service from members of the marketplace.
23:17:26rayman22201You will never get access to a physical box in AWS... not without paying a lot of money
23:17:33rayman22201you will get a VM
23:17:35disruptekwhy would i need it?
23:18:00rayman22201idk? you said bare-metal?
23:18:12rayman22201I don't know what bare-metal means to you. It's a vague term
23:18:22disruptekwhat i mean is, closer to the cloud. i was trying to draw an analogy.
23:18:34disruptekthe semantics of the cloud.
23:18:40rayman22201idk what "closer to the cloud" means either :-P
23:19:00rayman22201but then again, I don't do a lot of cloud stuff.
23:19:03disruptektoday i can write a piece of nim and run it in the cloud.
23:19:15disruptekthe nim i write can also talk to the cloud.
23:19:32disruptekthe nim i write can, say, replicate itself. invoke itself in the cloud.
23:19:42disruptekwrite some data into the cloud.
23:19:54disruptekread some data from, y'know, anywhere on the net.
23:20:38disrupteki want to write nim that knows it's running in the cloud and can communicate with the cloud entities as first-class objects.
23:20:45rayman22201you can do that today already? your openAPI stuff
23:21:03disruptekwant a peta-byte of "memory"? no problem.
23:21:35disruptekyeah, that's what i'm saying. i have this kernel idea almost completely done.
23:22:20rayman22201oh... reminds me of this paper also: https://blog.acolyer.org/2019/12/09/a-persistent-problem/
23:23:03disruptekwtf is nvm?
23:23:17rayman22201non-volatile memory
23:23:30rayman22201as fast as ram, but still works when you cut power
23:23:46disruptekwow.
23:23:54disruptekthat's game-changer.
23:23:57rayman22201super experimental and expensive still
23:24:03rayman22201but I predict will get cheaper
23:24:03rayman22201yeah
23:24:22FromDiscord_<exelotl> woah
23:24:28disruptekwhen you say, "super expensive" what are we talkin'?
23:25:24FromDiscord_<exelotl> welp, --os:any fails at the C stage with "Nim_and_C_compiler_disagree_on_target_architecture" which seems odd
23:25:32rayman22201as in, unless you are a researcher at Intel or some big Chip manufacturer I don't think you can get it right now
23:25:49disruptekthis could be incredible, ray.
23:25:51rayman22201but they are already releasing research papers about it
23:26:02disruptekyou could run software on all computers at once, all the time.
23:26:47FromDiscord_<exelotl> -d:useMalloc makes a big difference even with --os:standalone though
23:27:30FromDiscord_<exelotl> I have `var list = @[5, 10, 15, 20]; list.add(25)`
23:27:56FromDiscord_<exelotl> if I don't have -d:useMalloc, the list gets zeroed as soon as I push 25 to it
23:28:24FromDiscord_<exelotl> not sure what shonky business is going on there
23:38:03*opal quit (Ping timeout: 240 seconds)
23:41:25*opal joined #nim
23:44:45*m|b_ quit (Quit: Connection closed for inactivity)