<< 08-02-2018 >>

00:34:27*zolk3ri quit (Remote host closed the connection)
00:39:28*nekits joined #nim
00:39:56*ieatnerds quit (Ping timeout: 256 seconds)
00:40:19*yglukhov joined #nim
00:45:05*yglukhov quit (Ping timeout: 260 seconds)
01:21:15FromGitter<Quelklef> What's the best real "toy language" out there?
01:21:52FromGitter<Quelklef> i.e. I'm playing with a language-agnostic idea for a preprocessor; what language would be small and simple enough to write a full preprocessor for
01:22:01FromGitter<Quelklef> while still having the same functionality as any other language
01:27:26skrylarsmalltalk :>
01:28:28skrylarpreprocessors are agnostic to what they are preprocessing, though. you're thinking of a meta compiler as in ocaml_p4
01:28:44skrylargcc -E, m4, awk, etc, they don't care
01:29:25FromGitter<Quelklef> OTOH, SASS is a preprocessor but isn't language-agnostic
01:29:44FromGitter<Quelklef> regardless, thanks for the suggestion. Time to learn Smalltalk : )
01:55:59*livcd quit (Ping timeout: 256 seconds)
02:21:18*d10n-work joined #nim
02:22:19*chemist69 quit (Ping timeout: 265 seconds)
02:34:50*livcd joined #nim
02:35:47*chemist69 joined #nim
02:49:34*yglukhov joined #nim
02:53:40*yglukhov quit (Ping timeout: 240 seconds)
02:56:34*endragor quit (Remote host closed the connection)
02:56:49*endragor joined #nim
03:06:14*arecaceae quit (Remote host closed the connection)
03:06:36*arecaceae joined #nim
03:10:05*dddddd quit (Remote host closed the connection)
03:20:05skrylarsometimes i wonder if there is a point to reimplementing some things
03:20:26skrylari mean is the added understanding of the algorithms worth more than just slapping some python toolkits together and 'being done'
03:20:59FromGitter<Quelklef> ...........?
03:22:56skrylarOh, just dealing with some machine learning algorithms
03:23:53skrylarEveryone's all in to deep neural nets but some stuff i've been reading suggests HMM-based systems are more effective for less compute
03:24:53skrylarthe voice sector seems to be competing for HMM (extremely efficient, but cell phone quality) and deep nets (sounds good, impractical performance)
03:25:21*rockcavera quit (Remote host closed the connection)
03:32:17*rockcavera joined #nim
03:45:48*rinzai quit (Ping timeout: 256 seconds)
03:48:57*rinzai joined #nim
03:51:35*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
03:53:32*rinzai quit (Ping timeout: 255 seconds)
03:59:07FromGitter<honewatson> @Quelklef there is moonscript which I really like as a scripting language. Nice and simple. https://github.com/leafo/moonscript
04:00:08FromGitter<honewatson> Also there is Min https://min-lang.org/ though I would not call either toy languages since I think both are great even though they are simple
04:03:59FromGitter<Quelklef> I think I'm gonna use JS so that maybe in the future I'll be able to make actual use of the project
04:04:05FromGitter<Quelklef> although Min looks interesting
04:18:00*rinzai joined #nim
04:22:20*rinzai quit (Ping timeout: 255 seconds)
04:32:40skrylari thought arrays in raw mem were array[(y * ydim) + x] and yet i'm getting the wrong values even when using that for input and output
04:32:42*skrylar headscratches
04:44:58*skrylar quit (Remote host closed the connection)
05:17:08*radagast_04 joined #nim
05:24:38radagast_04imo, as a Nim user, you should be proficient with C as well. You may find yourself porting C codebases with C2Nim
05:58:12*darithorn quit (Quit: Leaving)
06:04:47*Lord_Nightmare quit (Ping timeout: 248 seconds)
06:05:47*rinzai joined #nim
06:07:20*Lord_Nightmare joined #nim
06:13:28*rinzai quit (Ping timeout: 268 seconds)
06:15:59*nsf joined #nim
06:20:02*d10n-work quit (Quit: Connection closed for inactivity)
06:30:41Araqradagast_04: nah, Nim should have enough of a library ecosystem to require no C knowledge (we're not there yet though)
07:08:06FromGitter<gogolxdong> How to set charset of db_mysql client ? meet error when using setEncoding("utf8") except latin1 .
07:08:55*solitudesf joined #nim
07:15:44FromGitter<gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a7bf91f4a6b0dd32ba3e16b]
07:16:08FromGitter<gogolxdong> We have set everything we know.
07:20:39FromGitter<gogolxdong> well , solved , seems setEncoding() should use the same charset with client or connection
07:36:38*rinzai joined #nim
07:40:49*rinzai quit (Ping timeout: 248 seconds)
07:41:12*hogeland_ joined #nim
07:43:34*hogeland_ quit (Client Quit)
07:49:00*hogeland quit (Quit: leaving)
07:50:47*hogeland joined #nim
07:58:04*yglukhov joined #nim
08:02:27*yglukhov quit (Ping timeout: 260 seconds)
08:04:40*yglukhov joined #nim
08:05:03*yglukhov quit (Read error: Connection reset by peer)
08:05:19*yglukhov joined #nim
08:07:45*gokr joined #nim
08:08:08*j_rod_s quit (Quit: j_rod_s)
08:08:20*j_rod_s joined #nim
08:27:45FromGitter<mratsim> @Quelklef Regarding speed, and "Nim is designed to be fast, but no compiler will ever be smart enough to outperform handwritten code in the language it compiles to ⏎ (Given that the programmer is experienced in that language)”. The biggest issue is maintenance time. People have to write handwritten assembly for a lot of stuff (video processing, matrix multiplications, etc) however each time Intel/AMD/ARM release a
08:27:45FromGitter... new feature you need an expert to revisit the stuff while with compiled language you can expect GCC/LLVM to get better
08:30:35*rinzai joined #nim
08:34:57*rinzai quit (Ping timeout: 240 seconds)
08:35:33*Yardanico_ joined #nim
08:38:51Araq" but no compiler will ever be smart enough to outperform handwritten code in the language it compiles to"
08:39:03Araqthat's just bullshit.
08:39:41AraqGCC produces better asm than most people. Nim produces C code free of undefined behaviour. well it could.
08:40:02*Yardanico_ quit (Read error: Connection reset by peer)
08:40:13Araqthe opposite is true, no human being will ever be as effective as a machine at what the machine was built to do.
08:40:50AraqGCC doesn't become bored half-way through register allocation
08:41:14*PMunch joined #nim
08:48:58FromGitter<alehander42> that would be an amusing ML idea,gcc .. with feelings
08:49:27PMunch"I'm sorry Dave, I can't let you do that"
08:50:41FromGitter<mratsim> Actually it reminds me AMD ads from December about Machine Instinct, let me find it
08:50:47FromGitter<alehander42> My God, it's full of *
08:51:59FromGitter<mratsim> https://www.youtube.com/watch?v=pmg9zXZinh4
08:53:52*Arrrr joined #nim
08:53:52*Arrrr quit (Changing host)
08:53:52*Arrrr joined #nim
08:58:43FromGitter<alehander42> this is so over the top, amazing
09:01:00FromGitter<survivorm> @Araq https://hackernoon.com/why-funding-open-source-is-hard-652b7055569d
09:01:43FromGitter<survivorm> Great article, may help to get more money to nim, to sustain more core developers
09:01:47FromGitter<mratsim> At least AMD marketing team is in shape because they were so quiet in the past years
09:03:57*sleepyqt joined #nim
09:05:51*wurui joined #nim
09:07:15*sendell joined #nim
09:08:00FromGitter<k0pernicus> What is the state of Tail Call/Tail recursion optimization in Nim? ⏎ I tried to run (`release` build) a recursive program that compute the hanoi towers and returns the number of switches, and it seems it performs like the C build (with -O2 flag). ⏎ I tried also with Rust, and it seems the Rust compiler (LLVM IR) is rewriting the recursive function as an iterative function (I have a little knowledge in asm, so is
09:08:00FromGitter... it highly possible I made a mistake in my hypothesis)...
09:08:14FromGitter<k0pernicus> (https://files.gitter.im/nim-lang/Nim/D143/Capture-d_ecran-2018-02-08-a-10.06.07.png)
09:09:22*Vladar joined #nim
09:10:02FromGitter<mratsim> @k0pernicus There is none but it might be possible with a macro
09:11:02FromGitter<k0pernicus> Ok - so it seems `clang` does not optimized much the C code with `-O2`...
09:11:18*wurui quit (Read error: Connection reset by peer)
09:14:28*radagast_04 quit (Ping timeout: 256 seconds)
09:14:45*radagast_04 joined #nim
09:21:02*BitPuffin joined #nim
09:22:31PMunchsurvivorm[m], hi did you see the link I posted yesterday?
09:24:14*skelett joined #nim
09:24:20*Ven`` joined #nim
09:24:33*rinzai joined #nim
09:24:37PMunchhonewatson, Quelklef: Min is pretty neat, but you've got to be comfortable with stack based computers or RPN to really be able to do anything in it :P
09:24:47*skelett quit (Client Quit)
09:26:46*skelett joined #nim
09:27:07FromGitter<alehander42> stack-based languages are very fun for langdev experimentation indeed
09:28:35*rinzai quit (Ping timeout: 240 seconds)
09:28:44*Ven`` quit (Ping timeout: 252 seconds)
09:29:43PMunchalehander42, yeah stack based is fun. I've used RPN calculators my entire life and there's something nice about having a language that works the same way
09:30:13PMunchThat's actually one of the things on my todo list, create a good RPN calculator in Gtk
09:30:23PMunchOr whatever toolkit, but for desktops
09:30:30PMunchMaybe even port it to Android as well
09:35:21FromGitter<alehander42> yeah, I can see the appeal
09:36:12FromGitter<alehander42> simple "teaching" stack-based vm-s are also very fun to create, I remember once I did it in prolog, and it was the most obvious and declarative thing I've ever written
09:45:52FromGitter<survivorm> @PMunch i had. But i've got no time to actually read it yet. Once i'll be able to do it, i'll give you the ffedback
09:46:16FromGitter<survivorm> And, of cource, you have my thanks
09:47:30PMunchHaha, don't thank me before you've read it :P
09:48:00PMunchJust to warn you, it's a first draft. I just typed it up as I read along and skipped a couple things I wanted to ask you about
09:55:18FromGitter<survivorm> feel free to do it any time i'm here :)
09:59:58PMunchI don't quite remember what it was that I was going to ask you, have to read my notes to rememeber :P
10:00:55FromGitter<survivorm> Just some off top, @PMunch do you like good sci-fi (as you like space and science)?
10:01:06PMunchSure do :)
10:01:19PMunchI probably like some bad sci-fi as well :P
10:01:35FromGitter<survivorm> Then take this: http://samlib.ru/t/tokanawa_t/weboflight.shtml
10:01:59FromGitter<survivorm> it's unfortunately more like a teaser, cause author is russian
10:02:21PMunchOhh, I'll be sure to check it out once I get back from lunch :)
10:02:52FromGitter<survivorm> but it's a great read, joriginal has 5 +3 volumes
10:03:04FromGitter<survivorm> i've read it non-stop
10:04:00FromGitter<survivorm> If you'd like a teaser, you may take a google translation on the other parts. It may be painful, but you'll understand it, at least ^)
10:18:25*rinzai joined #nim
10:20:02*Yardanico_ joined #nim
10:32:16FromGitter<94JerryZhou> How to avoid data duplication when inserting data into mysql with nim ?
10:38:11Araqyou use an "update or insert" query
10:38:43Araqhttps://stackoverflow.com/questions/4205181/insert-into-a-mysql-table-or-update-if-exists
10:38:53AraqINSERT INTO table (id, name, age) VALUES(1, "A", 19) ON DUPLICATE KEY UPDATE
10:38:53Araqname="A", age=19
10:39:04*Yardanico_ quit (Read error: Connection reset by peer)
10:56:14*skelett quit (Ping timeout: 255 seconds)
11:06:59*xet7 quit (Ping timeout: 256 seconds)
11:13:37yglukhovIs there a term for wrapping a call to an argless lambda, evaluating the args, but not the call itself?
11:15:16PMunchWhat?
11:15:49PMunchAn argless lambda with arguments?
11:16:09PMunchOr are you thinking of partially applied functions?
11:16:39FromGitter<survivorm> that's a little more complicated, if i understand correctly
11:16:51FromGitter<survivorm> he's speaking about closure
11:17:50FromGitter<survivorm> there are evaluated args for function call, but we give up only argless call, which will call a func with evaluated args
11:18:07FromGitter<survivorm> Am i correct, @yglukhov ?
11:19:26FromGitter<survivorm> When i speak it like this, i think it's really partially applied function :)
11:20:05*xet7 joined #nim
11:20:05FromGitter<survivorm> just the case then we specify all args
11:22:11euantorRather than `INSERT ... ON DUPLICATE`, you can use MySQL's `REPLACE INTO...` if you use proper keys in your tbale (hint: you should)
11:23:10*skelett joined #nim
11:23:59*Arrrr quit (Ping timeout: 256 seconds)
11:25:05*Ven`` joined #nim
11:26:58PMunchsurvivorm, well partially applied is just a superset of what you described
11:27:44PMunchInstead of having to pass all the arguments you can pass some of them and get a closure back that wraps the ones you passed and takes the rest of them
11:27:57*solitudesf quit (Ping timeout: 264 seconds)
11:29:11*vlad1777d joined #nim
11:29:53*Ven`` quit (Ping timeout: 276 seconds)
11:41:29*dddddd joined #nim
11:42:07*chemist69 quit (Ping timeout: 256 seconds)
11:50:59rinzaihi everyone. nim -> js question: after defining an `var foo: Interval` with `dom.setInterval` how do I actually call it?
11:54:06rinzainevermind
11:54:35rinzaiI was thrown off by the fact that the compiler warns about an "unused variable foo: Interval"
11:54:40rinzaibut it works on the browser
11:54:48yglukhovsurvivorm, PMunch: having a call like foo(a.a, b.b, v[bar()]), i want to produce a proc of type proc() that calls this foo, but i want the arguments like v[bar()] to be evaluated on proc creation.
11:55:31FromGitter<survivorm> yeah, it's partial apply
11:55:47*chemist69 joined #nim
11:55:51FromGitter<survivorm> in python it's functools.partial
11:57:06yglukhovindeed, looks like it. thanks. now is there any nim impl for that...
11:57:31PMunchHmm, not as far as I know..
11:57:46PMunchBut it would be fairly easy to do with a macro I believe
11:57:53*Vladar quit (Remote host closed the connection)
11:58:04yglukhovtrue
11:58:25PMunchhttps://rosettacode.org/wiki/Currying#Nim
11:59:02PMunchI mean if it's only for one particular procedure you could just write a procedure to do it for you
11:59:04yglukhovyeah, there's also a curring lib for nim which allows haskel-like functions.
11:59:26yglukhovhttps://github.com/t8m8/currying
11:59:27PMunchBut if you want a general case thing then implementing it as a macro is probably your only choice
11:59:57PMunchOh wow, that's cool
11:59:58yglukhovi think nim should have some more higher level metaprogramming helpers like this...
12:00:05PMunchDidn't know of the currying library
12:01:00FromGitter<alehander42> well just importing a library is cool too
12:01:11PMunchyglukhov, yeah. The powers that metaprogramming brings with it can be a bit inconvenient to harness
12:02:16PMunchOh, the implementation of the currying thing is pretty neat
12:02:37PMunchIt just takes all the arguments and creates procedures that takes the various amount of arguments
12:03:21*vlad1777d quit (Ping timeout: 264 seconds)
12:03:39yglukhove.g. this typedParams func is implemented there, and i used to implement it like 4 times in different libs, like iterators and like functions. i mean it would be really useful to have such an iterator in stdlib
12:05:15yglukhovalso different proc introspection stuff, like make a tuple of types of function args, apply function to a such tuple, etc. thats pretty basic to reside in stdlib imo
12:14:38FromGitter<Quelklef> @mratsim yeah, that's a really good point that hadn't occurred to me when I was writing. I was mostly concerned with theoretical results rather than realistic ones
12:18:07FromGitter<Quelklef> @Araq you're right, once we concern ourselves with code flexibility, portability, and comprehensiveness in comparison to programmer effort and time spent. I was mostly concerned about what is *possible*, which I suppose is a bit of a naive viewpoint
12:21:16FromGitter<Quelklef> Or rather not what is possible but I just didn't really concern my argument with time or effort or anything else human besides intelligence. It did occur to me slightly later, and I noted it in the chat
12:22:42Araqwe had Nim programs run faster than C programs
12:23:01Araqthe C run as fast once it was uglified to what Nim produces
12:23:41Araqno C programmer would have written the program in this way without Nim's results.
12:24:05FromGitter<alehander42> @Quelklef the argument about development speed is bigger than you imagine, loads of people use python/ruby etc which are magnitudes slower because even that kind of slowdown(more servers) is cheaper than development time
12:29:50*sleepyqt quit (Quit: Leaving)
12:30:53FromGitter<Quelklef> @Araq really? That's crazy, can you link? Is it a case of bad C or is the compiler really that good
12:32:04Araqyes really, more details are in some old forum post
12:32:32FromGitter<Quelklef> @alehander42 sure, I don't disagree with that, but it also wasn't my argument. As a bit of a tangent, I always found Python a bit slow to develop because debugging is a chore
12:32:46AraqC is not mystical, it goes through an optimizing compiler backend that tries to remove much of C's misfeatures
12:32:58Araq(pervasive aliasing, for example)
12:33:10Araqthe result is hard to reason about performance wise
12:33:32Araqeverything else is a lie.
12:34:04FromGitter<Quelklef> What do you mean by those last two lines?
12:34:36Araqit's just not true that C is a "portable assembler". the mapping to machine code is far from obvious with today's compilers
12:36:54Araqyou really don't get benefit by writing C by hand. Nor by writing LLVM bit code by hand. it's bullshit.
12:39:57FromGitter<Quelklef> Except for for educational purposes. But on a more serious note, you've definitely changed my opinion on this and I'd be curious to see that forum post
12:40:14AraqC is a primitive tedious language to work in with an atrocious type system which has never been copied by any language in widespread use.
12:44:07FromGitter<Quelklef> This is a bit of a nonsequiter but the type system is necessary to provide the amount of memory control you get right!
12:44:12FromGitter<Quelklef> ?*
12:45:32*Snircle joined #nim
12:48:22FromGitter<alehander42> despite its problems, C is sometimes a "simpler and more reasonable C++" honestly (but I am not a big fan of both)
12:56:02*rinzai quit (Ping timeout: 256 seconds)
12:58:31yglukhovHow do i create an anonymous tuple with 1 field? So that i can index it? e.g. (1, 2)[0] == 1, but (1) == 1
12:59:24AraqQuelklef: The type system could be better for optimizers ;-)
12:59:42Araqyglukhov, you can't :-)
13:00:33yglukhovbummer
13:01:43yglukhovis there a case when (smth) == smth is useful?
13:03:25yglukhov(1,) == 1 as well, even though there's a comma
13:04:02FromGitter<GULPF> there's an issue for that one
13:04:08FromGitter<GULPF> https://github.com/nim-lang/Nim/issues/1987
13:04:47yglukhovoh cool, thanks
13:05:22yglukhovthe fact its not closed makes me believe its gonna be fixed =)
13:06:06yglukhovon the other hand its more than 2 years old... :D
13:10:05*rinzai joined #nim
13:12:57Araqare you serious?
13:13:11Araqdon't want to be able to influence operator precedence with () ?
13:13:26AraqQuelklef: one example https://forum.nim-lang.org/t/1779/3
13:14:12Araqis there a case when 1 field tuples are useful in a statically typed environment?
13:14:17FromGitter<alehander42> is there a way to get line/path of argument of a macro? I want to be able to somehow preserve the corresponding source code
13:14:39Araqthere is, check lineInfo procs
13:14:44*rinzai quit (Ping timeout: 256 seconds)
13:17:20yglukhovAraq: collecting function arguments to a tuple in a macro
13:18:26yglukhovbut ok, its not that big deal for my particular use case
13:18:37Araqit doesn't have to be a tuple then
13:18:47yglukhovwhat else?
13:18:56Araqyou produce () nnkPar and if n.len == 0 you skip the accessor generation
13:19:04Araqer, n.len == 1, that is.
13:20:08*endragor quit (Remote host closed the connection)
13:20:44*endragor joined #nim
13:21:13yglukhovwell so it has to be a (tuple or argtype). and requires special handling. anyways like i said, not a big deal. in my particular case i just always append newlit(0) to the end of the tuple =)
13:21:58yglukhovbut looks like i've just found another bug.
13:25:19*endragor quit (Ping timeout: 248 seconds)
13:25:20FromGitter<Quelklef> @Araq super cool, thanks for the example
13:37:34*rinzai joined #nim
13:53:57*couven92 quit (Quit: Client disconnecting)
14:23:10*gokr quit (Ping timeout: 240 seconds)
14:27:56*sendell quit (Remote host closed the connection)
14:39:11*SusWombat joined #nim
15:05:30*solitudesf joined #nim
15:26:24*Ven`` joined #nim
15:34:12*d10n-work joined #nim
15:37:55PMunchHaha yglukhov's quote from that forum post: "AST macros [...] is the gatling laser gun feature that should blow the minds of the most pervert metaprogramming junkies."
15:38:11*gokr joined #nim
15:38:11PMunchPut that on the flier next time :P
15:45:35*Ven`` quit (Ping timeout: 248 seconds)
15:54:39FromGitter<alehander42> that's pure poetry
16:08:53federico3:D
16:16:02*gokr quit (Ping timeout: 255 seconds)
16:18:29*arnetheduck quit (Ping timeout: 265 seconds)
16:18:29*acidx quit (Read error: Connection reset by peer)
16:18:47Araqhere is a puzzle for you
16:18:53Araqhttps://github.com/google/boringssl/blob/master/crypto/bio/bio.c#L71
16:19:07Araqhttps://github.com/google/boringssl/blob/master/crypto/bio/bio_mem.c#L69
16:19:27AraqBIO_new_mem_buf calls BIO_new and uses the 'ptr' field
16:19:50Araqthe 'ptr' field can only be NULL though
16:21:27PMunchUhm..
16:21:28PMunchWhat??
16:22:05PMunchAh
16:22:10PMunchline 83
16:22:12federico3PMunch: don't spoiler
16:22:17PMunchOh, woops
16:28:15*Jesin joined #nim
16:29:24yglukhovAraq: method->create(ret) and mem_new fills it in?
16:29:51yglukhovline 113
16:29:51Araqyglukhov, that's pretty much the only solution, right?
16:30:14yglukhovat least the first that comes to mind
16:30:16PMunchI've figured it out
16:30:16yglukhovwhy?
16:30:20PMunchHold on a sec
16:31:25*yglukhov quit (Remote host closed the connection)
16:31:58*yglukhov joined #nim
16:33:21*nsf quit (Quit: WeeChat 2.0.1)
16:35:13*sp33der89 joined #nim
16:35:20*sp33der89 left #nim ("Leaving")
16:36:46PMunchSPOILER: http://ix.io/FuK/
16:36:55*yglukhov quit (Ping timeout: 268 seconds)
16:37:00*Trustable joined #nim
16:37:01PMunchThat's how it works
16:38:24PMunchDon't drink and code kids
16:40:33AraqOpenSSL -- when Java's OOP doesn't cut it
16:41:07federico3clever and tricky code in a crypto lib - what could possibly go wrong?
16:41:29PMunchIt appears to be someone trying to emulate an interface in C, kinda similar to how you would do it in Nim really (like a Stream for example)
16:41:40PMunchfederico3, haha exactyl
16:42:04Araqmy streams are not an exercise in code obfuscation
16:42:23PMunchOh no, that's not what I meant. In Nim it's pretty obvious what you are doing
16:42:47PMunchThis C solution is a bit less readable to say the least :P
16:53:18*PMunch quit (Quit: Leaving)
16:56:06*dddddd quit (Remote host closed the connection)
16:59:37FromGitter<krux02> Does nim have a compilation cache for generic functions?
17:02:15FromGitter<krux02> I am just asking because glm is entirely generic, and when generic functions are not chached at all, incremental compilation might become expensive at some point.
17:04:48*Melon_Melon joined #nim
17:06:56Melon_Melonhi guys, i am going to stick with Common Lisp :D, i think. I may learn Nim when it is 1.0 or 2.0. And Rust :/ well i don't know, i don't feel like i want to learn Rust.
17:07:19Melon_MelonThen, i am going to be a Common Lisp programmer
17:07:49Melon_MelonI am the" pony lang guy", just letting you to know that i choose Common Lisp
17:08:04Melon_MelonNOT rust
17:11:33*heinrich5992 joined #nim
17:11:36heinrich5992I Changed my mind, i never gonna learn Nim, Nim's community sucks honestly, and Nim will never be a good language, maybe in 10 years who knows, i would rather learn Rust that has a good community
17:12:18federico3was that the usual troll?
17:16:45*Nim-ogre joined #nim
17:16:48FromGitter<krux02> federico3: I think so
17:16:48Nim-ogreAlso, Common Lisp is much better than Nim-Ogres (yeah Nim is for Ogres like the guy who is constantly banning me because he can't stand my opinion), Common Lisp is a real programming language, Not a toy language like Nim.... And i am going to master Common Lisp to create games, game servers and DoS tools (Common Lisp + C).
17:17:21FromGitter<krux02> Ogres?
17:17:45FromGitter<krux02> DoS tools?
17:17:51FromGitter<krux02> like MS DOS tools?
17:19:30FromGitter<krux02> Nim-ogre: Did you know that Python startey as a toy project for someone just to have something to do over christmas holydays? Now look what it became.
17:21:11FromGitter<krux02> Nim-ogre: Did you know that nobody is banned just for an opinion. But people get banned because of the way those people express their opinion?
17:21:54federico3please don't feed the trolls
17:21:56FromGitter<Quelklef> Why's this guy keep coming back
17:23:22FromGitter<krux02> I like arguing with my-programming-language-is-better-than-yours-people
17:23:33*natrys joined #nim
17:24:04*foobar_baz joined #nim
17:24:33*foobar_baz quit (Client Quit)
17:24:38FromGitter<krux02> I have enough experience to say that every programming language sucks. And there is no programming language objectively better than another language at least not what that language has a decent amount of history.
17:24:59*gokr joined #nim
17:25:06FromGitter<Quelklef> Take this: brainfuck is the best language because it manages to be the most minimal while still being Turing complete. That makes it the most elegant and the best
17:25:34FromGitter<krux02> @Quelklef thank you, you understand my point.
17:25:44FromGitter<Quelklef> : )
17:26:48*Gay-Araq joined #nim
17:27:24FromGitter<krux02> I really think there is little space for new programming languages. People don't want new programming languages. At least not until they saw the limits and the frustration in their language.
17:27:46FromGitter<krux02> But even frustration sometimes makes people defend their language because they had to go though all of that.
17:29:02FromGitter<krux02> I program entirely in emacs lisp now.
17:29:12FromGitter<krux02> :P
17:29:40FromGitter<krux02> Who needs applications when you can spend the entire productivity into optimizing your workflow.
17:29:54*sleepyqt joined #nim
17:38:34*darithorn joined #nim
17:38:38*Arrrr joined #nim
17:41:46*nsf joined #nim
17:53:50Arrrr"And i am going to master Common Lisp to create games" underaged detected
17:58:04*SusWombat quit (Quit: Leaving)
18:09:27*gokr quit (Ping timeout: 240 seconds)
18:17:07*vivus joined #nim
18:19:37*Jesin quit (Quit: Leaving)
18:37:24*acidx joined #nim
18:50:12*rockcavera quit (Ping timeout: 256 seconds)
19:01:07FromGitter<alehander42> i have to admit common lips is still a cooler choice than the previous ones
19:01:35FromGitter<alehander42> one day he might find out about prolog or idris or something
19:01:39*rockcavera joined #nim
19:03:18Araqor maybe he grows up one day
19:05:43FromGitter<alehander42> :D I think he'll be bored of this max month from now
19:08:08*gokr joined #nim
19:25:29*mgdelacroix quit (Ping timeout: 255 seconds)
19:26:15*xet7_ joined #nim
19:26:26*Syneh__ quit (Ping timeout: 276 seconds)
19:26:59*enigmeta quit (Ping timeout: 265 seconds)
19:27:57*xet7 quit (Ping timeout: 265 seconds)
19:28:29*mgdelacroix joined #nim
19:30:14*Syneh__ joined #nim
19:30:29*enigmeta joined #nim
19:31:00*Arrrr quit (Ping timeout: 256 seconds)
19:44:48*scriptum quit (Quit: Leaving)
19:45:10*scriptum joined #nim
19:47:51FromGitter<zacharycarter> Okay stupid question - can I somehow use an emoji in my code? Like assign it as a value to a variable?
19:50:45FromGitter<zacharycarter> ah I see I just need to use double quotes around it
19:50:57FromGitter<Quelklef> ... but why
19:51:59FromGitter<zacharycarter> I'm writing a project for a hackathon at work in Nim. I need to hash some arbitrary data for the example, so I want to just use an emoji as the input data - so that I'm reviewing the code with non technical folks they will think - oh cute, that's a fox emoji!
19:52:02FromGitter<zacharycarter> I work for carfax btw
19:52:07FromGitter<zacharycarter> thus the fox emoji
19:55:06FromGitter<Quelklef> Ah
19:55:21FromGitter<Quelklef> also, I misread that as you wanting to use an emoji as an identifier which was partially why I was baffled
19:56:42FromGitter<zacharycarter> oh haha nope not htat
19:56:45FromGitter<zacharycarter> that*
19:57:52FromGitter<zacharycarter> actually, interestingly enough, `const 🦊 = "🦊"` is valid Nim code
20:03:15*natrys quit (Quit: natrys)
20:05:19FromGitter<Quelklef> Yessss that's how you know a language is well-made
20:05:26FromGitter<zacharycarter> right?
20:05:46dom96!eval let 👑 = "Nim"; echo 👑
20:05:49NimBotNim
20:05:52dom96:D
20:07:54*xet7_ is now known as xet7
20:14:33*Trustable quit (Remote host closed the connection)
20:24:10federico3valid... by design?
20:24:46*thor77 joined #nim
20:26:25thor77Hey, i just started looking at nim a few days ago and so far I really like it. I'm already starting to mess with it's metaprogramming-features and got a question: Is there any way to generate (that seems to be possible) and execute a NimNode at runtime?
20:27:57thor77I'm trying to implement something similar to this (http://howistart.org/posts/nim/1/index.html, brainfuck -> nim compiler) but would like to allow for dynamic input. is there any way to do that?
20:28:43thor77If you need to see some code to understand my "problem", just let me know and I'll get smth together
20:35:27FromGitter<tim-st> does someone knows if `val != 0` is quicker than `val >= 0` when compiled? I'm asking because `>= 0` is used in `strutils`where `!= 0` can be used
20:37:21dom96thor77: Whatever NimNode your macro returns will be included in your program and executed
20:37:43dom96That's I suppose the fundamental way that macros work in Nim
20:37:52thor77dom96: but if I use a macro, I can't give it runtime arguments, can I?
20:38:00dom96yeah, you can't
20:38:10thor77yeah, that's what i would like to do
20:38:14dom96Your macro should generate code that acts on these arguments
20:38:47thor77hm, that's hard in that case, i guess, because the generated code is dependent on the input
20:39:24dom96If you want a BF -> Nim compiler then you need to supply the BF at compile-time
20:39:43thor77there's no way arround that?
20:40:50dom96Hrm, I guess you could create a procedure that generates NimNodes
20:40:56dom96and then run that at runtime
20:41:22dom96Not sure if that's allowed though
20:42:31dom96But if your aim is to make a Brainfuck -> Nim -> Executable compiler then you may as well write a small wrapper CLI app that creates a new .nim file which calls your macro, then executes the Nim compiler on the .nim file.
20:42:44dom96If that makes sense
20:43:11thor77that makes sense, yeah, thank you :)
20:44:04thor77i've already got a procedure generating a nimnode now, but i can't find a way to execute it
20:44:16thor77so i could probably just write it's code to a file and execute that
20:45:04thor77oh, it seems like newStmtList can only be called at compiletime
20:46:19thor77so that doesnt work
20:47:25FromGitter<tim-st> I checked my question using: https://godbolt.org/ ; `!=` is quicker
20:47:52dom96tim-st: by how much?
20:47:59FromGitter<tim-st> one op
20:48:18FromGitter<tim-st> but I'm not sure if my understanding of asm is correct
20:48:29FromGitter<tim-st> // Type your code here, or load an example. ⏎ int cmp1(int num) { ⏎ ⏎ ```return num != 0;``` ⏎ ... [https://gitter.im/nim-lang/Nim?at=5a7cb79cce68c3bc7461c9da]
20:57:59FromGitter<tim-st> (at least on gcc; on clang they have the same number of operations)
20:58:48*clyybber joined #nim
20:59:35*clyybber quit (Client Quit)
20:59:45*clyybber joined #nim
21:08:14FromGitter<tim-st> Wow... I just noticed the gcc guys cannot reduce `>=` to `>` so `>=` has badder performance than `>`
21:14:37*rinzai quit (Ping timeout: 260 seconds)
21:16:40*scriptum quit (Quit: Leaving)
21:28:07*nsf quit (Quit: WeeChat 2.0.1)
21:30:00*radagast_04 quit (Ping timeout: 256 seconds)
21:32:54*dddddd joined #nim
21:45:23FromGitter<Quelklef> Why would they be able to?
21:45:38*clyybber quit (Quit: good night)
21:45:54*dddddd quit (Quit: Hasta otra..)
21:46:16*dddddd joined #nim
21:55:51FromGitter<zacharycarter> is there any way to alias a type declared in another module being imported?
21:56:14*darithorn quit (Quit: Leaving)
21:56:59FromGitter<mratsim> `type Foo = ImportedFoo`?
21:58:50FromGitter<zacharycarter> hrm it's more to avoid namespace conflicts
21:59:00FromGitter<zacharycarter> I'm importing jester and it defines a REquest object
21:59:17FromGitter<zacharycarter> and asynchttpserver which I need to import to get the websocket package working, also declares a Request type
21:59:31FromGitter<zacharycarter> so the module names are causing a naming conflict when I'm using the routes macro jester provides
22:01:55*rinzai joined #nim
22:06:10*rinzai quit (Ping timeout: 240 seconds)
22:07:39FromGitter<zacharycarter> using - `from asynchttpserver import nil` and then fully qualifying everything works
22:08:55*solitudesf quit (Quit: solitudesf)
22:09:22*yglukhov joined #nim
22:13:36*yglukhov quit (Ping timeout: 252 seconds)
22:14:43*rinzai joined #nim
22:31:52FromGitter<Quelklef> I think you can do something like
22:32:12FromGitter<Quelklef> From X import Y excluding Z
22:56:58FromGitter<mratsim> or `import asynchttpserver as srv` and then `srv.request`
23:01:36*skrylar joined #nim
23:19:04*yglukhov joined #nim
23:19:18*gokr left #nim (#nim)
23:23:27*yglukhov quit (Ping timeout: 256 seconds)
23:48:18*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)