<< 04-12-2017 >>

00:00:25*arnetheduck joined #nim
00:07:22*arnetheduck quit (Ping timeout: 260 seconds)
00:08:00*xkapastel quit (Quit: Connection closed for inactivity)
00:12:39*madpat quit (Read error: Connection reset by peer)
00:12:41*madpata joined #nim
00:19:26*gokr quit (Ping timeout: 276 seconds)
00:19:37FromGitter<Varriount> PMunch: What format is it parsing?
00:20:31*madpata quit (Quit: Have a good day! :))
00:22:05*madpat joined #nim
01:33:52*xkapastel joined #nim
01:43:02*smt` quit (Ping timeout: 260 seconds)
02:10:13*vivus quit (Quit: Leaving)
02:24:00*MJCaley joined #nim
02:35:17*MJCaley quit (Quit: MJCaley)
02:41:22*chemist69 quit (Ping timeout: 260 seconds)
02:55:01*chemist69 joined #nim
02:59:42*couven92 quit (Quit: Client Disconnecting)
03:08:06*epr0xe joined #nim
03:22:10*endragor joined #nim
03:36:20*madpat quit (Ping timeout: 255 seconds)
03:37:10*madpat joined #nim
03:41:53*skrylar joined #nim
03:48:08*epr0xe quit (Remote host closed the connection)
04:18:52*endragor quit (Remote host closed the connection)
04:19:21*endragor joined #nim
04:58:32*dddddd quit (Remote host closed the connection)
06:29:17*planetis[m] quit (Ping timeout: 276 seconds)
06:29:17*Miguelngel[m] quit (Ping timeout: 276 seconds)
06:29:31*planetis[m] joined #nim
06:29:32*Miguelngel[m] joined #nim
06:36:19*SenasOzys joined #nim
06:38:28*nsf joined #nim
07:03:34*sz0 joined #nim
07:26:35*endragor quit (Remote host closed the connection)
07:42:18*BitPuffin|osx joined #nim
07:50:25*gokr joined #nim
08:06:45*endragor joined #nim
08:08:20*Vladar joined #nim
08:34:02*claudiuinberlin joined #nim
08:40:22*PMunch joined #nim
08:54:48*JappleAck joined #nim
08:57:40*vlad1777d joined #nim
09:09:39*floppydh joined #nim
09:36:18*madpat quit (Ping timeout: 268 seconds)
10:02:07*arnetheduck joined #nim
10:07:23*vlad1777d quit (Ping timeout: 255 seconds)
10:29:46*madpat joined #nim
10:32:46FromGitter<mratsim> @dom96 can't read the latest reply to https://forum.nim-lang.org/t/3295/2
10:34:04*jjido joined #nim
10:38:22dom96fixed
10:38:35*Vladar quit (Quit: Leaving)
10:42:08*madpat quit (Ping timeout: 276 seconds)
10:44:49*SenasOzys quit (Ping timeout: 248 seconds)
10:47:56*madpat joined #nim
10:54:31*SenasOzys joined #nim
10:57:01*jjido quit (Ping timeout: 240 seconds)
11:22:06*arecaceae quit (Remote host closed the connection)
11:22:24*arecaceae joined #nim
11:27:56*xkapastel quit (Quit: Connection closed for inactivity)
11:28:44*jjido joined #nim
11:32:29FromGitter<alehander42> https://www.mercurial-scm.org/wiki/OxidationPlan ah, that sounds like something that could be redone in Nim (some people already did python extensions/interop with nim and it should be much easier to pickup for people in a python codebase)
11:32:38*dddddd joined #nim
11:57:44Araqsure but people who start projects in Python+C don't deserve productivity, so Rust seems fine for them *cough*
11:59:08Araqmixed language development always was a pain for me, I don't understand why it's so popular.
12:00:00*skrylar quit (Remote host closed the connection)
12:04:18*elrood joined #nim
12:05:11jjidoWell nim effectively encourages multi language dev
12:05:21jjidoWith C ffi
12:09:32Araqmaybe, I beg to differ though. good interop just means you can use other libraries easily
12:10:04Araqnot that you should continue to write C code, it's a legacy
12:16:49*salewski joined #nim
12:17:00madpatWhy should one stop writing C code, if it enables the library to be used by different programming languages?
12:17:53salewskiYes, I hate mixed language development too, for example Ruby + C.
12:18:33Araqbecause it's an essentially an under specification of the program, is this really a pointer to a single element or a pointer to an array, is this zero terminated or not, is this 'int' actually a 'bool'
12:18:43salewskiBut I am still not sure how we can best support scripting with Nim, for example for a CAD tool.
12:18:55*Vladar joined #nim
12:19:02Araqthere are plenty of languages that allow you to write native libraries.
12:19:18salewskiPeople could write their scripts in Nim, but then they have to recompile full app.
12:19:21AraqC++, D with its "betterC" subset, Nim, Rust
12:20:29salewskiI guess writing plugins would work with Nim?
12:20:44Araq"is this a natural number or does it depend on modulo arithmetic?"
12:21:57Araqsalewski, if you use the "C-like" features of Nim, you can write a C-like plugin system.
12:24:48salewskiAraq, does your NimEdit support scripting?
12:24:58Araqyeah, via NimScript
12:25:20salewskiAh, interesting.
12:26:24salewskiBye.
12:26:27*salewski quit (Quit: WeeChat 1.9.1)
12:27:36*Snircle joined #nim
12:33:03*couven92 joined #nim
12:37:08*madpat quit (Read error: Connection reset by peer)
12:39:53*madpat joined #nim
12:58:18*SenasOzys quit (Ping timeout: 260 seconds)
13:00:57*SenasOzys joined #nim
13:01:28*madpat quit (Read error: Connection reset by peer)
13:02:50*madpat joined #nim
13:07:11*madpat quit (Ping timeout: 255 seconds)
13:07:45*JappleAck quit (Ping timeout: 248 seconds)
13:24:36*JappleAck joined #nim
13:37:43FromGitter<kinokasai> Hey
13:37:57FromGitter<kinokasai> Is there a 1-bit type in Nim?
13:38:41FromGitter<kinokasai> Or do I have to use something akin to `nim-bitarray` to get a bit array? 
13:38:49*natrys joined #nim
13:44:13*Jesin quit (Quit: Leaving)
13:46:00*MJCaley joined #nim
13:47:28*SenasOzys quit (Read error: Connection reset by peer)
13:47:58*SenasOzys joined #nim
13:48:57FromGitter<mratsim> 1-bit types are implementation dependant, not portable between x86, ARM, Mips, PowerPC, etc.
13:49:20FromGitter<mratsim> (and obviously JavaScript)
13:50:04FromGitter<kinokasai> Oh, okay
13:51:47FromGitter<mratsim> You can roll your own in 20 lines, see: https://github.com/mratsim/nim-projecteuler/blob/master/src/lib/bithacks.nim
13:54:03FromGitter<kinokasai> Hm.
13:54:34FromGitter<mratsim> (note, that was my very first Nim code so indentation is wrong, and some stuff are not idiomatic Nim).
13:54:42FromGitter<kinokasai> But then slices and such get tricky, don't they?
13:55:08FromGitter<mratsim> I never used nim-bitarray so can't comment on it. It seems to do much more than a simple bitarray.
13:57:59FromGitter<mratsim> I think nim-bitarray supports slices.
13:57:59FromGitter<kinokasai> Yeah, but only up to 64 bits long, I think
13:59:42FromGitter<kinokasai> Yes, that's also a solution.
13:59:45FromGitter<kinokasai> Thanks.
14:04:18FromGitter<RedBeard0531> What is the best way to go from a seq[char] or a pointer+len to a string? Is there anything better than newString() + copyMem?
14:23:27def-@RedBeard0531: $cast[cstring](foo)
14:24:25FromGitter<RedBeard0531> @def- it's not NULL terminated
14:24:44def-hm, doesn't seem to work anyway. yes, then copymem sounds reasonable
14:27:04FromGitter<RedBeard0531> @def- I think `$castcstring (addr foo[0])` would work if it was nul terminated. Although it is still kinda gross looking.
14:27:29def-yeah, exactly
14:29:12def-with copyMem you also have to access addr foo[0], so not much better
14:31:14*madpat joined #nim
14:37:21FromGitter<zetashift> @def- , selfish question but do you have plans for new blogposts?(nim or not nim related)
14:37:31FromGitter<zetashift> hopefully ofcourse nim related hehe
14:46:19*endragor quit (Remote host closed the connection)
14:48:15*endragor joined #nim
14:52:27*endragor quit (Ping timeout: 240 seconds)
15:09:33*nsf quit (Quit: WeeChat 1.9.1)
15:11:21def-@zetashift I have one waiting for review, but not nim related. not really using nim currently
15:16:56*MJCaley quit (Quit: MJCaley)
15:23:17PMunchkinokasai, what do you need a 1 bit type for?
15:24:05cremSets can be at most 8 kilobytes in size, right?
15:25:14*MJCaley joined #nim
15:35:00*PMunch quit (Quit: Leaving)
15:36:22*Jesin joined #nim
15:41:36Araqcrem, or 16kb can't remember. the limit mostly exists in order to keep people from doing set[int]
15:42:26*jjido quit (Ping timeout: 255 seconds)
15:46:29cremIs there a set with O(n) iteration (n is number of stored elements)? Basically tree-based, as std::set in C++.
15:49:29FromGitter<loongw> @Araq for https://github.com/nim-lang/Nim/issues/6860 ⏎ Here is a simple example: ⏎ https://play.nim-lang.org/?gist=968dbe0616b05e3f1ed98ad5fd401993
15:50:17*SenasOzys quit (Ping timeout: 255 seconds)
15:50:24Araqso? Uid's definition is wrong
15:50:33Araqwhich is not an object
15:51:48FromGitter<loongw> So, it is not safe without --d:checkabi
15:52:01Araqcrem, there are only hash sets and hashes of bitsets, trees are old fashioned
15:53:16*SenasOzys joined #nim
15:53:22FromGitter<RedBeard0531> @Araq what about intset and critbit? Aren't they (particularly fancy) trees?
15:54:23Araqloongw: -d:checkabi finds some serious bugs for the posix standard. I don't see the connection to the safety.
15:54:43Araqs/posix standard/posix module
15:55:10Araqit's not like you can use -d:checkabi, the code doesn't compile then
15:59:59Araqloongw: some parts in Nim deliberately underspecify the contents of some Posix structs though
16:00:19Araqbecause only some fields are accessed
16:00:35Araqso your check produces some false positives
16:03:37FromGitter<loongw> those deliberate cases should be marked with some flag to prevent abi checking
16:06:25*SenasOzys quit (Ping timeout: 248 seconds)
16:08:12*vivus joined #nim
16:12:40*jjido joined #nim
16:16:09*rbrt joined #nim
16:18:35*Lord_Nightmare quit (Ping timeout: 240 seconds)
16:21:07*rbrt quit (Quit: Oíche mhaith)
16:23:59Araqit's marked with {.importc, header.} for a reason
16:24:02Araqit means "Import from the header"
16:24:16Araqwhat other annotation do you think should be used?
16:24:36*rbrt joined #nim
16:30:37*SenasOzys joined #nim
16:37:14FromGitter<loongw> marking with {.importc, header.} indicates only it's imported from c, lack some information that whether it should be keep the same size with C. sorry for my poor English!
16:38:34FromGitter<loongw> Anyway, the compiler should prevent this kind of bugs
16:45:22FromGitter<loongw> 'some parts in Nim deliberately underspecify the contents of some Posix structs though' ⏎ I mean this part should be marked to prevent them from being checked when -d:checkabi is defined
16:47:38*MJCaley quit (Quit: MJCaley)
16:51:05*rbrt quit (Quit: Oíche mhaith)
16:53:28Araqit always keeps the size with C.
16:53:51Araq-d:checkabi should ignore header'ed object type definitions
16:57:03*Lord_Nightmare joined #nim
16:57:08*miran joined #nim
16:58:35FromGitter<alehander42> araq: I thought the plan was for me to change the dsl for PR jsobject to `jsobject(x: int, y: bool)` before eventual merge
17:01:21FromGitter<loongw> So, the solution is '-d:checkabi should ignore header'ed object type definitions' and '-d:checkabi' should be default on ?
17:05:45*nsf joined #nim
17:09:39*Trustable joined #nim
17:13:39*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
17:17:38*MJCaley joined #nim
17:24:07*couven92 quit (Quit: Client disconnecting)
17:30:45FromGitter<Varriount> @loongw Perhaps, for header'd definitions, the only check should be if the Nim definition is larger?
17:38:41GitDisc<Lite5h4dow> hello
17:41:10GitDisc<Lite5h4dow> could i get some assistance?
17:41:16GitDisc<Lite5h4dow> im a little stuck
17:41:34*floppydh quit (Quit: WeeChat 1.9.1)
17:41:51jjidoJust ask
17:42:40GitDisc<Lite5h4dow> im comming to nim from python (please dont stone me)
17:43:07GitDisc<Lite5h4dow> i know proc's arent the same as functions, but i dont know how to use them
17:43:28GitDisc<Lite5h4dow> im getting alittle stuck with the declaration of it
17:43:34GitDisc<Lite5h4dow> im getting alittle stuck with the declaration of the proc
17:43:49GitDisc<Lite5h4dow> im assuming it always has to return something.
17:44:08jjidoLook at some examples it is not that different from Python
17:44:10*epr0xe joined #nim
17:44:28FromGitter<zetashift> it doesn't! https://nim-by-example.github.io/procs/
17:44:31GitDisc<Lite5h4dow> im trying to understand it from nimbyexample
17:44:36FromGitter<zetashift> oh haha
17:44:37GitDisc<Lite5h4dow> yeah there
17:44:39jjidoNo it doesn't have to
17:44:45GitDisc<Lite5h4dow> does it not?
17:45:07GitDisc<Lite5h4dow> but atom throws exceptions at me
17:45:19FromGitter<zetashift> show the code
17:47:27GitDisc<Lite5h4dow> ```var
17:47:28GitDisc<Lite5h4dow> runProgram = false
17:47:29GitDisc<Lite5h4dow> programSelect = "Null"
17:47:30GitDisc<Lite5h4dow> config = ConfigTemp.new()
17:47:32GitDisc<Lite5h4dow> library = ApplicationLibrary.new()
17:47:33GitDisc<Lite5h4dow>
17:47:34GitDisc<Lite5h4dow> newFileStream("configs/root.yaml").load(config)
17:47:36GitDisc<Lite5h4dow> newFileStream("configs/appLibrary.yaml").load(library)
17:47:37GitDisc<Lite5h4dow>
17:47:38GitDisc<Lite5h4dow> proc'ApplicationLaunch'():
17:47:40GitDisc<Lite5h4dow> if runProgram:
17:47:41GitDisc<Lite5h4dow> echo "program ", programSelect, "has been selected for launch"
17:47:42GitDisc<Lite5h4dow>
17:47:43GitDisc<Lite5h4dow> block mainLoop:
17:47:45GitDisc<Lite5h4dow> while true:
17:47:46GitDisc<Lite5h4dow> echo "enter input: "
17:47:47GitDisc<Lite5h4dow> var input = readLine(stdin)
17:47:49GitDisc<Lite5h4dow> for i in split(tolower(input)):
17:47:50GitDisc<Lite5h4dow>
17:47:51GitDisc<Lite5h4dow> if i in library.applist:
17:47:53GitDisc<Lite5h4dow> programSelect = i
17:47:54GitDisc<Lite5h4dow>
17:47:55GitDisc<Lite5h4dow> if i in config.disable:
17:47:56GitDisc<Lite5h4dow> echo "leaving loop"
17:47:58GitDisc<Lite5h4dow> break mainLoop
17:47:59GitDisc<Lite5h4dow>
17:48:00GitDisc<Lite5h4dow> if i in config.run:
17:48:02GitDisc<Lite5h4dow> runProgram = true
17:48:03GitDisc<Lite5h4dow> echo "Run's a Program"
17:48:04GitDisc<Lite5h4dow>
17:48:06GitDisc<Lite5h4dow> if i in config.interaction: <message clipped>
17:48:07GitDisc<Lite5h4dow> ```proc'ApplicationLaunch'():
17:48:08GitDisc<Lite5h4dow> if runProgram:```
17:48:15GitDisc<Lite5h4dow> those three lines are red
17:48:22flyxwtf, please use gist or something
17:48:30GitDisc<Lite5h4dow> sorry
17:48:35GitDisc<Lite5h4dow> im on the discord xD
17:48:39GitDisc<Lite5h4dow> hold on
17:49:12flyxhum, the other bridge to hows-it-called shortens code pastes
17:49:22flyxseems like the Discord one does not
17:50:58FromGitter<zetashift> @Lite5h4dow try https://play.nim-lang.org/
17:51:22flyxanyway, should be `proc ApplicationLaunch():` instead of `proc'ApplicationLaunch'():`
17:52:03dom96s/:/=/
17:52:31flyxah yes
17:52:34flyxmissed that ^^
17:52:57flyxbtw, you do not need to initialize config or library, NimYAML does that for you
17:54:13*MJCaley quit (Quit: MJCaley)
17:59:11FromGitter<raydf> hi everyone
18:00:06GitDisc<Lite5h4dow> really?
18:00:11GitDisc<Lite5h4dow> i didnt know that
18:00:44FromGitter<raydf> Hi @Araq, i'm having an error running karax in android, when i try to use text "Activaci\243n" with the escaped latin character it gives decodeURIComponent "URI Malformed". Any idea how to fix this kind of error?
18:01:09GitDisc<Lite5h4dow> and why is it `proc ApplicationLaunch` instead of `proc 'ApplicationLaunch'`
18:01:10*MJCaley joined #nim
18:03:17flyxbecause the proc name is not a character literal, but an identifier.
18:04:39flyxyou don't write `def 'ApplicationLaunch'():` in Python, do you
18:05:57GitDisc<Lite5h4dow> im assuming operators in nim dont specifically run commands then
18:06:05GitDisc<Lite5h4dow> also im still getting an error
18:06:36flyxwell proc is not an operator.
18:07:16GitDisc<Lite5h4dow> https://play.nim-lang.org?gist=b8eead7035c533fc50fcb4ea6575955b
18:07:18flyxokay, I don't really understand what you mean by „operators don't specifically run commands“
18:07:43GitDisc<Lite5h4dow> so in python i would use def's to run code that i didnt want to type multiple times
18:08:05GitDisc<Lite5h4dow> if it needed to be done multiple times, i put it in a def
18:08:17GitDisc<Lite5h4dow> i assumed that thats what operators were in nim
18:08:35GitDisc<Lite5h4dow> since the nim by example page shows them running operations
18:08:42GitDisc<Lite5h4dow> instead of just doing simple addition
18:08:48GitDisc<Lite5h4dow> and returning an integer
18:09:03flyxwe need to pin down terminology a bit here
18:09:50GitDisc<Lite5h4dow> ok
18:10:02flyx„operator“ usually is the name for special procs like + in `1 + 2`
18:10:12GitDisc<Lite5h4dow> right
18:10:16GitDisc<Lite5h4dow> ok
18:10:30GitDisc<Lite5h4dow> that was a little confusing
18:10:50FromGitter<Varriount> Python has the same terminology.
18:11:03flyxprocs and defs are very much the same. both can return values, but do not have to. both can have the purpose of calculating some result or executing some action or both
18:12:16GitDisc<Lite5h4dow> ok
18:12:36GitDisc<Lite5h4dow> so why is it complaining that i used an if statement after naming the proc
18:13:09Miguelngel[m]Hello, has at some point a syntax sugar to map `for var x in y` to `for x in y.mitems` like it does for the inmutable version considered for inclusion or thought about?
18:14:19FromGitter<Varriount> Lite5h4dow: In Nim, procedures go `proc name(arg: argType): returnType =`
18:15:03FromGitter<Varriount> Note the `returnType` between `:` and `=`
18:15:39jjidoUse void if it returns nothing
18:16:19GitDisc<Lite5h4dow> right ok
18:16:38GitDisc<Lite5h4dow> i couldnt find anything that said anything about void
18:17:11GitDisc<Lite5h4dow> and say i want to use multiple arguments when i call the proc
18:17:50flyxwell `: void` can be left out
18:17:55GitDisc<Lite5h4dow> would it go something like `proc name(arg: argType, arg2: arg2 Type):
18:18:03flyxyes
18:18:39GitDisc<Lite5h4dow> ok
18:19:23GitDisc<Lite5h4dow> and if i wanted to orun the proc would it be `name(argIn, argIn2)`
18:20:11GitDisc<Lite5h4dow> just making sure
18:20:21GitDisc<Lite5h4dow> because i have tard moments quite often
18:20:46*rbrt joined #nim
18:20:48flyxyep. just try to write a bit of code and see what happens
18:22:39GitDisc<Lite5h4dow> alrighty :3 thanks for the help guys
18:22:48GitDisc<Lite5h4dow> your much friendlier than stackoverflow
18:23:50flyxyeah well, SO is not really the place for learning languages
18:28:24FromGitter<Varriount> If you omit the return type, it has to end with `=`, not `:`
18:29:33*NimBot joined #nim
18:30:13FromGitter<alehander42> it always ends with `=`, `: void` can be skipped
18:30:28*claudiuinberlin joined #nim
18:34:33*rbrt quit (Quit: Oíche mhaith)
18:35:01*xkapastel joined #nim
18:35:56FromGitter<alehander42> btw there was some video before of a guy speeding up Python/or writing python extensions in Nim or something
18:36:04*rbrt joined #nim
18:36:06FromGitter<alehander42> does anybody know a link?
18:36:16*rbrt quit (Client Quit)
18:36:36Araqhttps://objective-see.com/blog/blog_0x24.html -- interesting read and once more a bug that can be blamed on the poor type system
18:36:44Araqof C.
18:49:20FromGitter<raydf> Thanks @Araq, fixed it with the help of your comment.
18:49:56miranis there a way to define a range which changes as the variable changes?
18:50:19mirane.g. myRange = range[-variable .. variable]
18:51:42FromGitter<zacharycarter> @alehander42 : https://2017.pygotham.org/talks/nim-a-new-option-for-optimizing-inner-loops/
18:53:49GitDisc<Lite5h4dow> one more question
18:54:13GitDisc<Lite5h4dow> in python you can `if variable` and if it contains something then it will return true
18:54:18GitDisc<Lite5h4dow> can nim not do this?
18:55:16FromGitter<zacharycarter> No
18:55:28FromGitter<zacharycarter> you can check if a ref object is nil
18:55:42FromGitter<zacharycarter> and you can check if an object has been assigned a value
18:55:45*skoude joined #nim
18:56:03GitDisc<Lite5h4dow> im sotty what do you mean by ref object is nil?
18:56:13GitDisc<Lite5h4dow> i dont know coding terminoligy
18:56:26FromGitter<zacharycarter> might help to read through : https://nim-by-example.github.io/types/objects/
18:56:27GitDisc<Lite5h4dow> i taught myself from reading other peoples code
18:57:19GitDisc<Lite5h4dow> oh right
18:57:21GitDisc<Lite5h4dow> hmm
18:57:54GitDisc<Lite5h4dow> not very n00b friendly
18:58:09GitDisc<Lite5h4dow> well ill work with it
18:58:36FromGitter<zetashift> Also PMunch explanation here helped me enormously: https://www.reddit.com/r/nim/comments/7dm3le/tutorial_for_types_having_a_hard_time/dpz9vue/
19:01:28GitDisc<Lite5h4dow> ty
19:05:00*rbrt joined #nim
19:05:06GitDisc<Lite5h4dow> ooh
19:05:29GitDisc<Lite5h4dow> can proc's have multiple returns?
19:05:51FromGitter<zacharycarter> no
19:05:55GitDisc<Lite5h4dow> crap
19:05:58FromGitter<zacharycarter> but you can return tuples
19:05:59GitDisc<Lite5h4dow> ok
19:06:00FromGitter<zacharycarter> or objects
19:06:07GitDisc<Lite5h4dow> oooooooooooooooh
19:06:12Araqthey can return a tuple or an Option[T] or ...
19:06:13GitDisc<Lite5h4dow> ok that gives me alot of options
19:06:31GitDisc<Lite5h4dow> do you have an example of a proce returning an object?
19:06:36GitDisc<Lite5h4dow> do you have an example of a proc returning an object?
19:08:21FromGitter<zacharycarter> https://play.nim-lang.org/?gist=6e6ba3fe61416bfebf0d506db9ae1241
19:09:29FromGitter<zacharycarter> or even more simple
19:09:29*Vladar quit (Quit: Leaving)
19:09:45FromGitter<zacharycarter> https://play.nim-lang.org/?gist=aaccaeda94e201181682ca66765f1c76
19:14:50GitDisc<Lite5h4dow> 10/10 ign
19:15:44GitDisc<Lite5h4dow> and what do i use instead of toLower , nim keeps saying is depreciated
19:16:25FromGitter<zacharycarter> toLowerAscii
19:16:32FromGitter<zacharycarter> https://nim-lang.org/docs/strutils.html#toLower,char
19:17:16FromGitter<zetashift> toLowerAscii
19:17:18FromGitter<zetashift> damn it!
19:18:41Araqor unicode.cmpIgnoreCase() == 0
19:18:50Miguelngel[m]Bumping the question in case it was missed before: Has at some point a syntax sugar to map `for var x in y` to `for x in y.mitems` like it does now for the inmutable version considered for inclusion in the language?
19:18:55AraqtoLower is a bad idea
19:19:08AraqMiguelngel[m], not really.
19:20:10Araqseems a nice idea
19:26:58*JappleAck quit (Quit: Leaving)
19:27:35*jjido quit (Ping timeout: 240 seconds)
19:30:38GitDisc<Lite5h4dow> Because im going to remember `unicode.cmpIgnoreCase() == 0`
19:30:42GitDisc<Lite5h4dow> xD
19:42:27Araqpretty sure you will, you already connected an emotion to it
19:44:43*rbrt quit (Quit: Oíche mhaith)
19:45:11*BitPuffin|osx quit (Ping timeout: 255 seconds)
19:59:57*jjido joined #nim
20:03:11*skoude quit (Ping timeout: 255 seconds)
20:07:27GitDisc<Lite5h4dow> you sir have no social life( im assuming) xD
20:09:25FromGitter<RedBeard0531> @Araq I noticed unicode.cmpIgnoreCase() is using toLower rather than the full unicode case-folding rules from http://unicode.org/Public/UNIDATA/CaseFolding.txt. Would you accept a PR to do full case folding, or is the current behavior desired?
20:09:30jjidoif you have Fecebook you are social
20:10:18FromGitter<zacharycarter> I abhor fb
20:10:29FromGitter<zacharycarter> so I guess I'm anti-social?
20:10:30FromGitter<zacharycarter> :P
20:10:38AraqRedBeard0531: PR please
20:10:49jjidoyeah
20:11:40FromGitter<zetashift> Araq's only true friend is the Nim repo
20:14:01*epr0xe quit (Remote host closed the connection)
20:14:48FromGitter<alehander42> he just has to start enforcing one of those "emoji for each commit" methodologies
20:17:26FromGitter<RedBeard0531> @Araq which version of the unicode data files are currently used in nim? Should I just use the latest data file for case folding?
20:18:10Araqyeah please.
20:18:28*skoude joined #nim
20:18:40Araqcurrently we use Plan 9's tables from 1850
20:20:16Miguelngel[m]1850 was a good year for unicode.
20:24:02Araqmore importantly, find a way to generated the Nim lookup tables from the unicode tables
20:24:08Araq*to generate
20:25:17FromGitter<RedBeard0531> Should be easy using slurp()
20:26:47Araqzetashift: Da ist noch was tief in mir drin, ein Schatten im Verstand,
20:26:47Araqes ist wie ein Teil von mir, es hat mich in der Hand.
20:27:58dom96s/:/=/
20:28:13dom96ugh. Anyone familiar with rpath on mac os x?
20:28:27FromGitter<zacharycarter> dom96: kind of
20:28:54dom96zacharycarter: I put all my sfml dylib's into a ./lib folder
20:29:24dom96and set the DYLD_LIBRARY_PATH to lib, but it's complaining that it can't find "@rpath/libsfml-system.2.4.dylib" :\
20:31:08FromGitter<zacharycarter> I know you can set rpath as a linker flag
20:31:18dom96yeah. But what do I set it to? :)
20:31:31Araqset it to '.'
20:31:55dom96Araq: Doesn't help
20:32:11Araqwell change your cwd
20:33:06FromGitter<zacharycarter> ``````
20:33:10FromGitter<zacharycarter> is how I've generally done it
20:33:58dom96again, I can set the rpath
20:34:01dom96I don't know what to set it to
20:34:21FromGitter<zacharycarter> it's wherever the library is relative to your CWD
20:34:29FromGitter<zacharycarter> so I would imagine ./lib or ../lib would work
20:36:19dom96I just tried setting it to the absolute path and it still refuses to work :\
20:36:31FromGitter<zetashift> @Araq as I'm dutch and we had 3 years of german which I forgot most of I can only say you have something deep inside and it controls you?
20:36:40FromGitter<zacharycarter> wtf
20:36:57FromGitter<zacharycarter> did you try using an absolute path along with the library name?
20:36:58FromGitter<zacharycarter> like
20:37:12FromGitter<zacharycarter> -Wl,-rpath=/usr/local/lib/foo.dylib
20:37:18FromGitter<zacharycarter> that's the only other thing I can think to try
20:37:25dom96omg
20:37:32dom96It's because 2.4.0 exists but not 2.4
20:37:33dom96-.-
20:37:35FromGitter<zacharycarter> :P
20:37:50FromGitter<zacharycarter> why are you using shitty sfml anyway?
20:39:56dom96What's wrong with sfml?
20:39:58dom96it's awesome
20:40:25FromGitter<zacharycarter> meh - I just look at it lagging severely behind SDl2
20:40:29FromGitter<zacharycarter> and GLFW3
20:40:42FromGitter<zacharycarter> It also takes too much control over your game IMO
20:40:47*SenasOzys quit (Read error: Connection reset by peer)
20:40:50FromGitter<zacharycarter> and has poo support for mobile
20:41:26dom96"Library not loaded: @rpath/../Frameworks/freetype.framework/Versions/A/freetype"
20:41:38dom96this is really not fun when you're time constrained arghhhh
20:44:49FromGitter<zetashift> I still can't take of anything except shitty endless runners and some sheep herding game
20:45:22*SenasOzys joined #nim
20:46:01*couven92 joined #nim
20:47:15Araqbtw what is OSX's equivalent of control-alt-del?
20:48:06FromGitter<zacharycarter> cmd + option + esc
20:48:08FromGitter<zacharycarter> to force kill an app
20:48:52Araqwhat's the option key?
20:49:14Araqshift?
20:49:20FromGitter<zacharycarter> no it's like the alt key on windows
20:49:39FromGitter<zacharycarter> in fact I think shift + option = alt
20:49:46FromGitter<zacharycarter> it's a clusterfuck if you ask me
20:52:35Araqwell it's Apple. poor usability on top of a Unix.
20:52:39*miran quit (Quit: Konversation terminated!)
20:53:20dom96You guys just haven't felt Steve's light.
20:56:22FromGitter<zacharycarter> I played a tiny bit with nim-godot this weekend and by that I mean I got an example project up and running
20:56:34FromGitter<zacharycarter> may play around with it more this evening and if my experiments go well I'll write a blog post about it
20:58:20FromGitter<zetashift> I tried it too but I couldn't figure out much(this is mostly cause I'm also a noob at godot), I wrote a small shmup in nimgame2 instead
20:58:50FromGitter<zetashift> weird I usually don't send double posts...also @zacharycarter looking forward to your writeup if it goes well
21:02:09*marenz_ joined #nim
21:16:15*MightyJoe is now known as cyraxjoe
21:17:59*qwertfisch is now known as cefhiqrstw
21:21:36*natrys quit (Read error: Connection reset by peer)
21:27:26*gokr quit (Ping timeout: 260 seconds)
21:29:03FromGitter<ephja> early access sheep herding simulator?
21:32:15Araqzacharycarter: what's your RTS doing? DoW 3 is so boring I stopped playing
21:37:07*vlad1777d joined #nim
21:48:21dom96when htop crashes you know you're having a bad day
21:49:11*skoude quit (Ping timeout: 255 seconds)
21:49:33*skoude joined #nim
21:50:21*Trustable quit (Remote host closed the connection)
21:53:35*skoude quit (Ping timeout: 240 seconds)
21:56:46Araqanybody with an opinion on "Smart TVs"?
21:57:17*rbrt joined #nim
22:00:07elroodwant to increase you household's hackability index or your personal surveillability? get one ;P
22:02:48Araqit's not for me :P. I know everything built on top of millions of lines of C code is as safe as dynamite in the open sun
22:03:03elroodnah, more seriously, if you're into netflixing etc. they're a nice thing to have, nothing you couldn't achieve with a settop-box as well though, apart from some usability benefits with an integrated solution
22:04:29FromGitter<zetashift> ^ agree
22:06:41Calinou<Araq> anybody with an opinion on "Smart TVs"?
22:06:46Calinouvar opinion = "negative"
22:07:15Calinoubut I never watch TV anyway (except when my parents watch it, therefore I also watch it)
22:08:14FromGitter<zetashift> Calinou, are you doing the LDJam?
22:08:45Calinounope :( complete lack of time
22:08:59FromGitter<tim-st> When I have the choice between using const and let, is there one to prefer always?
22:09:12CalinouI made this, though: https://github.com/Calinou/godot-sponza
22:11:45Araqtim-st: when you have the choice, use 'const'
22:13:08Calinouit's a good idea to always use constants if possible, or immutable variables if constants are not possible
22:13:12Calinou(in any language)
22:16:23FromGitter<tim-st> Ok, thanks. One other question regarding source code and the compiler: I saw for example the lines `if not rune.isWhiteSpace() and firstRune: ... elif rune.isWhiteSpace():` couldn't this be simplified and if so is a modern compiler smart enough to do this?
22:16:44elroodsomeone should write a language which only provides SSA and no variables to prove the point, Calinou. i'm sure it would be a joy to use ;)
22:21:06*MJCaley quit (Quit: MJCaley)
22:21:22Araqelrood, huh? Haskell already exists ;-)
22:21:38Calinouelrood: SSA?
22:21:51elroodstatic single assignment
22:21:52Calinoualso, when I meant "if possible", I mean "without having to modify other sections of your code" :)
22:22:08CalinouI see many people using "let" in ES2015 where they could use "const"
22:22:19Calinou(JetBrains IDEs will warn you about this)
22:32:26*klaver010110 quit (Quit: Connection closed for inactivity)
22:34:06FromGitter<zacharycarter> @Araq I got a pre-rendered sprite workflow down so I'm now deciding whether to build the engine myself or go with godot / ue4 / unity / whatever engine here
22:36:08*nsf quit (Quit: WeeChat 1.9.1)
22:36:11Araqbuild it yourself, we have another wrappers that -uhm- become abandoned
22:36:17Araq*we have enough
22:36:34FromGitter<zacharycarter> hehe truth
22:37:03*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
22:37:33FromGitter<zacharycarter> I'll work on some graphics tonight I think
22:48:35*maximpertsov quit (Quit: Connection closed for inactivity)
22:50:05*rbrt quit (Quit: Oíche mhaith)
22:50:42*Jesin quit (Quit: Leaving)
22:53:02FromGitter<barcharcraz> tim-st: I tend to use const for constants and var for everything else
22:53:25FromGitter<barcharcraz> let for stuff I can't put const on but is in a wide scope
22:53:35*rbrt joined #nim
22:54:15FromGitter<tim-st> Ok, thanks for your answers!
22:55:54GitDisc<Lite5h4dow> ok im getting the hang of procs now thanks to you guys
22:56:12GitDisc<Lite5h4dow> code is coming together nicely in an oop method that i have never used before
22:56:20GitDisc<Lite5h4dow> do have one question though
22:57:20GitDisc<Lite5h4dow> now im wrighting procs ina a file that hosts the procs for other running programs to access, however i have a main file that pulls the commands from the command bank, that wants to access a library
22:57:35GitDisc<Lite5h4dow> now the code is working the imports are becoming a mess
22:58:56GitDisc<Lite5h4dow> if im running a command from imported nim file 1, that takes the command form imported nim file 2, can impoerted nim file 2 access imported nim file 3's public variables?
22:59:17*skrylar joined #nim
22:59:54FromGitter<barcharcraz> If I understand the question correctly the answer is no
23:01:21GitDisc<Lite5h4dow> crap
23:02:13GitDisc<Lite5h4dow> crap, let me see if i can clarify it
23:02:48GitDisc<Lite5h4dow> ok core runtime application, imports a command from file 1, that needs a variable from imported file 2
23:04:23GitDisc<Lite5h4dow> how can the imported command read the variable from imported file 2
23:05:06GitDisc<Lite5h4dow> does that clear it up a little?
23:09:46FromGitter<zetashift> make a proc that returns that variable and make it so you can use it in another module?
23:10:07FromGitter<zetashift> putting a * behind the procs name
23:14:55shashlickdom96: I've finally added nimgen to the Nimble package.json, please approve the pull request
23:19:25GitDisc<Lite5h4dow> alrighty
23:19:46GitDisc<treeform> what is nimgen?
23:21:38FromGitter<zetashift> Probably this: https://github.com/genotrance/nimgen -> "Nimgen is a helper for c2nim to simpilfy and automate the wrapping of C libraries."
23:24:25*jjido quit (Remote host closed the connection)
23:30:29shashlickthanks @zetashift
23:30:52shashlickjust updated the README to link to nimfuzz which is a fuzzy match wrapper
23:34:25*rbrt quit (Quit: Oíche mhaith)
23:34:57*rbrt joined #nim
23:35:34GitDisc<treeform> looks cool
23:36:17*rauss quit (Quit: WeeChat 1.9.1)
23:36:38*rbrt quit (Client Quit)
23:37:43*rauss joined #nim
23:40:22*jjido joined #nim
23:40:50GitDisc<treeform> flyx, are you around? I am using your YAML parser, but run into really strange things where it parses stuff incorrectly some times. (it gets values from different fields) But if i shuffle unrelated lines or change -d:release it parses correctly again. But I think I might be just loosing my mind. Not sure how to debug it.
23:41:24flyxtreeform: can you show me an example? didn't want to sleep anyway
23:41:56GitDisc<treeform> I try to make a small example but it seems to only happen when results are really large.
23:42:08GitDisc<treeform> Small example everything works 100%.
23:43:22GitDisc<treeform> Here is the yaml it some times gets confused on: https://raw.githubusercontent.com/ua-parser/uap-core/master/tests/test_device.yaml
23:44:16GitDisc<treeform> Some times on line 15,648 it grabs fields from couple of lines bellow.
23:45:44GitDisc<treeform> for example it parsed the following entry as some thing completely different:
23:45:45GitDisc<treeform> https://gist.github.com/treeform/9e09a2f89f8f03d75ce69cb7816604ce
23:46:02flyxfrom the description it could be a bug in lexbase since the problem occurring only at large inputs hints to an issue with buffer refilling. otoh, I read most of lexbase and did't see any error
23:46:25GitDisc<treeform> interesting
23:46:42GitDisc<treeform> but why does adding or removing echo's change how it parses?
23:46:47flyxanother possibility is that I am too eager with shallow string copying
23:47:22flyxhowever I can't imagine why that would only pop up on large inputs
23:47:29GitDisc<treeform> It appears its gets confused with many little strings are involved?
23:48:17flyxwell it shouldn't. strings are managed by Nim's memory management. do you parse it into an in-memory data structure?
23:48:27GitDisc<treeform> yes
23:49:20GitDisc<treeform> Now that I know that you are listening. I can try to give you a better write up tomorrow, when you wake up?
23:49:23flyxmight be worth looking at the event stream
23:49:43flyxcan you drop it into an issue on GH?
23:49:57flyxI am usually at work during the day ;)
23:50:54flyxsomething you can do: compile tools/testSuiteEvents.nim . it compiles a binary that reads YAML from stdin and emits events
23:51:22flyx(the file is probably not part of the nimble install, you can fetch it from the GH repo)
23:51:34*def-pri-pub joined #nim
23:51:50GitDisc<treeform> I will produce a good issue for you.
23:51:52flyxyou can inspect the output with grep or something and check whether the events have the correct string values there
23:53:21GitDisc<treeform> The funny thing if I just load yaml file by itself it loads correctly.
23:54:00GitDisc<treeform> The parse error is random but stable to a compiled binary.
23:54:22GitDisc<treeform> If I compile an binary the error will be in the same place.
23:54:35GitDisc<treeform> If I compile another binary it would be in a different place.
23:54:50flyxnow that is definitely interesting
23:54:52GitDisc<treeform> Some times it works.
23:55:06flyxand definitely hard to debug
23:55:09GitDisc<treeform> It seems to be a dice roll during compile.
23:55:27GitDisc<treeform> You are doing doing any const rand() ?
23:56:15flyxnope
23:56:35GitDisc<treeform> Its like cosmic rays are hitting my computer.
23:56:49GitDisc<treeform> flipping bits
23:57:09flyxwe are going to be rich and famos after we showed Nim can be used to detect cosmic rays.
23:58:38*Jesin joined #nim